1 # 1 "check.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "check.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 
32 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
33 /*
34  * CDDL HEADER START
35  *
36  * The contents of this file are subject to the terms of the
37  * Common Development and Distribution License (the "License").
38  * You may not use this file except in compliance with the License.
39  *
40  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
41  * or http://www.opensolaris.org/os/licensing.
42  * See the License for the specific language governing permissions
43  * and limitations under the License.
44  *
45  * When distributing Covered Code, include this CDDL HEADER in each
46  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
47  * If applicable, add the following below this CDDL HEADER, with the
48  * fields enclosed by brackets "[]" replaced with your own identifying
49  * information: Portions Copyright [yyyy] [name of copyright owner]
50  *
51  * CDDL HEADER END
52  */
53 
54 /*
55  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
56  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
57  */
58 
59 /*	Copyright (c) 1988 AT&T	*/
60 /*	  All Rights Reserved  	*/
61 
62 /*
63  * User-visible pieces of the ANSI C standard I/O package.
64  */
65 
66 
67 
68 
69 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
70 /*
71  * CDDL HEADER START
72  *
73  * The contents of this file are subject to the terms of the
74  * Common Development and Distribution License (the "License").
75  * You may not use this file except in compliance with the License.
76  *
77  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
78  * or http://www.opensolaris.org/os/licensing.
79  * See the License for the specific language governing permissions
80  * and limitations under the License.
81  *
82  * When distributing Covered Code, include this CDDL HEADER in each
83  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
84  * If applicable, add the following below this CDDL HEADER, with the
85  * fields enclosed by brackets "[]" replaced with your own identifying
86  * information: Portions Copyright [yyyy] [name of copyright owner]
87  *
88  * CDDL HEADER END
89  */
90 
91 /*
92  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
93  * Copyright 2016 Joyent, Inc.
94  *
95  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
96  * Use is subject to license terms.
97  */
98 
99 
100 
101 
102 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
103 /*
104  * CDDL HEADER START
105  *
106  * The contents of this file are subject to the terms of the
107  * Common Development and Distribution License, Version 1.0 only
108  * (the "License").  You may not use this file except in compliance
109  * with the License.
110  *
111  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
112  * or http://www.opensolaris.org/os/licensing.
113  * See the License for the specific language governing permissions
114  * and limitations under the License.
115  *
116  * When distributing Covered Code, include this CDDL HEADER in each
117  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
118  * If applicable, add the following below this CDDL HEADER, with the
119  * fields enclosed by brackets "[]" replaced with your own identifying
120  * information: Portions Copyright [yyyy] [name of copyright owner]
121  *
122  * CDDL HEADER END
123  */
124 /*
125  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
126  * Use is subject to license terms.
127  */
128 /*
129  * Copyright 2015 EveryCity Ltd. All rights reserved.
130  */
131 
132 
133 
134 
135 /*
136  * This file contains definitions designed to enable different compilers
137  * to be used harmoniously on Solaris systems.
138  */
139 
140 
141 
142 
143 
144 /*
145  * Allow for version tests for compiler bugs and features.
146  */
147 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
148 /*
149  * analogous to lint's PRINTFLIKEn
150  */
151 
152 
153 
154 
155 
156 /*
157  * Handle the kernel printf routines that can take '%b' too
158  */
159 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
160 /*
161  * This one's pretty obvious -- the function never returns
162  */
163 
164 
165 /*
166  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
167  * behaviour.
168  *
169  * Should only be used on 'extern inline' definitions for GCC.
170  */
171 
172 
173 
174 
175 
176 
177 /*
178  * The function has control flow such that it may return multiple times (in
179  * the manner of setjmp or vfork)
180  */
181 
182 
183 
184 
185 
186 
187 /*
188  * This is an appropriate label for functions that do not
189  * modify their arguments, e.g. strlen()
190  */
191 
192 
193 /*
194  * This is a stronger form of __pure__. Can be used for functions
195  * that do not modify their arguments and don't depend on global
196  * memory.
197  */
198 
199 
200 
201 
202 /*
203  * This attribute, attached to a variable, means that the variable is meant to
204  * be possibly unused. GCC will not produce a warning for this variable.
205  */
206 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
207 /*
208  * Shorthand versions for readability
209  */
210 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
211 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
212 /*
213  * CDDL HEADER START
214  *
215  * The contents of this file are subject to the terms of the
216  * Common Development and Distribution License (the "License").
217  * You may not use this file except in compliance with the License.
218  *
219  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
220  * or http://www.opensolaris.org/os/licensing.
221  * See the License for the specific language governing permissions
222  * and limitations under the License.
223  *
224  *
225  * When distributing Covered Code, include this CDDL HEADER in each
226  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
227  * If applicable, add the following below this CDDL HEADER, with the
228  * fields enclosed by brackets "[]" replaced with your own identifying
229  * information: Portions Copyright [yyyy] [name of copyright owner]
230  *
231  * CDDL HEADER END
232  */
233 
234 /*
235  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
236  * Use is subject to license terms.
237  * Copyright 2016 Joyent, Inc.
238  */
239 
240 
241 
242 
243 /*
244  * This header file serves to group a set of well known defines and to
245  * set these for each instruction set architecture.  These defines may
246  * be divided into two groups;  characteristics of the processor and
247  * implementation choices for Solaris on a processor.
248  *
249  * Processor Characteristics:
250  *
251  * _LITTLE_ENDIAN / _BIG_ENDIAN:
252  *	The natural byte order of the processor.  A pointer to an int points
253  *	to the least/most significant byte of that int.
254  *
255  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
256  *	The processor specific direction of stack growth.  A push onto the
257  *	stack increases/decreases the stack pointer, so it stores data at
258  *	successively higher/lower addresses.  (Stackless machines ignored
259  *	without regrets).
260  *
261  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
262  *	A pointer to a long long points to the most/least significant long
263  *	within that long long.
264  *
265  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
266  *	The C compiler assigns bit fields from the high/low to the low/high end
267  *	of an int (most to least significant vs. least to most significant).
268  *
269  * _IEEE_754:
270  *	The processor (or supported implementations of the processor)
271  *	supports the ieee-754 floating point standard.  No other floating
272  *	point standards are supported (or significant).  Any other supported
273  *	floating point formats are expected to be cased on the ISA processor
274  *	symbol.
275  *
276  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
277  *	The C Compiler implements objects of type `char' as `unsigned' or
278  *	`signed' respectively.  This is really an implementation choice of
279  *	the compiler writer, but it is specified in the ABI and tends to
280  *	be uniform across compilers for an instruction set architecture.
281  *	Hence, it has the properties of a processor characteristic.
282  *
283  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
284  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
285  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
286  *	The ABI defines alignment requirements of each of the primitive
287  *	object types.  Some, if not all, may be hardware requirements as
288  * 	well.  The values are expressed in "byte-alignment" units.
289  *
290  * _MAX_ALIGNMENT:
291  *	The most stringent alignment requirement as specified by the ABI.
292  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
293  *
294  * _MAX_ALIGNMENT_TYPE:
295  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
296  *
297  * _ALIGNMENT_REQUIRED:
298  *	True or false (1 or 0) whether or not the hardware requires the ABI
299  *	alignment.
300  *
301  * _LONG_LONG_ALIGNMENT_32
302  *	The 32-bit ABI supported by a 64-bit kernel may have different
303  *	alignment requirements for primitive object types.  The value of this
304  *	identifier is expressed in "byte-alignment" units.
305  *
306  * _HAVE_CPUID_INSN
307  *	This indicates that the architecture supports the 'cpuid'
308  *	instruction as defined by Intel.  (Intel allows other vendors
309  *	to extend the instruction for their own purposes.)
310  *
311  *
312  * Implementation Choices:
313  *
314  * _ILP32 / _LP64:
315  *	This specifies the compiler data type implementation as specified in
316  *	the relevant ABI.  The choice between these is strongly influenced
317  *	by the underlying hardware, but is not absolutely tied to it.
318  *	Currently only two data type models are supported:
319  *
320  *	_ILP32:
321  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
322  *		and Solaris implementation.  Due to its historical standing,
323  *		this is the default case.
324  *
325  *	_LP64:
326  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
327  *		implementation for 64-bit ABIs such as SPARC V9.
328  *
329  *	_I32LPx:
330  *		A compilation environment where 'int' is 32-bit, and
331  *		longs and pointers are simply the same size.
332  *
333  *	In all cases, Char is 8 bits and Short is 16 bits.
334  *
335  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
336  *	This specifies the form of the disk VTOC (or label):
337  *
338  *	_SUNOS_VTOC_8:
339  *		This is a VTOC form which is upwardly compatible with the
340  *		SunOS 4.x disk label and allows 8 partitions per disk.
341  *
342  *	_SUNOS_VTOC_16:
343  *		In this format the incore vtoc image matches the ondisk
344  *		version.  It allows 16 slices per disk, and is not
345  *		compatible with the SunOS 4.x disk label.
346  *
347  *	Note that these are not the only two VTOC forms possible and
348  *	additional forms may be added.  One possible form would be the
349  *	SVr4 VTOC form.  The symbol for that is reserved now, although
350  *	it is not implemented.
351  *
352  *	_SVR4_VTOC_16:
353  *		This VTOC form is compatible with the System V Release 4
354  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
355  *		16 partitions per disk.
356  *
357  *
358  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
359  *	This describes the type of addresses used by system DMA:
360  *
361  *	_DMA_USES_PHYSADDR:
362  *		This type of DMA, used in the x86 implementation,
363  *		requires physical addresses for DMA buffers.  The 24-bit
364  *		addresses used by some legacy boards is the source of the
365  *		"low-memory" (<16MB) requirement for some devices using DMA.
366  *
367  *	_DMA_USES_VIRTADDR:
368  *		This method of DMA allows the use of virtual addresses for
369  *		DMA transfers.
370  *
371  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
372  *      This indicates the presence/absence of an fdisk table.
373  *
374  *      _FIRMWARE_NEEDS_FDISK
375  *              The fdisk table is required by system firmware.  If present,
376  *              it allows a disk to be subdivided into multiple fdisk
377  *              partitions, each of which is equivalent to a separate,
378  *              virtual disk.  This enables the co-existence of multiple
379  *              operating systems on a shared hard disk.
380  *
381  *      _NO_FDISK_PRESENT
382  *              If the fdisk table is absent, it is assumed that the entire
383  *              media is allocated for a single operating system.
384  *
385  * _HAVE_TEM_FIRMWARE
386  *	Defined if this architecture has the (fallback) option of
387  *	using prom_* calls for doing I/O if a suitable kernel driver
388  *	is not available to do it.
389  *
390  * _DONT_USE_1275_GENERIC_NAMES
391  *		Controls whether or not device tree node names should
392  *		comply with the IEEE 1275 "Generic Names" Recommended
393  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
394  *		names identifying the particular device will be used.
395  *
396  * __i386_COMPAT
397  *	This indicates whether the i386 ABI is supported as a *non-native*
398  *	mode for the platform.  When this symbol is defined:
399  *	-	32-bit xstat-style system calls are enabled
400  *	-	32-bit xmknod-style system calls are enabled
401  *	-	32-bit system calls use i386 sizes -and- alignments
402  *
403  *	Note that this is NOT defined for the i386 native environment!
404  *
405  * __x86
406  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
407  *	which is useful only insofar as these two architectures share
408  *	common attributes.  Analogous to __sparc.
409  *
410  * _PSM_MODULES
411  *	This indicates whether or not the implementation uses PSM
412  *	modules for processor support, reading /etc/mach from inside
413  *	the kernel to extract a list.
414  *
415  * _RTC_CONFIG
416  *	This indicates whether or not the implementation uses /etc/rtc_config
417  *	to configure the real-time clock in the kernel.
418  *
419  * _UNIX_KRTLD
420  *	This indicates that the implementation uses a dynamically
421  *	linked unix + krtld to form the core kernel image at boot
422  *	time, or (in the absence of this symbol) a prelinked kernel image.
423  *
424  * _OBP
425  *	This indicates the firmware interface is OBP.
426  *
427  * _SOFT_HOSTID
428  *	This indicates that the implementation obtains the hostid
429  *	from the file /etc/hostid, rather than from hardware.
430  */
431 
432 
433 
434 
435 
436 /*
437  * The following set of definitions characterize Solaris on AMD's
438  * 64-bit systems.
439  */
440 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
441 /*
442  * Define the appropriate "processor characteristics"
443  */
444 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
445 /*
446  * Define the appropriate "implementation choices".
447  */
448 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
449 /*
450  * The following set of definitions characterize the Solaris on SPARC systems.
451  *
452  * The symbol __sparc indicates any of the SPARC family of processor
453  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
454  *
455  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
456  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
457  * to SPARC V8 for the former to be subsumed into the latter definition.)
458  *
459  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
460  * by Version 9 of the SPARC Architecture Manual.
461  *
462  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
463  * relevant when the symbol __sparc is defined.
464  */
465 /*
466  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
467  * to support backwards builds.  This workaround should be removed in s10_71.
468  */
469 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
470 
471 
472 
473 
474 
475 /*
476  * Values of _POSIX_C_SOURCE
477  *
478  *		undefined   not a POSIX compilation
479  *		1	    POSIX.1-1990 compilation
480  *		2	    POSIX.2-1992 compilation
481  *		199309L	    POSIX.1b-1993 compilation (Real Time)
482  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
483  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
484  *		200809L     POSIX.1-2008 compilation
485  */
486 
487 
488 
489 
490 /*
491  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
492  * and _STDC_C99 are Sun implementation specific macros created in order to
493  * compress common standards specified feature test macros for easier reading.
494  * These macros should not be used by the application developer as
495  * unexpected results may occur. Instead, the user should reference
496  * standards(5) for correct usage of the standards feature test macros.
497  *
498  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
499  *                      X/Open or POSIX or in the negative, when neither
500  *                      X/Open or POSIX defines a symbol.
501  *
502  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
503  *                      by the compiler. For Sun compilers the value of
504  *                      __STDC__ is either 1, 0, or not defined based on the
505  *                      compilation mode (see cc(1)). When the value of
506  *                      __STDC__ is 1 and in the absence of any other feature
507  *                      test macros, the namespace available to the application
508  *                      is limited to only those symbols defined by the C
509  *                      Standard. _STRICT_STDC provides a more readable means
510  *                      of identifying symbols defined by the standard, or in
511  *                      the negative, symbols that are extensions to the C
512  *                      Standard. See additional comments for GNU C differences.
513  *
514  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
515  *                      defined by the compiler and indicates the version of
516  *                      the C standard. A value of 199901L indicates a
517  *                      compiler that complies with ISO/IEC 9899:1999, other-
518  *                      wise known as the C99 standard.
519  *
520  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
521  *                      is 201112L indicating a compiler that compiles with
522  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
523  *
524  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
525  *                      by the standards, and the user has not explicitly
526  *                      relaxed the strictness via __EXTENSIONS__.
527  */
528 
529 
530 
531 
532 
533 /*
534  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
535  * 99899:2011 specify the following predefined macro name:
536  *
537  * __STDC__	The integer constant 1, intended to indicate a conforming
538  *		implementation.
539  *
540  * Furthermore, a strictly conforming program shall use only those features
541  * of the language and library specified in these standards. A conforming
542  * implementation shall accept any strictly conforming program.
543  *
544  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
545  * strictly conforming environments and __STDC__ to 0 for environments that
546  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
547  * C semantics, Sun's C compiler does not define __STDC__.
548  *
549  * The GNU C project interpretation is that __STDC__ should always be defined
550  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
551  * or not extensions to the C standard are used. Violations of conforming
552  * behavior are conditionally flagged as warnings via the use of the
553  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
554  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
555  * conforming environments using the -ansi or -std=<standard> options.
556  *
557  * In the absence of any other compiler options, Sun and GNU set the value
558  * of __STDC__ as follows when using the following options:
559  *
560  *				Value of __STDC__  __STRICT_ANSI__
561  *
562  * cc -Xa (default)			0	      undefined
563  * cc -Xt (transitional)		0             undefined
564  * cc -Xc (strictly conforming)		1	      undefined
565  * cc -Xs (K&R C)		    undefined	      undefined
566  *
567  * gcc (default)			1	      undefined
568  * gcc -ansi, -std={c89, c99,...)  	1              defined
569  * gcc -traditional (K&R)	    undefined	      undefined
570  *
571  * The default compilation modes for Sun C compilers versus GNU C compilers
572  * results in a differing value for __STDC__ which results in a more
573  * restricted namespace when using Sun compilers. To allow both GNU and Sun
574  * interpretations to peacefully co-exist, we use the following Sun
575  * implementation _STRICT_STDC_ macro:
576  */
577 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
578 /*
579  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
580  */
581 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
582 /*
583  * Use strict symbol visibility.
584  */
585 
586 
587 
588 
589 
590 /*
591  * Large file interfaces:
592  *
593  *	_LARGEFILE_SOURCE
594  *		1		large file-related additions to POSIX
595  *				interfaces requested (fseeko, etc.)
596  *	_LARGEFILE64_SOURCE
597  *		1		transitional large-file-related interfaces
598  *				requested (seek64, stat64, etc.)
599  *
600  * The corresponding announcement macros are respectively:
601  *	_LFS_LARGEFILE
602  *	_LFS64_LARGEFILE
603  * (These are set in <unistd.h>.)
604  *
605  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
606  * well.
607  *
608  * The large file interfaces are made visible regardless of the initial values
609  * of the feature test macros under certain circumstances:
610  *    -	If no explicit standards-conforming environment is requested (neither
611  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
612  *	__STDC__ does not imply standards conformance).
613  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
614  * 	is defined).
615  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
616  *	defined).  (Note that this dependency is an artifact of the current
617  *	kernel implementation and may change in future releases.)
618  */
619 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
620 /*
621  * Large file compilation environment control:
622  *
623  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
624  * types and governs the mapping between file-related source function symbol
625  * names and the corresponding binary entry points.
626  *
627  * In the 32-bit environment, the default value is 32; if not set, set it to
628  * the default here, to simplify tests in other headers.
629  *
630  * In the 64-bit compilation environment, the only value allowed is 64.
631  */
632 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
633 /*
634  * Use of _XOPEN_SOURCE
635  *
636  * The following X/Open specifications are supported:
637  *
638  * X/Open Portability Guide, Issue 3 (XPG3)
639  * X/Open CAE Specification, Issue 4 (XPG4)
640  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
641  * X/Open CAE Specification, Issue 5 (XPG5)
642  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
643  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
644  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
645  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
646  *
647  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
648  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
649  *     Version 2 (SUSv2)
650  * XPG6 is the result of a merge of the X/Open and POSIX specifications
651  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
652  *     addition to UNIX 03 and SUSv3.
653  * XPG7 is also referred to as UNIX 08 and SUSv4.
654  *
655  * When writing a conforming X/Open application, as per the specification
656  * requirements, the appropriate feature test macros must be defined at
657  * compile time. These are as follows. For more info, see standards(5).
658  *
659  * Feature Test Macro				     Specification
660  * ------------------------------------------------  -------------
661  * _XOPEN_SOURCE                                         XPG3
662  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
663  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
664  * _XOPEN_SOURCE = 500                                   XPG5
665  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
666  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
667  *
668  * In order to simplify the guards within the headers, the following
669  * implementation private test macros have been created. Applications
670  * must NOT use these private test macros as unexpected results will
671  * occur.
672  *
673  * Note that in general, the use of these private macros is cumulative.
674  * For example, the use of _XPG3 with no other restrictions on the X/Open
675  * namespace will make the symbols visible for XPG3 through XPG6
676  * compilation environments. The use of _XPG4_2 with no other X/Open
677  * namespace restrictions indicates that the symbols were introduced in
678  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
679  * environments, but not for XPG3 or XPG4 compilation environments.
680  *
681  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
682  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
683  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
684  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
685  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
686  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
687  */
688 
689 /* X/Open Portability Guide, Issue 3 */
690 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
691 /*
692  * _XOPEN_VERSION is defined by the X/Open specifications and is not
693  * normally defined by the application, except in the case of an XPG4
694  * application.  On the implementation side, _XOPEN_VERSION defined with
695  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
696  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
697  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
698  * application and with a value of 600 indicates an XPG6 (UNIX 03)
699  * application and with a value of 700 indicates an XPG7 (UNIX 08).
700  * The appropriate version is determined by the use of the
701  * feature test macros described earlier.  The value of _XOPEN_VERSION
702  * defaults to 3 otherwise indicating support for XPG3 applications.
703  */
704 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
705 /*
706  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
707  * conforming environments.  ISO 9899:1999 says it does.
708  *
709  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
710  * defined in all but strictly conforming environments that disallow it.
711  */
712 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
713 /*
714  * The following macro defines a value for the ISO C99 restrict
715  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
716  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
717  * if any other compiler is used. This allows for the use of single
718  * prototype declarations regardless of compiler version.
719  */
720 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
721 /*
722  * The following macro defines a value for the ISO C11 _Noreturn
723  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
724  * an ISO C11 compiler is used and "" (null string) if any other
725  * compiler is used. This allows for the use of single prototype
726  * declarations regardless of compiler version.
727  */
728 
729 
730 
731 
732 
733 
734 
735 /*
736  * The following macro indicates header support for the ANSI C++
737  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
738  */
739 
740 
741 /*
742  * The following macro indicates header support for the C99 standard,
743  * ISO/IEC 9899:1999, Programming Languages - C.
744  */
745 
746 
747 /*
748  * The following macro indicates header support for the C99 standard,
749  * ISO/IEC 9899:2011, Programming Languages - C.
750  */
751 
752 
753 /*
754  * The following macro indicates header support for DTrace. The value is an
755  * integer that corresponds to the major version number for DTrace.
756  */
757 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
758 
759 
760 
761 
762 
763 /*
764  * Do all of our 'redefine_extname' processing before
765  * declarations of the associated functions are seen.
766  * This is necessary to keep gcc happy.
767  */
768 
769 
770 /* large file compilation environment setup */
771 
772 
773 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
774 #pragma redefine_extname fopen fopen64
775 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
776 
777 
778 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
779 #pragma redefine_extname freopen freopen64
780 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
781 
782 
783 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
784 #pragma redefine_extname tmpfile tmpfile64
785 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
786 
787 
788 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
789 #pragma redefine_extname fgetpos fgetpos64
790 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
791 
792 
793 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
794 #pragma redefine_extname fsetpos fsetpos64
795 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
796 
797 
798 
799 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
800 #pragma redefine_extname fseeko fseeko64
801 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
802 
803 
804 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
805 #pragma redefine_extname ftello ftello64
806 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
807 
808 
809 
810 
811 /* In the LP64 compilation environment, all APIs are already large file */
812 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
813 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
814 /*
815  * CDDL HEADER START
816  *
817  * The contents of this file are subject to the terms of the
818  * Common Development and Distribution License, Version 1.0 only
819  * (the "License").  You may not use this file except in compliance
820  * with the License.
821  *
822  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
823  * or http://www.opensolaris.org/os/licensing.
824  * See the License for the specific language governing permissions
825  * and limitations under the License.
826  *
827  * When distributing Covered Code, include this CDDL HEADER in each
828  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
829  * If applicable, add the following below this CDDL HEADER, with the
830  * fields enclosed by brackets "[]" replaced with your own identifying
831  * information: Portions Copyright [yyyy] [name of copyright owner]
832  *
833  * CDDL HEADER END
834  */
835 /*
836  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
837  * Copyright 2014 PALO, Richard.
838  *
839  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
840  * Use is subject to license terms.
841  */
842 
843 /*	Copyright (c) 1988 AT&T	*/
844 /*	  All Rights Reserved  	*/
845 
846 /*
847  * An application should not include this header directly.  Instead it
848  * should be included only through the inclusion of other Sun headers.
849  *
850  * The contents of this header is limited to identifiers specified in the
851  * C Standard.  Any new identifiers specified in future amendments to the
852  * C Standard must be placed in this header.  If these new identifiers
853  * are required to also be in the C++ Standard "std" namespace, then for
854  * anything other than macro definitions, corresponding "using" directives
855  * must also be added to <stdio.h>.
856  */
857 
858 /*
859  * User-visible pieces of the ANSI C standard I/O package.
860  */
861 
862 
863 
864 
865 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
866 /*
867  * CDDL HEADER START
868  *
869  * The contents of this file are subject to the terms of the
870  * Common Development and Distribution License (the "License").
871  * You may not use this file except in compliance with the License.
872  *
873  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
874  * or http://www.opensolaris.org/os/licensing.
875  * See the License for the specific language governing permissions
876  * and limitations under the License.
877  *
878  * When distributing Covered Code, include this CDDL HEADER in each
879  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
880  * If applicable, add the following below this CDDL HEADER, with the
881  * fields enclosed by brackets "[]" replaced with your own identifying
882  * information: Portions Copyright [yyyy] [name of copyright owner]
883  *
884  * CDDL HEADER END
885  */
886 
887 /*
888  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
889  * Copyright 2016 Joyent, Inc.
890  *
891  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
892  * Use is subject to license terms.
893  */
894 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
895 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
896 /*
897  * This file and its contents are supplied under the terms of the
898  * Common Development and Distribution License ("CDDL"), version 1.0.
899  * You may only use this file in accordance with the terms of version
900  * 1.0 of the CDDL.
901  *
902  * A full copy of the text of the CDDL should have accompanied this
903  * source.  A copy of the CDDL is also available via the Internet at
904  * http://www.illumos.org/license/CDDL.
905  */
906 
907 /*
908  * Copyright 2014-2016 PALO, Richard.
909  */
910 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
911 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
912 /*
913  * CDDL HEADER START
914  *
915  * The contents of this file are subject to the terms of the
916  * Common Development and Distribution License, Version 1.0 only
917  * (the "License").  You may not use this file except in compliance
918  * with the License.
919  *
920  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
921  * or http://www.opensolaris.org/os/licensing.
922  * See the License for the specific language governing permissions
923  * and limitations under the License.
924  *
925  * When distributing Covered Code, include this CDDL HEADER in each
926  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
927  * If applicable, add the following below this CDDL HEADER, with the
928  * fields enclosed by brackets "[]" replaced with your own identifying
929  * information: Portions Copyright [yyyy] [name of copyright owner]
930  *
931  * CDDL HEADER END
932  */
933 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
934 /*	  All Rights Reserved	*/
935 
936 
937 /*
938  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
939  *
940  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
941  * Use is subject to license terms.
942  */
943 
944 
945 
946 
947 /*
948  * An application should not include this header directly.  Instead it
949  * should be included only through the inclusion of other Sun headers.
950  *
951  * The purpose of this header is to provide the type definitions for
952  * the va_list argument used by a number of printf and printf like
953  * functions. The headers that define these various function prototypes
954  * #include this header directly. These include but are not necessarily
955  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
956  * <syslog.h>. The type definitions included in this header are for
957  * the benefit of consumers of va_list.
958  *
959  * Any application that accepts variable argument lists must as documented,
960  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
961  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
962  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
963  * in <sys/va_impl.h> for more detailed information regarding implementation
964  * and compiler specific protocols.
965  */
966 
967 /*
968  * The common definitions exported by this header or compilers using
969  * this header are:
970  *
971  * the identifier __builtin_va_alist for the variable list pseudo parameter
972  * the type __va_alist_type for the variable list pseudo parameter
973  * the type __va_list defining the type of the variable list iterator
974  *
975  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
976  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
977  * defined by the compilation system, not the user of the system.
978  */
979 
980 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
981 /*
982  * CDDL HEADER START
983  *
984  * The contents of this file are subject to the terms of the
985  * Common Development and Distribution License (the "License").
986  * You may not use this file except in compliance with the License.
987  *
988  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
989  * or http://www.opensolaris.org/os/licensing.
990  * See the License for the specific language governing permissions
991  * and limitations under the License.
992  *
993  *
994  * When distributing Covered Code, include this CDDL HEADER in each
995  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
996  * If applicable, add the following below this CDDL HEADER, with the
997  * fields enclosed by brackets "[]" replaced with your own identifying
998  * information: Portions Copyright [yyyy] [name of copyright owner]
999  *
1000  * CDDL HEADER END
1001  */
1002 
1003 /*
1004  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1005  * Use is subject to license terms.
1006  * Copyright 2016 Joyent, Inc.
1007  */
1008 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1009 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1010 typedef __builtin_va_list __gnuc_va_list;
1011 /*
1012  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1013  *	defined with __va_list instead of plain old va_list.
1014  *	Perhaps that should be fixed!
1015  */
1016 typedef __builtin_va_list __va_list;
1017 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1018 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1019 /*
1020  * CDDL HEADER START
1021  *
1022  * The contents of this file are subject to the terms of the
1023  * Common Development and Distribution License, Version 1.0 only
1024  * (the "License").  You may not use this file except in compliance
1025  * with the License.
1026  *
1027  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1028  * or http://www.opensolaris.org/os/licensing.
1029  * See the License for the specific language governing permissions
1030  * and limitations under the License.
1031  *
1032  * When distributing Covered Code, include this CDDL HEADER in each
1033  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1034  * If applicable, add the following below this CDDL HEADER, with the
1035  * fields enclosed by brackets "[]" replaced with your own identifying
1036  * information: Portions Copyright [yyyy] [name of copyright owner]
1037  *
1038  * CDDL HEADER END
1039  */
1040 /*
1041  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1042  * Use is subject to license terms.
1043  */
1044 
1045 
1046 
1047 
1048 #pragma ident "%Z%%M%	%I%	%E% SMI"
1049 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1050 typedef struct __FILE __FILE;
1051 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1052 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1053 /*
1054  * CDDL HEADER START
1055  *
1056  * The contents of this file are subject to the terms of the
1057  * Common Development and Distribution License (the "License").
1058  * You may not use this file except in compliance with the License.
1059  *
1060  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1061  * or http://www.opensolaris.org/os/licensing.
1062  * See the License for the specific language governing permissions
1063  * and limitations under the License.
1064  *
1065  * When distributing Covered Code, include this CDDL HEADER in each
1066  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1067  * If applicable, add the following below this CDDL HEADER, with the
1068  * fields enclosed by brackets "[]" replaced with your own identifying
1069  * information: Portions Copyright [yyyy] [name of copyright owner]
1070  *
1071  * CDDL HEADER END
1072  */
1073 
1074 /*
1075  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1076  * Use is subject to license terms.
1077  */
1078 
1079 
1080 
1081 
1082 #pragma ident "%Z%%M%	%I%	%E% SMI"
1083 
1084 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1085 /*
1086  * CDDL HEADER START
1087  *
1088  * The contents of this file are subject to the terms of the
1089  * Common Development and Distribution License (the "License").
1090  * You may not use this file except in compliance with the License.
1091  *
1092  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1093  * or http://www.opensolaris.org/os/licensing.
1094  * See the License for the specific language governing permissions
1095  * and limitations under the License.
1096  *
1097  *
1098  * When distributing Covered Code, include this CDDL HEADER in each
1099  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1100  * If applicable, add the following below this CDDL HEADER, with the
1101  * fields enclosed by brackets "[]" replaced with your own identifying
1102  * information: Portions Copyright [yyyy] [name of copyright owner]
1103  *
1104  * CDDL HEADER END
1105  */
1106 
1107 /*
1108  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1109  * Use is subject to license terms.
1110  * Copyright 2016 Joyent, Inc.
1111  */
1112 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1113 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1114 struct __FILE /* needs to be binary-compatible with old versions */
1115 {
1116 
1117 
1118 
1119 
1120  int _cnt; /* number of available characters in buffer */
1121  unsigned char *_ptr; /* next character from/to here in buffer */
1122 
1123  unsigned char *_base; /* the buffer */
1124  unsigned char _flag; /* the state of the stream */
1125  unsigned char _magic; /* Old home of the file descriptor */
1126     /* Only fileno(3C) can retrieve the value now */
1127  unsigned __orientation:2; /* the orientation of the stream */
1128  unsigned __ionolock:1; /* turn off implicit locking */
1129  unsigned __seekable:1; /* is file seekable? */
1130  unsigned __extendedfd:1; /* enable extended FILE */
1131  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1132  unsigned __filler:10;
1133 };
1134 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1135 
1136 /*
1137  * If feature test macros are set that enable interfaces that use types
1138  * defined in <sys/types.h>, get those types by doing the include.
1139  *
1140  * Note that in asking for the interfaces associated with this feature test
1141  * macro one also asks for definitions of the POSIX types.
1142  */
1143 
1144 
1145 
1146 
1147 
1148 
1149 /*
1150  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1151  * underscores added to avoid polluting the ANSI C name space).  See the
1152  * commentary there for further explanation.
1153  */
1154 
1155 typedef long long __longlong_t;
1156 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1157 typedef __FILE FILE;
1158 
1159 
1160 
1161 
1162 
1163 
1164 
1165 typedef unsigned int size_t; /* (historical version) */
1166 
1167 
1168 
1169 
1170 
1171 
1172 typedef __longlong_t fpos_t;
1173 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1174 /*
1175  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1176  * is chosen for historical reasons rather than for truly processor related
1177  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1178  * UNIX historical value of 20 so it is allowed to fall through.
1179  */
1180 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1181 extern __FILE __iob[60];
1182 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1183 extern int remove(const char *);
1184 extern int rename(const char *, const char *);
1185 extern FILE *tmpfile(void);
1186 extern char *tmpnam(char *);
1187 extern int fclose(FILE *);
1188 extern int fflush(FILE *);
1189 extern FILE *fopen(const char *, const char *);
1190 extern FILE *freopen(const char *,
1191    const char *, FILE *);
1192 extern void setbuf(FILE *, char *);
1193 extern int setvbuf(FILE *, char *, int,
1194    size_t);
1195 /* PRINTFLIKE2 */
1196 extern int fprintf(FILE *, const char *, ...);
1197 /* SCANFLIKE2 */
1198 extern int fscanf(FILE *, const char *, ...);
1199 /* PRINTFLIKE1 */
1200 extern int printf(const char *, ...);
1201 /* SCANFLIKE1 */
1202 extern int scanf(const char *, ...);
1203 /* PRINTFLIKE2 */
1204 extern int sprintf(char *, const char *, ...);
1205 /* SCANFLIKE2 */
1206 extern int sscanf(const char *,
1207    const char *, ...);
1208 extern int vfprintf(FILE *, const char *,
1209    __va_list);
1210 extern int vprintf(const char *, __va_list);
1211 extern int vsprintf(char *, const char *,
1212    __va_list);
1213 extern int fgetc(FILE *);
1214 extern char *fgets(char *, int, FILE *);
1215 extern int fputc(int, FILE *);
1216 extern int fputs(const char *, FILE *);
1217 
1218 
1219 extern int getc(FILE *);
1220 extern int putc(int, FILE *);
1221 
1222 
1223 
1224 extern int getchar(void);
1225 extern int putchar(int);
1226 
1227 
1228 /*
1229  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1230  * environment has been requested, we remove it.
1231  */
1232 
1233 extern char *gets(char *);
1234 
1235 extern int puts(const char *);
1236 extern int ungetc(int, FILE *);
1237 extern size_t fread(void *, size_t, size_t,
1238  FILE *);
1239 extern size_t fwrite(const void *, size_t, size_t,
1240  FILE *);
1241 
1242 extern int fgetpos(FILE *, fpos_t *);
1243 extern int fsetpos(FILE *, const fpos_t *);
1244 
1245 extern int fseek(FILE *, long, int);
1246 extern long ftell(FILE *);
1247 extern void rewind(FILE *);
1248 
1249 
1250 extern void clearerr(FILE *);
1251 extern int feof(FILE *);
1252 extern int ferror(FILE *);
1253 
1254 extern void perror(const char *);
1255 
1256 
1257 extern int __filbuf(FILE *);
1258 extern int __flsbuf(int, FILE *);
1259 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1260 
1261 /*
1262  * If feature test macros are set that enable interfaces that use types
1263  * defined in <sys/types.h>, get those types by doing the include.
1264  *
1265  * Note that in asking for the interfaces associated with this feature test
1266  * macro one also asks for definitions of the POSIX types.
1267  */
1268 
1269 /*
1270  * Allow global visibility for symbols defined in
1271  * C++ "std" namespace in <iso/stdio_iso.h>.
1272  */
1273 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1274 /*
1275  * This header needs to be included here because it relies on the global
1276  * visibility of FILE and size_t in the C++ environment.
1277  */
1278 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1279 /*
1280  * CDDL HEADER START
1281  *
1282  * The contents of this file are subject to the terms of the
1283  * Common Development and Distribution License, Version 1.0 only
1284  * (the "License").  You may not use this file except in compliance
1285  * with the License.
1286  *
1287  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1288  * or http://www.opensolaris.org/os/licensing.
1289  * See the License for the specific language governing permissions
1290  * and limitations under the License.
1291  *
1292  * When distributing Covered Code, include this CDDL HEADER in each
1293  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1294  * If applicable, add the following below this CDDL HEADER, with the
1295  * fields enclosed by brackets "[]" replaced with your own identifying
1296  * information: Portions Copyright [yyyy] [name of copyright owner]
1297  *
1298  * CDDL HEADER END
1299  */
1300 /*
1301  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1302  *
1303  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1304  * Use is subject to license terms.
1305  */
1306 
1307 /*
1308  * An application should not include this header directly.  Instead it
1309  * should be included only through the inclusion of other Sun headers.
1310  *
1311  * The contents of this header is limited to identifiers specified in
1312  * the C99 standard and in conflict with the C++ implementation of the
1313  * standard header.  The C++ standard may adopt the C99 standard at
1314  * which point it is expected that the symbols included here will
1315  * become part of the C++ std namespace.
1316  */
1317 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1318 /*
1319  * The following have been added as a result of the ISO/IEC 9899:1999
1320  * standard. For a strictly conforming C application, visibility is
1321  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1322  * For non-strictly conforming C applications, there are no restrictions
1323  * on the C namespace.
1324  */
1325 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1326 extern int vfscanf(FILE *, const char *, __va_list);
1327 extern int vscanf(const char *, __va_list);
1328 extern int vsscanf(const char *, const char *,
1329   __va_list);
1330 
1331 
1332 
1333 
1334 extern int snprintf(char *, size_t, const char *,
1335  ...);
1336 extern int vsnprintf(char *, size_t, const char *,
1337  __va_list);
1338 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1339 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1340 typedef __longlong_t off_t;
1341 
1342 
1343 
1344 
1345 
1346 typedef __longlong_t off64_t;
1347 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1348 typedef __longlong_t fpos64_t;
1349 
1350 
1351 
1352 /*
1353  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1354  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1355  * not be polluted with this name.
1356  */
1357 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1358 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1359 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1360 extern unsigned char _sibuf[], _sobuf[];
1361 
1362 
1363 /* large file compilation environment setup */
1364 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1365 extern unsigned char *_bufendtab[];
1366 extern FILE *_lastbuf;
1367 
1368 
1369 /* In the LP64 compilation environment, all APIs are already large file */
1370 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1371 typedef int ssize_t; /* (historical version) */
1372 
1373 
1374 
1375 
1376 
1377 
1378 extern char *tmpnam_r(char *);
1379 
1380 
1381 
1382 
1383 extern int fcloseall(void);
1384 extern void setbuffer(FILE *, char *, size_t);
1385 extern int setlinebuf(FILE *);
1386 /* PRINTFLIKE2 */
1387 extern int asprintf(char **, const char *, ...);
1388 /* PRINTFLIKE2 */
1389 extern int vasprintf(char **, const char *, __va_list);
1390 
1391 
1392 
1393 
1394  /* || defined(_XPG7) */
1395 extern ssize_t getdelim(char **, size_t *,
1396  int, FILE *);
1397 extern ssize_t getline(char **, size_t *,
1398  FILE *);
1399 
1400 
1401 /*
1402  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1403  */
1404 
1405 
1406 
1407 extern FILE *fdopen(int, const char *);
1408 extern char *ctermid(char *);
1409 extern int fileno(FILE *);
1410 
1411 
1412 
1413 /*
1414  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1415  */
1416 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1417 /*
1418  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1419  */
1420 
1421 
1422 extern FILE *popen(const char *, const char *);
1423 extern char *tempnam(const char *, const char *);
1424 extern int pclose(FILE *);
1425 
1426 extern int getsubopt(char **, char *const *, char **);
1427 
1428 
1429 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1430 
1431 extern char *cuserid(char *);
1432 extern int getopt(int, char *const *, const char *);
1433 extern char *optarg;
1434 extern int optind, opterr, optopt;
1435 extern int getw(FILE *);
1436 extern int putw(int, FILE *);
1437 
1438 
1439 
1440 
1441 /*
1442  * The following are defined as part of the Large File Summit interfaces.
1443  */
1444 
1445 extern int fseeko(FILE *, off_t, int);
1446 extern off_t ftello(FILE *);
1447 
1448 
1449 /*
1450  * The following are defined as part of the transitional Large File Summit
1451  * interfaces.
1452  */
1453 
1454 
1455 extern FILE *fopen64(const char *, const char *);
1456 extern FILE *freopen64(const char *, const char *, FILE *);
1457 extern FILE *tmpfile64(void);
1458 extern int fgetpos64(FILE *, fpos64_t *);
1459 extern int fsetpos64(FILE *, const fpos64_t *);
1460 extern int fseeko64(FILE *, off64_t, int);
1461 extern off64_t ftello64(FILE *);
1462 
1463 
1464 /*
1465  * XPG7 symbols
1466  */
1467 
1468 extern FILE *fmemopen(void *, size_t,
1469       const char *);
1470 extern FILE *open_memstream(char **, size_t *);
1471 # 29 "check.c" 2
1472 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
1473 /*
1474  * CDDL HEADER START
1475  *
1476  * The contents of this file are subject to the terms of the
1477  * Common Development and Distribution License (the "License").
1478  * You may not use this file except in compliance with the License.
1479  *
1480  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1481  * or http://www.opensolaris.org/os/licensing.
1482  * See the License for the specific language governing permissions
1483  * and limitations under the License.
1484  *
1485  * When distributing Covered Code, include this CDDL HEADER in each
1486  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1487  * If applicable, add the following below this CDDL HEADER, with the
1488  * fields enclosed by brackets "[]" replaced with your own identifying
1489  * information: Portions Copyright [yyyy] [name of copyright owner]
1490  *
1491  * CDDL HEADER END
1492  */
1493 
1494 /*
1495  * Copyright (c) 2013 Gary Mills
1496  *
1497  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1498  * Use is subject to license terms.
1499  */
1500 
1501 /*	Copyright (c) 1988 AT&T	*/
1502 /*	  All Rights Reserved  	*/
1503 
1504 
1505 
1506 
1507 
1508 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1509 /*
1510  * CDDL HEADER START
1511  *
1512  * The contents of this file are subject to the terms of the
1513  * Common Development and Distribution License (the "License").
1514  * You may not use this file except in compliance with the License.
1515  *
1516  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1517  * or http://www.opensolaris.org/os/licensing.
1518  * See the License for the specific language governing permissions
1519  * and limitations under the License.
1520  *
1521  * When distributing Covered Code, include this CDDL HEADER in each
1522  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1523  * If applicable, add the following below this CDDL HEADER, with the
1524  * fields enclosed by brackets "[]" replaced with your own identifying
1525  * information: Portions Copyright [yyyy] [name of copyright owner]
1526  *
1527  * CDDL HEADER END
1528  */
1529 
1530 /*
1531  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1532  * Copyright 2016 Joyent, Inc.
1533  *
1534  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1535  * Use is subject to license terms.
1536  */
1537 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
1538 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1539 /*
1540  * CDDL HEADER START
1541  *
1542  * The contents of this file are subject to the terms of the
1543  * Common Development and Distribution License (the "License").
1544  * You may not use this file except in compliance with the License.
1545  *
1546  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1547  * or http://www.opensolaris.org/os/licensing.
1548  * See the License for the specific language governing permissions
1549  * and limitations under the License.
1550  *
1551  *
1552  * When distributing Covered Code, include this CDDL HEADER in each
1553  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1554  * If applicable, add the following below this CDDL HEADER, with the
1555  * fields enclosed by brackets "[]" replaced with your own identifying
1556  * information: Portions Copyright [yyyy] [name of copyright owner]
1557  *
1558  * CDDL HEADER END
1559  */
1560 
1561 /*
1562  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1563  * Use is subject to license terms.
1564  * Copyright 2016 Joyent, Inc.
1565  */
1566 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
1567 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
1568 /*
1569  * CDDL HEADER START
1570  *
1571  * The contents of this file are subject to the terms of the
1572  * Common Development and Distribution License, Version 1.0 only
1573  * (the "License").  You may not use this file except in compliance
1574  * with the License.
1575  *
1576  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1577  * or http://www.opensolaris.org/os/licensing.
1578  * See the License for the specific language governing permissions
1579  * and limitations under the License.
1580  *
1581  * When distributing Covered Code, include this CDDL HEADER in each
1582  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1583  * If applicable, add the following below this CDDL HEADER, with the
1584  * fields enclosed by brackets "[]" replaced with your own identifying
1585  * information: Portions Copyright [yyyy] [name of copyright owner]
1586  *
1587  * CDDL HEADER END
1588  */
1589 /*
1590  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
1591  * Use is subject to license terms.
1592  */
1593 
1594 /*	Copyright (c) 1988 AT&T	*/
1595 /*	  All Rights Reserved  	*/
1596 
1597 
1598 /*
1599  * An application should not include this header directly.  Instead it
1600  * should be included only through the inclusion of other Sun headers.
1601  *
1602  * The contents of this header is limited to identifiers specified in the
1603  * C Standard.  Any new identifiers specified in future amendments to the
1604  * C Standard must be placed in this header.  If these new identifiers
1605  * are required to also be in the C++ Standard "std" namespace, then for
1606  * anything other than macro definitions, corresponding "using" directives
1607  * must also be added to <limits.h>.
1608  */
1609 
1610 
1611 
1612 
1613 #pragma ident "%Z%%M%	%I%	%E% SMI"
1614 
1615 
1616 
1617 
1618 
1619 /*
1620  * Sizes of integral types
1621  */
1622 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
1623      /* min value of a "long int" */
1624 
1625 
1626 
1627 
1628 
1629      /* min value of a long long */
1630 
1631      /* max value of a long long */
1632 
1633      /* max value of "unsigned long long */
1634 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
1635 
1636 /*
1637  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
1638  * committee's working draft for the revision of the current ISO C standard,
1639  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
1640  * required by any standard but constitute a useful, general purpose set
1641  * of type definitions and limits which is namespace clean with respect to
1642  * all standards.
1643  */
1644 
1645 
1646 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
1647 /*
1648  * CDDL HEADER START
1649  *
1650  * The contents of this file are subject to the terms of the
1651  * Common Development and Distribution License, Version 1.0 only
1652  * (the "License").  You may not use this file except in compliance
1653  * with the License.
1654  *
1655  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1656  * or http://www.opensolaris.org/os/licensing.
1657  * See the License for the specific language governing permissions
1658  * and limitations under the License.
1659  *
1660  * When distributing Covered Code, include this CDDL HEADER in each
1661  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1662  * If applicable, add the following below this CDDL HEADER, with the
1663  * fields enclosed by brackets "[]" replaced with your own identifying
1664  * information: Portions Copyright [yyyy] [name of copyright owner]
1665  *
1666  * CDDL HEADER END
1667  */
1668 /*
1669  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1670  *
1671  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1672  * Use is subject to license terms.
1673  */
1674 
1675 
1676 
1677 
1678 /*
1679  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
1680  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
1681  * Programming language - C.
1682  *
1683  * Programs/Modules should not directly include this file.  Access to the
1684  * types defined in this file should be through the inclusion of one of the
1685  * following files:
1686  *
1687  *	<limits.h>		This nested inclusion is disabled for strictly
1688  *				ANSI-C conforming compilations.  The *_MIN
1689  *				definitions are not visible to POSIX or XPG
1690  *				conforming applications (due to what may be
1691  *				a bug in the specification - this is under
1692  *				investigation)
1693  *
1694  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
1695  *				components of <inttypes.h>.
1696  *
1697  *	<inttypes.h>		For use by applications.
1698  *
1699  * See these files for more details.
1700  */
1701 
1702 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1703 /*
1704  * CDDL HEADER START
1705  *
1706  * The contents of this file are subject to the terms of the
1707  * Common Development and Distribution License (the "License").
1708  * You may not use this file except in compliance with the License.
1709  *
1710  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1711  * or http://www.opensolaris.org/os/licensing.
1712  * See the License for the specific language governing permissions
1713  * and limitations under the License.
1714  *
1715  * When distributing Covered Code, include this CDDL HEADER in each
1716  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1717  * If applicable, add the following below this CDDL HEADER, with the
1718  * fields enclosed by brackets "[]" replaced with your own identifying
1719  * information: Portions Copyright [yyyy] [name of copyright owner]
1720  *
1721  * CDDL HEADER END
1722  */
1723 
1724 /*
1725  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1726  * Copyright 2016 Joyent, Inc.
1727  *
1728  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1729  * Use is subject to license terms.
1730  */
1731 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
1732 
1733 
1734 
1735 
1736 
1737 /*
1738  * Limits
1739  *
1740  * The following define the limits for the types defined in <sys/int_types.h>.
1741  *
1742  * INTMAX_MIN (minimum value of the largest supported signed integer type),
1743  * INTMAX_MAX (maximum value of the largest supported signed integer type),
1744  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
1745  * type) can be set to implementation defined limits.
1746  *
1747  * NOTE : A programmer can test to see whether an implementation supports
1748  * a particular size of integer by testing if the macro that gives the
1749  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
1750  * tests false, the implementation does not support unsigned 64 bit integers.
1751  *
1752  * The type of these macros is intentionally unspecified.
1753  *
1754  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
1755  * where the ABI specifies "char" as unsigned when the translation mode is
1756  * not ANSI-C.
1757  */
1758 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
1759 /*
1760  * The following 2 macros are provided for testing whether the types
1761  * intptr_t and uintptr_t (integers large enough to hold a void *) are
1762  * defined in this header. They are needed in case the architecture can't
1763  * represent a pointer in any standard integral type.
1764  */
1765 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
1766 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
1767 
1768 
1769 
1770 
1771 
1772 
1773 /*
1774  * Maximum value of a "size_t".  SIZE_MAX was previously defined
1775  * in <limits.h>, however, the standards specify it be defined
1776  * in <stdint.h>. The <stdint.h> headers includes this header as
1777  * does <limits.h>. The value of SIZE_MAX should not deviate
1778  * from the value of ULONG_MAX defined <sys/types.h>.
1779  */
1780 
1781 
1782 
1783 
1784 
1785 
1786 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
1787 
1788 
1789 
1790 
1791 /*
1792  * Maximum limit of wchar_t. The WCHAR_* macros are also
1793  * defined in <iso/wchar_iso.h>, but inclusion of that header
1794  * will break ISO/IEC C namespace.
1795  */
1796 
1797 
1798 
1799 
1800 /* Maximum limit of wint_t */
1801 
1802 
1803 
1804 
1805 /*
1806  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
1807  * when including <limits.h> that the suffix _MAX is reserved but not the
1808  * suffix _MIN.  However, until that issue is resolved....
1809  */
1810 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
1811 /* Minimum value of a pointer-holding signed integer type */
1812 
1813 
1814 
1815 
1816 
1817 
1818 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
1819 
1820 
1821 
1822 
1823 
1824 
1825 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
1826 
1827 
1828 
1829 
1830 /*
1831  * Minimum limit of wchar_t. The WCHAR_* macros are also
1832  * defined in <iso/wchar_iso.h>, but inclusion of that header
1833  * will break ISO/IEC C namespace.
1834  */
1835 
1836 
1837 
1838 
1839 /* Minimum limit of wint_t */
1840 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
1841 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1842 /*
1843  * ARG_MAX is calculated as follows:
1844  * NCARGS - space for other stuff on initial stack
1845  * like aux vectors, saved registers, etc..
1846  */
1847 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1848 /*
1849  * POSIX conformant definitions - An implementation may define
1850  * other symbols which reflect the actual implementation. Alternate
1851  * definitions may not be as restrictive as the POSIX definitions.
1852  */
1853 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1854 /* POSIX.1c conformant */
1855 
1856 
1857 
1858 
1859 
1860 /* UNIX 03 conformant */
1861 
1862 
1863 
1864 
1865 
1866 /*
1867  * POSIX.2 and XPG4-XSH4 conformant definitions
1868  */
1869 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1870 /* UNIX 03 conformant */
1871 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1872 /*
1873  * For dual definitions for PASS_MAX and sysconf.c
1874  */
1875 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1876     /* NLS printf() and scanf() */
1877 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1878 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
1879 
1880 
1881 
1882        /* of a double */
1883 
1884 
1885        /* of a "float" */
1886 
1887 
1888 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
1889 
1890 
1891        /* of a double */
1892 
1893        /* of a float */
1894 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1895 /*
1896  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
1897  * related text states:
1898  *
1899  * A definition of one of the values from Table 2-5 shall be omitted from the
1900  * <limits.h> on specific implementations where the corresponding value is
1901  * equal to or greater than the stated minimum, but where the value can vary
1902  * depending on the file to which it is applied. The actual value supported for
1903  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
1904  *
1905  * This is clear that any machine supporting multiple file system types
1906  * and/or a network can not include this define, regardless of protection
1907  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
1908  *
1909  * #define	NAME_MAX	14
1910  */
1911 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1912 typedef long clock_t;
1913 
1914 
1915 extern long _sysconf(int); /* System Private interface to sysconf() */
1916 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
1917     /* Increased for illumos */
1918 # 30 "check.c" 2
1919 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
1920 /*
1921  * CDDL HEADER START
1922  *
1923  * The contents of this file are subject to the terms of the
1924  * Common Development and Distribution License (the "License").
1925  * You may not use this file except in compliance with the License.
1926  *
1927  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1928  * or http://www.opensolaris.org/os/licensing.
1929  * See the License for the specific language governing permissions
1930  * and limitations under the License.
1931  *
1932  * When distributing Covered Code, include this CDDL HEADER in each
1933  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1934  * If applicable, add the following below this CDDL HEADER, with the
1935  * fields enclosed by brackets "[]" replaced with your own identifying
1936  * information: Portions Copyright [yyyy] [name of copyright owner]
1937  *
1938  * CDDL HEADER END
1939  */
1940 
1941 /*
1942  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1943  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
1944  */
1945 
1946 /*	Copyright (c) 1988 AT&T	*/
1947 /*	  All Rights Reserved  	*/
1948 
1949 
1950 
1951 
1952 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
1953 /*
1954  * CDDL HEADER START
1955  *
1956  * The contents of this file are subject to the terms of the
1957  * Common Development and Distribution License, Version 1.0 only
1958  * (the "License").  You may not use this file except in compliance
1959  * with the License.
1960  *
1961  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1962  * or http://www.opensolaris.org/os/licensing.
1963  * See the License for the specific language governing permissions
1964  * and limitations under the License.
1965  *
1966  * When distributing Covered Code, include this CDDL HEADER in each
1967  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1968  * If applicable, add the following below this CDDL HEADER, with the
1969  * fields enclosed by brackets "[]" replaced with your own identifying
1970  * information: Portions Copyright [yyyy] [name of copyright owner]
1971  *
1972  * CDDL HEADER END
1973  */
1974 /*	Copyright (c) 1988 AT&T	*/
1975 /*	  All Rights Reserved  	*/
1976 
1977 
1978 /*
1979  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1980  * Copyright 2014 PALO, Richard.
1981  *
1982  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1983  * Use is subject to license terms.
1984  */
1985 
1986 /*
1987  * An application should not include this header directly.  Instead it
1988  * should be included only through the inclusion of other Sun headers.
1989  *
1990  * The contents of this header is limited to identifiers specified in the
1991  * C Standard.  Any new identifiers specified in future amendments to the
1992  * C Standard must be placed in this header.  If these new identifiers
1993  * are required to also be in the C++ Standard "std" namespace, then for
1994  * anything other than macro definitions, corresponding "using" directives
1995  * must also be added to <string.h>.
1996  */
1997 
1998 
1999 
2000 
2001 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2002 /*
2003  * CDDL HEADER START
2004  *
2005  * The contents of this file are subject to the terms of the
2006  * Common Development and Distribution License (the "License").
2007  * You may not use this file except in compliance with the License.
2008  *
2009  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2010  * or http://www.opensolaris.org/os/licensing.
2011  * See the License for the specific language governing permissions
2012  * and limitations under the License.
2013  *
2014  * When distributing Covered Code, include this CDDL HEADER in each
2015  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2016  * If applicable, add the following below this CDDL HEADER, with the
2017  * fields enclosed by brackets "[]" replaced with your own identifying
2018  * information: Portions Copyright [yyyy] [name of copyright owner]
2019  *
2020  * CDDL HEADER END
2021  */
2022 
2023 /*
2024  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2025  * Copyright 2016 Joyent, Inc.
2026  *
2027  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2028  * Use is subject to license terms.
2029  */
2030 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
2031 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
2032 /*
2033  * This file and its contents are supplied under the terms of the
2034  * Common Development and Distribution License ("CDDL"), version 1.0.
2035  * You may only use this file in accordance with the terms of version
2036  * 1.0 of the CDDL.
2037  *
2038  * A full copy of the text of the CDDL should have accompanied this
2039  * source.  A copy of the CDDL is also available via the Internet at
2040  * http://www.illumos.org/license/CDDL.
2041  */
2042 
2043 /*
2044  * Copyright 2014-2016 PALO, Richard.
2045  */
2046 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
2047 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
2048 extern int memcmp(const void *, const void *, size_t);
2049 extern void *memcpy(void *, const void *, size_t);
2050 extern void *memmove(void *, const void *, size_t);
2051 extern void *memset(void *, int, size_t);
2052 extern char *strcat(char *, const char *);
2053 extern int strcmp(const char *, const char *);
2054 extern char *strcpy(char *, const char *);
2055 extern int strcoll(const char *, const char *);
2056 extern size_t strcspn(const char *, const char *);
2057 extern char *strerror(int);
2058 extern size_t strlen(const char *);
2059 extern char *strncat(char *, const char *, size_t);
2060 extern int strncmp(const char *, const char *, size_t);
2061 extern char *strncpy(char *, const char *, size_t);
2062 extern size_t strspn(const char *, const char *);
2063 extern char *strtok(char *, const char *);
2064 extern size_t strxfrm(char *, const char *, size_t);
2065 
2066 /*
2067  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
2068  * function signatures for the following functions be replaced by
2069  * two declarations, both of which have the same behavior.
2070  */
2071 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
2072 extern void *memchr(const void *, int, size_t);
2073 extern char *strchr(const char *, int);
2074 extern char *strpbrk(const char *, const char *);
2075 extern char *strrchr(const char *, int);
2076 extern char *strstr(const char *, const char *);
2077 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
2078 
2079 /*
2080  * Allow global visibility for symbols defined in
2081  * C++ "std" namespace in <iso/string_iso.h>.
2082  */
2083 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
2084 extern int strerror_r(int, char *, size_t);
2085 
2086 
2087 
2088 
2089 
2090 extern char *strtok_r(char *, const char *,
2091  char **);
2092 
2093 
2094 
2095 
2096 extern void *memccpy(void *, const void *,
2097   int, size_t);
2098 
2099 
2100 
2101 
2102 extern char *stpcpy(char *, const char *);
2103 extern char *stpncpy(char *, const char *, size_t);
2104 extern char *strndup(const char *, size_t);
2105 extern size_t strnlen(const char *, size_t);
2106 extern char *strsignal(int);
2107 
2108 
2109 
2110 typedef struct _locale *locale_t;
2111 
2112 
2113 extern int strcoll_l(const char *, const char *, locale_t);
2114 extern size_t strxfrm_l(char *, const char *,
2115     size_t, locale_t);
2116 extern int strcasecmp_l(const char *, const char *, locale_t);
2117 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
2118 extern char *strerror_l(int, locale_t);
2119 
2120 
2121 
2122 
2123 
2124 /* Note that some of these are also declared in strings.h for XPG4_2+ */
2125 extern void explicit_bzero(void *, size_t);
2126 extern int uucopy(const void *, void *, size_t);
2127 extern int uucopystr(const void *, void *, size_t);
2128 extern int ffs(int);
2129 extern int ffsl(long);
2130 extern int ffsll(long long);
2131 extern int fls(int);
2132 extern int flsl(long);
2133 extern int flsll(long long);
2134 extern void *memmem(const void *, size_t, const void *, size_t);
2135 extern char *strcasestr(const char *, const char *);
2136 extern char *strnstr(const char *, const char *, size_t);
2137 extern size_t strlcpy(char *, const char *, size_t);
2138 extern size_t strlcat(char *, const char *, size_t);
2139 extern char *strsep(char **stringp, const char *delim);
2140 extern char *strchrnul(const char *, int);
2141 extern char *strcasestr_l(const char *, const char *, locale_t);
2142 extern int strcasecmp(const char *, const char *);
2143 extern int strncasecmp(const char *, const char *, size_t);
2144 
2145 
2146 
2147 
2148 
2149 extern char *strdup(const char *);
2150 
2151 
2152 
2153 
2154 
2155 
2156 /*
2157  * gcc provides this inlining facility but Studio C does not.
2158  * We should use it exclusively once Studio C also provides it.
2159  */
2160 extern void *__builtin_alloca(size_t);
2161 # 31 "check.c" 2
2162 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
2163 /*
2164  * CDDL HEADER START
2165  *
2166  * The contents of this file are subject to the terms of the
2167  * Common Development and Distribution License (the "License").
2168  * You may not use this file except in compliance with the License.
2169  *
2170  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2171  * or http://www.opensolaris.org/os/licensing.
2172  * See the License for the specific language governing permissions
2173  * and limitations under the License.
2174  *
2175  * When distributing Covered Code, include this CDDL HEADER in each
2176  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2177  * If applicable, add the following below this CDDL HEADER, with the
2178  * fields enclosed by brackets "[]" replaced with your own identifying
2179  * information: Portions Copyright [yyyy] [name of copyright owner]
2180  *
2181  * CDDL HEADER END
2182  */
2183 
2184 /*
2185  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2186  * Copyright (c) 2013 Gary Mills
2187  *
2188  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
2189  */
2190 
2191 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
2192 
2193 /*	Copyright (c) 1988 AT&T	*/
2194 /*	  All Rights Reserved  	*/
2195 
2196 
2197 
2198 
2199 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
2200 /*
2201  * CDDL HEADER START
2202  *
2203  * The contents of this file are subject to the terms of the
2204  * Common Development and Distribution License, Version 1.0 only
2205  * (the "License").  You may not use this file except in compliance
2206  * with the License.
2207  *
2208  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2209  * or http://www.opensolaris.org/os/licensing.
2210  * See the License for the specific language governing permissions
2211  * and limitations under the License.
2212  *
2213  * When distributing Covered Code, include this CDDL HEADER in each
2214  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2215  * If applicable, add the following below this CDDL HEADER, with the
2216  * fields enclosed by brackets "[]" replaced with your own identifying
2217  * information: Portions Copyright [yyyy] [name of copyright owner]
2218  *
2219  * CDDL HEADER END
2220  */
2221 /*
2222  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2223  * Copyright 2014 PALO, Richard.
2224  *
2225  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2226  * Use is subject to license terms.
2227  */
2228 
2229 /*	Copyright (c) 1988 AT&T	*/
2230 /*	  All Rights Reserved  	*/
2231 
2232 
2233 /*
2234  * An application should not include this header directly.  Instead it
2235  * should be included only through the inclusion of other Sun headers.
2236  *
2237  * The contents of this header is limited to identifiers specified in the
2238  * C Standard.  Any new identifiers specified in future amendments to the
2239  * C Standard must be placed in this header.  If these new identifiers
2240  * are required to also be in the C++ Standard "std" namespace, then for
2241  * anything other than macro definitions, corresponding "using" directives
2242  * must also be added to <locale.h>.
2243  */
2244 
2245 
2246 
2247 
2248 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2249 /*
2250  * CDDL HEADER START
2251  *
2252  * The contents of this file are subject to the terms of the
2253  * Common Development and Distribution License (the "License").
2254  * You may not use this file except in compliance with the License.
2255  *
2256  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2257  * or http://www.opensolaris.org/os/licensing.
2258  * See the License for the specific language governing permissions
2259  * and limitations under the License.
2260  *
2261  * When distributing Covered Code, include this CDDL HEADER in each
2262  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2263  * If applicable, add the following below this CDDL HEADER, with the
2264  * fields enclosed by brackets "[]" replaced with your own identifying
2265  * information: Portions Copyright [yyyy] [name of copyright owner]
2266  *
2267  * CDDL HEADER END
2268  */
2269 
2270 /*
2271  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2272  * Copyright 2016 Joyent, Inc.
2273  *
2274  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2275  * Use is subject to license terms.
2276  */
2277 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
2278 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
2279 /*
2280  * This file and its contents are supplied under the terms of the
2281  * Common Development and Distribution License ("CDDL"), version 1.0.
2282  * You may only use this file in accordance with the terms of version
2283  * 1.0 of the CDDL.
2284  *
2285  * A full copy of the text of the CDDL should have accompanied this
2286  * source.  A copy of the CDDL is also available via the Internet at
2287  * http://www.illumos.org/license/CDDL.
2288  */
2289 
2290 /*
2291  * Copyright 2014-2016 PALO, Richard.
2292  */
2293 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
2294 
2295 
2296 
2297 
2298 
2299 unsigned char __mb_cur_max(void);
2300 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
2301 typedef struct {
2302  int quot;
2303  int rem;
2304 } div_t;
2305 
2306 typedef struct {
2307  long quot;
2308  long rem;
2309 } ldiv_t;
2310 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
2311 /*
2312  * wchar_t is a built-in type in standard C++ and as such is not
2313  * defined here when using standard C++. However, the GNU compiler
2314  * fixincludes utility nonetheless creates its own version of this
2315  * header for use by gcc and g++. In that version it adds a redundant
2316  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
2317  * header we need to include the following magic comment:
2318  *
2319  * we must use the C++ compiler's type
2320  *
2321  * The above comment should not be removed or changed until GNU
2322  * gcc/fixinc/inclhack.def is updated to bypass this header.
2323  */
2324 
2325 
2326 
2327 
2328 
2329 
2330 typedef long wchar_t;
2331 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
2332 extern void abort(void) __attribute__((__noreturn__));
2333 extern int abs(int);
2334 extern int atexit(void (*)(void));
2335 extern double atof(const char *);
2336 extern int atoi(const char *);
2337 extern long int atol(const char *);
2338 extern void *bsearch(const void *, const void *, size_t, size_t,
2339  int (*)(const void *, const void *));
2340 
2341 
2342 
2343 
2344 
2345 
2346 extern void *calloc(size_t, size_t);
2347 extern div_t div(int, int);
2348 extern void exit(int)
2349  __attribute__((__noreturn__));
2350 extern void free(void *);
2351 extern char *getenv(const char *);
2352 extern long int labs(long);
2353 extern ldiv_t ldiv(long, long);
2354 extern void *malloc(size_t);
2355 extern int mblen(const char *, size_t);
2356 extern size_t mbstowcs(wchar_t *, const char *,
2357  size_t);
2358 extern int mbtowc(wchar_t *, const char *, size_t);
2359 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
2360 
2361 
2362 
2363 
2364 
2365 extern int rand(void);
2366 extern void *realloc(void *, size_t);
2367 extern void srand(unsigned int);
2368 extern double strtod(const char *, char **);
2369 extern long int strtol(const char *, char **, int);
2370 extern unsigned long int strtoul(const char *,
2371  char **, int);
2372 extern int system(const char *);
2373 extern int wctomb(char *, wchar_t);
2374 extern size_t wcstombs(char *, const wchar_t *,
2375  size_t);
2376 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
2377 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
2378 /*
2379  * CDDL HEADER START
2380  *
2381  * The contents of this file are subject to the terms of the
2382  * Common Development and Distribution License, Version 1.0 only
2383  * (the "License").  You may not use this file except in compliance
2384  * with the License.
2385  *
2386  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2387  * or http://www.opensolaris.org/os/licensing.
2388  * See the License for the specific language governing permissions
2389  * and limitations under the License.
2390  *
2391  * When distributing Covered Code, include this CDDL HEADER in each
2392  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2393  * If applicable, add the following below this CDDL HEADER, with the
2394  * fields enclosed by brackets "[]" replaced with your own identifying
2395  * information: Portions Copyright [yyyy] [name of copyright owner]
2396  *
2397  * CDDL HEADER END
2398  */
2399 /*
2400  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2401  *
2402  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2403  * Use is subject to license terms.
2404  */
2405 
2406 /*
2407  * An application should not include this header directly.  Instead it
2408  * should be included only through the inclusion of other Sun headers.
2409  *
2410  * The contents of this header is limited to identifiers specified in
2411  * the C99 standard and in conflict with the C++ implementation of the
2412  * standard header.  The C++ standard may adopt the C99 standard at
2413  * which point it is expected that the symbols included here will
2414  * become part of the C++ std namespace.
2415  */
2416 
2417 
2418 
2419 
2420 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2421 /*
2422  * CDDL HEADER START
2423  *
2424  * The contents of this file are subject to the terms of the
2425  * Common Development and Distribution License (the "License").
2426  * You may not use this file except in compliance with the License.
2427  *
2428  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2429  * or http://www.opensolaris.org/os/licensing.
2430  * See the License for the specific language governing permissions
2431  * and limitations under the License.
2432  *
2433  * When distributing Covered Code, include this CDDL HEADER in each
2434  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2435  * If applicable, add the following below this CDDL HEADER, with the
2436  * fields enclosed by brackets "[]" replaced with your own identifying
2437  * information: Portions Copyright [yyyy] [name of copyright owner]
2438  *
2439  * CDDL HEADER END
2440  */
2441 
2442 /*
2443  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2444  * Copyright 2016 Joyent, Inc.
2445  *
2446  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2447  * Use is subject to license terms.
2448  */
2449 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
2450 
2451 
2452 
2453 
2454 
2455 /*
2456  * The following have been added as a result of the ISO/IEC 9899:1999
2457  * standard. For a strictly conforming C application, visibility is
2458  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
2459  * For non-strictly conforming C applications, there are no restrictions
2460  * on the C namespace.
2461  */
2462 
2463 
2464 typedef struct {
2465  long long quot;
2466  long long rem;
2467 } lldiv_t;
2468 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
2469 extern void _Exit(int);
2470 extern float strtof(const char *, char **);
2471 extern long double strtold(const char *, char **);
2472 
2473 
2474 extern long long atoll(const char *);
2475 extern long long llabs(long long);
2476 extern lldiv_t lldiv(long long, long long);
2477 extern long long strtoll(const char *, char **,
2478  int);
2479 extern unsigned long long strtoull(const char *,
2480  char **, int);
2481 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
2482 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
2483 /*
2484  * This file and its contents are supplied under the terms of the
2485  * Common Development and Distribution License ("CDDL"), version 1.0.
2486  * You may only use this file in accordance with the terms of version
2487  * 1.0 of the CDDL.
2488  *
2489  * A full copy of the text of the CDDL should have accompanied this
2490  * source.  A copy of the CDDL is also available via the Internet at
2491  * http://www.illumos.org/license/CDDL.
2492  */
2493 
2494 /*
2495  * Copyright 2016 Joyent, Inc.
2496  */
2497 
2498 /*
2499  * An application should not include this header directly.  Instead it
2500  * should be included only through the inclusion of other illumos headers.
2501  *
2502  * The contents of this header is limited to identifiers specified in
2503  * the C11 standard and in conflict with the C++ implementation of the
2504  * standard header.  The C++ standard may adopt the C11 standard at
2505  * which point it is expected that the symbols included here will
2506  * become part of the C++ std namespace.
2507  */
2508 
2509 
2510 
2511 
2512 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2513 /*
2514  * CDDL HEADER START
2515  *
2516  * The contents of this file are subject to the terms of the
2517  * Common Development and Distribution License (the "License").
2518  * You may not use this file except in compliance with the License.
2519  *
2520  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2521  * or http://www.opensolaris.org/os/licensing.
2522  * See the License for the specific language governing permissions
2523  * and limitations under the License.
2524  *
2525  * When distributing Covered Code, include this CDDL HEADER in each
2526  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2527  * If applicable, add the following below this CDDL HEADER, with the
2528  * fields enclosed by brackets "[]" replaced with your own identifying
2529  * information: Portions Copyright [yyyy] [name of copyright owner]
2530  *
2531  * CDDL HEADER END
2532  */
2533 
2534 /*
2535  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2536  * Copyright 2016 Joyent, Inc.
2537  *
2538  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2539  * Use is subject to license terms.
2540  */
2541 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
2542 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
2543 /*
2544  * The following have been added as a result of the ISO/IEC 9899:2011
2545  * standard. For a strictly conforming C application, visibility is
2546  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
2547  * For non-strictly conforming C applications, there are no restrictions
2548  * on the C namespace.
2549  */
2550 
2551 /*
2552  * Work around fix-includes and other bad actors with using multiple headers.
2553  */
2554 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
2555 extern void *aligned_alloc(size_t, size_t);
2556 extern int at_quick_exit(void (*)(void));
2557 extern void quick_exit(int);
2558 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
2559 
2560 
2561 
2562 
2563 
2564 /*
2565  * Allow global visibility for symbols defined in
2566  * C++ "std" namespace in <iso/stdlib_iso.h>.
2567  */
2568 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2569 /*
2570  * Allow global visibility for symbols defined in
2571  * C++ "std" namespace in <iso/stdlib_c11.h>.
2572  */
2573 # 101 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2574 typedef unsigned int uid_t; /* UID type		*/
2575 
2576 
2577 /* large file compilation environment setup */
2578 
2579 
2580 
2581 
2582 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2583 #pragma redefine_extname mkstemp mkstemp64
2584 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2585 
2586 
2587 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2588 #pragma redefine_extname mkstemps mkstemps64
2589 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2590 
2591 
2592 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2593 #pragma redefine_extname mkostemp mkostemp64
2594 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2595 
2596 
2597 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2598 #pragma redefine_extname mkostemps mkostemps64
2599 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2600 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2601 /* In the LP64 compilation environment, all APIs are already large file */
2602 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2603 extern int rand_r(unsigned int *);
2604 
2605 
2606 extern void _exithandle(void);
2607 
2608 
2609 
2610 
2611 extern double drand48(void);
2612 extern double erand48(unsigned short *);
2613 extern long jrand48(unsigned short *);
2614 extern void lcong48(unsigned short *);
2615 extern long lrand48(void);
2616 extern long mrand48(void);
2617 extern long nrand48(unsigned short *);
2618 extern unsigned short *seed48(unsigned short *);
2619 extern void srand48(long);
2620 extern int putenv(char *);
2621 extern void setkey(const char *);
2622 
2623 
2624 /*
2625  * swab() has historically been in <stdlib.h> as delivered from AT&T
2626  * and continues to be visible in the default compilation environment.
2627  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
2628  * in <unistd.h>. As a result, with respect to X/Open namespace the
2629  * swab() declaration in this header is only visible for the XPG3
2630  * environment.
2631  */
2632 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2633 extern void swab(const char *, char *, ssize_t);
2634 
2635 
2636 
2637 
2638 
2639 extern int mkstemp(char *);
2640 
2641 extern int mkstemps(char *, int);
2642 
2643 
2644 
2645 
2646 
2647 extern int mkstemp64(char *);
2648 
2649 extern int mkstemps64(char *, int);
2650 
2651 
2652 
2653 
2654 extern char *mkdtemp(char *);
2655 
2656 
2657 
2658 extern int mkostemp(char *, int);
2659 extern int mkostemps(char *, int, int);
2660 
2661 
2662 extern int mkostemp64(char *, int);
2663 extern int mkostemps64(char *, int, int);
2664 
2665 
2666 
2667 
2668 
2669 
2670 extern long a64l(const char *);
2671 extern char *ecvt(double, int, int *, int *);
2672 extern char *fcvt(double, int, int *, int *);
2673 extern char *gcvt(double, int, char *);
2674 extern int getsubopt(char **, char *const *, char **);
2675 extern int grantpt(int);
2676 extern char *initstate(unsigned, char *, size_t);
2677 extern char *l64a(long);
2678 extern char *mktemp(char *);
2679 extern char *ptsname(int);
2680 extern long random(void);
2681 extern char *realpath(const char *, char *);
2682 extern char *setstate(const char *);
2683 extern void srandom(unsigned);
2684 extern int unlockpt(int);
2685 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
2686 
2687 extern int ttyslot(void);
2688 extern void *valloc(size_t);
2689 
2690 
2691 
2692 
2693 
2694 
2695 extern int posix_memalign(void **, size_t, size_t);
2696 extern int posix_openpt(int);
2697 extern int setenv(const char *, const char *, int);
2698 extern int unsetenv(const char *);
2699 
2700 
2701 
2702 
2703 extern char *canonicalize_file_name(const char *);
2704 extern int clearenv(void);
2705 extern void closefrom(int);
2706 extern int daemon(int, int);
2707 extern int dup2(int, int);
2708 extern int dup3(int, int, int);
2709 extern int fdwalk(int (*)(void *, int), void *);
2710 extern char *qecvt(long double, int, int *, int *);
2711 extern char *qfcvt(long double, int, int *, int *);
2712 extern char *qgcvt(long double, int, char *);
2713 extern char *getcwd(char *, size_t);
2714 extern const char *getexecname(void);
2715 
2716 
2717 
2718 
2719 
2720 
2721 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2722 #pragma redefine_extname getlogin getloginx
2723 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2724 
2725 
2726 
2727 
2728 
2729 
2730 extern char *getlogin(void);
2731 
2732 
2733 extern int getopt(int, char *const *, const char *);
2734 extern char *optarg;
2735 extern int optind, opterr, optopt;
2736 extern char *getpass(const char *);
2737 extern char *getpassphrase(const char *);
2738 extern int getpw(uid_t, char *);
2739 extern int isatty(int);
2740 extern void *memalign(size_t, size_t);
2741 extern char *ttyname(int);
2742 extern char *mkdtemp(char *);
2743 extern const char *getprogname(void);
2744 extern void setprogname(const char *);
2745 
2746 
2747 extern char *lltostr(long long, char *);
2748 extern char *ulltostr(unsigned long long, char *);
2749 
2750 
2751 
2752 
2753 /* OpenBSD compatibility functions */
2754 
2755 
2756 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
2757 /*
2758  * CDDL HEADER START
2759  *
2760  * The contents of this file are subject to the terms of the
2761  * Common Development and Distribution License, Version 1.0 only
2762  * (the "License").  You may not use this file except in compliance
2763  * with the License.
2764  *
2765  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2766  * or http://www.opensolaris.org/os/licensing.
2767  * See the License for the specific language governing permissions
2768  * and limitations under the License.
2769  *
2770  * When distributing Covered Code, include this CDDL HEADER in each
2771  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2772  * If applicable, add the following below this CDDL HEADER, with the
2773  * fields enclosed by brackets "[]" replaced with your own identifying
2774  * information: Portions Copyright [yyyy] [name of copyright owner]
2775  *
2776  * CDDL HEADER END
2777  */
2778 /*
2779  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2780  *
2781  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2782  * Use is subject to license terms.
2783  */
2784 
2785 
2786 
2787 
2788 /*
2789  * This file, <inttypes.h>, is specified by the ISO C standard,
2790  * standard, ISO/IEC 9899:1999 Programming language - C and is
2791  * also defined by SUSv3.
2792  *
2793  * ISO	  International Organization for Standardization.
2794  * SUSv3  Single Unix Specification, Version 3
2795  */
2796 
2797 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2798 /*
2799  * CDDL HEADER START
2800  *
2801  * The contents of this file are subject to the terms of the
2802  * Common Development and Distribution License (the "License").
2803  * You may not use this file except in compliance with the License.
2804  *
2805  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2806  * or http://www.opensolaris.org/os/licensing.
2807  * See the License for the specific language governing permissions
2808  * and limitations under the License.
2809  *
2810  * When distributing Covered Code, include this CDDL HEADER in each
2811  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2812  * If applicable, add the following below this CDDL HEADER, with the
2813  * fields enclosed by brackets "[]" replaced with your own identifying
2814  * information: Portions Copyright [yyyy] [name of copyright owner]
2815  *
2816  * CDDL HEADER END
2817  */
2818 
2819 /*
2820  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2821  * Copyright 2016 Joyent, Inc.
2822  *
2823  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2824  * Use is subject to license terms.
2825  */
2826 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
2827 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
2828 /*
2829  * CDDL HEADER START
2830  *
2831  * The contents of this file are subject to the terms of the
2832  * Common Development and Distribution License, Version 1.0 only
2833  * (the "License").  You may not use this file except in compliance
2834  * with the License.
2835  *
2836  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2837  * or http://www.opensolaris.org/os/licensing.
2838  * See the License for the specific language governing permissions
2839  * and limitations under the License.
2840  *
2841  * When distributing Covered Code, include this CDDL HEADER in each
2842  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2843  * If applicable, add the following below this CDDL HEADER, with the
2844  * fields enclosed by brackets "[]" replaced with your own identifying
2845  * information: Portions Copyright [yyyy] [name of copyright owner]
2846  *
2847  * CDDL HEADER END
2848  */
2849 /*
2850  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
2851  * Use is subject to license terms.
2852  */
2853 
2854 
2855 
2856 
2857 #pragma ident "%Z%%M%	%I%	%E% SMI"
2858 
2859 /*
2860  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
2861  * vast majority of the facilities specified for <inttypes.h> as defined
2862  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
2863  *
2864  * Kernel/Driver developers are encouraged to include this file to access
2865  * the fixed size types, limits and utility macros. Application developers
2866  * should use the standard defined header <inttypes.h>.
2867  */
2868 
2869 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2870 /*
2871  * CDDL HEADER START
2872  *
2873  * The contents of this file are subject to the terms of the
2874  * Common Development and Distribution License (the "License").
2875  * You may not use this file except in compliance with the License.
2876  *
2877  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2878  * or http://www.opensolaris.org/os/licensing.
2879  * See the License for the specific language governing permissions
2880  * and limitations under the License.
2881  *
2882  * When distributing Covered Code, include this CDDL HEADER in each
2883  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2884  * If applicable, add the following below this CDDL HEADER, with the
2885  * fields enclosed by brackets "[]" replaced with your own identifying
2886  * information: Portions Copyright [yyyy] [name of copyright owner]
2887  *
2888  * CDDL HEADER END
2889  */
2890 
2891 /*
2892  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2893  * Copyright 2016 Joyent, Inc.
2894  *
2895  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2896  * Use is subject to license terms.
2897  */
2898 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
2899 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
2900 /*
2901  * CDDL HEADER START
2902  *
2903  * The contents of this file are subject to the terms of the
2904  * Common Development and Distribution License, Version 1.0 only
2905  * (the "License").  You may not use this file except in compliance
2906  * with the License.
2907  *
2908  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2909  * or http://www.opensolaris.org/os/licensing.
2910  * See the License for the specific language governing permissions
2911  * and limitations under the License.
2912  *
2913  * When distributing Covered Code, include this CDDL HEADER in each
2914  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2915  * If applicable, add the following below this CDDL HEADER, with the
2916  * fields enclosed by brackets "[]" replaced with your own identifying
2917  * information: Portions Copyright [yyyy] [name of copyright owner]
2918  *
2919  * CDDL HEADER END
2920  */
2921 /*
2922  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2923  *
2924  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2925  * Use is subject to license terms.
2926  */
2927 
2928 
2929 
2930 
2931 /*
2932  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
2933  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
2934  * Programming language - C.
2935  *
2936  * Programs/Modules should not directly include this file.  Access to the
2937  * types defined in this file should be through the inclusion of one of the
2938  * following files:
2939  *
2940  *	<sys/types.h>		Provides only the "_t" types defined in this
2941  *				file which is a subset of the contents of
2942  *				<inttypes.h>.  (This can be appropriate for
2943  *				all programs/modules except those claiming
2944  *				ANSI-C conformance.)
2945  *
2946  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2947  *				components of <inttypes.h>.
2948  *
2949  *	<inttypes.h>		For use by applications.
2950  *
2951  * See these files for more details.
2952  */
2953 
2954 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2955 /*
2956  * CDDL HEADER START
2957  *
2958  * The contents of this file are subject to the terms of the
2959  * Common Development and Distribution License (the "License").
2960  * You may not use this file except in compliance with the License.
2961  *
2962  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2963  * or http://www.opensolaris.org/os/licensing.
2964  * See the License for the specific language governing permissions
2965  * and limitations under the License.
2966  *
2967  * When distributing Covered Code, include this CDDL HEADER in each
2968  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2969  * If applicable, add the following below this CDDL HEADER, with the
2970  * fields enclosed by brackets "[]" replaced with your own identifying
2971  * information: Portions Copyright [yyyy] [name of copyright owner]
2972  *
2973  * CDDL HEADER END
2974  */
2975 
2976 /*
2977  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2978  * Copyright 2016 Joyent, Inc.
2979  *
2980  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2981  * Use is subject to license terms.
2982  */
2983 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
2984 
2985 
2986 
2987 
2988 
2989 /*
2990  * Basic / Extended integer types
2991  *
2992  * The following defines the basic fixed-size integer types.
2993  *
2994  * Implementations are free to typedef them to Standard C integer types or
2995  * extensions that they support. If an implementation does not support one
2996  * of the particular integer data types below, then it should not define the
2997  * typedefs and macros corresponding to that data type.  Note that int8_t
2998  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
2999  * as an unsigned entity because there is no way to define an eight bit
3000  * signed integral.
3001  */
3002 
3003 typedef char int8_t;
3004 
3005 
3006 
3007 typedef short int16_t;
3008 typedef int int32_t;
3009 
3010 
3011 
3012 
3013 
3014 
3015 typedef long long int64_t;
3016 
3017 
3018 
3019 typedef unsigned char uint8_t;
3020 typedef unsigned short uint16_t;
3021 typedef unsigned int uint32_t;
3022 
3023 
3024 
3025 
3026 typedef unsigned long long uint64_t;
3027 
3028 
3029 
3030 /*
3031  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
3032  * and unsigned integer types supported by the implementation.
3033  */
3034 
3035 typedef int64_t intmax_t;
3036 typedef uint64_t uintmax_t;
3037 
3038 
3039 
3040 
3041 
3042 /*
3043  * intptr_t and uintptr_t are signed and unsigned integer types large enough
3044  * to hold any data pointer; that is, data pointers can be assigned into or
3045  * from these integer types without losing precision.
3046  */
3047 
3048 
3049 
3050 
3051 typedef int intptr_t;
3052 typedef unsigned int uintptr_t;
3053 
3054 
3055 /*
3056  * The following define the fastest integer types that can hold the
3057  * specified number of bits.
3058  */
3059 
3060 typedef char int_fast8_t;
3061 
3062 
3063 
3064 typedef int int_fast16_t;
3065 typedef int int_fast32_t;
3066 
3067 
3068 
3069 
3070 typedef long long int_fast64_t;
3071 
3072 
3073 
3074 typedef unsigned char uint_fast8_t;
3075 typedef unsigned int uint_fast16_t;
3076 typedef unsigned int uint_fast32_t;
3077 
3078 
3079 
3080 
3081 typedef unsigned long long uint_fast64_t;
3082 
3083 
3084 
3085 /*
3086  * The following define the smallest integer types that can hold the
3087  * specified number of bits.
3088  */
3089 
3090 typedef char int_least8_t;
3091 
3092 
3093 
3094 typedef short int_least16_t;
3095 typedef int int_least32_t;
3096 
3097 
3098 
3099 
3100 typedef long long int_least64_t;
3101 
3102 
3103 
3104 /*
3105  * If these are changed, please update char16_t and char32_t in head/uchar.h.
3106  */
3107 typedef unsigned char uint_least8_t;
3108 typedef unsigned short uint_least16_t;
3109 typedef unsigned int uint_least32_t;
3110 
3111 
3112 
3113 
3114 typedef unsigned long long uint_least64_t;
3115 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
3116 
3117 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
3118 /*
3119  * CDDL HEADER START
3120  *
3121  * The contents of this file are subject to the terms of the
3122  * Common Development and Distribution License, Version 1.0 only
3123  * (the "License").  You may not use this file except in compliance
3124  * with the License.
3125  *
3126  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3127  * or http://www.opensolaris.org/os/licensing.
3128  * See the License for the specific language governing permissions
3129  * and limitations under the License.
3130  *
3131  * When distributing Covered Code, include this CDDL HEADER in each
3132  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3133  * If applicable, add the following below this CDDL HEADER, with the
3134  * fields enclosed by brackets "[]" replaced with your own identifying
3135  * information: Portions Copyright [yyyy] [name of copyright owner]
3136  *
3137  * CDDL HEADER END
3138  */
3139 /*
3140  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3141  *
3142  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3143  * Use is subject to license terms.
3144  */
3145 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
3146 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
3147 /*
3148  * CDDL HEADER START
3149  *
3150  * The contents of this file are subject to the terms of the
3151  * Common Development and Distribution License, Version 1.0 only
3152  * (the "License").  You may not use this file except in compliance
3153  * with the License.
3154  *
3155  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3156  * or http://www.opensolaris.org/os/licensing.
3157  * See the License for the specific language governing permissions
3158  * and limitations under the License.
3159  *
3160  * When distributing Covered Code, include this CDDL HEADER in each
3161  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3162  * If applicable, add the following below this CDDL HEADER, with the
3163  * fields enclosed by brackets "[]" replaced with your own identifying
3164  * information: Portions Copyright [yyyy] [name of copyright owner]
3165  *
3166  * CDDL HEADER END
3167  */
3168 /*
3169  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3170  *
3171  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3172  * Use is subject to license terms.
3173  */
3174 
3175 
3176 
3177 
3178 /*
3179  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
3180  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
3181  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
3182  * Programming language - C.
3183  *
3184  * Programs/Modules should not directly include this file.  Access to the
3185  * types defined in this file should be through the inclusion of one of the
3186  * following files:
3187  *
3188  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
3189  *				components of <inttypes.h>.
3190  *
3191  *	<inttypes.h>		For use by applications.
3192  *
3193  * See these files for more details.
3194  *
3195  * Use at your own risk.  This file will track the evolution of the revision
3196  * of the current ISO C standard.  As of February 1996, the committee is
3197  * squarely behind the fixed sized types.
3198  */
3199 
3200 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3201 /*
3202  * CDDL HEADER START
3203  *
3204  * The contents of this file are subject to the terms of the
3205  * Common Development and Distribution License (the "License").
3206  * You may not use this file except in compliance with the License.
3207  *
3208  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3209  * or http://www.opensolaris.org/os/licensing.
3210  * See the License for the specific language governing permissions
3211  * and limitations under the License.
3212  *
3213  * When distributing Covered Code, include this CDDL HEADER in each
3214  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3215  * If applicable, add the following below this CDDL HEADER, with the
3216  * fields enclosed by brackets "[]" replaced with your own identifying
3217  * information: Portions Copyright [yyyy] [name of copyright owner]
3218  *
3219  * CDDL HEADER END
3220  */
3221 
3222 /*
3223  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3224  * Copyright 2016 Joyent, Inc.
3225  *
3226  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3227  * Use is subject to license terms.
3228  */
3229 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
3230 
3231 
3232 
3233 
3234 
3235 /*
3236  * Constants
3237  *
3238  * The following macros create constants of the types defined in
3239  * <sys/int_types.h>. The intent is that:
3240  *	Constants defined using these macros have a specific size and
3241  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
3242  *	are for examples only. Implementations are permitted to use other
3243  *	suffixes.
3244  *
3245  * The "CSTYLED" comments are flags to an internal code style analysis tool
3246  * telling it to silently accept the line which follows.  This internal
3247  * standard requires a space between arguments, but the historical,
3248  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
3249  */
3250 /* CSTYLED */
3251 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
3252 /* CSTYLED */
3253 
3254 
3255 
3256 
3257 /* CSTYLED */
3258 
3259 /* CSTYLED */
3260 
3261 /* CSTYLED */
3262 
3263 
3264 
3265 
3266 
3267 
3268 /* CSTYLED */
3269 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
3270 /* CSTYLED */
3271 
3272 /* CSTYLED */
3273 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
3274 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
3275 /*
3276  * CDDL HEADER START
3277  *
3278  * The contents of this file are subject to the terms of the
3279  * Common Development and Distribution License, Version 1.0 only
3280  * (the "License").  You may not use this file except in compliance
3281  * with the License.
3282  *
3283  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3284  * or http://www.opensolaris.org/os/licensing.
3285  * See the License for the specific language governing permissions
3286  * and limitations under the License.
3287  *
3288  * When distributing Covered Code, include this CDDL HEADER in each
3289  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3290  * If applicable, add the following below this CDDL HEADER, with the
3291  * fields enclosed by brackets "[]" replaced with your own identifying
3292  * information: Portions Copyright [yyyy] [name of copyright owner]
3293  *
3294  * CDDL HEADER END
3295  */
3296 /*
3297  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3298  *
3299  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3300  * Use is subject to license terms.
3301  */
3302 
3303 
3304 
3305 
3306 /*
3307  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
3308  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
3309  * Programming language - C.
3310  *
3311  * ISO  International Organization for Standardization.
3312  *
3313  * Programs/Modules should not directly include this file.  Access to the
3314  * types defined in this file should be through the inclusion of one of the
3315  * following files:
3316  *
3317  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
3318  *				components of <inttypes.h>.
3319  *
3320  *	<inttypes.h>		For use by applications.
3321  *
3322  * See these files for more details.
3323  */
3324 
3325 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3326 /*
3327  * CDDL HEADER START
3328  *
3329  * The contents of this file are subject to the terms of the
3330  * Common Development and Distribution License (the "License").
3331  * You may not use this file except in compliance with the License.
3332  *
3333  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3334  * or http://www.opensolaris.org/os/licensing.
3335  * See the License for the specific language governing permissions
3336  * and limitations under the License.
3337  *
3338  * When distributing Covered Code, include this CDDL HEADER in each
3339  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3340  * If applicable, add the following below this CDDL HEADER, with the
3341  * fields enclosed by brackets "[]" replaced with your own identifying
3342  * information: Portions Copyright [yyyy] [name of copyright owner]
3343  *
3344  * CDDL HEADER END
3345  */
3346 
3347 /*
3348  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3349  * Copyright 2016 Joyent, Inc.
3350  *
3351  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3352  * Use is subject to license terms.
3353  */
3354 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
3355 
3356 
3357 
3358 
3359 
3360 /*
3361  * Formatted I/O
3362  *
3363  * The following macros can be used even when an implementation has not
3364  * extended the printf/scanf family of functions.
3365  *
3366  * The form of the names of the macros is either "PRI" for printf specifiers
3367  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
3368  * followed by the datatype size. For example, PRId32 is the macro for
3369  * the printf d conversion specifier with the flags for 32 bit datatype.
3370  *
3371  * An example using one of these macros:
3372  *
3373  *	uint64_t u;
3374  *	printf("u = %016" PRIx64 "\n", u);
3375  *
3376  * For the purpose of example, the definitions of the printf/scanf macros
3377  * below have the values appropriate for a machine with 8 bit shorts, 16
3378  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
3379  * mode, and 64 bit long longs.
3380  */
3381 
3382 /*
3383  * fprintf macros for signed integers
3384  */
3385 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
3386 /*
3387  * fprintf macros for unsigned integers
3388  */
3389 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
3390 /*
3391  * fprintf macros for pointers
3392  */
3393 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
3394 /*
3395  * fscanf macros for signed integers
3396  */
3397 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
3398 /*
3399  * fscanf macros for unsigned integers
3400  */
3401 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
3402 /*
3403  * The following macros define I/O formats for intmax_t and uintmax_t.
3404  */
3405 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
3406 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
3407 
3408 
3409 
3410 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
3411 /*
3412  * CDDL HEADER START
3413  *
3414  * The contents of this file are subject to the terms of the
3415  * Common Development and Distribution License, Version 1.0 only
3416  * (the "License").  You may not use this file except in compliance
3417  * with the License.
3418  *
3419  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3420  * or http://www.opensolaris.org/os/licensing.
3421  * See the License for the specific language governing permissions
3422  * and limitations under the License.
3423  *
3424  * When distributing Covered Code, include this CDDL HEADER in each
3425  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3426  * If applicable, add the following below this CDDL HEADER, with the
3427  * fields enclosed by brackets "[]" replaced with your own identifying
3428  * information: Portions Copyright [yyyy] [name of copyright owner]
3429  *
3430  * CDDL HEADER END
3431  */
3432 /*
3433  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3434  * Use is subject to license terms.
3435  */
3436 
3437 
3438 
3439 
3440 #pragma ident "%Z%%M%	%I%	%E% SMI"
3441 
3442 /*
3443  * This header is included by <stdint.h> which was introduced by
3444  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
3445  * The header is a subset of the <inttypes.h> header.
3446  */
3447 
3448 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
3449 /*
3450  * CDDL HEADER START
3451  *
3452  * The contents of this file are subject to the terms of the
3453  * Common Development and Distribution License, Version 1.0 only
3454  * (the "License").  You may not use this file except in compliance
3455  * with the License.
3456  *
3457  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3458  * or http://www.opensolaris.org/os/licensing.
3459  * See the License for the specific language governing permissions
3460  * and limitations under the License.
3461  *
3462  * When distributing Covered Code, include this CDDL HEADER in each
3463  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3464  * If applicable, add the following below this CDDL HEADER, with the
3465  * fields enclosed by brackets "[]" replaced with your own identifying
3466  * information: Portions Copyright [yyyy] [name of copyright owner]
3467  *
3468  * CDDL HEADER END
3469  */
3470 /*
3471  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3472  *
3473  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3474  * Use is subject to license terms.
3475  */
3476 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
3477 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
3478 /*
3479  * CDDL HEADER START
3480  *
3481  * The contents of this file are subject to the terms of the
3482  * Common Development and Distribution License, Version 1.0 only
3483  * (the "License").  You may not use this file except in compliance
3484  * with the License.
3485  *
3486  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3487  * or http://www.opensolaris.org/os/licensing.
3488  * See the License for the specific language governing permissions
3489  * and limitations under the License.
3490  *
3491  * When distributing Covered Code, include this CDDL HEADER in each
3492  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3493  * If applicable, add the following below this CDDL HEADER, with the
3494  * fields enclosed by brackets "[]" replaced with your own identifying
3495  * information: Portions Copyright [yyyy] [name of copyright owner]
3496  *
3497  * CDDL HEADER END
3498  */
3499 /*
3500  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3501  *
3502  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3503  * Use is subject to license terms.
3504  */
3505 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
3506 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
3507 /*
3508  * CDDL HEADER START
3509  *
3510  * The contents of this file are subject to the terms of the
3511  * Common Development and Distribution License, Version 1.0 only
3512  * (the "License").  You may not use this file except in compliance
3513  * with the License.
3514  *
3515  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3516  * or http://www.opensolaris.org/os/licensing.
3517  * See the License for the specific language governing permissions
3518  * and limitations under the License.
3519  *
3520  * When distributing Covered Code, include this CDDL HEADER in each
3521  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3522  * If applicable, add the following below this CDDL HEADER, with the
3523  * fields enclosed by brackets "[]" replaced with your own identifying
3524  * information: Portions Copyright [yyyy] [name of copyright owner]
3525  *
3526  * CDDL HEADER END
3527  */
3528 /*
3529  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3530  *
3531  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3532  * Use is subject to license terms.
3533  */
3534 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
3535 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
3536 
3537 
3538 
3539 
3540 
3541 
3542 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
3543 
3544 /*
3545  * wchar_t is a built-in type in standard C++ and as such is not
3546  * defined here when using standard C++. However, the GNU compiler
3547  * fixincludes utility nonetheless creates its own version of this
3548  * header for use by gcc and g++. In that version it adds a redundant
3549  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
3550  * header we need to include the following magic comment:
3551  *
3552  * we must use the C++ compiler's type
3553  *
3554  * The above comment should not be removed or changed until GNU
3555  * gcc/fixinc/inclhack.def is updated to bypass this header.
3556  */
3557 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
3558 typedef struct {
3559  intmax_t quot;
3560  intmax_t rem;
3561 } imaxdiv_t;
3562 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
3563 extern intmax_t imaxabs(intmax_t);
3564 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
3565 extern intmax_t strtoimax(const char *, char **,
3566  int);
3567 extern uintmax_t strtoumax(const char *, char **,
3568  int);
3569 extern intmax_t wcstoimax(const wchar_t *,
3570  wchar_t **, int);
3571 extern uintmax_t wcstoumax(const wchar_t *,
3572  wchar_t **, int);
3573 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
3574 extern uint32_t arc4random(void);
3575 extern void arc4random_buf(void *, size_t);
3576 extern uint32_t arc4random_uniform(uint32_t);
3577 extern void freezero(void *, size_t);
3578 extern void *recallocarray(void *, size_t, size_t, size_t);
3579 # 32 "check.c" 2
3580 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
3581 /*
3582  * CDDL HEADER START
3583  *
3584  * The contents of this file are subject to the terms of the
3585  * Common Development and Distribution License (the "License").
3586  * You may not use this file except in compliance with the License.
3587  *
3588  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3589  * or http://www.opensolaris.org/os/licensing.
3590  * See the License for the specific language governing permissions
3591  * and limitations under the License.
3592  *
3593  * When distributing Covered Code, include this CDDL HEADER in each
3594  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3595  * If applicable, add the following below this CDDL HEADER, with the
3596  * fields enclosed by brackets "[]" replaced with your own identifying
3597  * information: Portions Copyright [yyyy] [name of copyright owner]
3598  *
3599  * CDDL HEADER END
3600  */
3601 
3602 /*
3603  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3604  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
3605  */
3606 
3607 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
3608 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
3609 /*	All Rights Reserved	*/
3610 
3611 
3612 
3613 
3614 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3615 /*
3616  * CDDL HEADER START
3617  *
3618  * The contents of this file are subject to the terms of the
3619  * Common Development and Distribution License (the "License").
3620  * You may not use this file except in compliance with the License.
3621  *
3622  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3623  * or http://www.opensolaris.org/os/licensing.
3624  * See the License for the specific language governing permissions
3625  * and limitations under the License.
3626  *
3627  * When distributing Covered Code, include this CDDL HEADER in each
3628  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3629  * If applicable, add the following below this CDDL HEADER, with the
3630  * fields enclosed by brackets "[]" replaced with your own identifying
3631  * information: Portions Copyright [yyyy] [name of copyright owner]
3632  *
3633  * CDDL HEADER END
3634  */
3635 
3636 /*
3637  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3638  * Copyright 2016 Joyent, Inc.
3639  *
3640  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3641  * Use is subject to license terms.
3642  */
3643 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
3644 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3645 /*
3646  * CDDL HEADER START
3647  *
3648  * The contents of this file are subject to the terms of the
3649  * Common Development and Distribution License (the "License").
3650  * You may not use this file except in compliance with the License.
3651  *
3652  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3653  * or http://www.opensolaris.org/os/licensing.
3654  * See the License for the specific language governing permissions
3655  * and limitations under the License.
3656  *
3657  * When distributing Covered Code, include this CDDL HEADER in each
3658  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3659  * If applicable, add the following below this CDDL HEADER, with the
3660  * fields enclosed by brackets "[]" replaced with your own identifying
3661  * information: Portions Copyright [yyyy] [name of copyright owner]
3662  *
3663  * CDDL HEADER END
3664  */
3665 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3666 /*	  All Rights Reserved  	*/
3667 
3668 
3669 /*
3670  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3671  * Use is subject to license terms.
3672  *
3673  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3674  * Copyright 2016 Joyent, Inc.
3675  */
3676 
3677 
3678 
3679 
3680 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3681 /*
3682  * CDDL HEADER START
3683  *
3684  * The contents of this file are subject to the terms of the
3685  * Common Development and Distribution License (the "License").
3686  * You may not use this file except in compliance with the License.
3687  *
3688  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3689  * or http://www.opensolaris.org/os/licensing.
3690  * See the License for the specific language governing permissions
3691  * and limitations under the License.
3692  *
3693  * When distributing Covered Code, include this CDDL HEADER in each
3694  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3695  * If applicable, add the following below this CDDL HEADER, with the
3696  * fields enclosed by brackets "[]" replaced with your own identifying
3697  * information: Portions Copyright [yyyy] [name of copyright owner]
3698  *
3699  * CDDL HEADER END
3700  */
3701 
3702 /*
3703  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3704  * Copyright 2016 Joyent, Inc.
3705  *
3706  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3707  * Use is subject to license terms.
3708  */
3709 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3710 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
3711 /*
3712  * CDDL HEADER START
3713  *
3714  * The contents of this file are subject to the terms of the
3715  * Common Development and Distribution License (the "License").
3716  * You may not use this file except in compliance with the License.
3717  *
3718  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3719  * or http://www.opensolaris.org/os/licensing.
3720  * See the License for the specific language governing permissions
3721  * and limitations under the License.
3722  *
3723  *
3724  * When distributing Covered Code, include this CDDL HEADER in each
3725  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3726  * If applicable, add the following below this CDDL HEADER, with the
3727  * fields enclosed by brackets "[]" replaced with your own identifying
3728  * information: Portions Copyright [yyyy] [name of copyright owner]
3729  *
3730  * CDDL HEADER END
3731  */
3732 
3733 /*
3734  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3735  * Use is subject to license terms.
3736  * Copyright 2016 Joyent, Inc.
3737  */
3738 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3739 
3740 /*
3741  * Machine dependent definitions moved to <sys/machtypes.h>.
3742  */
3743 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
3744 /*
3745  * CDDL HEADER START
3746  *
3747  * The contents of this file are subject to the terms of the
3748  * Common Development and Distribution License, Version 1.0 only
3749  * (the "License").  You may not use this file except in compliance
3750  * with the License.
3751  *
3752  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3753  * or http://www.opensolaris.org/os/licensing.
3754  * See the License for the specific language governing permissions
3755  * and limitations under the License.
3756  *
3757  * When distributing Covered Code, include this CDDL HEADER in each
3758  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3759  * If applicable, add the following below this CDDL HEADER, with the
3760  * fields enclosed by brackets "[]" replaced with your own identifying
3761  * information: Portions Copyright [yyyy] [name of copyright owner]
3762  *
3763  * CDDL HEADER END
3764  */
3765 /*
3766  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3767  * Use is subject to license terms.
3768  */
3769 
3770 
3771 
3772 
3773 #pragma ident "%Z%%M%	%I%	%E% SMI"
3774 
3775 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3776 /*
3777  * CDDL HEADER START
3778  *
3779  * The contents of this file are subject to the terms of the
3780  * Common Development and Distribution License (the "License").
3781  * You may not use this file except in compliance with the License.
3782  *
3783  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3784  * or http://www.opensolaris.org/os/licensing.
3785  * See the License for the specific language governing permissions
3786  * and limitations under the License.
3787  *
3788  * When distributing Covered Code, include this CDDL HEADER in each
3789  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3790  * If applicable, add the following below this CDDL HEADER, with the
3791  * fields enclosed by brackets "[]" replaced with your own identifying
3792  * information: Portions Copyright [yyyy] [name of copyright owner]
3793  *
3794  * CDDL HEADER END
3795  */
3796 
3797 /*
3798  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3799  * Copyright 2016 Joyent, Inc.
3800  *
3801  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3802  * Use is subject to license terms.
3803  */
3804 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
3805 
3806 
3807 
3808 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
3809 /*
3810  * CDDL HEADER START
3811  *
3812  * The contents of this file are subject to the terms of the
3813  * Common Development and Distribution License (the "License").
3814  * You may not use this file except in compliance with the License.
3815  *
3816  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3817  * or http://www.opensolaris.org/os/licensing.
3818  * See the License for the specific language governing permissions
3819  * and limitations under the License.
3820  *
3821  * When distributing Covered Code, include this CDDL HEADER in each
3822  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3823  * If applicable, add the following below this CDDL HEADER, with the
3824  * fields enclosed by brackets "[]" replaced with your own identifying
3825  * information: Portions Copyright [yyyy] [name of copyright owner]
3826  *
3827  * CDDL HEADER END
3828  */
3829 /*
3830  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3831  * Use is subject to license terms.
3832  */
3833 
3834 
3835 
3836 
3837 #pragma ident "%Z%%M%	%I%	%E% SMI"
3838 
3839 
3840 
3841 
3842 
3843 /*
3844  * Machine dependent types:
3845  *
3846  *	intel ia32 Version
3847  */
3848 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
3849 typedef struct _label_t { long val[6]; } label_t;
3850 
3851 
3852 
3853 typedef unsigned char lock_t; /* lock work for busy wait */
3854 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
3855 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3856 
3857 /*
3858  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
3859  * committee's working draft for the revision of the current ISO C standard,
3860  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
3861  * required by any standard but constitute a useful, general purpose set
3862  * of type definitions which is namespace clean with respect to all standards.
3863  */
3864 
3865 
3866 
3867 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
3868 /*
3869  * CDDL HEADER START
3870  *
3871  * The contents of this file are subject to the terms of the
3872  * Common Development and Distribution License, Version 1.0 only
3873  * (the "License").  You may not use this file except in compliance
3874  * with the License.
3875  *
3876  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3877  * or http://www.opensolaris.org/os/licensing.
3878  * See the License for the specific language governing permissions
3879  * and limitations under the License.
3880  *
3881  * When distributing Covered Code, include this CDDL HEADER in each
3882  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3883  * If applicable, add the following below this CDDL HEADER, with the
3884  * fields enclosed by brackets "[]" replaced with your own identifying
3885  * information: Portions Copyright [yyyy] [name of copyright owner]
3886  *
3887  * CDDL HEADER END
3888  */
3889 /*
3890  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3891  *
3892  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3893  * Use is subject to license terms.
3894  */
3895 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3896 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3897 /*
3898  * Strictly conforming ANSI C environments prior to the 1999
3899  * revision of the C Standard (ISO/IEC 9899:1999) do not have
3900  * the long long data type.
3901  */
3902 
3903 typedef long long longlong_t;
3904 typedef unsigned long long u_longlong_t;
3905 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3906 /*
3907  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
3908  * to use them instead of int32_t and uint32_t because DEC had
3909  * shipped 64-bit wide.
3910  */
3911 
3912 
3913 
3914 
3915 typedef long t_scalar_t; /* historical versions */
3916 typedef unsigned long t_uscalar_t;
3917 
3918 
3919 /*
3920  * POSIX Extensions
3921  */
3922 typedef unsigned char uchar_t;
3923 typedef unsigned short ushort_t;
3924 typedef unsigned int uint_t;
3925 typedef unsigned long ulong_t;
3926 
3927 typedef char *caddr_t; /* ?<core address> type */
3928 typedef long daddr_t; /* <disk address> type */
3929 typedef short cnt_t; /* ?<count> type */
3930 
3931 
3932 
3933 
3934 
3935 
3936 typedef int ptrdiff_t; /* (historical version) */
3937 
3938 
3939 
3940 /*
3941  * VM-related types
3942  */
3943 typedef ulong_t pfn_t; /* page frame number */
3944 typedef ulong_t pgcnt_t; /* number of pages */
3945 typedef long spgcnt_t; /* signed number of pages */
3946 
3947 typedef uchar_t use_t; /* use count for swap.  */
3948 typedef short sysid_t;
3949 typedef short index_t;
3950 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
3951 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
3952 
3953 /*
3954  * The size of off_t and related types depends on the setting of
3955  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
3956  * related to those defined here.)
3957  *
3958  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
3959  * explicitly 64 bits wide become available.
3960  */
3961 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3962 typedef u_longlong_t ino_t; /* expanded inode type	*/
3963 typedef longlong_t blkcnt_t; /* count of file blocks */
3964 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
3965 typedef u_longlong_t fsfilcnt_t; /* count of files */
3966 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3967 typedef u_longlong_t ino64_t; /* expanded inode type	*/
3968 typedef longlong_t blkcnt64_t; /* count of file blocks */
3969 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
3970 typedef u_longlong_t fsfilcnt64_t; /* count of files */
3971 
3972 
3973 
3974 
3975 
3976 
3977 typedef long blksize_t; /* used for block sizes */
3978 
3979 
3980 
3981 
3982 
3983 typedef enum { B_FALSE, B_TRUE } boolean_t;
3984 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3985 /*
3986  * The {u,}pad64_t types can be used in structures such that those structures
3987  * may be accessed by code produced by compilation environments which don't
3988  * support a 64 bit integral datatype.  The intention is not to allow
3989  * use of these fields in such environments, but to maintain the alignment
3990  * and offsets of the structure.
3991  *
3992  * Similar comments for {u,}pad128_t.
3993  *
3994  * Note that these types do NOT generate any stronger alignment constraints
3995  * than those available in the underlying ABI.  See <sys/isa_defs.h>
3996  */
3997 
3998 typedef int64_t pad64_t;
3999 typedef uint64_t upad64_t;
4000 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4001 typedef union {
4002  long double _q;
4003  int32_t _l[4];
4004 } pad128_t;
4005 
4006 typedef union {
4007  long double _q;
4008  uint32_t _l[4];
4009 } upad128_t;
4010 
4011 typedef longlong_t offset_t;
4012 typedef u_longlong_t u_offset_t;
4013 typedef u_longlong_t len_t;
4014 typedef u_longlong_t diskaddr_t;
4015 
4016 
4017 
4018 
4019 /*
4020  * Definitions remaining from previous partial support for 64-bit file
4021  * offsets.  This partial support for devices greater than 2gb requires
4022  * compiler support for long long.
4023  */
4024 
4025 typedef union {
4026  offset_t _f; /* Full 64 bit offset value */
4027  struct {
4028   int32_t _l; /* lower 32 bits of offset value */
4029   int32_t _u; /* upper 32 bits of offset value */
4030  } _p;
4031 } lloff_t;
4032 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4033 typedef union {
4034  longlong_t _f; /* Full 64 bit disk address value */
4035  struct {
4036   int32_t _l; /* lower 32 bits of disk address value */
4037   int32_t _u; /* upper 32 bits of disk address value */
4038  } _p;
4039 } lldaddr_t;
4040 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4041 typedef uint_t k_fltset_t; /* kernel fault set type */
4042 
4043 /*
4044  * The following type is for various kinds of identifiers.  The
4045  * actual type must be the same for all since some system calls
4046  * (such as sigsend) take arguments that may be any of these
4047  * types.  The enumeration type idtype_t defined in sys/procset.h
4048  * is used to indicate what type of id is being specified --
4049  * a process id, process group id, session id, scheduling class id,
4050  * user id, group id, project id, task id or zone id.
4051  */
4052 
4053 
4054 
4055 typedef long id_t; /* (historical version) */
4056 
4057 
4058 typedef id_t lgrp_id_t; /* lgroup ID */
4059 
4060 /*
4061  * Type useconds_t is an unsigned integral type capable of storing
4062  * values at least in the range of zero to 1,000,000.
4063  */
4064 typedef uint_t useconds_t; /* Time, in microseconds */
4065 
4066 
4067 
4068 typedef long suseconds_t; /* signed # of microseconds */
4069 
4070 
4071 /*
4072  * Typedefs for dev_t components.
4073  */
4074 
4075 
4076 
4077 
4078 typedef ulong_t major_t; /* (historical version) */
4079 typedef ulong_t minor_t; /* (historical version) */
4080 
4081 
4082 /*
4083  * The data type of a thread priority.
4084  */
4085 typedef short pri_t;
4086 
4087 /*
4088  * The data type for a CPU flags field.  (Can be extended to larger unsigned
4089  * types, if needed, limited by ability to update atomically.)
4090  */
4091 typedef ushort_t cpu_flag_t;
4092 
4093 /*
4094  * For compatibility reasons the following typedefs (prefixed o_)
4095  * can't grow regardless of the EFT definition. Although,
4096  * applications should not explicitly use these typedefs
4097  * they may be included via a system header definition.
4098  * WARNING: These typedefs may be removed in a future
4099  * release.
4100  *		ex. the definitions in s5inode.h (now obsoleted)
4101  *			remained small to preserve compatibility
4102  *			in the S5 file system type.
4103  */
4104 typedef ushort_t o_mode_t; /* old file attribute type */
4105 typedef short o_dev_t; /* old device type	*/
4106 typedef ushort_t o_uid_t; /* old UID type		*/
4107 typedef o_uid_t o_gid_t; /* old GID type		*/
4108 typedef short o_nlink_t; /* old file link type	*/
4109 typedef short o_pid_t; /* old process id type	*/
4110 typedef ushort_t o_ino_t; /* old inode type	*/
4111 
4112 
4113 /*
4114  * POSIX and XOPEN Declarations
4115  */
4116 typedef int key_t; /* IPC key type		*/
4117 
4118 
4119 
4120 typedef ulong_t mode_t; /* (historical version) */
4121 
4122 
4123 
4124 
4125 
4126 
4127 
4128 typedef uid_t gid_t; /* GID type		*/
4129 
4130 typedef uint32_t datalink_id_t;
4131 typedef uint32_t vrid_t;
4132 
4133 typedef id_t taskid_t;
4134 typedef id_t projid_t;
4135 typedef id_t poolid_t;
4136 typedef id_t zoneid_t;
4137 typedef id_t ctid_t;
4138 
4139 /*
4140  * POSIX definitions are same as defined in thread.h and synch.h.
4141  * Any changes made to here should be reflected in corresponding
4142  * files as described in comments.
4143  */
4144 typedef uint_t pthread_t; /* = thread_t in thread.h */
4145 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
4146 
4147 /* "Magic numbers" tagging synchronization object types */
4148 
4149 
4150 
4151 
4152 
4153 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
4154  struct {
4155   uint16_t __pthread_mutex_flag1;
4156   uint8_t __pthread_mutex_flag2;
4157   uint8_t __pthread_mutex_ceiling;
4158   uint16_t __pthread_mutex_type;
4159   uint16_t __pthread_mutex_magic;
4160  } __pthread_mutex_flags;
4161  union {
4162   struct {
4163    uint8_t __pthread_mutex_pad[8];
4164   } __pthread_mutex_lock64;
4165   struct {
4166    uint32_t __pthread_ownerpid;
4167    uint32_t __pthread_lockword;
4168   } __pthread_mutex_lock32;
4169   upad64_t __pthread_mutex_owner64;
4170  } __pthread_mutex_lock;
4171  upad64_t __pthread_mutex_data;
4172 } pthread_mutex_t;
4173 
4174 typedef struct _pthread_cond { /* = cond_t in synch.h */
4175  struct {
4176   uint8_t __pthread_cond_flag[4];
4177   uint16_t __pthread_cond_type;
4178   uint16_t __pthread_cond_magic;
4179  } __pthread_cond_flags;
4180  upad64_t __pthread_cond_data;
4181 } pthread_cond_t;
4182 
4183 /*
4184  * UNIX 98 Extension
4185  */
4186 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
4187  int32_t __pthread_rwlock_readers;
4188  uint16_t __pthread_rwlock_type;
4189  uint16_t __pthread_rwlock_magic;
4190  pthread_mutex_t __pthread_rwlock_mutex;
4191  pthread_cond_t __pthread_rwlock_readercv;
4192  pthread_cond_t __pthread_rwlock_writercv;
4193 } pthread_rwlock_t;
4194 
4195 /*
4196  * SUSV3
4197  */
4198 typedef struct {
4199  uint32_t __pthread_barrier_count;
4200  uint32_t __pthread_barrier_current;
4201  upad64_t __pthread_barrier_cycle;
4202  upad64_t __pthread_barrier_reserved;
4203  pthread_mutex_t __pthread_barrier_lock;
4204  pthread_cond_t __pthread_barrier_cond;
4205 } pthread_barrier_t;
4206 
4207 typedef pthread_mutex_t pthread_spinlock_t;
4208 
4209 /*
4210  * attributes for threads, dynamically allocated by library
4211  */
4212 typedef struct _pthread_attr {
4213  void *__pthread_attrp;
4214 } pthread_attr_t;
4215 
4216 /*
4217  * attributes for mutex, dynamically allocated by library
4218  */
4219 typedef struct _pthread_mutexattr {
4220  void *__pthread_mutexattrp;
4221 } pthread_mutexattr_t;
4222 
4223 /*
4224  * attributes for cond, dynamically allocated by library
4225  */
4226 typedef struct _pthread_condattr {
4227  void *__pthread_condattrp;
4228 } pthread_condattr_t;
4229 
4230 /*
4231  * pthread_once
4232  */
4233 typedef struct _once {
4234  upad64_t __pthread_once_pad[4];
4235 } pthread_once_t;
4236 
4237 /*
4238  * UNIX 98 Extensions
4239  * attributes for rwlock, dynamically allocated by library
4240  */
4241 typedef struct _pthread_rwlockattr {
4242  void *__pthread_rwlockattrp;
4243 } pthread_rwlockattr_t;
4244 
4245 /*
4246  * SUSV3
4247  * attributes for pthread_barrier_t, dynamically allocated by library
4248  */
4249 typedef struct {
4250  void *__pthread_barrierattrp;
4251 } pthread_barrierattr_t;
4252 
4253 typedef ulong_t dev_t; /* expanded device type */
4254 
4255 
4256 
4257 
4258 
4259 typedef ulong_t nlink_t; /* (historical version) */
4260 typedef long pid_t; /* (historical version) */
4261 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4262 typedef long time_t; /* time of day in seconds */
4263 # 547 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4264 typedef int clockid_t; /* clock identifier type */
4265 
4266 
4267 
4268 
4269 typedef int timer_t; /* timer identifier type */
4270 
4271 
4272 
4273 
4274 /* BEGIN CSTYLED */
4275 typedef unsigned char unchar;
4276 typedef unsigned short ushort;
4277 typedef unsigned int uint;
4278 typedef unsigned long ulong;
4279 /* END CSTYLED */
4280 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4281 /*
4282  * The following is the value of type id_t to use to indicate the
4283  * caller's current id.  See procset.h for the type idtype_t
4284  * which defines which kind of id is being specified.
4285  */
4286 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
4287 /*
4288  * The following value of type pfn_t is used to indicate
4289  * invalid page frame number.
4290  */
4291 
4292 
4293 
4294 /* BEGIN CSTYLED */
4295 typedef unsigned char u_char;
4296 typedef unsigned short u_short;
4297 typedef unsigned int u_int;
4298 typedef unsigned long u_long;
4299 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
4300 typedef quad_t quad; /* used by UFS */
4301 /* END CSTYLED */
4302 
4303 /*
4304  * Nested include for BSD/sockets source compatibility.
4305  * (The select macros used to be defined here).
4306  */
4307 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
4308 /*
4309  * CDDL HEADER START
4310  *
4311  * The contents of this file are subject to the terms of the
4312  * Common Development and Distribution License (the "License").
4313  * You may not use this file except in compliance with the License.
4314  *
4315  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4316  * or http://www.opensolaris.org/os/licensing.
4317  * See the License for the specific language governing permissions
4318  * and limitations under the License.
4319  *
4320  * When distributing Covered Code, include this CDDL HEADER in each
4321  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4322  * If applicable, add the following below this CDDL HEADER, with the
4323  * fields enclosed by brackets "[]" replaced with your own identifying
4324  * information: Portions Copyright [yyyy] [name of copyright owner]
4325  *
4326  * CDDL HEADER END
4327  */
4328 
4329 /*
4330  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4331  *
4332  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4333  *
4334  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4335  * Use is subject to license terms.
4336  */
4337 
4338 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4339 /*	  All Rights Reserved	*/
4340 
4341 /*
4342  * University Copyright- Copyright (c) 1982, 1986, 1988
4343  * The Regents of the University of California
4344  * All Rights Reserved
4345  *
4346  * University Acknowledgment- Portions of this document are derived from
4347  * software developed by the University of California, Berkeley, and its
4348  * contributors.
4349  */
4350 
4351 
4352 
4353 
4354 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4355 /*
4356  * CDDL HEADER START
4357  *
4358  * The contents of this file are subject to the terms of the
4359  * Common Development and Distribution License (the "License").
4360  * You may not use this file except in compliance with the License.
4361  *
4362  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4363  * or http://www.opensolaris.org/os/licensing.
4364  * See the License for the specific language governing permissions
4365  * and limitations under the License.
4366  *
4367  * When distributing Covered Code, include this CDDL HEADER in each
4368  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4369  * If applicable, add the following below this CDDL HEADER, with the
4370  * fields enclosed by brackets "[]" replaced with your own identifying
4371  * information: Portions Copyright [yyyy] [name of copyright owner]
4372  *
4373  * CDDL HEADER END
4374  */
4375 
4376 /*
4377  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4378  * Copyright 2016 Joyent, Inc.
4379  *
4380  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4381  * Use is subject to license terms.
4382  */
4383 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
4384 
4385 
4386 
4387 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4388 /*
4389  * CDDL HEADER START
4390  *
4391  * The contents of this file are subject to the terms of the
4392  * Common Development and Distribution License, Version 1.0 only
4393  * (the "License").  You may not use this file except in compliance
4394  * with the License.
4395  *
4396  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4397  * or http://www.opensolaris.org/os/licensing.
4398  * See the License for the specific language governing permissions
4399  * and limitations under the License.
4400  *
4401  * When distributing Covered Code, include this CDDL HEADER in each
4402  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4403  * If applicable, add the following below this CDDL HEADER, with the
4404  * fields enclosed by brackets "[]" replaced with your own identifying
4405  * information: Portions Copyright [yyyy] [name of copyright owner]
4406  *
4407  * CDDL HEADER END
4408  */
4409 /*
4410  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4411  * Use is subject to license terms.
4412  */
4413 
4414 /*
4415  * Implementation-private.  This header should not be included
4416  * directly by an application.  The application should instead
4417  * include <time.h> which includes this header conditionally
4418  * depending on which feature test macros are defined. By default,
4419  * this header is included by <time.h>.  X/Open and POSIX
4420  * standards requirements result in this header being included
4421  * by <time.h> only under a restricted set of conditions.
4422  */
4423 
4424 
4425 
4426 
4427 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4428 /*
4429  * CDDL HEADER START
4430  *
4431  * The contents of this file are subject to the terms of the
4432  * Common Development and Distribution License (the "License").
4433  * You may not use this file except in compliance with the License.
4434  *
4435  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4436  * or http://www.opensolaris.org/os/licensing.
4437  * See the License for the specific language governing permissions
4438  * and limitations under the License.
4439  *
4440  * When distributing Covered Code, include this CDDL HEADER in each
4441  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4442  * If applicable, add the following below this CDDL HEADER, with the
4443  * fields enclosed by brackets "[]" replaced with your own identifying
4444  * information: Portions Copyright [yyyy] [name of copyright owner]
4445  *
4446  * CDDL HEADER END
4447  */
4448 
4449 /*
4450  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4451  * Copyright 2016 Joyent, Inc.
4452  *
4453  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4454  * Use is subject to license terms.
4455  */
4456 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
4457 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
4458 /*
4459  * Time expressed in seconds and nanoseconds
4460  */
4461 
4462 typedef struct timespec { /* definition per POSIX.4 */
4463  time_t tv_sec; /* seconds */
4464  long tv_nsec; /* and nanoseconds */
4465 } timespec_t;
4466 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
4467 typedef struct timespec timestruc_t; /* definition per SVr4 */
4468 
4469 /*
4470  * The following has been left in for backward compatibility. Portable
4471  * applications should not use the structure name timestruc.
4472  */
4473 
4474 
4475 
4476 
4477 
4478 /*
4479  * Timer specification
4480  */
4481 typedef struct itimerspec { /* definition per POSIX.4 */
4482  struct timespec it_interval; /* timer period */
4483  struct timespec it_value; /* timer expiration */
4484 } itimerspec_t;
4485 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
4486 
4487 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
4488 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4489 /*	  All Rights Reserved  	*/
4490 
4491 
4492 /*
4493  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
4494  * All rights reserved.  The Berkeley software License Agreement
4495  * specifies the terms and conditions for redistribution.
4496  */
4497 
4498 /*
4499  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4500  *
4501  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4502  * Use is subject to license terms.
4503  *
4504  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4505  */
4506 
4507 /*
4508  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
4509  */
4510 
4511 
4512 
4513 
4514 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4515 /*
4516  * CDDL HEADER START
4517  *
4518  * The contents of this file are subject to the terms of the
4519  * Common Development and Distribution License (the "License").
4520  * You may not use this file except in compliance with the License.
4521  *
4522  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4523  * or http://www.opensolaris.org/os/licensing.
4524  * See the License for the specific language governing permissions
4525  * and limitations under the License.
4526  *
4527  * When distributing Covered Code, include this CDDL HEADER in each
4528  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4529  * If applicable, add the following below this CDDL HEADER, with the
4530  * fields enclosed by brackets "[]" replaced with your own identifying
4531  * information: Portions Copyright [yyyy] [name of copyright owner]
4532  *
4533  * CDDL HEADER END
4534  */
4535 
4536 /*
4537  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4538  * Copyright 2016 Joyent, Inc.
4539  *
4540  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4541  * Use is subject to license terms.
4542  */
4543 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4544 
4545 /*
4546  * Structure returned by gettimeofday(2) system call,
4547  * and used in other calls.
4548  */
4549 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4550 struct timeval {
4551  time_t tv_sec; /* seconds */
4552  suseconds_t tv_usec; /* and microseconds */
4553 };
4554 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4555 struct timezone {
4556  int tz_minuteswest; /* minutes west of Greenwich */
4557  int tz_dsttime; /* type of dst correction */
4558 };
4559 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4560 /*
4561  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
4562  * including <sys/select.h> which relies on the presense of the itimerval
4563  * structure.
4564  */
4565 
4566 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4567 /*
4568  * CDDL HEADER START
4569  *
4570  * The contents of this file are subject to the terms of the
4571  * Common Development and Distribution License (the "License").
4572  * You may not use this file except in compliance with the License.
4573  *
4574  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4575  * or http://www.opensolaris.org/os/licensing.
4576  * See the License for the specific language governing permissions
4577  * and limitations under the License.
4578  *
4579  * When distributing Covered Code, include this CDDL HEADER in each
4580  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4581  * If applicable, add the following below this CDDL HEADER, with the
4582  * fields enclosed by brackets "[]" replaced with your own identifying
4583  * information: Portions Copyright [yyyy] [name of copyright owner]
4584  *
4585  * CDDL HEADER END
4586  */
4587 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4588 /*	  All Rights Reserved  	*/
4589 
4590 
4591 /*
4592  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4593  * Use is subject to license terms.
4594  *
4595  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4596  * Copyright 2016 Joyent, Inc.
4597  */
4598 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4599 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4600 /*
4601  * Operations on timevals.
4602  */
4603 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4604 /*
4605  * Names of the interval timers, and structure
4606  * defining a timer setting.
4607  */
4608 
4609 
4610 
4611     /* time and when system is running on */
4612     /* behalf of the process. */
4613 
4614     /* time profiling of multithreaded */
4615     /* programs. */
4616 
4617 
4618 struct itimerval {
4619  struct timeval it_interval; /* timer interval */
4620  struct timeval it_value; /* current value */
4621 };
4622 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4623 /*
4624  *	Definitions for commonly used resolutions.
4625  */
4626 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4627 /*
4628  * Time expressed as a 64-bit nanosecond counter.
4629  */
4630 typedef longlong_t hrtime_t;
4631 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4632 int adjtime(struct timeval *, struct timeval *);
4633 
4634 
4635 
4636 
4637 int futimesat(int, const char *, const struct timeval *);
4638 
4639 
4640 
4641 
4642 
4643 int getitimer(int, struct itimerval *);
4644 int utimes(const char *, const struct timeval *);
4645 
4646 
4647 
4648 
4649 int setitimer(int, struct itimerval *,
4650  struct itimerval *);
4651 
4652 
4653 
4654 
4655 /*
4656  * gettimeofday() and settimeofday() were included in SVr4 due to their
4657  * common use in BSD based applications.  They were to be included exactly
4658  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
4659  * parameter was unused and deleted it, thereby making a routine included
4660  * for compatibility, incompatible.
4661  *
4662  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
4663  * parameters.
4664  *
4665  * This has caused general disagreement in the application community as to
4666  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
4667  * The flag _SVID_GETTOD may be used to force the SVID version.
4668  */
4669 
4670 
4671 
4672 
4673 
4674 int settimeofday(struct timeval *, void *);
4675 
4676 hrtime_t gethrtime(void);
4677 hrtime_t gethrvtime(void);
4678 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4679 int gettimeofday(struct timeval *, void *);
4680 
4681 
4682 
4683 
4684 /*
4685  * The inclusion of <time.h> is historical and was added for
4686  * backward compatibility in delta 1.2 when a number of definitions
4687  * were moved out of <sys/time.h>.  More recently, the timespec and
4688  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
4689  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
4690  * which is now included by <time.h>.  This change was due to POSIX
4691  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
4692  * non-X/Open applications, including this header will still make
4693  * visible these definitions.
4694  */
4695 
4696 
4697 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
4698 /*
4699  * CDDL HEADER START
4700  *
4701  * The contents of this file are subject to the terms of the
4702  * Common Development and Distribution License (the "License").
4703  * You may not use this file except in compliance with the License.
4704  *
4705  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4706  * or http://www.opensolaris.org/os/licensing.
4707  * See the License for the specific language governing permissions
4708  * and limitations under the License.
4709  *
4710  * When distributing Covered Code, include this CDDL HEADER in each
4711  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4712  * If applicable, add the following below this CDDL HEADER, with the
4713  * fields enclosed by brackets "[]" replaced with your own identifying
4714  * information: Portions Copyright [yyyy] [name of copyright owner]
4715  *
4716  * CDDL HEADER END
4717  */
4718 /*	Copyright (c) 1988 AT&T	*/
4719 /*	  All Rights Reserved  	*/
4720 
4721 
4722 /*
4723  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4724  *
4725  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4726  * Use is subject to license terms.
4727  */
4728 /*
4729  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
4730  * Copyright 2016 Joyent, Inc.
4731  */
4732 
4733 
4734 
4735 
4736 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4737 /*
4738  * CDDL HEADER START
4739  *
4740  * The contents of this file are subject to the terms of the
4741  * Common Development and Distribution License (the "License").
4742  * You may not use this file except in compliance with the License.
4743  *
4744  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4745  * or http://www.opensolaris.org/os/licensing.
4746  * See the License for the specific language governing permissions
4747  * and limitations under the License.
4748  *
4749  * When distributing Covered Code, include this CDDL HEADER in each
4750  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4751  * If applicable, add the following below this CDDL HEADER, with the
4752  * fields enclosed by brackets "[]" replaced with your own identifying
4753  * information: Portions Copyright [yyyy] [name of copyright owner]
4754  *
4755  * CDDL HEADER END
4756  */
4757 
4758 /*
4759  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4760  * Copyright 2016 Joyent, Inc.
4761  *
4762  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4763  * Use is subject to license terms.
4764  */
4765 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4766 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
4767 /*
4768  * CDDL HEADER START
4769  *
4770  * The contents of this file are subject to the terms of the
4771  * Common Development and Distribution License, Version 1.0 only
4772  * (the "License").  You may not use this file except in compliance
4773  * with the License.
4774  *
4775  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4776  * or http://www.opensolaris.org/os/licensing.
4777  * See the License for the specific language governing permissions
4778  * and limitations under the License.
4779  *
4780  * When distributing Covered Code, include this CDDL HEADER in each
4781  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4782  * If applicable, add the following below this CDDL HEADER, with the
4783  * fields enclosed by brackets "[]" replaced with your own identifying
4784  * information: Portions Copyright [yyyy] [name of copyright owner]
4785  *
4786  * CDDL HEADER END
4787  */
4788 /*	Copyright (c) 1988 AT&T	*/
4789 /*	  All Rights Reserved  	*/
4790 
4791 /*
4792  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4793  * Copyright 2014 PALO, Richard.
4794  *
4795  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4796  * Use is subject to license terms.
4797  */
4798 
4799 /*
4800  * An application should not include this header directly.  Instead it
4801  * should be included only through the inclusion of other Sun headers.
4802  *
4803  * The contents of this header is limited to identifiers specified in the
4804  * C Standard.  Any new identifiers specified in future amendments to the
4805  * C Standard must be placed in this header.  If these new identifiers
4806  * are required to also be in the C++ Standard "std" namespace, then for
4807  * anything other than macro definitions, corresponding "using" directives
4808  * must also be added to <time.h.h>.
4809  */
4810 
4811 
4812 
4813 
4814 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4815 /*
4816  * CDDL HEADER START
4817  *
4818  * The contents of this file are subject to the terms of the
4819  * Common Development and Distribution License (the "License").
4820  * You may not use this file except in compliance with the License.
4821  *
4822  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4823  * or http://www.opensolaris.org/os/licensing.
4824  * See the License for the specific language governing permissions
4825  * and limitations under the License.
4826  *
4827  * When distributing Covered Code, include this CDDL HEADER in each
4828  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4829  * If applicable, add the following below this CDDL HEADER, with the
4830  * fields enclosed by brackets "[]" replaced with your own identifying
4831  * information: Portions Copyright [yyyy] [name of copyright owner]
4832  *
4833  * CDDL HEADER END
4834  */
4835 
4836 /*
4837  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4838  * Copyright 2016 Joyent, Inc.
4839  *
4840  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4841  * Use is subject to license terms.
4842  */
4843 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
4844 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
4845 /*
4846  * This file and its contents are supplied under the terms of the
4847  * Common Development and Distribution License ("CDDL"), version 1.0.
4848  * You may only use this file in accordance with the terms of version
4849  * 1.0 of the CDDL.
4850  *
4851  * A full copy of the text of the CDDL should have accompanied this
4852  * source.  A copy of the CDDL is also available via the Internet at
4853  * http://www.illumos.org/license/CDDL.
4854  */
4855 
4856 /*
4857  * Copyright 2014-2016 PALO, Richard.
4858  */
4859 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
4860 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
4861 struct tm { /* see ctime(3) */
4862  int tm_sec;
4863  int tm_min;
4864  int tm_hour;
4865  int tm_mday;
4866  int tm_mon;
4867  int tm_year;
4868  int tm_wday;
4869  int tm_yday;
4870  int tm_isdst;
4871 };
4872 
4873 
4874 extern char *asctime(const struct tm *);
4875 extern clock_t clock(void);
4876 extern char *ctime(const time_t *);
4877 extern double difftime(time_t, time_t);
4878 extern struct tm *gmtime(const time_t *);
4879 extern struct tm *localtime(const time_t *);
4880 extern time_t mktime(struct tm *);
4881 extern time_t time(time_t *);
4882 extern size_t strftime(char *, size_t, const char *,
4883  const struct tm *);
4884 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4885 /*
4886  * C11 requires sys/time_impl.h for the definition of the struct timespec.
4887  */
4888 
4889 
4890 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4891 /*
4892  * CDDL HEADER START
4893  *
4894  * The contents of this file are subject to the terms of the
4895  * Common Development and Distribution License (the "License").
4896  * You may not use this file except in compliance with the License.
4897  *
4898  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4899  * or http://www.opensolaris.org/os/licensing.
4900  * See the License for the specific language governing permissions
4901  * and limitations under the License.
4902  *
4903  * When distributing Covered Code, include this CDDL HEADER in each
4904  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4905  * If applicable, add the following below this CDDL HEADER, with the
4906  * fields enclosed by brackets "[]" replaced with your own identifying
4907  * information: Portions Copyright [yyyy] [name of copyright owner]
4908  *
4909  * CDDL HEADER END
4910  */
4911 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4912 /*	  All Rights Reserved  	*/
4913 
4914 
4915 /*
4916  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4917  * Use is subject to license terms.
4918  *
4919  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4920  * Copyright 2016 Joyent, Inc.
4921  */
4922 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4923 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4924 /*
4925  * CDDL HEADER START
4926  *
4927  * The contents of this file are subject to the terms of the
4928  * Common Development and Distribution License, Version 1.0 only
4929  * (the "License").  You may not use this file except in compliance
4930  * with the License.
4931  *
4932  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4933  * or http://www.opensolaris.org/os/licensing.
4934  * See the License for the specific language governing permissions
4935  * and limitations under the License.
4936  *
4937  * When distributing Covered Code, include this CDDL HEADER in each
4938  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4939  * If applicable, add the following below this CDDL HEADER, with the
4940  * fields enclosed by brackets "[]" replaced with your own identifying
4941  * information: Portions Copyright [yyyy] [name of copyright owner]
4942  *
4943  * CDDL HEADER END
4944  */
4945 /*
4946  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4947  * Use is subject to license terms.
4948  */
4949 
4950 /*
4951  * Implementation-private.  This header should not be included
4952  * directly by an application.  The application should instead
4953  * include <time.h> which includes this header conditionally
4954  * depending on which feature test macros are defined. By default,
4955  * this header is included by <time.h>.  X/Open and POSIX
4956  * standards requirements result in this header being included
4957  * by <time.h> only under a restricted set of conditions.
4958  */
4959 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4960 
4961 
4962 /*
4963  * Allow global visibility for symbols defined in
4964  * C++ "std" namespace in <iso/time_iso.h>.
4965  */
4966 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
4967 extern struct tm *gmtime_r(const time_t *,
4968    struct tm *);
4969 extern struct tm *localtime_r(const time_t *,
4970    struct tm *);
4971 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
4972 extern char *strptime(const char *, const char *,
4973   struct tm *);
4974 
4975 
4976 
4977 
4978 
4979 /*
4980  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
4981  * definition of the sigevent structure.  Both require the inclusion
4982  * of <signal.h> and <time.h> when using the timer_create() function.
4983  * However, X/Open also specifies that the sigevent structure be defined
4984  * in <time.h> as described in the header <signal.h>.  This prevents
4985  * compiler warnings for applications that only include <time.h> and not
4986  * also <signal.h>.  The sigval union and the sigevent structure is
4987  * therefore defined both here and in <sys/siginfo.h> which gets included
4988  * via inclusion of <signal.h>.
4989  */
4990 
4991 
4992 union sigval {
4993  int sival_int; /* integer value */
4994  void *sival_ptr; /* pointer value */
4995 };
4996 
4997 
4998 
4999 
5000 struct sigevent {
5001  int sigev_notify; /* notification mode */
5002  int sigev_signo; /* signal number */
5003  union sigval sigev_value; /* signal value */
5004  void (*sigev_notify_function)(union sigval);
5005  pthread_attr_t *sigev_notify_attributes;
5006  int __sigev_pad2;
5007 };
5008 
5009 
5010 extern int clock_getres(clockid_t, struct timespec *);
5011 extern int clock_gettime(clockid_t, struct timespec *);
5012 extern int clock_settime(clockid_t, const struct timespec *);
5013 extern int timer_create(clockid_t, struct sigevent *,
5014   timer_t *);
5015 extern int timer_delete(timer_t);
5016 extern int timer_getoverrun(timer_t);
5017 extern int timer_gettime(timer_t, struct itimerspec *);
5018 extern int timer_settime(timer_t, int, const struct itimerspec *,
5019   struct itimerspec *);
5020 
5021 extern int nanosleep(const struct timespec *, struct timespec *);
5022 extern int clock_nanosleep(clockid_t, int,
5023  const struct timespec *, struct timespec *);
5024 
5025 
5026 
5027 
5028 
5029 
5030 extern void tzset(void);
5031 extern char *tzname[2];
5032 
5033 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
5034 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
5035 extern long timezone;
5036 extern int daylight;
5037 
5038 
5039 
5040 
5041 
5042 
5043 extern time_t timegm(struct tm *);
5044 extern int cftime(char *, char *, const time_t *);
5045 extern int ascftime(char *, const char *, const struct tm *);
5046 extern long altzone;
5047 
5048 
5049 
5050 
5051 extern struct tm *getdate(const char *);
5052 
5053 
5054 
5055 
5056 
5057 extern int getdate_err;
5058 
5059 
5060 
5061 /*
5062  * ctime_r() & asctime_r() prototypes are defined here.
5063  */
5064 
5065 /*
5066  * Previous releases of Solaris, starting at 2.3, provided definitions of
5067  * various functions as specified in POSIX.1c, Draft 6.  For some of these
5068  * functions, the final POSIX 1003.1c standard had a different number of
5069  * arguments and return values.
5070  *
5071  * The following segment of this header provides support for the standard
5072  * interfaces while supporting applications written under earlier
5073  * releases.  The application defines appropriate values of the feature
5074  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
5075  * whether it was written to expect the Draft 6 or standard versions of
5076  * these interfaces, before including this header.  This header then
5077  * provides a mapping from the source version of the interface to an
5078  * appropriate binary interface.  Such mappings permit an application
5079  * to be built from libraries and objects which have mixed expectations
5080  * of the definitions of these functions.
5081  *
5082  * For applications using the Draft 6 definitions, the binary symbol is the
5083  * same as the source symbol, and no explicit mapping is needed.  For the
5084  * standard interface, the function func() is mapped to the binary symbol
5085  * _posix_func().  The preferred mechanism for the remapping is a compiler
5086  * #pragma.  If the compiler does not provide such a #pragma, the header file
5087  * defines a static function func() which calls the _posix_func() version;
5088  * this has to be done instead of #define since POSIX specifies that an
5089  * application can #undef the symbol and still be bound to the correct
5090  * implementation.  Unfortunately, the statics confuse lint so we fallback to
5091  * #define in that case.
5092  *
5093  * NOTE: Support for the Draft 6 definitions is provided for compatibility
5094  * only.  New applications/libraries should use the standard definitions.
5095  */
5096 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
5097 extern char *asctime_r(const struct tm *, char *, int);
5098 extern char *ctime_r(const time_t *, char *, int);
5099 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
5100 extern size_t strftime_l(char *, size_t,
5101  const char *, const struct tm *, locale_t);
5102 
5103 
5104 
5105 
5106 
5107 /*
5108  * Note, the C11 standard requires that all the various base values that are
5109  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
5110  */
5111 
5112 
5113 extern int timespec_get(struct timespec *, int);
5114 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
5115 
5116 
5117 /*
5118  * The inclusion of <sys/select.h> is needed for the FD_CLR,
5119  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
5120  * select() prototype defined in the XOpen specifications
5121  * beginning with XSH4v2.  Placement required after definition
5122  * for itimerval.
5123  */
5124 
5125 
5126 
5127 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
5128 /*
5129  * CDDL HEADER START
5130  *
5131  * The contents of this file are subject to the terms of the
5132  * Common Development and Distribution License (the "License").
5133  * You may not use this file except in compliance with the License.
5134  *
5135  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5136  * or http://www.opensolaris.org/os/licensing.
5137  * See the License for the specific language governing permissions
5138  * and limitations under the License.
5139  *
5140  * When distributing Covered Code, include this CDDL HEADER in each
5141  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5142  * If applicable, add the following below this CDDL HEADER, with the
5143  * fields enclosed by brackets "[]" replaced with your own identifying
5144  * information: Portions Copyright [yyyy] [name of copyright owner]
5145  *
5146  * CDDL HEADER END
5147  */
5148 
5149 /*
5150  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5151  *
5152  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
5153  *
5154  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
5155  * Use is subject to license terms.
5156  */
5157 
5158 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5159 /*	  All Rights Reserved	*/
5160 
5161 /*
5162  * University Copyright- Copyright (c) 1982, 1986, 1988
5163  * The Regents of the University of California
5164  * All Rights Reserved
5165  *
5166  * University Acknowledgment- Portions of this document are derived from
5167  * software developed by the University of California, Berkeley, and its
5168  * contributors.
5169  */
5170 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
5171 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
5172 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
5173 /*
5174  * The sigset_t type is defined in <sys/signal.h> and duplicated
5175  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
5176  * now allows the visibility of signal.h in this header, however
5177  * an order of inclusion problem occurs as a result of inclusion
5178  * of <sys/select.h> in <signal.h> under certain conditions.
5179  * Rather than include <sys/signal.h> here, we've duplicated
5180  * the sigset_t type instead. This type is required for the XPG6
5181  * introduced pselect() function also declared in this header.
5182  */
5183 
5184 
5185 typedef struct { /* signal set type */
5186  unsigned int __sigbits[4];
5187 } sigset_t;
5188 
5189 
5190 
5191 
5192 /*
5193  * Select uses bit masks of file descriptors in longs.
5194  * These macros manipulate such bit fields.
5195  * FD_SETSIZE may be defined by the user, but the default here
5196  * should be >= NOFILE (param.h).
5197  */
5198 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
5199 typedef long fd_mask;
5200 
5201 typedef long fds_mask;
5202 
5203 /*
5204  *  The value of _NBBY needs to be consistant with the value
5205  *  of NBBY in <sys/param.h>.
5206  */
5207 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
5208 typedef struct fd_set {
5209 
5210 
5211 
5212  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
5213 } fd_set;
5214 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
5215 extern int select(int, fd_set *, fd_set *,
5216  fd_set *, struct timeval *);
5217 
5218 
5219 extern int pselect(int, fd_set *, fd_set *,
5220  fd_set *, const struct timespec *,
5221  const sigset_t *);
5222 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
5223 
5224 
5225 
5226 /*
5227  * _VOID was defined to be either void or char but this is not
5228  * required because previous SunOS compilers have accepted the void
5229  * type. However, because many system header and source files use the
5230  * void keyword, the volatile keyword, and ANSI C function prototypes,
5231  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
5232  * should therefore not be used and remains for source compatibility
5233  * only.
5234  */
5235 /* CSTYLED */
5236 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
5237 
5238 
5239 
5240 
5241 
5242 /*
5243  * The implementation specific header <sys/time_impl.h> includes a
5244  * definition for timestruc_t needed by the stat structure.  However,
5245  * including either <time.h>, which includes <sys/time_impl.h>, or
5246  * including <sys/time_impl.h> directly will break both X/Open and
5247  * POSIX namespace. Preceeding tag, structure, and structure member
5248  * names with underscores eliminates the namespace breakage and at the
5249  * same time, with unique type names, eliminates the possibility of
5250  * timespec_t or timestruct_t naming conflicts that could otherwise
5251  * result based on the order of inclusion of <sys/stat.h> and
5252  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
5253  * standards namespace safe versions of these definitions.
5254  */
5255 
5256 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
5257 /*
5258  * CDDL HEADER START
5259  *
5260  * The contents of this file are subject to the terms of the
5261  * Common Development and Distribution License, Version 1.0 only
5262  * (the "License").  You may not use this file except in compliance
5263  * with the License.
5264  *
5265  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5266  * or http://www.opensolaris.org/os/licensing.
5267  * See the License for the specific language governing permissions
5268  * and limitations under the License.
5269  *
5270  * When distributing Covered Code, include this CDDL HEADER in each
5271  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5272  * If applicable, add the following below this CDDL HEADER, with the
5273  * fields enclosed by brackets "[]" replaced with your own identifying
5274  * information: Portions Copyright [yyyy] [name of copyright owner]
5275  *
5276  * CDDL HEADER END
5277  */
5278 /*
5279  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5280  * Use is subject to license terms.
5281  */
5282 
5283 /*
5284  * Implementation-private.  This header should not be included
5285  * directly by an application.  The application should instead
5286  * include <time.h> which includes this header conditionally
5287  * depending on which feature test macros are defined. By default,
5288  * this header is included by <time.h>.  X/Open and POSIX
5289  * standards requirements result in this header being included
5290  * by <time.h> only under a restricted set of conditions.
5291  */
5292 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
5293 
5294 
5295 
5296 
5297 
5298 
5299 /*
5300  * stat structure, used by stat(2) and fstat(2)
5301  */
5302 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5303 /*
5304  * large file compilation environment setup
5305  */
5306 
5307 
5308 
5309 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5310 #pragma redefine_extname fstat fstat64
5311 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5312 
5313 
5314 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5315 #pragma redefine_extname stat stat64
5316 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5317 
5318 
5319 
5320 
5321 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5322 #pragma redefine_extname fstatat fstatat64
5323 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5324 
5325 
5326 
5327 
5328 
5329 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5330 #pragma redefine_extname lstat lstat64
5331 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5332 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5333 /*
5334  * In the LP64 compilation environment, map large file interfaces
5335  * back to native versions where possible.
5336  */
5337 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5338 /*
5339  * User level stat structure definitions.
5340  */
5341 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5342 struct stat {
5343  dev_t st_dev;
5344  long st_pad1[3]; /* reserved for network id */
5345  ino_t st_ino;
5346  mode_t st_mode;
5347  nlink_t st_nlink;
5348  uid_t st_uid;
5349  gid_t st_gid;
5350  dev_t st_rdev;
5351  long st_pad2[2];
5352  off_t st_size;
5353 
5354 
5355 
5356 
5357  timestruc_t st_atim;
5358  timestruc_t st_mtim;
5359  timestruc_t st_ctim;
5360 
5361 
5362 
5363 
5364 
5365  blksize_t st_blksize;
5366  blkcnt_t st_blocks;
5367  char st_fstype[16];
5368  long st_pad4[8]; /* expansion area */
5369 };
5370 
5371 
5372 
5373 /* transitional large file interface version */
5374 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5375 struct stat64 {
5376  dev_t st_dev;
5377  long st_pad1[3]; /* reserved for network id */
5378  ino64_t st_ino;
5379  mode_t st_mode;
5380  nlink_t st_nlink;
5381  uid_t st_uid;
5382  gid_t st_gid;
5383  dev_t st_rdev;
5384  long st_pad2[2];
5385  off64_t st_size;
5386 
5387  timestruc_t st_atim;
5388  timestruc_t st_mtim;
5389  timestruc_t st_ctim;
5390 
5391 
5392 
5393 
5394 
5395  blksize_t st_blksize;
5396  blkcnt64_t st_blocks;
5397  char st_fstype[16];
5398  long st_pad4[8]; /* expansion area */
5399 };
5400 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5401 /* MODE MASKS */
5402 
5403 /* de facto standard definitions */
5404 
5405 
5406 
5407 
5408 
5409 
5410 /* XENIX definitions are not relevant to Solaris */
5411 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5412 /* the following macros are for POSIX conformance */
5413 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5414 /* POSIX.4 macros */
5415 
5416 
5417 
5418 
5419 
5420 
5421 /*
5422  * A version number is included in the x86 SVR4 stat and mknod interfaces
5423  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
5424  * the i386 ABI need to be aware of this too.
5425  */
5426 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5427  /* || defined(_XPG7) */
5428 /* for use with futimens() and utimensat() */
5429 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
5430 extern int fchmod(int, mode_t);
5431 
5432 
5433 extern int chmod(const char *, mode_t);
5434 extern int mkdir(const char *, mode_t);
5435 extern int mkfifo(const char *, mode_t);
5436 extern mode_t umask(mode_t);
5437 
5438 /* transitional large file interfaces */
5439 
5440 
5441 extern int fstat64(int, struct stat64 *);
5442 extern int stat64(const char *, struct stat64 *);
5443 extern int lstat64(const char *, struct stat64 *);
5444 
5445 
5446 extern int fstatat64(int, const char *, struct stat64 *, int);
5447 
5448 
5449 
5450 
5451 
5452  /* || defined(_XPG7) */
5453 extern int mkdirat(int, const char *, mode_t);
5454 extern int mkfifoat(int, const char *, mode_t);
5455 extern int mknodat(int, const char *, mode_t, dev_t);
5456 extern int fchmodat(int, const char *, mode_t, int);
5457 extern int futimens(int, const struct timespec[2]);
5458 extern int utimensat(int, const char *, const struct timespec[2], int);
5459 
5460 
5461 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
5462 /*
5463  * CDDL HEADER START
5464  *
5465  * The contents of this file are subject to the terms of the
5466  * Common Development and Distribution License (the "License").
5467  * You may not use this file except in compliance with the License.
5468  *
5469  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5470  * or http://www.opensolaris.org/os/licensing.
5471  * See the License for the specific language governing permissions
5472  * and limitations under the License.
5473  *
5474  * When distributing Covered Code, include this CDDL HEADER in each
5475  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5476  * If applicable, add the following below this CDDL HEADER, with the
5477  * fields enclosed by brackets "[]" replaced with your own identifying
5478  * information: Portions Copyright [yyyy] [name of copyright owner]
5479  *
5480  * CDDL HEADER END
5481  */
5482 
5483 /*
5484  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
5485  * Use is subject to license terms.
5486  */
5487 
5488 
5489 
5490 
5491 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5492 /*
5493  * CDDL HEADER START
5494  *
5495  * The contents of this file are subject to the terms of the
5496  * Common Development and Distribution License (the "License").
5497  * You may not use this file except in compliance with the License.
5498  *
5499  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5500  * or http://www.opensolaris.org/os/licensing.
5501  * See the License for the specific language governing permissions
5502  * and limitations under the License.
5503  *
5504  * When distributing Covered Code, include this CDDL HEADER in each
5505  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5506  * If applicable, add the following below this CDDL HEADER, with the
5507  * fields enclosed by brackets "[]" replaced with your own identifying
5508  * information: Portions Copyright [yyyy] [name of copyright owner]
5509  *
5510  * CDDL HEADER END
5511  */
5512 
5513 /*
5514  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5515  * Copyright 2016 Joyent, Inc.
5516  *
5517  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5518  * Use is subject to license terms.
5519  */
5520 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
5521 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
5522 /*
5523  * CDDL HEADER START
5524  *
5525  * The contents of this file are subject to the terms of the
5526  * Common Development and Distribution License (the "License").
5527  * You may not use this file except in compliance with the License.
5528  *
5529  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5530  * or http://www.opensolaris.org/os/licensing.
5531  * See the License for the specific language governing permissions
5532  * and limitations under the License.
5533  *
5534  * When distributing Covered Code, include this CDDL HEADER in each
5535  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5536  * If applicable, add the following below this CDDL HEADER, with the
5537  * fields enclosed by brackets "[]" replaced with your own identifying
5538  * information: Portions Copyright [yyyy] [name of copyright owner]
5539  *
5540  * CDDL HEADER END
5541  */
5542 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5543 /*	  All Rights Reserved  	*/
5544 
5545 
5546 /*
5547  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5548  * Use is subject to license terms.
5549  *
5550  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
5551  * Copyright 2016 Joyent, Inc.
5552  */
5553 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
5554 
5555 
5556 
5557 
5558 
5559 /*
5560  * The implementation specific header for <sys/stat.h>
5561  */
5562 
5563 
5564 
5565 
5566 
5567 extern int fstat(int, struct stat *);
5568 extern int stat(const char *, struct stat *);
5569 
5570 
5571 
5572 extern int fstatat(int, const char *, struct stat *, int);
5573 
5574 
5575 
5576 extern int lstat(const char *, struct stat *);
5577 extern int mknod(const char *, mode_t, dev_t);
5578 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
5579 # 33 "check.c" 2
5580 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
5581 /*
5582  * CDDL HEADER START
5583  *
5584  * The contents of this file are subject to the terms of the
5585  * Common Development and Distribution License (the "License").
5586  * You may not use this file except in compliance with the License.
5587  *
5588  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5589  * or http://www.opensolaris.org/os/licensing.
5590  * See the License for the specific language governing permissions
5591  * and limitations under the License.
5592  *
5593  * When distributing Covered Code, include this CDDL HEADER in each
5594  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5595  * If applicable, add the following below this CDDL HEADER, with the
5596  * fields enclosed by brackets "[]" replaced with your own identifying
5597  * information: Portions Copyright [yyyy] [name of copyright owner]
5598  *
5599  * CDDL HEADER END
5600  */
5601 
5602 /*
5603  * Copyright 2014 PALO, Richard.
5604  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5605  * Copyright (c) 2013 Gary Mills
5606  *
5607  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5608  */
5609 
5610 /*	Copyright (c) 1988 AT&T	*/
5611 /*	  All Rights Reserved  	*/
5612 
5613 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
5614 
5615 
5616 
5617 
5618 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5619 /*
5620  * CDDL HEADER START
5621  *
5622  * The contents of this file are subject to the terms of the
5623  * Common Development and Distribution License (the "License").
5624  * You may not use this file except in compliance with the License.
5625  *
5626  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5627  * or http://www.opensolaris.org/os/licensing.
5628  * See the License for the specific language governing permissions
5629  * and limitations under the License.
5630  *
5631  * When distributing Covered Code, include this CDDL HEADER in each
5632  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5633  * If applicable, add the following below this CDDL HEADER, with the
5634  * fields enclosed by brackets "[]" replaced with your own identifying
5635  * information: Portions Copyright [yyyy] [name of copyright owner]
5636  *
5637  * CDDL HEADER END
5638  */
5639 
5640 /*
5641  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5642  * Copyright 2016 Joyent, Inc.
5643  *
5644  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5645  * Use is subject to license terms.
5646  */
5647 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5648 
5649 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5650 /*
5651  * This file and its contents are supplied under the terms of the
5652  * Common Development and Distribution License ("CDDL"), version 1.0.
5653  * You may only use this file in accordance with the terms of version
5654  * 1.0 of the CDDL.
5655  *
5656  * A full copy of the text of the CDDL should have accompanied this
5657  * source.  A copy of the CDDL is also available via the Internet at
5658  * http://www.illumos.org/license/CDDL.
5659  */
5660 
5661 /*
5662  * Copyright 2014-2016 PALO, Richard.
5663  */
5664 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5665 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
5666 /*
5667  * CDDL HEADER START
5668  *
5669  * The contents of this file are subject to the terms of the
5670  * Common Development and Distribution License (the "License").
5671  * You may not use this file except in compliance with the License.
5672  *
5673  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5674  * or http://www.opensolaris.org/os/licensing.
5675  * See the License for the specific language governing permissions
5676  * and limitations under the License.
5677  *
5678  * When distributing Covered Code, include this CDDL HEADER in each
5679  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5680  * If applicable, add the following below this CDDL HEADER, with the
5681  * fields enclosed by brackets "[]" replaced with your own identifying
5682  * information: Portions Copyright [yyyy] [name of copyright owner]
5683  *
5684  * CDDL HEADER END
5685  */
5686 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5687 /*	  All Rights Reserved  	*/
5688 
5689 
5690 /*
5691  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5692  * Use is subject to license terms.
5693  *
5694  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
5695  * Copyright 2016 Joyent, Inc.
5696  */
5697 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5698 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
5699 /*
5700  * CDDL HEADER START
5701  *
5702  * The contents of this file are subject to the terms of the
5703  * Common Development and Distribution License (the "License").
5704  * You may not use this file except in compliance with the License.
5705  *
5706  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5707  * or http://www.opensolaris.org/os/licensing.
5708  * See the License for the specific language governing permissions
5709  * and limitations under the License.
5710  *
5711  * When distributing Covered Code, include this CDDL HEADER in each
5712  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5713  * If applicable, add the following below this CDDL HEADER, with the
5714  * fields enclosed by brackets "[]" replaced with your own identifying
5715  * information: Portions Copyright [yyyy] [name of copyright owner]
5716  *
5717  * CDDL HEADER END
5718  */
5719 
5720 /*
5721  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
5722  *	  All Rights Reserved
5723  *
5724  */
5725 
5726 /*
5727  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5728  * Use is subject to license terms.
5729  */
5730 
5731 /*
5732  * WARNING: This is an implementation-specific header,
5733  * its contents are not guaranteed. Applications
5734  * should include <unistd.h> and not this header.
5735  */
5736 
5737 
5738 
5739 
5740 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5741 /*
5742  * CDDL HEADER START
5743  *
5744  * The contents of this file are subject to the terms of the
5745  * Common Development and Distribution License (the "License").
5746  * You may not use this file except in compliance with the License.
5747  *
5748  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5749  * or http://www.opensolaris.org/os/licensing.
5750  * See the License for the specific language governing permissions
5751  * and limitations under the License.
5752  *
5753  * When distributing Covered Code, include this CDDL HEADER in each
5754  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5755  * If applicable, add the following below this CDDL HEADER, with the
5756  * fields enclosed by brackets "[]" replaced with your own identifying
5757  * information: Portions Copyright [yyyy] [name of copyright owner]
5758  *
5759  * CDDL HEADER END
5760  */
5761 
5762 /*
5763  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5764  * Copyright 2016 Joyent, Inc.
5765  *
5766  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5767  * Use is subject to license terms.
5768  */
5769 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
5770 
5771 
5772 
5773 
5774 
5775 /* command names for confstr */
5776 
5777 
5778 
5779 /*
5780  * command names for large file configuration information
5781  */
5782 /* large file compilation environment configuration */
5783 
5784 
5785 
5786 
5787 /* transitional large file interface configuration */
5788 
5789 
5790 
5791 
5792 
5793 /* UNIX 98 */
5794 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5795 /* UNIX 03 */
5796 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5797 /* command names for POSIX sysconf */
5798 
5799 /* POSIX.1 names */
5800 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5801 /* SVR4 names */
5802 
5803 
5804 
5805 
5806 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
5807 
5808 
5809 
5810 
5811 /* POSIX.4 names */
5812 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5813 /* XPG4 names */
5814 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5815 /* additional XSH4/XCU4 command names for sysconf */
5816 
5817 
5818 
5819 /* additional XPG4v2 (UNIX 95) command names */
5820 
5821 
5822 
5823 
5824 
5825 /* defined for XTI (XNS Issue 5) */
5826 
5827 
5828 
5829 
5830 
5831 
5832 
5833 /*
5834  * Hardware specific items
5835  * Note that not all items are supported on all architectures
5836  */
5837 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5838 /*
5839  * POSIX.1c (pthreads) names. These values are defined above
5840  * the sub-500 range. See psarc case 1995/257.
5841  */
5842 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5843 /* UNIX 98 */
5844 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5845 /* UNIX 03 */
5846 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5847 /* command names for POSIX pathconf */
5848 
5849 /* POSIX.1 names */
5850 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5851 /* POSIX.4 names */
5852 
5853 
5854 
5855 /* UNIX 03 names */
5856 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5857 /* UNIX 08 names */
5858 
5859 
5860 /*
5861  * Large File Summit names
5862  *
5863  * This value matches the MIPS ABI choice, but leaves a large gap in the
5864  * value space.
5865  */
5866 
5867 
5868 /*
5869  * Extended attributes
5870  */
5871 
5872 
5873 
5874 /*
5875  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
5876  */
5877 
5878 
5879 /*
5880  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
5881  */
5882 
5883 
5884 
5885 /*
5886  * The value of 0 is returned when
5887  * ACL's are not supported
5888  */
5889 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5890 /*
5891  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
5892  * should not rely on this value, it has been aligned with the current
5893  * standard to avoid confusion if used.
5894  */
5895 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5896 /* UNIX 03 names */
5897 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5898 
5899 
5900 
5901 
5902 
5903 /* Symbolic constants for the "access" routine: */
5904 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5905 /* Symbolic constants for the "lseek" routine: */
5906 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5907 /* Path names: */
5908 
5909 
5910 
5911 
5912 /*
5913  * compile-time symbolic constants,
5914  * Support does not mean the feature is enabled.
5915  * Use pathconf/sysconf to obtain actual configuration value.
5916  */
5917 
5918 /* Values unchanged in UNIX 03 */
5919 
5920 
5921 
5922 
5923 
5924 /*
5925  * POSIX.1b compile-time symbolic constants.
5926  */
5927 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5928 /*
5929  * POSIX.1c compile-time symbolic constants.
5930  */
5931 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5932 /* New in UNIX 03 */
5933 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5934 /*
5935  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
5936  * which need mutexes to support priority inheritance/ceiling.
5937  */
5938 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5939 /*
5940  * Large File Summit-related announcement macros.  The system supports both
5941  * the additional and transitional Large File Summit interfaces.  (The final
5942  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
5943  */
5944 
5945 
5946 
5947 
5948 
5949 /* large file compilation environment setup */
5950 
5951 
5952 
5953 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5954 #pragma redefine_extname ftruncate ftruncate64
5955 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5956 
5957 
5958 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5959 #pragma redefine_extname lseek lseek64
5960 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5961 
5962 
5963 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5964 #pragma redefine_extname pread pread64
5965 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5966 
5967 
5968 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5969 #pragma redefine_extname pwrite pwrite64
5970 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5971 
5972 
5973 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5974 #pragma redefine_extname truncate truncate64
5975 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5976 
5977 
5978 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5979 #pragma redefine_extname lockf lockf64
5980 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5981 
5982 
5983 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5984 #pragma redefine_extname tell tell64
5985 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5986 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5987 /* In the LP64 compilation environment, the APIs are already large file */
5988 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5989 extern int access(const char *, int);
5990 
5991 extern int acct(const char *);
5992 
5993 extern unsigned alarm(unsigned);
5994 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5995 
5996 
5997 extern int brk(void *);
5998 
5999 extern int chdir(const char *);
6000 extern int chown(const char *, uid_t, gid_t);
6001 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6002 
6003 
6004 extern int chroot(const char *);
6005 
6006 extern int close(int);
6007 
6008 
6009 
6010 
6011 
6012 
6013 extern char *ctermid(char *);
6014 
6015 
6016 extern char *ctermid_r(char *);
6017 
6018 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6019 
6020 extern char *cuserid(char *);
6021 
6022 extern int dup(int);
6023 extern int dup2(int, int);
6024 extern int dup3(int, int, int);
6025 
6026 
6027 
6028 
6029 extern void endusershell(void);
6030 
6031 extern int execl(const char *, const char *, ...);
6032 extern int execle(const char *, const char *, ...);
6033 extern int execlp(const char *, const char *, ...);
6034 extern int execv(const char *, char *const *);
6035 extern int execve(const char *, char *const *, char *const *);
6036 extern int execvp(const char *, char *const *);
6037 extern void _exit(int)
6038  __attribute__((__noreturn__));
6039 /*
6040  * The following fattach prototype is duplicated in <stropts.h>. The
6041  * duplication is necessitated by XPG4.2 which requires the prototype
6042  * be defined in <stropts.h>.
6043  */
6044 
6045 extern int fattach(int, const char *);
6046 
6047 
6048 extern int fchdir(int);
6049 extern int fchown(int, uid_t, gid_t);
6050 
6051 
6052 extern int fchroot(int);
6053 
6054 
6055 
6056 extern int fdatasync(int);
6057 
6058 /*
6059  * The following fdetach prototype is duplicated in <stropts.h>. The
6060  * duplication is necessitated by XPG4.2 which requires the prototype
6061  * be defined in <stropts.h>.
6062  */
6063 
6064 extern int fdetach(const char *);
6065 
6066 extern pid_t fork(void);
6067 
6068 extern pid_t fork1(void);
6069 extern pid_t forkall(void);
6070 
6071 extern long fpathconf(int, int);
6072 
6073 
6074 extern int fsync(int);
6075 
6076 
6077 
6078 
6079 extern int ftruncate(int, off_t);
6080 
6081 extern char *getcwd(char *, size_t);
6082 
6083 
6084 extern int getdtablesize(void);
6085 
6086 extern gid_t getegid(void);
6087 extern uid_t geteuid(void);
6088 extern gid_t getgid(void);
6089 extern int getgroups(int, gid_t *);
6090 
6091 extern long gethostid(void);
6092 
6093 
6094 
6095 
6096 extern int gethostname(char *, int);
6097 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6098 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6099 
6100 extern int getpagesize(void);
6101 
6102 extern pid_t getpgid(pid_t);
6103 
6104 extern pid_t getpid(void);
6105 extern pid_t getppid(void);
6106 extern pid_t getpgrp(void);
6107 
6108 
6109 char *gettxt(const char *, const char *);
6110 
6111 
6112 extern pid_t getsid(pid_t);
6113 
6114 extern uid_t getuid(void);
6115 
6116 extern char *getusershell(void);
6117 
6118 /*
6119  * The following ioctl prototype is duplicated in <stropts.h>. The
6120  * duplication is necessitated by XPG4.2 which requires the prototype
6121  * be defined in <stropts.h>.
6122  */
6123 
6124 extern int ioctl(int, int, ...);
6125 extern int isaexec(const char *, char *const *, char *const *);
6126 extern int issetugid(void);
6127 
6128 extern int isatty(int);
6129 
6130 extern int lchown(const char *, uid_t, gid_t);
6131 
6132 extern int link(const char *, const char *);
6133 
6134 extern offset_t llseek(int, offset_t, int);
6135 
6136 
6137 
6138 
6139 extern int lockf(int, int, off_t);
6140 
6141 extern off_t lseek(int, off_t, int);
6142 
6143 
6144 extern int nice(int);
6145 
6146 
6147 extern int mincore(caddr_t, size_t, char *);
6148 
6149 extern long pathconf(const char *, int);
6150 extern int pause(void);
6151 extern int pipe(int *);
6152 extern int pipe2(int *, int);
6153 
6154 
6155 
6156 extern ssize_t pread(int, void *, size_t, off_t);
6157 
6158 
6159 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
6160 
6161 /*
6162  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
6163  * declarations are identical. A change to either one may also require
6164  * appropriate namespace updates in order to avoid redeclaration
6165  * warnings in the case where both prototypes are exposed via inclusion
6166  * of both <pthread.h> and <unistd.h>.
6167  */
6168 
6169 
6170 
6171 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
6172 
6173 
6174 
6175 extern int ptrace(int, pid_t, int, int);
6176 
6177 
6178 
6179 
6180 extern ssize_t pwrite(int, const void *, size_t, off_t);
6181 
6182 
6183 /* per RFC 3542; This is also defined in netdb.h */
6184 extern int rcmd_af(char **, unsigned short, const char *, const char *,
6185  const char *, int *, int);
6186 
6187 extern ssize_t read(int, void *, size_t);
6188 
6189 
6190 extern ssize_t readlink(const char *, char *,
6191  size_t);
6192 
6193 
6194 
6195 
6196 
6197 
6198 extern int rename(const char *, const char *);
6199 
6200 
6201 
6202 
6203 
6204 
6205 
6206 extern int resolvepath(const char *, char *, size_t);
6207 /* per RFC 3542; This is also defined in netdb.h */
6208 extern int rexec_af(char **, unsigned short, const char *, const char *,
6209  const char *, int *, int);
6210 
6211 extern int rmdir(const char *);
6212 
6213 /* per RFC 3542; This is also defined in netdb.h */
6214 extern int rresvport_af(int *, int);
6215 
6216 
6217 
6218 
6219 extern void *sbrk(intptr_t);
6220 
6221 
6222 extern int setegid(gid_t);
6223 extern int seteuid(uid_t);
6224 
6225 extern int setgid(gid_t);
6226 
6227 extern int setgroups(int, const gid_t *);
6228 extern int sethostname(char *, int);
6229 
6230 extern int setpgid(pid_t, pid_t);
6231 
6232 extern pid_t setpgrp(void);
6233 extern int setregid(gid_t, gid_t);
6234 extern int setreuid(uid_t, uid_t);
6235 
6236 extern pid_t setsid(void);
6237 extern int setuid(uid_t);
6238 
6239 extern void setusershell(void);
6240 
6241 extern unsigned sleep(unsigned);
6242 
6243 extern int stime(const time_t *);
6244 
6245 
6246 
6247 
6248 
6249 
6250 extern int symlink(const char *, const char *);
6251 extern void sync(void);
6252 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6253 extern long sysconf(int);
6254 extern pid_t tcgetpgrp(int);
6255 extern int tcsetpgrp(int, pid_t);
6256 
6257 
6258 
6259 extern off_t tell(int);
6260 
6261 
6262 
6263 
6264 extern int truncate(const char *, off_t);
6265 
6266 extern char *ttyname(int);
6267 
6268 extern useconds_t ualarm(useconds_t, useconds_t);
6269 
6270 extern int unlink(const char *);
6271 
6272 extern char *getwd(char *);
6273 extern int usleep(useconds_t);
6274 extern pid_t vfork(void) __attribute__((__returns_twice__));
6275 #pragma unknown_control_flow(vfork)
6276 
6277 
6278 extern void vhangup(void);
6279 
6280 extern ssize_t write(int, const void *, size_t);
6281 
6282 extern void yield(void);
6283 
6284 
6285 
6286 
6287  /* || defined(_XPG7) */
6288 extern int faccessat(int, const char *, int, int);
6289 extern int fchownat(int, const char *, uid_t, gid_t, int);
6290 extern int linkat(int, const char *, int, const char *, int);
6291 extern ssize_t readlinkat(int, const char *,
6292  char *, size_t);
6293 extern int renameat(int, const char *, int, const char *);
6294 extern int symlinkat(const char *, int, const char *);
6295 extern int unlinkat(int, const char *, int);
6296 
6297 
6298 extern int get_nprocs(void);
6299 extern int get_nprocs_conf(void);
6300 
6301 
6302 /* transitional large file interface versions */
6303 
6304 
6305 extern int ftruncate64(int, off64_t);
6306 extern off64_t lseek64(int, off64_t, int);
6307 extern ssize_t pread64(int, void *, size_t, off64_t);
6308 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
6309 extern off64_t tell64(int);
6310 extern int truncate64(const char *, off64_t);
6311 extern int lockf64(int, int, off64_t);
6312 
6313 
6314 /*
6315  * getlogin_r() & ttyname_r() prototypes are defined here.
6316  */
6317 
6318 /*
6319  * Previous releases of Solaris, starting at 2.3, provided definitions of
6320  * various functions as specified in POSIX.1c, Draft 6.  For some of these
6321  * functions, the final POSIX 1003.1c standard had a different number of
6322  * arguments and return values.
6323  *
6324  * The following segment of this header provides support for the standard
6325  * interfaces while supporting applications written under earlier
6326  * releases.  The application defines appropriate values of the feature
6327  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
6328  * whether it was written to expect the Draft 6 or standard versions of
6329  * these interfaces, before including this header.  This header then
6330  * provides a mapping from the source version of the interface to an
6331  * appropriate binary interface.  Such mappings permit an application
6332  * to be built from libraries and objects which have mixed expectations
6333  * of the definitions of these functions.
6334  *
6335  * For applications using the Draft 6 definitions, the binary symbol is the
6336  * same as the source symbol, and no explicit mapping is needed.  For the
6337  * standard interface, the function func() is mapped to the binary symbol
6338  * _posix_func().  The preferred mechanism for the remapping is a compiler
6339  * #pragma.  If the compiler does not provide such a #pragma, the header file
6340  * defines a static function func() which calls the _posix_func() version;
6341  * this has to be done instead of #define since POSIX specifies that an
6342  * application can #undef the symbol and still be bound to the correct
6343  * implementation.  Unfortunately, the statics confuse lint so we fallback to
6344  * #define in that case.
6345  *
6346  * NOTE: Support for the Draft 6 definitions is provided for compatibility
6347  * only.  New applications/libraries should use the standard definitions.
6348  */
6349 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6350 
6351 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6352 #pragma redefine_extname getlogin_r getloginx_r
6353 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6354 
6355 
6356 
6357 
6358 
6359 
6360 extern char *getlogin_r(char *, int);
6361 
6362 extern char *ttyname_r(int, char *, int);
6363 
6364 
6365 
6366 
6367 
6368 
6369 extern int getentropy(void *, size_t);
6370 # 34 "check.c" 2
6371 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 1
6372 /*
6373  * CDDL HEADER START
6374  *
6375  * The contents of this file are subject to the terms of the
6376  * Common Development and Distribution License, Version 1.0 only
6377  * (the "License").  You may not use this file except in compliance
6378  * with the License.
6379  *
6380  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6381  * or http://www.opensolaris.org/os/licensing.
6382  * See the License for the specific language governing permissions
6383  * and limitations under the License.
6384  *
6385  * When distributing Covered Code, include this CDDL HEADER in each
6386  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6387  * If applicable, add the following below this CDDL HEADER, with the
6388  * fields enclosed by brackets "[]" replaced with your own identifying
6389  * information: Portions Copyright [yyyy] [name of copyright owner]
6390  *
6391  * CDDL HEADER END
6392  */
6393 /*	Copyright (c) 1988 AT&T	*/
6394 /*	  All Rights Reserved  	*/
6395 
6396 
6397 /*
6398  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
6399  * Use is subject to license terms.
6400  */
6401 
6402 
6403 
6404 
6405 
6406 #pragma ident "%Z%%M%	%I%	%E% SMI"
6407 
6408 /*
6409  * Error codes
6410  */
6411 
6412 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
6413 /*
6414  * CDDL HEADER START
6415  *
6416  * The contents of this file are subject to the terms of the
6417  * Common Development and Distribution License, Version 1.0 only
6418  * (the "License").  You may not use this file except in compliance
6419  * with the License.
6420  *
6421  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6422  * or http://www.opensolaris.org/os/licensing.
6423  * See the License for the specific language governing permissions
6424  * and limitations under the License.
6425  *
6426  * When distributing Covered Code, include this CDDL HEADER in each
6427  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6428  * If applicable, add the following below this CDDL HEADER, with the
6429  * fields enclosed by brackets "[]" replaced with your own identifying
6430  * information: Portions Copyright [yyyy] [name of copyright owner]
6431  *
6432  * CDDL HEADER END
6433  */
6434 /*
6435  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
6436  * Use is subject to license terms.
6437  */
6438 
6439 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
6440 /*	  All Rights Reserved  	*/
6441 
6442 /*
6443  * University Copyright- Copyright (c) 1982, 1986, 1988
6444  * The Regents of the University of California
6445  * All Rights Reserved
6446  *
6447  * University Acknowledgment- Portions of this document are derived from
6448  * software developed by the University of California, Berkeley, and its
6449  * contributors.
6450  */
6451 
6452 
6453 
6454 
6455 #pragma ident "%Z%%M%	%I%	%E% SMI"
6456 
6457 
6458 
6459 
6460 
6461 /*
6462  * Error codes
6463  */
6464 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6465 /* Filesystem Quotas */
6466 
6467 
6468 /* Convergent Error Returns */
6469 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6470 /* Interprocess Robust Locks */
6471 
6472 
6473 
6474 /* stream problems */
6475 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6476 /* Interprocess Robust Locks */
6477 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6478 /* shared library problems */
6479 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6480 /* BSD Networking Software */
6481  /* argument errors */
6482 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6483     /* protocol family */
6484 
6485 
6486  /* operational errors */
6487 
6488 
6489 
6490     /* of reset */
6491 
6492 
6493 
6494 
6495 
6496 /* XENIX has 135 - 142 */
6497 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
6498 /* SUN Network File System */
6499 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 2
6500 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h"
6501 extern int *___errno();
6502 # 35 "check.c" 2
6503 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 1
6504 /*
6505  * CDDL HEADER START
6506  *
6507  * The contents of this file are subject to the terms of the
6508  * Common Development and Distribution License, Version 1.0 only
6509  * (the "License").  You may not use this file except in compliance
6510  * with the License.
6511  *
6512  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6513  * or http://www.opensolaris.org/os/licensing.
6514  * See the License for the specific language governing permissions
6515  * and limitations under the License.
6516  *
6517  * When distributing Covered Code, include this CDDL HEADER in each
6518  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6519  * If applicable, add the following below this CDDL HEADER, with the
6520  * fields enclosed by brackets "[]" replaced with your own identifying
6521  * information: Portions Copyright [yyyy] [name of copyright owner]
6522  *
6523  * CDDL HEADER END
6524  */
6525 /*
6526  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6527  *
6528  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
6529  * Use is subject to license terms.
6530  */
6531 
6532 /*	Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T	*/
6533 /*	  All Rights Reserved  	*/
6534 
6535 /*
6536  * Portions of this source code were derived from Berkeley 4.3 BSD
6537  * under license from the Regents of the University of California.
6538  */
6539 
6540 
6541 
6542 
6543 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6544 /*
6545  * CDDL HEADER START
6546  *
6547  * The contents of this file are subject to the terms of the
6548  * Common Development and Distribution License (the "License").
6549  * You may not use this file except in compliance with the License.
6550  *
6551  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6552  * or http://www.opensolaris.org/os/licensing.
6553  * See the License for the specific language governing permissions
6554  * and limitations under the License.
6555  *
6556  * When distributing Covered Code, include this CDDL HEADER in each
6557  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6558  * If applicable, add the following below this CDDL HEADER, with the
6559  * fields enclosed by brackets "[]" replaced with your own identifying
6560  * information: Portions Copyright [yyyy] [name of copyright owner]
6561  *
6562  * CDDL HEADER END
6563  */
6564 
6565 /*
6566  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6567  * Copyright 2016 Joyent, Inc.
6568  *
6569  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6570  * Use is subject to license terms.
6571  */
6572 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
6573 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6574 /*
6575  * CDDL HEADER START
6576  *
6577  * The contents of this file are subject to the terms of the
6578  * Common Development and Distribution License (the "License").
6579  * You may not use this file except in compliance with the License.
6580  *
6581  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6582  * or http://www.opensolaris.org/os/licensing.
6583  * See the License for the specific language governing permissions
6584  * and limitations under the License.
6585  *
6586  * When distributing Covered Code, include this CDDL HEADER in each
6587  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6588  * If applicable, add the following below this CDDL HEADER, with the
6589  * fields enclosed by brackets "[]" replaced with your own identifying
6590  * information: Portions Copyright [yyyy] [name of copyright owner]
6591  *
6592  * CDDL HEADER END
6593  */
6594 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6595 /*	  All Rights Reserved  	*/
6596 
6597 
6598 /*
6599  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6600  * Use is subject to license terms.
6601  *
6602  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6603  * Copyright 2016 Joyent, Inc.
6604  */
6605 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
6606 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
6607 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6608 /*	  All Rights Reserved  	*/
6609 
6610 
6611 /*
6612  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
6613  * All rights reserved.  The Berkeley software License Agreement
6614  * specifies the terms and conditions for redistribution.
6615  */
6616 
6617 /*
6618  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6619  *
6620  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6621  * Use is subject to license terms.
6622  *
6623  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6624  */
6625 
6626 /*
6627  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
6628  */
6629 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
6630 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 1
6631 /*
6632  * CDDL HEADER START
6633  *
6634  * The contents of this file are subject to the terms of the
6635  * Common Development and Distribution License, Version 1.0 only
6636  * (the "License").  You may not use this file except in compliance
6637  * with the License.
6638  *
6639  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6640  * or http://www.opensolaris.org/os/licensing.
6641  * See the License for the specific language governing permissions
6642  * and limitations under the License.
6643  *
6644  * When distributing Covered Code, include this CDDL HEADER in each
6645  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6646  * If applicable, add the following below this CDDL HEADER, with the
6647  * fields enclosed by brackets "[]" replaced with your own identifying
6648  * information: Portions Copyright [yyyy] [name of copyright owner]
6649  *
6650  * CDDL HEADER END
6651  */
6652 /*	Copyright (c) 1988 AT&T	*/
6653 /*	  All Rights Reserved  	*/
6654 
6655 
6656 /*
6657  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6658  *
6659  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6660  * Use is subject to license terms.
6661  */
6662 
6663 
6664 
6665 
6666 
6667 /*
6668  * Note:  The getutent(3c) family of interfaces are obsolete.
6669  * The getutxent(3c) family provide a superset of this functionality
6670  * and should be used in place of getutent(3c).
6671  */
6672 
6673 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6674 /*
6675  * CDDL HEADER START
6676  *
6677  * The contents of this file are subject to the terms of the
6678  * Common Development and Distribution License (the "License").
6679  * You may not use this file except in compliance with the License.
6680  *
6681  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6682  * or http://www.opensolaris.org/os/licensing.
6683  * See the License for the specific language governing permissions
6684  * and limitations under the License.
6685  *
6686  * When distributing Covered Code, include this CDDL HEADER in each
6687  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6688  * If applicable, add the following below this CDDL HEADER, with the
6689  * fields enclosed by brackets "[]" replaced with your own identifying
6690  * information: Portions Copyright [yyyy] [name of copyright owner]
6691  *
6692  * CDDL HEADER END
6693  */
6694 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6695 /*	  All Rights Reserved  	*/
6696 
6697 
6698 /*
6699  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6700  * Use is subject to license terms.
6701  *
6702  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6703  * Copyright 2016 Joyent, Inc.
6704  */
6705 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 2
6706 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
6707 struct exit_status {
6708  short e_termination; /* Process termination status */
6709  short e_exit; /* Process exit status */
6710 };
6711 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
6712 /*
6713  * This data structure describes the utmp entries returned by
6714  * the getutent(3c) family of APIs.  It does not (necessarily)
6715  * correspond to the contents of the utmp or wtmp files.
6716  *
6717  * Applications should only interact with this subsystem via
6718  * the getutxent(3c) family of APIs, as the getutent(3c) family
6719  * are obsolete.
6720  */
6721 struct utmp {
6722  char ut_user[8]; /* User login name */
6723  char ut_id[4]; /* /etc/inittab id(usually line #) */
6724  char ut_line[12]; /* device name (console, lnxx) */
6725  short ut_pid; /* short for compat. - process id */
6726  short ut_type; /* type of entry */
6727  struct exit_status ut_exit; /* The exit status of a process */
6728      /* marked as DEAD_PROCESS. */
6729  time_t ut_time; /* time entry was made */
6730 };
6731 
6732 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
6733 /*
6734  * CDDL HEADER START
6735  *
6736  * The contents of this file are subject to the terms of the
6737  * Common Development and Distribution License (the "License").
6738  * You may not use this file except in compliance with the License.
6739  *
6740  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6741  * or http://www.opensolaris.org/os/licensing.
6742  * See the License for the specific language governing permissions
6743  * and limitations under the License.
6744  *
6745  * When distributing Covered Code, include this CDDL HEADER in each
6746  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6747  * If applicable, add the following below this CDDL HEADER, with the
6748  * fields enclosed by brackets "[]" replaced with your own identifying
6749  * information: Portions Copyright [yyyy] [name of copyright owner]
6750  *
6751  * CDDL HEADER END
6752  */
6753 /*
6754  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
6755  * Use is subject to license terms.
6756  * Copyright 2015 Nexenta Systems, Inc.
6757  */
6758 
6759 
6760 
6761 
6762 #pragma ident "%Z%%M%	%I%	%E% SMI"
6763 
6764 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6765 /*
6766  * CDDL HEADER START
6767  *
6768  * The contents of this file are subject to the terms of the
6769  * Common Development and Distribution License, Version 1.0 only
6770  * (the "License").  You may not use this file except in compliance
6771  * with the License.
6772  *
6773  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6774  * or http://www.opensolaris.org/os/licensing.
6775  * See the License for the specific language governing permissions
6776  * and limitations under the License.
6777  *
6778  * When distributing Covered Code, include this CDDL HEADER in each
6779  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6780  * If applicable, add the following below this CDDL HEADER, with the
6781  * fields enclosed by brackets "[]" replaced with your own identifying
6782  * information: Portions Copyright [yyyy] [name of copyright owner]
6783  *
6784  * CDDL HEADER END
6785  */
6786 /*
6787  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6788  *
6789  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6790  * Use is subject to license terms.
6791  */
6792 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
6793 
6794 
6795 
6796 
6797 
6798 /*
6799  * Interoperability types for programs. Used for:
6800  *
6801  * Crossing between 32-bit and 64-bit domains.
6802  *
6803  * On disk data formats such as filesystem meta data
6804  * and disk label.
6805  *
6806  * Note: Applications should never include this
6807  *       header file.
6808  */
6809 typedef uint32_t caddr32_t;
6810 typedef int32_t daddr32_t;
6811 typedef int32_t off32_t;
6812 typedef uint32_t ino32_t;
6813 typedef int32_t blkcnt32_t;
6814 typedef uint32_t fsblkcnt32_t;
6815 typedef uint32_t fsfilcnt32_t;
6816 typedef int32_t id32_t;
6817 typedef uint32_t major32_t;
6818 typedef uint32_t minor32_t;
6819 typedef int32_t key32_t;
6820 typedef uint32_t mode32_t;
6821 typedef uint32_t uid32_t;
6822 typedef uint32_t gid32_t;
6823 typedef uint32_t nlink32_t;
6824 typedef uint32_t dev32_t;
6825 typedef int32_t pid32_t;
6826 typedef uint32_t size32_t;
6827 typedef int32_t ssize32_t;
6828 typedef int32_t time32_t;
6829 typedef int32_t clock32_t;
6830 typedef uint32_t uintptr32_t;
6831 typedef int32_t intptr32_t;
6832 
6833 struct timeval32 {
6834  time32_t tv_sec; /* seconds */
6835  int32_t tv_usec; /* and microseconds */
6836 };
6837 
6838 typedef struct timespec32 {
6839  time32_t tv_sec; /* seconds */
6840  int32_t tv_nsec; /* and nanoseconds */
6841 } timespec32_t;
6842 
6843 typedef struct timespec32 timestruc32_t;
6844 
6845 typedef struct itimerspec32 {
6846  struct timespec32 it_interval;
6847  struct timespec32 it_value;
6848 } itimerspec32_t;
6849 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 2
6850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
6851 /*
6852  * CDDL HEADER START
6853  *
6854  * The contents of this file are subject to the terms of the
6855  * Common Development and Distribution License, Version 1.0 only
6856  * (the "License").  You may not use this file except in compliance
6857  * with the License.
6858  *
6859  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6860  * or http://www.opensolaris.org/os/licensing.
6861  * See the License for the specific language governing permissions
6862  * and limitations under the License.
6863  *
6864  * When distributing Covered Code, include this CDDL HEADER in each
6865  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6866  * If applicable, add the following below this CDDL HEADER, with the
6867  * fields enclosed by brackets "[]" replaced with your own identifying
6868  * information: Portions Copyright [yyyy] [name of copyright owner]
6869  *
6870  * CDDL HEADER END
6871  */
6872 /*
6873  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6874  *
6875  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6876  * Use is subject to license terms.
6877  */
6878 # 92 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 2
6879 
6880 /*
6881  * This data structure describes the utmp *file* contents using
6882  * fixed-width data types.  It should only be used by the implementation.
6883  *
6884  * Applications should use the getutxent(3c) family of routines to interact
6885  * with this database.
6886  */
6887 
6888 struct futmp {
6889  char ut_user[8]; /* User login name */
6890  char ut_id[4]; /* /etc/inittab id */
6891  char ut_line[12]; /* device name (console, lnxx) */
6892  int16_t ut_pid; /* process id */
6893  int16_t ut_type; /* type of entry */
6894  struct {
6895   int16_t e_termination; /* Process termination status */
6896   int16_t e_exit; /* Process exit status */
6897  } ut_exit; /* The exit status of a process */
6898  time32_t ut_time; /* time entry was made */
6899 };
6900 
6901 
6902 
6903 /*	Definitions for ut_type						*/
6904 # 135 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
6905 /*	Special strings or formats used in the "ut_line" field when	*/
6906 /*	accounting for something other than a process.			*/
6907 /*	No string for the ut_line field can be more than 11 chars +	*/
6908 /*	a NULL in length.						*/
6909 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
6910 /*	Define and macro for determing if a normal user wrote the entry */
6911 /*	 and marking the utmpx entry as a normal user */
6912 
6913 
6914 
6915 
6916 
6917 extern void endutent(void);
6918 extern struct utmp *getutent(void);
6919 extern struct utmp *getutid(const struct utmp *);
6920 extern struct utmp *getutline(const struct utmp *);
6921 extern struct utmp *pututline(const struct utmp *);
6922 extern void setutent(void);
6923 extern int utmpname(const char *);
6924 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
6925 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h"
6926 /*
6927  * This data structure describes the utmpx entries returned by
6928  * the getutxent(3c) family of APIs.  It does not (necessarily)
6929  * correspond to the contents of the utmpx or wtmpx files.
6930  *
6931  * Applications should only interact with this subsystem via
6932  * the getutxent(3c) family of APIs.
6933  */
6934 struct utmpx {
6935  char ut_user[32]; /* user login name */
6936  char ut_id[4]; /* inittab id */
6937  char ut_line[32]; /* device name (console, lnxx) */
6938  pid_t ut_pid; /* process id */
6939  short ut_type; /* type of entry */
6940 
6941  struct exit_status ut_exit; /* process termination/exit status */
6942 
6943 
6944 
6945  struct timeval ut_tv; /* time entry was made */
6946  int ut_session; /* session ID, used for windowing */
6947 
6948  int pad[5]; /* reserved for future use */
6949 
6950 
6951 
6952  short ut_syslen; /* significant length of ut_host */
6953      /*   including terminating null */
6954  char ut_host[257]; /* remote host name */
6955 };
6956 
6957 
6958 
6959 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
6960 /*
6961  * CDDL HEADER START
6962  *
6963  * The contents of this file are subject to the terms of the
6964  * Common Development and Distribution License (the "License").
6965  * You may not use this file except in compliance with the License.
6966  *
6967  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6968  * or http://www.opensolaris.org/os/licensing.
6969  * See the License for the specific language governing permissions
6970  * and limitations under the License.
6971  *
6972  * When distributing Covered Code, include this CDDL HEADER in each
6973  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6974  * If applicable, add the following below this CDDL HEADER, with the
6975  * fields enclosed by brackets "[]" replaced with your own identifying
6976  * information: Portions Copyright [yyyy] [name of copyright owner]
6977  *
6978  * CDDL HEADER END
6979  */
6980 /*
6981  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
6982  * Use is subject to license terms.
6983  * Copyright 2015 Nexenta Systems, Inc.
6984  */
6985 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
6986 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
6987 /*
6988  * CDDL HEADER START
6989  *
6990  * The contents of this file are subject to the terms of the
6991  * Common Development and Distribution License, Version 1.0 only
6992  * (the "License").  You may not use this file except in compliance
6993  * with the License.
6994  *
6995  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6996  * or http://www.opensolaris.org/os/licensing.
6997  * See the License for the specific language governing permissions
6998  * and limitations under the License.
6999  *
7000  * When distributing Covered Code, include this CDDL HEADER in each
7001  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7002  * If applicable, add the following below this CDDL HEADER, with the
7003  * fields enclosed by brackets "[]" replaced with your own identifying
7004  * information: Portions Copyright [yyyy] [name of copyright owner]
7005  *
7006  * CDDL HEADER END
7007  */
7008 /*
7009  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7010  *
7011  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7012  * Use is subject to license terms.
7013  */
7014 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
7015 
7016 /*
7017  * This data structure describes the utmp *file* contents using
7018  * fixed-width data types.  It should only be used by the implementation.
7019  *
7020  * Applications should use the getutxent(3c) family of routines to interact
7021  * with this database.
7022  */
7023 
7024 struct futmpx {
7025  char ut_user[32]; /* user login name */
7026  char ut_id[4]; /* inittab id */
7027  char ut_line[32]; /* device name (console, lnxx) */
7028  pid32_t ut_pid; /* process id */
7029  int16_t ut_type; /* type of entry */
7030  struct {
7031   int16_t e_termination; /* process termination status */
7032   int16_t e_exit; /* process exit status */
7033  } ut_exit; /* exit status of a process */
7034  struct timeval32 ut_tv; /* time entry was made */
7035  int32_t ut_session; /* session ID, user for windowing */
7036  int32_t pad[5]; /* reserved for future use */
7037  int16_t ut_syslen; /* significant length of ut_host */
7038  char ut_host[257]; /* remote host name */
7039 };
7040 
7041 
7042 
7043 /*	Define and macro for determing if a normal user wrote the entry */
7044 /*	and marking the utmpx entry as a normal user */
7045 
7046 
7047 
7048 
7049 
7050 
7051 extern void endutxent(void);
7052 extern struct utmpx *getutxent(void);
7053 extern struct utmpx *getutxid(const struct utmpx *);
7054 extern struct utmpx *getutxline(const struct utmpx *);
7055 extern struct utmpx *pututxline(const struct utmpx *);
7056 extern void setutxent(void);
7057 
7058 
7059 extern int utmpxname(const char *);
7060 extern struct utmpx *makeutx(const struct utmpx *);
7061 extern struct utmpx *modutx(const struct utmpx *);
7062 extern void getutmp(const struct utmpx *, struct utmp *);
7063 extern void getutmpx(const struct utmp *, struct utmpx *);
7064 extern void updwtmp(const char *, struct utmp *);
7065 extern void updwtmpx(const char *, struct utmpx *);
7066 # 36 "check.c" 2
7067 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 1
7068 /*
7069  * CDDL HEADER START
7070  *
7071  * The contents of this file are subject to the terms of the
7072  * Common Development and Distribution License (the "License").
7073  * You may not use this file except in compliance with the License.
7074  *
7075  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7076  * or http://www.opensolaris.org/os/licensing.
7077  * See the License for the specific language governing permissions
7078  * and limitations under the License.
7079  *
7080  * When distributing Covered Code, include this CDDL HEADER in each
7081  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7082  * If applicable, add the following below this CDDL HEADER, with the
7083  * fields enclosed by brackets "[]" replaced with your own identifying
7084  * information: Portions Copyright [yyyy] [name of copyright owner]
7085  *
7086  * CDDL HEADER END
7087  */
7088 
7089 /*
7090  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7091  *
7092  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7093  * Use is subject to license terms.
7094  */
7095 
7096 /*	Copyright (c) 1988 AT&T	*/
7097 /*	  All Rights Reserved  	*/
7098 
7099 
7100 
7101 
7102 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7103 /*
7104  * CDDL HEADER START
7105  *
7106  * The contents of this file are subject to the terms of the
7107  * Common Development and Distribution License (the "License").
7108  * You may not use this file except in compliance with the License.
7109  *
7110  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7111  * or http://www.opensolaris.org/os/licensing.
7112  * See the License for the specific language governing permissions
7113  * and limitations under the License.
7114  *
7115  * When distributing Covered Code, include this CDDL HEADER in each
7116  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7117  * If applicable, add the following below this CDDL HEADER, with the
7118  * fields enclosed by brackets "[]" replaced with your own identifying
7119  * information: Portions Copyright [yyyy] [name of copyright owner]
7120  *
7121  * CDDL HEADER END
7122  */
7123 
7124 /*
7125  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7126  * Copyright 2016 Joyent, Inc.
7127  *
7128  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7129  * Use is subject to license terms.
7130  */
7131 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
7132 
7133 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7134 /*
7135  * CDDL HEADER START
7136  *
7137  * The contents of this file are subject to the terms of the
7138  * Common Development and Distribution License (the "License").
7139  * You may not use this file except in compliance with the License.
7140  *
7141  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7142  * or http://www.opensolaris.org/os/licensing.
7143  * See the License for the specific language governing permissions
7144  * and limitations under the License.
7145  *
7146  * When distributing Covered Code, include this CDDL HEADER in each
7147  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7148  * If applicable, add the following below this CDDL HEADER, with the
7149  * fields enclosed by brackets "[]" replaced with your own identifying
7150  * information: Portions Copyright [yyyy] [name of copyright owner]
7151  *
7152  * CDDL HEADER END
7153  */
7154 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7155 /*	  All Rights Reserved  	*/
7156 
7157 
7158 /*
7159  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7160  * Use is subject to license terms.
7161  *
7162  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7163  * Copyright 2016 Joyent, Inc.
7164  */
7165 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
7166 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 1
7167 /*
7168  * CDDL HEADER START
7169  *
7170  * The contents of this file are subject to the terms of the
7171  * Common Development and Distribution License (the "License").
7172  * You may not use this file except in compliance with the License.
7173  *
7174  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7175  * or http://www.opensolaris.org/os/licensing.
7176  * See the License for the specific language governing permissions
7177  * and limitations under the License.
7178  *
7179  * When distributing Covered Code, include this CDDL HEADER in each
7180  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7181  * If applicable, add the following below this CDDL HEADER, with the
7182  * fields enclosed by brackets "[]" replaced with your own identifying
7183  * information: Portions Copyright [yyyy] [name of copyright owner]
7184  *
7185  * CDDL HEADER END
7186  */
7187 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7188 /*	  All Rights Reserved  	*/
7189 
7190 
7191 /*
7192  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7193  *
7194  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7195  * Use is subject to license terms.
7196  */
7197 
7198 
7199 
7200 
7201 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7202 /*
7203  * CDDL HEADER START
7204  *
7205  * The contents of this file are subject to the terms of the
7206  * Common Development and Distribution License (the "License").
7207  * You may not use this file except in compliance with the License.
7208  *
7209  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7210  * or http://www.opensolaris.org/os/licensing.
7211  * See the License for the specific language governing permissions
7212  * and limitations under the License.
7213  *
7214  * When distributing Covered Code, include this CDDL HEADER in each
7215  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7216  * If applicable, add the following below this CDDL HEADER, with the
7217  * fields enclosed by brackets "[]" replaced with your own identifying
7218  * information: Portions Copyright [yyyy] [name of copyright owner]
7219  *
7220  * CDDL HEADER END
7221  */
7222 
7223 /*
7224  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7225  * Copyright 2016 Joyent, Inc.
7226  *
7227  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7228  * Use is subject to license terms.
7229  */
7230 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 2
7231 
7232 
7233 
7234 
7235 
7236 /*
7237  * File-system independent directory entry.
7238  */
7239 typedef struct dirent {
7240  ino_t d_ino; /* "inode number" of entry */
7241  off_t d_off; /* offset of disk directory entry */
7242  unsigned short d_reclen; /* length of this record */
7243  char d_name[1]; /* name of file */
7244 } dirent_t;
7245 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
7246 /*
7247  * transitional large file interface version AND kernel internal version
7248  */
7249 typedef struct dirent64 {
7250  ino64_t d_ino; /* "inode number" of entry */
7251  off64_t d_off; /* offset of disk directory entry */
7252  unsigned short d_reclen; /* length of this record */
7253  char d_name[1]; /* name of file */
7254 } dirent64_t;
7255 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
7256 /*
7257  * This is the maximum number of bytes that getdents(2) will store in
7258  * user-supplied dirent buffers.
7259  */
7260 
7261 
7262 
7263 
7264 /*
7265  * large file compilation environment setup
7266  *
7267  * In the LP64 compilation environment, map large file interfaces
7268  * back to native versions where possible. (This only works because
7269  * a 'struct dirent' == 'struct dirent64').
7270  */
7271 
7272 
7273 
7274 
7275 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
7276 #pragma redefine_extname getdents getdents64
7277 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
7278 # 124 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
7279 extern int getdents(int, struct dirent *, size_t);
7280 
7281 /* N.B.: transitional large file interface version deliberately not provided */
7282 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
7283 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7284 typedef struct {
7285  int dd_fd; /* file descriptor */
7286  int dd_loc; /* offset in block */
7287  int dd_size; /* amount of valid data */
7288  char *dd_buf; /* directory block */
7289 } DIR; /* stream data from opendir() */
7290 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7291 /* large file compilation environment setup */
7292 
7293 
7294 
7295 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7296 #pragma redefine_extname readdir readdir64
7297 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7298 
7299 
7300 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7301 #pragma redefine_extname scandir scandir64
7302 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7303 
7304 
7305 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7306 #pragma redefine_extname alphasort alphasort64
7307 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7308 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7309 /* In the LP64 compilation environment, all APIs are already large file */
7310 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7311 extern DIR *opendir(const char *);
7312 
7313 
7314 extern DIR *fdopendir(int);
7315 extern int dirfd(DIR *);
7316 
7317 
7318 extern int scandir(const char *, struct dirent *(*[]),
7319     int (*)(const struct dirent *),
7320     int (*)(const struct dirent **,
7321      const struct dirent **));
7322 extern int alphasort(const struct dirent **,
7323      const struct dirent **);
7324 
7325 extern struct dirent *readdir(DIR *);
7326 
7327 
7328 extern long telldir(DIR *);
7329 extern void seekdir(DIR *, long);
7330 
7331 extern void rewinddir(DIR *);
7332 extern int closedir(DIR *);
7333 
7334 /* transitional large file interface */
7335 
7336 
7337 extern struct dirent64 *readdir64(DIR *);
7338 
7339 extern int scandir64(const char *, struct dirent64 *(*[]),
7340    int (*)(const struct dirent64 *),
7341    int (*)(const struct dirent64 **,
7342     const struct dirent64 **));
7343 extern int alphasort64(const struct dirent64 **, const struct dirent64 **);
7344 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7345 /*
7346  * readdir_r() prototype is defined here.
7347  *
7348  * There are several variations, depending on whether compatibility with old
7349  * POSIX draft specifications or the final specification is desired and on
7350  * whether the large file compilation environment is active.  To combat a
7351  * combinatorial explosion, enabling large files implies using the final
7352  * specification (since the definition of the large file environment
7353  * considerably postdates that of the final readdir_r specification).
7354  *
7355  * In the LP64 compilation environment, all APIs are already large file,
7356  * and since there are no 64-bit applications that can have seen the
7357  * draft implementation, again, we use the final POSIX specification.
7358  */
7359 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7360 
7361 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7362 #pragma redefine_extname readdir_r readdir64_r
7363 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
7364 
7365 
7366 
7367 
7368 
7369 extern int readdir_r(DIR *, struct dirent *,
7370  struct dirent **);
7371 
7372 
7373 
7374 
7375 
7376 /* transitional large file interface */
7377 extern int readdir64_r(DIR *, struct dirent64 *,
7378  struct dirent64 **);
7379 # 37 "check.c" 2
7380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7381 /*
7382  * CDDL HEADER START
7383  *
7384  * The contents of this file are subject to the terms of the
7385  * Common Development and Distribution License (the "License").
7386  * You may not use this file except in compliance with the License.
7387  *
7388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7389  * or http://www.opensolaris.org/os/licensing.
7390  * See the License for the specific language governing permissions
7391  * and limitations under the License.
7392  *
7393  * When distributing Covered Code, include this CDDL HEADER in each
7394  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7395  * If applicable, add the following below this CDDL HEADER, with the
7396  * fields enclosed by brackets "[]" replaced with your own identifying
7397  * information: Portions Copyright [yyyy] [name of copyright owner]
7398  *
7399  * CDDL HEADER END
7400  */
7401 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7402 /*	  All Rights Reserved  	*/
7403 
7404 
7405 /*
7406  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7407  * Use is subject to license terms.
7408  *
7409  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7410  * Copyright 2016 Joyent, Inc.
7411  */
7412 # 38 "check.c" 2
7413 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
7414 /*
7415  * CDDL HEADER START
7416  *
7417  * The contents of this file are subject to the terms of the
7418  * Common Development and Distribution License, Version 1.0 only
7419  * (the "License").  You may not use this file except in compliance
7420  * with the License.
7421  *
7422  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7423  * or http://www.opensolaris.org/os/licensing.
7424  * See the License for the specific language governing permissions
7425  * and limitations under the License.
7426  *
7427  * When distributing Covered Code, include this CDDL HEADER in each
7428  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7429  * If applicable, add the following below this CDDL HEADER, with the
7430  * fields enclosed by brackets "[]" replaced with your own identifying
7431  * information: Portions Copyright [yyyy] [name of copyright owner]
7432  *
7433  * CDDL HEADER END
7434  */
7435 /*
7436  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7437  * Use is subject to license terms.
7438  */
7439 
7440 /*
7441  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7442  *
7443  * Portions of this file developed by Garrett D'Amore are licensed
7444  * under the terms of the Common Development and Distribution License (CDDL)
7445  * version 1.0 only.  The use of subsequent versions of the License are
7446  * is specifically prohibited unless those terms are not in conflict with
7447  * version 1.0 of the License.  You can find this license on-line at
7448  * http://www.illumos.org/license/CDDL
7449  */
7450 
7451 
7452 
7453 
7454 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
7455 /*
7456  * CDDL HEADER START
7457  *
7458  * The contents of this file are subject to the terms of the
7459  * Common Development and Distribution License, Version 1.0 only
7460  * (the "License").  You may not use this file except in compliance
7461  * with the License.
7462  *
7463  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7464  * or http://www.opensolaris.org/os/licensing.
7465  * See the License for the specific language governing permissions
7466  * and limitations under the License.
7467  *
7468  * When distributing Covered Code, include this CDDL HEADER in each
7469  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7470  * If applicable, add the following below this CDDL HEADER, with the
7471  * fields enclosed by brackets "[]" replaced with your own identifying
7472  * information: Portions Copyright [yyyy] [name of copyright owner]
7473  *
7474  * CDDL HEADER END
7475  */
7476 /*
7477  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7478  * Copyright 2014 PALO, Richard.
7479  *
7480  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7481  * Use is subject to license terms.
7482  */
7483 
7484 /*	Copyright (c) 1988 AT&T	*/
7485 /*	  All Rights Reserved  	*/
7486 
7487 
7488 /*
7489  * An application should not include this header directly.  Instead it
7490  * should be included only through the inclusion of other Sun headers.
7491  *
7492  * The contents of this header is limited to identifiers specified in the
7493  * C Standard.  Any new identifiers specified in future amendments to the
7494  * C Standard must be placed in this header.  If these new identifiers
7495  * are required to also be in the C++ Standard "std" namespace, then for
7496  * anything other than macro definitions, corresponding "using" directives
7497  * must also be added to <locale.h>.
7498  */
7499 
7500 
7501 
7502 
7503 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7504 /*
7505  * CDDL HEADER START
7506  *
7507  * The contents of this file are subject to the terms of the
7508  * Common Development and Distribution License (the "License").
7509  * You may not use this file except in compliance with the License.
7510  *
7511  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7512  * or http://www.opensolaris.org/os/licensing.
7513  * See the License for the specific language governing permissions
7514  * and limitations under the License.
7515  *
7516  * When distributing Covered Code, include this CDDL HEADER in each
7517  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7518  * If applicable, add the following below this CDDL HEADER, with the
7519  * fields enclosed by brackets "[]" replaced with your own identifying
7520  * information: Portions Copyright [yyyy] [name of copyright owner]
7521  *
7522  * CDDL HEADER END
7523  */
7524 
7525 /*
7526  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7527  * Copyright 2016 Joyent, Inc.
7528  *
7529  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7530  * Use is subject to license terms.
7531  */
7532 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
7533 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
7534 /*
7535  * This file and its contents are supplied under the terms of the
7536  * Common Development and Distribution License ("CDDL"), version 1.0.
7537  * You may only use this file in accordance with the terms of version
7538  * 1.0 of the CDDL.
7539  *
7540  * A full copy of the text of the CDDL should have accompanied this
7541  * source.  A copy of the CDDL is also available via the Internet at
7542  * http://www.illumos.org/license/CDDL.
7543  */
7544 
7545 /*
7546  * Copyright 2014-2016 PALO, Richard.
7547  */
7548 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
7549 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
7550 struct lconv {
7551  char *decimal_point;
7552  char *thousands_sep;
7553  char *grouping;
7554  char *int_curr_symbol;
7555  char *currency_symbol;
7556  char *mon_decimal_point;
7557  char *mon_thousands_sep;
7558  char *mon_grouping;
7559  char *positive_sign;
7560  char *negative_sign;
7561  char int_frac_digits;
7562  char frac_digits;
7563  char p_cs_precedes;
7564  char p_sep_by_space;
7565  char n_cs_precedes;
7566  char n_sep_by_space;
7567  char p_sign_posn;
7568  char n_sign_posn;
7569 
7570 /*
7571  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
7572  * standard.  Namespace and binary compatibility dictate that visibility
7573  * of these new members be limited.  Visibility is limited to a strictly
7574  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
7575  */
7576 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
7577 };
7578 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
7579 extern char *setlocale(int, const char *);
7580 extern struct lconv *localeconv(void);
7581 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
7582 
7583 
7584 
7585 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
7586 /*
7587  * CDDL HEADER START
7588  *
7589  * The contents of this file are subject to the terms of the
7590  * Common Development and Distribution License (the "License").
7591  * You may not use this file except in compliance with the License.
7592  *
7593  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7594  * or http://www.opensolaris.org/os/licensing.
7595  * See the License for the specific language governing permissions
7596  * and limitations under the License.
7597  *
7598  * When distributing Covered Code, include this CDDL HEADER in each
7599  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7600  * If applicable, add the following below this CDDL HEADER, with the
7601  * fields enclosed by brackets "[]" replaced with your own identifying
7602  * information: Portions Copyright [yyyy] [name of copyright owner]
7603  *
7604  * CDDL HEADER END
7605  */
7606 /*
7607  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7608  *
7609  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7610  * Use is subject to license terms.
7611  */
7612 
7613 
7614 
7615 
7616 
7617 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
7618 /*
7619  * CDDL HEADER START
7620  *
7621  * The contents of this file are subject to the terms of the
7622  * Common Development and Distribution License (the "License").
7623  * You may not use this file except in compliance with the License.
7624  *
7625  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7626  * or http://www.opensolaris.org/os/licensing.
7627  * See the License for the specific language governing permissions
7628  * and limitations under the License.
7629  *
7630  *
7631  * When distributing Covered Code, include this CDDL HEADER in each
7632  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7633  * If applicable, add the following below this CDDL HEADER, with the
7634  * fields enclosed by brackets "[]" replaced with your own identifying
7635  * information: Portions Copyright [yyyy] [name of copyright owner]
7636  *
7637  * CDDL HEADER END
7638  */
7639 
7640 /*
7641  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7642  * Use is subject to license terms.
7643  * Copyright 2016 Joyent, Inc.
7644  */
7645 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
7646 
7647 
7648 
7649 
7650 
7651 /*
7652  * wchar_t is a built-in type in standard C++ and as such is not
7653  * defined here when using standard C++. However, the GNU compiler
7654  * fixincludes utility nonetheless creates its own version of this
7655  * header for use by gcc and g++. In that version it adds a redundant
7656  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
7657  * header we need to include the following magic comment:
7658  *
7659  * we must use the C++ compiler's type
7660  *
7661  * The above comment should not be removed or changed until GNU
7662  * gcc/fixinc/inclhack.def is updated to bypass this header.
7663  */
7664 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
7665 extern char *dcgettext(const char *, const char *, const int);
7666 extern char *dgettext(const char *, const char *);
7667 extern char *gettext(const char *);
7668 extern char *textdomain(const char *);
7669 extern char *bindtextdomain(const char *, const char *);
7670 
7671 /*
7672  * LI18NUX 2000 Globalization Specification Version 1.0
7673  * with Amendment 2
7674  */
7675 extern char *dcngettext(const char *, const char *,
7676  const char *, unsigned long int, int);
7677 extern char *dngettext(const char *, const char *,
7678  const char *, unsigned long int);
7679 extern char *ngettext(const char *, const char *, unsigned long int);
7680 extern char *bind_textdomain_codeset(const char *, const char *);
7681 
7682 /* Word handling functions --- requires dynamic linking */
7683 /* Warning: these are experimental and subject to change. */
7684 extern int wdinit(void);
7685 extern int wdchkind(wchar_t);
7686 extern int wdbindf(wchar_t, wchar_t, int);
7687 extern wchar_t *wddelim(wchar_t, wchar_t, int);
7688 extern wchar_t mcfiller(void);
7689 extern int mcwrap(void);
7690 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
7691 
7692 
7693 /*
7694  * Allow global visibility for symbols defined in
7695  * C++ "std" namespace in <iso/locale_iso.h>.
7696  */
7697 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
7698 /*
7699  * These were added in POSIX 2008 as part of the newlocale() specification.
7700  */
7701 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
7702 extern locale_t duplocale(locale_t);
7703 extern void freelocale(locale_t);
7704 extern locale_t newlocale(int, const char *, locale_t);
7705 extern locale_t uselocale(locale_t);
7706 
7707 
7708 extern locale_t __global_locale(void);
7709 # 39 "check.c" 2
7710 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
7711 /*
7712  * CDDL HEADER START
7713  *
7714  * The contents of this file are subject to the terms of the
7715  * Common Development and Distribution License (the "License").
7716  * You may not use this file except in compliance with the License.
7717  *
7718  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7719  * or http://www.opensolaris.org/os/licensing.
7720  * See the License for the specific language governing permissions
7721  * and limitations under the License.
7722  *
7723  * When distributing Covered Code, include this CDDL HEADER in each
7724  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7725  * If applicable, add the following below this CDDL HEADER, with the
7726  * fields enclosed by brackets "[]" replaced with your own identifying
7727  * information: Portions Copyright [yyyy] [name of copyright owner]
7728  *
7729  * CDDL HEADER END
7730  */
7731 /*
7732  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7733  *
7734  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7735  * Use is subject to license terms.
7736  */
7737 # 40 "check.c" 2
7738 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
7739 /*
7740  * CDDL HEADER START
7741  *
7742  * The contents of this file are subject to the terms of the
7743  * Common Development and Distribution License (the "License").
7744  * You may not use this file except in compliance with the License.
7745  *
7746  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7747  * or http://www.opensolaris.org/os/licensing.
7748  * See the License for the specific language governing permissions
7749  * and limitations under the License.
7750  *
7751  * When distributing Covered Code, include this CDDL HEADER in each
7752  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7753  * If applicable, add the following below this CDDL HEADER, with the
7754  * fields enclosed by brackets "[]" replaced with your own identifying
7755  * information: Portions Copyright [yyyy] [name of copyright owner]
7756  *
7757  * CDDL HEADER END
7758  */
7759 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7760 /*	  All Rights Reserved  	*/
7761 
7762 /*
7763  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7764  * Use is subject to license terms.
7765  */
7766 
7767 
7768 
7769 
7770 #pragma ident "%Z%%M%	%I%	%E% SMI"
7771 
7772 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
7773 /*
7774  * CDDL HEADER START
7775  *
7776  * The contents of this file are subject to the terms of the
7777  * Common Development and Distribution License (the "License").
7778  * You may not use this file except in compliance with the License.
7779  *
7780  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7781  * or http://www.opensolaris.org/os/licensing.
7782  * See the License for the specific language governing permissions
7783  * and limitations under the License.
7784  *
7785  * When distributing Covered Code, include this CDDL HEADER in each
7786  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7787  * If applicable, add the following below this CDDL HEADER, with the
7788  * fields enclosed by brackets "[]" replaced with your own identifying
7789  * information: Portions Copyright [yyyy] [name of copyright owner]
7790  *
7791  * CDDL HEADER END
7792  */
7793 /*	Copyright (c) 1988 AT&T	*/
7794 /*	  All Rights Reserved  	*/
7795 
7796 
7797 /*
7798  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7799  *
7800  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7801  * Use is subject to license terms.
7802  */
7803 /*
7804  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
7805  * Copyright 2016 Joyent, Inc.
7806  */
7807 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
7808 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
7809 extern char *errstr;
7810 
7811 struct ainfo {
7812  char *local;
7813  mode_t mode;
7814  char owner[64 +1];
7815  char group[64 +1];
7816  major_t major;
7817  minor_t minor;
7818 };
7819 
7820 struct cinfo {
7821  long cksum;
7822  fsblkcnt_t size;
7823  time_t modtime;
7824 };
7825 
7826 struct pinfo {
7827  char status;
7828  char pkg[64 +1];
7829  char editflag;
7830  char aclass[64 +1];
7831  struct pinfo
7832   *next;
7833 };
7834 
7835 struct cfent {
7836  short volno;
7837  char ftype;
7838  char pkg_class[64 +1];
7839  int pkg_class_idx;
7840  char *path;
7841  struct ainfo ainfo;
7842  struct cinfo cinfo;
7843  short npkgs;
7844  struct pinfo
7845   *pinfo;
7846 };
7847 
7848 /* averify() & cverify() error codes */
7849 # 41 "check.c" 2
7850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkglocs.h" 1
7851 /*
7852  * CDDL HEADER START
7853  *
7854  * The contents of this file are subject to the terms of the
7855  * Common Development and Distribution License, Version 1.0 only
7856  * (the "License").  You may not use this file except in compliance
7857  * with the License.
7858  *
7859  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7860  * or http://www.opensolaris.org/os/licensing.
7861  * See the License for the specific language governing permissions
7862  * and limitations under the License.
7863  *
7864  * When distributing Covered Code, include this CDDL HEADER in each
7865  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7866  * If applicable, add the following below this CDDL HEADER, with the
7867  * fields enclosed by brackets "[]" replaced with your own identifying
7868  * information: Portions Copyright [yyyy] [name of copyright owner]
7869  *
7870  * CDDL HEADER END
7871  */
7872 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7873 /*	  All Rights Reserved  	*/
7874 # 42 "check.c" 2
7875 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h" 1
7876 /*
7877  * CDDL HEADER START
7878  *
7879  * The contents of this file are subject to the terms of the
7880  * Common Development and Distribution License, Version 1.0 only
7881  * (the "License").  You may not use this file except in compliance
7882  * with the License.
7883  *
7884  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7885  * or http://www.opensolaris.org/os/licensing.
7886  * See the License for the specific language governing permissions
7887  * and limitations under the License.
7888  *
7889  * When distributing Covered Code, include this CDDL HEADER in each
7890  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7891  * If applicable, add the following below this CDDL HEADER, with the
7892  * fields enclosed by brackets "[]" replaced with your own identifying
7893  * information: Portions Copyright [yyyy] [name of copyright owner]
7894  *
7895  * CDDL HEADER END
7896  */
7897 /*	Copyright (c) 1988 AT&T	*/
7898 /*	  All Rights Reserved  	*/
7899 
7900 /*
7901  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7902  * Copyright 2016 Joyent, Inc.
7903  * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
7904  *
7905  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7906  * Use is subject to license terms.
7907  */
7908 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
7909 extern void __assert(const char *, const char *, int);
7910 
7911 
7912 /*
7913  * In C11 the static_assert macro is always defined, unlike the assert macro.
7914  */
7915 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
7916 /*
7917  * Note that the ANSI C Standard requires all headers to be idempotent except
7918  * <assert.h> which is explicitly required not to be idempotent (section 4.1.2).
7919  * Therefore, it is by intent that the header guards (#ifndef _ASSERT_H) do
7920  * not span this entire file.
7921  */
7922 # 43 "check.c" 2
7923 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
7924 /*
7925  * CDDL HEADER START
7926  *
7927  * The contents of this file are subject to the terms of the
7928  * Common Development and Distribution License (the "License").
7929  * You may not use this file except in compliance with the License.
7930  *
7931  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7932  * or http://www.opensolaris.org/os/licensing.
7933  * See the License for the specific language governing permissions
7934  * and limitations under the License.
7935  *
7936  * When distributing Covered Code, include this CDDL HEADER in each
7937  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7938  * If applicable, add the following below this CDDL HEADER, with the
7939  * fields enclosed by brackets "[]" replaced with your own identifying
7940  * information: Portions Copyright [yyyy] [name of copyright owner]
7941  *
7942  * CDDL HEADER END
7943  */
7944 
7945 /*
7946  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7947  * Use is subject to license terms.
7948  */
7949 
7950 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7951 /* All Rights Reserved */
7952 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
7953 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7954 /*
7955  * CDDL HEADER START
7956  *
7957  * The contents of this file are subject to the terms of the
7958  * Common Development and Distribution License (the "License").
7959  * You may not use this file except in compliance with the License.
7960  *
7961  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7962  * or http://www.opensolaris.org/os/licensing.
7963  * See the License for the specific language governing permissions
7964  * and limitations under the License.
7965  *
7966  * When distributing Covered Code, include this CDDL HEADER in each
7967  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7968  * If applicable, add the following below this CDDL HEADER, with the
7969  * fields enclosed by brackets "[]" replaced with your own identifying
7970  * information: Portions Copyright [yyyy] [name of copyright owner]
7971  *
7972  * CDDL HEADER END
7973  */
7974 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7975 /*	  All Rights Reserved  	*/
7976 
7977 
7978 /*
7979  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7980  * Use is subject to license terms.
7981  *
7982  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7983  * Copyright 2016 Joyent, Inc.
7984  */
7985 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7986 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
7987 /*
7988  * CDDL HEADER START
7989  *
7990  * The contents of this file are subject to the terms of the
7991  * Common Development and Distribution License (the "License").
7992  * You may not use this file except in compliance with the License.
7993  *
7994  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7995  * or http://www.opensolaris.org/os/licensing.
7996  * See the License for the specific language governing permissions
7997  * and limitations under the License.
7998  *
7999  * When distributing Covered Code, include this CDDL HEADER in each
8000  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8001  * If applicable, add the following below this CDDL HEADER, with the
8002  * fields enclosed by brackets "[]" replaced with your own identifying
8003  * information: Portions Copyright [yyyy] [name of copyright owner]
8004  *
8005  * CDDL HEADER END
8006  */
8007 
8008 /*
8009  * Copyright (c) 2013 Gary Mills
8010  *
8011  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
8012  * Use is subject to license terms.
8013  */
8014 
8015 /*	Copyright (c) 1988 AT&T	*/
8016 /*	  All Rights Reserved  	*/
8017 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
8018 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
8019 /*
8020  * CDDL HEADER START
8021  *
8022  * The contents of this file are subject to the terms of the
8023  * Common Development and Distribution License (the "License").
8024  * You may not use this file except in compliance with the License.
8025  *
8026  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8027  * or http://www.opensolaris.org/os/licensing.
8028  * See the License for the specific language governing permissions
8029  * and limitations under the License.
8030  *
8031  * When distributing Covered Code, include this CDDL HEADER in each
8032  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8033  * If applicable, add the following below this CDDL HEADER, with the
8034  * fields enclosed by brackets "[]" replaced with your own identifying
8035  * information: Portions Copyright [yyyy] [name of copyright owner]
8036  *
8037  * CDDL HEADER END
8038  */
8039 
8040 /*
8041  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8042  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8043  */
8044 
8045 /*	Copyright (c) 1988 AT&T	*/
8046 /*	  All Rights Reserved  	*/
8047 
8048 /*
8049  * User-visible pieces of the ANSI C standard I/O package.
8050  */
8051 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
8052 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
8053 /*
8054  * CDDL HEADER START
8055  *
8056  * The contents of this file are subject to the terms of the
8057  * Common Development and Distribution License, Version 1.0 only
8058  * (the "License").  You may not use this file except in compliance
8059  * with the License.
8060  *
8061  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8062  * or http://www.opensolaris.org/os/licensing.
8063  * See the License for the specific language governing permissions
8064  * and limitations under the License.
8065  *
8066  * When distributing Covered Code, include this CDDL HEADER in each
8067  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8068  * If applicable, add the following below this CDDL HEADER, with the
8069  * fields enclosed by brackets "[]" replaced with your own identifying
8070  * information: Portions Copyright [yyyy] [name of copyright owner]
8071  *
8072  * CDDL HEADER END
8073  */
8074 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8075 /*	  All Rights Reserved  	*/
8076 
8077 
8078 
8079 
8080 
8081 #pragma ident "%Z%%M%	%I%	%E% SMI"
8082 
8083 
8084 
8085 
8086 
8087 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8088 /*
8089  * CDDL HEADER START
8090  *
8091  * The contents of this file are subject to the terms of the
8092  * Common Development and Distribution License (the "License").
8093  * You may not use this file except in compliance with the License.
8094  *
8095  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8096  * or http://www.opensolaris.org/os/licensing.
8097  * See the License for the specific language governing permissions
8098  * and limitations under the License.
8099  *
8100  * When distributing Covered Code, include this CDDL HEADER in each
8101  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8102  * If applicable, add the following below this CDDL HEADER, with the
8103  * fields enclosed by brackets "[]" replaced with your own identifying
8104  * information: Portions Copyright [yyyy] [name of copyright owner]
8105  *
8106  * CDDL HEADER END
8107  */
8108 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8109 /*	  All Rights Reserved  	*/
8110 
8111 
8112 /*
8113  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8114  * Use is subject to license terms.
8115  *
8116  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8117  * Copyright 2016 Joyent, Inc.
8118  */
8119 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
8120 
8121 struct pkgdev {
8122  int rdonly;
8123  int mntflg;
8124  longlong_t capacity; /* number of 512-blocks on device */
8125  char *name;
8126  char *dirname;
8127  char *pathname;
8128  char *mount;
8129  char *fstyp;
8130  char *cdevice;
8131  char *bdevice;
8132  char *norewind;
8133 };
8134 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
8135 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
8136 /*
8137  * CDDL HEADER START
8138  *
8139  * The contents of this file are subject to the terms of the
8140  * Common Development and Distribution License (the "License").
8141  * You may not use this file except in compliance with the License.
8142  *
8143  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8144  * or http://www.opensolaris.org/os/licensing.
8145  * See the License for the specific language governing permissions
8146  * and limitations under the License.
8147  *
8148  * When distributing Covered Code, include this CDDL HEADER in each
8149  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8150  * If applicable, add the following below this CDDL HEADER, with the
8151  * fields enclosed by brackets "[]" replaced with your own identifying
8152  * information: Portions Copyright [yyyy] [name of copyright owner]
8153  *
8154  * CDDL HEADER END
8155  */
8156 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8157 /*	  All Rights Reserved  	*/
8158 
8159 /*
8160  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
8161  * Use is subject to license terms.
8162  */
8163 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
8164 # 1 "/usr/include/openssl/bio.h" 1 3 4
8165 /* crypto/bio/bio.h */
8166 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8167  * All rights reserved.
8168  *
8169  * This package is an SSL implementation written
8170  * by Eric Young (eay@cryptsoft.com).
8171  * The implementation was written so as to conform with Netscapes SSL.
8172  *
8173  * This library is free for commercial and non-commercial use as long as
8174  * the following conditions are aheared to.  The following conditions
8175  * apply to all code found in this distribution, be it the RC4, RSA,
8176  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8177  * included with this distribution is covered by the same copyright terms
8178  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8179  *
8180  * Copyright remains Eric Young's, and as such any Copyright notices in
8181  * the code are not to be removed.
8182  * If this package is used in a product, Eric Young should be given attribution
8183  * as the author of the parts of the library used.
8184  * This can be in the form of a textual message at program startup or
8185  * in documentation (online or textual) provided with the package.
8186  *
8187  * Redistribution and use in source and binary forms, with or without
8188  * modification, are permitted provided that the following conditions
8189  * are met:
8190  * 1. Redistributions of source code must retain the copyright
8191  *    notice, this list of conditions and the following disclaimer.
8192  * 2. Redistributions in binary form must reproduce the above copyright
8193  *    notice, this list of conditions and the following disclaimer in the
8194  *    documentation and/or other materials provided with the distribution.
8195  * 3. All advertising materials mentioning features or use of this software
8196  *    must display the following acknowledgement:
8197  *    "This product includes cryptographic software written by
8198  *     Eric Young (eay@cryptsoft.com)"
8199  *    The word 'cryptographic' can be left out if the rouines from the library
8200  *    being used are not cryptographic related :-).
8201  * 4. If you include any Windows specific code (or a derivative thereof) from
8202  *    the apps directory (application code) you must include an acknowledgement:
8203  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8204  *
8205  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8206  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8207  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8208  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8209  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8210  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8211  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8212  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8213  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8214  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8215  * SUCH DAMAGE.
8216  *
8217  * The licence and distribution terms for any publically available version or
8218  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8219  * copied and put under another distribution licence
8220  * [including the GNU Public Licence.]
8221  */
8222 
8223 
8224 
8225 
8226 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8227 /* e_os2.h */
8228 /* ====================================================================
8229  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8230  *
8231  * Redistribution and use in source and binary forms, with or without
8232  * modification, are permitted provided that the following conditions
8233  * are met:
8234  *
8235  * 1. Redistributions of source code must retain the above copyright
8236  *    notice, this list of conditions and the following disclaimer.
8237  *
8238  * 2. Redistributions in binary form must reproduce the above copyright
8239  *    notice, this list of conditions and the following disclaimer in
8240  *    the documentation and/or other materials provided with the
8241  *    distribution.
8242  *
8243  * 3. All advertising materials mentioning features or use of this
8244  *    software must display the following acknowledgment:
8245  *    "This product includes software developed by the OpenSSL Project
8246  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8247  *
8248  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8249  *    endorse or promote products derived from this software without
8250  *    prior written permission. For written permission, please contact
8251  *    openssl-core@openssl.org.
8252  *
8253  * 5. Products derived from this software may not be called "OpenSSL"
8254  *    nor may "OpenSSL" appear in their names without prior written
8255  *    permission of the OpenSSL Project.
8256  *
8257  * 6. Redistributions of any form whatsoever must retain the following
8258  *    acknowledgment:
8259  *    "This product includes software developed by the OpenSSL Project
8260  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8261  *
8262  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8263  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8264  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8265  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8266  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8267  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8268  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8269  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8270  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8271  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8272  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8273  * OF THE POSSIBILITY OF SUCH DAMAGE.
8274  * ====================================================================
8275  *
8276  * This product includes cryptographic software written by Eric Young
8277  * (eay@cryptsoft.com).  This product includes software written by Tim
8278  * Hudson (tjh@cryptsoft.com).
8279  *
8280  */
8281 
8282 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8283 /* opensslconf.h */
8284 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8285 
8286 
8287 
8288 
8289 /* OpenSSL was configured with the following options: */
8290 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8291 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8292    asks for it.  This is a transient feature that is provided for those
8293    who haven't had the time to do the appropriate changes in their
8294    applications.  */
8295 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8296 /* crypto/opensslconf.h.in */
8297 
8298 /* Generate 80386 code? */
8299 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8300 # 65 "/usr/include/openssl/e_os2.h" 3 4
8301 /******************************************************************************
8302  * Detect operating systems.  This probably needs completing.
8303  * The result is that at least one OPENSSL_SYS_os macro should be defined.
8304  * However, if none is defined, Unix is assumed.
8305  **/
8306 
8307 
8308 
8309 /* ---------------------- Macintosh, before MacOS X ----------------------- */
8310 
8311 
8312 
8313 
8314 
8315 /* ---------------------- NetWare ----------------------------------------- */
8316 
8317 
8318 
8319 
8320 
8321 /* --------------------- Microsoft operating systems ---------------------- */
8322 
8323 /*
8324  * Note that MSDOS actually denotes 32-bit environments running on top of
8325  * MS-DOS, such as DJGPP one.
8326  */
8327 
8328 
8329 
8330 
8331 
8332 /*
8333  * For 32 bit environment, there seems to be the CygWin environment and then
8334  * all the others that try to do the same thing Microsoft does...
8335  */
8336 # 129 "/usr/include/openssl/e_os2.h" 3 4
8337 /* Anything that tries to look like Microsoft is "Windows" */
8338 # 138 "/usr/include/openssl/e_os2.h" 3 4
8339 /*
8340  * DLL settings.  This part is a bit tough, because it's up to the
8341  * application implementor how he or she will link the application, so it
8342  * requires some macro to be used.
8343  */
8344 # 152 "/usr/include/openssl/e_os2.h" 3 4
8345 /* ------------------------------- OpenVMS -------------------------------- */
8346 # 166 "/usr/include/openssl/e_os2.h" 3 4
8347 /* -------------------------------- OS/2 ---------------------------------- */
8348 
8349 
8350 
8351 
8352 
8353 /* -------------------------------- Unix ---------------------------------- */
8354 # 207 "/usr/include/openssl/e_os2.h" 3 4
8355 /* -------------------------------- VOS ----------------------------------- */
8356 # 218 "/usr/include/openssl/e_os2.h" 3 4
8357 /* ------------------------------ VxWorks --------------------------------- */
8358 
8359 
8360 
8361 
8362 /* -------------------------------- BeOS ---------------------------------- */
8363 # 234 "/usr/include/openssl/e_os2.h" 3 4
8364 /**
8365  * That's it for OS-specific stuff
8366  *****************************************************************************/
8367 
8368 /* Specials for I/O an exit */
8369 # 247 "/usr/include/openssl/e_os2.h" 3 4
8370 /*-
8371  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
8372  * certain global symbols that, with some compilers under VMS, have to be
8373  * defined and declared explicitely with globaldef and globalref.
8374  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
8375  * DLL exports and imports for compilers under Win32.  These are a little
8376  * more complicated to use.  Basically, for any library that exports some
8377  * global variables, the following code must be present in the header file
8378  * that declares them, before OPENSSL_EXTERN is used:
8379  *
8380  * #ifdef SOME_BUILD_FLAG_MACRO
8381  * # undef OPENSSL_EXTERN
8382  * # define OPENSSL_EXTERN OPENSSL_EXPORT
8383  * #endif
8384  *
8385  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
8386  * have some generally sensible values, and for OPENSSL_EXTERN to have the
8387  * value OPENSSL_IMPORT.
8388  */
8389 # 282 "/usr/include/openssl/e_os2.h" 3 4
8390 /*-
8391  * Macros to allow global variables to be reached through function calls when
8392  * required (if a shared library version requires it, for example.
8393  * The way it's done allows definitions like this:
8394  *
8395  *      // in foobar.c
8396  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
8397  *      // in foobar.h
8398  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
8399  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
8400  */
8401 # 63 "/usr/include/openssl/bio.h" 2 3 4
8402 
8403 
8404 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
8405 /*
8406  * CDDL HEADER START
8407  *
8408  * The contents of this file are subject to the terms of the
8409  * Common Development and Distribution License (the "License").
8410  * You may not use this file except in compliance with the License.
8411  *
8412  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8413  * or http://www.opensolaris.org/os/licensing.
8414  * See the License for the specific language governing permissions
8415  * and limitations under the License.
8416  *
8417  * When distributing Covered Code, include this CDDL HEADER in each
8418  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8419  * If applicable, add the following below this CDDL HEADER, with the
8420  * fields enclosed by brackets "[]" replaced with your own identifying
8421  * information: Portions Copyright [yyyy] [name of copyright owner]
8422  *
8423  * CDDL HEADER END
8424  */
8425 
8426 /*
8427  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8428  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8429  */
8430 
8431 /*	Copyright (c) 1988 AT&T	*/
8432 /*	  All Rights Reserved  	*/
8433 
8434 /*
8435  * User-visible pieces of the ANSI C standard I/O package.
8436  */
8437 # 66 "/usr/include/openssl/bio.h" 2 3 4
8438 
8439 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
8440 /*
8441  * CDDL HEADER START
8442  *
8443  * The contents of this file are subject to the terms of the
8444  * Common Development and Distribution License, Version 1.0 only
8445  * (the "License").  You may not use this file except in compliance
8446  * with the License.
8447  *
8448  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8449  * or http://www.opensolaris.org/os/licensing.
8450  * See the License for the specific language governing permissions
8451  * and limitations under the License.
8452  *
8453  * When distributing Covered Code, include this CDDL HEADER in each
8454  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8455  * If applicable, add the following below this CDDL HEADER, with the
8456  * fields enclosed by brackets "[]" replaced with your own identifying
8457  * information: Portions Copyright [yyyy] [name of copyright owner]
8458  *
8459  * CDDL HEADER END
8460  */
8461 /*	Copyright (c) 1988 AT&T	*/
8462 /*	  All Rights Reserved	*/
8463 
8464 /*
8465  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8466  *
8467  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8468  * Use is subject to license terms.
8469  */
8470 
8471 
8472 
8473 
8474 /*
8475  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
8476  * variable argument definitions.  For legacy support, it also defines
8477  * the pre-standard variable argument definitions.
8478  *
8479  * The varargs definitions within this header are defined in terms of
8480  * implementation definitions.  These implementation definitions reside
8481  * in <sys/va_list.h>.  This organization enables protected use of
8482  * the implementation by other standard headers without introducing
8483  * names into the users' namespace.
8484  */
8485 
8486 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
8487 /*
8488  * CDDL HEADER START
8489  *
8490  * The contents of this file are subject to the terms of the
8491  * Common Development and Distribution License, Version 1.0 only
8492  * (the "License").  You may not use this file except in compliance
8493  * with the License.
8494  *
8495  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8496  * or http://www.opensolaris.org/os/licensing.
8497  * See the License for the specific language governing permissions
8498  * and limitations under the License.
8499  *
8500  * When distributing Covered Code, include this CDDL HEADER in each
8501  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8502  * If applicable, add the following below this CDDL HEADER, with the
8503  * fields enclosed by brackets "[]" replaced with your own identifying
8504  * information: Portions Copyright [yyyy] [name of copyright owner]
8505  *
8506  * CDDL HEADER END
8507  */
8508 /*	Copyright (c) 1988 AT&T	*/
8509 /*	  All Rights Reserved  	*/
8510 
8511 
8512 /*
8513  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8514  * Use is subject to license terms.
8515  */
8516 
8517 /*
8518  * An application should not include this header directly.  Instead it
8519  * should be included only through the inclusion of other Sun headers.
8520  *
8521  * The contents of this header is limited to identifiers specified in the
8522  * C Standard.  Any new identifiers specified in future amendments to the
8523  * C Standard must be placed in this header.  If these new identifiers
8524  * are required to also be in the C++ Standard "std" namespace, then for
8525  * anything other than macro definitions, corresponding "using" directives
8526  * must also be added to <stdarg.h>.
8527  */
8528 
8529 
8530 
8531 
8532 #pragma ident "%Z%%M%	%I%	%E% SMI"
8533 
8534 /*
8535  * This header defines the ISO C 1989 and ISO C++ 1998 variable
8536  * argument definitions.
8537  *
8538  * The varargs definitions within this header are defined in terms of
8539  * implementation definitions.  These implementation definitions reside
8540  * in <sys/va_impl.h>.  This organization enables protected use of
8541  * the implementation by other standard headers without introducing
8542  * names into the users' namespace.
8543  */
8544 
8545 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
8546 /*
8547  * CDDL HEADER START
8548  *
8549  * The contents of this file are subject to the terms of the
8550  * Common Development and Distribution License, Version 1.0 only
8551  * (the "License").  You may not use this file except in compliance
8552  * with the License.
8553  *
8554  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8555  * or http://www.opensolaris.org/os/licensing.
8556  * See the License for the specific language governing permissions
8557  * and limitations under the License.
8558  *
8559  * When distributing Covered Code, include this CDDL HEADER in each
8560  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8561  * If applicable, add the following below this CDDL HEADER, with the
8562  * fields enclosed by brackets "[]" replaced with your own identifying
8563  * information: Portions Copyright [yyyy] [name of copyright owner]
8564  *
8565  * CDDL HEADER END
8566  */
8567 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8568 /*	  All Rights Reserved	*/
8569 
8570 
8571 /*
8572  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8573  *
8574  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8575  * Use is subject to license terms.
8576  */
8577 
8578 
8579 
8580 
8581 /*
8582  * An application should not include this header directly.  Instead it
8583  * should be included only through the inclusion of other Sun headers,
8584  * specifically <stdarg.h> and <varargs.h>.
8585  *
8586  * This header serves two purposes.
8587  *
8588  * First, it provides a common set of definitions that implementations
8589  * of the various standards for variable argument lists may use.  These
8590  * various standards are implemented in <varargs.h>, <stdarg.h>,
8591  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
8592  *
8593  * Second, it provides varying implementations of the common definitions,
8594  * depending upon the compiler.
8595  */
8596 
8597 /*
8598  * The common definitions exported by this header or compilers using
8599  * this header are:
8600  *
8601  * the macro __va_start(list, name) starting the list iteration
8602  * the macro __va_arg(list, type) getting the current arg and iterating
8603  * the macro __va_copy(to, from) to bookmark the list iteration
8604  * the macro __va_end(list) to end the iteration
8605  *
8606  * In addition, the following are exported via inclusion of <sys/va_list.h>:
8607  *
8608  * the identifier __builtin_va_alist for the variable list pseudo parameter
8609  * the type __va_alist_type for the variable list pseudo parameter
8610  * the type __va_list defining the type of the variable list iterator
8611  */
8612 
8613 /*
8614  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
8615  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
8616  * macros (e.g. __sparc) to determine the protocol appropriate to the
8617  * current compilation.  It is intended that the compilation system
8618  * define the feature, processor, and compiler macros, not the user of
8619  * the system.
8620  */
8621 
8622 /*
8623  * Many compilation systems depend upon the use of special functions
8624  * built into the the compilation system to handle variable argument
8625  * lists.  These built-in symbols may include one or more of the
8626  * following:
8627  *
8628  *      __builtin_va_alist
8629  *      __builtin_va_start
8630  *      __builtin_va_arg_incr
8631  *      __builtin_stdarg_start
8632  *      __builtin_va_end
8633  *      __builtin_va_arg
8634  *      __builtin_va_copy
8635  */
8636 
8637 /*
8638  * The following are defined in <sys/va_list.h>:
8639  *
8640  *      __va_alist_type
8641  *      __va_void()
8642  *      __va_ptr_base
8643  *      ISA definitions via inclusion of <sys/isa_defs.h>
8644  *
8645  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
8646  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
8647  * via inclusion of <iso/stdarg_iso.h>.
8648  */
8649 
8650 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
8651 /*
8652  * CDDL HEADER START
8653  *
8654  * The contents of this file are subject to the terms of the
8655  * Common Development and Distribution License, Version 1.0 only
8656  * (the "License").  You may not use this file except in compliance
8657  * with the License.
8658  *
8659  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8660  * or http://www.opensolaris.org/os/licensing.
8661  * See the License for the specific language governing permissions
8662  * and limitations under the License.
8663  *
8664  * When distributing Covered Code, include this CDDL HEADER in each
8665  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8666  * If applicable, add the following below this CDDL HEADER, with the
8667  * fields enclosed by brackets "[]" replaced with your own identifying
8668  * information: Portions Copyright [yyyy] [name of copyright owner]
8669  *
8670  * CDDL HEADER END
8671  */
8672 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8673 /*	  All Rights Reserved	*/
8674 
8675 
8676 /*
8677  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8678  *
8679  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8680  * Use is subject to license terms.
8681  */
8682 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
8683 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
8684 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
8685 typedef __va_list va_list;
8686 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
8687 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
8688 /*
8689  * CDDL HEADER START
8690  *
8691  * The contents of this file are subject to the terms of the
8692  * Common Development and Distribution License, Version 1.0 only
8693  * (the "License").  You may not use this file except in compliance
8694  * with the License.
8695  *
8696  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8697  * or http://www.opensolaris.org/os/licensing.
8698  * See the License for the specific language governing permissions
8699  * and limitations under the License.
8700  *
8701  * When distributing Covered Code, include this CDDL HEADER in each
8702  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8703  * If applicable, add the following below this CDDL HEADER, with the
8704  * fields enclosed by brackets "[]" replaced with your own identifying
8705  * information: Portions Copyright [yyyy] [name of copyright owner]
8706  *
8707  * CDDL HEADER END
8708  */
8709 /*	Copyright (c) 1988 AT&T	*/
8710 /*	  All Rights Reserved	*/
8711 
8712 
8713 /*
8714  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8715  * Use is subject to license terms.
8716  */
8717 
8718 
8719 
8720 
8721 #pragma ident "%Z%%M%	%I%	%E% SMI"
8722 
8723 /*
8724  * An application should not include this header directly.  Instead it
8725  * should be included only through the inclusion of other Sun headers.
8726  *
8727  * This header defines the va_copy variable argument macro, which is
8728  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
8729  * 1998.  Because this macro is a long-standing Solaris extension, it
8730  * is also permitted in other contexts.
8731  *
8732  * The varargs definitions within this header are defined in terms of
8733  * implementation definitions.  These implementation definitions reside
8734  * in <sys/va_list.h>.  This organization enables protected use of
8735  * the implementation by other standard headers without introducing
8736  * names into the users' namespace.
8737  */
8738 
8739 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
8740 /*
8741  * CDDL HEADER START
8742  *
8743  * The contents of this file are subject to the terms of the
8744  * Common Development and Distribution License (the "License").
8745  * You may not use this file except in compliance with the License.
8746  *
8747  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8748  * or http://www.opensolaris.org/os/licensing.
8749  * See the License for the specific language governing permissions
8750  * and limitations under the License.
8751  *
8752  * When distributing Covered Code, include this CDDL HEADER in each
8753  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8754  * If applicable, add the following below this CDDL HEADER, with the
8755  * fields enclosed by brackets "[]" replaced with your own identifying
8756  * information: Portions Copyright [yyyy] [name of copyright owner]
8757  *
8758  * CDDL HEADER END
8759  */
8760 
8761 /*
8762  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8763  * Copyright 2016 Joyent, Inc.
8764  *
8765  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8766  * Use is subject to license terms.
8767  */
8768 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
8769 
8770 
8771 
8772 
8773 
8774 /*
8775  * va_copy was initially a Solaris extension to provide a portable
8776  * way to perform a variable argument list ``bookmarking'' function.
8777  * It is now specified in the ISO/IEC 9899:1999 standard.
8778  */
8779 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
8780 
8781 /*
8782  * Allow global visibility for symbols defined in
8783  * C++ "std" namespace in <iso/stdarg_iso.h>.
8784  */
8785 # 68 "/usr/include/openssl/bio.h" 2 3 4
8786 
8787 # 1 "/usr/include/openssl/crypto.h" 1 3 4
8788 /* crypto/crypto.h */
8789 /* ====================================================================
8790  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
8791  *
8792  * Redistribution and use in source and binary forms, with or without
8793  * modification, are permitted provided that the following conditions
8794  * are met:
8795  *
8796  * 1. Redistributions of source code must retain the above copyright
8797  *    notice, this list of conditions and the following disclaimer.
8798  *
8799  * 2. Redistributions in binary form must reproduce the above copyright
8800  *    notice, this list of conditions and the following disclaimer in
8801  *    the documentation and/or other materials provided with the
8802  *    distribution.
8803  *
8804  * 3. All advertising materials mentioning features or use of this
8805  *    software must display the following acknowledgment:
8806  *    "This product includes software developed by the OpenSSL Project
8807  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8808  *
8809  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8810  *    endorse or promote products derived from this software without
8811  *    prior written permission. For written permission, please contact
8812  *    openssl-core@openssl.org.
8813  *
8814  * 5. Products derived from this software may not be called "OpenSSL"
8815  *    nor may "OpenSSL" appear in their names without prior written
8816  *    permission of the OpenSSL Project.
8817  *
8818  * 6. Redistributions of any form whatsoever must retain the following
8819  *    acknowledgment:
8820  *    "This product includes software developed by the OpenSSL Project
8821  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8822  *
8823  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8824  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8825  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8826  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8827  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8828  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8829  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8830  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8831  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8832  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8833  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8834  * OF THE POSSIBILITY OF SUCH DAMAGE.
8835  * ====================================================================
8836  *
8837  * This product includes cryptographic software written by Eric Young
8838  * (eay@cryptsoft.com).  This product includes software written by Tim
8839  * Hudson (tjh@cryptsoft.com).
8840  *
8841  */
8842 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8843  * All rights reserved.
8844  *
8845  * This package is an SSL implementation written
8846  * by Eric Young (eay@cryptsoft.com).
8847  * The implementation was written so as to conform with Netscapes SSL.
8848  *
8849  * This library is free for commercial and non-commercial use as long as
8850  * the following conditions are aheared to.  The following conditions
8851  * apply to all code found in this distribution, be it the RC4, RSA,
8852  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8853  * included with this distribution is covered by the same copyright terms
8854  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8855  *
8856  * Copyright remains Eric Young's, and as such any Copyright notices in
8857  * the code are not to be removed.
8858  * If this package is used in a product, Eric Young should be given attribution
8859  * as the author of the parts of the library used.
8860  * This can be in the form of a textual message at program startup or
8861  * in documentation (online or textual) provided with the package.
8862  *
8863  * Redistribution and use in source and binary forms, with or without
8864  * modification, are permitted provided that the following conditions
8865  * are met:
8866  * 1. Redistributions of source code must retain the copyright
8867  *    notice, this list of conditions and the following disclaimer.
8868  * 2. Redistributions in binary form must reproduce the above copyright
8869  *    notice, this list of conditions and the following disclaimer in the
8870  *    documentation and/or other materials provided with the distribution.
8871  * 3. All advertising materials mentioning features or use of this software
8872  *    must display the following acknowledgement:
8873  *    "This product includes cryptographic software written by
8874  *     Eric Young (eay@cryptsoft.com)"
8875  *    The word 'cryptographic' can be left out if the rouines from the library
8876  *    being used are not cryptographic related :-).
8877  * 4. If you include any Windows specific code (or a derivative thereof) from
8878  *    the apps directory (application code) you must include an acknowledgement:
8879  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8880  *
8881  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8882  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8883  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8884  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8885  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8886  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8887  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8888  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8889  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8890  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8891  * SUCH DAMAGE.
8892  *
8893  * The licence and distribution terms for any publically available version or
8894  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8895  * copied and put under another distribution licence
8896  * [including the GNU Public Licence.]
8897  */
8898 /* ====================================================================
8899  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
8900  * ECDH support in OpenSSL originally developed by
8901  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
8902  */
8903 
8904 
8905 
8906 
8907 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
8908 /*
8909  * CDDL HEADER START
8910  *
8911  * The contents of this file are subject to the terms of the
8912  * Common Development and Distribution License (the "License").
8913  * You may not use this file except in compliance with the License.
8914  *
8915  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8916  * or http://www.opensolaris.org/os/licensing.
8917  * See the License for the specific language governing permissions
8918  * and limitations under the License.
8919  *
8920  * When distributing Covered Code, include this CDDL HEADER in each
8921  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8922  * If applicable, add the following below this CDDL HEADER, with the
8923  * fields enclosed by brackets "[]" replaced with your own identifying
8924  * information: Portions Copyright [yyyy] [name of copyright owner]
8925  *
8926  * CDDL HEADER END
8927  */
8928 
8929 /*
8930  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8931  * Copyright (c) 2013 Gary Mills
8932  *
8933  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8934  */
8935 
8936 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
8937 
8938 /*	Copyright (c) 1988 AT&T	*/
8939 /*	  All Rights Reserved  	*/
8940 # 121 "/usr/include/openssl/crypto.h" 2 3 4
8941 
8942 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8943 /* e_os2.h */
8944 /* ====================================================================
8945  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8946  *
8947  * Redistribution and use in source and binary forms, with or without
8948  * modification, are permitted provided that the following conditions
8949  * are met:
8950  *
8951  * 1. Redistributions of source code must retain the above copyright
8952  *    notice, this list of conditions and the following disclaimer.
8953  *
8954  * 2. Redistributions in binary form must reproduce the above copyright
8955  *    notice, this list of conditions and the following disclaimer in
8956  *    the documentation and/or other materials provided with the
8957  *    distribution.
8958  *
8959  * 3. All advertising materials mentioning features or use of this
8960  *    software must display the following acknowledgment:
8961  *    "This product includes software developed by the OpenSSL Project
8962  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8963  *
8964  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8965  *    endorse or promote products derived from this software without
8966  *    prior written permission. For written permission, please contact
8967  *    openssl-core@openssl.org.
8968  *
8969  * 5. Products derived from this software may not be called "OpenSSL"
8970  *    nor may "OpenSSL" appear in their names without prior written
8971  *    permission of the OpenSSL Project.
8972  *
8973  * 6. Redistributions of any form whatsoever must retain the following
8974  *    acknowledgment:
8975  *    "This product includes software developed by the OpenSSL Project
8976  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8977  *
8978  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8979  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8980  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8981  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8982  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8983  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8984  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8985  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8986  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8987  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8988  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8989  * OF THE POSSIBILITY OF SUCH DAMAGE.
8990  * ====================================================================
8991  *
8992  * This product includes cryptographic software written by Eric Young
8993  * (eay@cryptsoft.com).  This product includes software written by Tim
8994  * Hudson (tjh@cryptsoft.com).
8995  *
8996  */
8997 
8998 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8999 /* opensslconf.h */
9000 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9001 
9002 
9003 
9004 
9005 /* OpenSSL was configured with the following options: */
9006 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9007 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9008    asks for it.  This is a transient feature that is provided for those
9009    who haven't had the time to do the appropriate changes in their
9010    applications.  */
9011 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9012 /* crypto/opensslconf.h.in */
9013 
9014 /* Generate 80386 code? */
9015 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9016 # 123 "/usr/include/openssl/crypto.h" 2 3 4
9017 
9018 
9019 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
9020 /*
9021  * CDDL HEADER START
9022  *
9023  * The contents of this file are subject to the terms of the
9024  * Common Development and Distribution License (the "License").
9025  * You may not use this file except in compliance with the License.
9026  *
9027  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9028  * or http://www.opensolaris.org/os/licensing.
9029  * See the License for the specific language governing permissions
9030  * and limitations under the License.
9031  *
9032  * When distributing Covered Code, include this CDDL HEADER in each
9033  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9034  * If applicable, add the following below this CDDL HEADER, with the
9035  * fields enclosed by brackets "[]" replaced with your own identifying
9036  * information: Portions Copyright [yyyy] [name of copyright owner]
9037  *
9038  * CDDL HEADER END
9039  */
9040 
9041 /*
9042  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9043  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
9044  */
9045 
9046 /*	Copyright (c) 1988 AT&T	*/
9047 /*	  All Rights Reserved  	*/
9048 
9049 /*
9050  * User-visible pieces of the ANSI C standard I/O package.
9051  */
9052 # 126 "/usr/include/openssl/crypto.h" 2 3 4
9053 
9054 
9055 # 1 "/usr/include/openssl/stack.h" 1 3 4
9056 /* crypto/stack/stack.h */
9057 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9058  * All rights reserved.
9059  *
9060  * This package is an SSL implementation written
9061  * by Eric Young (eay@cryptsoft.com).
9062  * The implementation was written so as to conform with Netscapes SSL.
9063  *
9064  * This library is free for commercial and non-commercial use as long as
9065  * the following conditions are aheared to.  The following conditions
9066  * apply to all code found in this distribution, be it the RC4, RSA,
9067  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9068  * included with this distribution is covered by the same copyright terms
9069  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9070  *
9071  * Copyright remains Eric Young's, and as such any Copyright notices in
9072  * the code are not to be removed.
9073  * If this package is used in a product, Eric Young should be given attribution
9074  * as the author of the parts of the library used.
9075  * This can be in the form of a textual message at program startup or
9076  * in documentation (online or textual) provided with the package.
9077  *
9078  * Redistribution and use in source and binary forms, with or without
9079  * modification, are permitted provided that the following conditions
9080  * are met:
9081  * 1. Redistributions of source code must retain the copyright
9082  *    notice, this list of conditions and the following disclaimer.
9083  * 2. Redistributions in binary form must reproduce the above copyright
9084  *    notice, this list of conditions and the following disclaimer in the
9085  *    documentation and/or other materials provided with the distribution.
9086  * 3. All advertising materials mentioning features or use of this software
9087  *    must display the following acknowledgement:
9088  *    "This product includes cryptographic software written by
9089  *     Eric Young (eay@cryptsoft.com)"
9090  *    The word 'cryptographic' can be left out if the rouines from the library
9091  *    being used are not cryptographic related :-).
9092  * 4. If you include any Windows specific code (or a derivative thereof) from
9093  *    the apps directory (application code) you must include an acknowledgement:
9094  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9095  *
9096  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9097  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9098  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9099  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9100  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9101  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9102  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9103  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9104  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9105  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9106  * SUCH DAMAGE.
9107  *
9108  * The licence and distribution terms for any publically available version or
9109  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9110  * copied and put under another distribution licence
9111  * [including the GNU Public Licence.]
9112  */
9113 # 66 "/usr/include/openssl/stack.h" 3 4
9114 typedef struct stack_st {
9115     int num;
9116     char **data;
9117     int sorted;
9118     int num_alloc;
9119     int (*comp) (const void *, const void *);
9120 } _STACK; /* Use STACK_OF(...) instead */
9121 
9122 
9123 
9124 
9125 int sk_num(const _STACK *);
9126 void *sk_value(const _STACK *, int);
9127 
9128 void *sk_set(_STACK *, int, void *);
9129 
9130 _STACK *sk_new(int (*cmp) (const void *, const void *));
9131 _STACK *sk_new_null(void);
9132 void sk_free(_STACK *);
9133 void sk_pop_free(_STACK *st, void (*func) (void *));
9134 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
9135 int sk_insert(_STACK *sk, void *data, int where);
9136 void *sk_delete(_STACK *st, int loc);
9137 void *sk_delete_ptr(_STACK *st, void *p);
9138 int sk_find(_STACK *st, void *data);
9139 int sk_find_ex(_STACK *st, void *data);
9140 int sk_push(_STACK *st, void *data);
9141 int sk_unshift(_STACK *st, void *data);
9142 void *sk_shift(_STACK *st);
9143 void *sk_pop(_STACK *st);
9144 void sk_zero(_STACK *st);
9145 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
9146  (const void *, const void *);
9147 _STACK *sk_dup(_STACK *st);
9148 void sk_sort(_STACK *st);
9149 int sk_is_sorted(const _STACK *st);
9150 # 129 "/usr/include/openssl/crypto.h" 2 3 4
9151 # 1 "/usr/include/openssl/safestack.h" 1 3 4
9152 /* ====================================================================
9153  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
9154  *
9155  * Redistribution and use in source and binary forms, with or without
9156  * modification, are permitted provided that the following conditions
9157  * are met:
9158  *
9159  * 1. Redistributions of source code must retain the above copyright
9160  *    notice, this list of conditions and the following disclaimer.
9161  *
9162  * 2. Redistributions in binary form must reproduce the above copyright
9163  *    notice, this list of conditions and the following disclaimer in
9164  *    the documentation and/or other materials provided with the
9165  *    distribution.
9166  *
9167  * 3. All advertising materials mentioning features or use of this
9168  *    software must display the following acknowledgment:
9169  *    "This product includes software developed by the OpenSSL Project
9170  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9171  *
9172  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9173  *    endorse or promote products derived from this software without
9174  *    prior written permission. For written permission, please contact
9175  *    openssl-core@openssl.org.
9176  *
9177  * 5. Products derived from this software may not be called "OpenSSL"
9178  *    nor may "OpenSSL" appear in their names without prior written
9179  *    permission of the OpenSSL Project.
9180  *
9181  * 6. Redistributions of any form whatsoever must retain the following
9182  *    acknowledgment:
9183  *    "This product includes software developed by the OpenSSL Project
9184  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9185  *
9186  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9187  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9188  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9189  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9190  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9191  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9192  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9193  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9194  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9195  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9196  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9197  * OF THE POSSIBILITY OF SUCH DAMAGE.
9198  * ====================================================================
9199  *
9200  * This product includes cryptographic software written by Eric Young
9201  * (eay@cryptsoft.com).  This product includes software written by Tim
9202  * Hudson (tjh@cryptsoft.com).
9203  *
9204  */
9205 
9206 
9207 
9208 
9209 # 1 "/usr/include/openssl/stack.h" 1 3 4
9210 /* crypto/stack/stack.h */
9211 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9212  * All rights reserved.
9213  *
9214  * This package is an SSL implementation written
9215  * by Eric Young (eay@cryptsoft.com).
9216  * The implementation was written so as to conform with Netscapes SSL.
9217  *
9218  * This library is free for commercial and non-commercial use as long as
9219  * the following conditions are aheared to.  The following conditions
9220  * apply to all code found in this distribution, be it the RC4, RSA,
9221  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9222  * included with this distribution is covered by the same copyright terms
9223  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9224  *
9225  * Copyright remains Eric Young's, and as such any Copyright notices in
9226  * the code are not to be removed.
9227  * If this package is used in a product, Eric Young should be given attribution
9228  * as the author of the parts of the library used.
9229  * This can be in the form of a textual message at program startup or
9230  * in documentation (online or textual) provided with the package.
9231  *
9232  * Redistribution and use in source and binary forms, with or without
9233  * modification, are permitted provided that the following conditions
9234  * are met:
9235  * 1. Redistributions of source code must retain the copyright
9236  *    notice, this list of conditions and the following disclaimer.
9237  * 2. Redistributions in binary form must reproduce the above copyright
9238  *    notice, this list of conditions and the following disclaimer in the
9239  *    documentation and/or other materials provided with the distribution.
9240  * 3. All advertising materials mentioning features or use of this software
9241  *    must display the following acknowledgement:
9242  *    "This product includes cryptographic software written by
9243  *     Eric Young (eay@cryptsoft.com)"
9244  *    The word 'cryptographic' can be left out if the rouines from the library
9245  *    being used are not cryptographic related :-).
9246  * 4. If you include any Windows specific code (or a derivative thereof) from
9247  *    the apps directory (application code) you must include an acknowledgement:
9248  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9249  *
9250  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9251  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9252  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9253  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9254  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9255  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9256  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9257  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9258  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9259  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9260  * SUCH DAMAGE.
9261  *
9262  * The licence and distribution terms for any publically available version or
9263  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9264  * copied and put under another distribution licence
9265  * [including the GNU Public Licence.]
9266  */
9267 # 59 "/usr/include/openssl/safestack.h" 2 3 4
9268 # 69 "/usr/include/openssl/safestack.h" 3 4
9269 /*
9270  * In C++ we get problems because an explicit cast is needed from (void *) we
9271  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
9272  * below.
9273  */
9274 # 102 "/usr/include/openssl/safestack.h" 3 4
9275 /* nada (obsolete in new safestack approach)*/
9276 
9277 
9278 /*-
9279  * Strings are special: normally an lhash entry will point to a single
9280  * (somewhat) mutable object. In the case of strings:
9281  *
9282  * a) Instead of a single char, there is an array of chars, NUL-terminated.
9283  * b) The string may have be immutable.
9284  *
9285  * So, they need their own declarations. Especially important for
9286  * type-checking tools, such as Deputy.
9287  *
9288  * In practice, however, it appears to be hard to have a const
9289  * string. For now, I'm settling for dealing with the fact it is a
9290  * string at all.
9291  */
9292 typedef char *OPENSSL_STRING;
9293 
9294 typedef const char *OPENSSL_CSTRING;
9295 
9296 /*
9297  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
9298  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
9299  * above, instead of a single char each entry is a NUL-terminated array of
9300  * chars. So, we have to implement STRING specially for STACK_OF. This is
9301  * dealt with in the autogenerated macros below.
9302  */
9303 
9304 struct stack_st_OPENSSL_STRING { _STACK stack; };
9305 
9306 /*
9307  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
9308  * These should also be distinguished from "normal" stacks.
9309  */
9310 typedef void *OPENSSL_BLOCK;
9311 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
9312 
9313 /*
9314  * SKM_sk_... stack macros are internal to safestack.h: never use them
9315  * directly, use sk_<type>_... instead
9316  */
9317 # 211 "/usr/include/openssl/safestack.h" 3 4
9318 /*
9319  * This block of defines is updated by util/mkstack.pl, please do not touch!
9320  */
9321 # 130 "/usr/include/openssl/crypto.h" 2 3 4
9322 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
9323 
9324 
9325 
9326 
9327 
9328 
9329 
9330 /*-
9331  * Numeric release version identifier:
9332  * MNNFFPPS: major minor fix patch status
9333  * The status nibble has one of the values 0 for development, 1 to e for betas
9334  * 1 to 14, and f for release.  The patch level is exactly that.
9335  * For example:
9336  * 0.9.3-dev      0x00903000
9337  * 0.9.3-beta1    0x00903001
9338  * 0.9.3-beta2-dev 0x00903002
9339  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
9340  * 0.9.3          0x0090300f
9341  * 0.9.3a         0x0090301f
9342  * 0.9.4          0x0090400f
9343  * 1.2.3z         0x102031af
9344  *
9345  * For continuity reasons (because 0.9.5 is already out, and is coded
9346  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
9347  * part is slightly different, by setting the highest bit.  This means
9348  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
9349  * with 0x0090600S...
9350  *
9351  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
9352  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
9353  *  major minor fix final patch/beta)
9354  */
9355 # 41 "/usr/include/openssl/opensslv.h" 3 4
9356 /*-
9357  * The macros below are to be used for shared library (.so, .dll, ...)
9358  * versioning.  That kind of versioning works a bit differently between
9359  * operating systems.  The most usual scheme is to set a major and a minor
9360  * number, and have the runtime loader check that the major number is equal
9361  * to what it was at application link time, while the minor number has to
9362  * be greater or equal to what it was at application link time.  With this
9363  * scheme, the version number is usually part of the file name, like this:
9364  *
9365  *      libcrypto.so.0.9
9366  *
9367  * Some unixen also make a softlink with the major verson number only:
9368  *
9369  *      libcrypto.so.0
9370  *
9371  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
9372  * shared library version is stored in the file, and is actually a series
9373  * of versions, separated by colons.  The rightmost version present in the
9374  * library when linking an application is stored in the application to be
9375  * matched at run time.  When the application is run, a check is done to
9376  * see if the library version stored in the application matches any of the
9377  * versions in the version string of the library itself.
9378  * This version string can be constructed in any way, depending on what
9379  * kind of matching is desired.  However, to implement the same scheme as
9380  * the one used in the other unixen, all compatible versions, from lowest
9381  * to highest, should be part of the string.  Consecutive builds would
9382  * give the following versions strings:
9383  *
9384  *      3.0
9385  *      3.0:3.1
9386  *      3.0:3.1:3.2
9387  *      4.0
9388  *      4.0:4.1
9389  *
9390  * Notice how version 4 is completely incompatible with version, and
9391  * therefore give the breach you can see.
9392  *
9393  * There may be other schemes as well that I haven't yet discovered.
9394  *
9395  * So, here's the way it works here: first of all, the library version
9396  * number doesn't need at all to match the overall OpenSSL version.
9397  * However, it's nice and more understandable if it actually does.
9398  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
9399  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
9400  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
9401  * we need to keep a history of version numbers, which is done in the
9402  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
9403  * should only keep the versions that are binary compatible with the current.
9404  */
9405 # 131 "/usr/include/openssl/crypto.h" 2 3 4
9406 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
9407 /* ====================================================================
9408  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
9409  *
9410  * Redistribution and use in source and binary forms, with or without
9411  * modification, are permitted provided that the following conditions
9412  * are met:
9413  *
9414  * 1. Redistributions of source code must retain the above copyright
9415  *    notice, this list of conditions and the following disclaimer.
9416  *
9417  * 2. Redistributions in binary form must reproduce the above copyright
9418  *    notice, this list of conditions and the following disclaimer in
9419  *    the documentation and/or other materials provided with the
9420  *    distribution.
9421  *
9422  * 3. All advertising materials mentioning features or use of this
9423  *    software must display the following acknowledgment:
9424  *    "This product includes software developed by the OpenSSL Project
9425  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9426  *
9427  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9428  *    endorse or promote products derived from this software without
9429  *    prior written permission. For written permission, please contact
9430  *    openssl-core@openssl.org.
9431  *
9432  * 5. Products derived from this software may not be called "OpenSSL"
9433  *    nor may "OpenSSL" appear in their names without prior written
9434  *    permission of the OpenSSL Project.
9435  *
9436  * 6. Redistributions of any form whatsoever must retain the following
9437  *    acknowledgment:
9438  *    "This product includes software developed by the OpenSSL Project
9439  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9440  *
9441  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9442  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9443  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9444  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9445  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9446  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9447  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9448  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9449  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9450  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9451  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9452  * OF THE POSSIBILITY OF SUCH DAMAGE.
9453  * ====================================================================
9454  *
9455  * This product includes cryptographic software written by Eric Young
9456  * (eay@cryptsoft.com).  This product includes software written by Tim
9457  * Hudson (tjh@cryptsoft.com).
9458  *
9459  */
9460 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
9461 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9462 /* e_os2.h */
9463 /* ====================================================================
9464  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9465  *
9466  * Redistribution and use in source and binary forms, with or without
9467  * modification, are permitted provided that the following conditions
9468  * are met:
9469  *
9470  * 1. Redistributions of source code must retain the above copyright
9471  *    notice, this list of conditions and the following disclaimer.
9472  *
9473  * 2. Redistributions in binary form must reproduce the above copyright
9474  *    notice, this list of conditions and the following disclaimer in
9475  *    the documentation and/or other materials provided with the
9476  *    distribution.
9477  *
9478  * 3. All advertising materials mentioning features or use of this
9479  *    software must display the following acknowledgment:
9480  *    "This product includes software developed by the OpenSSL Project
9481  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9482  *
9483  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9484  *    endorse or promote products derived from this software without
9485  *    prior written permission. For written permission, please contact
9486  *    openssl-core@openssl.org.
9487  *
9488  * 5. Products derived from this software may not be called "OpenSSL"
9489  *    nor may "OpenSSL" appear in their names without prior written
9490  *    permission of the OpenSSL Project.
9491  *
9492  * 6. Redistributions of any form whatsoever must retain the following
9493  *    acknowledgment:
9494  *    "This product includes software developed by the OpenSSL Project
9495  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9496  *
9497  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9498  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9499  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9500  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9501  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9502  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9503  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9504  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9505  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9506  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9507  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9508  * OF THE POSSIBILITY OF SUCH DAMAGE.
9509  * ====================================================================
9510  *
9511  * This product includes cryptographic software written by Eric Young
9512  * (eay@cryptsoft.com).  This product includes software written by Tim
9513  * Hudson (tjh@cryptsoft.com).
9514  *
9515  */
9516 
9517 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9518 /* opensslconf.h */
9519 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9520 
9521 
9522 
9523 
9524 /* OpenSSL was configured with the following options: */
9525 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9526 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9527    asks for it.  This is a transient feature that is provided for those
9528    who haven't had the time to do the appropriate changes in their
9529    applications.  */
9530 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9531 /* crypto/opensslconf.h.in */
9532 
9533 /* Generate 80386 code? */
9534 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9535 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
9536 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
9537 typedef struct asn1_string_st ASN1_INTEGER;
9538 typedef struct asn1_string_st ASN1_ENUMERATED;
9539 typedef struct asn1_string_st ASN1_BIT_STRING;
9540 typedef struct asn1_string_st ASN1_OCTET_STRING;
9541 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
9542 typedef struct asn1_string_st ASN1_T61STRING;
9543 typedef struct asn1_string_st ASN1_IA5STRING;
9544 typedef struct asn1_string_st ASN1_GENERALSTRING;
9545 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
9546 typedef struct asn1_string_st ASN1_BMPSTRING;
9547 typedef struct asn1_string_st ASN1_UTCTIME;
9548 typedef struct asn1_string_st ASN1_TIME;
9549 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
9550 typedef struct asn1_string_st ASN1_VISIBLESTRING;
9551 typedef struct asn1_string_st ASN1_UTF8STRING;
9552 typedef struct asn1_string_st ASN1_STRING;
9553 typedef int ASN1_BOOLEAN;
9554 typedef int ASN1_NULL;
9555 
9556 
9557 typedef struct asn1_object_st ASN1_OBJECT;
9558 
9559 typedef struct ASN1_ITEM_st ASN1_ITEM;
9560 typedef struct asn1_pctx_st ASN1_PCTX;
9561 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
9562 typedef struct bignum_st BIGNUM;
9563 typedef struct bignum_ctx BN_CTX;
9564 typedef struct bn_blinding_st BN_BLINDING;
9565 typedef struct bn_mont_ctx_st BN_MONT_CTX;
9566 typedef struct bn_recp_ctx_st BN_RECP_CTX;
9567 typedef struct bn_gencb_st BN_GENCB;
9568 
9569 typedef struct buf_mem_st BUF_MEM;
9570 
9571 typedef struct evp_cipher_st EVP_CIPHER;
9572 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
9573 typedef struct env_md_st EVP_MD;
9574 typedef struct env_md_ctx_st EVP_MD_CTX;
9575 typedef struct evp_pkey_st EVP_PKEY;
9576 
9577 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
9578 
9579 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
9580 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
9581 
9582 typedef struct dh_st DH;
9583 typedef struct dh_method DH_METHOD;
9584 
9585 typedef struct dsa_st DSA;
9586 typedef struct dsa_method DSA_METHOD;
9587 
9588 typedef struct rsa_st RSA;
9589 typedef struct rsa_meth_st RSA_METHOD;
9590 
9591 typedef struct rand_meth_st RAND_METHOD;
9592 
9593 typedef struct ecdh_method ECDH_METHOD;
9594 typedef struct ecdsa_method ECDSA_METHOD;
9595 
9596 typedef struct x509_st X509;
9597 typedef struct X509_algor_st X509_ALGOR;
9598 typedef struct X509_crl_st X509_CRL;
9599 typedef struct x509_crl_method_st X509_CRL_METHOD;
9600 typedef struct x509_revoked_st X509_REVOKED;
9601 typedef struct X509_name_st X509_NAME;
9602 typedef struct X509_pubkey_st X509_PUBKEY;
9603 typedef struct x509_store_st X509_STORE;
9604 typedef struct x509_store_ctx_st X509_STORE_CTX;
9605 
9606 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
9607 
9608 typedef struct v3_ext_ctx X509V3_CTX;
9609 typedef struct conf_st CONF;
9610 
9611 typedef struct store_st STORE;
9612 typedef struct store_method_st STORE_METHOD;
9613 
9614 typedef struct ui_st UI;
9615 typedef struct ui_method_st UI_METHOD;
9616 
9617 typedef struct st_ERR_FNS ERR_FNS;
9618 
9619 typedef struct engine_st ENGINE;
9620 typedef struct ssl_st SSL;
9621 typedef struct ssl_ctx_st SSL_CTX;
9622 
9623 typedef struct comp_method_st COMP_METHOD;
9624 
9625 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
9626 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
9627 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
9628 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
9629 
9630 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
9631 typedef struct DIST_POINT_st DIST_POINT;
9632 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
9633 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
9634 
9635   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
9636 
9637 
9638 
9639 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
9640 /* Callback types for crypto.h */
9641 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
9642                            int idx, long argl, void *argp);
9643 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
9644                              int idx, long argl, void *argp);
9645 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
9646                            void *from_d, int idx, long argl, void *argp);
9647 
9648 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
9649 typedef struct ocsp_response_st OCSP_RESPONSE;
9650 typedef struct ocsp_responder_id_st OCSP_RESPID;
9651 # 132 "/usr/include/openssl/crypto.h" 2 3 4
9652 
9653 
9654 
9655 
9656 
9657 /*
9658  * Resolve problems on some operating systems with symbol names that clash
9659  * one way or another
9660  */
9661 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
9662 /* ====================================================================
9663  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
9664  *
9665  * Redistribution and use in source and binary forms, with or without
9666  * modification, are permitted provided that the following conditions
9667  * are met:
9668  *
9669  * 1. Redistributions of source code must retain the above copyright
9670  *    notice, this list of conditions and the following disclaimer.
9671  *
9672  * 2. Redistributions in binary form must reproduce the above copyright
9673  *    notice, this list of conditions and the following disclaimer in
9674  *    the documentation and/or other materials provided with the
9675  *    distribution.
9676  *
9677  * 3. All advertising materials mentioning features or use of this
9678  *    software must display the following acknowledgment:
9679  *    "This product includes software developed by the OpenSSL Project
9680  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9681  *
9682  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9683  *    endorse or promote products derived from this software without
9684  *    prior written permission. For written permission, please contact
9685  *    openssl-core@openssl.org.
9686  *
9687  * 5. Products derived from this software may not be called "OpenSSL"
9688  *    nor may "OpenSSL" appear in their names without prior written
9689  *    permission of the OpenSSL Project.
9690  *
9691  * 6. Redistributions of any form whatsoever must retain the following
9692  *    acknowledgment:
9693  *    "This product includes software developed by the OpenSSL Project
9694  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9695  *
9696  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9697  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9698  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9699  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9700  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9701  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9702  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9703  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9704  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9705  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9706  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9707  * OF THE POSSIBILITY OF SUCH DAMAGE.
9708  * ====================================================================
9709  *
9710  * This product includes cryptographic software written by Eric Young
9711  * (eay@cryptsoft.com).  This product includes software written by Tim
9712  * Hudson (tjh@cryptsoft.com).
9713  *
9714  */
9715 
9716 
9717 
9718 
9719 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9720 /* e_os2.h */
9721 /* ====================================================================
9722  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9723  *
9724  * Redistribution and use in source and binary forms, with or without
9725  * modification, are permitted provided that the following conditions
9726  * are met:
9727  *
9728  * 1. Redistributions of source code must retain the above copyright
9729  *    notice, this list of conditions and the following disclaimer.
9730  *
9731  * 2. Redistributions in binary form must reproduce the above copyright
9732  *    notice, this list of conditions and the following disclaimer in
9733  *    the documentation and/or other materials provided with the
9734  *    distribution.
9735  *
9736  * 3. All advertising materials mentioning features or use of this
9737  *    software must display the following acknowledgment:
9738  *    "This product includes software developed by the OpenSSL Project
9739  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9740  *
9741  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9742  *    endorse or promote products derived from this software without
9743  *    prior written permission. For written permission, please contact
9744  *    openssl-core@openssl.org.
9745  *
9746  * 5. Products derived from this software may not be called "OpenSSL"
9747  *    nor may "OpenSSL" appear in their names without prior written
9748  *    permission of the OpenSSL Project.
9749  *
9750  * 6. Redistributions of any form whatsoever must retain the following
9751  *    acknowledgment:
9752  *    "This product includes software developed by the OpenSSL Project
9753  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9754  *
9755  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9756  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9757  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9758  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9759  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9760  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9761  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9762  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9763  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9764  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9765  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9766  * OF THE POSSIBILITY OF SUCH DAMAGE.
9767  * ====================================================================
9768  *
9769  * This product includes cryptographic software written by Eric Young
9770  * (eay@cryptsoft.com).  This product includes software written by Tim
9771  * Hudson (tjh@cryptsoft.com).
9772  *
9773  */
9774 
9775 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9776 /* opensslconf.h */
9777 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9778 
9779 
9780 
9781 
9782 /* OpenSSL was configured with the following options: */
9783 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9784 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9785    asks for it.  This is a transient feature that is provided for those
9786    who haven't had the time to do the appropriate changes in their
9787    applications.  */
9788 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9789 /* crypto/opensslconf.h.in */
9790 
9791 /* Generate 80386 code? */
9792 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9793 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
9794 
9795 /*
9796  * Hacks to solve the problem with linkers incapable of handling very long
9797  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
9798  * VAX.
9799  */
9800 /*
9801  * Note that this affects util/libeay.num and util/ssleay.num...  you may
9802  * change those manually, but that's not recommended, as those files are
9803  * controlled centrally and updated on Unix, and the central definition may
9804  * disagree with yours, which in turn may come with shareable library
9805  * incompatibilities.
9806  */
9807 # 481 "/usr/include/openssl/symhacks.h" 3 4
9808 /* Case insensitive linking causes problems.... */
9809 # 142 "/usr/include/openssl/crypto.h" 2 3 4
9810 
9811 
9812 
9813 
9814 
9815 /* Backward compatibility to SSLeay */
9816 /*
9817  * This is more to be used to check the correct DLL is being used in the MS
9818  * world.
9819  */
9820 
9821 
9822 /* #define SSLEAY_OPTIONS       1 no longer supported */
9823 
9824 
9825 
9826 
9827 
9828 /* Already declared in ossl_typ.h */
9829 # 174 "/usr/include/openssl/crypto.h" 3 4
9830 /* A generic structure to pass assorted data in a expandable way */
9831 typedef struct openssl_item_st {
9832     int code;
9833     void *value; /* Not used for flag attributes */
9834     size_t value_size; /* Max size of value for output, length for
9835                                  * input */
9836     size_t *value_length; /* Returned length of value for output */
9837 } OPENSSL_ITEM;
9838 
9839 /*
9840  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
9841  * names in cryptlib.c
9842  */
9843 # 256 "/usr/include/openssl/crypto.h" 3 4
9844 /*
9845  * Some applications as well as some parts of OpenSSL need to allocate and
9846  * deallocate locks in a dynamic fashion.  The following typedef makes this
9847  * possible in a type-safe manner.
9848  */
9849 /* struct CRYPTO_dynlock_value has to be defined by the application. */
9850 typedef struct {
9851     int references;
9852     struct CRYPTO_dynlock_value *data;
9853 } CRYPTO_dynlock;
9854 
9855 /*
9856  * The following can be used to detect memory leaks in the SSLeay library. It
9857  * used, it turns on malloc checking
9858  */
9859 
9860 
9861 
9862 
9863 
9864 
9865 /*
9866  * The following are bit values to turn on or off options connected to the
9867  * malloc checking functionality
9868  */
9869 
9870 /* Adds time to the memory checking information */
9871 
9872 /* Adds thread number to the memory checking information */
9873 
9874 
9875 
9876 
9877 /* predec of the BIO type */
9878 typedef struct bio_st BIO_dummy;
9879 
9880 struct crypto_ex_data_st {
9881     struct stack_st_void *sk;
9882     /* gcc is screwing up this data structure :-( */
9883     int dummy;
9884 };
9885 struct stack_st_void { _STACK stack; };
9886 
9887 /*
9888  * This stuff is basically class callback functions The current classes are
9889  * SSL_CTX, SSL, SSL_SESSION, and a few more
9890  */
9891 
9892 typedef struct crypto_ex_data_func_st {
9893     long argl; /* Arbitary long */
9894     void *argp; /* Arbitary void * */
9895     CRYPTO_EX_new *new_func;
9896     CRYPTO_EX_free *free_func;
9897     CRYPTO_EX_dup *dup_func;
9898 } CRYPTO_EX_DATA_FUNCS;
9899 
9900 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
9901 
9902 /*
9903  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
9904  * entry.
9905  */
9906 # 336 "/usr/include/openssl/crypto.h" 3 4
9907 /*
9908  * Dynamically assigned indexes start from this value (don't use directly,
9909  * use via CRYPTO_ex_data_new_class).
9910  */
9911 
9912 
9913 /*
9914  * This is the default callbacks, but we can have others as well: this is
9915  * needed in Win32 where the application malloc and the library malloc may
9916  * not be the same.
9917  */
9918 # 356 "/usr/include/openssl/crypto.h" 3 4
9919 /*
9920  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
9921  * is defined)
9922  */
9923 # 369 "/usr/include/openssl/crypto.h" 3 4
9924 int CRYPTO_mem_ctrl(int mode);
9925 int CRYPTO_is_mem_check_on(void);
9926 
9927 /* for applications */
9928 
9929 
9930 
9931 /* for library-internal use */
9932 # 396 "/usr/include/openssl/crypto.h" 3 4
9933 const char *SSLeay_version(int type);
9934 unsigned long SSLeay(void);
9935 
9936 int OPENSSL_issetugid(void);
9937 
9938 /* An opaque type representing an implementation of "ex_data" support */
9939 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
9940 /* Return an opaque pointer to the current "ex_data" implementation */
9941 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
9942 /* Sets the "ex_data" implementation to be used (if it's not too late) */
9943 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
9944 /* Get a new "ex_data" class, and return the corresponding "class_index" */
9945 int CRYPTO_ex_data_new_class(void);
9946 /* Within a given class, get/register a new index */
9947 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
9948                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
9949                             CRYPTO_EX_free *free_func);
9950 /*
9951  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
9952  * given class (invokes whatever per-class callbacks are applicable)
9953  */
9954 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
9955 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
9956                        CRYPTO_EX_DATA *from);
9957 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
9958 /*
9959  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
9960  * index (relative to the class type involved)
9961  */
9962 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
9963 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
9964 /*
9965  * This function cleans up all "ex_data" state. It mustn't be called under
9966  * potential race-conditions.
9967  */
9968 void CRYPTO_cleanup_all_ex_data(void);
9969 
9970 int CRYPTO_get_new_lockid(char *name);
9971 
9972 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
9973 void CRYPTO_lock(int mode, int type, const char *file, int line);
9974 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
9975                                                const char *file, int line));
9976 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
9977                                            const char *file, int line);
9978 void CRYPTO_set_add_lock_callback(int (*func)
9979                                    (int *num, int mount, int type,
9980                                     const char *file, int line));
9981 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
9982                                            const char *file, int line);
9983 
9984 /* Don't use this structure directly. */
9985 typedef struct crypto_threadid_st {
9986     void *ptr;
9987     unsigned long val;
9988 } CRYPTO_THREADID;
9989 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
9990 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
9991 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
9992 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
9993 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
9994 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
9995 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
9996 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
9997 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
9998 
9999 void CRYPTO_set_id_callback(unsigned long (*func) (void));
10000 unsigned long (*CRYPTO_get_id_callback(void)) (void);
10001 unsigned long CRYPTO_thread_id(void);
10002 
10003 
10004 const char *CRYPTO_get_lock_name(int type);
10005 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
10006                     int line);
10007 
10008 int CRYPTO_get_new_dynlockid(void);
10009 void CRYPTO_destroy_dynlockid(int i);
10010 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
10011 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
10012                                         *(*dyn_create_function) (const char
10013                                                                  *file,
10014                                                                  int line));
10015 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
10016                                        (int mode,
10017                                         struct CRYPTO_dynlock_value *l,
10018                                         const char *file, int line));
10019 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
10020                                           (struct CRYPTO_dynlock_value *l,
10021                                            const char *file, int line));
10022 struct CRYPTO_dynlock_value
10023 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
10024 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
10025                                                 struct CRYPTO_dynlock_value
10026                                                 *l, const char *file,
10027                                                 int line);
10028 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
10029                                                    *l, const char *file,
10030                                                    int line);
10031 
10032 /*
10033  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
10034  * the latter last if you need different functions
10035  */
10036 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
10037                              void (*f) (void *));
10038 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
10039                                     void (*free_func) (void *));
10040 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
10041                                 void *(*r) (void *, size_t, const char *,
10042                                             int), void (*f) (void *));
10043 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
10044                                        void (*free_func) (void *));
10045 int CRYPTO_set_mem_debug_functions(void (*m)
10046                                     (void *, int, const char *, int, int),
10047                                    void (*r) (void *, void *, int,
10048                                               const char *, int, int),
10049                                    void (*f) (void *, int), void (*so) (long),
10050                                    long (*go) (void));
10051 void CRYPTO_get_mem_functions(void *(**m) (size_t),
10052                               void *(**r) (void *, size_t),
10053                               void (**f) (void *));
10054 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
10055                                      void (**f) (void *));
10056 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
10057                                  void *(**r) (void *, size_t, const char *,
10058                                               int), void (**f) (void *));
10059 void CRYPTO_get_locked_mem_ex_functions(void
10060                                         *(**m) (size_t, const char *, int),
10061                                         void (**f) (void *));
10062 void CRYPTO_get_mem_debug_functions(void (**m)
10063                                      (void *, int, const char *, int, int),
10064                                     void (**r) (void *, void *, int,
10065                                                 const char *, int, int),
10066                                     void (**f) (void *, int),
10067                                     void (**so) (long), long (**go) (void));
10068 
10069 void *CRYPTO_malloc_locked(int num, const char *file, int line);
10070 void CRYPTO_free_locked(void *ptr);
10071 void *CRYPTO_malloc(int num, const char *file, int line);
10072 char *CRYPTO_strdup(const char *str, const char *file, int line);
10073 void CRYPTO_free(void *ptr);
10074 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
10075 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
10076                            int line);
10077 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
10078 
10079 void OPENSSL_cleanse(void *ptr, size_t len);
10080 
10081 void CRYPTO_set_mem_debug_options(long bits);
10082 long CRYPTO_get_mem_debug_options(void);
10083 
10084 
10085 
10086 int CRYPTO_push_info_(const char *info, const char *file, int line);
10087 int CRYPTO_pop_info(void);
10088 int CRYPTO_remove_all_info(void);
10089 
10090 /*
10091  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
10092  * used as default in CRYPTO_MDEBUG compilations):
10093  */
10094 /*-
10095  * The last argument has the following significance:
10096  *
10097  * 0:   called before the actual memory allocation has taken place
10098  * 1:   called after the actual memory allocation has taken place
10099  */
10100 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
10101                        int before_p);
10102 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
10103                         int line, int before_p);
10104 void CRYPTO_dbg_free(void *addr, int before_p);
10105 /*-
10106  * Tell the debugging code about options.  By default, the following values
10107  * apply:
10108  *
10109  * 0:                           Clear all options.
10110  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
10111  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
10112  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
10113  */
10114 void CRYPTO_dbg_set_options(long bits);
10115 long CRYPTO_dbg_get_options(void);
10116 
10117 
10118 void CRYPTO_mem_leaks_fp(FILE *);
10119 
10120 void CRYPTO_mem_leaks(struct bio_st *bio);
10121 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
10122 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
10123                                   void *);
10124 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
10125 
10126 /* die if we have to */
10127 void OpenSSLDie(const char *file, int line, const char *assertion);
10128 
10129 
10130 unsigned long *OPENSSL_ia32cap_loc(void);
10131 
10132 int OPENSSL_isservice(void);
10133 
10134 int FIPS_mode(void);
10135 int FIPS_mode_set(int r);
10136 
10137 void OPENSSL_init(void);
10138 # 624 "/usr/include/openssl/crypto.h" 3 4
10139 /*
10140  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
10141  * It takes an amount of time dependent on |len|, but independent of the
10142  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
10143  * into a defined order as the return value when a != b is undefined, other
10144  * than to be non-zero.
10145  */
10146 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
10147 
10148 /* BEGIN ERROR CODES */
10149 /*
10150  * The following lines are auto generated by the script mkerr.pl. Any changes
10151  * made after this point may be overwritten when the script is next run.
10152  */
10153 void ERR_load_CRYPTO_strings(void);
10154 
10155 /* Error codes for the CRYPTO functions. */
10156 
10157 /* Function codes. */
10158 # 654 "/usr/include/openssl/crypto.h" 3 4
10159 /* Reason codes. */
10160 # 70 "/usr/include/openssl/bio.h" 2 3 4
10161 # 83 "/usr/include/openssl/bio.h" 3 4
10162 /* These are the 'types' of BIOs */
10163 # 116 "/usr/include/openssl/bio.h" 3 4
10164 /*
10165  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
10166  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
10167  */
10168 
10169 
10170 
10171 /*
10172  * These are used in the following macros and are passed to BIO_ctrl()
10173  */
10174 # 139 "/usr/include/openssl/bio.h" 3 4
10175 /* callback is int cb(BIO *bio,state,ret); */
10176 
10177 
10178 
10179 
10180 
10181 /* dgram BIO stuff */
10182 # 157 "/usr/include/openssl/bio.h" 3 4
10183 /* #ifdef IP_MTU_DISCOVER */
10184 
10185 /* #endif */
10186 # 196 "/usr/include/openssl/bio.h" 3 4
10187 /* modifiers */
10188 # 208 "/usr/include/openssl/bio.h" 3 4
10189 /*
10190  * "UPLINK" flag denotes file descriptors provided by application. It
10191  * defaults to 0, as most platforms don't require UPLINK interface.
10192  */
10193 
10194 
10195 
10196 /* Used in BIO_gethostbyname() */
10197 
10198 
10199 
10200 
10201 
10202 
10203 /* Mostly used in the SSL BIO */
10204 /*-
10205  * Not used anymore
10206  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
10207  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
10208  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
10209  */
10210 
10211 
10212 
10213 /*
10214  * This is used with memory BIOs: it means we shouldn't free up or change the
10215  * data in any way.
10216  */
10217 
10218 
10219 typedef struct bio_st BIO;
10220 
10221 void BIO_set_flags(BIO *b, int flags);
10222 int BIO_test_flags(const BIO *b, int flags);
10223 void BIO_clear_flags(BIO *b, int flags);
10224 # 252 "/usr/include/openssl/bio.h" 3 4
10225 /* These are normally used internally in BIOs */
10226 
10227 
10228 
10229 
10230 
10231 /* These should be used by the application to tell why we should retry */
10232 
10233 
10234 
10235 
10236 
10237 
10238 /*
10239  * The next three are used in conjunction with the BIO_should_io_special()
10240  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
10241  * *reason); will walk the BIO stack and return the 'reason' for the special
10242  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
10243  * the code.
10244  */
10245 /*
10246  * Returned from the SSL bio when the certificate retrieval code had an error
10247  */
10248 
10249 /* Returned from the connect BIO when a connect would have blocked */
10250 
10251 /* Returned from the accept BIO when an accept would have blocked */
10252 
10253 
10254 /* These are passed by the BIO callback */
10255 
10256 
10257 
10258 
10259 
10260 
10261 
10262 /*
10263  * The callback is called before and after the underling operation, The
10264  * BIO_CB_RETURN flag indicates if it is after the call
10265  */
10266 
10267 
10268 
10269 
10270 
10271 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
10272                                         int, long, long);
10273 void BIO_set_callback(BIO *b,
10274                       long (*callback) (struct bio_st *, int, const char *,
10275                                         int, long, long));
10276 char *BIO_get_callback_arg(const BIO *b);
10277 void BIO_set_callback_arg(BIO *b, char *arg);
10278 
10279 const char *BIO_method_name(const BIO *b);
10280 int BIO_method_type(const BIO *b);
10281 
10282 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
10283                           long);
10284 
10285 typedef struct bio_method_st {
10286     int type;
10287     const char *name;
10288     int (*bwrite) (BIO *, const char *, int);
10289     int (*bread) (BIO *, char *, int);
10290     int (*bputs) (BIO *, const char *);
10291     int (*bgets) (BIO *, char *, int);
10292     long (*ctrl) (BIO *, int, long, void *);
10293     int (*create) (BIO *);
10294     int (*destroy) (BIO *);
10295     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
10296 } BIO_METHOD;
10297 
10298 struct bio_st {
10299     BIO_METHOD *method;
10300     /* bio, mode, argp, argi, argl, ret */
10301     long (*callback) (struct bio_st *, int, const char *, int, long, long);
10302     char *cb_arg; /* first argument for the callback */
10303     int init;
10304     int shutdown;
10305     int flags; /* extra storage */
10306     int retry_reason;
10307     int num;
10308     void *ptr;
10309     struct bio_st *next_bio; /* used by filter BIOs */
10310     struct bio_st *prev_bio; /* used by filter BIOs */
10311     int references;
10312     unsigned long num_read;
10313     unsigned long num_write;
10314     CRYPTO_EX_DATA ex_data;
10315 };
10316 
10317 struct stack_st_BIO { _STACK stack; };
10318 
10319 typedef struct bio_f_buffer_ctx_struct {
10320     /*-
10321      * Buffers are setup like this:
10322      *
10323      * <---------------------- size ----------------------->
10324      * +---------------------------------------------------+
10325      * | consumed | remaining          | free space        |
10326      * +---------------------------------------------------+
10327      * <-- off --><------- len ------->
10328      */
10329     /*- BIO *bio; *//*
10330      * this is now in the BIO struct
10331      */
10332     int ibuf_size; /* how big is the input buffer */
10333     int obuf_size; /* how big is the output buffer */
10334     char *ibuf; /* the char array */
10335     int ibuf_len; /* how many bytes are in it */
10336     int ibuf_off; /* write/read offset */
10337     char *obuf; /* the char array */
10338     int obuf_len; /* how many bytes are in it */
10339     int obuf_off; /* write/read offset */
10340 } BIO_F_BUFFER_CTX;
10341 
10342 /* Prefix and suffix callback in ASN1 BIO */
10343 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
10344                           void *parg);
10345 # 398 "/usr/include/openssl/bio.h" 3 4
10346 /* connect BIO stuff */
10347 # 407 "/usr/include/openssl/bio.h" 3 4
10348 /*
10349  * #define BIO_CONN_get_param_hostname BIO_ctrl
10350  */
10351 # 474 "/usr/include/openssl/bio.h" 3 4
10352 /* BIO_s_connect() and BIO_s_socks4a_connect() */
10353 # 486 "/usr/include/openssl/bio.h" 3 4
10354 /* BIO_s_accept() */
10355 
10356 
10357 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
10358 # 499 "/usr/include/openssl/bio.h" 3 4
10359 /* BIO_s_accept() and BIO_s_connect() */
10360 
10361 
10362 
10363 
10364 /* BIO_s_proxy_client() */
10365 
10366 
10367 /* BIO_set_nbio(b,n) */
10368 
10369 /* BIO *BIO_get_filter_bio(BIO *bio); */
10370 # 519 "/usr/include/openssl/bio.h" 3 4
10371 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
10372 
10373 
10374 
10375 /* BIO_s_file() */
10376 
10377 
10378 
10379 /* BIO_s_fd() and BIO_s_file() */
10380 
10381 
10382 
10383 /*
10384  * name is cast to lose const, but might be better to route through a
10385  * function so we can do it safely
10386  */
10387 # 552 "/usr/include/openssl/bio.h" 3 4
10388 /*
10389  * WARNING WARNING, this ups the reference count on the read bio of the SSL
10390  * structure.  This is because the ssl read BIO is now pointed to by the
10391  * next_bio field in the bio.  So when you free the BIO, make sure you are
10392  * doing a BIO_free_all() to catch the underlying BIO.
10393  */
10394 # 568 "/usr/include/openssl/bio.h" 3 4
10395 /* defined in evp.h */
10396 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
10397 
10398 
10399 
10400 
10401 
10402 
10403 
10404 /* For the BIO_f_buffer() type */
10405 
10406 
10407 
10408 
10409 
10410 
10411 /* Don't use the next one unless you know what you are doing :-) */
10412 # 593 "/usr/include/openssl/bio.h" 3 4
10413 /* ...pending macros have inappropriate return type */
10414 size_t BIO_ctrl_pending(BIO *b);
10415 size_t BIO_ctrl_wpending(BIO *b);
10416 
10417 
10418 
10419 
10420 
10421 /* For the BIO_f_buffer() type */
10422 
10423 
10424 /* For BIO_s_bio() */
10425 
10426 
10427 
10428 
10429 
10430 /* macros with inappropriate type -- but ...pending macros use int too: */
10431 
10432 
10433 size_t BIO_ctrl_get_write_guarantee(BIO *b);
10434 size_t BIO_ctrl_get_read_request(BIO *b);
10435 int BIO_ctrl_reset_read_request(BIO *b);
10436 
10437 /* ctrl macros for dgram */
10438 # 633 "/usr/include/openssl/bio.h" 3 4
10439 /* These two aren't currently implemented */
10440 /* int BIO_get_ex_num(BIO *bio); */
10441 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
10442 int BIO_set_ex_data(BIO *bio, int idx, void *data);
10443 void *BIO_get_ex_data(BIO *bio, int idx);
10444 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
10445                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
10446 unsigned long BIO_number_read(BIO *bio);
10447 unsigned long BIO_number_written(BIO *bio);
10448 
10449 /* For BIO_f_asn1() */
10450 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
10451                         asn1_ps_func *prefix_free);
10452 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
10453                         asn1_ps_func **pprefix_free);
10454 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
10455                         asn1_ps_func *suffix_free);
10456 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
10457                         asn1_ps_func **psuffix_free);
10458 
10459 
10460 BIO_METHOD *BIO_s_file(void);
10461 BIO *BIO_new_file(const char *filename, const char *mode);
10462 BIO *BIO_new_fp(FILE *stream, int close_flag);
10463 
10464 
10465 BIO *BIO_new(BIO_METHOD *type);
10466 int BIO_set(BIO *a, BIO_METHOD *type);
10467 int BIO_free(BIO *a);
10468 void BIO_vfree(BIO *a);
10469 int BIO_read(BIO *b, void *data, int len);
10470 int BIO_gets(BIO *bp, char *buf, int size);
10471 int BIO_write(BIO *b, const void *data, int len);
10472 int BIO_puts(BIO *bp, const char *buf);
10473 int BIO_indent(BIO *b, int indent, int max);
10474 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
10475 long BIO_callback_ctrl(BIO *b, int cmd,
10476                        void (*fp) (struct bio_st *, int, const char *, int,
10477                                    long, long));
10478 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
10479 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
10480 BIO *BIO_push(BIO *b, BIO *append);
10481 BIO *BIO_pop(BIO *b);
10482 void BIO_free_all(BIO *a);
10483 BIO *BIO_find_type(BIO *b, int bio_type);
10484 BIO *BIO_next(BIO *b);
10485 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
10486 int BIO_get_retry_reason(BIO *bio);
10487 BIO *BIO_dup_chain(BIO *in);
10488 
10489 int BIO_nread0(BIO *bio, char **buf);
10490 int BIO_nread(BIO *bio, char **buf, int num);
10491 int BIO_nwrite0(BIO *bio, char **buf);
10492 int BIO_nwrite(BIO *bio, char **buf, int num);
10493 
10494 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
10495                         long argl, long ret);
10496 
10497 BIO_METHOD *BIO_s_mem(void);
10498 BIO *BIO_new_mem_buf(const void *buf, int len);
10499 BIO_METHOD *BIO_s_socket(void);
10500 BIO_METHOD *BIO_s_connect(void);
10501 BIO_METHOD *BIO_s_accept(void);
10502 BIO_METHOD *BIO_s_fd(void);
10503 
10504 BIO_METHOD *BIO_s_log(void);
10505 
10506 BIO_METHOD *BIO_s_bio(void);
10507 BIO_METHOD *BIO_s_null(void);
10508 BIO_METHOD *BIO_f_null(void);
10509 BIO_METHOD *BIO_f_buffer(void);
10510 
10511 
10512 
10513 BIO_METHOD *BIO_f_nbio_test(void);
10514 
10515 BIO_METHOD *BIO_s_datagram(void);
10516 
10517 
10518 
10519 
10520 
10521 /* BIO_METHOD *BIO_f_ber(void); */
10522 
10523 int BIO_sock_should_retry(int i);
10524 int BIO_sock_non_fatal_error(int error);
10525 int BIO_dgram_non_fatal_error(int error);
10526 
10527 int BIO_fd_should_retry(int i);
10528 int BIO_fd_non_fatal_error(int error);
10529 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
10530                 void *u, const char *s, int len);
10531 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
10532                        void *u, const char *s, int len, int indent);
10533 int BIO_dump(BIO *b, const char *bytes, int len);
10534 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
10535 
10536 int BIO_dump_fp(FILE *fp, const char *s, int len);
10537 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
10538 
10539 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
10540                    int datalen);
10541 
10542 struct hostent *BIO_gethostbyname(const char *name);
10543 /*-
10544  * We might want a thread-safe interface too:
10545  * struct hostent *BIO_gethostbyname_r(const char *name,
10546  *     struct hostent *result, void *buffer, size_t buflen);
10547  * or something similar (caller allocates a struct hostent,
10548  * pointed to by "result", and additional buffer space for the various
10549  * substructures; if the buffer does not suffice, NULL is returned
10550  * and an appropriate error code is set).
10551  */
10552 int BIO_sock_error(int sock);
10553 int BIO_socket_ioctl(int fd, long type, void *arg);
10554 int BIO_socket_nbio(int fd, int mode);
10555 int BIO_get_port(const char *str, unsigned short *port_ptr);
10556 int BIO_get_host_ip(const char *str, unsigned char *ip);
10557 int BIO_get_accept_socket(char *host_port, int mode);
10558 int BIO_accept(int sock, char **ip_port);
10559 int BIO_sock_init(void);
10560 void BIO_sock_cleanup(void);
10561 int BIO_set_tcp_ndelay(int sock, int turn_on);
10562 
10563 BIO *BIO_new_socket(int sock, int close_flag);
10564 BIO *BIO_new_dgram(int fd, int close_flag);
10565 # 771 "/usr/include/openssl/bio.h" 3 4
10566 BIO *BIO_new_fd(int fd, int close_flag);
10567 BIO *BIO_new_connect(const char *host_port);
10568 BIO *BIO_new_accept(const char *host_port);
10569 
10570 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
10571                      BIO **bio2, size_t writebuf2);
10572 /*
10573  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
10574  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
10575  * value.
10576  */
10577 
10578 void BIO_copy_next_retry(BIO *b);
10579 
10580 /*
10581  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
10582  */
10583 
10584 
10585 
10586 
10587 
10588 
10589 int BIO_printf(BIO *bio, const char *format, ...)
10590 __attribute__((__format__(__printf__, 2, 3)));
10591 int BIO_vprintf(BIO *bio, const char *format, va_list args)
10592 __attribute__((__format__(__printf__, 2, 0)));
10593 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
10594 __attribute__((__format__(__printf__, 3, 4)));
10595 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
10596 __attribute__((__format__(__printf__, 3, 0)));
10597 
10598 
10599 /* BEGIN ERROR CODES */
10600 /*
10601  * The following lines are auto generated by the script mkerr.pl. Any changes
10602  * made after this point may be overwritten when the script is next run.
10603  */
10604 void ERR_load_BIO_strings(void);
10605 
10606 /* Error codes for the BIO functions. */
10607 
10608 /* Function codes. */
10609 # 849 "/usr/include/openssl/bio.h" 3 4
10610 /* Reason codes. */
10611 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10612 # 1 "/usr/include/openssl/x509.h" 1 3 4
10613 /* crypto/x509/x509.h */
10614 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10615  * All rights reserved.
10616  *
10617  * This package is an SSL implementation written
10618  * by Eric Young (eay@cryptsoft.com).
10619  * The implementation was written so as to conform with Netscapes SSL.
10620  *
10621  * This library is free for commercial and non-commercial use as long as
10622  * the following conditions are aheared to.  The following conditions
10623  * apply to all code found in this distribution, be it the RC4, RSA,
10624  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10625  * included with this distribution is covered by the same copyright terms
10626  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10627  *
10628  * Copyright remains Eric Young's, and as such any Copyright notices in
10629  * the code are not to be removed.
10630  * If this package is used in a product, Eric Young should be given attribution
10631  * as the author of the parts of the library used.
10632  * This can be in the form of a textual message at program startup or
10633  * in documentation (online or textual) provided with the package.
10634  *
10635  * Redistribution and use in source and binary forms, with or without
10636  * modification, are permitted provided that the following conditions
10637  * are met:
10638  * 1. Redistributions of source code must retain the copyright
10639  *    notice, this list of conditions and the following disclaimer.
10640  * 2. Redistributions in binary form must reproduce the above copyright
10641  *    notice, this list of conditions and the following disclaimer in the
10642  *    documentation and/or other materials provided with the distribution.
10643  * 3. All advertising materials mentioning features or use of this software
10644  *    must display the following acknowledgement:
10645  *    "This product includes cryptographic software written by
10646  *     Eric Young (eay@cryptsoft.com)"
10647  *    The word 'cryptographic' can be left out if the rouines from the library
10648  *    being used are not cryptographic related :-).
10649  * 4. If you include any Windows specific code (or a derivative thereof) from
10650  *    the apps directory (application code) you must include an acknowledgement:
10651  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10652  *
10653  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10654  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10655  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10656  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10657  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10658  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10659  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10660  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10661  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10662  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10663  * SUCH DAMAGE.
10664  *
10665  * The licence and distribution terms for any publically available version or
10666  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10667  * copied and put under another distribution licence
10668  * [including the GNU Public Licence.]
10669  */
10670 /* ====================================================================
10671  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
10672  * ECDH support in OpenSSL originally developed by
10673  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
10674  */
10675 
10676 
10677 
10678 
10679 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10680 /* e_os2.h */
10681 /* ====================================================================
10682  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10683  *
10684  * Redistribution and use in source and binary forms, with or without
10685  * modification, are permitted provided that the following conditions
10686  * are met:
10687  *
10688  * 1. Redistributions of source code must retain the above copyright
10689  *    notice, this list of conditions and the following disclaimer.
10690  *
10691  * 2. Redistributions in binary form must reproduce the above copyright
10692  *    notice, this list of conditions and the following disclaimer in
10693  *    the documentation and/or other materials provided with the
10694  *    distribution.
10695  *
10696  * 3. All advertising materials mentioning features or use of this
10697  *    software must display the following acknowledgment:
10698  *    "This product includes software developed by the OpenSSL Project
10699  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10700  *
10701  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10702  *    endorse or promote products derived from this software without
10703  *    prior written permission. For written permission, please contact
10704  *    openssl-core@openssl.org.
10705  *
10706  * 5. Products derived from this software may not be called "OpenSSL"
10707  *    nor may "OpenSSL" appear in their names without prior written
10708  *    permission of the OpenSSL Project.
10709  *
10710  * 6. Redistributions of any form whatsoever must retain the following
10711  *    acknowledgment:
10712  *    "This product includes software developed by the OpenSSL Project
10713  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10714  *
10715  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10716  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10717  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10718  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10719  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10720  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10721  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10722  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10723  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10724  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10725  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10726  * OF THE POSSIBILITY OF SUCH DAMAGE.
10727  * ====================================================================
10728  *
10729  * This product includes cryptographic software written by Eric Young
10730  * (eay@cryptsoft.com).  This product includes software written by Tim
10731  * Hudson (tjh@cryptsoft.com).
10732  *
10733  */
10734 
10735 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10736 /* opensslconf.h */
10737 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10738 
10739 
10740 
10741 
10742 /* OpenSSL was configured with the following options: */
10743 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10744 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10745    asks for it.  This is a transient feature that is provided for those
10746    who haven't had the time to do the appropriate changes in their
10747    applications.  */
10748 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10749 /* crypto/opensslconf.h.in */
10750 
10751 /* Generate 80386 code? */
10752 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10753 # 68 "/usr/include/openssl/x509.h" 2 3 4
10754 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10755 /* ====================================================================
10756  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10757  *
10758  * Redistribution and use in source and binary forms, with or without
10759  * modification, are permitted provided that the following conditions
10760  * are met:
10761  *
10762  * 1. Redistributions of source code must retain the above copyright
10763  *    notice, this list of conditions and the following disclaimer.
10764  *
10765  * 2. Redistributions in binary form must reproduce the above copyright
10766  *    notice, this list of conditions and the following disclaimer in
10767  *    the documentation and/or other materials provided with the
10768  *    distribution.
10769  *
10770  * 3. All advertising materials mentioning features or use of this
10771  *    software must display the following acknowledgment:
10772  *    "This product includes software developed by the OpenSSL Project
10773  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10774  *
10775  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10776  *    endorse or promote products derived from this software without
10777  *    prior written permission. For written permission, please contact
10778  *    openssl-core@openssl.org.
10779  *
10780  * 5. Products derived from this software may not be called "OpenSSL"
10781  *    nor may "OpenSSL" appear in their names without prior written
10782  *    permission of the OpenSSL Project.
10783  *
10784  * 6. Redistributions of any form whatsoever must retain the following
10785  *    acknowledgment:
10786  *    "This product includes software developed by the OpenSSL Project
10787  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10788  *
10789  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10790  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10791  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10792  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10793  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10794  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10795  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10796  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10797  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10798  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10799  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10800  * OF THE POSSIBILITY OF SUCH DAMAGE.
10801  * ====================================================================
10802  *
10803  * This product includes cryptographic software written by Eric Young
10804  * (eay@cryptsoft.com).  This product includes software written by Tim
10805  * Hudson (tjh@cryptsoft.com).
10806  *
10807  */
10808 # 69 "/usr/include/openssl/x509.h" 2 3 4
10809 
10810 # 1 "/usr/include/openssl/buffer.h" 1 3 4
10811 /* crypto/buffer/buffer.h */
10812 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10813  * All rights reserved.
10814  *
10815  * This package is an SSL implementation written
10816  * by Eric Young (eay@cryptsoft.com).
10817  * The implementation was written so as to conform with Netscapes SSL.
10818  *
10819  * This library is free for commercial and non-commercial use as long as
10820  * the following conditions are aheared to.  The following conditions
10821  * apply to all code found in this distribution, be it the RC4, RSA,
10822  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10823  * included with this distribution is covered by the same copyright terms
10824  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10825  *
10826  * Copyright remains Eric Young's, and as such any Copyright notices in
10827  * the code are not to be removed.
10828  * If this package is used in a product, Eric Young should be given attribution
10829  * as the author of the parts of the library used.
10830  * This can be in the form of a textual message at program startup or
10831  * in documentation (online or textual) provided with the package.
10832  *
10833  * Redistribution and use in source and binary forms, with or without
10834  * modification, are permitted provided that the following conditions
10835  * are met:
10836  * 1. Redistributions of source code must retain the copyright
10837  *    notice, this list of conditions and the following disclaimer.
10838  * 2. Redistributions in binary form must reproduce the above copyright
10839  *    notice, this list of conditions and the following disclaimer in the
10840  *    documentation and/or other materials provided with the distribution.
10841  * 3. All advertising materials mentioning features or use of this software
10842  *    must display the following acknowledgement:
10843  *    "This product includes cryptographic software written by
10844  *     Eric Young (eay@cryptsoft.com)"
10845  *    The word 'cryptographic' can be left out if the rouines from the library
10846  *    being used are not cryptographic related :-).
10847  * 4. If you include any Windows specific code (or a derivative thereof) from
10848  *    the apps directory (application code) you must include an acknowledgement:
10849  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10850  *
10851  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10852  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10853  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10854  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10855  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10856  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10857  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10858  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10859  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10860  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10861  * SUCH DAMAGE.
10862  *
10863  * The licence and distribution terms for any publically available version or
10864  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10865  * copied and put under another distribution licence
10866  * [including the GNU Public Licence.]
10867  */
10868 
10869 
10870 
10871 
10872 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10873 /* ====================================================================
10874  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10875  *
10876  * Redistribution and use in source and binary forms, with or without
10877  * modification, are permitted provided that the following conditions
10878  * are met:
10879  *
10880  * 1. Redistributions of source code must retain the above copyright
10881  *    notice, this list of conditions and the following disclaimer.
10882  *
10883  * 2. Redistributions in binary form must reproduce the above copyright
10884  *    notice, this list of conditions and the following disclaimer in
10885  *    the documentation and/or other materials provided with the
10886  *    distribution.
10887  *
10888  * 3. All advertising materials mentioning features or use of this
10889  *    software must display the following acknowledgment:
10890  *    "This product includes software developed by the OpenSSL Project
10891  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10892  *
10893  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10894  *    endorse or promote products derived from this software without
10895  *    prior written permission. For written permission, please contact
10896  *    openssl-core@openssl.org.
10897  *
10898  * 5. Products derived from this software may not be called "OpenSSL"
10899  *    nor may "OpenSSL" appear in their names without prior written
10900  *    permission of the OpenSSL Project.
10901  *
10902  * 6. Redistributions of any form whatsoever must retain the following
10903  *    acknowledgment:
10904  *    "This product includes software developed by the OpenSSL Project
10905  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10906  *
10907  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10908  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10909  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10910  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10911  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10912  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10913  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10914  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10915  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10916  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10917  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10918  * OF THE POSSIBILITY OF SUCH DAMAGE.
10919  * ====================================================================
10920  *
10921  * This product includes cryptographic software written by Eric Young
10922  * (eay@cryptsoft.com).  This product includes software written by Tim
10923  * Hudson (tjh@cryptsoft.com).
10924  *
10925  */
10926 # 63 "/usr/include/openssl/buffer.h" 2 3 4
10927 
10928 
10929 
10930 
10931 
10932 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
10933 /*
10934  * CDDL HEADER START
10935  *
10936  * The contents of this file are subject to the terms of the
10937  * Common Development and Distribution License, Version 1.0 only
10938  * (the "License").  You may not use this file except in compliance
10939  * with the License.
10940  *
10941  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10942  * or http://www.opensolaris.org/os/licensing.
10943  * See the License for the specific language governing permissions
10944  * and limitations under the License.
10945  *
10946  * When distributing Covered Code, include this CDDL HEADER in each
10947  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10948  * If applicable, add the following below this CDDL HEADER, with the
10949  * fields enclosed by brackets "[]" replaced with your own identifying
10950  * information: Portions Copyright [yyyy] [name of copyright owner]
10951  *
10952  * CDDL HEADER END
10953  */
10954 /*	Copyright (c) 1988 AT&T	*/
10955 /*	  All Rights Reserved  	*/
10956 
10957 
10958 /*
10959  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
10960  * Use is subject to license terms.
10961  */
10962 
10963 
10964 
10965 
10966 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
10967 /*
10968  * CDDL HEADER START
10969  *
10970  * The contents of this file are subject to the terms of the
10971  * Common Development and Distribution License (the "License").
10972  * You may not use this file except in compliance with the License.
10973  *
10974  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10975  * or http://www.opensolaris.org/os/licensing.
10976  * See the License for the specific language governing permissions
10977  * and limitations under the License.
10978  *
10979  *
10980  * When distributing Covered Code, include this CDDL HEADER in each
10981  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10982  * If applicable, add the following below this CDDL HEADER, with the
10983  * fields enclosed by brackets "[]" replaced with your own identifying
10984  * information: Portions Copyright [yyyy] [name of copyright owner]
10985  *
10986  * CDDL HEADER END
10987  */
10988 
10989 /*
10990  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10991  * Use is subject to license terms.
10992  * Copyright 2016 Joyent, Inc.
10993  */
10994 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10995 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
10996 /*
10997  * CDDL HEADER START
10998  *
10999  * The contents of this file are subject to the terms of the
11000  * Common Development and Distribution License, Version 1.0 only
11001  * (the "License").  You may not use this file except in compliance
11002  * with the License.
11003  *
11004  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11005  * or http://www.opensolaris.org/os/licensing.
11006  * See the License for the specific language governing permissions
11007  * and limitations under the License.
11008  *
11009  * When distributing Covered Code, include this CDDL HEADER in each
11010  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11011  * If applicable, add the following below this CDDL HEADER, with the
11012  * fields enclosed by brackets "[]" replaced with your own identifying
11013  * information: Portions Copyright [yyyy] [name of copyright owner]
11014  *
11015  * CDDL HEADER END
11016  */
11017 /*	Copyright (c) 1988 AT&T	*/
11018 /*	  All Rights Reserved  	*/
11019 
11020 
11021 /*
11022  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
11023  * Use is subject to license terms.
11024  */
11025 
11026 /*
11027  * Copyright 2014 PALO, Richard.
11028  * Copyright 2016 Joyent, Inc.
11029  */
11030 
11031 /*
11032  * An application should not include this header directly.  Instead it
11033  * should be included only through the inclusion of other Sun headers.
11034  *
11035  * The contents of this header is limited to identifiers specified in the
11036  * C Standard.  Any new identifiers specified in future amendments to the
11037  * C Standard must be placed in this header.  If these new identifiers
11038  * are required to also be in the C++ Standard "std" namespace, then for
11039  * anything other than macro definitions, corresponding "using" directives
11040  * must also be added to <stddef.h.h>.
11041  */
11042 
11043 
11044 
11045 
11046 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
11047 /*
11048  * CDDL HEADER START
11049  *
11050  * The contents of this file are subject to the terms of the
11051  * Common Development and Distribution License (the "License").
11052  * You may not use this file except in compliance with the License.
11053  *
11054  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11055  * or http://www.opensolaris.org/os/licensing.
11056  * See the License for the specific language governing permissions
11057  * and limitations under the License.
11058  *
11059  *
11060  * When distributing Covered Code, include this CDDL HEADER in each
11061  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11062  * If applicable, add the following below this CDDL HEADER, with the
11063  * fields enclosed by brackets "[]" replaced with your own identifying
11064  * information: Portions Copyright [yyyy] [name of copyright owner]
11065  *
11066  * CDDL HEADER END
11067  */
11068 
11069 /*
11070  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
11071  * Use is subject to license terms.
11072  * Copyright 2016 Joyent, Inc.
11073  */
11074 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
11075 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
11076 /*
11077  * CDDL HEADER START
11078  *
11079  * The contents of this file are subject to the terms of the
11080  * Common Development and Distribution License (the "License").
11081  * You may not use this file except in compliance with the License.
11082  *
11083  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11084  * or http://www.opensolaris.org/os/licensing.
11085  * See the License for the specific language governing permissions
11086  * and limitations under the License.
11087  *
11088  * When distributing Covered Code, include this CDDL HEADER in each
11089  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11090  * If applicable, add the following below this CDDL HEADER, with the
11091  * fields enclosed by brackets "[]" replaced with your own identifying
11092  * information: Portions Copyright [yyyy] [name of copyright owner]
11093  *
11094  * CDDL HEADER END
11095  */
11096 
11097 /*
11098  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
11099  * Copyright 2016 Joyent, Inc.
11100  *
11101  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
11102  * Use is subject to license terms.
11103  */
11104 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
11105 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
11106 /*
11107  * This file and its contents are supplied under the terms of the
11108  * Common Development and Distribution License ("CDDL"), version 1.0.
11109  * You may only use this file in accordance with the terms of version
11110  * 1.0 of the CDDL.
11111  *
11112  * A full copy of the text of the CDDL should have accompanied this
11113  * source.  A copy of the CDDL is also available via the Internet at
11114  * http://www.illumos.org/license/CDDL.
11115  */
11116 
11117 /*
11118  * Copyright 2014-2016 PALO, Richard.
11119  */
11120 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
11121 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
11122 typedef long max_align_t;
11123 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
11124 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
11125 /*
11126  * This file and its contents are supplied under the terms of the
11127  * Common Development and Distribution License ("CDDL"), version 1.0.
11128  * You may only use this file in accordance with the terms of version
11129  * 1.0 of the CDDL.
11130  *
11131  * A full copy of the text of the CDDL should have accompanied this
11132  * source.  A copy of the CDDL is also available via the Internet at
11133  * http://www.illumos.org/license/CDDL.
11134  */
11135 
11136 /*
11137  * Copyright 2017 Toomas Soome <tsoome@me.com>
11138  */
11139 
11140 
11141 
11142 
11143 /*
11144  * Commonly used macros and definitions.
11145  */
11146 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
11147 /*
11148  * We must not expose container_of() to userland, but we want it
11149  * to be available for early boot and for the kernel.
11150  */
11151 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
11152 
11153 /*
11154  * Allow global visibility for symbols defined in
11155  * C++ "std" namespace in <iso/stddef_iso.h>.
11156  */
11157 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
11158 /*
11159  * wchar_t is a built-in type in standard C++ and as such is not
11160  * defined here when using standard C++. However, the GNU compiler
11161  * fixincludes utility nonetheless creates its own version of this
11162  * header for use by gcc and g++. In that version it adds a redundant
11163  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
11164  * header we need to include the following magic comment:
11165  *
11166  * we must use the C++ compiler's type
11167  *
11168  * The above comment should not be removed or changed until GNU
11169  * gcc/fixinc/inclhack.def is updated to bypass this header.
11170  */
11171 # 69 "/usr/include/openssl/buffer.h" 2 3 4
11172 
11173 
11174 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
11175 /*
11176  * CDDL HEADER START
11177  *
11178  * The contents of this file are subject to the terms of the
11179  * Common Development and Distribution License (the "License").
11180  * You may not use this file except in compliance with the License.
11181  *
11182  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11183  * or http://www.opensolaris.org/os/licensing.
11184  * See the License for the specific language governing permissions
11185  * and limitations under the License.
11186  *
11187  * When distributing Covered Code, include this CDDL HEADER in each
11188  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11189  * If applicable, add the following below this CDDL HEADER, with the
11190  * fields enclosed by brackets "[]" replaced with your own identifying
11191  * information: Portions Copyright [yyyy] [name of copyright owner]
11192  *
11193  * CDDL HEADER END
11194  */
11195 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11196 /*	  All Rights Reserved  	*/
11197 
11198 
11199 /*
11200  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11201  * Use is subject to license terms.
11202  *
11203  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
11204  * Copyright 2016 Joyent, Inc.
11205  */
11206 # 72 "/usr/include/openssl/buffer.h" 2 3 4
11207 
11208 
11209 /* Already declared in ossl_typ.h */
11210 /* typedef struct buf_mem_st BUF_MEM; */
11211 
11212 struct buf_mem_st {
11213     size_t length; /* current number of bytes */
11214     char *data;
11215     size_t max; /* size of buffer */
11216 };
11217 
11218 BUF_MEM *BUF_MEM_new(void);
11219 void BUF_MEM_free(BUF_MEM *a);
11220 int BUF_MEM_grow(BUF_MEM *str, size_t len);
11221 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
11222 size_t BUF_strnlen(const char *str, size_t maxlen);
11223 char *BUF_strdup(const char *str);
11224 
11225 /*
11226  * Like strndup, but in addition, explicitly guarantees to never read past the
11227  * first |siz| bytes of |str|.
11228  */
11229 char *BUF_strndup(const char *str, size_t siz);
11230 
11231 void *BUF_memdup(const void *data, size_t siz);
11232 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
11233 
11234 /* safe string functions */
11235 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
11236 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
11237 
11238 /* BEGIN ERROR CODES */
11239 /*
11240  * The following lines are auto generated by the script mkerr.pl. Any changes
11241  * made after this point may be overwritten when the script is next run.
11242  */
11243 void ERR_load_BUF_strings(void);
11244 
11245 /* Error codes for the BUF functions. */
11246 
11247 /* Function codes. */
11248 
11249 
11250 
11251 
11252 
11253 
11254 
11255 /* Reason codes. */
11256 # 71 "/usr/include/openssl/x509.h" 2 3 4
11257 
11258 
11259 # 1 "/usr/include/openssl/evp.h" 1 3 4
11260 /* crypto/evp/evp.h */
11261 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11262  * All rights reserved.
11263  *
11264  * This package is an SSL implementation written
11265  * by Eric Young (eay@cryptsoft.com).
11266  * The implementation was written so as to conform with Netscapes SSL.
11267  *
11268  * This library is free for commercial and non-commercial use as long as
11269  * the following conditions are aheared to.  The following conditions
11270  * apply to all code found in this distribution, be it the RC4, RSA,
11271  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11272  * included with this distribution is covered by the same copyright terms
11273  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11274  *
11275  * Copyright remains Eric Young's, and as such any Copyright notices in
11276  * the code are not to be removed.
11277  * If this package is used in a product, Eric Young should be given attribution
11278  * as the author of the parts of the library used.
11279  * This can be in the form of a textual message at program startup or
11280  * in documentation (online or textual) provided with the package.
11281  *
11282  * Redistribution and use in source and binary forms, with or without
11283  * modification, are permitted provided that the following conditions
11284  * are met:
11285  * 1. Redistributions of source code must retain the copyright
11286  *    notice, this list of conditions and the following disclaimer.
11287  * 2. Redistributions in binary form must reproduce the above copyright
11288  *    notice, this list of conditions and the following disclaimer in the
11289  *    documentation and/or other materials provided with the distribution.
11290  * 3. All advertising materials mentioning features or use of this software
11291  *    must display the following acknowledgement:
11292  *    "This product includes cryptographic software written by
11293  *     Eric Young (eay@cryptsoft.com)"
11294  *    The word 'cryptographic' can be left out if the rouines from the library
11295  *    being used are not cryptographic related :-).
11296  * 4. If you include any Windows specific code (or a derivative thereof) from
11297  *    the apps directory (application code) you must include an acknowledgement:
11298  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11299  *
11300  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11301  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11302  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11303  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11304  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11305  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11306  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11307  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11308  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11309  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11310  * SUCH DAMAGE.
11311  *
11312  * The licence and distribution terms for any publically available version or
11313  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11314  * copied and put under another distribution licence
11315  * [including the GNU Public Licence.]
11316  */
11317 # 66 "/usr/include/openssl/evp.h" 3 4
11318 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11319 /* opensslconf.h */
11320 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11321 
11322 
11323 
11324 
11325 /* OpenSSL was configured with the following options: */
11326 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11327 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11328    asks for it.  This is a transient feature that is provided for those
11329    who haven't had the time to do the appropriate changes in their
11330    applications.  */
11331 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11332 /* crypto/opensslconf.h.in */
11333 
11334 /* Generate 80386 code? */
11335 # 67 "/usr/include/openssl/evp.h" 2 3 4
11336 
11337 
11338 
11339 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11340 /* ====================================================================
11341  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11342  *
11343  * Redistribution and use in source and binary forms, with or without
11344  * modification, are permitted provided that the following conditions
11345  * are met:
11346  *
11347  * 1. Redistributions of source code must retain the above copyright
11348  *    notice, this list of conditions and the following disclaimer.
11349  *
11350  * 2. Redistributions in binary form must reproduce the above copyright
11351  *    notice, this list of conditions and the following disclaimer in
11352  *    the documentation and/or other materials provided with the
11353  *    distribution.
11354  *
11355  * 3. All advertising materials mentioning features or use of this
11356  *    software must display the following acknowledgment:
11357  *    "This product includes software developed by the OpenSSL Project
11358  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11359  *
11360  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11361  *    endorse or promote products derived from this software without
11362  *    prior written permission. For written permission, please contact
11363  *    openssl-core@openssl.org.
11364  *
11365  * 5. Products derived from this software may not be called "OpenSSL"
11366  *    nor may "OpenSSL" appear in their names without prior written
11367  *    permission of the OpenSSL Project.
11368  *
11369  * 6. Redistributions of any form whatsoever must retain the following
11370  *    acknowledgment:
11371  *    "This product includes software developed by the OpenSSL Project
11372  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11373  *
11374  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11375  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11376  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11377  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11378  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11379  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11380  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11381  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11382  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11383  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11384  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11385  * OF THE POSSIBILITY OF SUCH DAMAGE.
11386  * ====================================================================
11387  *
11388  * This product includes cryptographic software written by Eric Young
11389  * (eay@cryptsoft.com).  This product includes software written by Tim
11390  * Hudson (tjh@cryptsoft.com).
11391  *
11392  */
11393 # 71 "/usr/include/openssl/evp.h" 2 3 4
11394 
11395 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
11396 /* ====================================================================
11397  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11398  *
11399  * Redistribution and use in source and binary forms, with or without
11400  * modification, are permitted provided that the following conditions
11401  * are met:
11402  *
11403  * 1. Redistributions of source code must retain the above copyright
11404  *    notice, this list of conditions and the following disclaimer.
11405  *
11406  * 2. Redistributions in binary form must reproduce the above copyright
11407  *    notice, this list of conditions and the following disclaimer in
11408  *    the documentation and/or other materials provided with the
11409  *    distribution.
11410  *
11411  * 3. All advertising materials mentioning features or use of this
11412  *    software must display the following acknowledgment:
11413  *    "This product includes software developed by the OpenSSL Project
11414  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11415  *
11416  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11417  *    endorse or promote products derived from this software without
11418  *    prior written permission. For written permission, please contact
11419  *    openssl-core@openssl.org.
11420  *
11421  * 5. Products derived from this software may not be called "OpenSSL"
11422  *    nor may "OpenSSL" appear in their names without prior written
11423  *    permission of the OpenSSL Project.
11424  *
11425  * 6. Redistributions of any form whatsoever must retain the following
11426  *    acknowledgment:
11427  *    "This product includes software developed by the OpenSSL Project
11428  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11429  *
11430  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11431  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11432  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11433  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11434  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11435  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11436  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11437  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11438  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11439  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11440  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11441  * OF THE POSSIBILITY OF SUCH DAMAGE.
11442  * ====================================================================
11443  *
11444  * This product includes cryptographic software written by Eric Young
11445  * (eay@cryptsoft.com).  This product includes software written by Tim
11446  * Hudson (tjh@cryptsoft.com).
11447  *
11448  */
11449 # 73 "/usr/include/openssl/evp.h" 2 3 4
11450 
11451 
11452 # 1 "/usr/include/openssl/bio.h" 1 3 4
11453 /* crypto/bio/bio.h */
11454 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11455  * All rights reserved.
11456  *
11457  * This package is an SSL implementation written
11458  * by Eric Young (eay@cryptsoft.com).
11459  * The implementation was written so as to conform with Netscapes SSL.
11460  *
11461  * This library is free for commercial and non-commercial use as long as
11462  * the following conditions are aheared to.  The following conditions
11463  * apply to all code found in this distribution, be it the RC4, RSA,
11464  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11465  * included with this distribution is covered by the same copyright terms
11466  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11467  *
11468  * Copyright remains Eric Young's, and as such any Copyright notices in
11469  * the code are not to be removed.
11470  * If this package is used in a product, Eric Young should be given attribution
11471  * as the author of the parts of the library used.
11472  * This can be in the form of a textual message at program startup or
11473  * in documentation (online or textual) provided with the package.
11474  *
11475  * Redistribution and use in source and binary forms, with or without
11476  * modification, are permitted provided that the following conditions
11477  * are met:
11478  * 1. Redistributions of source code must retain the copyright
11479  *    notice, this list of conditions and the following disclaimer.
11480  * 2. Redistributions in binary form must reproduce the above copyright
11481  *    notice, this list of conditions and the following disclaimer in the
11482  *    documentation and/or other materials provided with the distribution.
11483  * 3. All advertising materials mentioning features or use of this software
11484  *    must display the following acknowledgement:
11485  *    "This product includes cryptographic software written by
11486  *     Eric Young (eay@cryptsoft.com)"
11487  *    The word 'cryptographic' can be left out if the rouines from the library
11488  *    being used are not cryptographic related :-).
11489  * 4. If you include any Windows specific code (or a derivative thereof) from
11490  *    the apps directory (application code) you must include an acknowledgement:
11491  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11492  *
11493  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11494  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11495  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11496  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11497  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11498  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11499  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11500  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11501  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11502  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11503  * SUCH DAMAGE.
11504  *
11505  * The licence and distribution terms for any publically available version or
11506  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11507  * copied and put under another distribution licence
11508  * [including the GNU Public Licence.]
11509  */
11510 # 76 "/usr/include/openssl/evp.h" 2 3 4
11511 
11512 
11513 /*-
11514 #define EVP_RC2_KEY_SIZE                16
11515 #define EVP_RC4_KEY_SIZE                16
11516 #define EVP_BLOWFISH_KEY_SIZE           16
11517 #define EVP_CAST5_KEY_SIZE              16
11518 #define EVP_RC5_32_12_16_KEY_SIZE       16
11519 */
11520 
11521 
11522 
11523 
11524 
11525 
11526 /* Default PKCS#5 iteration count */
11527 
11528 
11529 # 1 "/usr/include/openssl/objects.h" 1 3 4
11530 /* crypto/objects/objects.h */
11531 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11532  * All rights reserved.
11533  *
11534  * This package is an SSL implementation written
11535  * by Eric Young (eay@cryptsoft.com).
11536  * The implementation was written so as to conform with Netscapes SSL.
11537  *
11538  * This library is free for commercial and non-commercial use as long as
11539  * the following conditions are aheared to.  The following conditions
11540  * apply to all code found in this distribution, be it the RC4, RSA,
11541  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11542  * included with this distribution is covered by the same copyright terms
11543  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11544  *
11545  * Copyright remains Eric Young's, and as such any Copyright notices in
11546  * the code are not to be removed.
11547  * If this package is used in a product, Eric Young should be given attribution
11548  * as the author of the parts of the library used.
11549  * This can be in the form of a textual message at program startup or
11550  * in documentation (online or textual) provided with the package.
11551  *
11552  * Redistribution and use in source and binary forms, with or without
11553  * modification, are permitted provided that the following conditions
11554  * are met:
11555  * 1. Redistributions of source code must retain the copyright
11556  *    notice, this list of conditions and the following disclaimer.
11557  * 2. Redistributions in binary form must reproduce the above copyright
11558  *    notice, this list of conditions and the following disclaimer in the
11559  *    documentation and/or other materials provided with the distribution.
11560  * 3. All advertising materials mentioning features or use of this software
11561  *    must display the following acknowledgement:
11562  *    "This product includes cryptographic software written by
11563  *     Eric Young (eay@cryptsoft.com)"
11564  *    The word 'cryptographic' can be left out if the rouines from the library
11565  *    being used are not cryptographic related :-).
11566  * 4. If you include any Windows specific code (or a derivative thereof) from
11567  *    the apps directory (application code) you must include an acknowledgement:
11568  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11569  *
11570  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11571  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11572  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11573  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11574  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11575  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11576  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11577  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11578  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11579  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11580  * SUCH DAMAGE.
11581  *
11582  * The licence and distribution terms for any publically available version or
11583  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11584  * copied and put under another distribution licence
11585  * [including the GNU Public Licence.]
11586  */
11587 
11588 
11589 
11590 
11591 
11592 
11593 
11594 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
11595 /* crypto/objects/obj_mac.h */
11596 
11597 /*
11598  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
11599  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
11600  */
11601 
11602 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
11603  * All rights reserved.
11604  *
11605  * This package is an SSL implementation written
11606  * by Eric Young (eay@cryptsoft.com).
11607  * The implementation was written so as to conform with Netscapes SSL.
11608  *
11609  * This library is free for commercial and non-commercial use as long as
11610  * the following conditions are aheared to.  The following conditions
11611  * apply to all code found in this distribution, be it the RC4, RSA,
11612  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11613  * included with this distribution is covered by the same copyright terms
11614  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11615  *
11616  * Copyright remains Eric Young's, and as such any Copyright notices in
11617  * the code are not to be removed.
11618  * If this package is used in a product, Eric Young should be given attribution
11619  * as the author of the parts of the library used.
11620  * This can be in the form of a textual message at program startup or
11621  * in documentation (online or textual) provided with the package.
11622  *
11623  * Redistribution and use in source and binary forms, with or without
11624  * modification, are permitted provided that the following conditions
11625  * are met:
11626  * 1. Redistributions of source code must retain the copyright
11627  *    notice, this list of conditions and the following disclaimer.
11628  * 2. Redistributions in binary form must reproduce the above copyright
11629  *    notice, this list of conditions and the following disclaimer in the
11630  *    documentation and/or other materials provided with the distribution.
11631  * 3. All advertising materials mentioning features or use of this software
11632  *    must display the following acknowledgement:
11633  *    "This product includes cryptographic software written by
11634  *     Eric Young (eay@cryptsoft.com)"
11635  *    The word 'cryptographic' can be left out if the rouines from the library
11636  *    being used are not cryptographic related :-).
11637  * 4. If you include any Windows specific code (or a derivative thereof) from
11638  *    the apps directory (application code) you must include an acknowledgement:
11639  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11640  *
11641  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11642  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11643  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11644  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11645  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11646  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11647  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11648  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11649  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11650  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11651  * SUCH DAMAGE.
11652  *
11653  * The licence and distribution terms for any publically available version or
11654  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11655  * copied and put under another distribution licence
11656  * [including the GNU Public Licence.]
11657  */
11658 # 66 "/usr/include/openssl/objects.h" 2 3 4
11659 # 964 "/usr/include/openssl/objects.h" 3 4
11660 # 1 "/usr/include/openssl/bio.h" 1 3 4
11661 /* crypto/bio/bio.h */
11662 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11663  * All rights reserved.
11664  *
11665  * This package is an SSL implementation written
11666  * by Eric Young (eay@cryptsoft.com).
11667  * The implementation was written so as to conform with Netscapes SSL.
11668  *
11669  * This library is free for commercial and non-commercial use as long as
11670  * the following conditions are aheared to.  The following conditions
11671  * apply to all code found in this distribution, be it the RC4, RSA,
11672  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11673  * included with this distribution is covered by the same copyright terms
11674  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11675  *
11676  * Copyright remains Eric Young's, and as such any Copyright notices in
11677  * the code are not to be removed.
11678  * If this package is used in a product, Eric Young should be given attribution
11679  * as the author of the parts of the library used.
11680  * This can be in the form of a textual message at program startup or
11681  * in documentation (online or textual) provided with the package.
11682  *
11683  * Redistribution and use in source and binary forms, with or without
11684  * modification, are permitted provided that the following conditions
11685  * are met:
11686  * 1. Redistributions of source code must retain the copyright
11687  *    notice, this list of conditions and the following disclaimer.
11688  * 2. Redistributions in binary form must reproduce the above copyright
11689  *    notice, this list of conditions and the following disclaimer in the
11690  *    documentation and/or other materials provided with the distribution.
11691  * 3. All advertising materials mentioning features or use of this software
11692  *    must display the following acknowledgement:
11693  *    "This product includes cryptographic software written by
11694  *     Eric Young (eay@cryptsoft.com)"
11695  *    The word 'cryptographic' can be left out if the rouines from the library
11696  *    being used are not cryptographic related :-).
11697  * 4. If you include any Windows specific code (or a derivative thereof) from
11698  *    the apps directory (application code) you must include an acknowledgement:
11699  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11700  *
11701  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11702  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11703  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11704  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11705  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11706  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11707  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11708  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11709  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11710  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11711  * SUCH DAMAGE.
11712  *
11713  * The licence and distribution terms for any publically available version or
11714  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11715  * copied and put under another distribution licence
11716  * [including the GNU Public Licence.]
11717  */
11718 # 965 "/usr/include/openssl/objects.h" 2 3 4
11719 # 1 "/usr/include/openssl/asn1.h" 1 3 4
11720 /* crypto/asn1/asn1.h */
11721 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11722  * All rights reserved.
11723  *
11724  * This package is an SSL implementation written
11725  * by Eric Young (eay@cryptsoft.com).
11726  * The implementation was written so as to conform with Netscapes SSL.
11727  *
11728  * This library is free for commercial and non-commercial use as long as
11729  * the following conditions are aheared to.  The following conditions
11730  * apply to all code found in this distribution, be it the RC4, RSA,
11731  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11732  * included with this distribution is covered by the same copyright terms
11733  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11734  *
11735  * Copyright remains Eric Young's, and as such any Copyright notices in
11736  * the code are not to be removed.
11737  * If this package is used in a product, Eric Young should be given attribution
11738  * as the author of the parts of the library used.
11739  * This can be in the form of a textual message at program startup or
11740  * in documentation (online or textual) provided with the package.
11741  *
11742  * Redistribution and use in source and binary forms, with or without
11743  * modification, are permitted provided that the following conditions
11744  * are met:
11745  * 1. Redistributions of source code must retain the copyright
11746  *    notice, this list of conditions and the following disclaimer.
11747  * 2. Redistributions in binary form must reproduce the above copyright
11748  *    notice, this list of conditions and the following disclaimer in the
11749  *    documentation and/or other materials provided with the distribution.
11750  * 3. All advertising materials mentioning features or use of this software
11751  *    must display the following acknowledgement:
11752  *    "This product includes cryptographic software written by
11753  *     Eric Young (eay@cryptsoft.com)"
11754  *    The word 'cryptographic' can be left out if the rouines from the library
11755  *    being used are not cryptographic related :-).
11756  * 4. If you include any Windows specific code (or a derivative thereof) from
11757  *    the apps directory (application code) you must include an acknowledgement:
11758  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11759  *
11760  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11761  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11762  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11763  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11764  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11765  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11766  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11767  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11768  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11769  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11770  * SUCH DAMAGE.
11771  *
11772  * The licence and distribution terms for any publically available version or
11773  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11774  * copied and put under another distribution licence
11775  * [including the GNU Public Licence.]
11776  */
11777 
11778 
11779 
11780 
11781 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
11782 /*
11783  * CDDL HEADER START
11784  *
11785  * The contents of this file are subject to the terms of the
11786  * Common Development and Distribution License (the "License").
11787  * You may not use this file except in compliance with the License.
11788  *
11789  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11790  * or http://www.opensolaris.org/os/licensing.
11791  * See the License for the specific language governing permissions
11792  * and limitations under the License.
11793  *
11794  * When distributing Covered Code, include this CDDL HEADER in each
11795  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11796  * If applicable, add the following below this CDDL HEADER, with the
11797  * fields enclosed by brackets "[]" replaced with your own identifying
11798  * information: Portions Copyright [yyyy] [name of copyright owner]
11799  *
11800  * CDDL HEADER END
11801  */
11802 /*	Copyright (c) 1988 AT&T	*/
11803 /*	  All Rights Reserved  	*/
11804 
11805 
11806 /*
11807  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11808  *
11809  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
11810  * Use is subject to license terms.
11811  */
11812 /*
11813  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
11814  * Copyright 2016 Joyent, Inc.
11815  */
11816 # 63 "/usr/include/openssl/asn1.h" 2 3 4
11817 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11818 /* e_os2.h */
11819 /* ====================================================================
11820  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11821  *
11822  * Redistribution and use in source and binary forms, with or without
11823  * modification, are permitted provided that the following conditions
11824  * are met:
11825  *
11826  * 1. Redistributions of source code must retain the above copyright
11827  *    notice, this list of conditions and the following disclaimer.
11828  *
11829  * 2. Redistributions in binary form must reproduce the above copyright
11830  *    notice, this list of conditions and the following disclaimer in
11831  *    the documentation and/or other materials provided with the
11832  *    distribution.
11833  *
11834  * 3. All advertising materials mentioning features or use of this
11835  *    software must display the following acknowledgment:
11836  *    "This product includes software developed by the OpenSSL Project
11837  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11838  *
11839  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11840  *    endorse or promote products derived from this software without
11841  *    prior written permission. For written permission, please contact
11842  *    openssl-core@openssl.org.
11843  *
11844  * 5. Products derived from this software may not be called "OpenSSL"
11845  *    nor may "OpenSSL" appear in their names without prior written
11846  *    permission of the OpenSSL Project.
11847  *
11848  * 6. Redistributions of any form whatsoever must retain the following
11849  *    acknowledgment:
11850  *    "This product includes software developed by the OpenSSL Project
11851  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11852  *
11853  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11854  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11855  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11856  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11857  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11858  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11859  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11860  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11861  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11862  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11863  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11864  * OF THE POSSIBILITY OF SUCH DAMAGE.
11865  * ====================================================================
11866  *
11867  * This product includes cryptographic software written by Eric Young
11868  * (eay@cryptsoft.com).  This product includes software written by Tim
11869  * Hudson (tjh@cryptsoft.com).
11870  *
11871  */
11872 
11873 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11874 /* opensslconf.h */
11875 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11876 
11877 
11878 
11879 
11880 /* OpenSSL was configured with the following options: */
11881 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11882 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11883    asks for it.  This is a transient feature that is provided for those
11884    who haven't had the time to do the appropriate changes in their
11885    applications.  */
11886 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11887 /* crypto/opensslconf.h.in */
11888 
11889 /* Generate 80386 code? */
11890 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11891 # 64 "/usr/include/openssl/asn1.h" 2 3 4
11892 
11893 # 1 "/usr/include/openssl/bio.h" 1 3 4
11894 /* crypto/bio/bio.h */
11895 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11896  * All rights reserved.
11897  *
11898  * This package is an SSL implementation written
11899  * by Eric Young (eay@cryptsoft.com).
11900  * The implementation was written so as to conform with Netscapes SSL.
11901  *
11902  * This library is free for commercial and non-commercial use as long as
11903  * the following conditions are aheared to.  The following conditions
11904  * apply to all code found in this distribution, be it the RC4, RSA,
11905  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11906  * included with this distribution is covered by the same copyright terms
11907  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11908  *
11909  * Copyright remains Eric Young's, and as such any Copyright notices in
11910  * the code are not to be removed.
11911  * If this package is used in a product, Eric Young should be given attribution
11912  * as the author of the parts of the library used.
11913  * This can be in the form of a textual message at program startup or
11914  * in documentation (online or textual) provided with the package.
11915  *
11916  * Redistribution and use in source and binary forms, with or without
11917  * modification, are permitted provided that the following conditions
11918  * are met:
11919  * 1. Redistributions of source code must retain the copyright
11920  *    notice, this list of conditions and the following disclaimer.
11921  * 2. Redistributions in binary form must reproduce the above copyright
11922  *    notice, this list of conditions and the following disclaimer in the
11923  *    documentation and/or other materials provided with the distribution.
11924  * 3. All advertising materials mentioning features or use of this software
11925  *    must display the following acknowledgement:
11926  *    "This product includes cryptographic software written by
11927  *     Eric Young (eay@cryptsoft.com)"
11928  *    The word 'cryptographic' can be left out if the rouines from the library
11929  *    being used are not cryptographic related :-).
11930  * 4. If you include any Windows specific code (or a derivative thereof) from
11931  *    the apps directory (application code) you must include an acknowledgement:
11932  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11933  *
11934  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11935  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11936  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11937  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11938  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11939  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11940  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11941  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11942  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11943  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11944  * SUCH DAMAGE.
11945  *
11946  * The licence and distribution terms for any publically available version or
11947  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11948  * copied and put under another distribution licence
11949  * [including the GNU Public Licence.]
11950  */
11951 # 66 "/usr/include/openssl/asn1.h" 2 3 4
11952 
11953 # 1 "/usr/include/openssl/stack.h" 1 3 4
11954 /* crypto/stack/stack.h */
11955 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11956  * All rights reserved.
11957  *
11958  * This package is an SSL implementation written
11959  * by Eric Young (eay@cryptsoft.com).
11960  * The implementation was written so as to conform with Netscapes SSL.
11961  *
11962  * This library is free for commercial and non-commercial use as long as
11963  * the following conditions are aheared to.  The following conditions
11964  * apply to all code found in this distribution, be it the RC4, RSA,
11965  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11966  * included with this distribution is covered by the same copyright terms
11967  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11968  *
11969  * Copyright remains Eric Young's, and as such any Copyright notices in
11970  * the code are not to be removed.
11971  * If this package is used in a product, Eric Young should be given attribution
11972  * as the author of the parts of the library used.
11973  * This can be in the form of a textual message at program startup or
11974  * in documentation (online or textual) provided with the package.
11975  *
11976  * Redistribution and use in source and binary forms, with or without
11977  * modification, are permitted provided that the following conditions
11978  * are met:
11979  * 1. Redistributions of source code must retain the copyright
11980  *    notice, this list of conditions and the following disclaimer.
11981  * 2. Redistributions in binary form must reproduce the above copyright
11982  *    notice, this list of conditions and the following disclaimer in the
11983  *    documentation and/or other materials provided with the distribution.
11984  * 3. All advertising materials mentioning features or use of this software
11985  *    must display the following acknowledgement:
11986  *    "This product includes cryptographic software written by
11987  *     Eric Young (eay@cryptsoft.com)"
11988  *    The word 'cryptographic' can be left out if the rouines from the library
11989  *    being used are not cryptographic related :-).
11990  * 4. If you include any Windows specific code (or a derivative thereof) from
11991  *    the apps directory (application code) you must include an acknowledgement:
11992  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11993  *
11994  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11995  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11996  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11997  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11998  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11999  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12000  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12001  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12002  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12003  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12004  * SUCH DAMAGE.
12005  *
12006  * The licence and distribution terms for any publically available version or
12007  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12008  * copied and put under another distribution licence
12009  * [including the GNU Public Licence.]
12010  */
12011 # 68 "/usr/include/openssl/asn1.h" 2 3 4
12012 # 1 "/usr/include/openssl/safestack.h" 1 3 4
12013 /* ====================================================================
12014  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
12015  *
12016  * Redistribution and use in source and binary forms, with or without
12017  * modification, are permitted provided that the following conditions
12018  * are met:
12019  *
12020  * 1. Redistributions of source code must retain the above copyright
12021  *    notice, this list of conditions and the following disclaimer.
12022  *
12023  * 2. Redistributions in binary form must reproduce the above copyright
12024  *    notice, this list of conditions and the following disclaimer in
12025  *    the documentation and/or other materials provided with the
12026  *    distribution.
12027  *
12028  * 3. All advertising materials mentioning features or use of this
12029  *    software must display the following acknowledgment:
12030  *    "This product includes software developed by the OpenSSL Project
12031  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12032  *
12033  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12034  *    endorse or promote products derived from this software without
12035  *    prior written permission. For written permission, please contact
12036  *    openssl-core@openssl.org.
12037  *
12038  * 5. Products derived from this software may not be called "OpenSSL"
12039  *    nor may "OpenSSL" appear in their names without prior written
12040  *    permission of the OpenSSL Project.
12041  *
12042  * 6. Redistributions of any form whatsoever must retain the following
12043  *    acknowledgment:
12044  *    "This product includes software developed by the OpenSSL Project
12045  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12046  *
12047  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12048  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12049  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12050  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12051  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12052  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12053  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12054  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12055  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12056  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12057  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12058  * OF THE POSSIBILITY OF SUCH DAMAGE.
12059  * ====================================================================
12060  *
12061  * This product includes cryptographic software written by Eric Young
12062  * (eay@cryptsoft.com).  This product includes software written by Tim
12063  * Hudson (tjh@cryptsoft.com).
12064  *
12065  */
12066 # 69 "/usr/include/openssl/asn1.h" 2 3 4
12067 
12068 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
12069 /* ====================================================================
12070  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
12071  *
12072  * Redistribution and use in source and binary forms, with or without
12073  * modification, are permitted provided that the following conditions
12074  * are met:
12075  *
12076  * 1. Redistributions of source code must retain the above copyright
12077  *    notice, this list of conditions and the following disclaimer.
12078  *
12079  * 2. Redistributions in binary form must reproduce the above copyright
12080  *    notice, this list of conditions and the following disclaimer in
12081  *    the documentation and/or other materials provided with the
12082  *    distribution.
12083  *
12084  * 3. All advertising materials mentioning features or use of this
12085  *    software must display the following acknowledgment:
12086  *    "This product includes software developed by the OpenSSL Project
12087  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12088  *
12089  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12090  *    endorse or promote products derived from this software without
12091  *    prior written permission. For written permission, please contact
12092  *    openssl-core@openssl.org.
12093  *
12094  * 5. Products derived from this software may not be called "OpenSSL"
12095  *    nor may "OpenSSL" appear in their names without prior written
12096  *    permission of the OpenSSL Project.
12097  *
12098  * 6. Redistributions of any form whatsoever must retain the following
12099  *    acknowledgment:
12100  *    "This product includes software developed by the OpenSSL Project
12101  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12102  *
12103  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12104  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12105  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12106  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12107  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12108  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12109  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12110  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12111  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12112  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12113  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12114  * OF THE POSSIBILITY OF SUCH DAMAGE.
12115  * ====================================================================
12116  *
12117  * This product includes cryptographic software written by Eric Young
12118  * (eay@cryptsoft.com).  This product includes software written by Tim
12119  * Hudson (tjh@cryptsoft.com).
12120  *
12121  */
12122 # 71 "/usr/include/openssl/asn1.h" 2 3 4
12123 
12124 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
12125 /* ====================================================================
12126  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
12127  *
12128  * Redistribution and use in source and binary forms, with or without
12129  * modification, are permitted provided that the following conditions
12130  * are met:
12131  *
12132  * 1. Redistributions of source code must retain the above copyright
12133  *    notice, this list of conditions and the following disclaimer.
12134  *
12135  * 2. Redistributions in binary form must reproduce the above copyright
12136  *    notice, this list of conditions and the following disclaimer in
12137  *    the documentation and/or other materials provided with the
12138  *    distribution.
12139  *
12140  * 3. All advertising materials mentioning features or use of this
12141  *    software must display the following acknowledgment:
12142  *    "This product includes software developed by the OpenSSL Project
12143  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12144  *
12145  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12146  *    endorse or promote products derived from this software without
12147  *    prior written permission. For written permission, please contact
12148  *    openssl-core@openssl.org.
12149  *
12150  * 5. Products derived from this software may not be called "OpenSSL"
12151  *    nor may "OpenSSL" appear in their names without prior written
12152  *    permission of the OpenSSL Project.
12153  *
12154  * 6. Redistributions of any form whatsoever must retain the following
12155  *    acknowledgment:
12156  *    "This product includes software developed by the OpenSSL Project
12157  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12158  *
12159  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12160  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12161  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12162  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12163  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12164  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12165  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12166  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12167  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12168  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12169  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12170  * OF THE POSSIBILITY OF SUCH DAMAGE.
12171  * ====================================================================
12172  *
12173  * This product includes cryptographic software written by Eric Young
12174  * (eay@cryptsoft.com).  This product includes software written by Tim
12175  * Hudson (tjh@cryptsoft.com).
12176  *
12177  */
12178 # 73 "/usr/include/openssl/asn1.h" 2 3 4
12179 
12180 # 1 "/usr/include/openssl/bn.h" 1 3 4
12181 /* crypto/bn/bn.h */
12182 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
12183  * All rights reserved.
12184  *
12185  * This package is an SSL implementation written
12186  * by Eric Young (eay@cryptsoft.com).
12187  * The implementation was written so as to conform with Netscapes SSL.
12188  *
12189  * This library is free for commercial and non-commercial use as long as
12190  * the following conditions are aheared to.  The following conditions
12191  * apply to all code found in this distribution, be it the RC4, RSA,
12192  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12193  * included with this distribution is covered by the same copyright terms
12194  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12195  *
12196  * Copyright remains Eric Young's, and as such any Copyright notices in
12197  * the code are not to be removed.
12198  * If this package is used in a product, Eric Young should be given attribution
12199  * as the author of the parts of the library used.
12200  * This can be in the form of a textual message at program startup or
12201  * in documentation (online or textual) provided with the package.
12202  *
12203  * Redistribution and use in source and binary forms, with or without
12204  * modification, are permitted provided that the following conditions
12205  * are met:
12206  * 1. Redistributions of source code must retain the copyright
12207  *    notice, this list of conditions and the following disclaimer.
12208  * 2. Redistributions in binary form must reproduce the above copyright
12209  *    notice, this list of conditions and the following disclaimer in the
12210  *    documentation and/or other materials provided with the distribution.
12211  * 3. All advertising materials mentioning features or use of this software
12212  *    must display the following acknowledgement:
12213  *    "This product includes cryptographic software written by
12214  *     Eric Young (eay@cryptsoft.com)"
12215  *    The word 'cryptographic' can be left out if the rouines from the library
12216  *    being used are not cryptographic related :-).
12217  * 4. If you include any Windows specific code (or a derivative thereof) from
12218  *    the apps directory (application code) you must include an acknowledgement:
12219  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12220  *
12221  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12222  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12223  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12224  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12225  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12226  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12227  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12228  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12229  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12230  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12231  * SUCH DAMAGE.
12232  *
12233  * The licence and distribution terms for any publically available version or
12234  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12235  * copied and put under another distribution licence
12236  * [including the GNU Public Licence.]
12237  */
12238 /* ====================================================================
12239  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
12240  *
12241  * Redistribution and use in source and binary forms, with or without
12242  * modification, are permitted provided that the following conditions
12243  * are met:
12244  *
12245  * 1. Redistributions of source code must retain the above copyright
12246  *    notice, this list of conditions and the following disclaimer.
12247  *
12248  * 2. Redistributions in binary form must reproduce the above copyright
12249  *    notice, this list of conditions and the following disclaimer in
12250  *    the documentation and/or other materials provided with the
12251  *    distribution.
12252  *
12253  * 3. All advertising materials mentioning features or use of this
12254  *    software must display the following acknowledgment:
12255  *    "This product includes software developed by the OpenSSL Project
12256  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12257  *
12258  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12259  *    endorse or promote products derived from this software without
12260  *    prior written permission. For written permission, please contact
12261  *    openssl-core@openssl.org.
12262  *
12263  * 5. Products derived from this software may not be called "OpenSSL"
12264  *    nor may "OpenSSL" appear in their names without prior written
12265  *    permission of the OpenSSL Project.
12266  *
12267  * 6. Redistributions of any form whatsoever must retain the following
12268  *    acknowledgment:
12269  *    "This product includes software developed by the OpenSSL Project
12270  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12271  *
12272  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12273  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12274  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12275  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12276  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12277  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12278  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12279  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12280  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12281  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12282  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12283  * OF THE POSSIBILITY OF SUCH DAMAGE.
12284  * ====================================================================
12285  *
12286  * This product includes cryptographic software written by Eric Young
12287  * (eay@cryptsoft.com).  This product includes software written by Tim
12288  * Hudson (tjh@cryptsoft.com).
12289  *
12290  */
12291 /* ====================================================================
12292  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
12293  *
12294  * Portions of the attached software ("Contribution") are developed by
12295  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
12296  *
12297  * The Contribution is licensed pursuant to the Eric Young open source
12298  * license provided above.
12299  *
12300  * The binary polynomial arithmetic software is originally written by
12301  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
12302  *
12303  */
12304 
12305 
12306 
12307 
12308 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
12309 /*
12310  * CDDL HEADER START
12311  *
12312  * The contents of this file are subject to the terms of the
12313  * Common Development and Distribution License (the "License").
12314  * You may not use this file except in compliance with the License.
12315  *
12316  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12317  * or http://www.opensolaris.org/os/licensing.
12318  * See the License for the specific language governing permissions
12319  * and limitations under the License.
12320  *
12321  * When distributing Covered Code, include this CDDL HEADER in each
12322  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12323  * If applicable, add the following below this CDDL HEADER, with the
12324  * fields enclosed by brackets "[]" replaced with your own identifying
12325  * information: Portions Copyright [yyyy] [name of copyright owner]
12326  *
12327  * CDDL HEADER END
12328  */
12329 
12330 /*
12331  * Copyright (c) 2013 Gary Mills
12332  *
12333  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
12334  * Use is subject to license terms.
12335  */
12336 
12337 /*	Copyright (c) 1988 AT&T	*/
12338 /*	  All Rights Reserved  	*/
12339 # 129 "/usr/include/openssl/bn.h" 2 3 4
12340 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
12341 /* e_os2.h */
12342 /* ====================================================================
12343  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
12344  *
12345  * Redistribution and use in source and binary forms, with or without
12346  * modification, are permitted provided that the following conditions
12347  * are met:
12348  *
12349  * 1. Redistributions of source code must retain the above copyright
12350  *    notice, this list of conditions and the following disclaimer.
12351  *
12352  * 2. Redistributions in binary form must reproduce the above copyright
12353  *    notice, this list of conditions and the following disclaimer in
12354  *    the documentation and/or other materials provided with the
12355  *    distribution.
12356  *
12357  * 3. All advertising materials mentioning features or use of this
12358  *    software must display the following acknowledgment:
12359  *    "This product includes software developed by the OpenSSL Project
12360  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12361  *
12362  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12363  *    endorse or promote products derived from this software without
12364  *    prior written permission. For written permission, please contact
12365  *    openssl-core@openssl.org.
12366  *
12367  * 5. Products derived from this software may not be called "OpenSSL"
12368  *    nor may "OpenSSL" appear in their names without prior written
12369  *    permission of the OpenSSL Project.
12370  *
12371  * 6. Redistributions of any form whatsoever must retain the following
12372  *    acknowledgment:
12373  *    "This product includes software developed by the OpenSSL Project
12374  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12375  *
12376  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12377  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12378  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12379  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12380  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12381  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12382  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12383  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12384  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12385  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12386  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12387  * OF THE POSSIBILITY OF SUCH DAMAGE.
12388  * ====================================================================
12389  *
12390  * This product includes cryptographic software written by Eric Young
12391  * (eay@cryptsoft.com).  This product includes software written by Tim
12392  * Hudson (tjh@cryptsoft.com).
12393  *
12394  */
12395 
12396 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
12397 /* opensslconf.h */
12398 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
12399 
12400 
12401 
12402 
12403 /* OpenSSL was configured with the following options: */
12404 # 108 "/usr/include/openssl/opensslconf.h" 3 4
12405 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
12406    asks for it.  This is a transient feature that is provided for those
12407    who haven't had the time to do the appropriate changes in their
12408    applications.  */
12409 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12410 /* crypto/opensslconf.h.in */
12411 
12412 /* Generate 80386 code? */
12413 # 272 "/usr/include/openssl/opensslconf.h" 3 4
12414 /*
12415  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
12416  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
12417  */
12418 
12419 
12420 
12421 
12422 
12423 
12424 /* Should we define BN_DIV2W here? */
12425 
12426 /* Only one for the following should be defined */
12427 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
12428 # 130 "/usr/include/openssl/bn.h" 2 3 4
12429 
12430 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
12431 /*
12432  * CDDL HEADER START
12433  *
12434  * The contents of this file are subject to the terms of the
12435  * Common Development and Distribution License (the "License").
12436  * You may not use this file except in compliance with the License.
12437  *
12438  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12439  * or http://www.opensolaris.org/os/licensing.
12440  * See the License for the specific language governing permissions
12441  * and limitations under the License.
12442  *
12443  * When distributing Covered Code, include this CDDL HEADER in each
12444  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12445  * If applicable, add the following below this CDDL HEADER, with the
12446  * fields enclosed by brackets "[]" replaced with your own identifying
12447  * information: Portions Copyright [yyyy] [name of copyright owner]
12448  *
12449  * CDDL HEADER END
12450  */
12451 
12452 /*
12453  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
12454  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
12455  */
12456 
12457 /*	Copyright (c) 1988 AT&T	*/
12458 /*	  All Rights Reserved  	*/
12459 
12460 /*
12461  * User-visible pieces of the ANSI C standard I/O package.
12462  */
12463 # 132 "/usr/include/openssl/bn.h" 2 3 4
12464 
12465 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
12466 /* ====================================================================
12467  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
12468  *
12469  * Redistribution and use in source and binary forms, with or without
12470  * modification, are permitted provided that the following conditions
12471  * are met:
12472  *
12473  * 1. Redistributions of source code must retain the above copyright
12474  *    notice, this list of conditions and the following disclaimer.
12475  *
12476  * 2. Redistributions in binary form must reproduce the above copyright
12477  *    notice, this list of conditions and the following disclaimer in
12478  *    the documentation and/or other materials provided with the
12479  *    distribution.
12480  *
12481  * 3. All advertising materials mentioning features or use of this
12482  *    software must display the following acknowledgment:
12483  *    "This product includes software developed by the OpenSSL Project
12484  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12485  *
12486  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12487  *    endorse or promote products derived from this software without
12488  *    prior written permission. For written permission, please contact
12489  *    openssl-core@openssl.org.
12490  *
12491  * 5. Products derived from this software may not be called "OpenSSL"
12492  *    nor may "OpenSSL" appear in their names without prior written
12493  *    permission of the OpenSSL Project.
12494  *
12495  * 6. Redistributions of any form whatsoever must retain the following
12496  *    acknowledgment:
12497  *    "This product includes software developed by the OpenSSL Project
12498  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12499  *
12500  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12501  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12502  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12503  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12504  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12505  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12506  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12507  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12508  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12509  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12510  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12511  * OF THE POSSIBILITY OF SUCH DAMAGE.
12512  * ====================================================================
12513  *
12514  * This product includes cryptographic software written by Eric Young
12515  * (eay@cryptsoft.com).  This product includes software written by Tim
12516  * Hudson (tjh@cryptsoft.com).
12517  *
12518  */
12519 # 134 "/usr/include/openssl/bn.h" 2 3 4
12520 # 1 "/usr/include/openssl/crypto.h" 1 3 4
12521 /* crypto/crypto.h */
12522 /* ====================================================================
12523  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
12524  *
12525  * Redistribution and use in source and binary forms, with or without
12526  * modification, are permitted provided that the following conditions
12527  * are met:
12528  *
12529  * 1. Redistributions of source code must retain the above copyright
12530  *    notice, this list of conditions and the following disclaimer.
12531  *
12532  * 2. Redistributions in binary form must reproduce the above copyright
12533  *    notice, this list of conditions and the following disclaimer in
12534  *    the documentation and/or other materials provided with the
12535  *    distribution.
12536  *
12537  * 3. All advertising materials mentioning features or use of this
12538  *    software must display the following acknowledgment:
12539  *    "This product includes software developed by the OpenSSL Project
12540  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12541  *
12542  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12543  *    endorse or promote products derived from this software without
12544  *    prior written permission. For written permission, please contact
12545  *    openssl-core@openssl.org.
12546  *
12547  * 5. Products derived from this software may not be called "OpenSSL"
12548  *    nor may "OpenSSL" appear in their names without prior written
12549  *    permission of the OpenSSL Project.
12550  *
12551  * 6. Redistributions of any form whatsoever must retain the following
12552  *    acknowledgment:
12553  *    "This product includes software developed by the OpenSSL Project
12554  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12555  *
12556  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12557  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12558  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12559  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12560  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12561  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12562  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12563  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12564  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12565  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12566  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12567  * OF THE POSSIBILITY OF SUCH DAMAGE.
12568  * ====================================================================
12569  *
12570  * This product includes cryptographic software written by Eric Young
12571  * (eay@cryptsoft.com).  This product includes software written by Tim
12572  * Hudson (tjh@cryptsoft.com).
12573  *
12574  */
12575 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
12576  * All rights reserved.
12577  *
12578  * This package is an SSL implementation written
12579  * by Eric Young (eay@cryptsoft.com).
12580  * The implementation was written so as to conform with Netscapes SSL.
12581  *
12582  * This library is free for commercial and non-commercial use as long as
12583  * the following conditions are aheared to.  The following conditions
12584  * apply to all code found in this distribution, be it the RC4, RSA,
12585  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12586  * included with this distribution is covered by the same copyright terms
12587  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12588  *
12589  * Copyright remains Eric Young's, and as such any Copyright notices in
12590  * the code are not to be removed.
12591  * If this package is used in a product, Eric Young should be given attribution
12592  * as the author of the parts of the library used.
12593  * This can be in the form of a textual message at program startup or
12594  * in documentation (online or textual) provided with the package.
12595  *
12596  * Redistribution and use in source and binary forms, with or without
12597  * modification, are permitted provided that the following conditions
12598  * are met:
12599  * 1. Redistributions of source code must retain the copyright
12600  *    notice, this list of conditions and the following disclaimer.
12601  * 2. Redistributions in binary form must reproduce the above copyright
12602  *    notice, this list of conditions and the following disclaimer in the
12603  *    documentation and/or other materials provided with the distribution.
12604  * 3. All advertising materials mentioning features or use of this software
12605  *    must display the following acknowledgement:
12606  *    "This product includes cryptographic software written by
12607  *     Eric Young (eay@cryptsoft.com)"
12608  *    The word 'cryptographic' can be left out if the rouines from the library
12609  *    being used are not cryptographic related :-).
12610  * 4. If you include any Windows specific code (or a derivative thereof) from
12611  *    the apps directory (application code) you must include an acknowledgement:
12612  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12613  *
12614  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12615  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12616  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12617  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12618  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12619  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12620  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12621  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12622  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12623  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12624  * SUCH DAMAGE.
12625  *
12626  * The licence and distribution terms for any publically available version or
12627  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12628  * copied and put under another distribution licence
12629  * [including the GNU Public Licence.]
12630  */
12631 /* ====================================================================
12632  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
12633  * ECDH support in OpenSSL originally developed by
12634  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
12635  */
12636 # 135 "/usr/include/openssl/bn.h" 2 3 4
12637 
12638 
12639 
12640 
12641 
12642 /*
12643  * These preprocessor symbols control various aspects of the bignum headers
12644  * and library code. They're not defined by any "normal" configuration, as
12645  * they are intended for development and testing purposes. NB: defining all
12646  * three can be useful for debugging application code as well as openssl
12647  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
12648  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
12649  * mismanagement of bignum internals. You must also define BN_DEBUG.
12650  */
12651 /* #define BN_DEBUG */
12652 /* #define BN_DEBUG_RAND */
12653 
12654 
12655 
12656 
12657 
12658 
12659 
12660 /*
12661  * This next option uses the C libraries (2 word)/(1 word) function. If it is
12662  * not defined, I use my C version (which is slower). The reason for this
12663  * flag is that when the particular C compiler library routine is used, and
12664  * the library is linked with a different compiler, the library is missing.
12665  * This mostly happens when the library is built with gcc and then linked
12666  * using normal cc.  This would be a common occurrence because gcc normally
12667  * produces code that is 2 times faster than system compilers for the big
12668  * number stuff. For machines with only one compiler (or shared libraries),
12669  * this should be on.  Again this in only really a problem on machines using
12670  * "long long's", are 32bit, and are not using my assembler code.
12671  */
12672 
12673 
12674 
12675 
12676 
12677 
12678 
12679 /*
12680  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
12681  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
12682  */
12683 # 203 "/usr/include/openssl/bn.h" 3 4
12684 /*
12685  * This is where the long long data type is 64 bits, but long is 32. For
12686  * machines where there are 64bit registers, this is the mode to use. IRIX,
12687  * on R4000 and above should use this mode, along with the relevant assembler
12688  * code :-).  Do NOT define BN_LLONG.
12689  */
12690 # 265 "/usr/include/openssl/bn.h" 3 4
12691 /*
12692  * avoid leaking exponent information through timing,
12693  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
12694  * BN_div() will call BN_div_no_branch,
12695  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
12696  */
12697 # 284 "/usr/include/openssl/bn.h" 3 4
12698                                        /* used for debuging */
12699 
12700 
12701 
12702 
12703 /*
12704  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
12705  * two BIGNUMs cannot not be used in parallel!)
12706  */
12707 # 302 "/usr/include/openssl/bn.h" 3 4
12708 /* Already declared in ossl_typ.h */
12709 # 313 "/usr/include/openssl/bn.h" 3 4
12710 struct bignum_st {
12711     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
12712                                  * chunks. */
12713     int top; /* Index of last used d +1. */
12714     /* The next are internal book keeping for bn_expand. */
12715     int dmax; /* Size of the d array. */
12716     int neg; /* one if the number is negative */
12717     int flags;
12718 };
12719 
12720 /* Used for montgomery multiplication */
12721 struct bn_mont_ctx_st {
12722     int ri; /* number of bits in R */
12723     BIGNUM RR; /* used to convert to montgomery form */
12724     BIGNUM N; /* The modulus */
12725     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
12726                                  * stored for bignum algorithm) */
12727     unsigned int n0[2]; /* least significant word(s) of Ni; (type
12728                                  * changed with 0.9.9, was "BN_ULONG n0;"
12729                                  * before) */
12730     int flags;
12731 };
12732 
12733 /*
12734  * Used for reciprocal division/mod functions It cannot be shared between
12735  * threads
12736  */
12737 struct bn_recp_ctx_st {
12738     BIGNUM N; /* the divisor */
12739     BIGNUM Nr; /* the reciprocal */
12740     int num_bits;
12741     int shift;
12742     int flags;
12743 };
12744 
12745 /* Used for slow "generation" functions. */
12746 struct bn_gencb_st {
12747     unsigned int ver; /* To handle binary (in)compatibility */
12748     void *arg; /* callback-specific data */
12749     union {
12750         /* if(ver==1) - handles old style callbacks */
12751         void (*cb_1) (int, int, void *);
12752         /* if(ver==2) - new callback style */
12753         int (*cb_2) (int, int, BN_GENCB *);
12754     } cb;
12755 };
12756 /* Wrapper function to make using BN_GENCB easier,  */
12757 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
12758 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
12759 
12760 
12761 
12762 
12763 
12764 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
12765 # 377 "/usr/include/openssl/bn.h" 3 4
12766 /*
12767  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
12768  * that will be done for checking that a random number is probably prime. The
12769  * error rate for accepting a composite number as prime depends on the size of
12770  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
12771  * and so the level is what you would expect for a key of double the size of the
12772  * prime.
12773  *
12774  * This table is generated using the algorithm of FIPS PUB 186-4
12775  * Digital Signature Standard (DSS), section F.1, page 117.
12776  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
12777  *
12778  * The following magma script was used to generate the output:
12779  * securitybits:=125;
12780  * k:=1024;
12781  * for t:=1 to 65 do
12782  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
12783  *     S:=0;
12784  *     // Sum over m
12785  *     for m:=3 to M do
12786  *       s:=0;
12787  *       // Sum over j
12788  *       for j:=2 to m do
12789  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
12790  *       end for;
12791  *       S+:=2^(m-(m-1)*t)*s;
12792  *     end for;
12793  *     A:=2^(k-2-M*t);
12794  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
12795  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
12796  *     seclevel:=Floor(-Log(2,pkt));
12797  *     if seclevel ge securitybits then
12798  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
12799  *       break;
12800  *     end if;
12801  *   end for;
12802  *   if seclevel ge securitybits then break; end if;
12803  * end for;
12804  *
12805  * It can be run online at:
12806  * http://magma.maths.usyd.edu.au/calc
12807  *
12808  * And will output:
12809  * k:  1024, security: 129 bits  (t: 6, M: 23)
12810  *
12811  * k is the number of bits of the prime, securitybits is the level we want to
12812  * reach.
12813  *
12814  * prime length | RSA key size | # MR tests | security level
12815  * -------------+--------------|------------+---------------
12816  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
12817  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
12818  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
12819  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
12820  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
12821  *  (b) >=  476 |     >=   952 |          5 |         80 bit
12822  *  (b) >=  400 |     >=   800 |          6 |         80 bit
12823  *  (b) >=  347 |     >=   694 |          7 |         80 bit
12824  *  (b) >=  308 |     >=   616 |          8 |         80 bit
12825  *  (b) >=   55 |     >=   110 |         27 |         64 bit
12826  *  (b) >=    6 |     >=    12 |         34 |         64 bit
12827  */
12828 # 451 "/usr/include/openssl/bn.h" 3 4
12829 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
12830 # 472 "/usr/include/openssl/bn.h" 3 4
12831 const BIGNUM *BN_value_one(void);
12832 char *BN_options(void);
12833 BN_CTX *BN_CTX_new(void);
12834 
12835 void BN_CTX_init(BN_CTX *c);
12836 
12837 void BN_CTX_free(BN_CTX *c);
12838 void BN_CTX_start(BN_CTX *ctx);
12839 BIGNUM *BN_CTX_get(BN_CTX *ctx);
12840 void BN_CTX_end(BN_CTX *ctx);
12841 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
12842 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
12843 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
12844 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
12845 int BN_num_bits(const BIGNUM *a);
12846 int BN_num_bits_word(unsigned int);
12847 BIGNUM *BN_new(void);
12848 void BN_init(BIGNUM *);
12849 void BN_clear_free(BIGNUM *a);
12850 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
12851 void BN_swap(BIGNUM *a, BIGNUM *b);
12852 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
12853 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
12854 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
12855 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
12856 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12857 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12858 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12859 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12860 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
12861 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
12862 /** BN_set_negative sets sign of a BIGNUM
12863  * \param  b  pointer to the BIGNUM object
12864  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
12865  */
12866 void BN_set_negative(BIGNUM *b, int n);
12867 /** BN_is_negative returns 1 if the BIGNUM is negative
12868  * \param  a  pointer to the BIGNUM object
12869  * \return 1 if a < 0 and 0 otherwise
12870  */
12871 
12872 
12873 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
12874            BN_CTX *ctx);
12875 
12876 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
12877 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12878                BN_CTX *ctx);
12879 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12880                      const BIGNUM *m);
12881 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12882                BN_CTX *ctx);
12883 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12884                      const BIGNUM *m);
12885 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12886                BN_CTX *ctx);
12887 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
12888 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
12889 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
12890 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
12891                   BN_CTX *ctx);
12892 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
12893 
12894 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
12895 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
12896 int BN_mul_word(BIGNUM *a, unsigned int w);
12897 int BN_add_word(BIGNUM *a, unsigned int w);
12898 int BN_sub_word(BIGNUM *a, unsigned int w);
12899 int BN_set_word(BIGNUM *a, unsigned int w);
12900 unsigned int BN_get_word(const BIGNUM *a);
12901 
12902 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
12903 void BN_free(BIGNUM *a);
12904 int BN_is_bit_set(const BIGNUM *a, int n);
12905 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
12906 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
12907 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12908 
12909 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12910                const BIGNUM *m, BN_CTX *ctx);
12911 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12912                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12913 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
12914                               const BIGNUM *m, BN_CTX *ctx,
12915                               BN_MONT_CTX *in_mont);
12916 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
12917                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12918 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
12919                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
12920                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12921 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12922                       const BIGNUM *m, BN_CTX *ctx);
12923 
12924 int BN_mask_bits(BIGNUM *a, int n);
12925 
12926 int BN_print_fp(FILE *fp, const BIGNUM *a);
12927 
12928 
12929 int BN_print(BIO *fp, const BIGNUM *a);
12930 
12931 
12932 
12933 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
12934 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
12935 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
12936 void BN_clear(BIGNUM *a);
12937 BIGNUM *BN_dup(const BIGNUM *a);
12938 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
12939 int BN_set_bit(BIGNUM *a, int n);
12940 int BN_clear_bit(BIGNUM *a, int n);
12941 char *BN_bn2hex(const BIGNUM *a);
12942 char *BN_bn2dec(const BIGNUM *a);
12943 int BN_hex2bn(BIGNUM **a, const char *str);
12944 int BN_dec2bn(BIGNUM **a, const char *str);
12945 int BN_asc2bn(BIGNUM **a, const char *str);
12946 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
12947 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
12948                                                                   * -2 for
12949                                                                   * error */
12950 BIGNUM *BN_mod_inverse(BIGNUM *ret,
12951                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
12952 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
12953                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
12954 
12955 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
12956 
12957 /* Deprecated versions */
12958 
12959 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
12960                           const BIGNUM *add, const BIGNUM *rem,
12961                           void (*callback) (int, int, void *), void *cb_arg);
12962 int BN_is_prime(const BIGNUM *p, int nchecks,
12963                 void (*callback) (int, int, void *),
12964                 BN_CTX *ctx, void *cb_arg);
12965 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
12966                          void (*callback) (int, int, void *), BN_CTX *ctx,
12967                          void *cb_arg, int do_trial_division);
12968 
12969 
12970 /* Newer versions */
12971 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
12972                          const BIGNUM *rem, BN_GENCB *cb);
12973 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
12974 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
12975                             int do_trial_division, BN_GENCB *cb);
12976 
12977 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
12978 
12979 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
12980                             const BIGNUM *Xp, const BIGNUM *Xp1,
12981                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
12982                             BN_GENCB *cb);
12983 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
12984                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
12985                               BN_CTX *ctx, BN_GENCB *cb);
12986 
12987 BN_MONT_CTX *BN_MONT_CTX_new(void);
12988 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
12989 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12990                           BN_MONT_CTX *mont, BN_CTX *ctx);
12991 
12992 
12993 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
12994                        BN_MONT_CTX *mont, BN_CTX *ctx);
12995 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
12996 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
12997 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
12998 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
12999                                     const BIGNUM *mod, BN_CTX *ctx);
13000 
13001 /* BN_BLINDING flags */
13002 
13003 
13004 
13005 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
13006 void BN_BLINDING_free(BN_BLINDING *b);
13007 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
13008 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
13009 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
13010 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
13011 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
13012                           BN_CTX *);
13013 
13014 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
13015 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
13016 
13017 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
13018 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
13019 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
13020 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
13021                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
13022                                       int (*bn_mod_exp) (BIGNUM *r,
13023                                                          const BIGNUM *a,
13024                                                          const BIGNUM *p,
13025                                                          const BIGNUM *m,
13026                                                          BN_CTX *ctx,
13027                                                          BN_MONT_CTX *m_ctx),
13028                                       BN_MONT_CTX *m_ctx);
13029 
13030 
13031 void BN_set_params(int mul, int high, int low, int mont);
13032 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
13033 
13034 
13035 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
13036 BN_RECP_CTX *BN_RECP_CTX_new(void);
13037 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
13038 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
13039 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
13040                           BN_RECP_CTX *recp, BN_CTX *ctx);
13041 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
13042                     const BIGNUM *m, BN_CTX *ctx);
13043 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
13044                 BN_RECP_CTX *recp, BN_CTX *ctx);
13045 
13046 
13047 
13048 /*
13049  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
13050  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
13051  * ignored. Note that input arguments are not const so that their bit arrays
13052  * can be expanded to the appropriate size if needed.
13053  */
13054 
13055 /*
13056  * r = a + b
13057  */
13058 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
13059 
13060 /*
13061  * r=a mod p
13062  */
13063 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
13064 /* r = (a * b) mod p */
13065 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
13066                     const BIGNUM *p, BN_CTX *ctx);
13067 /* r = (a * a) mod p */
13068 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
13069 /* r = (1 / b) mod p */
13070 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
13071 /* r = (a / b) mod p */
13072 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
13073                     const BIGNUM *p, BN_CTX *ctx);
13074 /* r = (a ^ b) mod p */
13075 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
13076                     const BIGNUM *p, BN_CTX *ctx);
13077 /* r = sqrt(a) mod p */
13078 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
13079                      BN_CTX *ctx);
13080 /* r^2 + r = a mod p */
13081 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
13082                            BN_CTX *ctx);
13083 
13084 /*-
13085  * Some functions allow for representation of the irreducible polynomials
13086  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
13087  *     t^p[0] + t^p[1] + ... + t^p[k]
13088  * where m = p[0] > p[1] > ... > p[k] = 0.
13089  */
13090 /* r = a mod p */
13091 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
13092 /* r = (a * b) mod p */
13093 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
13094                         const int p[], BN_CTX *ctx);
13095 /* r = (a * a) mod p */
13096 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
13097                         BN_CTX *ctx);
13098 /* r = (1 / b) mod p */
13099 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
13100                         BN_CTX *ctx);
13101 /* r = (a / b) mod p */
13102 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
13103                         const int p[], BN_CTX *ctx);
13104 /* r = (a ^ b) mod p */
13105 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
13106                         const int p[], BN_CTX *ctx);
13107 /* r = sqrt(a) mod p */
13108 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
13109                          const int p[], BN_CTX *ctx);
13110 /* r^2 + r = a mod p */
13111 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
13112                                const int p[], BN_CTX *ctx);
13113 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
13114 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
13115 
13116 
13117 
13118 /*
13119  * faster mod functions for the 'NIST primes' 0 <= a < p^2
13120  */
13121 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
13122 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
13123 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
13124 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
13125 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
13126 
13127 const BIGNUM *BN_get0_nist_prime_192(void);
13128 const BIGNUM *BN_get0_nist_prime_224(void);
13129 const BIGNUM *BN_get0_nist_prime_256(void);
13130 const BIGNUM *BN_get0_nist_prime_384(void);
13131 const BIGNUM *BN_get0_nist_prime_521(void);
13132 
13133 /* library internal functions */
13134 # 788 "/usr/include/openssl/bn.h" 3 4
13135 BIGNUM *bn_expand2(BIGNUM *a, int words);
13136 
13137 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
13138 
13139 
13140 /*-
13141  * Bignum consistency macros
13142  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
13143  * bignum data after direct manipulations on the data. There is also an
13144  * "internal" macro, bn_check_top(), for verifying that there are no leading
13145  * zeroes. Unfortunately, some auditing is required due to the fact that
13146  * bn_fix_top() has become an overabused duct-tape because bignum data is
13147  * occasionally passed around in an inconsistent state. So the following
13148  * changes have been made to sort this out;
13149  * - bn_fix_top()s implementation has been moved to bn_correct_top()
13150  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
13151  *   bn_check_top() is as before.
13152  * - if BN_DEBUG *is* defined;
13153  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
13154  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
13155  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
13156  * The idea is to have debug builds flag up inconsistent bignums when they
13157  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
13158  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
13159  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
13160  * was not appropriate, we convert it permanently to bn_check_top() and track
13161  * down the cause of the bug. Eventually, no internal code should be using the
13162  * bn_fix_top() macro. External applications and libraries should try this with
13163  * their own code too, both in terms of building against the openssl headers
13164  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
13165  * defined. This not only improves external code, it provides more test
13166  * coverage for openssl's own code.
13167  */
13168 # 914 "/usr/include/openssl/bn.h" 3 4
13169 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
13170                           unsigned int w);
13171 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
13172 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
13173 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
13174 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
13175                       int num);
13176 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
13177                       int num);
13178 
13179 /* Primes from RFC 2409 */
13180 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
13181 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
13182 
13183 /* Primes from RFC 3526 */
13184 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
13185 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
13186 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
13187 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
13188 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
13189 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
13190 
13191 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
13192 
13193 /* BEGIN ERROR CODES */
13194 /*
13195  * The following lines are auto generated by the script mkerr.pl. Any changes
13196  * made after this point may be overwritten when the script is next run.
13197  */
13198 void ERR_load_BN_strings(void);
13199 
13200 /* Error codes for the BN functions. */
13201 
13202 /* Function codes. */
13203 # 991 "/usr/include/openssl/bn.h" 3 4
13204 /* Reason codes. */
13205 # 75 "/usr/include/openssl/asn1.h" 2 3 4
13206 # 132 "/usr/include/openssl/asn1.h" 3 4
13207 /* For use with d2i_ASN1_type_bytes() */
13208 # 152 "/usr/include/openssl/asn1.h" 3 4
13209 /* For use with ASN1_mbstring_copy() */
13210 # 161 "/usr/include/openssl/asn1.h" 3 4
13211     struct X509_algor_st;
13212 struct stack_st_X509_ALGOR { _STACK stack; };
13213 
13214 
13215 
13216 
13217 /*
13218  * We MUST make sure that, except for constness, asn1_ctx_st and
13219  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
13220  * parsing macros are gone, we can throw this away as well...
13221  */
13222 typedef struct asn1_ctx_st {
13223     unsigned char *p; /* work char pointer */
13224     int eos; /* end of sequence read for indefinite
13225                                  * encoding */
13226     int error; /* error code to use when returning an error */
13227     int inf; /* constructed if 0x20, indefinite is 0x21 */
13228     int tag; /* tag from last 'get object' */
13229     int xclass; /* class from last 'get object' */
13230     long slen; /* length of last 'get object' */
13231     unsigned char *max; /* largest value of p allowed */
13232     unsigned char *q; /* temporary variable */
13233     unsigned char **pp; /* variable */
13234     int line; /* used in error processing */
13235 } ASN1_CTX;
13236 
13237 typedef struct asn1_const_ctx_st {
13238     const unsigned char *p; /* work char pointer */
13239     int eos; /* end of sequence read for indefinite
13240                                  * encoding */
13241     int error; /* error code to use when returning an error */
13242     int inf; /* constructed if 0x20, indefinite is 0x21 */
13243     int tag; /* tag from last 'get object' */
13244     int xclass; /* class from last 'get object' */
13245     long slen; /* length of last 'get object' */
13246     const unsigned char *max; /* largest value of p allowed */
13247     const unsigned char *q; /* temporary variable */
13248     const unsigned char **pp; /* variable */
13249     int line; /* used in error processing */
13250 } ASN1_const_CTX;
13251 
13252 /*
13253  * These are used internally in the ASN1_OBJECT to keep track of whether the
13254  * names and data need to be free()ed
13255  */
13256 
13257 
13258 
13259 
13260 struct asn1_object_st {
13261     const char *sn, *ln;
13262     int nid;
13263     int length;
13264     const unsigned char *data; /* data remains const after init */
13265     int flags; /* Should we free this one */
13266 };
13267 
13268 
13269 /*
13270  * This indicates that the ASN1_STRING is not a real value but just a place
13271  * holder for the location where indefinite length constructed data should be
13272  * inserted in the memory buffer
13273  */
13274 
13275 
13276 /*
13277  * This flag is used by the CMS code to indicate that a string is not
13278  * complete and is a place holder for content when it had all been accessed.
13279  * The flag will be reset when content has been written to it.
13280  */
13281 
13282 
13283 /*
13284  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
13285  * type.
13286  */
13287 
13288 /* This is the base type that holds just about everything :-) */
13289 struct asn1_string_st {
13290     int length;
13291     int type;
13292     unsigned char *data;
13293     /*
13294      * The value of the following field depends on the type being held.  It
13295      * is mostly being used for BIT_STRING so if the input data has a
13296      * non-zero 'unused bits' value, it will be handled correctly
13297      */
13298     long flags;
13299 };
13300 
13301 /*
13302  * ASN1_ENCODING structure: this is used to save the received encoding of an
13303  * ASN1 type. This is useful to get round problems with invalid encodings
13304  * which can break signatures.
13305  */
13306 
13307 typedef struct ASN1_ENCODING_st {
13308     unsigned char *enc; /* DER encoding */
13309     long len; /* Length of encoding */
13310     int modified; /* set to 1 if 'enc' is invalid */
13311 } ASN1_ENCODING;
13312 
13313 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
13314 # 272 "/usr/include/openssl/asn1.h" 3 4
13315 typedef struct asn1_string_table_st {
13316     int nid;
13317     long minsize;
13318     long maxsize;
13319     unsigned long mask;
13320     unsigned long flags;
13321 } ASN1_STRING_TABLE;
13322 
13323 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
13324 
13325 /* size limits: this stuff is taken straight from RFC2459 */
13326 # 293 "/usr/include/openssl/asn1.h" 3 4
13327 /*
13328  * Declarations for template structures: for full definitions see asn1t.h
13329  */
13330 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
13331 typedef struct ASN1_TLC_st ASN1_TLC;
13332 /* This is just an opaque pointer */
13333 typedef struct ASN1_VALUE_st ASN1_VALUE;
13334 
13335 /* Declare ASN1 functions: the implement macro in in asn1t.h */
13336 # 363 "/usr/include/openssl/asn1.h" 3 4
13337 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
13338 
13339 /*-
13340  * The following macros and typedefs allow an ASN1_ITEM
13341  * to be embedded in a structure and referenced. Since
13342  * the ASN1_ITEM pointers need to be globally accessible
13343  * (possibly from shared libraries) they may exist in
13344  * different forms. On platforms that support it the
13345  * ASN1_ITEM structure itself will be globally exported.
13346  * Other platforms will export a function that returns
13347  * an ASN1_ITEM pointer.
13348  *
13349  * To handle both cases transparently the macros below
13350  * should be used instead of hard coding an ASN1_ITEM
13351  * pointer in a structure.
13352  *
13353  * The structure will look like this:
13354  *
13355  * typedef struct SOMETHING_st {
13356  *      ...
13357  *      ASN1_ITEM_EXP *iptr;
13358  *      ...
13359  * } SOMETHING;
13360  *
13361  * It would be initialised as e.g.:
13362  *
13363  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
13364  *
13365  * and the actual pointer extracted with:
13366  *
13367  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
13368  *
13369  * Finally an ASN1_ITEM pointer can be extracted from an
13370  * appropriate reference with: ASN1_ITEM_rptr(X509). This
13371  * would be used when a function takes an ASN1_ITEM * argument.
13372  *
13373  */
13374 
13375 
13376 
13377 /* ASN1_ITEM pointer exported type */
13378 typedef const ASN1_ITEM ASN1_ITEM_EXP;
13379 
13380 /* Macro to obtain ASN1_ITEM pointer from exported type */
13381 
13382 
13383 /* Macro to include ASN1_ITEM pointer from base type */
13384 # 440 "/usr/include/openssl/asn1.h" 3 4
13385 /* Parameters used by ASN1_STRING_print_ex() */
13386 
13387 /*
13388  * These determine which characters to escape: RFC2253 special characters,
13389  * control characters and MSB set characters
13390  */
13391 
13392 
13393 
13394 
13395 
13396 /*
13397  * This flag determines how we do escaping: normally RC2253 backslash only,
13398  * set this to use backslash and quote.
13399  */
13400 
13401 
13402 
13403 /* These three flags are internal use only. */
13404 
13405 /* Character is a valid PrintableString character */
13406 
13407 /* Character needs escaping if it is the first character */
13408 
13409 /* Character needs escaping if it is the last character */
13410 
13411 
13412 /*
13413  * NB the internal flags are safely reused below by flags handled at the top
13414  * level.
13415  */
13416 
13417 /*
13418  * If this is set we convert all character strings to UTF8 first
13419  */
13420 
13421 
13422 
13423 /*
13424  * If this is set we don't attempt to interpret content: just assume all
13425  * strings are 1 byte per character. This will produce some pretty odd
13426  * looking output!
13427  */
13428 
13429 
13430 
13431 /* If this is set we include the string type in the output */
13432 
13433 
13434 /*
13435  * This determines which strings to display and which to 'dump' (hex dump of
13436  * content octets or DER encoding). We can only dump non character strings or
13437  * everything. If we don't dump 'unknown' they are interpreted as character
13438  * strings with 1 octet per character and are subject to the usual escaping
13439  * options.
13440  */
13441 
13442 
13443 
13444 
13445 /*
13446  * These determine what 'dumping' does, we can dump the content octets or the
13447  * DER encoding: both use the RFC2253 #XXXXX notation.
13448  */
13449 
13450 
13451 
13452 /*
13453  * All the string flags consistent with RFC2253, escaping control characters
13454  * isn't essential in RFC2253 but it is advisable anyway.
13455  */
13456 # 519 "/usr/include/openssl/asn1.h" 3 4
13457 struct stack_st_ASN1_INTEGER { _STACK stack; };
13458 
13459 
13460 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
13461 
13462 typedef struct asn1_type_st {
13463     int type;
13464     union {
13465         char *ptr;
13466         ASN1_BOOLEAN boolean;
13467         ASN1_STRING *asn1_string;
13468         ASN1_OBJECT *object;
13469         ASN1_INTEGER *integer;
13470         ASN1_ENUMERATED *enumerated;
13471         ASN1_BIT_STRING *bit_string;
13472         ASN1_OCTET_STRING *octet_string;
13473         ASN1_PRINTABLESTRING *printablestring;
13474         ASN1_T61STRING *t61string;
13475         ASN1_IA5STRING *ia5string;
13476         ASN1_GENERALSTRING *generalstring;
13477         ASN1_BMPSTRING *bmpstring;
13478         ASN1_UNIVERSALSTRING *universalstring;
13479         ASN1_UTCTIME *utctime;
13480         ASN1_GENERALIZEDTIME *generalizedtime;
13481         ASN1_VISIBLESTRING *visiblestring;
13482         ASN1_UTF8STRING *utf8string;
13483         /*
13484          * set and sequence are left complete and still contain the set or
13485          * sequence bytes
13486          */
13487         ASN1_STRING *set;
13488         ASN1_STRING *sequence;
13489         ASN1_VALUE *asn1_value;
13490     } value;
13491 } ASN1_TYPE;
13492 
13493 struct stack_st_ASN1_TYPE { _STACK stack; };
13494 
13495 
13496 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
13497 
13498 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;
13499 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;
13500 
13501 typedef struct NETSCAPE_X509_st {
13502     ASN1_OCTET_STRING *header;
13503     X509 *cert;
13504 } NETSCAPE_X509;
13505 
13506 /* This is used to contain a list of bit names */
13507 typedef struct BIT_STRING_BITNAME_st {
13508     int bitnum;
13509     const char *lname;
13510     const char *sname;
13511 } BIT_STRING_BITNAME;
13512 
13513 
13514 
13515 
13516 
13517 
13518 /* Macros for string operations */
13519 # 772 "/usr/include/openssl/asn1.h" 3 4
13520   /* for the is_set parameter to i2d_ASN1_SET */
13521 
13522 
13523 
13524 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;
13525 
13526 int ASN1_TYPE_get(ASN1_TYPE *a);
13527 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
13528 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
13529 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
13530 
13531 ASN1_OBJECT *ASN1_OBJECT_new(void);
13532 void ASN1_OBJECT_free(ASN1_OBJECT *a);
13533 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
13534 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
13535                              long length);
13536 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
13537                              long length);
13538 
13539 extern const ASN1_ITEM ASN1_OBJECT_it;
13540 
13541 struct stack_st_ASN1_OBJECT { _STACK stack; };
13542 
13543 
13544 ASN1_STRING *ASN1_STRING_new(void);
13545 void ASN1_STRING_free(ASN1_STRING *a);
13546 void ASN1_STRING_clear_free(ASN1_STRING *a);
13547 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
13548 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
13549 ASN1_STRING *ASN1_STRING_type_new(int type);
13550 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
13551   /*
13552    * Since this is used to store all sorts of things, via macros, for now,
13553    * make its data void *
13554    */
13555 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
13556 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
13557 int ASN1_STRING_length(const ASN1_STRING *x);
13558 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
13559 int ASN1_STRING_type(ASN1_STRING *x);
13560 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
13561 
13562 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;
13563 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
13564 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
13565                                      const unsigned char **pp, long length);
13566 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
13567 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
13568 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
13569 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
13570                           unsigned char *flags, int flags_len);
13571 
13572 
13573 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
13574                                BIT_STRING_BITNAME *tbl, int indent);
13575 
13576 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
13577 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
13578                             BIT_STRING_BITNAME *tbl);
13579 
13580 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
13581 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
13582 
13583 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;
13584 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
13585 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
13586                                long length);
13587 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
13588                                 long length);
13589 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
13590 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
13591 
13592 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;
13593 
13594 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
13595 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
13596 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
13597                                int offset_day, long offset_sec);
13598 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
13599 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
13600 
13601 
13602 
13603 
13604 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
13605 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
13606                                                time_t t);
13607 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
13608                                                time_t t, int offset_day,
13609                                                long offset_sec);
13610 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
13611 int ASN1_TIME_diff(int *pday, int *psec,
13612                    const ASN1_TIME *from, const ASN1_TIME *to);
13613 
13614 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;
13615 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
13616 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
13617                           const ASN1_OCTET_STRING *b);
13618 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
13619                           int len);
13620 
13621 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;
13622 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;
13623 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;
13624 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;
13625 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;
13626 
13627 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
13628 int UTF8_putc(unsigned char *str, int len, unsigned long value);
13629 
13630 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;
13631 
13632 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;
13633 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;
13634 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;
13635 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;
13636 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;
13637 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;
13638 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;
13639 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;
13640 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;
13641 
13642 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
13643 
13644 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
13645 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
13646                          int offset_day, long offset_sec);
13647 int ASN1_TIME_check(ASN1_TIME *t);
13648 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
13649                                                    **out);
13650 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
13651 
13652 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
13653                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
13654 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
13655                                       const unsigned char **pp,
13656                                       long length, d2i_of_void *d2i,
13657                                       void (*free_func) (OPENSSL_BLOCK),
13658                                       int ex_tag, int ex_class);
13659 
13660 
13661 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
13662 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
13663 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
13664 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
13665 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
13666 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
13667 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
13668 
13669 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
13670 
13671 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
13672 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
13673                                 const char *sn, const char *ln);
13674 
13675 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
13676 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
13677 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
13678 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
13679 
13680 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
13681 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
13682 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
13683 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
13684 
13685 /* General */
13686 /* given a string, return the correct type, max is the maximum length */
13687 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
13688 
13689 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
13690 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
13691                             long length, int Ptag, int Pclass);
13692 unsigned long ASN1_tag2bit(int tag);
13693 /* type is one or more of the B_ASN1_ values. */
13694 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
13695                                  long length, int type);
13696 
13697 /* PARSING */
13698 int asn1_Finish(ASN1_CTX *c);
13699 int asn1_const_Finish(ASN1_const_CTX *c);
13700 
13701 /* SPECIALS */
13702 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
13703                     int *pclass, long omax);
13704 int ASN1_check_infinite_end(unsigned char **p, long len);
13705 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
13706 void ASN1_put_object(unsigned char **pp, int constructed, int length,
13707                      int tag, int xclass);
13708 int ASN1_put_eoc(unsigned char **pp);
13709 int ASN1_object_size(int constructed, int length, int tag);
13710 
13711 /* Used to implement other functions */
13712 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
13713 # 976 "/usr/include/openssl/asn1.h" 3 4
13714 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
13715 
13716 /* ASN1 alloc/free macros for when a type is only used internally */
13717 
13718 
13719 
13720 
13721 
13722 
13723 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
13724 
13725 
13726 
13727 
13728 
13729 
13730 
13731 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
13732 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
13733 # 1006 "/usr/include/openssl/asn1.h" 3 4
13734 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
13735 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
13736 
13737 
13738 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
13739 
13740 
13741 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
13742 
13743 
13744 
13745 
13746 
13747 
13748 
13749 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
13750 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
13751 # 1034 "/usr/include/openssl/asn1.h" 3 4
13752 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
13753 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
13754 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
13755 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
13756 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
13757 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
13758 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
13759                   unsigned char *buf, int off);
13760 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
13761 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
13762                     int dump);
13763 
13764 const char *ASN1_tag2str(int tag);
13765 
13766 /* Used to load and write netscape format cert */
13767 
13768 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;
13769 
13770 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
13771 
13772 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
13773 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
13774 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
13775                                   unsigned char *data, int len);
13776 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
13777                                   unsigned char *data, int max_len);
13778 
13779 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
13780                                          d2i_of_void *d2i,
13781                                          void (*free_func) (OPENSSL_BLOCK));
13782 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
13783                              unsigned char **buf, int *len);
13784 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
13785 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
13786 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
13787                               ASN1_OCTET_STRING **oct);
13788 
13789 
13790 
13791 
13792 
13793 
13794 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
13795                             ASN1_OCTET_STRING **oct);
13796 
13797 void ASN1_STRING_set_default_mask(unsigned long mask);
13798 int ASN1_STRING_set_default_mask_asc(const char *p);
13799 unsigned long ASN1_STRING_get_default_mask(void);
13800 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
13801                        int inform, unsigned long mask);
13802 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
13803                         int inform, unsigned long mask,
13804                         long minsize, long maxsize);
13805 
13806 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
13807                                     const unsigned char *in, int inlen,
13808                                     int inform, int nid);
13809 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
13810 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
13811 void ASN1_STRING_TABLE_cleanup(void);
13812 
13813 /* ASN1 template functions */
13814 
13815 /* Old API compatible functions */
13816 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
13817 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
13818 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
13819                           long len, const ASN1_ITEM *it);
13820 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
13821 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
13822                        const ASN1_ITEM *it);
13823 
13824 void ASN1_add_oid_module(void);
13825 
13826 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
13827 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
13828 
13829 /* ASN1 Print flags */
13830 
13831 /* Indicate missing OPTIONAL fields */
13832 
13833 /* Mark start and end of SEQUENCE */
13834 
13835 /* Mark start and end of SEQUENCE/SET OF */
13836 
13837 /* Show the ASN1 type of primitives */
13838 
13839 /* Don't show ASN1 type of ANY */
13840 
13841 /* Don't show ASN1 type of MSTRINGs */
13842 
13843 /* Don't show field names in SEQUENCE */
13844 
13845 /* Show structure names of each SEQUENCE field */
13846 
13847 /* Don't show structure name even at top level */
13848 
13849 
13850 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
13851                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
13852 ASN1_PCTX *ASN1_PCTX_new(void);
13853 void ASN1_PCTX_free(ASN1_PCTX *p);
13854 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
13855 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
13856 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
13857 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
13858 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
13859 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
13860 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
13861 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
13862 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
13863 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
13864 
13865 BIO_METHOD *BIO_f_asn1(void);
13866 
13867 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
13868 
13869 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
13870                         const ASN1_ITEM *it);
13871 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
13872                               const char *hdr, const ASN1_ITEM *it);
13873 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
13874                      int ctype_nid, int econt_nid,
13875                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
13876 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
13877 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
13878 int SMIME_text(BIO *in, BIO *out);
13879 
13880 /* BEGIN ERROR CODES */
13881 /*
13882  * The following lines are auto generated by the script mkerr.pl. Any changes
13883  * made after this point may be overwritten when the script is next run.
13884  */
13885 
13886 void ERR_load_ASN1_strings(void);
13887 
13888 /* Error codes for the ASN1 functions. */
13889 
13890 /* Function codes. */
13891 # 1298 "/usr/include/openssl/asn1.h" 3 4
13892 /* Reason codes. */
13893 # 966 "/usr/include/openssl/objects.h" 2 3 4
13894 # 984 "/usr/include/openssl/objects.h" 3 4
13895 typedef struct obj_name_st {
13896     int type;
13897     int alias;
13898     const char *name;
13899     const char *data;
13900 } OBJ_NAME;
13901 
13902 
13903 
13904 int OBJ_NAME_init(void);
13905 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
13906                        int (*cmp_func) (const char *, const char *),
13907                        void (*free_func) (const char *, int, const char *));
13908 const char *OBJ_NAME_get(const char *name, int type);
13909 int OBJ_NAME_add(const char *name, int type, const char *data);
13910 int OBJ_NAME_remove(const char *name, int type);
13911 void OBJ_NAME_cleanup(int type); /* -1 for everything */
13912 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
13913                      void *arg);
13914 void OBJ_NAME_do_all_sorted(int type,
13915                             void (*fn) (const OBJ_NAME *, void *arg),
13916                             void *arg);
13917 
13918 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
13919 ASN1_OBJECT *OBJ_nid2obj(int n);
13920 const char *OBJ_nid2ln(int n);
13921 const char *OBJ_nid2sn(int n);
13922 int OBJ_obj2nid(const ASN1_OBJECT *o);
13923 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
13924 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
13925 int OBJ_txt2nid(const char *s);
13926 int OBJ_ln2nid(const char *s);
13927 int OBJ_sn2nid(const char *s);
13928 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
13929 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
13930                          int (*cmp) (const void *, const void *));
13931 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
13932                             int size,
13933                             int (*cmp) (const void *, const void *),
13934                             int flags);
13935 # 1035 "/usr/include/openssl/objects.h" 3 4
13936 /*-
13937  * Unsolved problem: if a type is actually a pointer type, like
13938  * nid_triple is, then its impossible to get a const where you need
13939  * it. Consider:
13940  *
13941  * typedef int nid_triple[3];
13942  * const void *a_;
13943  * const nid_triple const *a = a_;
13944  *
13945  * The assignement discards a const because what you really want is:
13946  *
13947  * const int const * const *a = a_;
13948  *
13949  * But if you do that, you lose the fact that a is an array of 3 ints,
13950  * which breaks comparison functions.
13951  *
13952  * Thus we end up having to cast, sadly, or unpack the
13953  * declarations. Or, as I finally did in this case, delcare nid_triple
13954  * to be a struct, which it should have been in the first place.
13955  *
13956  * Ben, August 2008.
13957  *
13958  * Also, strictly speaking not all types need be const, but handling
13959  * the non-constness means a lot of complication, and in practice
13960  * comparison routines do always not touch their arguments.
13961  */
13962 # 1104 "/usr/include/openssl/objects.h" 3 4
13963 int OBJ_new_nid(int num);
13964 int OBJ_add_object(const ASN1_OBJECT *obj);
13965 int OBJ_create(const char *oid, const char *sn, const char *ln);
13966 void OBJ_cleanup(void);
13967 int OBJ_create_objects(BIO *in);
13968 
13969 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
13970 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
13971 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
13972 void OBJ_sigid_free(void);
13973 
13974 extern int obj_cleanup_defer;
13975 void check_defer(int nid);
13976 
13977 /* BEGIN ERROR CODES */
13978 /*
13979  * The following lines are auto generated by the script mkerr.pl. Any changes
13980  * made after this point may be overwritten when the script is next run.
13981  */
13982 void ERR_load_OBJ_strings(void);
13983 
13984 /* Error codes for the OBJ functions. */
13985 
13986 /* Function codes. */
13987 # 1136 "/usr/include/openssl/objects.h" 3 4
13988 /* Reason codes. */
13989 # 95 "/usr/include/openssl/evp.h" 2 3 4
13990 # 125 "/usr/include/openssl/evp.h" 3 4
13991 /*
13992  * Type needs to be a bit field Sub-type needs to be for variations on the
13993  * method, as in, can it do arbitrary encryption....
13994  */
13995 struct evp_pkey_st {
13996     int type;
13997     int save_type;
13998     int references;
13999     const EVP_PKEY_ASN1_METHOD *ameth;
14000     ENGINE *engine;
14001     union {
14002         char *ptr;
14003 
14004         struct rsa_st *rsa; /* RSA */
14005 
14006 
14007         struct dsa_st *dsa; /* DSA */
14008 
14009 
14010         struct dh_st *dh; /* DH */
14011 
14012 
14013         struct ec_key_st *ec; /* ECC */
14014 
14015     } pkey;
14016     int save_parameters;
14017     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
14018 } /* EVP_PKEY */ ;
14019 
14020 
14021 
14022 
14023 
14024 
14025 
14026 struct env_md_st {
14027     int type;
14028     int pkey_type;
14029     int md_size;
14030     unsigned long flags;
14031     int (*init) (EVP_MD_CTX *ctx);
14032     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
14033     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
14034     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
14035     int (*cleanup) (EVP_MD_CTX *ctx);
14036     /* FIXME: prototype these some day */
14037     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
14038                  unsigned char *sigret, unsigned int *siglen, void *key);
14039     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
14040                    const unsigned char *sigbuf, unsigned int siglen,
14041                    void *key);
14042     int required_pkey_type[5]; /* EVP_PKEY_xxx */
14043     int block_size;
14044     int ctx_size; /* how big does the ctx->md_data need to be */
14045     /* control function */
14046     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
14047 } /* EVP_MD */ ;
14048 
14049 typedef int evp_sign_method(int type, const unsigned char *m,
14050                             unsigned int m_length, unsigned char *sigret,
14051                             unsigned int *siglen, void *key);
14052 typedef int evp_verify_method(int type, const unsigned char *m,
14053                               unsigned int m_length,
14054                               const unsigned char *sigbuf,
14055                               unsigned int siglen, void *key);
14056 
14057 /* digest can only handle a single block */
14058 
14059 
14060 /*
14061  * digest is a "clone" digest used
14062  * which is a copy of an existing
14063  * one for a specific public key type.
14064  * EVP_dss1() etc
14065  */
14066 
14067 
14068 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
14069 
14070 
14071 
14072 /* DigestAlgorithmIdentifier flags... */
14073 
14074 
14075 
14076 /* NULL or absent parameter accepted. Use NULL */
14077 
14078 
14079 
14080 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
14081 
14082 
14083 
14084 /* Custom handling via ctrl */
14085 
14086 
14087 
14088 /* Note if suitable for use in FIPS mode */
14089 
14090 
14091 /* Digest ctrls */
14092 
14093 
14094 
14095 
14096 /* Minimum Algorithm specific ctrl value */
14097 # 268 "/usr/include/openssl/evp.h" 3 4
14098 struct env_md_ctx_st {
14099     const EVP_MD *digest;
14100     ENGINE *engine; /* functional reference if 'digest' is
14101                                  * ENGINE-provided */
14102     unsigned long flags;
14103     void *md_data;
14104     /* Public key context for sign/verify */
14105     EVP_PKEY_CTX *pctx;
14106     /* Update function: usually copied from EVP_MD */
14107     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
14108 } /* EVP_MD_CTX */ ;
14109 
14110 /* values for EVP_MD_CTX flags */
14111 
14112 
14113 
14114 
14115 
14116 
14117 
14118 /*
14119  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
14120  * don't accidentally reuse the values for other purposes.
14121  */
14122 
14123 
14124 
14125 
14126 /*
14127  * The following PAD options are also currently ignored in 1.0.0, digest
14128  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
14129  * instead.
14130  */
14131 
14132 
14133 
14134 
14135 
14136 
14137 
14138 struct evp_cipher_st {
14139     int nid;
14140     int block_size;
14141     /* Default value for variable length ciphers */
14142     int key_len;
14143     int iv_len;
14144     /* Various flags */
14145     unsigned long flags;
14146     /* init key */
14147     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
14148                  const unsigned char *iv, int enc);
14149     /* encrypt/decrypt data */
14150     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
14151                       const unsigned char *in, size_t inl);
14152     /* cleanup ctx */
14153     int (*cleanup) (EVP_CIPHER_CTX *);
14154     /* how big ctx->cipher_data needs to be */
14155     int ctx_size;
14156     /* Populate a ASN1_TYPE with parameters */
14157     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
14158     /* Get parameters from a ASN1_TYPE */
14159     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
14160     /* Miscellaneous operations */
14161     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
14162     /* Application data */
14163     void *app_data;
14164 } /* EVP_CIPHER */ ;
14165 
14166 /* Values for cipher flags */
14167 
14168 /* Modes for ciphers */
14169 # 351 "/usr/include/openssl/evp.h" 3 4
14170 /* Set if variable length cipher */
14171 
14172 /* Set if the iv handling should be done by the cipher itself */
14173 
14174 /* Set if the cipher's init() function should be called if key is NULL */
14175 
14176 /* Call ctrl() to init cipher parameters */
14177 
14178 /* Don't use standard key length function */
14179 
14180 /* Don't use standard block padding */
14181 
14182 /* cipher handles random key generation */
14183 
14184 /* cipher has its own additional copying logic */
14185 
14186 /* Allow use default ASN1 get/set iv */
14187 
14188 /* Buffer length in bits not bytes: CFB1 mode only */
14189 
14190 /* Note if suitable for use in FIPS mode */
14191 
14192 /* Allow non FIPS cipher in FIPS mode */
14193 
14194 /*
14195  * Cipher handles any and all padding logic as well as finalisation.
14196  */
14197 
14198 
14199 
14200 
14201 /*
14202  * Cipher context flag to indicate we can handle wrap mode: if allowed in
14203  * older applications it could overflow buffers.
14204  */
14205 
14206 
14207 
14208 /* ctrl() values */
14209 # 410 "/usr/include/openssl/evp.h" 3 4
14210 /*
14211  * AEAD cipher deduces payload length and returns number of bytes required to
14212  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
14213  * appends/verifies MAC.
14214  */
14215 
14216 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
14217 
14218 /* Set the GCM invocation field, decrypt only */
14219 
14220 
14221 
14222 
14223 
14224 
14225 
14226 /* RFC 5246 defines additional data to be 13 bytes in length */
14227 
14228 
14229 typedef struct {
14230     unsigned char *out;
14231     const unsigned char *inp;
14232     size_t len;
14233     unsigned int interleave;
14234 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
14235 
14236 /* GCM TLS constants */
14237 /* Length of fixed part of IV derived from PRF */
14238 
14239 /* Length of explicit part of IV part of TLS records */
14240 
14241 /* Length of tag for TLS */
14242 
14243 
14244 typedef struct evp_cipher_info_st {
14245     const EVP_CIPHER *cipher;
14246     unsigned char iv[16];
14247 } EVP_CIPHER_INFO;
14248 
14249 struct evp_cipher_ctx_st {
14250     const EVP_CIPHER *cipher;
14251     ENGINE *engine; /* functional reference if 'cipher' is
14252                                  * ENGINE-provided */
14253     int encrypt; /* encrypt or decrypt */
14254     int buf_len; /* number we have left */
14255     unsigned char oiv[16]; /* original iv */
14256     unsigned char iv[16]; /* working iv */
14257     unsigned char buf[32]; /* saved partial block */
14258     int num; /* used by cfb/ofb/ctr mode */
14259     void *app_data; /* application stuff */
14260     int key_len; /* May change for variable length cipher */
14261     unsigned long flags; /* Various flags */
14262     void *cipher_data; /* per EVP data */
14263     int final_used;
14264     int block_mask;
14265     unsigned char final[32]; /* possible final block */
14266 } /* EVP_CIPHER_CTX */ ;
14267 
14268 typedef struct evp_Encode_Ctx_st {
14269     /* number saved in a partial encode/decode */
14270     int num;
14271     /*
14272      * The length is either the output line length (in input bytes) or the
14273      * shortest input line length that is ok.  Once decoding begins, the
14274      * length is adjusted up each time a longer line is decoded
14275      */
14276     int length;
14277     /* data to encode */
14278     unsigned char enc_data[80];
14279     /* number read on current line */
14280     int line_num;
14281     int expect_nl;
14282 } EVP_ENCODE_CTX;
14283 
14284 /* Password based encryption function */
14285 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
14286                               int passlen, ASN1_TYPE *param,
14287                               const EVP_CIPHER *cipher, const EVP_MD *md,
14288                               int en_de);
14289 # 510 "/usr/include/openssl/evp.h" 3 4
14290 /* Add some extra combinations */
14291 
14292 
14293 
14294 
14295 
14296 int EVP_MD_type(const EVP_MD *md);
14297 
14298 
14299 int EVP_MD_pkey_type(const EVP_MD *md);
14300 int EVP_MD_size(const EVP_MD *md);
14301 int EVP_MD_block_size(const EVP_MD *md);
14302 unsigned long EVP_MD_flags(const EVP_MD *md);
14303 
14304 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
14305 
14306 
14307 
14308 
14309 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
14310 
14311 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
14312 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
14313 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
14314 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
14315 
14316 
14317 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
14318 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
14319 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
14320 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
14321 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
14322 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
14323 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
14324 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
14325 
14326 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
14327 # 574 "/usr/include/openssl/evp.h" 3 4
14328 int EVP_Cipher(EVP_CIPHER_CTX *c,
14329                unsigned char *out, const unsigned char *in, unsigned int inl);
14330 # 586 "/usr/include/openssl/evp.h" 3 4
14331 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
14332 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
14333 EVP_MD_CTX *EVP_MD_CTX_create(void);
14334 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
14335 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
14336 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
14337 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
14338 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
14339 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
14340 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
14341 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
14342 int EVP_Digest(const void *data, size_t count,
14343                unsigned char *md, unsigned int *size, const EVP_MD *type,
14344                ENGINE *impl);
14345 
14346 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
14347 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
14348 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
14349 
14350 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
14351 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
14352                            const char *prompt, int verify);
14353 void EVP_set_pw_prompt(const char *prompt);
14354 char *EVP_get_pw_prompt(void);
14355 
14356 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
14357                    const unsigned char *salt, const unsigned char *data,
14358                    int datal, int count, unsigned char *key,
14359                    unsigned char *iv);
14360 
14361 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
14362 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
14363 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
14364 
14365 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
14366                     const unsigned char *key, const unsigned char *iv);
14367 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
14368                        ENGINE *impl, const unsigned char *key,
14369                        const unsigned char *iv);
14370 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
14371                       const unsigned char *in, int inl);
14372 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
14373 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
14374 
14375 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
14376                     const unsigned char *key, const unsigned char *iv);
14377 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
14378                        ENGINE *impl, const unsigned char *key,
14379                        const unsigned char *iv);
14380 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
14381                       const unsigned char *in, int inl);
14382 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
14383 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
14384 
14385 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
14386                    const unsigned char *key, const unsigned char *iv,
14387                    int enc);
14388 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
14389                       ENGINE *impl, const unsigned char *key,
14390                       const unsigned char *iv, int enc);
14391 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
14392                      const unsigned char *in, int inl);
14393 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
14394 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
14395 
14396 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
14397                   EVP_PKEY *pkey);
14398 
14399 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
14400                     unsigned int siglen, EVP_PKEY *pkey);
14401 
14402 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
14403                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
14404 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
14405                         unsigned char *sigret, size_t *siglen);
14406 
14407 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
14408                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
14409 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
14410                           const unsigned char *sig, size_t siglen);
14411 
14412 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
14413                  const unsigned char *ek, int ekl, const unsigned char *iv,
14414                  EVP_PKEY *priv);
14415 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
14416 
14417 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
14418                  unsigned char **ek, int *ekl, unsigned char *iv,
14419                  EVP_PKEY **pubk, int npubk);
14420 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
14421 
14422 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
14423 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
14424                       const unsigned char *in, int inl);
14425 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
14426 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
14427 
14428 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
14429 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
14430                      const unsigned char *in, int inl);
14431 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
14432                     char *out, int *outl);
14433 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
14434 
14435 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
14436 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
14437 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
14438 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
14439 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
14440 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
14441 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
14442 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
14443 
14444 
14445 BIO_METHOD *BIO_f_md(void);
14446 BIO_METHOD *BIO_f_base64(void);
14447 BIO_METHOD *BIO_f_cipher(void);
14448 BIO_METHOD *BIO_f_reliable(void);
14449 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
14450                     const unsigned char *i, int enc);
14451 
14452 
14453 const EVP_MD *EVP_md_null(void);
14454 
14455 const EVP_MD *EVP_md2(void);
14456 
14457 
14458 const EVP_MD *EVP_md4(void);
14459 
14460 
14461 const EVP_MD *EVP_md5(void);
14462 
14463 
14464 const EVP_MD *EVP_sha(void);
14465 const EVP_MD *EVP_sha1(void);
14466 const EVP_MD *EVP_dss(void);
14467 const EVP_MD *EVP_dss1(void);
14468 const EVP_MD *EVP_ecdsa(void);
14469 
14470 
14471 const EVP_MD *EVP_sha224(void);
14472 const EVP_MD *EVP_sha256(void);
14473 
14474 
14475 const EVP_MD *EVP_sha384(void);
14476 const EVP_MD *EVP_sha512(void);
14477 
14478 
14479 
14480 
14481 
14482 const EVP_MD *EVP_ripemd160(void);
14483 
14484 
14485 
14486 
14487 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
14488 
14489 const EVP_CIPHER *EVP_des_ecb(void);
14490 const EVP_CIPHER *EVP_des_ede(void);
14491 const EVP_CIPHER *EVP_des_ede3(void);
14492 const EVP_CIPHER *EVP_des_ede_ecb(void);
14493 const EVP_CIPHER *EVP_des_ede3_ecb(void);
14494 const EVP_CIPHER *EVP_des_cfb64(void);
14495 
14496 const EVP_CIPHER *EVP_des_cfb1(void);
14497 const EVP_CIPHER *EVP_des_cfb8(void);
14498 const EVP_CIPHER *EVP_des_ede_cfb64(void);
14499 
14500 
14501 
14502 
14503 
14504 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
14505 
14506 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
14507 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
14508 const EVP_CIPHER *EVP_des_ofb(void);
14509 const EVP_CIPHER *EVP_des_ede_ofb(void);
14510 const EVP_CIPHER *EVP_des_ede3_ofb(void);
14511 const EVP_CIPHER *EVP_des_cbc(void);
14512 const EVP_CIPHER *EVP_des_ede_cbc(void);
14513 const EVP_CIPHER *EVP_des_ede3_cbc(void);
14514 const EVP_CIPHER *EVP_desx_cbc(void);
14515 const EVP_CIPHER *EVP_des_ede3_wrap(void);
14516 /*
14517  * This should now be supported through the dev_crypto ENGINE. But also, why
14518  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
14519  * branch?
14520  */
14521 # 785 "/usr/include/openssl/evp.h" 3 4
14522 const EVP_CIPHER *EVP_rc4(void);
14523 const EVP_CIPHER *EVP_rc4_40(void);
14524 
14525 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
14526 # 799 "/usr/include/openssl/evp.h" 3 4
14527 const EVP_CIPHER *EVP_rc2_ecb(void);
14528 const EVP_CIPHER *EVP_rc2_cbc(void);
14529 const EVP_CIPHER *EVP_rc2_40_cbc(void);
14530 const EVP_CIPHER *EVP_rc2_64_cbc(void);
14531 const EVP_CIPHER *EVP_rc2_cfb64(void);
14532 
14533 const EVP_CIPHER *EVP_rc2_ofb(void);
14534 
14535 
14536 const EVP_CIPHER *EVP_bf_ecb(void);
14537 const EVP_CIPHER *EVP_bf_cbc(void);
14538 const EVP_CIPHER *EVP_bf_cfb64(void);
14539 
14540 const EVP_CIPHER *EVP_bf_ofb(void);
14541 
14542 
14543 const EVP_CIPHER *EVP_cast5_ecb(void);
14544 const EVP_CIPHER *EVP_cast5_cbc(void);
14545 const EVP_CIPHER *EVP_cast5_cfb64(void);
14546 
14547 const EVP_CIPHER *EVP_cast5_ofb(void);
14548 # 829 "/usr/include/openssl/evp.h" 3 4
14549 const EVP_CIPHER *EVP_aes_128_ecb(void);
14550 const EVP_CIPHER *EVP_aes_128_cbc(void);
14551 const EVP_CIPHER *EVP_aes_128_cfb1(void);
14552 const EVP_CIPHER *EVP_aes_128_cfb8(void);
14553 const EVP_CIPHER *EVP_aes_128_cfb128(void);
14554 
14555 const EVP_CIPHER *EVP_aes_128_ofb(void);
14556 const EVP_CIPHER *EVP_aes_128_ctr(void);
14557 const EVP_CIPHER *EVP_aes_128_ccm(void);
14558 const EVP_CIPHER *EVP_aes_128_gcm(void);
14559 const EVP_CIPHER *EVP_aes_128_xts(void);
14560 const EVP_CIPHER *EVP_aes_128_wrap(void);
14561 const EVP_CIPHER *EVP_aes_192_ecb(void);
14562 const EVP_CIPHER *EVP_aes_192_cbc(void);
14563 const EVP_CIPHER *EVP_aes_192_cfb1(void);
14564 const EVP_CIPHER *EVP_aes_192_cfb8(void);
14565 const EVP_CIPHER *EVP_aes_192_cfb128(void);
14566 
14567 const EVP_CIPHER *EVP_aes_192_ofb(void);
14568 const EVP_CIPHER *EVP_aes_192_ctr(void);
14569 const EVP_CIPHER *EVP_aes_192_ccm(void);
14570 const EVP_CIPHER *EVP_aes_192_gcm(void);
14571 const EVP_CIPHER *EVP_aes_192_wrap(void);
14572 const EVP_CIPHER *EVP_aes_256_ecb(void);
14573 const EVP_CIPHER *EVP_aes_256_cbc(void);
14574 const EVP_CIPHER *EVP_aes_256_cfb1(void);
14575 const EVP_CIPHER *EVP_aes_256_cfb8(void);
14576 const EVP_CIPHER *EVP_aes_256_cfb128(void);
14577 
14578 const EVP_CIPHER *EVP_aes_256_ofb(void);
14579 const EVP_CIPHER *EVP_aes_256_ctr(void);
14580 const EVP_CIPHER *EVP_aes_256_ccm(void);
14581 const EVP_CIPHER *EVP_aes_256_gcm(void);
14582 const EVP_CIPHER *EVP_aes_256_xts(void);
14583 const EVP_CIPHER *EVP_aes_256_wrap(void);
14584 
14585 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
14586 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
14587 
14588 
14589 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
14590 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
14591 
14592 
14593 
14594 const EVP_CIPHER *EVP_camellia_128_ecb(void);
14595 const EVP_CIPHER *EVP_camellia_128_cbc(void);
14596 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
14597 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
14598 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
14599 
14600 const EVP_CIPHER *EVP_camellia_128_ofb(void);
14601 const EVP_CIPHER *EVP_camellia_192_ecb(void);
14602 const EVP_CIPHER *EVP_camellia_192_cbc(void);
14603 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
14604 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
14605 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
14606 
14607 const EVP_CIPHER *EVP_camellia_192_ofb(void);
14608 const EVP_CIPHER *EVP_camellia_256_ecb(void);
14609 const EVP_CIPHER *EVP_camellia_256_cbc(void);
14610 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
14611 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
14612 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
14613 
14614 const EVP_CIPHER *EVP_camellia_256_ofb(void);
14615 # 905 "/usr/include/openssl/evp.h" 3 4
14616 void OPENSSL_add_all_algorithms_noconf(void);
14617 void OPENSSL_add_all_algorithms_conf(void);
14618 # 916 "/usr/include/openssl/evp.h" 3 4
14619 void OpenSSL_add_all_ciphers(void);
14620 void OpenSSL_add_all_digests(void);
14621 
14622 
14623 
14624 
14625 int EVP_add_cipher(const EVP_CIPHER *cipher);
14626 int EVP_add_digest(const EVP_MD *digest);
14627 
14628 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
14629 const EVP_MD *EVP_get_digestbyname(const char *name);
14630 void EVP_cleanup(void);
14631 
14632 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
14633                                    const char *from, const char *to, void *x),
14634                        void *arg);
14635 void EVP_CIPHER_do_all_sorted(void (*fn)
14636                                (const EVP_CIPHER *ciph, const char *from,
14637                                 const char *to, void *x), void *arg);
14638 
14639 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
14640                                const char *from, const char *to, void *x),
14641                    void *arg);
14642 void EVP_MD_do_all_sorted(void (*fn)
14643                            (const EVP_MD *ciph, const char *from,
14644                             const char *to, void *x), void *arg);
14645 
14646 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
14647                          const unsigned char *enc_key, int enc_key_len,
14648                          EVP_PKEY *private_key);
14649 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
14650                          const unsigned char *key, int key_len,
14651                          EVP_PKEY *pub_key);
14652 int EVP_PKEY_type(int type);
14653 int EVP_PKEY_id(const EVP_PKEY *pkey);
14654 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
14655 int EVP_PKEY_bits(EVP_PKEY *pkey);
14656 int EVP_PKEY_size(EVP_PKEY *pkey);
14657 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
14658 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
14659 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
14660 void *EVP_PKEY_get0(EVP_PKEY *pkey);
14661 
14662 
14663 struct rsa_st;
14664 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
14665 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
14666 
14667 
14668 struct dsa_st;
14669 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
14670 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
14671 
14672 
14673 struct dh_st;
14674 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
14675 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
14676 
14677 
14678 struct ec_key_st;
14679 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
14680 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
14681 
14682 
14683 EVP_PKEY *EVP_PKEY_new(void);
14684 void EVP_PKEY_free(EVP_PKEY *pkey);
14685 
14686 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
14687                         long length);
14688 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
14689 
14690 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
14691                          long length);
14692 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
14693                              long length);
14694 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
14695 
14696 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
14697 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
14698 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
14699 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
14700 
14701 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
14702 
14703 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
14704                           int indent, ASN1_PCTX *pctx);
14705 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
14706                            int indent, ASN1_PCTX *pctx);
14707 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
14708                           int indent, ASN1_PCTX *pctx);
14709 
14710 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
14711 
14712 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
14713 
14714 /* calls methods */
14715 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14716 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14717 
14718 /* These are used by EVP_CIPHER methods */
14719 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14720 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14721 
14722 /* PKCS5 password based encryption */
14723 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
14724                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
14725                        const EVP_MD *md, int en_de);
14726 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
14727                            const unsigned char *salt, int saltlen, int iter,
14728                            int keylen, unsigned char *out);
14729 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
14730                       const unsigned char *salt, int saltlen, int iter,
14731                       const EVP_MD *digest, int keylen, unsigned char *out);
14732 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
14733                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
14734                           const EVP_MD *md, int en_de);
14735 
14736 void PKCS5_PBE_add(void);
14737 
14738 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
14739                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
14740 
14741 /* PBE type */
14742 
14743 /* Can appear as the outermost AlgorithmIdentifier */
14744 
14745 /* Is an PRF type OID */
14746 
14747 
14748 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
14749                          int md_nid, EVP_PBE_KEYGEN *keygen);
14750 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
14751                     EVP_PBE_KEYGEN *keygen);
14752 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
14753                  EVP_PBE_KEYGEN **pkeygen);
14754 void EVP_PBE_cleanup(void);
14755 # 1064 "/usr/include/openssl/evp.h" 3 4
14756 int EVP_PKEY_asn1_get_count(void);
14757 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
14758 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
14759 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
14760                                                    const char *str, int len);
14761 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
14762 int EVP_PKEY_asn1_add_alias(int to, int from);
14763 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
14764                             int *ppkey_flags, const char **pinfo,
14765                             const char **ppem_str,
14766                             const EVP_PKEY_ASN1_METHOD *ameth);
14767 
14768 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
14769 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
14770                                         const char *pem_str,
14771                                         const char *info);
14772 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
14773                         const EVP_PKEY_ASN1_METHOD *src);
14774 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
14775 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
14776                               int (*pub_decode) (EVP_PKEY *pk,
14777                                                  X509_PUBKEY *pub),
14778                               int (*pub_encode) (X509_PUBKEY *pub,
14779                                                  const EVP_PKEY *pk),
14780                               int (*pub_cmp) (const EVP_PKEY *a,
14781                                               const EVP_PKEY *b),
14782                               int (*pub_print) (BIO *out,
14783                                                 const EVP_PKEY *pkey,
14784                                                 int indent, ASN1_PCTX *pctx),
14785                               int (*pkey_size) (const EVP_PKEY *pk),
14786                               int (*pkey_bits) (const EVP_PKEY *pk));
14787 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
14788                                int (*priv_decode) (EVP_PKEY *pk,
14789                                                    PKCS8_PRIV_KEY_INFO
14790                                                    *p8inf),
14791                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
14792                                                    const EVP_PKEY *pk),
14793                                int (*priv_print) (BIO *out,
14794                                                   const EVP_PKEY *pkey,
14795                                                   int indent,
14796                                                   ASN1_PCTX *pctx));
14797 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
14798                              int (*param_decode) (EVP_PKEY *pkey,
14799                                                   const unsigned char **pder,
14800                                                   int derlen),
14801                              int (*param_encode) (const EVP_PKEY *pkey,
14802                                                   unsigned char **pder),
14803                              int (*param_missing) (const EVP_PKEY *pk),
14804                              int (*param_copy) (EVP_PKEY *to,
14805                                                 const EVP_PKEY *from),
14806                              int (*param_cmp) (const EVP_PKEY *a,
14807                                                const EVP_PKEY *b),
14808                              int (*param_print) (BIO *out,
14809                                                  const EVP_PKEY *pkey,
14810                                                  int indent,
14811                                                  ASN1_PCTX *pctx));
14812 
14813 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
14814                             void (*pkey_free) (EVP_PKEY *pkey));
14815 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
14816                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
14817                                               long arg1, void *arg2));
14818 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
14819                             int (*item_verify) (EVP_MD_CTX *ctx,
14820                                                 const ASN1_ITEM *it,
14821                                                 void *asn,
14822                                                 X509_ALGOR *a,
14823                                                 ASN1_BIT_STRING *sig,
14824                                                 EVP_PKEY *pkey),
14825                             int (*item_sign) (EVP_MD_CTX *ctx,
14826                                               const ASN1_ITEM *it,
14827                                               void *asn,
14828                                               X509_ALGOR *alg1,
14829                                               X509_ALGOR *alg2,
14830                                               ASN1_BIT_STRING *sig));
14831 # 1185 "/usr/include/openssl/evp.h" 3 4
14832 /* Used by GOST key encryption in TLS */
14833 # 1199 "/usr/include/openssl/evp.h" 3 4
14834 /*
14835  * Method handles all operations: don't assume any digest related defaults.
14836  */
14837 
14838 
14839 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
14840 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
14841 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
14842                              const EVP_PKEY_METHOD *meth);
14843 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
14844 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
14845 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
14846 
14847 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
14848 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
14849 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
14850 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
14851 
14852 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
14853                       int cmd, int p1, void *p2);
14854 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
14855                           const char *value);
14856 
14857 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
14858 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
14859 
14860 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
14861                                const unsigned char *key, int keylen);
14862 
14863 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
14864 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
14865 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
14866 
14867 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
14868 
14869 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
14870 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
14871 
14872 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
14873 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
14874                   unsigned char *sig, size_t *siglen,
14875                   const unsigned char *tbs, size_t tbslen);
14876 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
14877 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
14878                     const unsigned char *sig, size_t siglen,
14879                     const unsigned char *tbs, size_t tbslen);
14880 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
14881 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
14882                             unsigned char *rout, size_t *routlen,
14883                             const unsigned char *sig, size_t siglen);
14884 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
14885 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
14886                      unsigned char *out, size_t *outlen,
14887                      const unsigned char *in, size_t inlen);
14888 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
14889 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
14890                      unsigned char *out, size_t *outlen,
14891                      const unsigned char *in, size_t inlen);
14892 
14893 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
14894 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
14895 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
14896 
14897 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
14898 
14899 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
14900 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
14901 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
14902 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
14903 
14904 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
14905 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
14906 
14907 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
14908 
14909 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
14910                             int (*init) (EVP_PKEY_CTX *ctx));
14911 
14912 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
14913                             int (*copy) (EVP_PKEY_CTX *dst,
14914                                          EVP_PKEY_CTX *src));
14915 
14916 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
14917                                void (*cleanup) (EVP_PKEY_CTX *ctx));
14918 
14919 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
14920                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
14921                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
14922                                                  EVP_PKEY *pkey));
14923 
14924 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
14925                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
14926                               int (*keygen) (EVP_PKEY_CTX *ctx,
14927                                              EVP_PKEY *pkey));
14928 
14929 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
14930                             int (*sign_init) (EVP_PKEY_CTX *ctx),
14931                             int (*sign) (EVP_PKEY_CTX *ctx,
14932                                          unsigned char *sig, size_t *siglen,
14933                                          const unsigned char *tbs,
14934                                          size_t tbslen));
14935 
14936 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
14937                               int (*verify_init) (EVP_PKEY_CTX *ctx),
14938                               int (*verify) (EVP_PKEY_CTX *ctx,
14939                                              const unsigned char *sig,
14940                                              size_t siglen,
14941                                              const unsigned char *tbs,
14942                                              size_t tbslen));
14943 
14944 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
14945                                       int (*verify_recover_init) (EVP_PKEY_CTX
14946                                                                   *ctx),
14947                                       int (*verify_recover) (EVP_PKEY_CTX
14948                                                              *ctx,
14949                                                              unsigned char
14950                                                              *sig,
14951                                                              size_t *siglen,
14952                                                              const unsigned
14953                                                              char *tbs,
14954                                                              size_t tbslen));
14955 
14956 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
14957                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
14958                                                     EVP_MD_CTX *mctx),
14959                                int (*signctx) (EVP_PKEY_CTX *ctx,
14960                                                unsigned char *sig,
14961                                                size_t *siglen,
14962                                                EVP_MD_CTX *mctx));
14963 
14964 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
14965                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
14966                                                         EVP_MD_CTX *mctx),
14967                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
14968                                                    const unsigned char *sig,
14969                                                    int siglen,
14970                                                    EVP_MD_CTX *mctx));
14971 
14972 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
14973                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
14974                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
14975                                                  unsigned char *out,
14976                                                  size_t *outlen,
14977                                                  const unsigned char *in,
14978                                                  size_t inlen));
14979 
14980 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
14981                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
14982                                int (*decrypt) (EVP_PKEY_CTX *ctx,
14983                                                unsigned char *out,
14984                                                size_t *outlen,
14985                                                const unsigned char *in,
14986                                                size_t inlen));
14987 
14988 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
14989                               int (*derive_init) (EVP_PKEY_CTX *ctx),
14990                               int (*derive) (EVP_PKEY_CTX *ctx,
14991                                              unsigned char *key,
14992                                              size_t *keylen));
14993 
14994 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
14995                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
14996                                          void *p2),
14997                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
14998                                              const char *type,
14999                                              const char *value));
15000 
15001 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
15002                             int (**pinit) (EVP_PKEY_CTX *ctx));
15003 
15004 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
15005                             int (**pcopy) (EVP_PKEY_CTX *dst,
15006                                            EVP_PKEY_CTX *src));
15007 
15008 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
15009                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
15010 
15011 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
15012                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
15013                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
15014                                                    EVP_PKEY *pkey));
15015 
15016 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
15017                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
15018                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
15019                                                EVP_PKEY *pkey));
15020 
15021 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
15022                             int (**psign_init) (EVP_PKEY_CTX *ctx),
15023                             int (**psign) (EVP_PKEY_CTX *ctx,
15024                                            unsigned char *sig, size_t *siglen,
15025                                            const unsigned char *tbs,
15026                                            size_t tbslen));
15027 
15028 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
15029                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
15030                               int (**pverify) (EVP_PKEY_CTX *ctx,
15031                                                const unsigned char *sig,
15032                                                size_t siglen,
15033                                                const unsigned char *tbs,
15034                                                size_t tbslen));
15035 
15036 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
15037                                       int (**pverify_recover_init) (EVP_PKEY_CTX
15038                                                                     *ctx),
15039                                       int (**pverify_recover) (EVP_PKEY_CTX
15040                                                                *ctx,
15041                                                                unsigned char
15042                                                                *sig,
15043                                                                size_t *siglen,
15044                                                                const unsigned
15045                                                                char *tbs,
15046                                                                size_t tbslen));
15047 
15048 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
15049                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
15050                                                       EVP_MD_CTX *mctx),
15051                                int (**psignctx) (EVP_PKEY_CTX *ctx,
15052                                                  unsigned char *sig,
15053                                                  size_t *siglen,
15054                                                  EVP_MD_CTX *mctx));
15055 
15056 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
15057                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
15058                                                           EVP_MD_CTX *mctx),
15059                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
15060                                                      const unsigned char *sig,
15061                                                      int siglen,
15062                                                      EVP_MD_CTX *mctx));
15063 
15064 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
15065                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
15066                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
15067                                                    unsigned char *out,
15068                                                    size_t *outlen,
15069                                                    const unsigned char *in,
15070                                                    size_t inlen));
15071 
15072 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
15073                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
15074                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
15075                                                  unsigned char *out,
15076                                                  size_t *outlen,
15077                                                  const unsigned char *in,
15078                                                  size_t inlen));
15079 
15080 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
15081                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
15082                               int (**pderive) (EVP_PKEY_CTX *ctx,
15083                                                unsigned char *key,
15084                                                size_t *keylen));
15085 
15086 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
15087                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
15088                                            void *p2),
15089                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
15090                                                const char *type,
15091                                                const char *value));
15092 
15093 void EVP_add_alg_module(void);
15094 
15095 /* BEGIN ERROR CODES */
15096 /*
15097  * The following lines are auto generated by the script mkerr.pl. Any changes
15098  * made after this point may be overwritten when the script is next run.
15099  */
15100 
15101 void ERR_load_EVP_strings(void);
15102 
15103 /* Error codes for the EVP functions. */
15104 
15105 /* Function codes. */
15106 # 1554 "/usr/include/openssl/evp.h" 3 4
15107 /* Reason codes. */
15108 # 74 "/usr/include/openssl/x509.h" 2 3 4
15109 
15110 
15111 # 1 "/usr/include/openssl/bio.h" 1 3 4
15112 /* crypto/bio/bio.h */
15113 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15114  * All rights reserved.
15115  *
15116  * This package is an SSL implementation written
15117  * by Eric Young (eay@cryptsoft.com).
15118  * The implementation was written so as to conform with Netscapes SSL.
15119  *
15120  * This library is free for commercial and non-commercial use as long as
15121  * the following conditions are aheared to.  The following conditions
15122  * apply to all code found in this distribution, be it the RC4, RSA,
15123  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15124  * included with this distribution is covered by the same copyright terms
15125  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15126  *
15127  * Copyright remains Eric Young's, and as such any Copyright notices in
15128  * the code are not to be removed.
15129  * If this package is used in a product, Eric Young should be given attribution
15130  * as the author of the parts of the library used.
15131  * This can be in the form of a textual message at program startup or
15132  * in documentation (online or textual) provided with the package.
15133  *
15134  * Redistribution and use in source and binary forms, with or without
15135  * modification, are permitted provided that the following conditions
15136  * are met:
15137  * 1. Redistributions of source code must retain the copyright
15138  *    notice, this list of conditions and the following disclaimer.
15139  * 2. Redistributions in binary form must reproduce the above copyright
15140  *    notice, this list of conditions and the following disclaimer in the
15141  *    documentation and/or other materials provided with the distribution.
15142  * 3. All advertising materials mentioning features or use of this software
15143  *    must display the following acknowledgement:
15144  *    "This product includes cryptographic software written by
15145  *     Eric Young (eay@cryptsoft.com)"
15146  *    The word 'cryptographic' can be left out if the rouines from the library
15147  *    being used are not cryptographic related :-).
15148  * 4. If you include any Windows specific code (or a derivative thereof) from
15149  *    the apps directory (application code) you must include an acknowledgement:
15150  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15151  *
15152  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15153  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15154  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15155  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15156  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15157  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15158  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15159  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15160  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15161  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15162  * SUCH DAMAGE.
15163  *
15164  * The licence and distribution terms for any publically available version or
15165  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15166  * copied and put under another distribution licence
15167  * [including the GNU Public Licence.]
15168  */
15169 # 77 "/usr/include/openssl/x509.h" 2 3 4
15170 
15171 # 1 "/usr/include/openssl/stack.h" 1 3 4
15172 /* crypto/stack/stack.h */
15173 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15174  * All rights reserved.
15175  *
15176  * This package is an SSL implementation written
15177  * by Eric Young (eay@cryptsoft.com).
15178  * The implementation was written so as to conform with Netscapes SSL.
15179  *
15180  * This library is free for commercial and non-commercial use as long as
15181  * the following conditions are aheared to.  The following conditions
15182  * apply to all code found in this distribution, be it the RC4, RSA,
15183  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15184  * included with this distribution is covered by the same copyright terms
15185  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15186  *
15187  * Copyright remains Eric Young's, and as such any Copyright notices in
15188  * the code are not to be removed.
15189  * If this package is used in a product, Eric Young should be given attribution
15190  * as the author of the parts of the library used.
15191  * This can be in the form of a textual message at program startup or
15192  * in documentation (online or textual) provided with the package.
15193  *
15194  * Redistribution and use in source and binary forms, with or without
15195  * modification, are permitted provided that the following conditions
15196  * are met:
15197  * 1. Redistributions of source code must retain the copyright
15198  *    notice, this list of conditions and the following disclaimer.
15199  * 2. Redistributions in binary form must reproduce the above copyright
15200  *    notice, this list of conditions and the following disclaimer in the
15201  *    documentation and/or other materials provided with the distribution.
15202  * 3. All advertising materials mentioning features or use of this software
15203  *    must display the following acknowledgement:
15204  *    "This product includes cryptographic software written by
15205  *     Eric Young (eay@cryptsoft.com)"
15206  *    The word 'cryptographic' can be left out if the rouines from the library
15207  *    being used are not cryptographic related :-).
15208  * 4. If you include any Windows specific code (or a derivative thereof) from
15209  *    the apps directory (application code) you must include an acknowledgement:
15210  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15211  *
15212  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15213  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15214  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15215  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15216  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15217  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15218  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15219  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15220  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15221  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15222  * SUCH DAMAGE.
15223  *
15224  * The licence and distribution terms for any publically available version or
15225  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15226  * copied and put under another distribution licence
15227  * [including the GNU Public Licence.]
15228  */
15229 # 79 "/usr/include/openssl/x509.h" 2 3 4
15230 # 1 "/usr/include/openssl/asn1.h" 1 3 4
15231 /* crypto/asn1/asn1.h */
15232 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15233  * All rights reserved.
15234  *
15235  * This package is an SSL implementation written
15236  * by Eric Young (eay@cryptsoft.com).
15237  * The implementation was written so as to conform with Netscapes SSL.
15238  *
15239  * This library is free for commercial and non-commercial use as long as
15240  * the following conditions are aheared to.  The following conditions
15241  * apply to all code found in this distribution, be it the RC4, RSA,
15242  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15243  * included with this distribution is covered by the same copyright terms
15244  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15245  *
15246  * Copyright remains Eric Young's, and as such any Copyright notices in
15247  * the code are not to be removed.
15248  * If this package is used in a product, Eric Young should be given attribution
15249  * as the author of the parts of the library used.
15250  * This can be in the form of a textual message at program startup or
15251  * in documentation (online or textual) provided with the package.
15252  *
15253  * Redistribution and use in source and binary forms, with or without
15254  * modification, are permitted provided that the following conditions
15255  * are met:
15256  * 1. Redistributions of source code must retain the copyright
15257  *    notice, this list of conditions and the following disclaimer.
15258  * 2. Redistributions in binary form must reproduce the above copyright
15259  *    notice, this list of conditions and the following disclaimer in the
15260  *    documentation and/or other materials provided with the distribution.
15261  * 3. All advertising materials mentioning features or use of this software
15262  *    must display the following acknowledgement:
15263  *    "This product includes cryptographic software written by
15264  *     Eric Young (eay@cryptsoft.com)"
15265  *    The word 'cryptographic' can be left out if the rouines from the library
15266  *    being used are not cryptographic related :-).
15267  * 4. If you include any Windows specific code (or a derivative thereof) from
15268  *    the apps directory (application code) you must include an acknowledgement:
15269  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15270  *
15271  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15272  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15273  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15274  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15275  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15276  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15277  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15278  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15279  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15280  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15281  * SUCH DAMAGE.
15282  *
15283  * The licence and distribution terms for any publically available version or
15284  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15285  * copied and put under another distribution licence
15286  * [including the GNU Public Licence.]
15287  */
15288 # 80 "/usr/include/openssl/x509.h" 2 3 4
15289 # 1 "/usr/include/openssl/safestack.h" 1 3 4
15290 /* ====================================================================
15291  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
15292  *
15293  * Redistribution and use in source and binary forms, with or without
15294  * modification, are permitted provided that the following conditions
15295  * are met:
15296  *
15297  * 1. Redistributions of source code must retain the above copyright
15298  *    notice, this list of conditions and the following disclaimer.
15299  *
15300  * 2. Redistributions in binary form must reproduce the above copyright
15301  *    notice, this list of conditions and the following disclaimer in
15302  *    the documentation and/or other materials provided with the
15303  *    distribution.
15304  *
15305  * 3. All advertising materials mentioning features or use of this
15306  *    software must display the following acknowledgment:
15307  *    "This product includes software developed by the OpenSSL Project
15308  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15309  *
15310  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15311  *    endorse or promote products derived from this software without
15312  *    prior written permission. For written permission, please contact
15313  *    openssl-core@openssl.org.
15314  *
15315  * 5. Products derived from this software may not be called "OpenSSL"
15316  *    nor may "OpenSSL" appear in their names without prior written
15317  *    permission of the OpenSSL Project.
15318  *
15319  * 6. Redistributions of any form whatsoever must retain the following
15320  *    acknowledgment:
15321  *    "This product includes software developed by the OpenSSL Project
15322  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15323  *
15324  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15325  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15326  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15327  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15328  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15329  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15330  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15331  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15332  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15333  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15334  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15335  * OF THE POSSIBILITY OF SUCH DAMAGE.
15336  * ====================================================================
15337  *
15338  * This product includes cryptographic software written by Eric Young
15339  * (eay@cryptsoft.com).  This product includes software written by Tim
15340  * Hudson (tjh@cryptsoft.com).
15341  *
15342  */
15343 # 81 "/usr/include/openssl/x509.h" 2 3 4
15344 
15345 
15346 # 1 "/usr/include/openssl/ec.h" 1 3 4
15347 /* crypto/ec/ec.h */
15348 /*
15349  * Originally written by Bodo Moeller for the OpenSSL project.
15350  */
15351 /**
15352  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
15353  * \author Originally written by Bodo Moeller for the OpenSSL project
15354  */
15355 /* ====================================================================
15356  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
15357  *
15358  * Redistribution and use in source and binary forms, with or without
15359  * modification, are permitted provided that the following conditions
15360  * are met:
15361  *
15362  * 1. Redistributions of source code must retain the above copyright
15363  *    notice, this list of conditions and the following disclaimer.
15364  *
15365  * 2. Redistributions in binary form must reproduce the above copyright
15366  *    notice, this list of conditions and the following disclaimer in
15367  *    the documentation and/or other materials provided with the
15368  *    distribution.
15369  *
15370  * 3. All advertising materials mentioning features or use of this
15371  *    software must display the following acknowledgment:
15372  *    "This product includes software developed by the OpenSSL Project
15373  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15374  *
15375  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15376  *    endorse or promote products derived from this software without
15377  *    prior written permission. For written permission, please contact
15378  *    openssl-core@openssl.org.
15379  *
15380  * 5. Products derived from this software may not be called "OpenSSL"
15381  *    nor may "OpenSSL" appear in their names without prior written
15382  *    permission of the OpenSSL Project.
15383  *
15384  * 6. Redistributions of any form whatsoever must retain the following
15385  *    acknowledgment:
15386  *    "This product includes software developed by the OpenSSL Project
15387  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15388  *
15389  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15390  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15391  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15392  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15393  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15394  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15395  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15396  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15397  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15398  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15399  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15400  * OF THE POSSIBILITY OF SUCH DAMAGE.
15401  * ====================================================================
15402  *
15403  * This product includes cryptographic software written by Eric Young
15404  * (eay@cryptsoft.com).  This product includes software written by Tim
15405  * Hudson (tjh@cryptsoft.com).
15406  *
15407  */
15408 /* ====================================================================
15409  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15410  *
15411  * Portions of the attached software ("Contribution") are developed by
15412  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15413  *
15414  * The Contribution is licensed pursuant to the OpenSSL open source
15415  * license provided above.
15416  *
15417  * The elliptic curve binary polynomial software is originally written by
15418  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15419  *
15420  */
15421 
15422 
15423 
15424 
15425 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
15426 /* opensslconf.h */
15427 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
15428 
15429 
15430 
15431 
15432 /* OpenSSL was configured with the following options: */
15433 # 108 "/usr/include/openssl/opensslconf.h" 3 4
15434 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
15435    asks for it.  This is a transient feature that is provided for those
15436    who haven't had the time to do the appropriate changes in their
15437    applications.  */
15438 # 204 "/usr/include/openssl/opensslconf.h" 3 4
15439 /* crypto/opensslconf.h.in */
15440 
15441 /* Generate 80386 code? */
15442 # 80 "/usr/include/openssl/ec.h" 2 3 4
15443 
15444 
15445 
15446 
15447 
15448 # 1 "/usr/include/openssl/asn1.h" 1 3 4
15449 /* crypto/asn1/asn1.h */
15450 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15451  * All rights reserved.
15452  *
15453  * This package is an SSL implementation written
15454  * by Eric Young (eay@cryptsoft.com).
15455  * The implementation was written so as to conform with Netscapes SSL.
15456  *
15457  * This library is free for commercial and non-commercial use as long as
15458  * the following conditions are aheared to.  The following conditions
15459  * apply to all code found in this distribution, be it the RC4, RSA,
15460  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15461  * included with this distribution is covered by the same copyright terms
15462  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15463  *
15464  * Copyright remains Eric Young's, and as such any Copyright notices in
15465  * the code are not to be removed.
15466  * If this package is used in a product, Eric Young should be given attribution
15467  * as the author of the parts of the library used.
15468  * This can be in the form of a textual message at program startup or
15469  * in documentation (online or textual) provided with the package.
15470  *
15471  * Redistribution and use in source and binary forms, with or without
15472  * modification, are permitted provided that the following conditions
15473  * are met:
15474  * 1. Redistributions of source code must retain the copyright
15475  *    notice, this list of conditions and the following disclaimer.
15476  * 2. Redistributions in binary form must reproduce the above copyright
15477  *    notice, this list of conditions and the following disclaimer in the
15478  *    documentation and/or other materials provided with the distribution.
15479  * 3. All advertising materials mentioning features or use of this software
15480  *    must display the following acknowledgement:
15481  *    "This product includes cryptographic software written by
15482  *     Eric Young (eay@cryptsoft.com)"
15483  *    The word 'cryptographic' can be left out if the rouines from the library
15484  *    being used are not cryptographic related :-).
15485  * 4. If you include any Windows specific code (or a derivative thereof) from
15486  *    the apps directory (application code) you must include an acknowledgement:
15487  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15488  *
15489  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15490  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15491  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15492  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15493  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15494  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15495  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15496  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15497  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15498  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15499  * SUCH DAMAGE.
15500  *
15501  * The licence and distribution terms for any publically available version or
15502  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15503  * copied and put under another distribution licence
15504  * [including the GNU Public Licence.]
15505  */
15506 # 86 "/usr/include/openssl/ec.h" 2 3 4
15507 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
15508 /* ====================================================================
15509  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
15510  *
15511  * Redistribution and use in source and binary forms, with or without
15512  * modification, are permitted provided that the following conditions
15513  * are met:
15514  *
15515  * 1. Redistributions of source code must retain the above copyright
15516  *    notice, this list of conditions and the following disclaimer.
15517  *
15518  * 2. Redistributions in binary form must reproduce the above copyright
15519  *    notice, this list of conditions and the following disclaimer in
15520  *    the documentation and/or other materials provided with the
15521  *    distribution.
15522  *
15523  * 3. All advertising materials mentioning features or use of this
15524  *    software must display the following acknowledgment:
15525  *    "This product includes software developed by the OpenSSL Project
15526  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15527  *
15528  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15529  *    endorse or promote products derived from this software without
15530  *    prior written permission. For written permission, please contact
15531  *    openssl-core@openssl.org.
15532  *
15533  * 5. Products derived from this software may not be called "OpenSSL"
15534  *    nor may "OpenSSL" appear in their names without prior written
15535  *    permission of the OpenSSL Project.
15536  *
15537  * 6. Redistributions of any form whatsoever must retain the following
15538  *    acknowledgment:
15539  *    "This product includes software developed by the OpenSSL Project
15540  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15541  *
15542  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15543  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15544  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15545  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15546  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15547  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15548  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15549  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15550  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15551  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15552  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15553  * OF THE POSSIBILITY OF SUCH DAMAGE.
15554  * ====================================================================
15555  *
15556  * This product includes cryptographic software written by Eric Young
15557  * (eay@cryptsoft.com).  This product includes software written by Tim
15558  * Hudson (tjh@cryptsoft.com).
15559  *
15560  */
15561 # 87 "/usr/include/openssl/ec.h" 2 3 4
15562 
15563 # 1 "/usr/include/openssl/bn.h" 1 3 4
15564 /* crypto/bn/bn.h */
15565 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
15566  * All rights reserved.
15567  *
15568  * This package is an SSL implementation written
15569  * by Eric Young (eay@cryptsoft.com).
15570  * The implementation was written so as to conform with Netscapes SSL.
15571  *
15572  * This library is free for commercial and non-commercial use as long as
15573  * the following conditions are aheared to.  The following conditions
15574  * apply to all code found in this distribution, be it the RC4, RSA,
15575  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15576  * included with this distribution is covered by the same copyright terms
15577  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15578  *
15579  * Copyright remains Eric Young's, and as such any Copyright notices in
15580  * the code are not to be removed.
15581  * If this package is used in a product, Eric Young should be given attribution
15582  * as the author of the parts of the library used.
15583  * This can be in the form of a textual message at program startup or
15584  * in documentation (online or textual) provided with the package.
15585  *
15586  * Redistribution and use in source and binary forms, with or without
15587  * modification, are permitted provided that the following conditions
15588  * are met:
15589  * 1. Redistributions of source code must retain the copyright
15590  *    notice, this list of conditions and the following disclaimer.
15591  * 2. Redistributions in binary form must reproduce the above copyright
15592  *    notice, this list of conditions and the following disclaimer in the
15593  *    documentation and/or other materials provided with the distribution.
15594  * 3. All advertising materials mentioning features or use of this software
15595  *    must display the following acknowledgement:
15596  *    "This product includes cryptographic software written by
15597  *     Eric Young (eay@cryptsoft.com)"
15598  *    The word 'cryptographic' can be left out if the rouines from the library
15599  *    being used are not cryptographic related :-).
15600  * 4. If you include any Windows specific code (or a derivative thereof) from
15601  *    the apps directory (application code) you must include an acknowledgement:
15602  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15603  *
15604  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15605  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15606  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15607  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15608  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15609  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15610  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15611  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15612  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15613  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15614  * SUCH DAMAGE.
15615  *
15616  * The licence and distribution terms for any publically available version or
15617  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15618  * copied and put under another distribution licence
15619  * [including the GNU Public Licence.]
15620  */
15621 /* ====================================================================
15622  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
15623  *
15624  * Redistribution and use in source and binary forms, with or without
15625  * modification, are permitted provided that the following conditions
15626  * are met:
15627  *
15628  * 1. Redistributions of source code must retain the above copyright
15629  *    notice, this list of conditions and the following disclaimer.
15630  *
15631  * 2. Redistributions in binary form must reproduce the above copyright
15632  *    notice, this list of conditions and the following disclaimer in
15633  *    the documentation and/or other materials provided with the
15634  *    distribution.
15635  *
15636  * 3. All advertising materials mentioning features or use of this
15637  *    software must display the following acknowledgment:
15638  *    "This product includes software developed by the OpenSSL Project
15639  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15640  *
15641  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15642  *    endorse or promote products derived from this software without
15643  *    prior written permission. For written permission, please contact
15644  *    openssl-core@openssl.org.
15645  *
15646  * 5. Products derived from this software may not be called "OpenSSL"
15647  *    nor may "OpenSSL" appear in their names without prior written
15648  *    permission of the OpenSSL Project.
15649  *
15650  * 6. Redistributions of any form whatsoever must retain the following
15651  *    acknowledgment:
15652  *    "This product includes software developed by the OpenSSL Project
15653  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15654  *
15655  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15656  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15657  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15658  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15659  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15660  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15661  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15662  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15663  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15664  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15665  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15666  * OF THE POSSIBILITY OF SUCH DAMAGE.
15667  * ====================================================================
15668  *
15669  * This product includes cryptographic software written by Eric Young
15670  * (eay@cryptsoft.com).  This product includes software written by Tim
15671  * Hudson (tjh@cryptsoft.com).
15672  *
15673  */
15674 /* ====================================================================
15675  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15676  *
15677  * Portions of the attached software ("Contribution") are developed by
15678  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15679  *
15680  * The Contribution is licensed pursuant to the Eric Young open source
15681  * license provided above.
15682  *
15683  * The binary polynomial arithmetic software is originally written by
15684  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15685  *
15686  */
15687 # 89 "/usr/include/openssl/ec.h" 2 3 4
15688 # 103 "/usr/include/openssl/ec.h" 3 4
15689 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
15690  *  for the encoding of a elliptic curve point (x,y) */
15691 typedef enum {
15692         /** the point is encoded as z||x, where the octet z specifies
15693          *  which solution of the quadratic equation y is  */
15694     POINT_CONVERSION_COMPRESSED = 2,
15695         /** the point is encoded as z||x||y, where z is the octet 0x04  */
15696     POINT_CONVERSION_UNCOMPRESSED = 4,
15697         /** the point is encoded as z||x||y, where the octet z specifies
15698          *  which solution of the quadratic equation y is  */
15699     POINT_CONVERSION_HYBRID = 6
15700 } point_conversion_form_t;
15701 
15702 typedef struct ec_method_st EC_METHOD;
15703 
15704 typedef struct ec_group_st
15705     /*-
15706      EC_METHOD *meth;
15707      -- field definition
15708      -- curve coefficients
15709      -- optional generator with associated information (order, cofactor)
15710      -- optional extra data (precomputed table for fast computation of multiples of generator)
15711      -- ASN1 stuff
15712     */
15713     EC_GROUP;
15714 
15715 typedef struct ec_point_st EC_POINT;
15716 
15717 /********************************************************************/
15718 /*               EC_METHODs for curves over GF(p)                   */
15719 /********************************************************************/
15720 
15721 /** Returns the basic GFp ec methods which provides the basis for the
15722  *  optimized methods.
15723  *  \return  EC_METHOD object
15724  */
15725 const EC_METHOD *EC_GFp_simple_method(void);
15726 
15727 /** Returns GFp methods using montgomery multiplication.
15728  *  \return  EC_METHOD object
15729  */
15730 const EC_METHOD *EC_GFp_mont_method(void);
15731 
15732 /** Returns GFp methods using optimized methods for NIST recommended curves
15733  *  \return  EC_METHOD object
15734  */
15735 const EC_METHOD *EC_GFp_nist_method(void);
15736 # 169 "/usr/include/openssl/ec.h" 3 4
15737 /********************************************************************/
15738 /*           EC_METHOD for curves over GF(2^m)                      */
15739 /********************************************************************/
15740 
15741 /** Returns the basic GF2m ec method
15742  *  \return  EC_METHOD object
15743  */
15744 const EC_METHOD *EC_GF2m_simple_method(void);
15745 
15746 
15747 
15748 /********************************************************************/
15749 /*                   EC_GROUP functions                             */
15750 /********************************************************************/
15751 
15752 /** Creates a new EC_GROUP object
15753  *  \param   meth  EC_METHOD to use
15754  *  \return  newly created EC_GROUP object or NULL in case of an error.
15755  */
15756 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
15757 
15758 /** Frees a EC_GROUP object
15759  *  \param  group  EC_GROUP object to be freed.
15760  */
15761 void EC_GROUP_free(EC_GROUP *group);
15762 
15763 /** Clears and frees a EC_GROUP object
15764  *  \param  group  EC_GROUP object to be cleared and freed.
15765  */
15766 void EC_GROUP_clear_free(EC_GROUP *group);
15767 
15768 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
15769  *  \param  dst  destination EC_GROUP object
15770  *  \param  src  source EC_GROUP object
15771  *  \return 1 on success and 0 if an error occurred.
15772  */
15773 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
15774 
15775 /** Creates a new EC_GROUP object and copies the copies the content
15776  *  form src to the newly created EC_KEY object
15777  *  \param  src  source EC_GROUP object
15778  *  \return newly created EC_GROUP object or NULL in case of an error.
15779  */
15780 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
15781 
15782 /** Returns the EC_METHOD of the EC_GROUP object.
15783  *  \param  group  EC_GROUP object
15784  *  \return EC_METHOD used in this EC_GROUP object.
15785  */
15786 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
15787 
15788 /** Returns the field type of the EC_METHOD.
15789  *  \param  meth  EC_METHOD object
15790  *  \return NID of the underlying field type OID.
15791  */
15792 int EC_METHOD_get_field_type(const EC_METHOD *meth);
15793 
15794 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
15795  *  \param  group      EC_GROUP object
15796  *  \param  generator  EC_POINT object with the generator.
15797  *  \param  order      the order of the group generated by the generator.
15798  *  \param  cofactor   the index of the sub-group generated by the generator
15799  *                     in the group of all points on the elliptic curve.
15800  *  \return 1 on success and 0 if an error occured
15801  */
15802 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
15803                            const BIGNUM *order, const BIGNUM *cofactor);
15804 
15805 /** Returns the generator of a EC_GROUP object.
15806  *  \param  group  EC_GROUP object
15807  *  \return the currently used generator (possibly NULL).
15808  */
15809 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
15810 
15811 /** Returns the montgomery data for order(Generator)
15812  *  \param  group  EC_GROUP object
15813  *  \return the currently used generator (possibly NULL).
15814 */
15815 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
15816 
15817 /** Gets the order of a EC_GROUP
15818  *  \param  group  EC_GROUP object
15819  *  \param  order  BIGNUM to which the order is copied
15820  *  \param  ctx    BN_CTX object (optional)
15821  *  \return 1 on success and 0 if an error occured
15822  */
15823 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
15824 
15825 /** Gets the cofactor of a EC_GROUP
15826  *  \param  group     EC_GROUP object
15827  *  \param  cofactor  BIGNUM to which the cofactor is copied
15828  *  \param  ctx       BN_CTX object (optional)
15829  *  \return 1 on success and 0 if an error occured
15830  */
15831 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
15832                           BN_CTX *ctx);
15833 
15834 /** Sets the name of a EC_GROUP object
15835  *  \param  group  EC_GROUP object
15836  *  \param  nid    NID of the curve name OID
15837  */
15838 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
15839 
15840 /** Returns the curve name of a EC_GROUP object
15841  *  \param  group  EC_GROUP object
15842  *  \return NID of the curve name OID or 0 if not set.
15843  */
15844 int EC_GROUP_get_curve_name(const EC_GROUP *group);
15845 
15846 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
15847 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
15848 
15849 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
15850                                         point_conversion_form_t form);
15851 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
15852 
15853 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
15854 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
15855 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
15856 
15857 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
15858  *  \param  group  EC_GROUP object
15859  *  \param  p      BIGNUM with the prime number
15860  *  \param  a      BIGNUM with parameter a of the equation
15861  *  \param  b      BIGNUM with parameter b of the equation
15862  *  \param  ctx    BN_CTX object (optional)
15863  *  \return 1 on success and 0 if an error occured
15864  */
15865 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
15866                            const BIGNUM *b, BN_CTX *ctx);
15867 
15868 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
15869  *  \param  group  EC_GROUP object
15870  *  \param  p      BIGNUM for the prime number
15871  *  \param  a      BIGNUM for parameter a of the equation
15872  *  \param  b      BIGNUM for parameter b of the equation
15873  *  \param  ctx    BN_CTX object (optional)
15874  *  \return 1 on success and 0 if an error occured
15875  */
15876 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
15877                            BIGNUM *b, BN_CTX *ctx);
15878 
15879 
15880 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
15881  *  \param  group  EC_GROUP object
15882  *  \param  p      BIGNUM with the polynomial defining the underlying field
15883  *  \param  a      BIGNUM with parameter a of the equation
15884  *  \param  b      BIGNUM with parameter b of the equation
15885  *  \param  ctx    BN_CTX object (optional)
15886  *  \return 1 on success and 0 if an error occured
15887  */
15888 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
15889                             const BIGNUM *b, BN_CTX *ctx);
15890 
15891 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
15892  *  \param  group  EC_GROUP object
15893  *  \param  p      BIGNUM for the polynomial defining the underlying field
15894  *  \param  a      BIGNUM for parameter a of the equation
15895  *  \param  b      BIGNUM for parameter b of the equation
15896  *  \param  ctx    BN_CTX object (optional)
15897  *  \return 1 on success and 0 if an error occured
15898  */
15899 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
15900                             BIGNUM *b, BN_CTX *ctx);
15901 
15902 /** Returns the number of bits needed to represent a field element
15903  *  \param  group  EC_GROUP object
15904  *  \return number of bits needed to represent a field element
15905  */
15906 int EC_GROUP_get_degree(const EC_GROUP *group);
15907 
15908 /** Checks whether the parameter in the EC_GROUP define a valid ec group
15909  *  \param  group  EC_GROUP object
15910  *  \param  ctx    BN_CTX object (optional)
15911  *  \return 1 if group is a valid ec group and 0 otherwise
15912  */
15913 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
15914 
15915 /** Checks whether the discriminant of the elliptic curve is zero or not
15916  *  \param  group  EC_GROUP object
15917  *  \param  ctx    BN_CTX object (optional)
15918  *  \return 1 if the discriminant is not zero and 0 otherwise
15919  */
15920 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
15921 
15922 /** Compares two EC_GROUP objects
15923  *  \param  a    first EC_GROUP object
15924  *  \param  b    second EC_GROUP object
15925  *  \param  ctx  BN_CTX object (optional)
15926  *  \return 0 if both groups are equal and 1 otherwise
15927  */
15928 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
15929 
15930 /*
15931  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
15932  * choosing an appropriate EC_METHOD
15933  */
15934 
15935 /** Creates a new EC_GROUP object with the specified parameters defined
15936  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
15937  *  \param  p    BIGNUM with the prime number
15938  *  \param  a    BIGNUM with the parameter a of the equation
15939  *  \param  b    BIGNUM with the parameter b of the equation
15940  *  \param  ctx  BN_CTX object (optional)
15941  *  \return newly created EC_GROUP object with the specified parameters
15942  */
15943 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
15944                                  const BIGNUM *b, BN_CTX *ctx);
15945 
15946 /** Creates a new EC_GROUP object with the specified parameters defined
15947  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
15948  *  \param  p    BIGNUM with the polynomial defining the underlying field
15949  *  \param  a    BIGNUM with the parameter a of the equation
15950  *  \param  b    BIGNUM with the parameter b of the equation
15951  *  \param  ctx  BN_CTX object (optional)
15952  *  \return newly created EC_GROUP object with the specified parameters
15953  */
15954 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
15955                                   const BIGNUM *b, BN_CTX *ctx);
15956 
15957 /** Creates a EC_GROUP object with a curve specified by a NID
15958  *  \param  nid  NID of the OID of the curve name
15959  *  \return newly created EC_GROUP object with specified curve or NULL
15960  *          if an error occurred
15961  */
15962 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
15963 
15964 /********************************************************************/
15965 /*               handling of internal curves                        */
15966 /********************************************************************/
15967 
15968 typedef struct {
15969     int nid;
15970     const char *comment;
15971 } EC_builtin_curve;
15972 
15973 /*
15974  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
15975  * available curves or zero if a error occurred. In case r ist not zero
15976  * nitems EC_builtin_curve structures are filled with the data of the first
15977  * nitems internal groups
15978  */
15979 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
15980 
15981 const char *EC_curve_nid2nist(int nid);
15982 int EC_curve_nist2nid(const char *name);
15983 
15984 /********************************************************************/
15985 /*                    EC_POINT functions                            */
15986 /********************************************************************/
15987 
15988 /** Creates a new EC_POINT object for the specified EC_GROUP
15989  *  \param  group  EC_GROUP the underlying EC_GROUP object
15990  *  \return newly created EC_POINT object or NULL if an error occurred
15991  */
15992 EC_POINT *EC_POINT_new(const EC_GROUP *group);
15993 
15994 /** Frees a EC_POINT object
15995  *  \param  point  EC_POINT object to be freed
15996  */
15997 void EC_POINT_free(EC_POINT *point);
15998 
15999 /** Clears and frees a EC_POINT object
16000  *  \param  point  EC_POINT object to be cleared and freed
16001  */
16002 void EC_POINT_clear_free(EC_POINT *point);
16003 
16004 /** Copies EC_POINT object
16005  *  \param  dst  destination EC_POINT object
16006  *  \param  src  source EC_POINT object
16007  *  \return 1 on success and 0 if an error occured
16008  */
16009 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
16010 
16011 /** Creates a new EC_POINT object and copies the content of the supplied
16012  *  EC_POINT
16013  *  \param  src    source EC_POINT object
16014  *  \param  group  underlying the EC_GROUP object
16015  *  \return newly created EC_POINT object or NULL if an error occurred
16016  */
16017 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
16018 
16019 /** Returns the EC_METHOD used in EC_POINT object
16020  *  \param  point  EC_POINT object
16021  *  \return the EC_METHOD used
16022  */
16023 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
16024 
16025 /** Sets a point to infinity (neutral element)
16026  *  \param  group  underlying EC_GROUP object
16027  *  \param  point  EC_POINT to set to infinity
16028  *  \return 1 on success and 0 if an error occured
16029  */
16030 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
16031 
16032 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
16033  *  \param  group  underlying EC_GROUP object
16034  *  \param  p      EC_POINT object
16035  *  \param  x      BIGNUM with the x-coordinate
16036  *  \param  y      BIGNUM with the y-coordinate
16037  *  \param  z      BIGNUM with the z-coordinate
16038  *  \param  ctx    BN_CTX object (optional)
16039  *  \return 1 on success and 0 if an error occured
16040  */
16041 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
16042                                              EC_POINT *p, const BIGNUM *x,
16043                                              const BIGNUM *y, const BIGNUM *z,
16044                                              BN_CTX *ctx);
16045 
16046 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
16047  *  \param  group  underlying EC_GROUP object
16048  *  \param  p      EC_POINT object
16049  *  \param  x      BIGNUM for the x-coordinate
16050  *  \param  y      BIGNUM for the y-coordinate
16051  *  \param  z      BIGNUM for the z-coordinate
16052  *  \param  ctx    BN_CTX object (optional)
16053  *  \return 1 on success and 0 if an error occured
16054  */
16055 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
16056                                              const EC_POINT *p, BIGNUM *x,
16057                                              BIGNUM *y, BIGNUM *z,
16058                                              BN_CTX *ctx);
16059 
16060 /** Sets the affine coordinates of a EC_POINT over GFp
16061  *  \param  group  underlying EC_GROUP object
16062  *  \param  p      EC_POINT object
16063  *  \param  x      BIGNUM with the x-coordinate
16064  *  \param  y      BIGNUM with the y-coordinate
16065  *  \param  ctx    BN_CTX object (optional)
16066  *  \return 1 on success and 0 if an error occured
16067  */
16068 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
16069                                         const BIGNUM *x, const BIGNUM *y,
16070                                         BN_CTX *ctx);
16071 
16072 /** Gets the affine coordinates of a EC_POINT over GFp
16073  *  \param  group  underlying EC_GROUP object
16074  *  \param  p      EC_POINT object
16075  *  \param  x      BIGNUM for the x-coordinate
16076  *  \param  y      BIGNUM for the y-coordinate
16077  *  \param  ctx    BN_CTX object (optional)
16078  *  \return 1 on success and 0 if an error occured
16079  */
16080 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
16081                                         const EC_POINT *p, BIGNUM *x,
16082                                         BIGNUM *y, BN_CTX *ctx);
16083 
16084 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
16085  *  \param  group  underlying EC_GROUP object
16086  *  \param  p      EC_POINT object
16087  *  \param  x      BIGNUM with x-coordinate
16088  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
16089  *  \param  ctx    BN_CTX object (optional)
16090  *  \return 1 on success and 0 if an error occured
16091  */
16092 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
16093                                             EC_POINT *p, const BIGNUM *x,
16094                                             int y_bit, BN_CTX *ctx);
16095 
16096 /** Sets the affine coordinates of a EC_POINT over GF2m
16097  *  \param  group  underlying EC_GROUP object
16098  *  \param  p      EC_POINT object
16099  *  \param  x      BIGNUM with the x-coordinate
16100  *  \param  y      BIGNUM with the y-coordinate
16101  *  \param  ctx    BN_CTX object (optional)
16102  *  \return 1 on success and 0 if an error occured
16103  */
16104 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
16105                                          const BIGNUM *x, const BIGNUM *y,
16106                                          BN_CTX *ctx);
16107 
16108 /** Gets the affine coordinates of a EC_POINT over GF2m
16109  *  \param  group  underlying EC_GROUP object
16110  *  \param  p      EC_POINT object
16111  *  \param  x      BIGNUM for the x-coordinate
16112  *  \param  y      BIGNUM for the y-coordinate
16113  *  \param  ctx    BN_CTX object (optional)
16114  *  \return 1 on success and 0 if an error occured
16115  */
16116 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
16117                                          const EC_POINT *p, BIGNUM *x,
16118                                          BIGNUM *y, BN_CTX *ctx);
16119 
16120 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
16121  *  \param  group  underlying EC_GROUP object
16122  *  \param  p      EC_POINT object
16123  *  \param  x      BIGNUM with x-coordinate
16124  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
16125  *  \param  ctx    BN_CTX object (optional)
16126  *  \return 1 on success and 0 if an error occured
16127  */
16128 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
16129                                              EC_POINT *p, const BIGNUM *x,
16130                                              int y_bit, BN_CTX *ctx);
16131 
16132 /** Encodes a EC_POINT object to a octet string
16133  *  \param  group  underlying EC_GROUP object
16134  *  \param  p      EC_POINT object
16135  *  \param  form   point conversion form
16136  *  \param  buf    memory buffer for the result. If NULL the function returns
16137  *                 required buffer size.
16138  *  \param  len    length of the memory buffer
16139  *  \param  ctx    BN_CTX object (optional)
16140  *  \return the length of the encoded octet string or 0 if an error occurred
16141  */
16142 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
16143                           point_conversion_form_t form,
16144                           unsigned char *buf, size_t len, BN_CTX *ctx);
16145 
16146 /** Decodes a EC_POINT from a octet string
16147  *  \param  group  underlying EC_GROUP object
16148  *  \param  p      EC_POINT object
16149  *  \param  buf    memory buffer with the encoded ec point
16150  *  \param  len    length of the encoded ec point
16151  *  \param  ctx    BN_CTX object (optional)
16152  *  \return 1 on success and 0 if an error occured
16153  */
16154 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
16155                        const unsigned char *buf, size_t len, BN_CTX *ctx);
16156 
16157 /* other interfaces to point2oct/oct2point: */
16158 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
16159                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
16160 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
16161                             EC_POINT *, BN_CTX *);
16162 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
16163                          point_conversion_form_t form, BN_CTX *);
16164 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
16165                              EC_POINT *, BN_CTX *);
16166 
16167 /********************************************************************/
16168 /*         functions for doing EC_POINT arithmetic                  */
16169 /********************************************************************/
16170 
16171 /** Computes the sum of two EC_POINT
16172  *  \param  group  underlying EC_GROUP object
16173  *  \param  r      EC_POINT object for the result (r = a + b)
16174  *  \param  a      EC_POINT object with the first summand
16175  *  \param  b      EC_POINT object with the second summand
16176  *  \param  ctx    BN_CTX object (optional)
16177  *  \return 1 on success and 0 if an error occured
16178  */
16179 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
16180                  const EC_POINT *b, BN_CTX *ctx);
16181 
16182 /** Computes the double of a EC_POINT
16183  *  \param  group  underlying EC_GROUP object
16184  *  \param  r      EC_POINT object for the result (r = 2 * a)
16185  *  \param  a      EC_POINT object
16186  *  \param  ctx    BN_CTX object (optional)
16187  *  \return 1 on success and 0 if an error occured
16188  */
16189 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
16190                  BN_CTX *ctx);
16191 
16192 /** Computes the inverse of a EC_POINT
16193  *  \param  group  underlying EC_GROUP object
16194  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
16195  *  \param  ctx    BN_CTX object (optional)
16196  *  \return 1 on success and 0 if an error occured
16197  */
16198 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
16199 
16200 /** Checks whether the point is the neutral element of the group
16201  *  \param  group  the underlying EC_GROUP object
16202  *  \param  p      EC_POINT object
16203  *  \return 1 if the point is the neutral element and 0 otherwise
16204  */
16205 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
16206 
16207 /** Checks whether the point is on the curve
16208  *  \param  group  underlying EC_GROUP object
16209  *  \param  point  EC_POINT object to check
16210  *  \param  ctx    BN_CTX object (optional)
16211  *  \return 1 if point if on the curve and 0 otherwise
16212  */
16213 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
16214                          BN_CTX *ctx);
16215 
16216 /** Compares two EC_POINTs
16217  *  \param  group  underlying EC_GROUP object
16218  *  \param  a      first EC_POINT object
16219  *  \param  b      second EC_POINT object
16220  *  \param  ctx    BN_CTX object (optional)
16221  *  \return 0 if both points are equal and a value != 0 otherwise
16222  */
16223 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
16224                  BN_CTX *ctx);
16225 
16226 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
16227 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
16228                           EC_POINT *points[], BN_CTX *ctx);
16229 
16230 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
16231  *  \param  group  underlying EC_GROUP object
16232  *  \param  r      EC_POINT object for the result
16233  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
16234  *  \param  num    number futher summands
16235  *  \param  p      array of size num of EC_POINT objects
16236  *  \param  m      array of size num of BIGNUM objects
16237  *  \param  ctx    BN_CTX object (optional)
16238  *  \return 1 on success and 0 if an error occured
16239  */
16240 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
16241                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
16242                   BN_CTX *ctx);
16243 
16244 /** Computes r = generator * n + q * m
16245  *  \param  group  underlying EC_GROUP object
16246  *  \param  r      EC_POINT object for the result
16247  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
16248  *  \param  q      EC_POINT object with the first factor of the second summand
16249  *  \param  m      BIGNUM with the second factor of the second summand
16250  *  \param  ctx    BN_CTX object (optional)
16251  *  \return 1 on success and 0 if an error occured
16252  */
16253 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
16254                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
16255 
16256 /** Stores multiples of generator for faster point multiplication
16257  *  \param  group  EC_GROUP object
16258  *  \param  ctx    BN_CTX object (optional)
16259  *  \return 1 on success and 0 if an error occured
16260  */
16261 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
16262 
16263 /** Reports whether a precomputation has been done
16264  *  \param  group  EC_GROUP object
16265  *  \return 1 if a pre-computation has been done and 0 otherwise
16266  */
16267 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
16268 
16269 /********************************************************************/
16270 /*                       ASN1 stuff                                 */
16271 /********************************************************************/
16272 
16273 /*
16274  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
16275  * represent the field elements
16276  */
16277 int EC_GROUP_get_basis_type(const EC_GROUP *);
16278 
16279 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
16280 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
16281                                    unsigned int *k2, unsigned int *k3);
16282 
16283 
16284 
16285 
16286 typedef struct ecpk_parameters_st ECPKPARAMETERS;
16287 
16288 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
16289 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
16290 # 731 "/usr/include/openssl/ec.h" 3 4
16291 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
16292 
16293 
16294 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
16295 
16296 
16297 /********************************************************************/
16298 /*                      EC_KEY functions                            */
16299 /********************************************************************/
16300 
16301 typedef struct ec_key_st EC_KEY;
16302 
16303 /* some values for the encoding_flag */
16304 
16305 
16306 
16307 /* some values for the flags field */
16308 
16309 
16310 
16311 /** Creates a new EC_KEY object.
16312  *  \return EC_KEY object or NULL if an error occurred.
16313  */
16314 EC_KEY *EC_KEY_new(void);
16315 
16316 int EC_KEY_get_flags(const EC_KEY *key);
16317 
16318 void EC_KEY_set_flags(EC_KEY *key, int flags);
16319 
16320 void EC_KEY_clear_flags(EC_KEY *key, int flags);
16321 
16322 /** Creates a new EC_KEY object using a named curve as underlying
16323  *  EC_GROUP object.
16324  *  \param  nid  NID of the named curve.
16325  *  \return EC_KEY object or NULL if an error occurred.
16326  */
16327 EC_KEY *EC_KEY_new_by_curve_name(int nid);
16328 
16329 /** Frees a EC_KEY object.
16330  *  \param  key  EC_KEY object to be freed.
16331  */
16332 void EC_KEY_free(EC_KEY *key);
16333 
16334 /** Copies a EC_KEY object.
16335  *  \param  dst  destination EC_KEY object
16336  *  \param  src  src EC_KEY object
16337  *  \return dst or NULL if an error occurred.
16338  */
16339 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
16340 
16341 /** Creates a new EC_KEY object and copies the content from src to it.
16342  *  \param  src  the source EC_KEY object
16343  *  \return newly created EC_KEY object or NULL if an error occurred.
16344  */
16345 EC_KEY *EC_KEY_dup(const EC_KEY *src);
16346 
16347 /** Increases the internal reference count of a EC_KEY object.
16348  *  \param  key  EC_KEY object
16349  *  \return 1 on success and 0 if an error occurred.
16350  */
16351 int EC_KEY_up_ref(EC_KEY *key);
16352 
16353 /** Returns the EC_GROUP object of a EC_KEY object
16354  *  \param  key  EC_KEY object
16355  *  \return the EC_GROUP object (possibly NULL).
16356  */
16357 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
16358 
16359 /** Sets the EC_GROUP of a EC_KEY object.
16360  *  \param  key    EC_KEY object
16361  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
16362  *                 object will use an own copy of the EC_GROUP).
16363  *  \return 1 on success and 0 if an error occurred.
16364  */
16365 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
16366 
16367 /** Returns the private key of a EC_KEY object.
16368  *  \param  key  EC_KEY object
16369  *  \return a BIGNUM with the private key (possibly NULL).
16370  */
16371 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
16372 
16373 /** Sets the private key of a EC_KEY object.
16374  *  \param  key  EC_KEY object
16375  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
16376  *               will use an own copy of the BIGNUM).
16377  *  \return 1 on success and 0 if an error occurred.
16378  */
16379 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
16380 
16381 /** Returns the public key of a EC_KEY object.
16382  *  \param  key  the EC_KEY object
16383  *  \return a EC_POINT object with the public key (possibly NULL)
16384  */
16385 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
16386 
16387 /** Sets the public key of a EC_KEY object.
16388  *  \param  key  EC_KEY object
16389  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
16390  *               will use an own copy of the EC_POINT object).
16391  *  \return 1 on success and 0 if an error occurred.
16392  */
16393 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
16394 
16395 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
16396 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
16397 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
16398 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
16399 /* functions to set/get method specific data  */
16400 void *EC_KEY_get_key_method_data(EC_KEY *key,
16401                                  void *(*dup_func) (void *),
16402                                  void (*free_func) (void *),
16403                                  void (*clear_free_func) (void *));
16404 /** Sets the key method data of an EC_KEY object, if none has yet been set.
16405  *  \param  key              EC_KEY object
16406  *  \param  data             opaque data to install.
16407  *  \param  dup_func         a function that duplicates |data|.
16408  *  \param  free_func        a function that frees |data|.
16409  *  \param  clear_free_func  a function that wipes and frees |data|.
16410  *  \return the previously set data pointer, or NULL if |data| was inserted.
16411  */
16412 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
16413                                     void *(*dup_func) (void *),
16414                                     void (*free_func) (void *),
16415                                     void (*clear_free_func) (void *));
16416 /* wrapper functions for the underlying EC_GROUP object */
16417 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
16418 
16419 /** Creates a table of pre-computed multiples of the generator to
16420  *  accelerate further EC_KEY operations.
16421  *  \param  key  EC_KEY object
16422  *  \param  ctx  BN_CTX object (optional)
16423  *  \return 1 on success and 0 if an error occurred.
16424  */
16425 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
16426 
16427 /** Creates a new ec private (and optional a new public) key.
16428  *  \param  key  EC_KEY object
16429  *  \return 1 on success and 0 if an error occurred.
16430  */
16431 int EC_KEY_generate_key(EC_KEY *key);
16432 
16433 /** Verifies that a private and/or public key is valid.
16434  *  \param  key  the EC_KEY object
16435  *  \return 1 on success and 0 otherwise.
16436  */
16437 int EC_KEY_check_key(const EC_KEY *key);
16438 
16439 /** Sets a public key from affine coordindates performing
16440  *  neccessary NIST PKV tests.
16441  *  \param  key  the EC_KEY object
16442  *  \param  x    public key x coordinate
16443  *  \param  y    public key y coordinate
16444  *  \return 1 on success and 0 otherwise.
16445  */
16446 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
16447                                              BIGNUM *y);
16448 
16449 /********************************************************************/
16450 /*        de- and encoding functions for SEC1 ECPrivateKey          */
16451 /********************************************************************/
16452 
16453 /** Decodes a private key from a memory buffer.
16454  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
16455  *  \param  in   pointer to memory with the DER encoded private key
16456  *  \param  len  length of the DER encoded private key
16457  *  \return the decoded private key or NULL if an error occurred.
16458  */
16459 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
16460 
16461 /** Encodes a private key object and stores the result in a buffer.
16462  *  \param  key  the EC_KEY object to encode
16463  *  \param  out  the buffer for the result (if NULL the function returns number
16464  *               of bytes needed).
16465  *  \return 1 on success and 0 if an error occurred.
16466  */
16467 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
16468 
16469 /********************************************************************/
16470 /*        de- and encoding functions for EC parameters              */
16471 /********************************************************************/
16472 
16473 /** Decodes ec parameter from a memory buffer.
16474  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
16475  *  \param  in   pointer to memory with the DER encoded ec parameters
16476  *  \param  len  length of the DER encoded ec parameters
16477  *  \return a EC_KEY object with the decoded parameters or NULL if an error
16478  *          occurred.
16479  */
16480 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
16481 
16482 /** Encodes ec parameter and stores the result in a buffer.
16483  *  \param  key  the EC_KEY object with ec paramters to encode
16484  *  \param  out  the buffer for the result (if NULL the function returns number
16485  *               of bytes needed).
16486  *  \return 1 on success and 0 if an error occurred.
16487  */
16488 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
16489 
16490 /********************************************************************/
16491 /*         de- and encoding functions for EC public key             */
16492 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
16493 /********************************************************************/
16494 
16495 /** Decodes a ec public key from a octet string.
16496  *  \param  key  a pointer to a EC_KEY object which should be used
16497  *  \param  in   memory buffer with the encoded public key
16498  *  \param  len  length of the encoded public key
16499  *  \return EC_KEY object with decoded public key or NULL if an error
16500  *          occurred.
16501  */
16502 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
16503 
16504 /** Encodes a ec public key in an octet string.
16505  *  \param  key  the EC_KEY object with the public key
16506  *  \param  out  the buffer for the result (if NULL the function returns number
16507  *               of bytes needed).
16508  *  \return 1 on success and 0 if an error occurred
16509  */
16510 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
16511 
16512 
16513 /** Prints out the ec parameters on human readable form.
16514  *  \param  bp   BIO object to which the information is printed
16515  *  \param  key  EC_KEY object
16516  *  \return 1 on success and 0 if an error occurred
16517  */
16518 int ECParameters_print(BIO *bp, const EC_KEY *key);
16519 
16520 /** Prints out the contents of a EC_KEY object
16521  *  \param  bp   BIO object to which the information is printed
16522  *  \param  key  EC_KEY object
16523  *  \param  off  line offset
16524  *  \return 1 on success and 0 if an error occurred
16525  */
16526 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
16527 
16528 
16529 
16530 /** Prints out the ec parameters on human readable form.
16531  *  \param  fp   file descriptor to which the information is printed
16532  *  \param  key  EC_KEY object
16533  *  \return 1 on success and 0 if an error occurred
16534  */
16535 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
16536 
16537 /** Prints out the contents of a EC_KEY object
16538  *  \param  fp   file descriptor to which the information is printed
16539  *  \param  key  EC_KEY object
16540  *  \param  off  line offset
16541  *  \return 1 on success and 0 if an error occurred
16542  */
16543 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
16544 # 1067 "/usr/include/openssl/ec.h" 3 4
16545 /* KDF types */
16546 
16547 
16548 
16549 /* BEGIN ERROR CODES */
16550 /*
16551  * The following lines are auto generated by the script mkerr.pl. Any changes
16552  * made after this point may be overwritten when the script is next run.
16553  */
16554 
16555 void ERR_load_EC_strings(void);
16556 
16557 /* Error codes for the EC functions. */
16558 
16559 /* Function codes. */
16560 # 1227 "/usr/include/openssl/ec.h" 3 4
16561 /* Reason codes. */
16562 # 84 "/usr/include/openssl/x509.h" 2 3 4
16563 
16564 
16565 
16566 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
16567 /* crypto/ecdsa/ecdsa.h */
16568 /**
16569  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
16570  * \author Written by Nils Larsch for the OpenSSL project
16571  */
16572 /* ====================================================================
16573  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
16574  *
16575  * Redistribution and use in source and binary forms, with or without
16576  * modification, are permitted provided that the following conditions
16577  * are met:
16578  *
16579  * 1. Redistributions of source code must retain the above copyright
16580  *    notice, this list of conditions and the following disclaimer.
16581  *
16582  * 2. Redistributions in binary form must reproduce the above copyright
16583  *    notice, this list of conditions and the following disclaimer in
16584  *    the documentation and/or other materials provided with the
16585  *    distribution.
16586  *
16587  * 3. All advertising materials mentioning features or use of this
16588  *    software must display the following acknowledgment:
16589  *    "This product includes software developed by the OpenSSL Project
16590  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
16591  *
16592  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16593  *    endorse or promote products derived from this software without
16594  *    prior written permission. For written permission, please contact
16595  *    licensing@OpenSSL.org.
16596  *
16597  * 5. Products derived from this software may not be called "OpenSSL"
16598  *    nor may "OpenSSL" appear in their names without prior written
16599  *    permission of the OpenSSL Project.
16600  *
16601  * 6. Redistributions of any form whatsoever must retain the following
16602  *    acknowledgment:
16603  *    "This product includes software developed by the OpenSSL Project
16604  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
16605  *
16606  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16607  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16608  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16609  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16610  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16611  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16612  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16613  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16614  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16615  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16616  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16617  * OF THE POSSIBILITY OF SUCH DAMAGE.
16618  * ====================================================================
16619  *
16620  * This product includes cryptographic software written by Eric Young
16621  * (eay@cryptsoft.com).  This product includes software written by Tim
16622  * Hudson (tjh@cryptsoft.com).
16623  *
16624  */
16625 
16626 
16627 
16628 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
16629 /* opensslconf.h */
16630 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
16631 
16632 
16633 
16634 
16635 /* OpenSSL was configured with the following options: */
16636 # 108 "/usr/include/openssl/opensslconf.h" 3 4
16637 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
16638    asks for it.  This is a transient feature that is provided for those
16639    who haven't had the time to do the appropriate changes in their
16640    applications.  */
16641 # 204 "/usr/include/openssl/opensslconf.h" 3 4
16642 /* crypto/opensslconf.h.in */
16643 
16644 /* Generate 80386 code? */
16645 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
16646 
16647 
16648 
16649 
16650 
16651 # 1 "/usr/include/openssl/ec.h" 1 3 4
16652 /* crypto/ec/ec.h */
16653 /*
16654  * Originally written by Bodo Moeller for the OpenSSL project.
16655  */
16656 /**
16657  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
16658  * \author Originally written by Bodo Moeller for the OpenSSL project
16659  */
16660 /* ====================================================================
16661  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
16662  *
16663  * Redistribution and use in source and binary forms, with or without
16664  * modification, are permitted provided that the following conditions
16665  * are met:
16666  *
16667  * 1. Redistributions of source code must retain the above copyright
16668  *    notice, this list of conditions and the following disclaimer.
16669  *
16670  * 2. Redistributions in binary form must reproduce the above copyright
16671  *    notice, this list of conditions and the following disclaimer in
16672  *    the documentation and/or other materials provided with the
16673  *    distribution.
16674  *
16675  * 3. All advertising materials mentioning features or use of this
16676  *    software must display the following acknowledgment:
16677  *    "This product includes software developed by the OpenSSL Project
16678  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16679  *
16680  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16681  *    endorse or promote products derived from this software without
16682  *    prior written permission. For written permission, please contact
16683  *    openssl-core@openssl.org.
16684  *
16685  * 5. Products derived from this software may not be called "OpenSSL"
16686  *    nor may "OpenSSL" appear in their names without prior written
16687  *    permission of the OpenSSL Project.
16688  *
16689  * 6. Redistributions of any form whatsoever must retain the following
16690  *    acknowledgment:
16691  *    "This product includes software developed by the OpenSSL Project
16692  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16693  *
16694  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16695  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16696  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16697  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16698  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16699  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16700  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16701  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16702  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16703  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16704  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16705  * OF THE POSSIBILITY OF SUCH DAMAGE.
16706  * ====================================================================
16707  *
16708  * This product includes cryptographic software written by Eric Young
16709  * (eay@cryptsoft.com).  This product includes software written by Tim
16710  * Hudson (tjh@cryptsoft.com).
16711  *
16712  */
16713 /* ====================================================================
16714  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16715  *
16716  * Portions of the attached software ("Contribution") are developed by
16717  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16718  *
16719  * The Contribution is licensed pursuant to the OpenSSL open source
16720  * license provided above.
16721  *
16722  * The elliptic curve binary polynomial software is originally written by
16723  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16724  *
16725  */
16726 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
16727 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16728 /* ====================================================================
16729  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16730  *
16731  * Redistribution and use in source and binary forms, with or without
16732  * modification, are permitted provided that the following conditions
16733  * are met:
16734  *
16735  * 1. Redistributions of source code must retain the above copyright
16736  *    notice, this list of conditions and the following disclaimer.
16737  *
16738  * 2. Redistributions in binary form must reproduce the above copyright
16739  *    notice, this list of conditions and the following disclaimer in
16740  *    the documentation and/or other materials provided with the
16741  *    distribution.
16742  *
16743  * 3. All advertising materials mentioning features or use of this
16744  *    software must display the following acknowledgment:
16745  *    "This product includes software developed by the OpenSSL Project
16746  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16747  *
16748  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16749  *    endorse or promote products derived from this software without
16750  *    prior written permission. For written permission, please contact
16751  *    openssl-core@openssl.org.
16752  *
16753  * 5. Products derived from this software may not be called "OpenSSL"
16754  *    nor may "OpenSSL" appear in their names without prior written
16755  *    permission of the OpenSSL Project.
16756  *
16757  * 6. Redistributions of any form whatsoever must retain the following
16758  *    acknowledgment:
16759  *    "This product includes software developed by the OpenSSL Project
16760  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16761  *
16762  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16763  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16764  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16765  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16766  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16767  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16768  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16769  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16770  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16771  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16772  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16773  * OF THE POSSIBILITY OF SUCH DAMAGE.
16774  * ====================================================================
16775  *
16776  * This product includes cryptographic software written by Eric Young
16777  * (eay@cryptsoft.com).  This product includes software written by Tim
16778  * Hudson (tjh@cryptsoft.com).
16779  *
16780  */
16781 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
16782 
16783 # 1 "/usr/include/openssl/bn.h" 1 3 4
16784 /* crypto/bn/bn.h */
16785 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16786  * All rights reserved.
16787  *
16788  * This package is an SSL implementation written
16789  * by Eric Young (eay@cryptsoft.com).
16790  * The implementation was written so as to conform with Netscapes SSL.
16791  *
16792  * This library is free for commercial and non-commercial use as long as
16793  * the following conditions are aheared to.  The following conditions
16794  * apply to all code found in this distribution, be it the RC4, RSA,
16795  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16796  * included with this distribution is covered by the same copyright terms
16797  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16798  *
16799  * Copyright remains Eric Young's, and as such any Copyright notices in
16800  * the code are not to be removed.
16801  * If this package is used in a product, Eric Young should be given attribution
16802  * as the author of the parts of the library used.
16803  * This can be in the form of a textual message at program startup or
16804  * in documentation (online or textual) provided with the package.
16805  *
16806  * Redistribution and use in source and binary forms, with or without
16807  * modification, are permitted provided that the following conditions
16808  * are met:
16809  * 1. Redistributions of source code must retain the copyright
16810  *    notice, this list of conditions and the following disclaimer.
16811  * 2. Redistributions in binary form must reproduce the above copyright
16812  *    notice, this list of conditions and the following disclaimer in the
16813  *    documentation and/or other materials provided with the distribution.
16814  * 3. All advertising materials mentioning features or use of this software
16815  *    must display the following acknowledgement:
16816  *    "This product includes cryptographic software written by
16817  *     Eric Young (eay@cryptsoft.com)"
16818  *    The word 'cryptographic' can be left out if the rouines from the library
16819  *    being used are not cryptographic related :-).
16820  * 4. If you include any Windows specific code (or a derivative thereof) from
16821  *    the apps directory (application code) you must include an acknowledgement:
16822  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16823  *
16824  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16825  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16826  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16827  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16828  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16829  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16830  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16831  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16832  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16833  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16834  * SUCH DAMAGE.
16835  *
16836  * The licence and distribution terms for any publically available version or
16837  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16838  * copied and put under another distribution licence
16839  * [including the GNU Public Licence.]
16840  */
16841 /* ====================================================================
16842  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16843  *
16844  * Redistribution and use in source and binary forms, with or without
16845  * modification, are permitted provided that the following conditions
16846  * are met:
16847  *
16848  * 1. Redistributions of source code must retain the above copyright
16849  *    notice, this list of conditions and the following disclaimer.
16850  *
16851  * 2. Redistributions in binary form must reproduce the above copyright
16852  *    notice, this list of conditions and the following disclaimer in
16853  *    the documentation and/or other materials provided with the
16854  *    distribution.
16855  *
16856  * 3. All advertising materials mentioning features or use of this
16857  *    software must display the following acknowledgment:
16858  *    "This product includes software developed by the OpenSSL Project
16859  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16860  *
16861  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16862  *    endorse or promote products derived from this software without
16863  *    prior written permission. For written permission, please contact
16864  *    openssl-core@openssl.org.
16865  *
16866  * 5. Products derived from this software may not be called "OpenSSL"
16867  *    nor may "OpenSSL" appear in their names without prior written
16868  *    permission of the OpenSSL Project.
16869  *
16870  * 6. Redistributions of any form whatsoever must retain the following
16871  *    acknowledgment:
16872  *    "This product includes software developed by the OpenSSL Project
16873  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16874  *
16875  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16876  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16877  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16878  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16879  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16880  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16881  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16882  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16883  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16884  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16885  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16886  * OF THE POSSIBILITY OF SUCH DAMAGE.
16887  * ====================================================================
16888  *
16889  * This product includes cryptographic software written by Eric Young
16890  * (eay@cryptsoft.com).  This product includes software written by Tim
16891  * Hudson (tjh@cryptsoft.com).
16892  *
16893  */
16894 /* ====================================================================
16895  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16896  *
16897  * Portions of the attached software ("Contribution") are developed by
16898  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16899  *
16900  * The Contribution is licensed pursuant to the Eric Young open source
16901  * license provided above.
16902  *
16903  * The binary polynomial arithmetic software is originally written by
16904  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16905  *
16906  */
16907 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
16908 
16909 
16910 
16911 
16912 
16913 
16914 typedef struct ECDSA_SIG_st {
16915     BIGNUM *r;
16916     BIGNUM *s;
16917 } ECDSA_SIG;
16918 
16919 /** Allocates and initialize a ECDSA_SIG structure
16920  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16921  */
16922 ECDSA_SIG *ECDSA_SIG_new(void);
16923 
16924 /** frees a ECDSA_SIG structure
16925  *  \param  sig  pointer to the ECDSA_SIG structure
16926  */
16927 void ECDSA_SIG_free(ECDSA_SIG *sig);
16928 
16929 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
16930  *  (*pp += length of the DER encoded signature)).
16931  *  \param  sig  pointer to the ECDSA_SIG object
16932  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
16933  *  \return the length of the DER encoded ECDSA_SIG object or 0
16934  */
16935 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
16936 
16937 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
16938  *  (*pp += len)).
16939  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
16940  *  \param  pp   memory buffer with the DER encoded signature
16941  *  \param  len  length of the buffer
16942  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
16943  */
16944 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
16945 
16946 /** Computes the ECDSA signature of the given hash value using
16947  *  the supplied private key and returns the created signature.
16948  *  \param  dgst      pointer to the hash value
16949  *  \param  dgst_len  length of the hash value
16950  *  \param  eckey     EC_KEY object containing a private EC key
16951  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16952  */
16953 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
16954                          EC_KEY *eckey);
16955 
16956 /** Computes ECDSA signature of a given hash value using the supplied
16957  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16958  *  \param  dgst     pointer to the hash value to sign
16959  *  \param  dgstlen  length of the hash value
16960  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
16961  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
16962  *                   see ECDSA_sign_setup
16963  *  \param  eckey    EC_KEY object containing a private EC key
16964  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16965  */
16966 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
16967                             const BIGNUM *kinv, const BIGNUM *rp,
16968                             EC_KEY *eckey);
16969 
16970 /** Verifies that the supplied signature is a valid ECDSA
16971  *  signature of the supplied hash value using the supplied public key.
16972  *  \param  dgst      pointer to the hash value
16973  *  \param  dgst_len  length of the hash value
16974  *  \param  sig       ECDSA_SIG structure
16975  *  \param  eckey     EC_KEY object containing a public EC key
16976  *  \return 1 if the signature is valid, 0 if the signature is invalid
16977  *          and -1 on error
16978  */
16979 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
16980                     const ECDSA_SIG *sig, EC_KEY *eckey);
16981 
16982 const ECDSA_METHOD *ECDSA_OpenSSL(void);
16983 
16984 /** Sets the default ECDSA method
16985  *  \param  meth  new default ECDSA_METHOD
16986  */
16987 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
16988 
16989 /** Returns the default ECDSA method
16990  *  \return pointer to ECDSA_METHOD structure containing the default method
16991  */
16992 const ECDSA_METHOD *ECDSA_get_default_method(void);
16993 
16994 /** Sets method to be used for the ECDSA operations
16995  *  \param  eckey  EC_KEY object
16996  *  \param  meth   new method
16997  *  \return 1 on success and 0 otherwise
16998  */
16999 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
17000 
17001 /** Returns the maximum length of the DER encoded signature
17002  *  \param  eckey  EC_KEY object
17003  *  \return numbers of bytes required for the DER encoded signature
17004  */
17005 int ECDSA_size(const EC_KEY *eckey);
17006 
17007 /** Precompute parts of the signing operation
17008  *  \param  eckey  EC_KEY object containing a private EC key
17009  *  \param  ctx    BN_CTX object (optional)
17010  *  \param  kinv   BIGNUM pointer for the inverse of k
17011  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
17012  *  \return 1 on success and 0 otherwise
17013  */
17014 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
17015 
17016 /** Computes ECDSA signature of a given hash value using the supplied
17017  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
17018  *  \param  type     this parameter is ignored
17019  *  \param  dgst     pointer to the hash value to sign
17020  *  \param  dgstlen  length of the hash value
17021  *  \param  sig      memory for the DER encoded created signature
17022  *  \param  siglen   pointer to the length of the returned signature
17023  *  \param  eckey    EC_KEY object containing a private EC key
17024  *  \return 1 on success and 0 otherwise
17025  */
17026 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
17027                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
17028 
17029 /** Computes ECDSA signature of a given hash value using the supplied
17030  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
17031  *  \param  type     this parameter is ignored
17032  *  \param  dgst     pointer to the hash value to sign
17033  *  \param  dgstlen  length of the hash value
17034  *  \param  sig      buffer to hold the DER encoded signature
17035  *  \param  siglen   pointer to the length of the returned signature
17036  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
17037  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
17038  *                   see ECDSA_sign_setup
17039  *  \param  eckey    EC_KEY object containing a private EC key
17040  *  \return 1 on success and 0 otherwise
17041  */
17042 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
17043                   unsigned char *sig, unsigned int *siglen,
17044                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
17045 
17046 /** Verifies that the given signature is valid ECDSA signature
17047  *  of the supplied hash value using the specified public key.
17048  *  \param  type     this parameter is ignored
17049  *  \param  dgst     pointer to the hash value
17050  *  \param  dgstlen  length of the hash value
17051  *  \param  sig      pointer to the DER encoded signature
17052  *  \param  siglen   length of the DER encoded signature
17053  *  \param  eckey    EC_KEY object containing a public EC key
17054  *  \return 1 if the signature is valid, 0 if the signature is invalid
17055  *          and -1 on error
17056  */
17057 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
17058                  const unsigned char *sig, int siglen, EC_KEY *eckey);
17059 
17060 /* the standard ex_data functions */
17061 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
17062                            *new_func, CRYPTO_EX_dup *dup_func,
17063                            CRYPTO_EX_free *free_func);
17064 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
17065 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
17066 
17067 /** Allocates and initialize a ECDSA_METHOD structure
17068  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
17069  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
17070  */
17071 
17072 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
17073 
17074 /** frees a ECDSA_METHOD structure
17075  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
17076  */
17077 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
17078 
17079 /**  Sets application specific data in the ECDSA_METHOD
17080  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
17081  *   \param  app application specific data to set
17082  */
17083 
17084 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
17085 
17086 /** Returns application specific data from a ECDSA_METHOD structure
17087  *  \param ecdsa_method pointer to ECDSA_METHOD structure
17088  *  \return pointer to application specific data.
17089  */
17090 
17091 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
17092 
17093 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
17094  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
17095  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
17096  */
17097 
17098 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
17099                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
17100                                                         *dgst, int dgst_len,
17101                                                         const BIGNUM *inv,
17102                                                         const BIGNUM *rp,
17103                                                         EC_KEY *eckey));
17104 
17105 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
17106  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
17107  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
17108  */
17109 
17110 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
17111                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
17112                                                           BN_CTX *ctx,
17113                                                           BIGNUM **kinv,
17114                                                           BIGNUM **r));
17115 
17116 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
17117  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
17118  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
17119  */
17120 
17121 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
17122                              int (*ecdsa_do_verify) (const unsigned char
17123                                                      *dgst, int dgst_len,
17124                                                      const ECDSA_SIG *sig,
17125                                                      EC_KEY *eckey));
17126 
17127 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
17128 
17129 /**  Set the flags field in the ECDSA_METHOD
17130  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
17131  *   \param  flags flags value to set
17132  */
17133 
17134 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
17135 
17136 /**  Set the name field in the ECDSA_METHOD
17137  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
17138  *   \param  name name to set
17139  */
17140 
17141 /* BEGIN ERROR CODES */
17142 /*
17143  * The following lines are auto generated by the script mkerr.pl. Any changes
17144  * made after this point may be overwritten when the script is next run.
17145  */
17146 void ERR_load_ECDSA_strings(void);
17147 
17148 /* Error codes for the ECDSA functions. */
17149 
17150 /* Function codes. */
17151 
17152 
17153 
17154 
17155 
17156 
17157 
17158 /* Reason codes. */
17159 # 88 "/usr/include/openssl/x509.h" 2 3 4
17160 
17161 
17162 
17163 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
17164 /* crypto/ecdh/ecdh.h */
17165 /* ====================================================================
17166  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17167  *
17168  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
17169  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
17170  * to the OpenSSL project.
17171  *
17172  * The ECC Code is licensed pursuant to the OpenSSL open source
17173  * license provided below.
17174  *
17175  * The ECDH software is originally written by Douglas Stebila of
17176  * Sun Microsystems Laboratories.
17177  *
17178  */
17179 /* ====================================================================
17180  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
17181  *
17182  * Redistribution and use in source and binary forms, with or without
17183  * modification, are permitted provided that the following conditions
17184  * are met:
17185  *
17186  * 1. Redistributions of source code must retain the above copyright
17187  *    notice, this list of conditions and the following disclaimer.
17188  *
17189  * 2. Redistributions in binary form must reproduce the above copyright
17190  *    notice, this list of conditions and the following disclaimer in
17191  *    the documentation and/or other materials provided with the
17192  *    distribution.
17193  *
17194  * 3. All advertising materials mentioning features or use of this
17195  *    software must display the following acknowledgment:
17196  *    "This product includes software developed by the OpenSSL Project
17197  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
17198  *
17199  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17200  *    endorse or promote products derived from this software without
17201  *    prior written permission. For written permission, please contact
17202  *    licensing@OpenSSL.org.
17203  *
17204  * 5. Products derived from this software may not be called "OpenSSL"
17205  *    nor may "OpenSSL" appear in their names without prior written
17206  *    permission of the OpenSSL Project.
17207  *
17208  * 6. Redistributions of any form whatsoever must retain the following
17209  *    acknowledgment:
17210  *    "This product includes software developed by the OpenSSL Project
17211  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
17212  *
17213  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17214  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17215  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17216  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17217  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17218  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17219  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17220  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17221  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17222  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17223  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17224  * OF THE POSSIBILITY OF SUCH DAMAGE.
17225  * ====================================================================
17226  *
17227  * This product includes cryptographic software written by Eric Young
17228  * (eay@cryptsoft.com).  This product includes software written by Tim
17229  * Hudson (tjh@cryptsoft.com).
17230  *
17231  */
17232 
17233 
17234 
17235 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17236 /* opensslconf.h */
17237 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17238 
17239 
17240 
17241 
17242 /* OpenSSL was configured with the following options: */
17243 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17244 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17245    asks for it.  This is a transient feature that is provided for those
17246    who haven't had the time to do the appropriate changes in their
17247    applications.  */
17248 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17249 /* crypto/opensslconf.h.in */
17250 
17251 /* Generate 80386 code? */
17252 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
17253 
17254 
17255 
17256 
17257 
17258 # 1 "/usr/include/openssl/ec.h" 1 3 4
17259 /* crypto/ec/ec.h */
17260 /*
17261  * Originally written by Bodo Moeller for the OpenSSL project.
17262  */
17263 /**
17264  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
17265  * \author Originally written by Bodo Moeller for the OpenSSL project
17266  */
17267 /* ====================================================================
17268  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
17269  *
17270  * Redistribution and use in source and binary forms, with or without
17271  * modification, are permitted provided that the following conditions
17272  * are met:
17273  *
17274  * 1. Redistributions of source code must retain the above copyright
17275  *    notice, this list of conditions and the following disclaimer.
17276  *
17277  * 2. Redistributions in binary form must reproduce the above copyright
17278  *    notice, this list of conditions and the following disclaimer in
17279  *    the documentation and/or other materials provided with the
17280  *    distribution.
17281  *
17282  * 3. All advertising materials mentioning features or use of this
17283  *    software must display the following acknowledgment:
17284  *    "This product includes software developed by the OpenSSL Project
17285  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17286  *
17287  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17288  *    endorse or promote products derived from this software without
17289  *    prior written permission. For written permission, please contact
17290  *    openssl-core@openssl.org.
17291  *
17292  * 5. Products derived from this software may not be called "OpenSSL"
17293  *    nor may "OpenSSL" appear in their names without prior written
17294  *    permission of the OpenSSL Project.
17295  *
17296  * 6. Redistributions of any form whatsoever must retain the following
17297  *    acknowledgment:
17298  *    "This product includes software developed by the OpenSSL Project
17299  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17300  *
17301  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17302  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17303  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17304  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17305  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17306  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17307  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17308  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17309  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17310  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17311  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17312  * OF THE POSSIBILITY OF SUCH DAMAGE.
17313  * ====================================================================
17314  *
17315  * This product includes cryptographic software written by Eric Young
17316  * (eay@cryptsoft.com).  This product includes software written by Tim
17317  * Hudson (tjh@cryptsoft.com).
17318  *
17319  */
17320 /* ====================================================================
17321  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17322  *
17323  * Portions of the attached software ("Contribution") are developed by
17324  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17325  *
17326  * The Contribution is licensed pursuant to the OpenSSL open source
17327  * license provided above.
17328  *
17329  * The elliptic curve binary polynomial software is originally written by
17330  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17331  *
17332  */
17333 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
17334 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17335 /* ====================================================================
17336  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17337  *
17338  * Redistribution and use in source and binary forms, with or without
17339  * modification, are permitted provided that the following conditions
17340  * are met:
17341  *
17342  * 1. Redistributions of source code must retain the above copyright
17343  *    notice, this list of conditions and the following disclaimer.
17344  *
17345  * 2. Redistributions in binary form must reproduce the above copyright
17346  *    notice, this list of conditions and the following disclaimer in
17347  *    the documentation and/or other materials provided with the
17348  *    distribution.
17349  *
17350  * 3. All advertising materials mentioning features or use of this
17351  *    software must display the following acknowledgment:
17352  *    "This product includes software developed by the OpenSSL Project
17353  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17354  *
17355  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17356  *    endorse or promote products derived from this software without
17357  *    prior written permission. For written permission, please contact
17358  *    openssl-core@openssl.org.
17359  *
17360  * 5. Products derived from this software may not be called "OpenSSL"
17361  *    nor may "OpenSSL" appear in their names without prior written
17362  *    permission of the OpenSSL Project.
17363  *
17364  * 6. Redistributions of any form whatsoever must retain the following
17365  *    acknowledgment:
17366  *    "This product includes software developed by the OpenSSL Project
17367  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17368  *
17369  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17370  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17371  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17372  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17373  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17374  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17375  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17376  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17377  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17378  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17379  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17380  * OF THE POSSIBILITY OF SUCH DAMAGE.
17381  * ====================================================================
17382  *
17383  * This product includes cryptographic software written by Eric Young
17384  * (eay@cryptsoft.com).  This product includes software written by Tim
17385  * Hudson (tjh@cryptsoft.com).
17386  *
17387  */
17388 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
17389 
17390 # 1 "/usr/include/openssl/bn.h" 1 3 4
17391 /* crypto/bn/bn.h */
17392 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
17393  * All rights reserved.
17394  *
17395  * This package is an SSL implementation written
17396  * by Eric Young (eay@cryptsoft.com).
17397  * The implementation was written so as to conform with Netscapes SSL.
17398  *
17399  * This library is free for commercial and non-commercial use as long as
17400  * the following conditions are aheared to.  The following conditions
17401  * apply to all code found in this distribution, be it the RC4, RSA,
17402  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17403  * included with this distribution is covered by the same copyright terms
17404  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17405  *
17406  * Copyright remains Eric Young's, and as such any Copyright notices in
17407  * the code are not to be removed.
17408  * If this package is used in a product, Eric Young should be given attribution
17409  * as the author of the parts of the library used.
17410  * This can be in the form of a textual message at program startup or
17411  * in documentation (online or textual) provided with the package.
17412  *
17413  * Redistribution and use in source and binary forms, with or without
17414  * modification, are permitted provided that the following conditions
17415  * are met:
17416  * 1. Redistributions of source code must retain the copyright
17417  *    notice, this list of conditions and the following disclaimer.
17418  * 2. Redistributions in binary form must reproduce the above copyright
17419  *    notice, this list of conditions and the following disclaimer in the
17420  *    documentation and/or other materials provided with the distribution.
17421  * 3. All advertising materials mentioning features or use of this software
17422  *    must display the following acknowledgement:
17423  *    "This product includes cryptographic software written by
17424  *     Eric Young (eay@cryptsoft.com)"
17425  *    The word 'cryptographic' can be left out if the rouines from the library
17426  *    being used are not cryptographic related :-).
17427  * 4. If you include any Windows specific code (or a derivative thereof) from
17428  *    the apps directory (application code) you must include an acknowledgement:
17429  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17430  *
17431  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17432  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17433  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17434  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17435  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17436  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17437  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17438  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17439  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17440  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17441  * SUCH DAMAGE.
17442  *
17443  * The licence and distribution terms for any publically available version or
17444  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17445  * copied and put under another distribution licence
17446  * [including the GNU Public Licence.]
17447  */
17448 /* ====================================================================
17449  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
17450  *
17451  * Redistribution and use in source and binary forms, with or without
17452  * modification, are permitted provided that the following conditions
17453  * are met:
17454  *
17455  * 1. Redistributions of source code must retain the above copyright
17456  *    notice, this list of conditions and the following disclaimer.
17457  *
17458  * 2. Redistributions in binary form must reproduce the above copyright
17459  *    notice, this list of conditions and the following disclaimer in
17460  *    the documentation and/or other materials provided with the
17461  *    distribution.
17462  *
17463  * 3. All advertising materials mentioning features or use of this
17464  *    software must display the following acknowledgment:
17465  *    "This product includes software developed by the OpenSSL Project
17466  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17467  *
17468  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17469  *    endorse or promote products derived from this software without
17470  *    prior written permission. For written permission, please contact
17471  *    openssl-core@openssl.org.
17472  *
17473  * 5. Products derived from this software may not be called "OpenSSL"
17474  *    nor may "OpenSSL" appear in their names without prior written
17475  *    permission of the OpenSSL Project.
17476  *
17477  * 6. Redistributions of any form whatsoever must retain the following
17478  *    acknowledgment:
17479  *    "This product includes software developed by the OpenSSL Project
17480  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17481  *
17482  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17483  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17484  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17485  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17486  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17487  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17488  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17489  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17490  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17491  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17492  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17493  * OF THE POSSIBILITY OF SUCH DAMAGE.
17494  * ====================================================================
17495  *
17496  * This product includes cryptographic software written by Eric Young
17497  * (eay@cryptsoft.com).  This product includes software written by Tim
17498  * Hudson (tjh@cryptsoft.com).
17499  *
17500  */
17501 /* ====================================================================
17502  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17503  *
17504  * Portions of the attached software ("Contribution") are developed by
17505  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17506  *
17507  * The Contribution is licensed pursuant to the Eric Young open source
17508  * license provided above.
17509  *
17510  * The binary polynomial arithmetic software is originally written by
17511  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17512  *
17513  */
17514 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
17515 # 90 "/usr/include/openssl/ecdh.h" 3 4
17516 const ECDH_METHOD *ECDH_OpenSSL(void);
17517 
17518 void ECDH_set_default_method(const ECDH_METHOD *);
17519 const ECDH_METHOD *ECDH_get_default_method(void);
17520 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
17521 
17522 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
17523                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
17524                                                  void *out, size_t *outlen));
17525 
17526 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
17527                           *new_func, CRYPTO_EX_dup *dup_func,
17528                           CRYPTO_EX_free *free_func);
17529 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
17530 void *ECDH_get_ex_data(EC_KEY *d, int idx);
17531 
17532 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
17533                    const unsigned char *Z, size_t Zlen,
17534                    const unsigned char *sinfo, size_t sinfolen,
17535                    const EVP_MD *md);
17536 
17537 /* BEGIN ERROR CODES */
17538 /*
17539  * The following lines are auto generated by the script mkerr.pl. Any changes
17540  * made after this point may be overwritten when the script is next run.
17541  */
17542 void ERR_load_ECDH_strings(void);
17543 
17544 /* Error codes for the ECDH functions. */
17545 
17546 /* Function codes. */
17547 
17548 
17549 
17550 
17551 /* Reason codes. */
17552 # 92 "/usr/include/openssl/x509.h" 2 3 4
17553 
17554 
17555 
17556 
17557 # 1 "/usr/include/openssl/rsa.h" 1 3 4
17558 /* crypto/rsa/rsa.h */
17559 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17560  * All rights reserved.
17561  *
17562  * This package is an SSL implementation written
17563  * by Eric Young (eay@cryptsoft.com).
17564  * The implementation was written so as to conform with Netscapes SSL.
17565  *
17566  * This library is free for commercial and non-commercial use as long as
17567  * the following conditions are aheared to.  The following conditions
17568  * apply to all code found in this distribution, be it the RC4, RSA,
17569  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17570  * included with this distribution is covered by the same copyright terms
17571  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17572  *
17573  * Copyright remains Eric Young's, and as such any Copyright notices in
17574  * the code are not to be removed.
17575  * If this package is used in a product, Eric Young should be given attribution
17576  * as the author of the parts of the library used.
17577  * This can be in the form of a textual message at program startup or
17578  * in documentation (online or textual) provided with the package.
17579  *
17580  * Redistribution and use in source and binary forms, with or without
17581  * modification, are permitted provided that the following conditions
17582  * are met:
17583  * 1. Redistributions of source code must retain the copyright
17584  *    notice, this list of conditions and the following disclaimer.
17585  * 2. Redistributions in binary form must reproduce the above copyright
17586  *    notice, this list of conditions and the following disclaimer in the
17587  *    documentation and/or other materials provided with the distribution.
17588  * 3. All advertising materials mentioning features or use of this software
17589  *    must display the following acknowledgement:
17590  *    "This product includes cryptographic software written by
17591  *     Eric Young (eay@cryptsoft.com)"
17592  *    The word 'cryptographic' can be left out if the rouines from the library
17593  *    being used are not cryptographic related :-).
17594  * 4. If you include any Windows specific code (or a derivative thereof) from
17595  *    the apps directory (application code) you must include an acknowledgement:
17596  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17597  *
17598  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17599  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17600  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17601  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17602  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17603  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17604  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17605  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17606  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17607  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17608  * SUCH DAMAGE.
17609  *
17610  * The licence and distribution terms for any publically available version or
17611  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17612  * copied and put under another distribution licence
17613  * [including the GNU Public Licence.]
17614  */
17615 
17616 
17617 
17618 
17619 # 1 "/usr/include/openssl/asn1.h" 1 3 4
17620 /* crypto/asn1/asn1.h */
17621 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17622  * All rights reserved.
17623  *
17624  * This package is an SSL implementation written
17625  * by Eric Young (eay@cryptsoft.com).
17626  * The implementation was written so as to conform with Netscapes SSL.
17627  *
17628  * This library is free for commercial and non-commercial use as long as
17629  * the following conditions are aheared to.  The following conditions
17630  * apply to all code found in this distribution, be it the RC4, RSA,
17631  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17632  * included with this distribution is covered by the same copyright terms
17633  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17634  *
17635  * Copyright remains Eric Young's, and as such any Copyright notices in
17636  * the code are not to be removed.
17637  * If this package is used in a product, Eric Young should be given attribution
17638  * as the author of the parts of the library used.
17639  * This can be in the form of a textual message at program startup or
17640  * in documentation (online or textual) provided with the package.
17641  *
17642  * Redistribution and use in source and binary forms, with or without
17643  * modification, are permitted provided that the following conditions
17644  * are met:
17645  * 1. Redistributions of source code must retain the copyright
17646  *    notice, this list of conditions and the following disclaimer.
17647  * 2. Redistributions in binary form must reproduce the above copyright
17648  *    notice, this list of conditions and the following disclaimer in the
17649  *    documentation and/or other materials provided with the distribution.
17650  * 3. All advertising materials mentioning features or use of this software
17651  *    must display the following acknowledgement:
17652  *    "This product includes cryptographic software written by
17653  *     Eric Young (eay@cryptsoft.com)"
17654  *    The word 'cryptographic' can be left out if the rouines from the library
17655  *    being used are not cryptographic related :-).
17656  * 4. If you include any Windows specific code (or a derivative thereof) from
17657  *    the apps directory (application code) you must include an acknowledgement:
17658  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17659  *
17660  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17661  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17662  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17663  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17664  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17665  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17666  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17667  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17668  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17669  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17670  * SUCH DAMAGE.
17671  *
17672  * The licence and distribution terms for any publically available version or
17673  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17674  * copied and put under another distribution licence
17675  * [including the GNU Public Licence.]
17676  */
17677 # 63 "/usr/include/openssl/rsa.h" 2 3 4
17678 
17679 
17680 # 1 "/usr/include/openssl/bio.h" 1 3 4
17681 /* crypto/bio/bio.h */
17682 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17683  * All rights reserved.
17684  *
17685  * This package is an SSL implementation written
17686  * by Eric Young (eay@cryptsoft.com).
17687  * The implementation was written so as to conform with Netscapes SSL.
17688  *
17689  * This library is free for commercial and non-commercial use as long as
17690  * the following conditions are aheared to.  The following conditions
17691  * apply to all code found in this distribution, be it the RC4, RSA,
17692  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17693  * included with this distribution is covered by the same copyright terms
17694  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17695  *
17696  * Copyright remains Eric Young's, and as such any Copyright notices in
17697  * the code are not to be removed.
17698  * If this package is used in a product, Eric Young should be given attribution
17699  * as the author of the parts of the library used.
17700  * This can be in the form of a textual message at program startup or
17701  * in documentation (online or textual) provided with the package.
17702  *
17703  * Redistribution and use in source and binary forms, with or without
17704  * modification, are permitted provided that the following conditions
17705  * are met:
17706  * 1. Redistributions of source code must retain the copyright
17707  *    notice, this list of conditions and the following disclaimer.
17708  * 2. Redistributions in binary form must reproduce the above copyright
17709  *    notice, this list of conditions and the following disclaimer in the
17710  *    documentation and/or other materials provided with the distribution.
17711  * 3. All advertising materials mentioning features or use of this software
17712  *    must display the following acknowledgement:
17713  *    "This product includes cryptographic software written by
17714  *     Eric Young (eay@cryptsoft.com)"
17715  *    The word 'cryptographic' can be left out if the rouines from the library
17716  *    being used are not cryptographic related :-).
17717  * 4. If you include any Windows specific code (or a derivative thereof) from
17718  *    the apps directory (application code) you must include an acknowledgement:
17719  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17720  *
17721  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17722  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17723  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17724  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17725  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17726  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17727  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17728  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17729  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17730  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17731  * SUCH DAMAGE.
17732  *
17733  * The licence and distribution terms for any publically available version or
17734  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17735  * copied and put under another distribution licence
17736  * [including the GNU Public Licence.]
17737  */
17738 # 66 "/usr/include/openssl/rsa.h" 2 3 4
17739 
17740 # 1 "/usr/include/openssl/crypto.h" 1 3 4
17741 /* crypto/crypto.h */
17742 /* ====================================================================
17743  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
17744  *
17745  * Redistribution and use in source and binary forms, with or without
17746  * modification, are permitted provided that the following conditions
17747  * are met:
17748  *
17749  * 1. Redistributions of source code must retain the above copyright
17750  *    notice, this list of conditions and the following disclaimer.
17751  *
17752  * 2. Redistributions in binary form must reproduce the above copyright
17753  *    notice, this list of conditions and the following disclaimer in
17754  *    the documentation and/or other materials provided with the
17755  *    distribution.
17756  *
17757  * 3. All advertising materials mentioning features or use of this
17758  *    software must display the following acknowledgment:
17759  *    "This product includes software developed by the OpenSSL Project
17760  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17761  *
17762  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17763  *    endorse or promote products derived from this software without
17764  *    prior written permission. For written permission, please contact
17765  *    openssl-core@openssl.org.
17766  *
17767  * 5. Products derived from this software may not be called "OpenSSL"
17768  *    nor may "OpenSSL" appear in their names without prior written
17769  *    permission of the OpenSSL Project.
17770  *
17771  * 6. Redistributions of any form whatsoever must retain the following
17772  *    acknowledgment:
17773  *    "This product includes software developed by the OpenSSL Project
17774  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17775  *
17776  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17777  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17778  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17779  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17780  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17781  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17782  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17783  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17784  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17785  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17786  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17787  * OF THE POSSIBILITY OF SUCH DAMAGE.
17788  * ====================================================================
17789  *
17790  * This product includes cryptographic software written by Eric Young
17791  * (eay@cryptsoft.com).  This product includes software written by Tim
17792  * Hudson (tjh@cryptsoft.com).
17793  *
17794  */
17795 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17796  * All rights reserved.
17797  *
17798  * This package is an SSL implementation written
17799  * by Eric Young (eay@cryptsoft.com).
17800  * The implementation was written so as to conform with Netscapes SSL.
17801  *
17802  * This library is free for commercial and non-commercial use as long as
17803  * the following conditions are aheared to.  The following conditions
17804  * apply to all code found in this distribution, be it the RC4, RSA,
17805  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17806  * included with this distribution is covered by the same copyright terms
17807  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17808  *
17809  * Copyright remains Eric Young's, and as such any Copyright notices in
17810  * the code are not to be removed.
17811  * If this package is used in a product, Eric Young should be given attribution
17812  * as the author of the parts of the library used.
17813  * This can be in the form of a textual message at program startup or
17814  * in documentation (online or textual) provided with the package.
17815  *
17816  * Redistribution and use in source and binary forms, with or without
17817  * modification, are permitted provided that the following conditions
17818  * are met:
17819  * 1. Redistributions of source code must retain the copyright
17820  *    notice, this list of conditions and the following disclaimer.
17821  * 2. Redistributions in binary form must reproduce the above copyright
17822  *    notice, this list of conditions and the following disclaimer in the
17823  *    documentation and/or other materials provided with the distribution.
17824  * 3. All advertising materials mentioning features or use of this software
17825  *    must display the following acknowledgement:
17826  *    "This product includes cryptographic software written by
17827  *     Eric Young (eay@cryptsoft.com)"
17828  *    The word 'cryptographic' can be left out if the rouines from the library
17829  *    being used are not cryptographic related :-).
17830  * 4. If you include any Windows specific code (or a derivative thereof) from
17831  *    the apps directory (application code) you must include an acknowledgement:
17832  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17833  *
17834  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17835  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17836  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17837  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17838  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17839  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17840  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17841  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17842  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17843  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17844  * SUCH DAMAGE.
17845  *
17846  * The licence and distribution terms for any publically available version or
17847  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17848  * copied and put under another distribution licence
17849  * [including the GNU Public Licence.]
17850  */
17851 /* ====================================================================
17852  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17853  * ECDH support in OpenSSL originally developed by
17854  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
17855  */
17856 # 68 "/usr/include/openssl/rsa.h" 2 3 4
17857 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17858 /* ====================================================================
17859  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17860  *
17861  * Redistribution and use in source and binary forms, with or without
17862  * modification, are permitted provided that the following conditions
17863  * are met:
17864  *
17865  * 1. Redistributions of source code must retain the above copyright
17866  *    notice, this list of conditions and the following disclaimer.
17867  *
17868  * 2. Redistributions in binary form must reproduce the above copyright
17869  *    notice, this list of conditions and the following disclaimer in
17870  *    the documentation and/or other materials provided with the
17871  *    distribution.
17872  *
17873  * 3. All advertising materials mentioning features or use of this
17874  *    software must display the following acknowledgment:
17875  *    "This product includes software developed by the OpenSSL Project
17876  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17877  *
17878  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17879  *    endorse or promote products derived from this software without
17880  *    prior written permission. For written permission, please contact
17881  *    openssl-core@openssl.org.
17882  *
17883  * 5. Products derived from this software may not be called "OpenSSL"
17884  *    nor may "OpenSSL" appear in their names without prior written
17885  *    permission of the OpenSSL Project.
17886  *
17887  * 6. Redistributions of any form whatsoever must retain the following
17888  *    acknowledgment:
17889  *    "This product includes software developed by the OpenSSL Project
17890  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17891  *
17892  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17893  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17894  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17895  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17896  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17897  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17898  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17899  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17900  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17901  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17902  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17903  * OF THE POSSIBILITY OF SUCH DAMAGE.
17904  * ====================================================================
17905  *
17906  * This product includes cryptographic software written by Eric Young
17907  * (eay@cryptsoft.com).  This product includes software written by Tim
17908  * Hudson (tjh@cryptsoft.com).
17909  *
17910  */
17911 # 69 "/usr/include/openssl/rsa.h" 2 3 4
17912 
17913 # 1 "/usr/include/openssl/bn.h" 1 3 4
17914 /* crypto/bn/bn.h */
17915 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
17916  * All rights reserved.
17917  *
17918  * This package is an SSL implementation written
17919  * by Eric Young (eay@cryptsoft.com).
17920  * The implementation was written so as to conform with Netscapes SSL.
17921  *
17922  * This library is free for commercial and non-commercial use as long as
17923  * the following conditions are aheared to.  The following conditions
17924  * apply to all code found in this distribution, be it the RC4, RSA,
17925  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17926  * included with this distribution is covered by the same copyright terms
17927  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17928  *
17929  * Copyright remains Eric Young's, and as such any Copyright notices in
17930  * the code are not to be removed.
17931  * If this package is used in a product, Eric Young should be given attribution
17932  * as the author of the parts of the library used.
17933  * This can be in the form of a textual message at program startup or
17934  * in documentation (online or textual) provided with the package.
17935  *
17936  * Redistribution and use in source and binary forms, with or without
17937  * modification, are permitted provided that the following conditions
17938  * are met:
17939  * 1. Redistributions of source code must retain the copyright
17940  *    notice, this list of conditions and the following disclaimer.
17941  * 2. Redistributions in binary form must reproduce the above copyright
17942  *    notice, this list of conditions and the following disclaimer in the
17943  *    documentation and/or other materials provided with the distribution.
17944  * 3. All advertising materials mentioning features or use of this software
17945  *    must display the following acknowledgement:
17946  *    "This product includes cryptographic software written by
17947  *     Eric Young (eay@cryptsoft.com)"
17948  *    The word 'cryptographic' can be left out if the rouines from the library
17949  *    being used are not cryptographic related :-).
17950  * 4. If you include any Windows specific code (or a derivative thereof) from
17951  *    the apps directory (application code) you must include an acknowledgement:
17952  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17953  *
17954  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17955  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17956  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17957  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17958  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17959  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17960  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17961  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17962  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17963  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17964  * SUCH DAMAGE.
17965  *
17966  * The licence and distribution terms for any publically available version or
17967  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17968  * copied and put under another distribution licence
17969  * [including the GNU Public Licence.]
17970  */
17971 /* ====================================================================
17972  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
17973  *
17974  * Redistribution and use in source and binary forms, with or without
17975  * modification, are permitted provided that the following conditions
17976  * are met:
17977  *
17978  * 1. Redistributions of source code must retain the above copyright
17979  *    notice, this list of conditions and the following disclaimer.
17980  *
17981  * 2. Redistributions in binary form must reproduce the above copyright
17982  *    notice, this list of conditions and the following disclaimer in
17983  *    the documentation and/or other materials provided with the
17984  *    distribution.
17985  *
17986  * 3. All advertising materials mentioning features or use of this
17987  *    software must display the following acknowledgment:
17988  *    "This product includes software developed by the OpenSSL Project
17989  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17990  *
17991  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17992  *    endorse or promote products derived from this software without
17993  *    prior written permission. For written permission, please contact
17994  *    openssl-core@openssl.org.
17995  *
17996  * 5. Products derived from this software may not be called "OpenSSL"
17997  *    nor may "OpenSSL" appear in their names without prior written
17998  *    permission of the OpenSSL Project.
17999  *
18000  * 6. Redistributions of any form whatsoever must retain the following
18001  *    acknowledgment:
18002  *    "This product includes software developed by the OpenSSL Project
18003  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18004  *
18005  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18006  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18007  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18008  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18009  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18010  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18011  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18012  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18013  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18014  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18015  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18016  * OF THE POSSIBILITY OF SUCH DAMAGE.
18017  * ====================================================================
18018  *
18019  * This product includes cryptographic software written by Eric Young
18020  * (eay@cryptsoft.com).  This product includes software written by Tim
18021  * Hudson (tjh@cryptsoft.com).
18022  *
18023  */
18024 /* ====================================================================
18025  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18026  *
18027  * Portions of the attached software ("Contribution") are developed by
18028  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18029  *
18030  * The Contribution is licensed pursuant to the Eric Young open source
18031  * license provided above.
18032  *
18033  * The binary polynomial arithmetic software is originally written by
18034  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18035  *
18036  */
18037 # 71 "/usr/include/openssl/rsa.h" 2 3 4
18038 # 81 "/usr/include/openssl/rsa.h" 3 4
18039 /* Declared already in ossl_typ.h */
18040 /* typedef struct rsa_st RSA; */
18041 /* typedef struct rsa_meth_st RSA_METHOD; */
18042 
18043 struct rsa_meth_st {
18044     const char *name;
18045     int (*rsa_pub_enc) (int flen, const unsigned char *from,
18046                         unsigned char *to, RSA *rsa, int padding);
18047     int (*rsa_pub_dec) (int flen, const unsigned char *from,
18048                         unsigned char *to, RSA *rsa, int padding);
18049     int (*rsa_priv_enc) (int flen, const unsigned char *from,
18050                          unsigned char *to, RSA *rsa, int padding);
18051     int (*rsa_priv_dec) (int flen, const unsigned char *from,
18052                          unsigned char *to, RSA *rsa, int padding);
18053     /* Can be null */
18054     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
18055     /* Can be null */
18056     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
18057                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
18058     /* called at new */
18059     int (*init) (RSA *rsa);
18060     /* called at free */
18061     int (*finish) (RSA *rsa);
18062     /* RSA_METHOD_FLAG_* things */
18063     int flags;
18064     /* may be needed! */
18065     char *app_data;
18066     /*
18067      * New sign and verify functions: some libraries don't allow arbitrary
18068      * data to be signed/verified: this allows them to be used. Note: for
18069      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
18070      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
18071      * for backwards compatibility this functionality is only enabled if the
18072      * RSA_FLAG_SIGN_VER option is set in 'flags'.
18073      */
18074     int (*rsa_sign) (int type,
18075                      const unsigned char *m, unsigned int m_length,
18076                      unsigned char *sigret, unsigned int *siglen,
18077                      const RSA *rsa);
18078     int (*rsa_verify) (int dtype, const unsigned char *m,
18079                        unsigned int m_length, const unsigned char *sigbuf,
18080                        unsigned int siglen, const RSA *rsa);
18081     /*
18082      * If this callback is NULL, the builtin software RSA key-gen will be
18083      * used. This is for behavioural compatibility whilst the code gets
18084      * rewired, but one day it would be nice to assume there are no such
18085      * things as "builtin software" implementations.
18086      */
18087     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
18088 };
18089 
18090 struct rsa_st {
18091     /*
18092      * The first parameter is used to pickup errors where this is passed
18093      * instead of aEVP_PKEY, it is set to 0
18094      */
18095     int pad;
18096     long version;
18097     const RSA_METHOD *meth;
18098     /* functional reference if 'meth' is ENGINE-provided */
18099     ENGINE *engine;
18100     BIGNUM *n;
18101     BIGNUM *e;
18102     BIGNUM *d;
18103     BIGNUM *p;
18104     BIGNUM *q;
18105     BIGNUM *dmp1;
18106     BIGNUM *dmq1;
18107     BIGNUM *iqmp;
18108     /* be careful using this if the RSA structure is shared */
18109     CRYPTO_EX_DATA ex_data;
18110     int references;
18111     int flags;
18112     /* Used to cache montgomery values */
18113     BN_MONT_CTX *_method_mod_n;
18114     BN_MONT_CTX *_method_mod_p;
18115     BN_MONT_CTX *_method_mod_q;
18116     /*
18117      * all BIGNUM values are actually in the following data, if it is not
18118      * NULL
18119      */
18120     char *bignum_data;
18121     BN_BLINDING *blinding;
18122     BN_BLINDING *mt_blinding;
18123 };
18124 # 176 "/usr/include/openssl/rsa.h" 3 4
18125 /* exponent limit enforced for "large" modulus only */
18126 # 190 "/usr/include/openssl/rsa.h" 3 4
18127 /*
18128  * This flag means the private key operations will be handled by rsa_mod_exp
18129  * and that they do not depend on the private key components being present:
18130  * for example a key stored in external hardware. Without this flag
18131  * bn_mod_exp gets called when private key components are absent.
18132  */
18133 
18134 
18135 /*
18136  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
18137  * functions.
18138  */
18139 
18140 
18141 /*
18142  * new with 0.9.6j and 0.9.7b; the built-in
18143  * RSA implementation now uses blinding by
18144  * default (ignoring RSA_FLAG_BLINDING),
18145  * but other engines might not need it
18146  */
18147 
18148 /*
18149  * new with 0.9.8f; the built-in RSA
18150  * implementation now uses constant time
18151  * operations by default in private key operations,
18152  * e.g., constant time modular exponentiation,
18153  * modular inverse without leaking branches,
18154  * division without leaking branches. This
18155  * flag disables these constant time
18156  * operations and results in faster RSA
18157  * private key operations.
18158  */
18159 # 312 "/usr/include/openssl/rsa.h" 3 4
18160 /* EVP_PKEY_ only */
18161 
18162 
18163 
18164 
18165 
18166 
18167 
18168 RSA *RSA_new(void);
18169 RSA *RSA_new_method(ENGINE *engine);
18170 int RSA_size(const RSA *rsa);
18171 
18172 /* Deprecated version */
18173 
18174 RSA *RSA_generate_key(int bits, unsigned long e, void
18175                        (*callback) (int, int, void *), void *cb_arg);
18176 
18177 
18178 /* New version */
18179 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
18180 
18181 int RSA_check_key(const RSA *);
18182         /* next 4 return -1 on error */
18183 int RSA_public_encrypt(int flen, const unsigned char *from,
18184                        unsigned char *to, RSA *rsa, int padding);
18185 int RSA_private_encrypt(int flen, const unsigned char *from,
18186                         unsigned char *to, RSA *rsa, int padding);
18187 int RSA_public_decrypt(int flen, const unsigned char *from,
18188                        unsigned char *to, RSA *rsa, int padding);
18189 int RSA_private_decrypt(int flen, const unsigned char *from,
18190                         unsigned char *to, RSA *rsa, int padding);
18191 void RSA_free(RSA *r);
18192 /* "up" the RSA object's reference count */
18193 int RSA_up_ref(RSA *r);
18194 
18195 int RSA_flags(const RSA *r);
18196 
18197 void RSA_set_default_method(const RSA_METHOD *meth);
18198 const RSA_METHOD *RSA_get_default_method(void);
18199 const RSA_METHOD *RSA_get_method(const RSA *rsa);
18200 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
18201 
18202 /* This function needs the memory locking malloc callbacks to be installed */
18203 int RSA_memory_lock(RSA *r);
18204 
18205 /* these are the actual SSLeay RSA functions */
18206 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
18207 
18208 const RSA_METHOD *RSA_null_method(void);
18209 
18210 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;
18211 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;
18212 
18213 typedef struct rsa_pss_params_st {
18214     X509_ALGOR *hashAlgorithm;
18215     X509_ALGOR *maskGenAlgorithm;
18216     ASN1_INTEGER *saltLength;
18217     ASN1_INTEGER *trailerField;
18218 } RSA_PSS_PARAMS;
18219 
18220 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;
18221 
18222 typedef struct rsa_oaep_params_st {
18223     X509_ALGOR *hashFunc;
18224     X509_ALGOR *maskGenFunc;
18225     X509_ALGOR *pSourceFunc;
18226 } RSA_OAEP_PARAMS;
18227 
18228 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;
18229 
18230 
18231 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
18232 
18233 
18234 
18235 int RSA_print(BIO *bp, const RSA *r, int offset);
18236 
18237 
18238 
18239 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
18240                 int (*cb) (char *buf, int len, const char *prompt,
18241                            int verify), int sgckey);
18242 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
18243                  int (*cb) (char *buf, int len, const char *prompt,
18244                             int verify), int sgckey);
18245 
18246 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
18247                      int (*cb) (char *buf, int len, const char *prompt,
18248                                 int verify));
18249 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
18250                       int (*cb) (char *buf, int len, const char *prompt,
18251                                  int verify));
18252 
18253 
18254 /*
18255  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
18256  * PKCS#1 padded RSA encryption
18257  */
18258 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
18259              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
18260 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
18261                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
18262 
18263 /*
18264  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
18265  * PKCS#1 padded RSA encryption
18266  */
18267 int RSA_sign_ASN1_OCTET_STRING(int type,
18268                                const unsigned char *m, unsigned int m_length,
18269                                unsigned char *sigret, unsigned int *siglen,
18270                                RSA *rsa);
18271 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
18272                                  unsigned int m_length, unsigned char *sigbuf,
18273                                  unsigned int siglen, RSA *rsa);
18274 
18275 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
18276 void RSA_blinding_off(RSA *rsa);
18277 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
18278 
18279 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
18280                                  const unsigned char *f, int fl);
18281 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
18282                                    const unsigned char *f, int fl,
18283                                    int rsa_len);
18284 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
18285                                  const unsigned char *f, int fl);
18286 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
18287                                    const unsigned char *f, int fl,
18288                                    int rsa_len);
18289 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
18290                long seedlen, const EVP_MD *dgst);
18291 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
18292                                const unsigned char *f, int fl,
18293                                const unsigned char *p, int pl);
18294 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
18295                                  const unsigned char *f, int fl, int rsa_len,
18296                                  const unsigned char *p, int pl);
18297 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
18298                                     const unsigned char *from, int flen,
18299                                     const unsigned char *param, int plen,
18300                                     const EVP_MD *md, const EVP_MD *mgf1md);
18301 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
18302                                       const unsigned char *from, int flen,
18303                                       int num, const unsigned char *param,
18304                                       int plen, const EVP_MD *md,
18305                                       const EVP_MD *mgf1md);
18306 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
18307                            const unsigned char *f, int fl);
18308 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
18309                              const unsigned char *f, int fl, int rsa_len);
18310 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
18311                          int fl);
18312 int RSA_padding_check_none(unsigned char *to, int tlen,
18313                            const unsigned char *f, int fl, int rsa_len);
18314 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
18315                          int fl);
18316 int RSA_padding_check_X931(unsigned char *to, int tlen,
18317                            const unsigned char *f, int fl, int rsa_len);
18318 int RSA_X931_hash_id(int nid);
18319 
18320 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
18321                          const EVP_MD *Hash, const unsigned char *EM,
18322                          int sLen);
18323 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
18324                               const unsigned char *mHash, const EVP_MD *Hash,
18325                               int sLen);
18326 
18327 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
18328                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
18329                               const unsigned char *EM, int sLen);
18330 
18331 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
18332                                    const unsigned char *mHash,
18333                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
18334                                    int sLen);
18335 
18336 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
18337                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
18338 int RSA_set_ex_data(RSA *r, int idx, void *arg);
18339 void *RSA_get_ex_data(const RSA *r, int idx);
18340 
18341 RSA *RSAPublicKey_dup(RSA *rsa);
18342 RSA *RSAPrivateKey_dup(RSA *rsa);
18343 
18344 /*
18345  * If this flag is set the RSA method is FIPS compliant and can be used in
18346  * FIPS mode. This is set in the validated module method. If an application
18347  * sets this flag in its own methods it is its responsibility to ensure the
18348  * result is compliant.
18349  */
18350 
18351 
18352 
18353 /*
18354  * If this flag is set the operations normally disabled in FIPS mode are
18355  * permitted it is then the applications responsibility to ensure that the
18356  * usage is compliant.
18357  */
18358 
18359 
18360 /*
18361  * Application has decided PRNG is good enough to generate a key: don't
18362  * check.
18363  */
18364 
18365 
18366 /* BEGIN ERROR CODES */
18367 /*
18368  * The following lines are auto generated by the script mkerr.pl. Any changes
18369  * made after this point may be overwritten when the script is next run.
18370  */
18371 void ERR_load_RSA_strings(void);
18372 
18373 /* Error codes for the RSA functions. */
18374 
18375 /* Function codes. */
18376 # 592 "/usr/include/openssl/rsa.h" 3 4
18377 /* Reason codes. */
18378 # 97 "/usr/include/openssl/x509.h" 2 3 4
18379 
18380 
18381 # 1 "/usr/include/openssl/dsa.h" 1 3 4
18382 /* crypto/dsa/dsa.h */
18383 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18384  * All rights reserved.
18385  *
18386  * This package is an SSL implementation written
18387  * by Eric Young (eay@cryptsoft.com).
18388  * The implementation was written so as to conform with Netscapes SSL.
18389  *
18390  * This library is free for commercial and non-commercial use as long as
18391  * the following conditions are aheared to.  The following conditions
18392  * apply to all code found in this distribution, be it the RC4, RSA,
18393  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18394  * included with this distribution is covered by the same copyright terms
18395  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18396  *
18397  * Copyright remains Eric Young's, and as such any Copyright notices in
18398  * the code are not to be removed.
18399  * If this package is used in a product, Eric Young should be given attribution
18400  * as the author of the parts of the library used.
18401  * This can be in the form of a textual message at program startup or
18402  * in documentation (online or textual) provided with the package.
18403  *
18404  * Redistribution and use in source and binary forms, with or without
18405  * modification, are permitted provided that the following conditions
18406  * are met:
18407  * 1. Redistributions of source code must retain the copyright
18408  *    notice, this list of conditions and the following disclaimer.
18409  * 2. Redistributions in binary form must reproduce the above copyright
18410  *    notice, this list of conditions and the following disclaimer in the
18411  *    documentation and/or other materials provided with the distribution.
18412  * 3. All advertising materials mentioning features or use of this software
18413  *    must display the following acknowledgement:
18414  *    "This product includes cryptographic software written by
18415  *     Eric Young (eay@cryptsoft.com)"
18416  *    The word 'cryptographic' can be left out if the rouines from the library
18417  *    being used are not cryptographic related :-).
18418  * 4. If you include any Windows specific code (or a derivative thereof) from
18419  *    the apps directory (application code) you must include an acknowledgement:
18420  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18421  *
18422  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18423  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18424  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18425  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18426  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18427  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18428  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18429  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18430  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18431  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18432  * SUCH DAMAGE.
18433  *
18434  * The licence and distribution terms for any publically available version or
18435  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18436  * copied and put under another distribution licence
18437  * [including the GNU Public Licence.]
18438  */
18439 
18440 /*
18441  * The DSS routines are based on patches supplied by
18442  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
18443  * work and I have just tweaked them a little to fit into my
18444  * stylistic vision for SSLeay :-) */
18445 
18446 
18447 
18448 
18449 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
18450 /* e_os2.h */
18451 /* ====================================================================
18452  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
18453  *
18454  * Redistribution and use in source and binary forms, with or without
18455  * modification, are permitted provided that the following conditions
18456  * are met:
18457  *
18458  * 1. Redistributions of source code must retain the above copyright
18459  *    notice, this list of conditions and the following disclaimer.
18460  *
18461  * 2. Redistributions in binary form must reproduce the above copyright
18462  *    notice, this list of conditions and the following disclaimer in
18463  *    the documentation and/or other materials provided with the
18464  *    distribution.
18465  *
18466  * 3. All advertising materials mentioning features or use of this
18467  *    software must display the following acknowledgment:
18468  *    "This product includes software developed by the OpenSSL Project
18469  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18470  *
18471  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18472  *    endorse or promote products derived from this software without
18473  *    prior written permission. For written permission, please contact
18474  *    openssl-core@openssl.org.
18475  *
18476  * 5. Products derived from this software may not be called "OpenSSL"
18477  *    nor may "OpenSSL" appear in their names without prior written
18478  *    permission of the OpenSSL Project.
18479  *
18480  * 6. Redistributions of any form whatsoever must retain the following
18481  *    acknowledgment:
18482  *    "This product includes software developed by the OpenSSL Project
18483  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18484  *
18485  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18486  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18487  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18488  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18489  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18490  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18491  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18492  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18493  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18494  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18495  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18496  * OF THE POSSIBILITY OF SUCH DAMAGE.
18497  * ====================================================================
18498  *
18499  * This product includes cryptographic software written by Eric Young
18500  * (eay@cryptsoft.com).  This product includes software written by Tim
18501  * Hudson (tjh@cryptsoft.com).
18502  *
18503  */
18504 
18505 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
18506 /* opensslconf.h */
18507 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
18508 
18509 
18510 
18511 
18512 /* OpenSSL was configured with the following options: */
18513 # 108 "/usr/include/openssl/opensslconf.h" 3 4
18514 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
18515    asks for it.  This is a transient feature that is provided for those
18516    who haven't had the time to do the appropriate changes in their
18517    applications.  */
18518 # 204 "/usr/include/openssl/opensslconf.h" 3 4
18519 /* crypto/opensslconf.h.in */
18520 
18521 /* Generate 80386 code? */
18522 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
18523 # 69 "/usr/include/openssl/dsa.h" 2 3 4
18524 
18525 
18526 
18527 
18528 
18529 
18530 # 1 "/usr/include/openssl/bio.h" 1 3 4
18531 /* crypto/bio/bio.h */
18532 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18533  * All rights reserved.
18534  *
18535  * This package is an SSL implementation written
18536  * by Eric Young (eay@cryptsoft.com).
18537  * The implementation was written so as to conform with Netscapes SSL.
18538  *
18539  * This library is free for commercial and non-commercial use as long as
18540  * the following conditions are aheared to.  The following conditions
18541  * apply to all code found in this distribution, be it the RC4, RSA,
18542  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18543  * included with this distribution is covered by the same copyright terms
18544  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18545  *
18546  * Copyright remains Eric Young's, and as such any Copyright notices in
18547  * the code are not to be removed.
18548  * If this package is used in a product, Eric Young should be given attribution
18549  * as the author of the parts of the library used.
18550  * This can be in the form of a textual message at program startup or
18551  * in documentation (online or textual) provided with the package.
18552  *
18553  * Redistribution and use in source and binary forms, with or without
18554  * modification, are permitted provided that the following conditions
18555  * are met:
18556  * 1. Redistributions of source code must retain the copyright
18557  *    notice, this list of conditions and the following disclaimer.
18558  * 2. Redistributions in binary form must reproduce the above copyright
18559  *    notice, this list of conditions and the following disclaimer in the
18560  *    documentation and/or other materials provided with the distribution.
18561  * 3. All advertising materials mentioning features or use of this software
18562  *    must display the following acknowledgement:
18563  *    "This product includes cryptographic software written by
18564  *     Eric Young (eay@cryptsoft.com)"
18565  *    The word 'cryptographic' can be left out if the rouines from the library
18566  *    being used are not cryptographic related :-).
18567  * 4. If you include any Windows specific code (or a derivative thereof) from
18568  *    the apps directory (application code) you must include an acknowledgement:
18569  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18570  *
18571  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18572  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18573  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18574  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18575  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18576  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18577  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18578  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18579  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18580  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18581  * SUCH DAMAGE.
18582  *
18583  * The licence and distribution terms for any publically available version or
18584  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18585  * copied and put under another distribution licence
18586  * [including the GNU Public Licence.]
18587  */
18588 # 76 "/usr/include/openssl/dsa.h" 2 3 4
18589 
18590 # 1 "/usr/include/openssl/crypto.h" 1 3 4
18591 /* crypto/crypto.h */
18592 /* ====================================================================
18593  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
18594  *
18595  * Redistribution and use in source and binary forms, with or without
18596  * modification, are permitted provided that the following conditions
18597  * are met:
18598  *
18599  * 1. Redistributions of source code must retain the above copyright
18600  *    notice, this list of conditions and the following disclaimer.
18601  *
18602  * 2. Redistributions in binary form must reproduce the above copyright
18603  *    notice, this list of conditions and the following disclaimer in
18604  *    the documentation and/or other materials provided with the
18605  *    distribution.
18606  *
18607  * 3. All advertising materials mentioning features or use of this
18608  *    software must display the following acknowledgment:
18609  *    "This product includes software developed by the OpenSSL Project
18610  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18611  *
18612  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18613  *    endorse or promote products derived from this software without
18614  *    prior written permission. For written permission, please contact
18615  *    openssl-core@openssl.org.
18616  *
18617  * 5. Products derived from this software may not be called "OpenSSL"
18618  *    nor may "OpenSSL" appear in their names without prior written
18619  *    permission of the OpenSSL Project.
18620  *
18621  * 6. Redistributions of any form whatsoever must retain the following
18622  *    acknowledgment:
18623  *    "This product includes software developed by the OpenSSL Project
18624  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18625  *
18626  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18627  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18628  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18629  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18630  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18631  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18632  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18633  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18634  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18635  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18636  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18637  * OF THE POSSIBILITY OF SUCH DAMAGE.
18638  * ====================================================================
18639  *
18640  * This product includes cryptographic software written by Eric Young
18641  * (eay@cryptsoft.com).  This product includes software written by Tim
18642  * Hudson (tjh@cryptsoft.com).
18643  *
18644  */
18645 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18646  * All rights reserved.
18647  *
18648  * This package is an SSL implementation written
18649  * by Eric Young (eay@cryptsoft.com).
18650  * The implementation was written so as to conform with Netscapes SSL.
18651  *
18652  * This library is free for commercial and non-commercial use as long as
18653  * the following conditions are aheared to.  The following conditions
18654  * apply to all code found in this distribution, be it the RC4, RSA,
18655  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18656  * included with this distribution is covered by the same copyright terms
18657  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18658  *
18659  * Copyright remains Eric Young's, and as such any Copyright notices in
18660  * the code are not to be removed.
18661  * If this package is used in a product, Eric Young should be given attribution
18662  * as the author of the parts of the library used.
18663  * This can be in the form of a textual message at program startup or
18664  * in documentation (online or textual) provided with the package.
18665  *
18666  * Redistribution and use in source and binary forms, with or without
18667  * modification, are permitted provided that the following conditions
18668  * are met:
18669  * 1. Redistributions of source code must retain the copyright
18670  *    notice, this list of conditions and the following disclaimer.
18671  * 2. Redistributions in binary form must reproduce the above copyright
18672  *    notice, this list of conditions and the following disclaimer in the
18673  *    documentation and/or other materials provided with the distribution.
18674  * 3. All advertising materials mentioning features or use of this software
18675  *    must display the following acknowledgement:
18676  *    "This product includes cryptographic software written by
18677  *     Eric Young (eay@cryptsoft.com)"
18678  *    The word 'cryptographic' can be left out if the rouines from the library
18679  *    being used are not cryptographic related :-).
18680  * 4. If you include any Windows specific code (or a derivative thereof) from
18681  *    the apps directory (application code) you must include an acknowledgement:
18682  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18683  *
18684  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18685  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18686  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18687  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18688  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18689  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18690  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18691  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18692  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18693  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18694  * SUCH DAMAGE.
18695  *
18696  * The licence and distribution terms for any publically available version or
18697  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18698  * copied and put under another distribution licence
18699  * [including the GNU Public Licence.]
18700  */
18701 /* ====================================================================
18702  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18703  * ECDH support in OpenSSL originally developed by
18704  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
18705  */
18706 # 78 "/usr/include/openssl/dsa.h" 2 3 4
18707 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
18708 /* ====================================================================
18709  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
18710  *
18711  * Redistribution and use in source and binary forms, with or without
18712  * modification, are permitted provided that the following conditions
18713  * are met:
18714  *
18715  * 1. Redistributions of source code must retain the above copyright
18716  *    notice, this list of conditions and the following disclaimer.
18717  *
18718  * 2. Redistributions in binary form must reproduce the above copyright
18719  *    notice, this list of conditions and the following disclaimer in
18720  *    the documentation and/or other materials provided with the
18721  *    distribution.
18722  *
18723  * 3. All advertising materials mentioning features or use of this
18724  *    software must display the following acknowledgment:
18725  *    "This product includes software developed by the OpenSSL Project
18726  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18727  *
18728  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18729  *    endorse or promote products derived from this software without
18730  *    prior written permission. For written permission, please contact
18731  *    openssl-core@openssl.org.
18732  *
18733  * 5. Products derived from this software may not be called "OpenSSL"
18734  *    nor may "OpenSSL" appear in their names without prior written
18735  *    permission of the OpenSSL Project.
18736  *
18737  * 6. Redistributions of any form whatsoever must retain the following
18738  *    acknowledgment:
18739  *    "This product includes software developed by the OpenSSL Project
18740  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18741  *
18742  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18743  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18744  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18745  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18746  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18747  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18748  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18749  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18750  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18751  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18752  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18753  * OF THE POSSIBILITY OF SUCH DAMAGE.
18754  * ====================================================================
18755  *
18756  * This product includes cryptographic software written by Eric Young
18757  * (eay@cryptsoft.com).  This product includes software written by Tim
18758  * Hudson (tjh@cryptsoft.com).
18759  *
18760  */
18761 # 79 "/usr/include/openssl/dsa.h" 2 3 4
18762 
18763 
18764 # 1 "/usr/include/openssl/bn.h" 1 3 4
18765 /* crypto/bn/bn.h */
18766 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18767  * All rights reserved.
18768  *
18769  * This package is an SSL implementation written
18770  * by Eric Young (eay@cryptsoft.com).
18771  * The implementation was written so as to conform with Netscapes SSL.
18772  *
18773  * This library is free for commercial and non-commercial use as long as
18774  * the following conditions are aheared to.  The following conditions
18775  * apply to all code found in this distribution, be it the RC4, RSA,
18776  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18777  * included with this distribution is covered by the same copyright terms
18778  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18779  *
18780  * Copyright remains Eric Young's, and as such any Copyright notices in
18781  * the code are not to be removed.
18782  * If this package is used in a product, Eric Young should be given attribution
18783  * as the author of the parts of the library used.
18784  * This can be in the form of a textual message at program startup or
18785  * in documentation (online or textual) provided with the package.
18786  *
18787  * Redistribution and use in source and binary forms, with or without
18788  * modification, are permitted provided that the following conditions
18789  * are met:
18790  * 1. Redistributions of source code must retain the copyright
18791  *    notice, this list of conditions and the following disclaimer.
18792  * 2. Redistributions in binary form must reproduce the above copyright
18793  *    notice, this list of conditions and the following disclaimer in the
18794  *    documentation and/or other materials provided with the distribution.
18795  * 3. All advertising materials mentioning features or use of this software
18796  *    must display the following acknowledgement:
18797  *    "This product includes cryptographic software written by
18798  *     Eric Young (eay@cryptsoft.com)"
18799  *    The word 'cryptographic' can be left out if the rouines from the library
18800  *    being used are not cryptographic related :-).
18801  * 4. If you include any Windows specific code (or a derivative thereof) from
18802  *    the apps directory (application code) you must include an acknowledgement:
18803  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18804  *
18805  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18806  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18807  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18808  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18809  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18810  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18811  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18812  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18813  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18814  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18815  * SUCH DAMAGE.
18816  *
18817  * The licence and distribution terms for any publically available version or
18818  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18819  * copied and put under another distribution licence
18820  * [including the GNU Public Licence.]
18821  */
18822 /* ====================================================================
18823  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18824  *
18825  * Redistribution and use in source and binary forms, with or without
18826  * modification, are permitted provided that the following conditions
18827  * are met:
18828  *
18829  * 1. Redistributions of source code must retain the above copyright
18830  *    notice, this list of conditions and the following disclaimer.
18831  *
18832  * 2. Redistributions in binary form must reproduce the above copyright
18833  *    notice, this list of conditions and the following disclaimer in
18834  *    the documentation and/or other materials provided with the
18835  *    distribution.
18836  *
18837  * 3. All advertising materials mentioning features or use of this
18838  *    software must display the following acknowledgment:
18839  *    "This product includes software developed by the OpenSSL Project
18840  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18841  *
18842  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18843  *    endorse or promote products derived from this software without
18844  *    prior written permission. For written permission, please contact
18845  *    openssl-core@openssl.org.
18846  *
18847  * 5. Products derived from this software may not be called "OpenSSL"
18848  *    nor may "OpenSSL" appear in their names without prior written
18849  *    permission of the OpenSSL Project.
18850  *
18851  * 6. Redistributions of any form whatsoever must retain the following
18852  *    acknowledgment:
18853  *    "This product includes software developed by the OpenSSL Project
18854  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18855  *
18856  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18857  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18858  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18859  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18860  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18861  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18862  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18863  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18864  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18865  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18866  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18867  * OF THE POSSIBILITY OF SUCH DAMAGE.
18868  * ====================================================================
18869  *
18870  * This product includes cryptographic software written by Eric Young
18871  * (eay@cryptsoft.com).  This product includes software written by Tim
18872  * Hudson (tjh@cryptsoft.com).
18873  *
18874  */
18875 /* ====================================================================
18876  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18877  *
18878  * Portions of the attached software ("Contribution") are developed by
18879  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18880  *
18881  * The Contribution is licensed pursuant to the Eric Young open source
18882  * license provided above.
18883  *
18884  * The binary polynomial arithmetic software is originally written by
18885  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18886  *
18887  */
18888 # 82 "/usr/include/openssl/dsa.h" 2 3 4
18889 
18890 # 1 "/usr/include/openssl/dh.h" 1 3 4
18891 /* crypto/dh/dh.h */
18892 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18893  * All rights reserved.
18894  *
18895  * This package is an SSL implementation written
18896  * by Eric Young (eay@cryptsoft.com).
18897  * The implementation was written so as to conform with Netscapes SSL.
18898  *
18899  * This library is free for commercial and non-commercial use as long as
18900  * the following conditions are aheared to.  The following conditions
18901  * apply to all code found in this distribution, be it the RC4, RSA,
18902  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18903  * included with this distribution is covered by the same copyright terms
18904  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18905  *
18906  * Copyright remains Eric Young's, and as such any Copyright notices in
18907  * the code are not to be removed.
18908  * If this package is used in a product, Eric Young should be given attribution
18909  * as the author of the parts of the library used.
18910  * This can be in the form of a textual message at program startup or
18911  * in documentation (online or textual) provided with the package.
18912  *
18913  * Redistribution and use in source and binary forms, with or without
18914  * modification, are permitted provided that the following conditions
18915  * are met:
18916  * 1. Redistributions of source code must retain the copyright
18917  *    notice, this list of conditions and the following disclaimer.
18918  * 2. Redistributions in binary form must reproduce the above copyright
18919  *    notice, this list of conditions and the following disclaimer in the
18920  *    documentation and/or other materials provided with the distribution.
18921  * 3. All advertising materials mentioning features or use of this software
18922  *    must display the following acknowledgement:
18923  *    "This product includes cryptographic software written by
18924  *     Eric Young (eay@cryptsoft.com)"
18925  *    The word 'cryptographic' can be left out if the rouines from the library
18926  *    being used are not cryptographic related :-).
18927  * 4. If you include any Windows specific code (or a derivative thereof) from
18928  *    the apps directory (application code) you must include an acknowledgement:
18929  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18930  *
18931  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18932  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18933  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18934  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18935  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18936  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18937  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18938  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18939  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18940  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18941  * SUCH DAMAGE.
18942  *
18943  * The licence and distribution terms for any publically available version or
18944  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18945  * copied and put under another distribution licence
18946  * [including the GNU Public Licence.]
18947  */
18948 
18949 
18950 
18951 
18952 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
18953 /* e_os2.h */
18954 /* ====================================================================
18955  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
18956  *
18957  * Redistribution and use in source and binary forms, with or without
18958  * modification, are permitted provided that the following conditions
18959  * are met:
18960  *
18961  * 1. Redistributions of source code must retain the above copyright
18962  *    notice, this list of conditions and the following disclaimer.
18963  *
18964  * 2. Redistributions in binary form must reproduce the above copyright
18965  *    notice, this list of conditions and the following disclaimer in
18966  *    the documentation and/or other materials provided with the
18967  *    distribution.
18968  *
18969  * 3. All advertising materials mentioning features or use of this
18970  *    software must display the following acknowledgment:
18971  *    "This product includes software developed by the OpenSSL Project
18972  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18973  *
18974  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18975  *    endorse or promote products derived from this software without
18976  *    prior written permission. For written permission, please contact
18977  *    openssl-core@openssl.org.
18978  *
18979  * 5. Products derived from this software may not be called "OpenSSL"
18980  *    nor may "OpenSSL" appear in their names without prior written
18981  *    permission of the OpenSSL Project.
18982  *
18983  * 6. Redistributions of any form whatsoever must retain the following
18984  *    acknowledgment:
18985  *    "This product includes software developed by the OpenSSL Project
18986  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18987  *
18988  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18989  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18990  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18991  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18992  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18993  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18994  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18995  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18996  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18997  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18998  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18999  * OF THE POSSIBILITY OF SUCH DAMAGE.
19000  * ====================================================================
19001  *
19002  * This product includes cryptographic software written by Eric Young
19003  * (eay@cryptsoft.com).  This product includes software written by Tim
19004  * Hudson (tjh@cryptsoft.com).
19005  *
19006  */
19007 
19008 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19009 /* opensslconf.h */
19010 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19011 
19012 
19013 
19014 
19015 /* OpenSSL was configured with the following options: */
19016 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19017 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19018    asks for it.  This is a transient feature that is provided for those
19019    who haven't had the time to do the appropriate changes in their
19020    applications.  */
19021 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19022 /* crypto/opensslconf.h.in */
19023 
19024 /* Generate 80386 code? */
19025 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19026 # 63 "/usr/include/openssl/dh.h" 2 3 4
19027 
19028 
19029 
19030 
19031 
19032 
19033 # 1 "/usr/include/openssl/bio.h" 1 3 4
19034 /* crypto/bio/bio.h */
19035 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19036  * All rights reserved.
19037  *
19038  * This package is an SSL implementation written
19039  * by Eric Young (eay@cryptsoft.com).
19040  * The implementation was written so as to conform with Netscapes SSL.
19041  *
19042  * This library is free for commercial and non-commercial use as long as
19043  * the following conditions are aheared to.  The following conditions
19044  * apply to all code found in this distribution, be it the RC4, RSA,
19045  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19046  * included with this distribution is covered by the same copyright terms
19047  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19048  *
19049  * Copyright remains Eric Young's, and as such any Copyright notices in
19050  * the code are not to be removed.
19051  * If this package is used in a product, Eric Young should be given attribution
19052  * as the author of the parts of the library used.
19053  * This can be in the form of a textual message at program startup or
19054  * in documentation (online or textual) provided with the package.
19055  *
19056  * Redistribution and use in source and binary forms, with or without
19057  * modification, are permitted provided that the following conditions
19058  * are met:
19059  * 1. Redistributions of source code must retain the copyright
19060  *    notice, this list of conditions and the following disclaimer.
19061  * 2. Redistributions in binary form must reproduce the above copyright
19062  *    notice, this list of conditions and the following disclaimer in the
19063  *    documentation and/or other materials provided with the distribution.
19064  * 3. All advertising materials mentioning features or use of this software
19065  *    must display the following acknowledgement:
19066  *    "This product includes cryptographic software written by
19067  *     Eric Young (eay@cryptsoft.com)"
19068  *    The word 'cryptographic' can be left out if the rouines from the library
19069  *    being used are not cryptographic related :-).
19070  * 4. If you include any Windows specific code (or a derivative thereof) from
19071  *    the apps directory (application code) you must include an acknowledgement:
19072  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19073  *
19074  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19075  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19076  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19077  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19078  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19079  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19080  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19081  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19082  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19083  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19084  * SUCH DAMAGE.
19085  *
19086  * The licence and distribution terms for any publically available version or
19087  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19088  * copied and put under another distribution licence
19089  * [including the GNU Public Licence.]
19090  */
19091 # 70 "/usr/include/openssl/dh.h" 2 3 4
19092 
19093 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19094 /* ====================================================================
19095  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19096  *
19097  * Redistribution and use in source and binary forms, with or without
19098  * modification, are permitted provided that the following conditions
19099  * are met:
19100  *
19101  * 1. Redistributions of source code must retain the above copyright
19102  *    notice, this list of conditions and the following disclaimer.
19103  *
19104  * 2. Redistributions in binary form must reproduce the above copyright
19105  *    notice, this list of conditions and the following disclaimer in
19106  *    the documentation and/or other materials provided with the
19107  *    distribution.
19108  *
19109  * 3. All advertising materials mentioning features or use of this
19110  *    software must display the following acknowledgment:
19111  *    "This product includes software developed by the OpenSSL Project
19112  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19113  *
19114  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19115  *    endorse or promote products derived from this software without
19116  *    prior written permission. For written permission, please contact
19117  *    openssl-core@openssl.org.
19118  *
19119  * 5. Products derived from this software may not be called "OpenSSL"
19120  *    nor may "OpenSSL" appear in their names without prior written
19121  *    permission of the OpenSSL Project.
19122  *
19123  * 6. Redistributions of any form whatsoever must retain the following
19124  *    acknowledgment:
19125  *    "This product includes software developed by the OpenSSL Project
19126  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19127  *
19128  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19129  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19130  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19131  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19132  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19133  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19134  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19135  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19136  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19137  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19138  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19139  * OF THE POSSIBILITY OF SUCH DAMAGE.
19140  * ====================================================================
19141  *
19142  * This product includes cryptographic software written by Eric Young
19143  * (eay@cryptsoft.com).  This product includes software written by Tim
19144  * Hudson (tjh@cryptsoft.com).
19145  *
19146  */
19147 # 72 "/usr/include/openssl/dh.h" 2 3 4
19148 
19149 # 1 "/usr/include/openssl/bn.h" 1 3 4
19150 /* crypto/bn/bn.h */
19151 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
19152  * All rights reserved.
19153  *
19154  * This package is an SSL implementation written
19155  * by Eric Young (eay@cryptsoft.com).
19156  * The implementation was written so as to conform with Netscapes SSL.
19157  *
19158  * This library is free for commercial and non-commercial use as long as
19159  * the following conditions are aheared to.  The following conditions
19160  * apply to all code found in this distribution, be it the RC4, RSA,
19161  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19162  * included with this distribution is covered by the same copyright terms
19163  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19164  *
19165  * Copyright remains Eric Young's, and as such any Copyright notices in
19166  * the code are not to be removed.
19167  * If this package is used in a product, Eric Young should be given attribution
19168  * as the author of the parts of the library used.
19169  * This can be in the form of a textual message at program startup or
19170  * in documentation (online or textual) provided with the package.
19171  *
19172  * Redistribution and use in source and binary forms, with or without
19173  * modification, are permitted provided that the following conditions
19174  * are met:
19175  * 1. Redistributions of source code must retain the copyright
19176  *    notice, this list of conditions and the following disclaimer.
19177  * 2. Redistributions in binary form must reproduce the above copyright
19178  *    notice, this list of conditions and the following disclaimer in the
19179  *    documentation and/or other materials provided with the distribution.
19180  * 3. All advertising materials mentioning features or use of this software
19181  *    must display the following acknowledgement:
19182  *    "This product includes cryptographic software written by
19183  *     Eric Young (eay@cryptsoft.com)"
19184  *    The word 'cryptographic' can be left out if the rouines from the library
19185  *    being used are not cryptographic related :-).
19186  * 4. If you include any Windows specific code (or a derivative thereof) from
19187  *    the apps directory (application code) you must include an acknowledgement:
19188  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19189  *
19190  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19191  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19192  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19193  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19194  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19195  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19196  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19197  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19198  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19199  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19200  * SUCH DAMAGE.
19201  *
19202  * The licence and distribution terms for any publically available version or
19203  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19204  * copied and put under another distribution licence
19205  * [including the GNU Public Licence.]
19206  */
19207 /* ====================================================================
19208  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
19209  *
19210  * Redistribution and use in source and binary forms, with or without
19211  * modification, are permitted provided that the following conditions
19212  * are met:
19213  *
19214  * 1. Redistributions of source code must retain the above copyright
19215  *    notice, this list of conditions and the following disclaimer.
19216  *
19217  * 2. Redistributions in binary form must reproduce the above copyright
19218  *    notice, this list of conditions and the following disclaimer in
19219  *    the documentation and/or other materials provided with the
19220  *    distribution.
19221  *
19222  * 3. All advertising materials mentioning features or use of this
19223  *    software must display the following acknowledgment:
19224  *    "This product includes software developed by the OpenSSL Project
19225  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19226  *
19227  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19228  *    endorse or promote products derived from this software without
19229  *    prior written permission. For written permission, please contact
19230  *    openssl-core@openssl.org.
19231  *
19232  * 5. Products derived from this software may not be called "OpenSSL"
19233  *    nor may "OpenSSL" appear in their names without prior written
19234  *    permission of the OpenSSL Project.
19235  *
19236  * 6. Redistributions of any form whatsoever must retain the following
19237  *    acknowledgment:
19238  *    "This product includes software developed by the OpenSSL Project
19239  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19240  *
19241  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19242  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19243  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19244  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19245  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19246  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19247  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19248  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19249  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19250  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19251  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19252  * OF THE POSSIBILITY OF SUCH DAMAGE.
19253  * ====================================================================
19254  *
19255  * This product includes cryptographic software written by Eric Young
19256  * (eay@cryptsoft.com).  This product includes software written by Tim
19257  * Hudson (tjh@cryptsoft.com).
19258  *
19259  */
19260 /* ====================================================================
19261  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19262  *
19263  * Portions of the attached software ("Contribution") are developed by
19264  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19265  *
19266  * The Contribution is licensed pursuant to the Eric Young open source
19267  * license provided above.
19268  *
19269  * The binary polynomial arithmetic software is originally written by
19270  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19271  *
19272  */
19273 # 74 "/usr/include/openssl/dh.h" 2 3 4
19274 # 82 "/usr/include/openssl/dh.h" 3 4
19275 /*
19276  * new with 0.9.7h; the built-in DH
19277  * implementation now uses constant time
19278  * modular exponentiation for secret exponents
19279  * by default. This flag causes the
19280  * faster variable sliding window method to
19281  * be used for all exponents.
19282  */
19283 
19284 
19285 /*
19286  * If this flag is set the DH method is FIPS compliant and can be used in
19287  * FIPS mode. This is set in the validated module method. If an application
19288  * sets this flag in its own methods it is its reposibility to ensure the
19289  * result is compliant.
19290  */
19291 
19292 
19293 
19294 /*
19295  * If this flag is set the operations normally disabled in FIPS mode are
19296  * permitted it is then the applications responsibility to ensure that the
19297  * usage is compliant.
19298  */
19299 
19300 
19301 
19302 
19303 
19304 
19305 
19306 /* Already defined in ossl_typ.h */
19307 /* typedef struct dh_st DH; */
19308 /* typedef struct dh_method DH_METHOD; */
19309 
19310 struct dh_method {
19311     const char *name;
19312     /* Methods here */
19313     int (*generate_key) (DH *dh);
19314     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
19315     /* Can be null */
19316     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
19317                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
19318                        BN_MONT_CTX *m_ctx);
19319     int (*init) (DH *dh);
19320     int (*finish) (DH *dh);
19321     int flags;
19322     char *app_data;
19323     /* If this is non-NULL, it will be used to generate parameters */
19324     int (*generate_params) (DH *dh, int prime_len, int generator,
19325                             BN_GENCB *cb);
19326 };
19327 
19328 struct dh_st {
19329     /*
19330      * This first argument is used to pick up errors when a DH is passed
19331      * instead of a EVP_PKEY
19332      */
19333     int pad;
19334     int version;
19335     BIGNUM *p;
19336     BIGNUM *g;
19337     long length; /* optional */
19338     BIGNUM *pub_key; /* g^x % p */
19339     BIGNUM *priv_key; /* x */
19340     int flags;
19341     BN_MONT_CTX *method_mont_p;
19342     /* Place holders if we want to do X9.42 DH */
19343     BIGNUM *q;
19344     BIGNUM *j;
19345     unsigned char *seed;
19346     int seedlen;
19347     BIGNUM *counter;
19348     int references;
19349     CRYPTO_EX_DATA ex_data;
19350     const DH_METHOD *meth;
19351     ENGINE *engine;
19352 };
19353 
19354 
19355 /* #define DH_GENERATOR_3       3 */
19356 
19357 
19358 /* DH_check error codes */
19359 # 174 "/usr/include/openssl/dh.h" 3 4
19360 /* DH_check_pub_key error codes */
19361 
19362 
19363 
19364 
19365 /*
19366  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
19367  * backward compatibility:
19368  */
19369 # 209 "/usr/include/openssl/dh.h" 3 4
19370 DH *DHparams_dup(DH *);
19371 
19372 const DH_METHOD *DH_OpenSSL(void);
19373 
19374 void DH_set_default_method(const DH_METHOD *meth);
19375 const DH_METHOD *DH_get_default_method(void);
19376 int DH_set_method(DH *dh, const DH_METHOD *meth);
19377 DH *DH_new_method(ENGINE *engine);
19378 
19379 DH *DH_new(void);
19380 void DH_free(DH *dh);
19381 int DH_up_ref(DH *dh);
19382 int DH_size(const DH *dh);
19383 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
19384                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
19385 int DH_set_ex_data(DH *d, int idx, void *arg);
19386 void *DH_get_ex_data(DH *d, int idx);
19387 
19388 /* Deprecated version */
19389 
19390 DH *DH_generate_parameters(int prime_len, int generator,
19391                            void (*callback) (int, int, void *), void *cb_arg);
19392 
19393 
19394 /* New version */
19395 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
19396                               BN_GENCB *cb);
19397 
19398 int DH_check(const DH *dh, int *codes);
19399 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
19400 int DH_generate_key(DH *dh);
19401 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
19402 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
19403 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
19404 int i2d_DHparams(const DH *a, unsigned char **pp);
19405 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
19406 int i2d_DHxparams(const DH *a, unsigned char **pp);
19407 
19408 int DHparams_print_fp(FILE *fp, const DH *x);
19409 
19410 
19411 int DHparams_print(BIO *bp, const DH *x);
19412 
19413 
19414 
19415 
19416 /* RFC 5114 parameters */
19417 DH *DH_get_1024_160(void);
19418 DH *DH_get_2048_224(void);
19419 DH *DH_get_2048_256(void);
19420 
19421 
19422 /* RFC2631 KDF */
19423 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
19424                  const unsigned char *Z, size_t Zlen,
19425                  ASN1_OBJECT *key_oid,
19426                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
19427 # 357 "/usr/include/openssl/dh.h" 3 4
19428 /* KDF types */
19429 
19430 
19431 
19432 /* BEGIN ERROR CODES */
19433 /*
19434  * The following lines are auto generated by the script mkerr.pl. Any changes
19435  * made after this point may be overwritten when the script is next run.
19436  */
19437 void ERR_load_DH_strings(void);
19438 
19439 /* Error codes for the DH functions. */
19440 
19441 /* Function codes. */
19442 # 392 "/usr/include/openssl/dh.h" 3 4
19443 /* Reason codes. */
19444 # 84 "/usr/include/openssl/dsa.h" 2 3 4
19445 # 92 "/usr/include/openssl/dsa.h" 3 4
19446 /*
19447  * new with 0.9.7h; the built-in DSA implementation now uses constant time
19448  * modular exponentiation for secret exponents by default. This flag causes
19449  * the faster variable sliding window method to be used for all exponents.
19450  */
19451 
19452 
19453 /*
19454  * If this flag is set the DSA method is FIPS compliant and can be used in
19455  * FIPS mode. This is set in the validated module method. If an application
19456  * sets this flag in its own methods it is its reposibility to ensure the
19457  * result is compliant.
19458  */
19459 
19460 
19461 
19462 /*
19463  * If this flag is set the operations normally disabled in FIPS mode are
19464  * permitted it is then the applications responsibility to ensure that the
19465  * usage is compliant.
19466  */
19467 
19468 
19469 
19470 
19471 
19472 
19473 
19474 /* Already defined in ossl_typ.h */
19475 /* typedef struct dsa_st DSA; */
19476 /* typedef struct dsa_method DSA_METHOD; */
19477 
19478 typedef struct DSA_SIG_st {
19479     BIGNUM *r;
19480     BIGNUM *s;
19481 } DSA_SIG;
19482 
19483 struct dsa_method {
19484     const char *name;
19485     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
19486     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
19487                            BIGNUM **rp);
19488     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
19489                           DSA_SIG *sig, DSA *dsa);
19490     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
19491                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
19492                         BN_MONT_CTX *in_mont);
19493     /* Can be null */
19494     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
19495                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
19496     int (*init) (DSA *dsa);
19497     int (*finish) (DSA *dsa);
19498     int flags;
19499     char *app_data;
19500     /* If this is non-NULL, it is used to generate DSA parameters */
19501     int (*dsa_paramgen) (DSA *dsa, int bits,
19502                          const unsigned char *seed, int seed_len,
19503                          int *counter_ret, unsigned long *h_ret,
19504                          BN_GENCB *cb);
19505     /* If this is non-NULL, it is used to generate DSA keys */
19506     int (*dsa_keygen) (DSA *dsa);
19507 };
19508 
19509 struct dsa_st {
19510     /*
19511      * This first variable is used to pick up errors where a DSA is passed
19512      * instead of of a EVP_PKEY
19513      */
19514     int pad;
19515     long version;
19516     int write_params;
19517     BIGNUM *p;
19518     BIGNUM *q; /* == 20 */
19519     BIGNUM *g;
19520     BIGNUM *pub_key; /* y public key */
19521     BIGNUM *priv_key; /* x private key */
19522     BIGNUM *kinv; /* Signing pre-calc */
19523     BIGNUM *r; /* Signing pre-calc */
19524     int flags;
19525     /* Normally used to cache montgomery values */
19526     BN_MONT_CTX *method_mont_p;
19527     int references;
19528     CRYPTO_EX_DATA ex_data;
19529     const DSA_METHOD *meth;
19530     /* functional reference if 'meth' is ENGINE-provided */
19531     ENGINE *engine;
19532 };
19533 # 187 "/usr/include/openssl/dsa.h" 3 4
19534 DSA *DSAparams_dup(DSA *x);
19535 DSA_SIG *DSA_SIG_new(void);
19536 void DSA_SIG_free(DSA_SIG *a);
19537 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
19538 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
19539 
19540 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
19541 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
19542                   DSA_SIG *sig, DSA *dsa);
19543 
19544 const DSA_METHOD *DSA_OpenSSL(void);
19545 
19546 void DSA_set_default_method(const DSA_METHOD *);
19547 const DSA_METHOD *DSA_get_default_method(void);
19548 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
19549 
19550 DSA *DSA_new(void);
19551 DSA *DSA_new_method(ENGINE *engine);
19552 void DSA_free(DSA *r);
19553 /* "up" the DSA object's reference count */
19554 int DSA_up_ref(DSA *r);
19555 int DSA_size(const DSA *);
19556         /* next 4 return -1 on error */
19557 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
19558 int DSA_sign(int type, const unsigned char *dgst, int dlen,
19559              unsigned char *sig, unsigned int *siglen, DSA *dsa);
19560 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
19561                const unsigned char *sigbuf, int siglen, DSA *dsa);
19562 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
19563                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
19564 int DSA_set_ex_data(DSA *d, int idx, void *arg);
19565 void *DSA_get_ex_data(DSA *d, int idx);
19566 
19567 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
19568 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
19569 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
19570 
19571 /* Deprecated version */
19572 
19573 DSA *DSA_generate_parameters(int bits,
19574                              unsigned char *seed, int seed_len,
19575                              int *counter_ret, unsigned long *h_ret, void
19576                               (*callback) (int, int, void *), void *cb_arg);
19577 
19578 
19579 /* New version */
19580 int DSA_generate_parameters_ex(DSA *dsa, int bits,
19581                                const unsigned char *seed, int seed_len,
19582                                int *counter_ret, unsigned long *h_ret,
19583                                BN_GENCB *cb);
19584 
19585 int DSA_generate_key(DSA *a);
19586 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
19587 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
19588 int i2d_DSAparams(const DSA *a, unsigned char **pp);
19589 
19590 
19591 int DSAparams_print(BIO *bp, const DSA *x);
19592 int DSA_print(BIO *bp, const DSA *x, int off);
19593 
19594 
19595 int DSAparams_print_fp(FILE *fp, const DSA *x);
19596 int DSA_print_fp(FILE *bp, const DSA *x, int off);
19597 
19598 
19599 
19600 /*
19601  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
19602  * have one value here we set the number of checks to 64 which is the 128 bit
19603  * security level that is the highest level and valid for creating a 3072 bit
19604  * DSA key.
19605  */
19606 
19607 
19608 
19609 
19610 /*
19611  * Convert DSA structure (key or just parameters) into DH structure (be
19612  * careful to avoid small subgroup attacks when using this!)
19613  */
19614 DH *DSA_dup_DH(const DSA *r);
19615 # 278 "/usr/include/openssl/dsa.h" 3 4
19616 /* BEGIN ERROR CODES */
19617 /*
19618  * The following lines are auto generated by the script mkerr.pl. Any changes
19619  * made after this point may be overwritten when the script is next run.
19620  */
19621 void ERR_load_DSA_strings(void);
19622 
19623 /* Error codes for the DSA functions. */
19624 
19625 /* Function codes. */
19626 # 316 "/usr/include/openssl/dsa.h" 3 4
19627 /* Reason codes. */
19628 # 100 "/usr/include/openssl/x509.h" 2 3 4
19629 
19630 
19631 # 1 "/usr/include/openssl/dh.h" 1 3 4
19632 /* crypto/dh/dh.h */
19633 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19634  * All rights reserved.
19635  *
19636  * This package is an SSL implementation written
19637  * by Eric Young (eay@cryptsoft.com).
19638  * The implementation was written so as to conform with Netscapes SSL.
19639  *
19640  * This library is free for commercial and non-commercial use as long as
19641  * the following conditions are aheared to.  The following conditions
19642  * apply to all code found in this distribution, be it the RC4, RSA,
19643  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19644  * included with this distribution is covered by the same copyright terms
19645  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19646  *
19647  * Copyright remains Eric Young's, and as such any Copyright notices in
19648  * the code are not to be removed.
19649  * If this package is used in a product, Eric Young should be given attribution
19650  * as the author of the parts of the library used.
19651  * This can be in the form of a textual message at program startup or
19652  * in documentation (online or textual) provided with the package.
19653  *
19654  * Redistribution and use in source and binary forms, with or without
19655  * modification, are permitted provided that the following conditions
19656  * are met:
19657  * 1. Redistributions of source code must retain the copyright
19658  *    notice, this list of conditions and the following disclaimer.
19659  * 2. Redistributions in binary form must reproduce the above copyright
19660  *    notice, this list of conditions and the following disclaimer in the
19661  *    documentation and/or other materials provided with the distribution.
19662  * 3. All advertising materials mentioning features or use of this software
19663  *    must display the following acknowledgement:
19664  *    "This product includes cryptographic software written by
19665  *     Eric Young (eay@cryptsoft.com)"
19666  *    The word 'cryptographic' can be left out if the rouines from the library
19667  *    being used are not cryptographic related :-).
19668  * 4. If you include any Windows specific code (or a derivative thereof) from
19669  *    the apps directory (application code) you must include an acknowledgement:
19670  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19671  *
19672  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19673  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19674  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19675  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19676  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19677  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19678  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19679  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19680  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19681  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19682  * SUCH DAMAGE.
19683  *
19684  * The licence and distribution terms for any publically available version or
19685  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19686  * copied and put under another distribution licence
19687  * [including the GNU Public Licence.]
19688  */
19689 # 103 "/usr/include/openssl/x509.h" 2 3 4
19690 
19691 
19692 
19693 
19694 # 1 "/usr/include/openssl/sha.h" 1 3 4
19695 /* crypto/sha/sha.h */
19696 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19697  * All rights reserved.
19698  *
19699  * This package is an SSL implementation written
19700  * by Eric Young (eay@cryptsoft.com).
19701  * The implementation was written so as to conform with Netscapes SSL.
19702  *
19703  * This library is free for commercial and non-commercial use as long as
19704  * the following conditions are aheared to.  The following conditions
19705  * apply to all code found in this distribution, be it the RC4, RSA,
19706  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19707  * included with this distribution is covered by the same copyright terms
19708  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19709  *
19710  * Copyright remains Eric Young's, and as such any Copyright notices in
19711  * the code are not to be removed.
19712  * If this package is used in a product, Eric Young should be given attribution
19713  * as the author of the parts of the library used.
19714  * This can be in the form of a textual message at program startup or
19715  * in documentation (online or textual) provided with the package.
19716  *
19717  * Redistribution and use in source and binary forms, with or without
19718  * modification, are permitted provided that the following conditions
19719  * are met:
19720  * 1. Redistributions of source code must retain the copyright
19721  *    notice, this list of conditions and the following disclaimer.
19722  * 2. Redistributions in binary form must reproduce the above copyright
19723  *    notice, this list of conditions and the following disclaimer in the
19724  *    documentation and/or other materials provided with the distribution.
19725  * 3. All advertising materials mentioning features or use of this software
19726  *    must display the following acknowledgement:
19727  *    "This product includes cryptographic software written by
19728  *     Eric Young (eay@cryptsoft.com)"
19729  *    The word 'cryptographic' can be left out if the rouines from the library
19730  *    being used are not cryptographic related :-).
19731  * 4. If you include any Windows specific code (or a derivative thereof) from
19732  *    the apps directory (application code) you must include an acknowledgement:
19733  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19734  *
19735  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19736  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19737  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19738  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19739  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19740  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19741  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19742  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19743  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19744  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19745  * SUCH DAMAGE.
19746  *
19747  * The licence and distribution terms for any publically available version or
19748  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19749  * copied and put under another distribution licence
19750  * [including the GNU Public Licence.]
19751  */
19752 
19753 
19754 
19755 
19756 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
19757 /* e_os2.h */
19758 /* ====================================================================
19759  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
19760  *
19761  * Redistribution and use in source and binary forms, with or without
19762  * modification, are permitted provided that the following conditions
19763  * are met:
19764  *
19765  * 1. Redistributions of source code must retain the above copyright
19766  *    notice, this list of conditions and the following disclaimer.
19767  *
19768  * 2. Redistributions in binary form must reproduce the above copyright
19769  *    notice, this list of conditions and the following disclaimer in
19770  *    the documentation and/or other materials provided with the
19771  *    distribution.
19772  *
19773  * 3. All advertising materials mentioning features or use of this
19774  *    software must display the following acknowledgment:
19775  *    "This product includes software developed by the OpenSSL Project
19776  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19777  *
19778  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19779  *    endorse or promote products derived from this software without
19780  *    prior written permission. For written permission, please contact
19781  *    openssl-core@openssl.org.
19782  *
19783  * 5. Products derived from this software may not be called "OpenSSL"
19784  *    nor may "OpenSSL" appear in their names without prior written
19785  *    permission of the OpenSSL Project.
19786  *
19787  * 6. Redistributions of any form whatsoever must retain the following
19788  *    acknowledgment:
19789  *    "This product includes software developed by the OpenSSL Project
19790  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19791  *
19792  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19793  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19794  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19795  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19796  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19797  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19798  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19799  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19800  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19801  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19802  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19803  * OF THE POSSIBILITY OF SUCH DAMAGE.
19804  * ====================================================================
19805  *
19806  * This product includes cryptographic software written by Eric Young
19807  * (eay@cryptsoft.com).  This product includes software written by Tim
19808  * Hudson (tjh@cryptsoft.com).
19809  *
19810  */
19811 
19812 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19813 /* opensslconf.h */
19814 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19815 
19816 
19817 
19818 
19819 /* OpenSSL was configured with the following options: */
19820 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19821 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19822    asks for it.  This is a transient feature that is provided for those
19823    who haven't had the time to do the appropriate changes in their
19824    applications.  */
19825 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19826 /* crypto/opensslconf.h.in */
19827 
19828 /* Generate 80386 code? */
19829 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19830 # 63 "/usr/include/openssl/sha.h" 2 3 4
19831 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
19832 /*
19833  * CDDL HEADER START
19834  *
19835  * The contents of this file are subject to the terms of the
19836  * Common Development and Distribution License, Version 1.0 only
19837  * (the "License").  You may not use this file except in compliance
19838  * with the License.
19839  *
19840  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19841  * or http://www.opensolaris.org/os/licensing.
19842  * See the License for the specific language governing permissions
19843  * and limitations under the License.
19844  *
19845  * When distributing Covered Code, include this CDDL HEADER in each
19846  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19847  * If applicable, add the following below this CDDL HEADER, with the
19848  * fields enclosed by brackets "[]" replaced with your own identifying
19849  * information: Portions Copyright [yyyy] [name of copyright owner]
19850  *
19851  * CDDL HEADER END
19852  */
19853 /*	Copyright (c) 1988 AT&T	*/
19854 /*	  All Rights Reserved  	*/
19855 
19856 
19857 /*
19858  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
19859  * Use is subject to license terms.
19860  */
19861 # 64 "/usr/include/openssl/sha.h" 2 3 4
19862 # 77 "/usr/include/openssl/sha.h" 3 4
19863 /*-
19864  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19865  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
19866  * ! SHA_LONG_LOG2 has to be defined along.                        !
19867  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19868  */
19869 # 100 "/usr/include/openssl/sha.h" 3 4
19870 typedef struct SHAstate_st {
19871     unsigned int h0, h1, h2, h3, h4;
19872     unsigned int Nl, Nh;
19873     unsigned int data[16];
19874     unsigned int num;
19875 } SHA_CTX;
19876 
19877 
19878 
19879 
19880 
19881 int SHA_Init(SHA_CTX *c);
19882 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
19883 int SHA_Final(unsigned char *md, SHA_CTX *c);
19884 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
19885 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
19886 
19887 
19888 
19889 
19890 
19891 int SHA1_Init(SHA_CTX *c);
19892 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
19893 int SHA1_Final(unsigned char *md, SHA_CTX *c);
19894 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
19895 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
19896 # 134 "/usr/include/openssl/sha.h" 3 4
19897 typedef struct SHA256state_st {
19898     unsigned int h[8];
19899     unsigned int Nl, Nh;
19900     unsigned int data[16];
19901     unsigned int num, md_len;
19902 } SHA256_CTX;
19903 
19904 
19905 
19906 
19907 
19908 
19909 int SHA224_Init(SHA256_CTX *c);
19910 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
19911 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
19912 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
19913 int SHA256_Init(SHA256_CTX *c);
19914 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
19915 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
19916 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
19917 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
19918 
19919 
19920 
19921 
19922 
19923 
19924 /*
19925  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
19926  * being exactly 64-bit wide. See Implementation Notes in sha512.c
19927  * for further details.
19928  */
19929 /*
19930  * SHA-512 treats input data as a
19931  * contiguous array of 64 bit
19932  * wide big-endian values.
19933  */
19934 # 183 "/usr/include/openssl/sha.h" 3 4
19935 typedef struct SHA512state_st {
19936     unsigned long long h[8];
19937     unsigned long long Nl, Nh;
19938     union {
19939         unsigned long long d[16];
19940         unsigned char p[(16*8)];
19941     } u;
19942     unsigned int num, md_len;
19943 } SHA512_CTX;
19944 
19945 
19946 
19947 
19948 
19949 
19950 
19951 int SHA384_Init(SHA512_CTX *c);
19952 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
19953 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
19954 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
19955 int SHA512_Init(SHA512_CTX *c);
19956 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
19957 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
19958 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
19959 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
19960 # 108 "/usr/include/openssl/x509.h" 2 3 4
19961 
19962 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19963 /* ====================================================================
19964  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19965  *
19966  * Redistribution and use in source and binary forms, with or without
19967  * modification, are permitted provided that the following conditions
19968  * are met:
19969  *
19970  * 1. Redistributions of source code must retain the above copyright
19971  *    notice, this list of conditions and the following disclaimer.
19972  *
19973  * 2. Redistributions in binary form must reproduce the above copyright
19974  *    notice, this list of conditions and the following disclaimer in
19975  *    the documentation and/or other materials provided with the
19976  *    distribution.
19977  *
19978  * 3. All advertising materials mentioning features or use of this
19979  *    software must display the following acknowledgment:
19980  *    "This product includes software developed by the OpenSSL Project
19981  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19982  *
19983  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19984  *    endorse or promote products derived from this software without
19985  *    prior written permission. For written permission, please contact
19986  *    openssl-core@openssl.org.
19987  *
19988  * 5. Products derived from this software may not be called "OpenSSL"
19989  *    nor may "OpenSSL" appear in their names without prior written
19990  *    permission of the OpenSSL Project.
19991  *
19992  * 6. Redistributions of any form whatsoever must retain the following
19993  *    acknowledgment:
19994  *    "This product includes software developed by the OpenSSL Project
19995  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19996  *
19997  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19998  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19999  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20000  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20001  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20002  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20003  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20004  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20005  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20006  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20007  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20008  * OF THE POSSIBILITY OF SUCH DAMAGE.
20009  * ====================================================================
20010  *
20011  * This product includes cryptographic software written by Eric Young
20012  * (eay@cryptsoft.com).  This product includes software written by Tim
20013  * Hudson (tjh@cryptsoft.com).
20014  *
20015  */
20016 # 110 "/usr/include/openssl/x509.h" 2 3 4
20017 # 137 "/usr/include/openssl/x509.h" 3 4
20018 typedef struct X509_objects_st {
20019     int nid;
20020     int (*a2i) (void);
20021     int (*i2a) (void);
20022 } X509_OBJECTS;
20023 
20024 struct X509_algor_st {
20025     ASN1_OBJECT *algorithm;
20026     ASN1_TYPE *parameter;
20027 } /* X509_ALGOR */ ;
20028 
20029 
20030 
20031 typedef struct stack_st_X509_ALGOR X509_ALGORS;
20032 
20033 typedef struct X509_val_st {
20034     ASN1_TIME *notBefore;
20035     ASN1_TIME *notAfter;
20036 } X509_VAL;
20037 
20038 struct X509_pubkey_st {
20039     X509_ALGOR *algor;
20040     ASN1_BIT_STRING *public_key;
20041     EVP_PKEY *pkey;
20042 };
20043 
20044 typedef struct X509_sig_st {
20045     X509_ALGOR *algor;
20046     ASN1_OCTET_STRING *digest;
20047 } X509_SIG;
20048 
20049 typedef struct X509_name_entry_st {
20050     ASN1_OBJECT *object;
20051     ASN1_STRING *value;
20052     int set;
20053     int size; /* temp variable */
20054 } X509_NAME_ENTRY;
20055 
20056 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
20057 
20058 
20059 /* we always keep X509_NAMEs in 2 forms. */
20060 struct X509_name_st {
20061     struct stack_st_X509_NAME_ENTRY *entries;
20062     int modified; /* true if 'bytes' needs to be built */
20063 
20064     BUF_MEM *bytes;
20065 
20066 
20067 
20068 /*      unsigned long hash; Keep the hash around for lookups */
20069     unsigned char *canon_enc;
20070     int canon_enclen;
20071 } /* X509_NAME */ ;
20072 
20073 struct stack_st_X509_NAME { _STACK stack; };
20074 
20075 
20076 
20077 typedef struct X509_extension_st {
20078     ASN1_OBJECT *object;
20079     ASN1_BOOLEAN critical;
20080     ASN1_OCTET_STRING *value;
20081 } X509_EXTENSION;
20082 
20083 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
20084 
20085 struct stack_st_X509_EXTENSION { _STACK stack; };
20086 
20087 
20088 /* a sequence of these are used */
20089 typedef struct x509_attributes_st {
20090     ASN1_OBJECT *object;
20091     int single; /* 0 for a set, 1 for a single item (which is
20092                                  * wrong) */
20093     union {
20094         char *ptr;
20095         /*
20096          * 0
20097          */ struct stack_st_ASN1_TYPE *set;
20098         /*
20099          * 1
20100          */ ASN1_TYPE *single;
20101     } value;
20102 } X509_ATTRIBUTE;
20103 
20104 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
20105 
20106 
20107 typedef struct X509_req_info_st {
20108     ASN1_ENCODING enc;
20109     ASN1_INTEGER *version;
20110     X509_NAME *subject;
20111     X509_PUBKEY *pubkey;
20112     /*  d=2 hl=2 l=  0 cons: cont: 00 */
20113     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
20114 } X509_REQ_INFO;
20115 
20116 typedef struct X509_req_st {
20117     X509_REQ_INFO *req_info;
20118     X509_ALGOR *sig_alg;
20119     ASN1_BIT_STRING *signature;
20120     int references;
20121 } X509_REQ;
20122 
20123 typedef struct x509_cinf_st {
20124     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
20125     ASN1_INTEGER *serialNumber;
20126     X509_ALGOR *signature;
20127     X509_NAME *issuer;
20128     X509_VAL *validity;
20129     X509_NAME *subject;
20130     X509_PUBKEY *key;
20131     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
20132     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
20133     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
20134     ASN1_ENCODING enc;
20135 } X509_CINF;
20136 
20137 /*
20138  * This stuff is certificate "auxiliary info" it contains details which are
20139  * useful in certificate stores and databases. When used this is tagged onto
20140  * the end of the certificate itself
20141  */
20142 
20143 typedef struct x509_cert_aux_st {
20144     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
20145     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
20146     ASN1_UTF8STRING *alias; /* "friendly name" */
20147     ASN1_OCTET_STRING *keyid; /* key id of private key */
20148     struct stack_st_X509_ALGOR *other; /* other unspecified info */
20149 } X509_CERT_AUX;
20150 
20151 struct x509_st {
20152     X509_CINF *cert_info;
20153     X509_ALGOR *sig_alg;
20154     ASN1_BIT_STRING *signature;
20155     int valid;
20156     int references;
20157     char *name;
20158     CRYPTO_EX_DATA ex_data;
20159     /* These contain copies of various extension values */
20160     long ex_pathlen;
20161     long ex_pcpathlen;
20162     unsigned long ex_flags;
20163     unsigned long ex_kusage;
20164     unsigned long ex_xkusage;
20165     unsigned long ex_nscert;
20166     ASN1_OCTET_STRING *skid;
20167     AUTHORITY_KEYID *akid;
20168     X509_POLICY_CACHE *policy_cache;
20169     struct stack_st_DIST_POINT *crldp;
20170     struct stack_st_GENERAL_NAME *altname;
20171     NAME_CONSTRAINTS *nc;
20172 
20173 
20174 
20175 
20176 
20177     unsigned char sha1_hash[20];
20178 
20179     X509_CERT_AUX *aux;
20180 } /* X509 */ ;
20181 
20182 struct stack_st_X509 { _STACK stack; };
20183 
20184 
20185 /* This is used for a table of trust checking functions */
20186 
20187 typedef struct x509_trust_st {
20188     int trust;
20189     int flags;
20190     int (*check_trust) (struct x509_trust_st *, X509 *, int);
20191     char *name;
20192     int arg1;
20193     void *arg2;
20194 } X509_TRUST;
20195 
20196 struct stack_st_X509_TRUST { _STACK stack; };
20197 
20198 typedef struct x509_cert_pair_st {
20199     X509 *forward;
20200     X509 *reverse;
20201 } X509_CERT_PAIR;
20202 
20203 /* standard trust ids */
20204 # 335 "/usr/include/openssl/x509.h" 3 4
20205 /* Keep these up to date! */
20206 
20207 
20208 
20209 /* trust_flags values */
20210 
20211 
20212 
20213 /* check_trust return codes */
20214 
20215 
20216 
20217 
20218 
20219 /* Flags for X509_print_ex() */
20220 # 366 "/usr/include/openssl/x509.h" 3 4
20221 /* Flags specific to X509_NAME_print_ex() */
20222 
20223 /* The field separator information */
20224 # 381 "/usr/include/openssl/x509.h" 3 4
20225 /* How the field name is shown */
20226 # 392 "/usr/include/openssl/x509.h" 3 4
20227 /*
20228  * This determines if we dump fields we don't recognise: RFC2253 requires
20229  * this.
20230  */
20231 
20232 
20233 
20234 
20235 
20236 
20237 /* Complete set of RFC2253 flags */
20238 
20239 
20240 
20241 
20242 
20243 
20244 
20245 /* readable oneline form */
20246 
20247 
20248 
20249 
20250 
20251 
20252 
20253 /* readable multiline form */
20254 # 427 "/usr/include/openssl/x509.h" 3 4
20255 struct x509_revoked_st {
20256     ASN1_INTEGER *serialNumber;
20257     ASN1_TIME *revocationDate;
20258     struct stack_st_X509_EXTENSION /* optional */ *extensions;
20259     /* Set up if indirect CRL */
20260     struct stack_st_GENERAL_NAME *issuer;
20261     /* Revocation reason */
20262     int reason;
20263     int sequence; /* load sequence */
20264 };
20265 
20266 struct stack_st_X509_REVOKED { _STACK stack; };
20267 
20268 
20269 typedef struct X509_crl_info_st {
20270     ASN1_INTEGER *version;
20271     X509_ALGOR *sig_alg;
20272     X509_NAME *issuer;
20273     ASN1_TIME *lastUpdate;
20274     ASN1_TIME *nextUpdate;
20275     struct stack_st_X509_REVOKED *revoked;
20276     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
20277     ASN1_ENCODING enc;
20278 } X509_CRL_INFO;
20279 
20280 struct X509_crl_st {
20281     /* actual signature */
20282     X509_CRL_INFO *crl;
20283     X509_ALGOR *sig_alg;
20284     ASN1_BIT_STRING *signature;
20285     int references;
20286     int flags;
20287     /* Copies of various extensions */
20288     AUTHORITY_KEYID *akid;
20289     ISSUING_DIST_POINT *idp;
20290     /* Convenient breakdown of IDP */
20291     int idp_flags;
20292     int idp_reasons;
20293     /* CRL and base CRL numbers for delta processing */
20294     ASN1_INTEGER *crl_number;
20295     ASN1_INTEGER *base_crl_number;
20296 
20297     unsigned char sha1_hash[20];
20298 
20299     struct stack_st_GENERAL_NAMES *issuers;
20300     const X509_CRL_METHOD *meth;
20301     void *meth_data;
20302 } /* X509_CRL */ ;
20303 
20304 struct stack_st_X509_CRL { _STACK stack; };
20305 
20306 
20307 typedef struct private_key_st {
20308     int version;
20309     /* The PKCS#8 data types */
20310     X509_ALGOR *enc_algor;
20311     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
20312     /* When decrypted, the following will not be NULL */
20313     EVP_PKEY *dec_pkey;
20314     /* used to encrypt and decrypt */
20315     int key_length;
20316     char *key_data;
20317     int key_free; /* true if we should auto free key_data */
20318     /* expanded version of 'enc_algor' */
20319     EVP_CIPHER_INFO cipher;
20320     int references;
20321 } X509_PKEY;
20322 
20323 
20324 typedef struct X509_info_st {
20325     X509 *x509;
20326     X509_CRL *crl;
20327     X509_PKEY *x_pkey;
20328     EVP_CIPHER_INFO enc_cipher;
20329     int enc_len;
20330     char *enc_data;
20331     int references;
20332 } X509_INFO;
20333 
20334 struct stack_st_X509_INFO { _STACK stack; };
20335 
20336 
20337 /*
20338  * The next 2 structures and their 8 routines were sent to me by Pat Richard
20339  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
20340  * useful if you are writing a CA web page
20341  */
20342 typedef struct Netscape_spkac_st {
20343     X509_PUBKEY *pubkey;
20344     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
20345 } NETSCAPE_SPKAC;
20346 
20347 typedef struct Netscape_spki_st {
20348     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
20349     X509_ALGOR *sig_algor;
20350     ASN1_BIT_STRING *signature;
20351 } NETSCAPE_SPKI;
20352 
20353 /* Netscape certificate sequence structure */
20354 typedef struct Netscape_certificate_sequence {
20355     ASN1_OBJECT *type;
20356     struct stack_st_X509 *certs;
20357 } NETSCAPE_CERT_SEQUENCE;
20358 
20359 /*- Unused (and iv length is wrong)
20360 typedef struct CBCParameter_st
20361         {
20362         unsigned char iv[8];
20363         } CBC_PARAM;
20364 */
20365 
20366 /* Password based encryption structure */
20367 
20368 typedef struct PBEPARAM_st {
20369     ASN1_OCTET_STRING *salt;
20370     ASN1_INTEGER *iter;
20371 } PBEPARAM;
20372 
20373 /* Password based encryption V2 structures */
20374 
20375 typedef struct PBE2PARAM_st {
20376     X509_ALGOR *keyfunc;
20377     X509_ALGOR *encryption;
20378 } PBE2PARAM;
20379 
20380 typedef struct PBKDF2PARAM_st {
20381 /* Usually OCTET STRING but could be anything */
20382     ASN1_TYPE *salt;
20383     ASN1_INTEGER *iter;
20384     ASN1_INTEGER *keylength;
20385     X509_ALGOR *prf;
20386 } PBKDF2PARAM;
20387 
20388 /* PKCS#8 private key info structure */
20389 
20390 struct pkcs8_priv_key_info_st {
20391     /* Flag for various broken formats */
20392     int broken;
20393 
20394 
20395 
20396 
20397 
20398     ASN1_INTEGER *version;
20399     X509_ALGOR *pkeyalg;
20400     /* Should be OCTET STRING but some are broken */
20401     ASN1_TYPE *pkey;
20402     struct stack_st_X509_ATTRIBUTE *attributes;
20403 };
20404 
20405 
20406 
20407 
20408 
20409 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
20410 /* crypto/x509/x509_vfy.h */
20411 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20412  * All rights reserved.
20413  *
20414  * This package is an SSL implementation written
20415  * by Eric Young (eay@cryptsoft.com).
20416  * The implementation was written so as to conform with Netscapes SSL.
20417  *
20418  * This library is free for commercial and non-commercial use as long as
20419  * the following conditions are aheared to.  The following conditions
20420  * apply to all code found in this distribution, be it the RC4, RSA,
20421  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20422  * included with this distribution is covered by the same copyright terms
20423  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20424  *
20425  * Copyright remains Eric Young's, and as such any Copyright notices in
20426  * the code are not to be removed.
20427  * If this package is used in a product, Eric Young should be given attribution
20428  * as the author of the parts of the library used.
20429  * This can be in the form of a textual message at program startup or
20430  * in documentation (online or textual) provided with the package.
20431  *
20432  * Redistribution and use in source and binary forms, with or without
20433  * modification, are permitted provided that the following conditions
20434  * are met:
20435  * 1. Redistributions of source code must retain the copyright
20436  *    notice, this list of conditions and the following disclaimer.
20437  * 2. Redistributions in binary form must reproduce the above copyright
20438  *    notice, this list of conditions and the following disclaimer in the
20439  *    documentation and/or other materials provided with the distribution.
20440  * 3. All advertising materials mentioning features or use of this software
20441  *    must display the following acknowledgement:
20442  *    "This product includes cryptographic software written by
20443  *     Eric Young (eay@cryptsoft.com)"
20444  *    The word 'cryptographic' can be left out if the rouines from the library
20445  *    being used are not cryptographic related :-).
20446  * 4. If you include any Windows specific code (or a derivative thereof) from
20447  *    the apps directory (application code) you must include an acknowledgement:
20448  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20449  *
20450  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20451  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20452  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20453  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20454  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20455  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20456  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20457  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20458  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20459  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20460  * SUCH DAMAGE.
20461  *
20462  * The licence and distribution terms for any publically available version or
20463  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20464  * copied and put under another distribution licence
20465  * [including the GNU Public Licence.]
20466  */
20467 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
20468 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20469 /* opensslconf.h */
20470 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20471 
20472 
20473 
20474 
20475 /* OpenSSL was configured with the following options: */
20476 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20477 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20478    asks for it.  This is a transient feature that is provided for those
20479    who haven't had the time to do the appropriate changes in their
20480    applications.  */
20481 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20482 /* crypto/opensslconf.h.in */
20483 
20484 /* Generate 80386 code? */
20485 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
20486 
20487 # 1 "/usr/include/openssl/lhash.h" 1 3 4
20488 /* crypto/lhash/lhash.h */
20489 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20490  * All rights reserved.
20491  *
20492  * This package is an SSL implementation written
20493  * by Eric Young (eay@cryptsoft.com).
20494  * The implementation was written so as to conform with Netscapes SSL.
20495  *
20496  * This library is free for commercial and non-commercial use as long as
20497  * the following conditions are aheared to.  The following conditions
20498  * apply to all code found in this distribution, be it the RC4, RSA,
20499  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20500  * included with this distribution is covered by the same copyright terms
20501  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20502  *
20503  * Copyright remains Eric Young's, and as such any Copyright notices in
20504  * the code are not to be removed.
20505  * If this package is used in a product, Eric Young should be given attribution
20506  * as the author of the parts of the library used.
20507  * This can be in the form of a textual message at program startup or
20508  * in documentation (online or textual) provided with the package.
20509  *
20510  * Redistribution and use in source and binary forms, with or without
20511  * modification, are permitted provided that the following conditions
20512  * are met:
20513  * 1. Redistributions of source code must retain the copyright
20514  *    notice, this list of conditions and the following disclaimer.
20515  * 2. Redistributions in binary form must reproduce the above copyright
20516  *    notice, this list of conditions and the following disclaimer in the
20517  *    documentation and/or other materials provided with the distribution.
20518  * 3. All advertising materials mentioning features or use of this software
20519  *    must display the following acknowledgement:
20520  *    "This product includes cryptographic software written by
20521  *     Eric Young (eay@cryptsoft.com)"
20522  *    The word 'cryptographic' can be left out if the rouines from the library
20523  *    being used are not cryptographic related :-).
20524  * 4. If you include any Windows specific code (or a derivative thereof) from
20525  *    the apps directory (application code) you must include an acknowledgement:
20526  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20527  *
20528  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20529  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20530  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20531  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20532  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20533  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20534  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20535  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20536  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20537  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20538  * SUCH DAMAGE.
20539  *
20540  * The licence and distribution terms for any publically available version or
20541  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20542  * copied and put under another distribution licence
20543  * [including the GNU Public Licence.]
20544  */
20545 
20546 /*
20547  * Header for dynamic hash table routines Author - Eric Young
20548  */
20549 
20550 
20551 
20552 
20553 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
20554 /* e_os2.h */
20555 /* ====================================================================
20556  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
20557  *
20558  * Redistribution and use in source and binary forms, with or without
20559  * modification, are permitted provided that the following conditions
20560  * are met:
20561  *
20562  * 1. Redistributions of source code must retain the above copyright
20563  *    notice, this list of conditions and the following disclaimer.
20564  *
20565  * 2. Redistributions in binary form must reproduce the above copyright
20566  *    notice, this list of conditions and the following disclaimer in
20567  *    the documentation and/or other materials provided with the
20568  *    distribution.
20569  *
20570  * 3. All advertising materials mentioning features or use of this
20571  *    software must display the following acknowledgment:
20572  *    "This product includes software developed by the OpenSSL Project
20573  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20574  *
20575  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20576  *    endorse or promote products derived from this software without
20577  *    prior written permission. For written permission, please contact
20578  *    openssl-core@openssl.org.
20579  *
20580  * 5. Products derived from this software may not be called "OpenSSL"
20581  *    nor may "OpenSSL" appear in their names without prior written
20582  *    permission of the OpenSSL Project.
20583  *
20584  * 6. Redistributions of any form whatsoever must retain the following
20585  *    acknowledgment:
20586  *    "This product includes software developed by the OpenSSL Project
20587  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20588  *
20589  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20590  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20591  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20592  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20593  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20594  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20595  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20596  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20597  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20598  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20599  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20600  * OF THE POSSIBILITY OF SUCH DAMAGE.
20601  * ====================================================================
20602  *
20603  * This product includes cryptographic software written by Eric Young
20604  * (eay@cryptsoft.com).  This product includes software written by Tim
20605  * Hudson (tjh@cryptsoft.com).
20606  *
20607  */
20608 
20609 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20610 /* opensslconf.h */
20611 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20612 
20613 
20614 
20615 
20616 /* OpenSSL was configured with the following options: */
20617 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20618 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20619    asks for it.  This is a transient feature that is provided for those
20620    who haven't had the time to do the appropriate changes in their
20621    applications.  */
20622 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20623 /* crypto/opensslconf.h.in */
20624 
20625 /* Generate 80386 code? */
20626 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
20627 # 67 "/usr/include/openssl/lhash.h" 2 3 4
20628 
20629 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
20630 /*
20631  * CDDL HEADER START
20632  *
20633  * The contents of this file are subject to the terms of the
20634  * Common Development and Distribution License (the "License").
20635  * You may not use this file except in compliance with the License.
20636  *
20637  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20638  * or http://www.opensolaris.org/os/licensing.
20639  * See the License for the specific language governing permissions
20640  * and limitations under the License.
20641  *
20642  * When distributing Covered Code, include this CDDL HEADER in each
20643  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20644  * If applicable, add the following below this CDDL HEADER, with the
20645  * fields enclosed by brackets "[]" replaced with your own identifying
20646  * information: Portions Copyright [yyyy] [name of copyright owner]
20647  *
20648  * CDDL HEADER END
20649  */
20650 
20651 /*
20652  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20653  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
20654  */
20655 
20656 /*	Copyright (c) 1988 AT&T	*/
20657 /*	  All Rights Reserved  	*/
20658 
20659 /*
20660  * User-visible pieces of the ANSI C standard I/O package.
20661  */
20662 # 69 "/usr/include/openssl/lhash.h" 2 3 4
20663 
20664 
20665 
20666 # 1 "/usr/include/openssl/bio.h" 1 3 4
20667 /* crypto/bio/bio.h */
20668 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20669  * All rights reserved.
20670  *
20671  * This package is an SSL implementation written
20672  * by Eric Young (eay@cryptsoft.com).
20673  * The implementation was written so as to conform with Netscapes SSL.
20674  *
20675  * This library is free for commercial and non-commercial use as long as
20676  * the following conditions are aheared to.  The following conditions
20677  * apply to all code found in this distribution, be it the RC4, RSA,
20678  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20679  * included with this distribution is covered by the same copyright terms
20680  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20681  *
20682  * Copyright remains Eric Young's, and as such any Copyright notices in
20683  * the code are not to be removed.
20684  * If this package is used in a product, Eric Young should be given attribution
20685  * as the author of the parts of the library used.
20686  * This can be in the form of a textual message at program startup or
20687  * in documentation (online or textual) provided with the package.
20688  *
20689  * Redistribution and use in source and binary forms, with or without
20690  * modification, are permitted provided that the following conditions
20691  * are met:
20692  * 1. Redistributions of source code must retain the copyright
20693  *    notice, this list of conditions and the following disclaimer.
20694  * 2. Redistributions in binary form must reproduce the above copyright
20695  *    notice, this list of conditions and the following disclaimer in the
20696  *    documentation and/or other materials provided with the distribution.
20697  * 3. All advertising materials mentioning features or use of this software
20698  *    must display the following acknowledgement:
20699  *    "This product includes cryptographic software written by
20700  *     Eric Young (eay@cryptsoft.com)"
20701  *    The word 'cryptographic' can be left out if the rouines from the library
20702  *    being used are not cryptographic related :-).
20703  * 4. If you include any Windows specific code (or a derivative thereof) from
20704  *    the apps directory (application code) you must include an acknowledgement:
20705  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20706  *
20707  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20708  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20709  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20710  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20711  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20712  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20713  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20714  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20715  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20716  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20717  * SUCH DAMAGE.
20718  *
20719  * The licence and distribution terms for any publically available version or
20720  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20721  * copied and put under another distribution licence
20722  * [including the GNU Public Licence.]
20723  */
20724 # 73 "/usr/include/openssl/lhash.h" 2 3 4
20725 
20726 
20727 
20728 
20729 
20730 
20731 typedef struct lhash_node_st {
20732     void *data;
20733     struct lhash_node_st *next;
20734 
20735     unsigned long hash;
20736 
20737 } LHASH_NODE;
20738 
20739 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
20740 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
20741 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
20742 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
20743 
20744 /*
20745  * Macros for declaring and implementing type-safe wrappers for LHASH
20746  * callbacks. This way, callbacks can be provided to LHASH structures without
20747  * function pointer casting and the macro-defined callbacks provide
20748  * per-variable casting before deferring to the underlying type-specific
20749  * callbacks. NB: It is possible to place a "static" in front of both the
20750  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
20751  */
20752 
20753 /* First: "hash" functions */
20754 # 110 "/usr/include/openssl/lhash.h" 3 4
20755 /* Second: "compare" functions */
20756 # 120 "/usr/include/openssl/lhash.h" 3 4
20757 /* Third: "doall" functions */
20758 # 129 "/usr/include/openssl/lhash.h" 3 4
20759 /* Fourth: "doall_arg" functions */
20760 # 139 "/usr/include/openssl/lhash.h" 3 4
20761 typedef struct lhash_st {
20762     LHASH_NODE **b;
20763     LHASH_COMP_FN_TYPE comp;
20764     LHASH_HASH_FN_TYPE hash;
20765     unsigned int num_nodes;
20766     unsigned int num_alloc_nodes;
20767     unsigned int p;
20768     unsigned int pmax;
20769     unsigned long up_load; /* load times 256 */
20770     unsigned long down_load; /* load times 256 */
20771     unsigned long num_items;
20772     unsigned long num_expands;
20773     unsigned long num_expand_reallocs;
20774     unsigned long num_contracts;
20775     unsigned long num_contract_reallocs;
20776     unsigned long num_hash_calls;
20777     unsigned long num_comp_calls;
20778     unsigned long num_insert;
20779     unsigned long num_replace;
20780     unsigned long num_delete;
20781     unsigned long num_no_delete;
20782     unsigned long num_retrieve;
20783     unsigned long num_retrieve_miss;
20784     unsigned long num_hash_comps;
20785     int error;
20786 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
20787                                  * and friends */
20788 
20789 
20790 
20791 /*
20792  * Indicates a malloc() error in the last call, this is only bad in
20793  * lh_insert().
20794  */
20795 
20796 
20797 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
20798 void lh_free(_LHASH *lh);
20799 void *lh_insert(_LHASH *lh, void *data);
20800 void *lh_delete(_LHASH *lh, const void *data);
20801 void *lh_retrieve(_LHASH *lh, const void *data);
20802 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
20803 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
20804 unsigned long lh_strhash(const char *c);
20805 unsigned long lh_num_items(const _LHASH *lh);
20806 
20807 
20808 void lh_stats(const _LHASH *lh, FILE *out);
20809 void lh_node_stats(const _LHASH *lh, FILE *out);
20810 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
20811 
20812 
20813 
20814 void lh_stats_bio(const _LHASH *lh, BIO *out);
20815 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
20816 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
20817 
20818 
20819 /* Type checking... */
20820 # 206 "/usr/include/openssl/lhash.h" 3 4
20821 /* Define wrapper functions. */
20822 # 233 "/usr/include/openssl/lhash.h" 3 4
20823 struct lhash_st_OPENSSL_STRING { int dummy; };
20824 struct lhash_st_OPENSSL_CSTRING { int dummy; };
20825 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
20826 
20827 # 1 "/usr/include/openssl/bio.h" 1 3 4
20828 /* crypto/bio/bio.h */
20829 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20830  * All rights reserved.
20831  *
20832  * This package is an SSL implementation written
20833  * by Eric Young (eay@cryptsoft.com).
20834  * The implementation was written so as to conform with Netscapes SSL.
20835  *
20836  * This library is free for commercial and non-commercial use as long as
20837  * the following conditions are aheared to.  The following conditions
20838  * apply to all code found in this distribution, be it the RC4, RSA,
20839  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20840  * included with this distribution is covered by the same copyright terms
20841  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20842  *
20843  * Copyright remains Eric Young's, and as such any Copyright notices in
20844  * the code are not to be removed.
20845  * If this package is used in a product, Eric Young should be given attribution
20846  * as the author of the parts of the library used.
20847  * This can be in the form of a textual message at program startup or
20848  * in documentation (online or textual) provided with the package.
20849  *
20850  * Redistribution and use in source and binary forms, with or without
20851  * modification, are permitted provided that the following conditions
20852  * are met:
20853  * 1. Redistributions of source code must retain the copyright
20854  *    notice, this list of conditions and the following disclaimer.
20855  * 2. Redistributions in binary form must reproduce the above copyright
20856  *    notice, this list of conditions and the following disclaimer in the
20857  *    documentation and/or other materials provided with the distribution.
20858  * 3. All advertising materials mentioning features or use of this software
20859  *    must display the following acknowledgement:
20860  *    "This product includes cryptographic software written by
20861  *     Eric Young (eay@cryptsoft.com)"
20862  *    The word 'cryptographic' can be left out if the rouines from the library
20863  *    being used are not cryptographic related :-).
20864  * 4. If you include any Windows specific code (or a derivative thereof) from
20865  *    the apps directory (application code) you must include an acknowledgement:
20866  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20867  *
20868  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20869  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20870  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20871  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20872  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20873  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20874  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20875  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20876  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20877  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20878  * SUCH DAMAGE.
20879  *
20880  * The licence and distribution terms for any publically available version or
20881  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20882  * copied and put under another distribution licence
20883  * [including the GNU Public Licence.]
20884  */
20885 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
20886 # 1 "/usr/include/openssl/crypto.h" 1 3 4
20887 /* crypto/crypto.h */
20888 /* ====================================================================
20889  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
20890  *
20891  * Redistribution and use in source and binary forms, with or without
20892  * modification, are permitted provided that the following conditions
20893  * are met:
20894  *
20895  * 1. Redistributions of source code must retain the above copyright
20896  *    notice, this list of conditions and the following disclaimer.
20897  *
20898  * 2. Redistributions in binary form must reproduce the above copyright
20899  *    notice, this list of conditions and the following disclaimer in
20900  *    the documentation and/or other materials provided with the
20901  *    distribution.
20902  *
20903  * 3. All advertising materials mentioning features or use of this
20904  *    software must display the following acknowledgment:
20905  *    "This product includes software developed by the OpenSSL Project
20906  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20907  *
20908  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20909  *    endorse or promote products derived from this software without
20910  *    prior written permission. For written permission, please contact
20911  *    openssl-core@openssl.org.
20912  *
20913  * 5. Products derived from this software may not be called "OpenSSL"
20914  *    nor may "OpenSSL" appear in their names without prior written
20915  *    permission of the OpenSSL Project.
20916  *
20917  * 6. Redistributions of any form whatsoever must retain the following
20918  *    acknowledgment:
20919  *    "This product includes software developed by the OpenSSL Project
20920  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20921  *
20922  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20923  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20924  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20925  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20926  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20927  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20928  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20929  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20930  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20931  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20932  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20933  * OF THE POSSIBILITY OF SUCH DAMAGE.
20934  * ====================================================================
20935  *
20936  * This product includes cryptographic software written by Eric Young
20937  * (eay@cryptsoft.com).  This product includes software written by Tim
20938  * Hudson (tjh@cryptsoft.com).
20939  *
20940  */
20941 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20942  * All rights reserved.
20943  *
20944  * This package is an SSL implementation written
20945  * by Eric Young (eay@cryptsoft.com).
20946  * The implementation was written so as to conform with Netscapes SSL.
20947  *
20948  * This library is free for commercial and non-commercial use as long as
20949  * the following conditions are aheared to.  The following conditions
20950  * apply to all code found in this distribution, be it the RC4, RSA,
20951  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20952  * included with this distribution is covered by the same copyright terms
20953  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20954  *
20955  * Copyright remains Eric Young's, and as such any Copyright notices in
20956  * the code are not to be removed.
20957  * If this package is used in a product, Eric Young should be given attribution
20958  * as the author of the parts of the library used.
20959  * This can be in the form of a textual message at program startup or
20960  * in documentation (online or textual) provided with the package.
20961  *
20962  * Redistribution and use in source and binary forms, with or without
20963  * modification, are permitted provided that the following conditions
20964  * are met:
20965  * 1. Redistributions of source code must retain the copyright
20966  *    notice, this list of conditions and the following disclaimer.
20967  * 2. Redistributions in binary form must reproduce the above copyright
20968  *    notice, this list of conditions and the following disclaimer in the
20969  *    documentation and/or other materials provided with the distribution.
20970  * 3. All advertising materials mentioning features or use of this software
20971  *    must display the following acknowledgement:
20972  *    "This product includes cryptographic software written by
20973  *     Eric Young (eay@cryptsoft.com)"
20974  *    The word 'cryptographic' can be left out if the rouines from the library
20975  *    being used are not cryptographic related :-).
20976  * 4. If you include any Windows specific code (or a derivative thereof) from
20977  *    the apps directory (application code) you must include an acknowledgement:
20978  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20979  *
20980  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20981  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20982  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20983  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20984  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20985  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20986  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20987  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20988  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20989  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20990  * SUCH DAMAGE.
20991  *
20992  * The licence and distribution terms for any publically available version or
20993  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20994  * copied and put under another distribution licence
20995  * [including the GNU Public Licence.]
20996  */
20997 /* ====================================================================
20998  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20999  * ECDH support in OpenSSL originally developed by
21000  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
21001  */
21002 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
21003 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
21004 /* ====================================================================
21005  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
21006  *
21007  * Redistribution and use in source and binary forms, with or without
21008  * modification, are permitted provided that the following conditions
21009  * are met:
21010  *
21011  * 1. Redistributions of source code must retain the above copyright
21012  *    notice, this list of conditions and the following disclaimer.
21013  *
21014  * 2. Redistributions in binary form must reproduce the above copyright
21015  *    notice, this list of conditions and the following disclaimer in
21016  *    the documentation and/or other materials provided with the
21017  *    distribution.
21018  *
21019  * 3. All advertising materials mentioning features or use of this
21020  *    software must display the following acknowledgment:
21021  *    "This product includes software developed by the OpenSSL Project
21022  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21023  *
21024  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21025  *    endorse or promote products derived from this software without
21026  *    prior written permission. For written permission, please contact
21027  *    openssl-core@openssl.org.
21028  *
21029  * 5. Products derived from this software may not be called "OpenSSL"
21030  *    nor may "OpenSSL" appear in their names without prior written
21031  *    permission of the OpenSSL Project.
21032  *
21033  * 6. Redistributions of any form whatsoever must retain the following
21034  *    acknowledgment:
21035  *    "This product includes software developed by the OpenSSL Project
21036  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21037  *
21038  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21039  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21040  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21041  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21042  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21043  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21044  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21045  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21046  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21047  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21048  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21049  * OF THE POSSIBILITY OF SUCH DAMAGE.
21050  * ====================================================================
21051  *
21052  * This product includes cryptographic software written by Eric Young
21053  * (eay@cryptsoft.com).  This product includes software written by Tim
21054  * Hudson (tjh@cryptsoft.com).
21055  *
21056  */
21057 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
21058 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
21059 typedef struct x509_file_st {
21060     int num_paths; /* number of paths to files or directories */
21061     int num_alloced;
21062     char **paths; /* the list of paths or directories */
21063     int *path_type;
21064 } X509_CERT_FILE_CTX;
21065 
21066 /*******************************/
21067 /*-
21068 SSL_CTX -> X509_STORE
21069                 -> X509_LOOKUP
21070                         ->X509_LOOKUP_METHOD
21071                 -> X509_LOOKUP
21072                         ->X509_LOOKUP_METHOD
21073 
21074 SSL     -> X509_STORE_CTX
21075                 ->X509_STORE
21076 
21077 The X509_STORE holds the tables etc for verification stuff.
21078 A X509_STORE_CTX is used while validating a single certificate.
21079 The X509_STORE has X509_LOOKUPs for looking up certs.
21080 The X509_STORE then calls a function to actually verify the
21081 certificate chain.
21082 */
21083 
21084 
21085 
21086 
21087 
21088 
21089 
21090 typedef struct x509_object_st {
21091     /* one of the above types */
21092     int type;
21093     union {
21094         char *ptr;
21095         X509 *x509;
21096         X509_CRL *crl;
21097         EVP_PKEY *pkey;
21098     } data;
21099 } X509_OBJECT;
21100 
21101 typedef struct x509_lookup_st X509_LOOKUP;
21102 
21103 struct stack_st_X509_LOOKUP { _STACK stack; };
21104 struct stack_st_X509_OBJECT { _STACK stack; };
21105 
21106 /* This is a static that defines the function interface */
21107 typedef struct x509_lookup_method_st {
21108     const char *name;
21109     int (*new_item) (X509_LOOKUP *ctx);
21110     void (*free) (X509_LOOKUP *ctx);
21111     int (*init) (X509_LOOKUP *ctx);
21112     int (*shutdown) (X509_LOOKUP *ctx);
21113     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
21114                  char **ret);
21115     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
21116                            X509_OBJECT *ret);
21117     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
21118                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
21119     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
21120                                unsigned char *bytes, int len,
21121                                X509_OBJECT *ret);
21122     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
21123                          X509_OBJECT *ret);
21124 } X509_LOOKUP_METHOD;
21125 
21126 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
21127 
21128 /*
21129  * This structure hold all parameters associated with a verify operation by
21130  * including an X509_VERIFY_PARAM structure in related structures the
21131  * parameters used can be customized
21132  */
21133 
21134 typedef struct X509_VERIFY_PARAM_st {
21135     char *name;
21136     time_t check_time; /* Time to use */
21137     unsigned long inh_flags; /* Inheritance flags */
21138     unsigned long flags; /* Various verify flags */
21139     int purpose; /* purpose to check untrusted certificates */
21140     int trust; /* trust setting to check */
21141     int depth; /* Verify depth */
21142     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
21143     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
21144 } X509_VERIFY_PARAM;
21145 
21146 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
21147 
21148 /*
21149  * This is used to hold everything.  It is used for all certificate
21150  * validation.  Once we have a certificate chain, the 'verify' function is
21151  * then called to actually check the cert chain.
21152  */
21153 struct x509_store_st {
21154     /* The following is a cache of trusted certs */
21155     int cache; /* if true, stash any hits */
21156     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
21157     /* These are external lookup methods */
21158     struct stack_st_X509_LOOKUP *get_cert_methods;
21159     X509_VERIFY_PARAM *param;
21160     /* Callbacks for various operations */
21161     /* called to verify a certificate */
21162     int (*verify) (X509_STORE_CTX *ctx);
21163     /* error callback */
21164     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
21165     /* get issuers cert from ctx */
21166     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
21167     /* check issued */
21168     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
21169     /* Check revocation status of chain */
21170     int (*check_revocation) (X509_STORE_CTX *ctx);
21171     /* retrieve CRL */
21172     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
21173     /* Check CRL validity */
21174     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
21175     /* Check certificate against CRL */
21176     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
21177     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
21178     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
21179     int (*cleanup) (X509_STORE_CTX *ctx);
21180     CRYPTO_EX_DATA ex_data;
21181     int references;
21182 } /* X509_STORE */ ;
21183 
21184 int X509_STORE_set_depth(X509_STORE *store, int depth);
21185 
21186 
21187 
21188 
21189 /* This is the functions plus an instance of the local variables. */
21190 struct x509_lookup_st {
21191     int init; /* have we been started */
21192     int skip; /* don't use us. */
21193     X509_LOOKUP_METHOD *method; /* the functions */
21194     char *method_data; /* method data */
21195     X509_STORE *store_ctx; /* who owns us */
21196 } /* X509_LOOKUP */ ;
21197 
21198 /*
21199  * This is a used when verifying cert chains.  Since the gathering of the
21200  * cert chain can take some time (and have to be 'retried', this needs to be
21201  * kept and passed around.
21202  */
21203 struct x509_store_ctx_st { /* X509_STORE_CTX */
21204     X509_STORE *ctx;
21205     /* used when looking up certs */
21206     int current_method;
21207     /* The following are set by the caller */
21208     /* The cert to check */
21209     X509 *cert;
21210     /* chain of X509s - untrusted - passed in */
21211     struct stack_st_X509 *untrusted;
21212     /* set of CRLs passed in */
21213     struct stack_st_X509_CRL *crls;
21214     X509_VERIFY_PARAM *param;
21215     /* Other info for use with get_issuer() */
21216     void *other_ctx;
21217     /* Callbacks for various operations */
21218     /* called to verify a certificate */
21219     int (*verify) (X509_STORE_CTX *ctx);
21220     /* error callback */
21221     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
21222     /* get issuers cert from ctx */
21223     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
21224     /* check issued */
21225     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
21226     /* Check revocation status of chain */
21227     int (*check_revocation) (X509_STORE_CTX *ctx);
21228     /* retrieve CRL */
21229     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
21230     /* Check CRL validity */
21231     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
21232     /* Check certificate against CRL */
21233     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
21234     int (*check_policy) (X509_STORE_CTX *ctx);
21235     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
21236     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
21237     int (*cleanup) (X509_STORE_CTX *ctx);
21238     /* The following is built up */
21239     /* if 0, rebuild chain */
21240     int valid;
21241     /* index of last untrusted cert */
21242     int last_untrusted;
21243     /* chain of X509s - built up and trusted */
21244     struct stack_st_X509 *chain;
21245     /* Valid policy tree */
21246     X509_POLICY_TREE *tree;
21247     /* Require explicit policy value */
21248     int explicit_policy;
21249     /* When something goes wrong, this is why */
21250     int error_depth;
21251     int error;
21252     X509 *current_cert;
21253     /* cert currently being tested as valid issuer */
21254     X509 *current_issuer;
21255     /* current CRL */
21256     X509_CRL *current_crl;
21257     /* score of current CRL */
21258     int current_crl_score;
21259     /* Reason mask */
21260     unsigned int current_reasons;
21261     /* For CRL path validation: parent context */
21262     X509_STORE_CTX *parent;
21263     CRYPTO_EX_DATA ex_data;
21264 } /* X509_STORE_CTX */ ;
21265 
21266 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
21267 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
21268 /* These are 'informational' when looking for issuer cert */
21269 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
21270 /* Suite B mode algorithm violation */
21271 
21272 
21273 
21274 
21275 
21276 
21277 
21278 /* Host, email and IP check errors */
21279 
21280 
21281 
21282 
21283 /* Caller error */
21284 
21285 /* Issuer lookup error */
21286 
21287 
21288 
21289 
21290 /* Certificate verify flags */
21291 
21292 /* Send issuer+subject checks to verify_cb */
21293 
21294 /* Use check time instead of current time */
21295 
21296 /* Lookup CRLs */
21297 
21298 /* Lookup CRLs for whole chain */
21299 
21300 /* Ignore unhandled critical extensions */
21301 
21302 /* Disable workarounds for broken certificates */
21303 
21304 /* Enable proxy certificate validation */
21305 
21306 /* Enable policy checking */
21307 
21308 /* Policy variable require-explicit-policy */
21309 
21310 /* Policy variable inhibit-any-policy */
21311 
21312 /* Policy variable inhibit-policy-mapping */
21313 
21314 /* Notify callback that policy is OK */
21315 
21316 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
21317 
21318 /* Delta CRL support */
21319 
21320 /* Check selfsigned CA signature */
21321 
21322 /* Use trusted store first */
21323 
21324 /* Suite B 128 bit only mode: not normally used */
21325 
21326 /* Suite B 192 bit only mode */
21327 
21328 /* Suite B 128 bit mode allowing 192 bit algorithms */
21329 
21330 
21331 /* Allow partial chains if at least one certificate is in trusted store */
21332 
21333 /*
21334  * If the initial chain is not trusted, do not attempt to build an alternative
21335  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
21336  * will force the behaviour to match that of previous versions.
21337  */
21338 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
21339 /* Internal use: mask of policy related options */
21340 
21341 
21342 
21343 
21344 
21345 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
21346                                X509_NAME *name);
21347 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
21348                                              int type, X509_NAME *name);
21349 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
21350                                         X509_OBJECT *x);
21351 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
21352 void X509_OBJECT_free_contents(X509_OBJECT *a);
21353 X509_STORE *X509_STORE_new(void);
21354 void X509_STORE_free(X509_STORE *v);
21355 
21356 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
21357 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
21358 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
21359 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
21360 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
21361 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
21362 
21363 void X509_STORE_set_verify_cb(X509_STORE *ctx,
21364                               int (*verify_cb) (int, X509_STORE_CTX *));
21365 
21366 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
21367                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
21368                                                               *ctx,
21369                                                               X509_NAME *nm));
21370 
21371 X509_STORE_CTX *X509_STORE_CTX_new(void);
21372 
21373 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
21374 
21375 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
21376 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
21377                         X509 *x509, struct stack_st_X509 *chain);
21378 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
21379 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
21380 
21381 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
21382 
21383 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
21384 
21385 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
21386 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
21387 
21388 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
21389 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
21390 
21391 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
21392                               X509_OBJECT *ret);
21393 
21394 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
21395                      long argl, char **ret);
21396 
21397 
21398 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
21399 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
21400 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
21401 
21402 
21403 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
21404 void X509_LOOKUP_free(X509_LOOKUP *ctx);
21405 int X509_LOOKUP_init(X509_LOOKUP *ctx);
21406 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
21407                            X509_OBJECT *ret);
21408 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
21409                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
21410 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
21411                                unsigned char *bytes, int len,
21412                                X509_OBJECT *ret);
21413 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
21414                          X509_OBJECT *ret);
21415 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
21416 
21417 
21418 int X509_STORE_load_locations(X509_STORE *ctx,
21419                               const char *file, const char *dir);
21420 int X509_STORE_set_default_paths(X509_STORE *ctx);
21421 
21422 
21423 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
21424                                     CRYPTO_EX_new *new_func,
21425                                     CRYPTO_EX_dup *dup_func,
21426                                     CRYPTO_EX_free *free_func);
21427 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
21428 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
21429 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
21430 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
21431 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
21432 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
21433 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
21434 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
21435 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
21436 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
21437 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
21438 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
21439 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
21440 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
21441 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
21442 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
21443 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
21444                                    int purpose, int trust);
21445 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
21446 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
21447                              time_t t);
21448 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
21449                                   int (*verify_cb) (int, X509_STORE_CTX *));
21450 
21451 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
21452 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
21453 
21454 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
21455 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
21456 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
21457 
21458 /* X509_VERIFY_PARAM functions */
21459 
21460 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
21461 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
21462 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
21463                               const X509_VERIFY_PARAM *from);
21464 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
21465                            const X509_VERIFY_PARAM *from);
21466 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
21467 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
21468                                 unsigned long flags);
21469 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
21470                                   unsigned long flags);
21471 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
21472 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
21473 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
21474 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
21475 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
21476 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
21477                                   ASN1_OBJECT *policy);
21478 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
21479                                     struct stack_st_ASN1_OBJECT *policies);
21480 
21481 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
21482                                 const char *name, size_t namelen);
21483 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
21484                                 const char *name, size_t namelen);
21485 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
21486                                      unsigned int flags);
21487 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
21488 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
21489                                  const char *email, size_t emaillen);
21490 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
21491                               const unsigned char *ip, size_t iplen);
21492 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
21493                                   const char *ipasc);
21494 
21495 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
21496 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
21497 
21498 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
21499 int X509_VERIFY_PARAM_get_count(void);
21500 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
21501 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
21502 void X509_VERIFY_PARAM_table_cleanup(void);
21503 
21504 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
21505                       struct stack_st_X509 *certs,
21506                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
21507 
21508 void X509_policy_tree_free(X509_POLICY_TREE *tree);
21509 
21510 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
21511 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
21512                                                int i);
21513 
21514 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
21515                                                            X509_POLICY_TREE
21516                                                            *tree);
21517 
21518 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
21519                                                                 X509_POLICY_TREE
21520                                                                 *tree);
21521 
21522 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
21523 
21524 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
21525                                               int i);
21526 
21527 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
21528 
21529 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
21530                                                            X509_POLICY_NODE
21531                                                            *node);
21532 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
21533                                                      *node);
21534 # 582 "/usr/include/openssl/x509.h" 2 3 4
21535 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
21536 /* crypto/pkcs7/pkcs7.h */
21537 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21538  * All rights reserved.
21539  *
21540  * This package is an SSL implementation written
21541  * by Eric Young (eay@cryptsoft.com).
21542  * The implementation was written so as to conform with Netscapes SSL.
21543  *
21544  * This library is free for commercial and non-commercial use as long as
21545  * the following conditions are aheared to.  The following conditions
21546  * apply to all code found in this distribution, be it the RC4, RSA,
21547  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21548  * included with this distribution is covered by the same copyright terms
21549  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21550  *
21551  * Copyright remains Eric Young's, and as such any Copyright notices in
21552  * the code are not to be removed.
21553  * If this package is used in a product, Eric Young should be given attribution
21554  * as the author of the parts of the library used.
21555  * This can be in the form of a textual message at program startup or
21556  * in documentation (online or textual) provided with the package.
21557  *
21558  * Redistribution and use in source and binary forms, with or without
21559  * modification, are permitted provided that the following conditions
21560  * are met:
21561  * 1. Redistributions of source code must retain the copyright
21562  *    notice, this list of conditions and the following disclaimer.
21563  * 2. Redistributions in binary form must reproduce the above copyright
21564  *    notice, this list of conditions and the following disclaimer in the
21565  *    documentation and/or other materials provided with the distribution.
21566  * 3. All advertising materials mentioning features or use of this software
21567  *    must display the following acknowledgement:
21568  *    "This product includes cryptographic software written by
21569  *     Eric Young (eay@cryptsoft.com)"
21570  *    The word 'cryptographic' can be left out if the rouines from the library
21571  *    being used are not cryptographic related :-).
21572  * 4. If you include any Windows specific code (or a derivative thereof) from
21573  *    the apps directory (application code) you must include an acknowledgement:
21574  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21575  *
21576  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21577  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21578  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21579  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21580  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21581  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21582  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21583  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21584  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21585  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21586  * SUCH DAMAGE.
21587  *
21588  * The licence and distribution terms for any publically available version or
21589  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21590  * copied and put under another distribution licence
21591  * [including the GNU Public Licence.]
21592  */
21593 
21594 
21595 
21596 
21597 # 1 "/usr/include/openssl/asn1.h" 1 3 4
21598 /* crypto/asn1/asn1.h */
21599 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21600  * All rights reserved.
21601  *
21602  * This package is an SSL implementation written
21603  * by Eric Young (eay@cryptsoft.com).
21604  * The implementation was written so as to conform with Netscapes SSL.
21605  *
21606  * This library is free for commercial and non-commercial use as long as
21607  * the following conditions are aheared to.  The following conditions
21608  * apply to all code found in this distribution, be it the RC4, RSA,
21609  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21610  * included with this distribution is covered by the same copyright terms
21611  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21612  *
21613  * Copyright remains Eric Young's, and as such any Copyright notices in
21614  * the code are not to be removed.
21615  * If this package is used in a product, Eric Young should be given attribution
21616  * as the author of the parts of the library used.
21617  * This can be in the form of a textual message at program startup or
21618  * in documentation (online or textual) provided with the package.
21619  *
21620  * Redistribution and use in source and binary forms, with or without
21621  * modification, are permitted provided that the following conditions
21622  * are met:
21623  * 1. Redistributions of source code must retain the copyright
21624  *    notice, this list of conditions and the following disclaimer.
21625  * 2. Redistributions in binary form must reproduce the above copyright
21626  *    notice, this list of conditions and the following disclaimer in the
21627  *    documentation and/or other materials provided with the distribution.
21628  * 3. All advertising materials mentioning features or use of this software
21629  *    must display the following acknowledgement:
21630  *    "This product includes cryptographic software written by
21631  *     Eric Young (eay@cryptsoft.com)"
21632  *    The word 'cryptographic' can be left out if the rouines from the library
21633  *    being used are not cryptographic related :-).
21634  * 4. If you include any Windows specific code (or a derivative thereof) from
21635  *    the apps directory (application code) you must include an acknowledgement:
21636  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21637  *
21638  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21639  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21640  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21641  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21642  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21643  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21644  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21645  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21646  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21647  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21648  * SUCH DAMAGE.
21649  *
21650  * The licence and distribution terms for any publically available version or
21651  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21652  * copied and put under another distribution licence
21653  * [including the GNU Public Licence.]
21654  */
21655 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
21656 # 1 "/usr/include/openssl/bio.h" 1 3 4
21657 /* crypto/bio/bio.h */
21658 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21659  * All rights reserved.
21660  *
21661  * This package is an SSL implementation written
21662  * by Eric Young (eay@cryptsoft.com).
21663  * The implementation was written so as to conform with Netscapes SSL.
21664  *
21665  * This library is free for commercial and non-commercial use as long as
21666  * the following conditions are aheared to.  The following conditions
21667  * apply to all code found in this distribution, be it the RC4, RSA,
21668  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21669  * included with this distribution is covered by the same copyright terms
21670  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21671  *
21672  * Copyright remains Eric Young's, and as such any Copyright notices in
21673  * the code are not to be removed.
21674  * If this package is used in a product, Eric Young should be given attribution
21675  * as the author of the parts of the library used.
21676  * This can be in the form of a textual message at program startup or
21677  * in documentation (online or textual) provided with the package.
21678  *
21679  * Redistribution and use in source and binary forms, with or without
21680  * modification, are permitted provided that the following conditions
21681  * are met:
21682  * 1. Redistributions of source code must retain the copyright
21683  *    notice, this list of conditions and the following disclaimer.
21684  * 2. Redistributions in binary form must reproduce the above copyright
21685  *    notice, this list of conditions and the following disclaimer in the
21686  *    documentation and/or other materials provided with the distribution.
21687  * 3. All advertising materials mentioning features or use of this software
21688  *    must display the following acknowledgement:
21689  *    "This product includes cryptographic software written by
21690  *     Eric Young (eay@cryptsoft.com)"
21691  *    The word 'cryptographic' can be left out if the rouines from the library
21692  *    being used are not cryptographic related :-).
21693  * 4. If you include any Windows specific code (or a derivative thereof) from
21694  *    the apps directory (application code) you must include an acknowledgement:
21695  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21696  *
21697  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21698  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21699  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21700  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21701  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21702  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21703  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21704  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21705  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21706  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21707  * SUCH DAMAGE.
21708  *
21709  * The licence and distribution terms for any publically available version or
21710  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21711  * copied and put under another distribution licence
21712  * [including the GNU Public Licence.]
21713  */
21714 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
21715 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21716 /* e_os2.h */
21717 /* ====================================================================
21718  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21719  *
21720  * Redistribution and use in source and binary forms, with or without
21721  * modification, are permitted provided that the following conditions
21722  * are met:
21723  *
21724  * 1. Redistributions of source code must retain the above copyright
21725  *    notice, this list of conditions and the following disclaimer.
21726  *
21727  * 2. Redistributions in binary form must reproduce the above copyright
21728  *    notice, this list of conditions and the following disclaimer in
21729  *    the documentation and/or other materials provided with the
21730  *    distribution.
21731  *
21732  * 3. All advertising materials mentioning features or use of this
21733  *    software must display the following acknowledgment:
21734  *    "This product includes software developed by the OpenSSL Project
21735  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21736  *
21737  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21738  *    endorse or promote products derived from this software without
21739  *    prior written permission. For written permission, please contact
21740  *    openssl-core@openssl.org.
21741  *
21742  * 5. Products derived from this software may not be called "OpenSSL"
21743  *    nor may "OpenSSL" appear in their names without prior written
21744  *    permission of the OpenSSL Project.
21745  *
21746  * 6. Redistributions of any form whatsoever must retain the following
21747  *    acknowledgment:
21748  *    "This product includes software developed by the OpenSSL Project
21749  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21750  *
21751  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21752  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21753  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21754  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21755  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21756  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21757  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21758  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21759  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21760  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21761  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21762  * OF THE POSSIBILITY OF SUCH DAMAGE.
21763  * ====================================================================
21764  *
21765  * This product includes cryptographic software written by Eric Young
21766  * (eay@cryptsoft.com).  This product includes software written by Tim
21767  * Hudson (tjh@cryptsoft.com).
21768  *
21769  */
21770 
21771 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21772 /* opensslconf.h */
21773 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21774 
21775 
21776 
21777 
21778 /* OpenSSL was configured with the following options: */
21779 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21780 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21781    asks for it.  This is a transient feature that is provided for those
21782    who haven't had the time to do the appropriate changes in their
21783    applications.  */
21784 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21785 /* crypto/opensslconf.h.in */
21786 
21787 /* Generate 80386 code? */
21788 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21789 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
21790 
21791 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
21792 /* ====================================================================
21793  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
21794  *
21795  * Redistribution and use in source and binary forms, with or without
21796  * modification, are permitted provided that the following conditions
21797  * are met:
21798  *
21799  * 1. Redistributions of source code must retain the above copyright
21800  *    notice, this list of conditions and the following disclaimer.
21801  *
21802  * 2. Redistributions in binary form must reproduce the above copyright
21803  *    notice, this list of conditions and the following disclaimer in
21804  *    the documentation and/or other materials provided with the
21805  *    distribution.
21806  *
21807  * 3. All advertising materials mentioning features or use of this
21808  *    software must display the following acknowledgment:
21809  *    "This product includes software developed by the OpenSSL Project
21810  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21811  *
21812  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21813  *    endorse or promote products derived from this software without
21814  *    prior written permission. For written permission, please contact
21815  *    openssl-core@openssl.org.
21816  *
21817  * 5. Products derived from this software may not be called "OpenSSL"
21818  *    nor may "OpenSSL" appear in their names without prior written
21819  *    permission of the OpenSSL Project.
21820  *
21821  * 6. Redistributions of any form whatsoever must retain the following
21822  *    acknowledgment:
21823  *    "This product includes software developed by the OpenSSL Project
21824  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21825  *
21826  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21827  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21828  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21829  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21830  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21831  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21832  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21833  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21834  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21835  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21836  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21837  * OF THE POSSIBILITY OF SUCH DAMAGE.
21838  * ====================================================================
21839  *
21840  * This product includes cryptographic software written by Eric Young
21841  * (eay@cryptsoft.com).  This product includes software written by Tim
21842  * Hudson (tjh@cryptsoft.com).
21843  *
21844  */
21845 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
21846 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21847 /* ====================================================================
21848  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21849  *
21850  * Redistribution and use in source and binary forms, with or without
21851  * modification, are permitted provided that the following conditions
21852  * are met:
21853  *
21854  * 1. Redistributions of source code must retain the above copyright
21855  *    notice, this list of conditions and the following disclaimer.
21856  *
21857  * 2. Redistributions in binary form must reproduce the above copyright
21858  *    notice, this list of conditions and the following disclaimer in
21859  *    the documentation and/or other materials provided with the
21860  *    distribution.
21861  *
21862  * 3. All advertising materials mentioning features or use of this
21863  *    software must display the following acknowledgment:
21864  *    "This product includes software developed by the OpenSSL Project
21865  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21866  *
21867  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21868  *    endorse or promote products derived from this software without
21869  *    prior written permission. For written permission, please contact
21870  *    openssl-core@openssl.org.
21871  *
21872  * 5. Products derived from this software may not be called "OpenSSL"
21873  *    nor may "OpenSSL" appear in their names without prior written
21874  *    permission of the OpenSSL Project.
21875  *
21876  * 6. Redistributions of any form whatsoever must retain the following
21877  *    acknowledgment:
21878  *    "This product includes software developed by the OpenSSL Project
21879  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21880  *
21881  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21882  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21883  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21884  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21885  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21886  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21887  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21888  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21889  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21890  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21891  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21892  * OF THE POSSIBILITY OF SUCH DAMAGE.
21893  * ====================================================================
21894  *
21895  * This product includes cryptographic software written by Eric Young
21896  * (eay@cryptsoft.com).  This product includes software written by Tim
21897  * Hudson (tjh@cryptsoft.com).
21898  *
21899  */
21900 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
21901 # 79 "/usr/include/openssl/pkcs7.h" 3 4
21902 /*-
21903 Encryption_ID           DES-CBC
21904 Digest_ID               MD5
21905 Digest_Encryption_ID    rsaEncryption
21906 Key_Encryption_ID       rsaEncryption
21907 */
21908 
21909 typedef struct pkcs7_issuer_and_serial_st {
21910     X509_NAME *issuer;
21911     ASN1_INTEGER *serial;
21912 } PKCS7_ISSUER_AND_SERIAL;
21913 
21914 typedef struct pkcs7_signer_info_st {
21915     ASN1_INTEGER *version; /* version 1 */
21916     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
21917     X509_ALGOR *digest_alg;
21918     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
21919     X509_ALGOR *digest_enc_alg;
21920     ASN1_OCTET_STRING *enc_digest;
21921     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
21922     /* The private key to sign with */
21923     EVP_PKEY *pkey;
21924 } PKCS7_SIGNER_INFO;
21925 
21926 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
21927 
21928 
21929 typedef struct pkcs7_recip_info_st {
21930     ASN1_INTEGER *version; /* version 0 */
21931     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
21932     X509_ALGOR *key_enc_algor;
21933     ASN1_OCTET_STRING *enc_key;
21934     X509 *cert; /* get the pub-key from this */
21935 } PKCS7_RECIP_INFO;
21936 
21937 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
21938 
21939 
21940 typedef struct pkcs7_signed_st {
21941     ASN1_INTEGER *version; /* version 1 */
21942     struct stack_st_X509_ALGOR *md_algs; /* md used */
21943     struct stack_st_X509 *cert; /* [ 0 ] */
21944     struct stack_st_X509_CRL *crl; /* [ 1 ] */
21945     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
21946     struct pkcs7_st *contents;
21947 } PKCS7_SIGNED;
21948 /*
21949  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
21950  * merging the two
21951  */
21952 
21953 typedef struct pkcs7_enc_content_st {
21954     ASN1_OBJECT *content_type;
21955     X509_ALGOR *algorithm;
21956     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
21957     const EVP_CIPHER *cipher;
21958 } PKCS7_ENC_CONTENT;
21959 
21960 typedef struct pkcs7_enveloped_st {
21961     ASN1_INTEGER *version; /* version 0 */
21962     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
21963     PKCS7_ENC_CONTENT *enc_data;
21964 } PKCS7_ENVELOPE;
21965 
21966 typedef struct pkcs7_signedandenveloped_st {
21967     ASN1_INTEGER *version; /* version 1 */
21968     struct stack_st_X509_ALGOR *md_algs; /* md used */
21969     struct stack_st_X509 *cert; /* [ 0 ] */
21970     struct stack_st_X509_CRL *crl; /* [ 1 ] */
21971     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
21972     PKCS7_ENC_CONTENT *enc_data;
21973     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
21974 } PKCS7_SIGN_ENVELOPE;
21975 
21976 typedef struct pkcs7_digest_st {
21977     ASN1_INTEGER *version; /* version 0 */
21978     X509_ALGOR *md; /* md used */
21979     struct pkcs7_st *contents;
21980     ASN1_OCTET_STRING *digest;
21981 } PKCS7_DIGEST;
21982 
21983 typedef struct pkcs7_encrypted_st {
21984     ASN1_INTEGER *version; /* version 0 */
21985     PKCS7_ENC_CONTENT *enc_data;
21986 } PKCS7_ENCRYPT;
21987 
21988 typedef struct pkcs7_st {
21989     /*
21990      * The following is non NULL if it contains ASN1 encoding of this
21991      * structure
21992      */
21993     unsigned char *asn1;
21994     long length;
21995 
21996 
21997 
21998     int state; /* used during processing */
21999     int detached;
22000     ASN1_OBJECT *type;
22001     /* content as defined by the type */
22002     /*
22003      * all encryption/message digests are applied to the 'contents', leaving
22004      * out the 'type' field.
22005      */
22006     union {
22007         char *ptr;
22008         /* NID_pkcs7_data */
22009         ASN1_OCTET_STRING *data;
22010         /* NID_pkcs7_signed */
22011         PKCS7_SIGNED *sign;
22012         /* NID_pkcs7_enveloped */
22013         PKCS7_ENVELOPE *enveloped;
22014         /* NID_pkcs7_signedAndEnveloped */
22015         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
22016         /* NID_pkcs7_digest */
22017         PKCS7_DIGEST *digest;
22018         /* NID_pkcs7_encrypted */
22019         PKCS7_ENCRYPT *encrypted;
22020         /* Anything else */
22021         ASN1_TYPE *other;
22022     } d;
22023 } PKCS7;
22024 
22025 struct stack_st_PKCS7 { _STACK stack; };
22026 
22027 
22028 # 227 "/usr/include/openssl/pkcs7.h" 3 4
22029 /* S/MIME related flags */
22030 # 246 "/usr/include/openssl/pkcs7.h" 3 4
22031 /* Flags: for compatibility with older code */
22032 # 258 "/usr/include/openssl/pkcs7.h" 3 4
22033 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;
22034 
22035 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
22036                                    const EVP_MD *type, unsigned char *md,
22037                                    unsigned int *len);
22038 
22039 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
22040 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
22041 
22042 PKCS7 *PKCS7_dup(PKCS7 *p7);
22043 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
22044 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
22045 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
22046 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
22047 
22048 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;
22049 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;
22050 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;
22051 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;
22052 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;
22053 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;
22054 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;
22055 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;
22056 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;
22057 
22058 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
22059 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
22060 
22061 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
22062 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
22063 
22064 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
22065 
22066 int PKCS7_set_type(PKCS7 *p7, int type);
22067 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
22068 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
22069 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
22070                           const EVP_MD *dgst);
22071 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
22072 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
22073 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
22074 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
22075 int PKCS7_content_new(PKCS7 *p7, int nid);
22076 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
22077                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
22078 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
22079                           X509 *x509);
22080 
22081 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
22082 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
22083 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
22084 
22085 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
22086                                        EVP_PKEY *pkey, const EVP_MD *dgst);
22087 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
22088 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
22089 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
22090 
22091 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
22092 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
22093                                  X509_ALGOR **pdig, X509_ALGOR **psig);
22094 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
22095 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
22096 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
22097 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
22098 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
22099 
22100 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
22101 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
22102 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
22103                                void *data);
22104 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
22105                         void *value);
22106 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
22107 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
22108 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
22109                                 struct stack_st_X509_ATTRIBUTE *sk);
22110 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
22111                          struct stack_st_X509_ATTRIBUTE *sk);
22112 
22113 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
22114                   BIO *data, int flags);
22115 
22116 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
22117                                          X509 *signcert, EVP_PKEY *pkey,
22118                                          const EVP_MD *md, int flags);
22119 
22120 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
22121 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
22122                  BIO *indata, BIO *out, int flags);
22123 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
22124                                    int flags);
22125 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
22126                      int flags);
22127 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
22128                   int flags);
22129 
22130 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
22131                               struct stack_st_X509_ALGOR *cap);
22132 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
22133 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
22134 
22135 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
22136 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
22137 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
22138                              const unsigned char *md, int mdlen);
22139 
22140 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
22141 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
22142 
22143 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
22144 
22145 /* BEGIN ERROR CODES */
22146 /*
22147  * The following lines are auto generated by the script mkerr.pl. Any changes
22148  * made after this point may be overwritten when the script is next run.
22149  */
22150 void ERR_load_PKCS7_strings(void);
22151 
22152 /* Error codes for the PKCS7 functions. */
22153 
22154 /* Function codes. */
22155 # 421 "/usr/include/openssl/pkcs7.h" 3 4
22156 /* Reason codes. */
22157 # 583 "/usr/include/openssl/x509.h" 2 3 4
22158 # 592 "/usr/include/openssl/x509.h" 3 4
22159 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
22160 # 608 "/usr/include/openssl/x509.h" 3 4
22161 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
22162 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
22163                                      int (*crl_free) (X509_CRL *crl),
22164                                      int (*crl_lookup) (X509_CRL *crl,
22165                                                         X509_REVOKED **ret,
22166                                                         ASN1_INTEGER *ser,
22167                                                         X509_NAME *issuer),
22168                                      int (*crl_verify) (X509_CRL *crl,
22169                                                         EVP_PKEY *pk));
22170 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
22171 
22172 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
22173 void *X509_CRL_get_meth_data(X509_CRL *crl);
22174 
22175 /*
22176  * This one is only used so that a binary form can output, as in
22177  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
22178  */
22179 
22180 
22181 const char *X509_verify_cert_error_string(long n);
22182 
22183 
22184 int X509_verify(X509 *a, EVP_PKEY *r);
22185 
22186 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
22187 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
22188 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
22189 
22190 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
22191 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
22192 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
22193 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
22194 
22195 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
22196 
22197 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
22198 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
22199 
22200 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
22201 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
22202 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
22203 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
22204 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
22205 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
22206 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
22207 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
22208 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
22209 
22210 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
22211                        unsigned char *md, unsigned int *len);
22212 int X509_digest(const X509 *data, const EVP_MD *type,
22213                 unsigned char *md, unsigned int *len);
22214 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
22215                     unsigned char *md, unsigned int *len);
22216 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
22217                     unsigned char *md, unsigned int *len);
22218 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
22219                      unsigned char *md, unsigned int *len);
22220 
22221 
22222 
22223 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
22224 int i2d_X509_fp(FILE *fp, X509 *x509);
22225 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
22226 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
22227 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
22228 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
22229 
22230 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
22231 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
22232 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
22233 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
22234 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
22235 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
22236 
22237 
22238 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
22239 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
22240 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
22241 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
22242 
22243 
22244 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
22245 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
22246 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
22247 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
22248 
22249 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
22250 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
22251 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
22252                                                 PKCS8_PRIV_KEY_INFO **p8inf);
22253 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
22254 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
22255 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
22256 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
22257 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
22258 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
22259 
22260 
22261 
22262 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
22263 int i2d_X509_bio(BIO *bp, X509 *x509);
22264 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
22265 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
22266 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
22267 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
22268 
22269 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
22270 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
22271 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
22272 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
22273 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
22274 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
22275 
22276 
22277 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
22278 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
22279 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
22280 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
22281 
22282 
22283 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
22284 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
22285 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
22286 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
22287 
22288 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
22289 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
22290 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
22291                                                  PKCS8_PRIV_KEY_INFO **p8inf);
22292 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
22293 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
22294 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
22295 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
22296 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
22297 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
22298 
22299 
22300 X509 *X509_dup(X509 *x509);
22301 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
22302 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
22303 X509_CRL *X509_CRL_dup(X509_CRL *crl);
22304 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
22305 X509_REQ *X509_REQ_dup(X509_REQ *req);
22306 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
22307 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
22308                     void *pval);
22309 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
22310                      X509_ALGOR *algor);
22311 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
22312 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
22313 
22314 X509_NAME *X509_NAME_dup(X509_NAME *xn);
22315 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
22316 
22317 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
22318 int X509_cmp_current_time(const ASN1_TIME *s);
22319 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
22320 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
22321                             int offset_day, long offset_sec, time_t *t);
22322 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
22323 
22324 const char *X509_get_default_cert_area(void);
22325 const char *X509_get_default_cert_dir(void);
22326 const char *X509_get_default_cert_file(void);
22327 const char *X509_get_default_cert_dir_env(void);
22328 const char *X509_get_default_cert_file_env(void);
22329 const char *X509_get_default_private_dir(void);
22330 
22331 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
22332 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
22333 
22334 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;
22335 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;
22336 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;
22337 
22338 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;
22339 
22340 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
22341 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
22342 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
22343 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
22344 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
22345 
22346 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
22347 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
22348 
22349 
22350 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
22351 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
22352 
22353 
22354 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
22355 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
22356 
22357 
22358 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;
22359 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;
22360 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;
22361 
22362 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;
22363 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
22364 
22365 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;
22366 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;
22367 
22368 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;
22369 
22370 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;
22371 
22372 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
22373 
22374 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;
22375 
22376 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;
22377 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;
22378 
22379 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;
22380 
22381 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
22382                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
22383 int X509_set_ex_data(X509 *r, int idx, void *arg);
22384 void *X509_get_ex_data(X509 *r, int idx);
22385 int i2d_X509_AUX(X509 *a, unsigned char **pp);
22386 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
22387 
22388 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
22389 
22390 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
22391                          const X509 *x);
22392 int X509_get_signature_nid(const X509 *x);
22393 
22394 int X509_alias_set1(X509 *x, unsigned char *name, int len);
22395 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
22396 unsigned char *X509_alias_get0(X509 *x, int *len);
22397 unsigned char *X509_keyid_get0(X509 *x, int *len);
22398 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
22399                                                                 int);
22400 int X509_TRUST_set(int *t, int trust);
22401 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
22402 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
22403 void X509_trust_clear(X509 *x);
22404 void X509_reject_clear(X509 *x);
22405 
22406 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;
22407 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;
22408 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;
22409 
22410 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
22411 int X509_CRL_get0_by_serial(X509_CRL *crl,
22412                             X509_REVOKED **ret, ASN1_INTEGER *serial);
22413 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
22414 
22415 X509_PKEY *X509_PKEY_new(void);
22416 void X509_PKEY_free(X509_PKEY *a);
22417 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
22418 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
22419                          long length);
22420 
22421 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;
22422 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;
22423 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;
22424 
22425 
22426 X509_INFO *X509_INFO_new(void);
22427 void X509_INFO_free(X509_INFO *a);
22428 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
22429 
22430 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
22431                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
22432 
22433 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
22434                 unsigned char *md, unsigned int *len);
22435 
22436 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
22437               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
22438               char *data, EVP_PKEY *pkey, const EVP_MD *type);
22439 
22440 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
22441                      unsigned char *md, unsigned int *len);
22442 
22443 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
22444                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
22445 
22446 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
22447                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
22448                    EVP_PKEY *pkey, const EVP_MD *type);
22449 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
22450                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
22451                        void *asn, EVP_MD_CTX *ctx);
22452 
22453 
22454 int X509_set_version(X509 *x, long version);
22455 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
22456 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
22457 int X509_set_issuer_name(X509 *x, X509_NAME *name);
22458 X509_NAME *X509_get_issuer_name(X509 *a);
22459 int X509_set_subject_name(X509 *x, X509_NAME *name);
22460 X509_NAME *X509_get_subject_name(X509 *a);
22461 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
22462 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
22463 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
22464 EVP_PKEY *X509_get_pubkey(X509 *x);
22465 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
22466 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
22467 
22468 int X509_REQ_set_version(X509_REQ *x, long version);
22469 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
22470 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
22471 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
22472 int X509_REQ_extension_nid(int nid);
22473 int *X509_REQ_get_extension_nids(void);
22474 void X509_REQ_set_extension_nids(int *nids);
22475 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
22476 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
22477                                 int nid);
22478 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
22479 int X509_REQ_get_attr_count(const X509_REQ *req);
22480 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
22481 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
22482                              int lastpos);
22483 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
22484 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
22485 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
22486 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
22487                               const ASN1_OBJECT *obj, int type,
22488                               const unsigned char *bytes, int len);
22489 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
22490                               int nid, int type,
22491                               const unsigned char *bytes, int len);
22492 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
22493                               const char *attrname, int type,
22494                               const unsigned char *bytes, int len);
22495 
22496 int X509_CRL_set_version(X509_CRL *x, long version);
22497 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
22498 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
22499 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
22500 int X509_CRL_sort(X509_CRL *crl);
22501 
22502 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
22503 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
22504 
22505 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
22506                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
22507 
22508 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
22509 
22510 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
22511 int X509_chain_check_suiteb(int *perror_depth,
22512                             X509 *x, struct stack_st_X509 *chain,
22513                             unsigned long flags);
22514 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
22515 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
22516 
22517 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
22518 unsigned long X509_issuer_and_serial_hash(X509 *a);
22519 
22520 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
22521 unsigned long X509_issuer_name_hash(X509 *a);
22522 
22523 int X509_subject_name_cmp(const X509 *a, const X509 *b);
22524 unsigned long X509_subject_name_hash(X509 *x);
22525 
22526 
22527 unsigned long X509_issuer_name_hash_old(X509 *a);
22528 unsigned long X509_subject_name_hash_old(X509 *x);
22529 
22530 
22531 int X509_cmp(const X509 *a, const X509 *b);
22532 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
22533 unsigned long X509_NAME_hash(X509_NAME *x);
22534 unsigned long X509_NAME_hash_old(X509_NAME *x);
22535 
22536 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
22537 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
22538 
22539 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
22540                      unsigned long cflag);
22541 int X509_print_fp(FILE *bp, X509 *x);
22542 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
22543 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
22544 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
22545                           unsigned long flags);
22546 
22547 
22548 
22549 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
22550 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
22551                        unsigned long flags);
22552 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
22553                   unsigned long cflag);
22554 int X509_print(BIO *bp, X509 *x);
22555 int X509_ocspid_print(BIO *bp, X509 *x);
22556 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
22557 int X509_CRL_print(BIO *bp, X509_CRL *x);
22558 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
22559                       unsigned long cflag);
22560 int X509_REQ_print(BIO *bp, X509_REQ *req);
22561 
22562 
22563 int X509_NAME_entry_count(X509_NAME *name);
22564 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
22565 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
22566                               char *buf, int len);
22567 
22568 /*
22569  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
22570  * lastpos, search after that position on.
22571  */
22572 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
22573 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
22574                                int lastpos);
22575 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
22576 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
22577 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
22578                         int loc, int set);
22579 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
22580                                unsigned char *bytes, int len, int loc,
22581                                int set);
22582 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
22583                                unsigned char *bytes, int len, int loc,
22584                                int set);
22585 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
22586                                                const char *field, int type,
22587                                                const unsigned char *bytes,
22588                                                int len);
22589 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
22590                                                int type, unsigned char *bytes,
22591                                                int len);
22592 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
22593                                const unsigned char *bytes, int len, int loc,
22594                                int set);
22595 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
22596                                                ASN1_OBJECT *obj, int type,
22597                                                const unsigned char *bytes,
22598                                                int len);
22599 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
22600 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
22601                              const unsigned char *bytes, int len);
22602 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
22603 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
22604 
22605 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
22606 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
22607                           int nid, int lastpos);
22608 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
22609                           ASN1_OBJECT *obj, int lastpos);
22610 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
22611                                int crit, int lastpos);
22612 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
22613 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
22614 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
22615                                          X509_EXTENSION *ex, int loc);
22616 
22617 int X509_get_ext_count(X509 *x);
22618 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
22619 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
22620 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
22621 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
22622 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
22623 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
22624 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
22625 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
22626                       unsigned long flags);
22627 
22628 int X509_CRL_get_ext_count(X509_CRL *x);
22629 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
22630 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
22631 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
22632 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
22633 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
22634 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
22635 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
22636 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
22637                           unsigned long flags);
22638 
22639 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
22640 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
22641 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
22642                                 int lastpos);
22643 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
22644 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
22645 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
22646 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
22647 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
22648 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
22649                               unsigned long flags);
22650 
22651 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
22652                                              int nid, int crit,
22653                                              ASN1_OCTET_STRING *data);
22654 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
22655                                              ASN1_OBJECT *obj, int crit,
22656                                              ASN1_OCTET_STRING *data);
22657 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
22658 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
22659 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
22660 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
22661 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
22662 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
22663 
22664 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
22665 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
22666                            int lastpos);
22667 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
22668                            ASN1_OBJECT *obj, int lastpos);
22669 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
22670 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
22671 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
22672                                            X509_ATTRIBUTE *attr);
22673 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
22674                                                   **x, const ASN1_OBJECT *obj,
22675                                                   int type,
22676                                                   const unsigned char *bytes,
22677                                                   int len);
22678 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
22679                                                   **x, int nid, int type,
22680                                                   const unsigned char *bytes,
22681                                                   int len);
22682 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
22683                                                   **x, const char *attrname,
22684                                                   int type,
22685                                                   const unsigned char *bytes,
22686                                                   int len);
22687 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
22688                               int lastpos, int type);
22689 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
22690                                              int atrtype, const void *data,
22691                                              int len);
22692 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
22693                                              const ASN1_OBJECT *obj,
22694                                              int atrtype, const void *data,
22695                                              int len);
22696 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
22697                                              const char *atrname, int type,
22698                                              const unsigned char *bytes,
22699                                              int len);
22700 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
22701 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
22702                              const void *data, int len);
22703 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
22704                                void *data);
22705 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
22706 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
22707 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
22708 
22709 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
22710 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
22711 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
22712                              int lastpos);
22713 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
22714 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
22715 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
22716 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
22717                               const ASN1_OBJECT *obj, int type,
22718                               const unsigned char *bytes, int len);
22719 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
22720                               int nid, int type,
22721                               const unsigned char *bytes, int len);
22722 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
22723                               const char *attrname, int type,
22724                               const unsigned char *bytes, int len);
22725 
22726 int X509_verify_cert(X509_STORE_CTX *ctx);
22727 
22728 /* lookup a cert from a X509 STACK */
22729 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
22730                                      ASN1_INTEGER *serial);
22731 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
22732 
22733 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;
22734 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;
22735 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;
22736 
22737 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
22738                          const unsigned char *salt, int saltlen);
22739 
22740 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
22741                           const unsigned char *salt, int saltlen);
22742 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
22743                            unsigned char *salt, int saltlen);
22744 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
22745                               unsigned char *salt, int saltlen,
22746                               unsigned char *aiv, int prf_nid);
22747 
22748 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
22749                              int prf_nid, int keylen);
22750 
22751 /* PKCS#8 utilities */
22752 
22753 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;
22754 
22755 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
22756 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
22757 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
22758 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
22759 
22760 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
22761                     int version, int ptype, void *pval,
22762                     unsigned char *penc, int penclen);
22763 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
22764                     const unsigned char **pk, int *ppklen,
22765                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
22766 
22767 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
22768                            int ptype, void *pval,
22769                            unsigned char *penc, int penclen);
22770 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
22771                            const unsigned char **pk, int *ppklen,
22772                            X509_ALGOR **pa, X509_PUBKEY *pub);
22773 
22774 int X509_check_trust(X509 *x, int id, int flags);
22775 int X509_TRUST_get_count(void);
22776 X509_TRUST *X509_TRUST_get0(int idx);
22777 int X509_TRUST_get_by_id(int id);
22778 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
22779                    char *name, int arg1, void *arg2);
22780 void X509_TRUST_cleanup(void);
22781 int X509_TRUST_get_flags(X509_TRUST *xp);
22782 char *X509_TRUST_get0_name(X509_TRUST *xp);
22783 int X509_TRUST_get_trust(X509_TRUST *xp);
22784 
22785 /* BEGIN ERROR CODES */
22786 /*
22787  * The following lines are auto generated by the script mkerr.pl. Any changes
22788  * made after this point may be overwritten when the script is next run.
22789  */
22790 
22791 void ERR_load_X509_strings(void);
22792 
22793 /* Error codes for the X509 functions. */
22794 
22795 /* Function codes. */
22796 # 1291 "/usr/include/openssl/x509.h" 3 4
22797 /* Reason codes. */
22798 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22799 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
22800 /*
22801  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22802  *
22803  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22804  * Use is subject to license terms.
22805  */
22806 
22807 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22808 /*	  All Rights Reserved  	*/
22809 
22810 /*
22811  * BIND 4.9.3:
22812  *
22813  * Copyright (c) 1980, 1983, 1988, 1993
22814  *	The Regents of the University of California.  All rights reserved.
22815  *
22816  * Redistribution and use in source and binary forms, with or without
22817  * modification, are permitted provided that the following conditions
22818  * are met:
22819  * 1. Redistributions of source code must retain the above copyright
22820  *    notice, this list of conditions and the following disclaimer.
22821  * 2. Redistributions in binary form must reproduce the above copyright
22822  *    notice, this list of conditions and the following disclaimer in the
22823  *    documentation and/or other materials provided with the distribution.
22824  * 3. All advertising materials mentioning features or use of this software
22825  *    must display the following acknowledgement:
22826  *	This product includes software developed by the University of
22827  *	California, Berkeley and its contributors.
22828  * 4. Neither the name of the University nor the names of its contributors
22829  *    may be used to endorse or promote products derived from this software
22830  *    without specific prior written permission.
22831  *
22832  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22833  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22834  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22835  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22836  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22837  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22838  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22839  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22840  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22841  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22842  * SUCH DAMAGE.
22843  * -
22844  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
22845  *
22846  * Permission to use, copy, modify, and distribute this software for any
22847  * purpose with or without fee is hereby granted, provided that the above
22848  * copyright notice and this permission notice appear in all copies, and that
22849  * the name of Digital Equipment Corporation not be used in advertising or
22850  * publicity pertaining to distribution of the document or software without
22851  * specific, written prior permission.
22852  *
22853  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
22854  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
22855  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
22856  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
22857  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
22858  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
22859  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22860  * SOFTWARE.
22861  * --Copyright--
22862  *
22863  * End BIND 4.9.3
22864  */
22865 
22866 /*
22867  * Structures returned by network data base library.
22868  * All addresses are supplied in host order, and
22869  * returned in network order (suitable for use in system calls).
22870  */
22871 
22872 
22873 
22874 
22875 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22876 /*
22877  * CDDL HEADER START
22878  *
22879  * The contents of this file are subject to the terms of the
22880  * Common Development and Distribution License (the "License").
22881  * You may not use this file except in compliance with the License.
22882  *
22883  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22884  * or http://www.opensolaris.org/os/licensing.
22885  * See the License for the specific language governing permissions
22886  * and limitations under the License.
22887  *
22888  * When distributing Covered Code, include this CDDL HEADER in each
22889  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22890  * If applicable, add the following below this CDDL HEADER, with the
22891  * fields enclosed by brackets "[]" replaced with your own identifying
22892  * information: Portions Copyright [yyyy] [name of copyright owner]
22893  *
22894  * CDDL HEADER END
22895  */
22896 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22897 /*	  All Rights Reserved  	*/
22898 
22899 
22900 /*
22901  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22902  * Use is subject to license terms.
22903  *
22904  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22905  * Copyright 2016 Joyent, Inc.
22906  */
22907 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
22908 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
22909 /*
22910  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22911  * Use is subject to license terms.
22912  *
22913  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
22914  */
22915 /*
22916  * Copyright (c) 1982, 1986 Regents of the University of California.
22917  * All rights reserved.
22918  *
22919  * Redistribution and use in source and binary forms are permitted
22920  * provided that this notice is preserved and that due credit is given
22921  * to the University of California at Berkeley. The name of the University
22922  * may not be used to endorse or promote products derived from this
22923  * software without specific prior written permission. This software
22924  * is provided ``as is'' without express or implied warranty.
22925  */
22926 
22927 /*
22928  * Constants and structures defined by the internet system,
22929  * according to following documents
22930  *
22931  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
22932  *	http://www.iana.org/assignments/protocol-numbers
22933  *	http://www.iana.org/assignments/port-numbers
22934  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
22935  *
22936  */
22937 
22938 
22939 
22940 
22941 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
22942 /*
22943  * CDDL HEADER START
22944  *
22945  * The contents of this file are subject to the terms of the
22946  * Common Development and Distribution License (the "License").
22947  * You may not use this file except in compliance with the License.
22948  *
22949  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22950  * or http://www.opensolaris.org/os/licensing.
22951  * See the License for the specific language governing permissions
22952  * and limitations under the License.
22953  *
22954  * When distributing Covered Code, include this CDDL HEADER in each
22955  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22956  * If applicable, add the following below this CDDL HEADER, with the
22957  * fields enclosed by brackets "[]" replaced with your own identifying
22958  * information: Portions Copyright [yyyy] [name of copyright owner]
22959  *
22960  * CDDL HEADER END
22961  */
22962 
22963 /*
22964  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
22965  * Copyright 2016 Joyent, Inc.
22966  *
22967  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
22968  * Use is subject to license terms.
22969  */
22970 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22971 
22972 
22973 
22974 
22975 
22976 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22977 /*
22978  * CDDL HEADER START
22979  *
22980  * The contents of this file are subject to the terms of the
22981  * Common Development and Distribution License (the "License").
22982  * You may not use this file except in compliance with the License.
22983  *
22984  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22985  * or http://www.opensolaris.org/os/licensing.
22986  * See the License for the specific language governing permissions
22987  * and limitations under the License.
22988  *
22989  * When distributing Covered Code, include this CDDL HEADER in each
22990  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22991  * If applicable, add the following below this CDDL HEADER, with the
22992  * fields enclosed by brackets "[]" replaced with your own identifying
22993  * information: Portions Copyright [yyyy] [name of copyright owner]
22994  *
22995  * CDDL HEADER END
22996  */
22997 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22998 /*	  All Rights Reserved  	*/
22999 
23000 
23001 /*
23002  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23003  * Use is subject to license terms.
23004  *
23005  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23006  * Copyright 2016 Joyent, Inc.
23007  */
23008 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
23009 
23010 
23011 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
23012 /*
23013  * CDDL HEADER START
23014  *
23015  * The contents of this file are subject to the terms of the
23016  * Common Development and Distribution License (the "License").
23017  * You may not use this file except in compliance with the License.
23018  *
23019  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23020  * or http://www.opensolaris.org/os/licensing.
23021  * See the License for the specific language governing permissions
23022  * and limitations under the License.
23023  *
23024  * When distributing Covered Code, include this CDDL HEADER in each
23025  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23026  * If applicable, add the following below this CDDL HEADER, with the
23027  * fields enclosed by brackets "[]" replaced with your own identifying
23028  * information: Portions Copyright [yyyy] [name of copyright owner]
23029  *
23030  * CDDL HEADER END
23031  */
23032 /*
23033  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23034  * Use is subject to license terms.
23035  */
23036 
23037 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23038 /*	  All Rights Reserved	*/
23039 
23040 /*
23041  * Portions of this source code were derived from Berkeley 4.3 BSD
23042  * under license from the Regents of the University of California.
23043  */
23044 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
23045 typedef uint16_t sa_family_t;
23046 
23047 
23048 /*
23049  * Structure used by kernel to store most
23050  * addresses.
23051  */
23052 struct sockaddr {
23053  sa_family_t sa_family; /* address family */
23054  char sa_data[14]; /* up to 14 bytes of direct address */
23055 };
23056 
23057 
23058 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
23059 /*
23060  * CDDL HEADER START
23061  *
23062  * The contents of this file are subject to the terms of the
23063  * Common Development and Distribution License (the "License").
23064  * You may not use this file except in compliance with the License.
23065  *
23066  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23067  * or http://www.opensolaris.org/os/licensing.
23068  * See the License for the specific language governing permissions
23069  * and limitations under the License.
23070  *
23071  * When distributing Covered Code, include this CDDL HEADER in each
23072  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23073  * If applicable, add the following below this CDDL HEADER, with the
23074  * fields enclosed by brackets "[]" replaced with your own identifying
23075  * information: Portions Copyright [yyyy] [name of copyright owner]
23076  *
23077  * CDDL HEADER END
23078  */
23079 /*
23080  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
23081  */
23082 
23083 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23084 /*	  All Rights Reserved  	*/
23085 
23086 /*
23087  * University Copyright- Copyright (c) 1982, 1986, 1988
23088  * The Regents of the University of California
23089  * All Rights Reserved
23090  *
23091  * University Acknowledgment- Portions of this document are derived from
23092  * software developed by the University of California, Berkeley, and its
23093  * contributors.
23094  */
23095 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
23096 /*
23097  * Definitions for UNIX IPC domain.
23098  */
23099 struct sockaddr_un {
23100  sa_family_t sun_family; /* AF_UNIX */
23101  char sun_path[108]; /* path name (gag) */
23102 };
23103 
23104 
23105 
23106 /*
23107  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
23108  * change.
23109  *
23110  * Also, include a strlen() prototype, and we have to protect it w.r.t.
23111  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
23112  */
23113 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
23114 extern size_t strlen(const char *);
23115 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
23116 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
23117 /*
23118  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
23119  * Use is subject to license terms.
23120  */
23121 /*
23122  * Copyright (c) 1990, 1993
23123  *	The Regents of the University of California.  All rights reserved.
23124  *
23125  * Redistribution and use in source and binary forms, with or without
23126  * modification, are permitted provided that the following conditions
23127  * are met:
23128  * 1. Redistributions of source code must retain the above copyright
23129  *    notice, this list of conditions and the following disclaimer.
23130  * 2. Redistributions in binary form must reproduce the above copyright
23131  *    notice, this list of conditions and the following disclaimer in the
23132  *    documentation and/or other materials provided with the distribution.
23133  * 3. All advertising materials mentioning features or use of this software
23134  *    must display the following acknowledgement:
23135  *	This product includes software developed by the University of
23136  *	California, Berkeley and its contributors.
23137  * 4. Neither the name of the University nor the names of its contributors
23138  *    may be used to endorse or promote products derived from this software
23139  *    without specific prior written permission.
23140  *
23141  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23142  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23143  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23144  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23145  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23146  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23147  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23148  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23149  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23150  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23151  * SUCH DAMAGE.
23152  */
23153 
23154 
23155 
23156 
23157 #pragma ident "%Z%%M%	%I%	%E% SMI"
23158 /* from UCB 8.1 (Berkeley) 6/10/93 */
23159 
23160 
23161 
23162 
23163 
23164 /*
23165  * A Link-Level Sockaddr may specify the interface in one of two
23166  * ways: either by means of a system-provided index number (computed
23167  * anew and possibly differently on every reboot), or by a human-readable
23168  * string such as "il0" (for managerial convenience).
23169  *
23170  * Census taking actions, such as something akin to SIOCGCONF would return
23171  * both the index and the human name.
23172  *
23173  * High volume transactions (such as giving a link-level ``from'' address
23174  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
23175  * form, (which requires fewer copy operations and less space).
23176  *
23177  * The form and interpretation  of the link-level address is purely a matter
23178  * of convention between the device driver and its consumers; however, it is
23179  * expected that all drivers for an interface of a given if_type will agree.
23180  */
23181 
23182 /*
23183  * Structure of a Link-Level sockaddr:
23184  */
23185 struct sockaddr_dl {
23186  ushort_t sdl_family; /* AF_LINK */
23187  ushort_t sdl_index; /* if != 0, system given index for interface */
23188  uchar_t sdl_type; /* interface type */
23189  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
23190  uchar_t sdl_alen; /* link level address length */
23191  uchar_t sdl_slen; /* link layer selector length */
23192  char sdl_data[244]; /* contains both if name and ll address */
23193 };
23194 
23195 
23196 
23197 
23198 extern char *_link_ntoa(const unsigned char *, char *, int, int);
23199 extern unsigned char *_link_aton(const char *, int *);
23200 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
23201 
23202 
23203 
23204 /*
23205  * sockaddr_storage:
23206  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
23207  * structures. Has sufficient size and alignment for those sockaddrs.
23208  */
23209 
23210 /*
23211  * Desired maximum size, alignment size and related types.
23212  */
23213 
23214 
23215 /*
23216  * To represent desired sockaddr max alignment for platform, a
23217  * type is chosen which may depend on implementation platform architecture.
23218  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
23219  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
23220  * on platforms where it is possible to do so. (e.g not possible on ia32).
23221  * For all currently supported platforms by our implementation
23222  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
23223  * type "double" is suitable for that intent.
23224  *
23225  * Note: Type "double" is chosen over the more obvious integer type int64_t.
23226  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
23227  */
23228 typedef double sockaddr_maxalign_t;
23229 
23230 
23231 
23232 /*
23233  * Definitions used for sockaddr_storage structure paddings design.
23234  */
23235 
23236 
23237 
23238 
23239 struct sockaddr_storage {
23240  sa_family_t ss_family; /* Address family */
23241  /* Following fields are implementation specific */
23242  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
23243  sockaddr_maxalign_t _ss_align;
23244  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
23245 };
23246 
23247 
23248 /*
23249  * To be compatible with the Linux interfaces used, this structure is
23250  * placed in socket_impl.h so that an include for <sys/socket.h> will
23251  * pickup this structure. This structure is for use with PF_PACKET
23252  * sockets.
23253  */
23254 struct sockaddr_ll {
23255  uint16_t sll_family;
23256  uint16_t sll_protocol;
23257  int32_t sll_ifindex;
23258  uint16_t sll_hatype;
23259  uint8_t sll_pkttype;
23260  uint8_t sll_halen;
23261  uint8_t sll_addr[8];
23262 };
23263 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
23264 
23265 
23266 
23267 
23268 
23269 /*
23270  * The socklen definitions are reproduced here from sys/socket.h so as to
23271  * not introduce that namespace into existing users of netinet/in.h.
23272  */
23273 
23274 
23275 
23276 typedef uint32_t socklen_t;
23277 
23278 
23279 
23280 
23281 
23282 typedef void *Psocklen_t;
23283 
23284 
23285 
23286 
23287 
23288 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
23289 /*
23290  * CDDL HEADER START
23291  *
23292  * The contents of this file are subject to the terms of the
23293  * Common Development and Distribution License (the "License").
23294  * You may not use this file except in compliance with the License.
23295  *
23296  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23297  * or http://www.opensolaris.org/os/licensing.
23298  * See the License for the specific language governing permissions
23299  * and limitations under the License.
23300  *
23301  * When distributing Covered Code, include this CDDL HEADER in each
23302  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23303  * If applicable, add the following below this CDDL HEADER, with the
23304  * fields enclosed by brackets "[]" replaced with your own identifying
23305  * information: Portions Copyright [yyyy] [name of copyright owner]
23306  *
23307  * CDDL HEADER END
23308  */
23309 /*
23310  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23311  * Use is subject to license terms.
23312  */
23313 
23314 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23315 /*	  All Rights Reserved  	*/
23316 
23317 
23318 
23319 
23320 
23321 /*
23322  * For source compatibility
23323  */
23324 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23325 /*
23326  * CDDL HEADER START
23327  *
23328  * The contents of this file are subject to the terms of the
23329  * Common Development and Distribution License (the "License").
23330  * You may not use this file except in compliance with the License.
23331  *
23332  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23333  * or http://www.opensolaris.org/os/licensing.
23334  * See the License for the specific language governing permissions
23335  * and limitations under the License.
23336  *
23337  *
23338  * When distributing Covered Code, include this CDDL HEADER in each
23339  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23340  * If applicable, add the following below this CDDL HEADER, with the
23341  * fields enclosed by brackets "[]" replaced with your own identifying
23342  * information: Portions Copyright [yyyy] [name of copyright owner]
23343  *
23344  * CDDL HEADER END
23345  */
23346 
23347 /*
23348  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23349  * Use is subject to license terms.
23350  * Copyright 2016 Joyent, Inc.
23351  */
23352 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23353 
23354 
23355 
23356 
23357 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
23358 /*
23359  * CDDL HEADER START
23360  *
23361  * The contents of this file are subject to the terms of the
23362  * Common Development and Distribution License, Version 1.0 only
23363  * (the "License").  You may not use this file except in compliance
23364  * with the License.
23365  *
23366  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23367  * or http://www.opensolaris.org/os/licensing.
23368  * See the License for the specific language governing permissions
23369  * and limitations under the License.
23370  *
23371  * When distributing Covered Code, include this CDDL HEADER in each
23372  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23373  * If applicable, add the following below this CDDL HEADER, with the
23374  * fields enclosed by brackets "[]" replaced with your own identifying
23375  * information: Portions Copyright [yyyy] [name of copyright owner]
23376  *
23377  * CDDL HEADER END
23378  */
23379 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23380 /*	  All Rights Reserved  	*/
23381 
23382 
23383 /*
23384  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23385  *
23386  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
23387  * All rights reserved.
23388  */
23389 
23390 /*
23391  * Copyright 2015, Joyent, Inc.
23392  */
23393 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
23394 /*
23395  * Structure of file descriptor/event pairs supplied in
23396  * the poll arrays.
23397  */
23398 typedef struct pollfd {
23399  int fd; /* file desc to poll */
23400  short events; /* events of interest on fd */
23401  short revents; /* events that occurred on fd */
23402 } pollfd_t;
23403 
23404 typedef unsigned long nfds_t;
23405 
23406 /*
23407  * Testable select events
23408  */
23409 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
23410 /*
23411  * Non-testable poll events (may not be specified in events field,
23412  * but may be returned in revents field).
23413  */
23414 
23415 
23416 
23417 
23418 /*
23419  * These events will never be specified in revents, but may be specified in
23420  * events to control /dev/poll behavior.
23421  */
23422 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
23423 int poll(struct pollfd *, nfds_t, int);
23424 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23425 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
23426 /*
23427  * CDDL HEADER START
23428  *
23429  * The contents of this file are subject to the terms of the
23430  * Common Development and Distribution License, Version 1.0 only
23431  * (the "License").  You may not use this file except in compliance
23432  * with the License.
23433  *
23434  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23435  * or http://www.opensolaris.org/os/licensing.
23436  * See the License for the specific language governing permissions
23437  * and limitations under the License.
23438  *
23439  * When distributing Covered Code, include this CDDL HEADER in each
23440  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23441  * If applicable, add the following below this CDDL HEADER, with the
23442  * fields enclosed by brackets "[]" replaced with your own identifying
23443  * information: Portions Copyright [yyyy] [name of copyright owner]
23444  *
23445  * CDDL HEADER END
23446  */
23447 /*
23448  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
23449  * All rights reserved.
23450  */
23451 
23452 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23453 /*	  All Rights Reserved  	*/
23454 
23455 
23456 
23457 
23458 
23459 #pragma ident "%Z%%M%	%I%	%E% SMI"
23460 
23461 
23462 
23463 
23464 
23465 /*
23466  * This file contains all machine-dependent declarations
23467  * in STREAMS.
23468  */
23469 
23470 /*
23471  * Copy data from one data buffer to another.
23472  * The addresses must be word aligned - if not, use bcopy!
23473  */
23474 
23475 
23476 /*
23477  * save the address of the calling function on the 3b2 to
23478  * enable tracking of who is allocating message blocks
23479  */
23480 
23481 
23482 /*
23483  * macro to check pointer alignment
23484  * (true if alignment is sufficient for worst case)
23485  */
23486 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23487 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
23488 /*
23489  * CDDL HEADER START
23490  *
23491  * The contents of this file are subject to the terms of the
23492  * Common Development and Distribution License (the "License").
23493  * You may not use this file except in compliance with the License.
23494  *
23495  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23496  * or http://www.opensolaris.org/os/licensing.
23497  * See the License for the specific language governing permissions
23498  * and limitations under the License.
23499  *
23500  * When distributing Covered Code, include this CDDL HEADER in each
23501  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23502  * If applicable, add the following below this CDDL HEADER, with the
23503  * fields enclosed by brackets "[]" replaced with your own identifying
23504  * information: Portions Copyright [yyyy] [name of copyright owner]
23505  *
23506  * CDDL HEADER END
23507  */
23508 /*
23509  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23510  * Use is subject to license terms.
23511  */
23512 
23513 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23514 /*	  All Rights Reserved  	*/
23515 
23516 /*
23517  * Portions of this source code were derived from Berkeley 4.3 BSD
23518  * under license from the Regents of the University of California.
23519  */
23520 
23521 
23522 
23523 
23524 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23525 /*
23526  * CDDL HEADER START
23527  *
23528  * The contents of this file are subject to the terms of the
23529  * Common Development and Distribution License (the "License").
23530  * You may not use this file except in compliance with the License.
23531  *
23532  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23533  * or http://www.opensolaris.org/os/licensing.
23534  * See the License for the specific language governing permissions
23535  * and limitations under the License.
23536  *
23537  * When distributing Covered Code, include this CDDL HEADER in each
23538  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23539  * If applicable, add the following below this CDDL HEADER, with the
23540  * fields enclosed by brackets "[]" replaced with your own identifying
23541  * information: Portions Copyright [yyyy] [name of copyright owner]
23542  *
23543  * CDDL HEADER END
23544  */
23545 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23546 /*	  All Rights Reserved  	*/
23547 
23548 
23549 /*
23550  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23551  * Use is subject to license terms.
23552  *
23553  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23554  * Copyright 2016 Joyent, Inc.
23555  */
23556 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
23557 
23558 
23559 
23560 
23561 
23562 /*
23563  * The credential is an opaque kernel private data structure defined in
23564  * <sys/cred_impl.h>.
23565  */
23566 
23567 typedef struct cred cred_t;
23568 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23569 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
23570 /*
23571  * CDDL HEADER START
23572  *
23573  * The contents of this file are subject to the terms of the
23574  * Common Development and Distribution License, Version 1.0 only
23575  * (the "License").  You may not use this file except in compliance
23576  * with the License.
23577  *
23578  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23579  * or http://www.opensolaris.org/os/licensing.
23580  * See the License for the specific language governing permissions
23581  * and limitations under the License.
23582  *
23583  * When distributing Covered Code, include this CDDL HEADER in each
23584  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23585  * If applicable, add the following below this CDDL HEADER, with the
23586  * fields enclosed by brackets "[]" replaced with your own identifying
23587  * information: Portions Copyright [yyyy] [name of copyright owner]
23588  *
23589  * CDDL HEADER END
23590  */
23591 /*
23592  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
23593  * All rights reserved.
23594  */
23595 
23596 /*
23597  * t_lock.h:	Prototypes for disp_locks, plus include files
23598  *		that describe the interfaces to kernel synch.
23599  *		objects.
23600  */
23601 
23602 
23603 
23604 
23605 #pragma ident "%Z%%M%	%I%	%E% SMI"
23606 
23607 
23608 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
23609 /*
23610  * CDDL HEADER START
23611  *
23612  * The contents of this file are subject to the terms of the
23613  * Common Development and Distribution License (the "License").
23614  * You may not use this file except in compliance with the License.
23615  *
23616  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23617  * or http://www.opensolaris.org/os/licensing.
23618  * See the License for the specific language governing permissions
23619  * and limitations under the License.
23620  *
23621  * When distributing Covered Code, include this CDDL HEADER in each
23622  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23623  * If applicable, add the following below this CDDL HEADER, with the
23624  * fields enclosed by brackets "[]" replaced with your own identifying
23625  * information: Portions Copyright [yyyy] [name of copyright owner]
23626  *
23627  * CDDL HEADER END
23628  */
23629 /*
23630  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23631  * Use is subject to license terms.
23632  * Copyright 2016 Joyent, Inc.
23633  */
23634 
23635 
23636 
23637 
23638 #pragma ident "%Z%%M%	%I%	%E% SMI"
23639 
23640 
23641 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23642 /*
23643  * CDDL HEADER START
23644  *
23645  * The contents of this file are subject to the terms of the
23646  * Common Development and Distribution License (the "License").
23647  * You may not use this file except in compliance with the License.
23648  *
23649  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23650  * or http://www.opensolaris.org/os/licensing.
23651  * See the License for the specific language governing permissions
23652  * and limitations under the License.
23653  *
23654  * When distributing Covered Code, include this CDDL HEADER in each
23655  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23656  * If applicable, add the following below this CDDL HEADER, with the
23657  * fields enclosed by brackets "[]" replaced with your own identifying
23658  * information: Portions Copyright [yyyy] [name of copyright owner]
23659  *
23660  * CDDL HEADER END
23661  */
23662 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23663 /*	  All Rights Reserved  	*/
23664 
23665 
23666 /*
23667  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23668  * Use is subject to license terms.
23669  *
23670  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23671  * Copyright 2016 Joyent, Inc.
23672  */
23673 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
23674 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
23675 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23676 /*	  All Rights Reserved  	*/
23677 
23678 
23679 /*
23680  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
23681  * All rights reserved.  The Berkeley software License Agreement
23682  * specifies the terms and conditions for redistribution.
23683  */
23684 
23685 /*
23686  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23687  *
23688  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23689  * Use is subject to license terms.
23690  *
23691  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23692  */
23693 
23694 /*
23695  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
23696  */
23697 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
23698 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
23699 typedef lock_t disp_lock_t; /* dispatcher lock type */
23700 
23701 /*
23702  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
23703  * an adaptive mutex, depending on what interrupt levels use it.
23704  */
23705 
23706 
23707 /*
23708  * Macro to control loops which spin on a lock and then check state
23709  * periodically.  Its passed an integer, and returns a boolean value
23710  * that if true indicates its a good time to get the scheduler lock and
23711  * check the state of the current owner of the lock.
23712  */
23713 
23714 
23715 /*
23716  * Externs for CLOCK_LOCK and clock resolution
23717  */
23718 extern volatile uint32_t hres_lock;
23719 extern hrtime_t hrtime_base;
23720 extern int clock_res;
23721 
23722 
23723 
23724 /*
23725  * The definitions of the symbolic interrupt levels:
23726  *
23727  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
23728  *
23729  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
23730  *                   highest level at which one may acquire adaptive locks)
23731  *                   Also the highest level at which one may be preempted.
23732  *
23733  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
23734  *                   operations.
23735  *
23736  * The constraints on the platform:
23737  *
23738  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
23739  *  - LOCK_LEVEL must be less than DISP_LEVEL
23740  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
23741  *
23742  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
23743  * changing this relationship is probably possible but not advised.
23744  *
23745  */
23746 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
23747 /*
23748  * The following mask is for the cpu_intr_actv bits corresponding to
23749  * high-level PILs. It should equal:
23750  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
23751  */
23752 
23753 
23754 /*
23755  * The semaphore code depends on being able to represent a lock plus
23756  * owner in a single 32-bit word.  (Mutexes used to have a similar
23757  * dependency, but no longer.)  Thus the owner must contain at most
23758  * 24 significant bits.  At present only threads and semaphores
23759  * must be aware of this vile constraint.  Different ISAs may handle this
23760  * differently depending on their capabilities (e.g. compare-and-swap)
23761  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
23762  */
23763 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23764 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
23765 /*
23766  * CDDL HEADER START
23767  *
23768  * The contents of this file are subject to the terms of the
23769  * Common Development and Distribution License (the "License").
23770  * You may not use this file except in compliance with the License.
23771  *
23772  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23773  * or http://www.opensolaris.org/os/licensing.
23774  * See the License for the specific language governing permissions
23775  * and limitations under the License.
23776  *
23777  * When distributing Covered Code, include this CDDL HEADER in each
23778  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23779  * If applicable, add the following below this CDDL HEADER, with the
23780  * fields enclosed by brackets "[]" replaced with your own identifying
23781  * information: Portions Copyright [yyyy] [name of copyright owner]
23782  *
23783  * CDDL HEADER END
23784  */
23785 
23786 /*
23787  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
23788  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
23789  */
23790 
23791 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23792 /*	  All Rights Reserved  	*/
23793 
23794 /*
23795  * University Copyright- Copyright (c) 1982, 1986, 1988
23796  * The Regents of the University of California
23797  * All Rights Reserved
23798  *
23799  * University Acknowledgment- Portions of this document are derived from
23800  * software developed by the University of California, Berkeley, and its
23801  * contributors.
23802  */
23803 
23804 
23805 
23806 
23807 
23808 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23809 /*
23810  * CDDL HEADER START
23811  *
23812  * The contents of this file are subject to the terms of the
23813  * Common Development and Distribution License (the "License").
23814  * You may not use this file except in compliance with the License.
23815  *
23816  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23817  * or http://www.opensolaris.org/os/licensing.
23818  * See the License for the specific language governing permissions
23819  * and limitations under the License.
23820  *
23821  * When distributing Covered Code, include this CDDL HEADER in each
23822  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23823  * If applicable, add the following below this CDDL HEADER, with the
23824  * fields enclosed by brackets "[]" replaced with your own identifying
23825  * information: Portions Copyright [yyyy] [name of copyright owner]
23826  *
23827  * CDDL HEADER END
23828  */
23829 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23830 /*	  All Rights Reserved  	*/
23831 
23832 
23833 /*
23834  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23835  * Use is subject to license terms.
23836  *
23837  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23838  * Copyright 2016 Joyent, Inc.
23839  */
23840 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23841 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23842 /*
23843  * CDDL HEADER START
23844  *
23845  * The contents of this file are subject to the terms of the
23846  * Common Development and Distribution License (the "License").
23847  * You may not use this file except in compliance with the License.
23848  *
23849  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23850  * or http://www.opensolaris.org/os/licensing.
23851  * See the License for the specific language governing permissions
23852  * and limitations under the License.
23853  *
23854  *
23855  * When distributing Covered Code, include this CDDL HEADER in each
23856  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23857  * If applicable, add the following below this CDDL HEADER, with the
23858  * fields enclosed by brackets "[]" replaced with your own identifying
23859  * information: Portions Copyright [yyyy] [name of copyright owner]
23860  *
23861  * CDDL HEADER END
23862  */
23863 
23864 /*
23865  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23866  * Use is subject to license terms.
23867  * Copyright 2016 Joyent, Inc.
23868  */
23869 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23870 
23871 
23872 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
23873 /*
23874  * This file and its contents are supplied under the terms of the
23875  * Common Development and Distribution License ("CDDL"), version 1.0.
23876  * You may only use this file in accordance with the terms of version
23877  * 1.0 of the CDDL.
23878  *
23879  * A full copy of the text of the CDDL should have accompanied this
23880  * source.  A copy of the CDDL is also available via the Internet at
23881  * http://www.illumos.org/license/CDDL.
23882  */
23883 
23884 /*
23885  * Copyright 2014-2016 PALO, Richard.
23886  */
23887 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23888 
23889 
23890 
23891 
23892 
23893 /*
23894  * Fundamental variables; don't change too often.
23895  */
23896 
23897 /*
23898  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
23899  * an early merge with AT&T source.  It has also historically been defined
23900  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
23901  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
23902  * Subsequent versions of the IEEE Standard as well as the X/Open
23903  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
23904  * while still allowing for it's existence in other headers.  With the
23905  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
23906  */
23907 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23908     /* compatibility purposes only	*/
23909     /* and will be removed in a	*/
23910     /* later release		*/
23911 
23912 /*
23913  * These define the maximum and minimum allowable values of the
23914  * configurable parameter NGROUPS_MAX.
23915  */
23916 
23917 
23918 
23919 
23920 /*
23921  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
23922  */
23923 
23924 
23925 /*
23926  * Default process priority.  Keep it in sync with limits.h.
23927  */
23928 
23929 
23930 /*
23931  * Fundamental constants of the implementation--cannot be changed easily.
23932  */
23933 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23934 /* REMOTE -- whether machine is primary, secondary, or regular */
23935 
23936 
23937 
23938 /*
23939  * MAXPATHLEN defines the longest permissible path length,
23940  * including the terminating null, after expanding symbolic links.
23941  * TYPICALMAXPATHLEN is used in a few places as an optimization
23942  * with a local buffer on the stack to avoid kmem_alloc().
23943  * MAXSYMLINKS defines the maximum number of symbolic links
23944  * that may be expanded in a path name. It should be set high
23945  * enough to allow all legitimate uses, but halt infinite loops
23946  * reasonably quickly.
23947  * MAXNAMELEN is the length (including the terminating null) of
23948  * the longest permissible file (component) name.
23949  */
23950 
23951 
23952 
23953 
23954 
23955 /*
23956  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
23957  * including the terminating NUL.  Note that this must not be larger
23958  * than related networking constants such as LIFNAMSIZ.
23959  */
23960 
23961 
23962 
23963 
23964 
23965 
23966 /*
23967  * The following are defined to be the same as
23968  * defined in /usr/include/limits.h.  They are
23969  * needed for pipe and FIFO compatibility.
23970  */
23971 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23972 /* macros replacing interleaving functions */
23973 
23974 
23975 
23976 /*
23977  * File system parameters and macros.
23978  *
23979  * The file system is made out of blocks of at most MAXBSIZE units,
23980  * with smaller units (fragments) only in the last direct block.
23981  * MAXBSIZE primarily determines the size of buffers in the buffer
23982  * pool. It may be made larger without any effect on existing
23983  * file systems; however making it smaller make make some file
23984  * systems unmountable.
23985  *
23986  * Note that the blocked devices are assumed to have DEV_BSIZE
23987  * "sectors" and that fragments must be some multiple of this size.
23988  */
23989 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23990 /*	64 bit versions of btodb and dbtob */
23991 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23992 /*
23993  * Size of arg list passed in by user.
23994  */
23995 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23996 /*
23997  * Scale factor for scaled integers used to count
23998  * %cpu time and load averages.
23999  */
24000 
24001 
24002 
24003 /*
24004  * Delay units are in microseconds.
24005  *
24006  * XXX	These macros are not part of the DDI!
24007  */
24008 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
24009 /*
24010  * The following is to free utilities from machine dependencies within
24011  * an architecture. Must be included after definition of DEV_BSIZE.
24012  */
24013 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
24014 /*
24015  * The following are assorted machine dependent values which can be
24016  * obtained in a machine independent manner through sysconf(2) or
24017  * sysinfo(2). In order to guarantee that these provide the expected
24018  * value at all times, the System Private interface (leading underscore)
24019  * is used.
24020  */
24021 
24022 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
24023 /*
24024  * CDDL HEADER START
24025  *
24026  * The contents of this file are subject to the terms of the
24027  * Common Development and Distribution License (the "License").
24028  * You may not use this file except in compliance with the License.
24029  *
24030  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24031  * or http://www.opensolaris.org/os/licensing.
24032  * See the License for the specific language governing permissions
24033  * and limitations under the License.
24034  *
24035  * When distributing Covered Code, include this CDDL HEADER in each
24036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24037  * If applicable, add the following below this CDDL HEADER, with the
24038  * fields enclosed by brackets "[]" replaced with your own identifying
24039  * information: Portions Copyright [yyyy] [name of copyright owner]
24040  *
24041  * CDDL HEADER END
24042  */
24043 
24044 /*
24045  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
24046  *	  All Rights Reserved
24047  *
24048  */
24049 
24050 /*
24051  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24052  * Use is subject to license terms.
24053  */
24054 
24055 /*
24056  * WARNING: This is an implementation-specific header,
24057  * its contents are not guaranteed. Applications
24058  * should include <unistd.h> and not this header.
24059  */
24060 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
24061 
24062 
24063 
24064 
24065 
24066 
24067 extern long _sysconf(int); /* System Private interface to sysconf() */
24068 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
24069 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
24070 /*
24071  * CDDL HEADER START
24072  *
24073  * The contents of this file are subject to the terms of the
24074  * Common Development and Distribution License (the "License").
24075  * You may not use this file except in compliance with the License.
24076  *
24077  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24078  * or http://www.opensolaris.org/os/licensing.
24079  * See the License for the specific language governing permissions
24080  * and limitations under the License.
24081  *
24082  * When distributing Covered Code, include this CDDL HEADER in each
24083  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24084  * If applicable, add the following below this CDDL HEADER, with the
24085  * fields enclosed by brackets "[]" replaced with your own identifying
24086  * information: Portions Copyright [yyyy] [name of copyright owner]
24087  *
24088  * CDDL HEADER END
24089  */
24090 /*
24091  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24092  */
24093 
24094 
24095 
24096 
24097 
24098 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
24099 /*
24100  * CDDL HEADER START
24101  *
24102  * The contents of this file are subject to the terms of the
24103  * Common Development and Distribution License (the "License").
24104  * You may not use this file except in compliance with the License.
24105  *
24106  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24107  * or http://www.opensolaris.org/os/licensing.
24108  * See the License for the specific language governing permissions
24109  * and limitations under the License.
24110  *
24111  * When distributing Covered Code, include this CDDL HEADER in each
24112  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24113  * If applicable, add the following below this CDDL HEADER, with the
24114  * fields enclosed by brackets "[]" replaced with your own identifying
24115  * information: Portions Copyright [yyyy] [name of copyright owner]
24116  *
24117  * CDDL HEADER END
24118  */
24119 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24120 /*	  All Rights Reserved  	*/
24121 
24122 
24123 /*
24124  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24125  * Use is subject to license terms.
24126  *
24127  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24128  * Copyright 2016 Joyent, Inc.
24129  */
24130 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
24131 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
24132 /*
24133  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
24134  *
24135  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
24136  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
24137  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
24138  * cookie argument to mutex_init() encodes the interrupt level to block.
24139  * The iblock cookie must be NULL for adaptive locks.
24140  *
24141  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
24142  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
24143  *
24144  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
24145  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
24146  *
24147  * Mutex statistics can be gathered on the fly, without rebooting or
24148  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
24149  */
24150 typedef enum {
24151  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
24152  MUTEX_SPIN = 1, /* block interrupts and spin */
24153  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
24154  MUTEX_DEFAULT = 6 /* kernel default mutex */
24155 } kmutex_type_t;
24156 
24157 typedef struct mutex {
24158 
24159 
24160 
24161  void *_opaque[2];
24162 
24163 } kmutex_t;
24164 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
24165 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
24166 /*
24167  * CDDL HEADER START
24168  *
24169  * The contents of this file are subject to the terms of the
24170  * Common Development and Distribution License (the "License").
24171  * You may not use this file except in compliance with the License.
24172  *
24173  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24174  * or http://www.opensolaris.org/os/licensing.
24175  * See the License for the specific language governing permissions
24176  * and limitations under the License.
24177  *
24178  * When distributing Covered Code, include this CDDL HEADER in each
24179  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24180  * If applicable, add the following below this CDDL HEADER, with the
24181  * fields enclosed by brackets "[]" replaced with your own identifying
24182  * information: Portions Copyright [yyyy] [name of copyright owner]
24183  *
24184  * CDDL HEADER END
24185  */
24186 /*
24187  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24188  * Use is subject to license terms.
24189  */
24190 
24191 /*
24192  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
24193  */
24194 
24195 
24196 
24197 
24198 /*
24199  * Public interface to readers/writer locks.  See rwlock(9F) for details.
24200  */
24201 
24202 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
24203 /*
24204  * CDDL HEADER START
24205  *
24206  * The contents of this file are subject to the terms of the
24207  * Common Development and Distribution License (the "License").
24208  * You may not use this file except in compliance with the License.
24209  *
24210  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24211  * or http://www.opensolaris.org/os/licensing.
24212  * See the License for the specific language governing permissions
24213  * and limitations under the License.
24214  *
24215  * When distributing Covered Code, include this CDDL HEADER in each
24216  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24217  * If applicable, add the following below this CDDL HEADER, with the
24218  * fields enclosed by brackets "[]" replaced with your own identifying
24219  * information: Portions Copyright [yyyy] [name of copyright owner]
24220  *
24221  * CDDL HEADER END
24222  */
24223 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24224 /*	  All Rights Reserved  	*/
24225 
24226 
24227 /*
24228  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24229  * Use is subject to license terms.
24230  *
24231  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24232  * Copyright 2016 Joyent, Inc.
24233  */
24234 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
24235 
24236 
24237 
24238 
24239 
24240 
24241 
24242 typedef enum {
24243  RW_DRIVER = 2, /* driver (DDI) rwlock */
24244  RW_DEFAULT = 4 /* kernel default rwlock */
24245 } krw_type_t;
24246 
24247 typedef enum {
24248  RW_WRITER,
24249  RW_READER,
24250  RW_READER_STARVEWRITER
24251 } krw_t;
24252 
24253 typedef struct _krwlock {
24254  void *_opaque[1];
24255 } krwlock_t;
24256 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
24257 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
24258 /*
24259  * CDDL HEADER START
24260  *
24261  * The contents of this file are subject to the terms of the
24262  * Common Development and Distribution License, Version 1.0 only
24263  * (the "License").  You may not use this file except in compliance
24264  * with the License.
24265  *
24266  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24267  * or http://www.opensolaris.org/os/licensing.
24268  * See the License for the specific language governing permissions
24269  * and limitations under the License.
24270  *
24271  * When distributing Covered Code, include this CDDL HEADER in each
24272  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24273  * If applicable, add the following below this CDDL HEADER, with the
24274  * fields enclosed by brackets "[]" replaced with your own identifying
24275  * information: Portions Copyright [yyyy] [name of copyright owner]
24276  *
24277  * CDDL HEADER END
24278  */
24279 /*
24280  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
24281  * All rights reserved.
24282  */
24283 
24284 
24285 
24286 
24287 #pragma ident "%Z%%M%	%I%	%E% SMI"
24288 
24289 /*
24290  * Public interface to semaphores.  See semaphore(9F) for details.
24291  */
24292 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
24293 typedef enum {
24294  SEMA_DEFAULT,
24295  SEMA_DRIVER
24296 } ksema_type_t;
24297 
24298 typedef struct _ksema {
24299  void * _opaque[2]; /* 2 words on 4 byte alignment */
24300 } ksema_t;
24301 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
24302 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
24303 /*
24304  * CDDL HEADER START
24305  *
24306  * The contents of this file are subject to the terms of the
24307  * Common Development and Distribution License (the "License").
24308  * You may not use this file except in compliance with the License.
24309  *
24310  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24311  * or http://www.opensolaris.org/os/licensing.
24312  * See the License for the specific language governing permissions
24313  * and limitations under the License.
24314  *
24315  * When distributing Covered Code, include this CDDL HEADER in each
24316  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24317  * If applicable, add the following below this CDDL HEADER, with the
24318  * fields enclosed by brackets "[]" replaced with your own identifying
24319  * information: Portions Copyright [yyyy] [name of copyright owner]
24320  *
24321  * CDDL HEADER END
24322  */
24323 /*
24324  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24325  * Use is subject to license terms.
24326  */
24327 
24328 /*
24329  * Copyright (c) 2012 by Delphix. All rights reserved.
24330  */
24331 
24332 /*
24333  * condvar.h:
24334  *
24335  * definitions for thread synchronization primitives: condition variables
24336  * This is the public part of the interface to condition variables. The
24337  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
24338  */
24339 
24340 
24341 
24342 
24343 
24344 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
24345 /*
24346  * CDDL HEADER START
24347  *
24348  * The contents of this file are subject to the terms of the
24349  * Common Development and Distribution License (the "License").
24350  * You may not use this file except in compliance with the License.
24351  *
24352  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24353  * or http://www.opensolaris.org/os/licensing.
24354  * See the License for the specific language governing permissions
24355  * and limitations under the License.
24356  *
24357  * When distributing Covered Code, include this CDDL HEADER in each
24358  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24359  * If applicable, add the following below this CDDL HEADER, with the
24360  * fields enclosed by brackets "[]" replaced with your own identifying
24361  * information: Portions Copyright [yyyy] [name of copyright owner]
24362  *
24363  * CDDL HEADER END
24364  */
24365 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24366 /*	  All Rights Reserved  	*/
24367 
24368 
24369 /*
24370  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24371  * Use is subject to license terms.
24372  *
24373  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24374  * Copyright 2016 Joyent, Inc.
24375  */
24376 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
24377 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
24378 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24379 /*	  All Rights Reserved  	*/
24380 
24381 
24382 /*
24383  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
24384  * All rights reserved.  The Berkeley software License Agreement
24385  * specifies the terms and conditions for redistribution.
24386  */
24387 
24388 /*
24389  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24390  *
24391  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24392  * Use is subject to license terms.
24393  *
24394  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24395  */
24396 
24397 /*
24398  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
24399  */
24400 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
24401 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
24402 /*
24403  * Condtion variables.
24404  */
24405 
24406 typedef struct _kcondvar {
24407  ushort_t _opaque;
24408 } kcondvar_t;
24409 
24410 typedef enum {
24411  CV_DEFAULT,
24412  CV_DRIVER
24413 } kcv_type_t;
24414 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
24415 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
24416 /*
24417  * Mutual exclusion locks described in common/sys/mutex.h.
24418  *
24419  * Semaphores described in common/sys/semaphore.h.
24420  *
24421  * Readers/Writer locks described in common/sys/rwlock.h.
24422  *
24423  * Condition variables described in common/sys/condvar.h
24424  */
24425 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
24426 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
24427 /*
24428  * CDDL HEADER START
24429  *
24430  * The contents of this file are subject to the terms of the
24431  * Common Development and Distribution License, Version 1.0 only
24432  * (the "License").  You may not use this file except in compliance
24433  * with the License.
24434  *
24435  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24436  * or http://www.opensolaris.org/os/licensing.
24437  * See the License for the specific language governing permissions
24438  * and limitations under the License.
24439  *
24440  * When distributing Covered Code, include this CDDL HEADER in each
24441  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24442  * If applicable, add the following below this CDDL HEADER, with the
24443  * fields enclosed by brackets "[]" replaced with your own identifying
24444  * information: Portions Copyright [yyyy] [name of copyright owner]
24445  *
24446  * CDDL HEADER END
24447  */
24448 /*
24449  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24450  * Use is subject to license terms.
24451  */
24452 
24453 
24454 
24455 
24456 #pragma ident "%Z%%M%	%I%	%E% SMI"
24457 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
24458 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
24459 /*
24460  * CDDL HEADER START
24461  *
24462  * The contents of this file are subject to the terms of the
24463  * Common Development and Distribution License (the "License").
24464  * You may not use this file except in compliance with the License.
24465  *
24466  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24467  * or http://www.opensolaris.org/os/licensing.
24468  * See the License for the specific language governing permissions
24469  * and limitations under the License.
24470  *
24471  *
24472  * When distributing Covered Code, include this CDDL HEADER in each
24473  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24474  * If applicable, add the following below this CDDL HEADER, with the
24475  * fields enclosed by brackets "[]" replaced with your own identifying
24476  * information: Portions Copyright [yyyy] [name of copyright owner]
24477  *
24478  * CDDL HEADER END
24479  */
24480 
24481 /*
24482  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24483  * Use is subject to license terms.
24484  * Copyright 2016 Joyent, Inc.
24485  */
24486 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
24487 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
24488 /*
24489  * XXX	Ick.  This type needs to be visible outside the above guard because
24490  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
24491  * If we can make proc internals less visible, (which we obviously should)
24492  * then this can be invisible too.
24493  */
24494 typedef unsigned int model_t;
24495 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
24496 
24497 
24498 
24499 
24500 
24501 /*
24502  * Data queue.
24503  *
24504  * NOTE: The *only* public fields are documented in queue(9S).
24505  *       Everything else is implementation-private.
24506  *
24507  * The locking rules for the queue_t structure are extremely subtle and vary
24508  * widely depending on the field in question.  As such, each field is
24509  * annotated according to the following legend:
24510  *
24511  *   Q9S: The field is documented in queue(9S) and may be accessed without
24512  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
24513  *        However, no fields can be directly modified unless q_lock is held
24514  *        (which is not possible in a DDI compliant STREAMS module), with the
24515  *        following exceptions:
24516  *
24517  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
24518  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
24519  *		    locking rules on it.
24520  *         - q_qinfo: can be modified before qprocson().
24521  *
24522  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
24523  *		    rules of the STREAMS module.  The STREAMS framework never
24524  *		    modifies these fields, and is tolerant of temporarily
24525  *		    stale field values.
24526  *
24527  *	  In general, the STREAMS framework employs one of the following
24528  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
24529  *
24530  *	   - The field is only modified by the framework when the stream is
24531  *	     locked with strlock() (q_next).
24532  *
24533  *	   - The field is modified by the framework, but the modifies are
24534  *	     atomic, and temporarily stale values are harmless (q_count,
24535  *	     q_first, q_last).
24536  *
24537  *	   - The field is modified by the framework, but the field's visible
24538  *	     values are either constant or directly under the control
24539  *	     of the STREAMS module itself (q_flag).
24540  *
24541  *   QLK: The field must be accessed or modified under q_lock, except when
24542  *        the stream has been locked with strlock().  If multiple q_locks must
24543  *        be acquired, q_locks at higher addresses must be taken first.
24544  *
24545  *   STR: The field can be accessed without a lock, but must be modified under
24546  *	  strlock().
24547  *
24548  *   SQLK: The field must be accessed or modified under SQLOCK().
24549  *
24550  *   NOLK: The field can be accessed without a lock, but can only be modified
24551  *	   when the queue_t is not known to any other threads.
24552  *
24553  *   SVLK: The field must be accessed or modified under the service_queue lock.
24554  *         Note that service_lock must be taken after any needed q_locks,
24555  *	   and that no other lock should be taken while service_lock is held.
24556  *
24557  * In addition, it is always acceptable to modify a field that is not yet
24558  * known to any other threads -- and other special case exceptions exist in
24559  * the code.  Also, q_lock is used with q_wait to implement a stream head
24560  * monitor for reads and writes.
24561  */
24562 typedef struct queue {
24563  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
24564  struct msgb *q_first; /* Q9S: first message in Q	*/
24565  struct msgb *q_last; /* Q9S: last message in Q	*/
24566  struct queue *q_next; /* Q9S: next Q in stream	*/
24567  struct queue *q_link; /* SVLK: next Q for scheduling	*/
24568  void *q_ptr; /* Q9S: module-specific data	*/
24569  size_t q_count; /* Q9S: number of bytes on Q	*/
24570  uint_t q_flag; /* Q9S: Q state			*/
24571  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
24572  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
24573  size_t q_hiwat; /* Q9S: Q high water mark	*/
24574  size_t q_lowat; /* Q9S: Q low water mark	*/
24575  struct qband *q_bandp; /* QLK: band flow information	*/
24576  kmutex_t q_lock; /* NOLK: structure lock		*/
24577  struct stdata *q_stream; /* NOLK: stream backpointer	*/
24578  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
24579  unsigned char q_nband; /* QLK: number of bands		*/
24580  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
24581  struct queue *q_nfsrv; /* STR: next Q with svc routine */
24582  ushort_t q_draining; /* QLK: Q is draining		*/
24583  short q_struiot; /* QLK: sync streams Q UIO mode	*/
24584  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
24585  size_t q_mblkcnt; /* QLK: mblk count		*/
24586  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
24587  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
24588  pri_t q_spri; /* QLK: Q scheduling priority	*/
24589 
24590  /*
24591 	 * Syncq scheduling
24592 	 */
24593  struct msgb *q_sqhead; /* QLK: first syncq message	*/
24594  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
24595  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
24596  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
24597  uint_t q_sqflags; /* SQLK: syncq flags		*/
24598  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
24599 
24600  /*
24601 	 * NOLK: Reference to the queue's module's implementation
24602 	 * structure. This will be NULL for queues associated with drivers.
24603 	 */
24604  struct fmodsw_impl *q_fp;
24605 } queue_t;
24606 
24607 /*
24608  * Queue flags; unused flags not documented in queue(9S) can be recycled.
24609  */
24610 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24611 /*	UNUSED		0x00000200	   was QHLIST			*/
24612 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
24613 
24614 
24615 
24616 
24617 
24618 
24619      /* all MT type flags		*/
24620 
24621 
24622 
24623 
24624 
24625 
24626 /*	UNUSED		0x00400000	   was QHOT			*/
24627 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
24628 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
24629 
24630 
24631 
24632 
24633      /* direct interface to/from sockfs */
24634 
24635 /* queue sqflags (protected by SQLOCK). */
24636 
24637 
24638      /* This is also noted by the	*/
24639      /* q_draining field, but this one is */
24640      /* protected by SQLOCK */
24641 
24642 /*
24643  * Structure that describes the separate information
24644  * for each priority band in the queue.
24645  */
24646 typedef struct qband {
24647  struct qband *qb_next; /* next band's info */
24648  size_t qb_count; /* number of bytes in band */
24649  struct msgb *qb_first; /* beginning of band's data */
24650  struct msgb *qb_last; /* end of band's data */
24651  size_t qb_hiwat; /* high water mark for band */
24652  size_t qb_lowat; /* low water mark for band */
24653  uint_t qb_flag; /* see below */
24654  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
24655 } qband_t;
24656 
24657 /*
24658  * qband flags
24659  */
24660 
24661 
24662 
24663 
24664 /*
24665  * Maximum number of bands.
24666  */
24667 
24668 
24669 /*
24670  * Fields that can be manipulated through strqset() and strqget().
24671  */
24672 typedef enum qfields {
24673  QHIWAT = 0, /* q_hiwat or qb_hiwat */
24674  QLOWAT = 1, /* q_lowat or qb_lowat */
24675  QMAXPSZ = 2, /* q_maxpsz */
24676  QMINPSZ = 3, /* q_minpsz */
24677  QCOUNT = 4, /* q_count or qb_count */
24678  QFIRST = 5, /* q_first or qb_first */
24679  QLAST = 6, /* q_last or qb_last */
24680  QFLAG = 7, /* q_flag or qb_flag */
24681  QSTRUIOT = 8, /* q_struiot */
24682  QBAD = 9
24683 } qfields_t;
24684 
24685 /*
24686  * Module information structure
24687  */
24688 struct module_info {
24689  ushort_t mi_idnum; /* module id number */
24690  char *mi_idname; /* module name */
24691  ssize_t mi_minpsz; /* min packet size accepted */
24692  ssize_t mi_maxpsz; /* max packet size accepted */
24693  size_t mi_hiwat; /* hi-water mark */
24694  size_t mi_lowat; /* lo-water mark */
24695 };
24696 
24697 /*
24698  * queue information structure (with Synchronous STREAMS extensions)
24699  */
24700 struct qinit {
24701  int (*qi_putp)(); /* put procedure */
24702  int (*qi_srvp)(); /* service procedure */
24703  int (*qi_qopen)(); /* called on startup */
24704  int (*qi_qclose)(); /* called on finish */
24705  int (*qi_qadmin)(); /* for future use */
24706  struct module_info *qi_minfo; /* module information structure */
24707  struct module_stat *qi_mstat; /* module statistics structure */
24708  int (*qi_rwp)(); /* r/w procedure */
24709  int (*qi_infop)(); /* information procedure */
24710  int qi_struiot; /* stream uio type for struio() */
24711 };
24712 
24713 /*
24714  * Values for qi_struiot and q_struiot:
24715  */
24716 
24717 
24718 
24719 
24720 /*
24721  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
24722  */
24723 struct streamtab {
24724  struct qinit *st_rdinit;
24725  struct qinit *st_wrinit;
24726  struct qinit *st_muxrinit;
24727  struct qinit *st_muxwinit;
24728 };
24729 
24730 /*
24731  * Structure sent to mux drivers to indicate a link.
24732  */
24733 struct linkblk {
24734  queue_t *l_qtop; /* lowest level write queue of upper stream */
24735     /* (set to NULL for persistent links) */
24736  queue_t *l_qbot; /* highest level write queue of lower stream */
24737  int l_index; /* index for lower stream. */
24738 };
24739 
24740 /*
24741  * Esballoc data buffer freeing routine
24742  */
24743 typedef struct free_rtn {
24744  void (*free_func)();
24745  caddr_t free_arg;
24746 } frtn_t;
24747 
24748 /*
24749  * Data block descriptor
24750  *
24751  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
24752  * as described in datab(9S).  Everything else is implementation-private.
24753  */
24754 
24755 
24756 
24757 typedef struct datab {
24758  frtn_t *db_frtnp;
24759  unsigned char *db_base;
24760  unsigned char *db_lim;
24761  unsigned char db_ref;
24762  unsigned char db_type;
24763  unsigned char db_flags;
24764  unsigned char db_struioflag;
24765  pid_t db_cpid; /* cached pid, needs verification */
24766  void *db_cache; /* kmem cache descriptor */
24767  struct msgb *db_mblk;
24768  void (*db_free)(struct msgb *, struct datab *);
24769  void (*db_lastfree)(struct msgb *, struct datab *);
24770  intptr_t db_cksumstart;
24771  intptr_t db_cksumend;
24772  intptr_t db_cksumstuff;
24773  union {
24774   double enforce_alignment;
24775   unsigned char data[8];
24776   struct {
24777    union {
24778     uint32_t u32;
24779     uint16_t u16;
24780    } cksum_val; /* used to store calculated cksum */
24781    uint16_t flags;
24782    uint16_t pad;
24783   } cksum;
24784   /*
24785 		 * Union used for future extensions (pointer to data ?).
24786 		 */
24787  } db_struioun;
24788  struct fthdr *db_fthdr;
24789  cred_t *db_credp; /* credential */
24790 } dblk_t;
24791 
24792 
24793 
24794 
24795 /*
24796  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
24797  */
24798 
24799 
24800 
24801 /*
24802  * Used by GLDv2 to store the TCI information.
24803  */
24804 
24805 
24806 /*
24807  * Message block descriptor
24808  */
24809 typedef struct msgb {
24810  struct msgb *b_next;
24811  struct msgb *b_prev;
24812  struct msgb *b_cont;
24813  unsigned char *b_rptr;
24814  unsigned char *b_wptr;
24815  struct datab *b_datap;
24816  unsigned char b_band;
24817  unsigned char b_tag;
24818  unsigned short b_flag;
24819  queue_t *b_queue; /* for sync queues */
24820 } mblk_t;
24821 
24822 /*
24823  * bcache descriptor
24824  */
24825 typedef struct bcache {
24826  kmutex_t mutex;
24827  struct kmem_cache *buffer_cache;
24828  struct kmem_cache *dblk_cache;
24829  int alloc;
24830  int destroy;
24831  size_t size;
24832  uint_t align;
24833 } bcache_t;
24834 
24835 /*
24836  * db_flags values (all implementation private!)
24837  */
24838 
24839 
24840 
24841 
24842 /*
24843  * db_struioflag values:
24844  */
24845 
24846 
24847 
24848 
24849 
24850 
24851 /*
24852  * Message flags.  These are interpreted by the stream head.
24853  */
24854 
24855 
24856     /* write side of stream */
24857 
24858 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
24859 
24860 
24861 
24862 
24863 /*
24864  * Streams message types.
24865  */
24866 
24867 /*
24868  * Data and protocol messages (regular and priority)
24869  */
24870 
24871 
24872 
24873 
24874 /*
24875  * Control messages (regular and priority)
24876  */
24877 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24878 /*
24879  * Control messages (high priority; go to head of queue)
24880  */
24881 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24882 /*
24883  * Queue message class definitions.
24884  */
24885 
24886 
24887 
24888 /*
24889  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
24890  */
24891 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24892 struct iocblk {
24893  int ioc_cmd; /* ioctl command type */
24894  cred_t *ioc_cr; /* full credentials */
24895  uint_t ioc_id; /* ioctl id */
24896  size_t ioc_count; /* count of bytes in data field */
24897  int ioc_error; /* error code */
24898  int ioc_rval; /* return value  */
24899  int ioc_fill1;
24900  uint_t ioc_flag; /* see below */
24901  int ioc_filler[2]; /* reserved for future use */
24902 };
24903 
24904 
24905 typedef struct iocblk *IOCP;
24906 
24907 /* {ioc,cp}_flags values */
24908 
24909 
24910 
24911 
24912 
24913 
24914 
24915 /*
24916  *	Is the ioctl data formatted for our native model?
24917  */
24918 
24919 
24920 
24921 /*
24922  * structure for the M_COPYIN and M_COPYOUT message types.
24923  */
24924 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24925 struct copyreq {
24926  int cq_cmd; /* ioctl command (from ioc_cmd) */
24927  cred_t *cq_cr; /* full credentials */
24928  uint_t cq_id; /* ioctl id (from ioc_id) */
24929  caddr_t cq_addr; /* address to copy data to/from */
24930  size_t cq_size; /* number of bytes to copy */
24931  uint_t cq_flag; /* must be zero */
24932  mblk_t *cq_private; /* private state information */
24933  int cq_filler[4]; /* reserved for future use */
24934 };
24935 
24936 
24937 /*
24938  * structure for the M_IOCDATA message type.
24939  */
24940 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24941 struct copyresp {
24942  int cp_cmd; /* ioctl command (from ioc_cmd) */
24943  cred_t *cp_cr; /* full credentials */
24944  uint_t cp_id; /* ioctl id (from ioc_id) */
24945  caddr_t cp_rval; /* status of request: 0 -> success */
24946      /* 		non-zero -> failure */
24947  size_t cp_pad1;
24948  uint_t cp_pad2;
24949  mblk_t *cp_private; /* private state information */
24950  uint_t cp_flag; /* datamodel IOC_ flags; see above */
24951  int cp_filler[3];
24952 };
24953 
24954 
24955 /*
24956  * Since these structures are all intended to travel in the same message
24957  * at different stages of a STREAMS ioctl, this union is used to determine
24958  * the message size in strdoioctl().
24959  */
24960 union ioctypes {
24961  struct iocblk iocblk;
24962  struct copyreq copyreq;
24963  struct copyresp copyresp;
24964 };
24965 
24966 /*
24967  * Options structure for M_SETOPTS message.  This is sent upstream
24968  * by a module or driver to set stream head options.
24969  */
24970 struct stroptions {
24971  uint_t so_flags; /* options to set */
24972  short so_readopt; /* read option */
24973  ushort_t so_wroff; /* write offset */
24974  ssize_t so_minpsz; /* minimum read packet size */
24975  ssize_t so_maxpsz; /* maximum read packet size */
24976  size_t so_hiwat; /* read queue high water mark */
24977  size_t so_lowat; /* read queue low water mark */
24978  unsigned char so_band; /* band for water marks */
24979  ushort_t so_erropt; /* error option */
24980  ssize_t so_maxblk; /* maximum message block size */
24981  ushort_t so_copyopt; /* copy options (see stropts.h) */
24982  ushort_t so_tail; /* space available at the end */
24983 };
24984 
24985 /* flags for stream options set message */
24986 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24987 /*
24988  * Miscellaneous parameters and flags.
24989  */
24990 
24991 /*
24992  * Values for stream flag in open to indicate module open, clone open,
24993  * and the return value for failure.
24994  */
24995 
24996 
24997 
24998 
24999 /*
25000  * Priority definitions for block allocation.
25001  */
25002 
25003 
25004 
25005 
25006 /*
25007  * Value for packet size that denotes infinity
25008  */
25009 
25010 
25011 /*
25012  * Flags for flushq()
25013  */
25014 
25015 
25016 
25017 /*
25018  * Flag for transparent ioctls
25019  */
25020 
25021 
25022 /*
25023  * Stream head default high/low water marks
25024  */
25025 
25026 
25027 
25028 /*
25029  * qwriter perimeter types
25030  */
25031 
25032 
25033 
25034 /*
25035  * Definitions of Streams macros and function interfaces.
25036  */
25037 
25038 /*
25039  * canenable - check if queue can be enabled by putq().
25040  */
25041 
25042 
25043 /*
25044  * Test if data block type is one of the data messages (i.e. not a control
25045  * message).
25046  */
25047 
25048 
25049 
25050 
25051 
25052 
25053 
25054 /*
25055  * Extract queue class of message block.
25056  */
25057 
25058 
25059 /*
25060  * Align address on next lower word boundary.
25061  */
25062 
25063 
25064 /*
25065  * Find the max size of data block.
25066  */
25067 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25068 
25069 /*
25070  * Symbols such as htonl() are required to be exposed through this file,
25071  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
25072  */
25073 
25074 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
25075 /*
25076  * CDDL HEADER START
25077  *
25078  * The contents of this file are subject to the terms of the
25079  * Common Development and Distribution License (the "License").
25080  * You may not use this file except in compliance with the License.
25081  *
25082  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25083  * or http://www.opensolaris.org/os/licensing.
25084  * See the License for the specific language governing permissions
25085  * and limitations under the License.
25086  *
25087  * When distributing Covered Code, include this CDDL HEADER in each
25088  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25089  * If applicable, add the following below this CDDL HEADER, with the
25090  * fields enclosed by brackets "[]" replaced with your own identifying
25091  * information: Portions Copyright [yyyy] [name of copyright owner]
25092  *
25093  * CDDL HEADER END
25094  */
25095 
25096 /*
25097  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25098  * Use is subject to license terms.
25099  */
25100 
25101 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25102 /*	  All Rights Reserved  	*/
25103 
25104 /*
25105  * University Copyright- Copyright (c) 1982, 1986, 1988
25106  * The Regents of the University of California
25107  * All Rights Reserved
25108  *
25109  * University Acknowledgment- Portions of this document are derived from
25110  * software developed by the University of California, Berkeley, and its
25111  * contributors.
25112  */
25113 
25114 
25115 
25116 
25117 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
25118 /*
25119  * CDDL HEADER START
25120  *
25121  * The contents of this file are subject to the terms of the
25122  * Common Development and Distribution License (the "License").
25123  * You may not use this file except in compliance with the License.
25124  *
25125  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25126  * or http://www.opensolaris.org/os/licensing.
25127  * See the License for the specific language governing permissions
25128  * and limitations under the License.
25129  *
25130  *
25131  * When distributing Covered Code, include this CDDL HEADER in each
25132  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25133  * If applicable, add the following below this CDDL HEADER, with the
25134  * fields enclosed by brackets "[]" replaced with your own identifying
25135  * information: Portions Copyright [yyyy] [name of copyright owner]
25136  *
25137  * CDDL HEADER END
25138  */
25139 
25140 /*
25141  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25142  * Use is subject to license terms.
25143  * Copyright 2016 Joyent, Inc.
25144  */
25145 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
25146 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
25147 /*
25148  * CDDL HEADER START
25149  *
25150  * The contents of this file are subject to the terms of the
25151  * Common Development and Distribution License, Version 1.0 only
25152  * (the "License").  You may not use this file except in compliance
25153  * with the License.
25154  *
25155  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25156  * or http://www.opensolaris.org/os/licensing.
25157  * See the License for the specific language governing permissions
25158  * and limitations under the License.
25159  *
25160  * When distributing Covered Code, include this CDDL HEADER in each
25161  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25162  * If applicable, add the following below this CDDL HEADER, with the
25163  * fields enclosed by brackets "[]" replaced with your own identifying
25164  * information: Portions Copyright [yyyy] [name of copyright owner]
25165  *
25166  * CDDL HEADER END
25167  */
25168 /*
25169  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25170  *
25171  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
25172  * Use is subject to license terms.
25173  */
25174 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
25175 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
25176 /*
25177  * macros for conversion between host and (internet) network byte order
25178  */
25179 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
25180 typedef uint16_t in_port_t;
25181 
25182 
25183 
25184 
25185 typedef uint32_t in_addr_t;
25186 
25187 
25188 
25189 extern uint32_t htonl(uint32_t);
25190 extern uint16_t htons(uint16_t);
25191 extern uint32_t ntohl(uint32_t);
25192 extern uint16_t ntohs(uint16_t);
25193 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
25194 extern uint64_t htonll(uint64_t);
25195 extern uint64_t ntohll(uint64_t);
25196 
25197 
25198 
25199 
25200 
25201 
25202 /*
25203  * Macros to reverse byte order
25204  */
25205 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
25206 /*
25207  * Macros to convert from a specific byte order to/from native byte order
25208  */
25209 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
25210 /*
25211  * Macros to read unaligned values from a specific byte order to
25212  * native byte order
25213  */
25214 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
25215 /*
25216  * Macros to write unaligned values from native byte order to a specific byte
25217  * order.
25218  */
25219 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25220 
25221 
25222 
25223 
25224 
25225 
25226 
25227 /*
25228  * Note: IPv4 address data structures usage conventions.
25229  * The "in_addr_t" type below (required by Unix standards)
25230  * is NOT a typedef of "struct in_addr" and violates the usual
25231  * conventions where "struct <name>" and <name>_t are corresponding
25232  * typedefs.
25233  * To minimize confusion, kernel data structures/usage prefers use
25234  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
25235  * The user level APIs continue to follow the historic popular
25236  * practice of using "struct in_addr".
25237  */
25238 
25239 
25240 
25241 
25242 
25243 
25244 
25245 typedef uint32_t ipaddr_t;
25246 
25247 
25248 
25249 
25250 struct in6_addr {
25251  union {
25252   /*
25253 		 * Note: Static initalizers of "union" type assume
25254 		 * the constant on the RHS is the type of the first member
25255 		 * of union.
25256 		 * To make static initializers (and efficient usage) work,
25257 		 * the order of members exposed to user and kernel view of
25258 		 * this data structure is different.
25259 		 * User environment sees specified uint8_t type as first
25260 		 * member whereas kernel sees most efficient type as
25261 		 * first member.
25262 		 */
25263 
25264 
25265 
25266 
25267   uint8_t _S6_u8[16]; /* IPv6 address */
25268   uint32_t _S6_u32[4]; /* IPv6 address */
25269 
25270   uint32_t __S6_align; /* Align on 32 bit boundary */
25271  } _S6_un;
25272 };
25273 
25274 
25275 
25276 
25277 
25278 
25279 
25280 typedef struct in6_addr in6_addr_t;
25281 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25282 /*
25283  * Protocols
25284  *
25285  * Some of these constant names are copied for the DTrace IP provider in
25286  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
25287  * in sync.
25288  */
25289 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25290       /* Transmission Protocol */
25291 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25292 /*
25293  * Port/socket numbers: network standard functions
25294  *
25295  * Entries should exist here for each port number compiled into an ON
25296  * component, such as snoop.
25297  */
25298 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25299 /*
25300  * Port/socket numbers: host specific functions
25301  */
25302 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25303 /*
25304  * Internet Key Exchange (IKE) ports
25305  */
25306 
25307 
25308 
25309 /*
25310  * UNIX TCP sockets
25311  */
25312 
25313 
25314 
25315 
25316 
25317 
25318 /*
25319  * UNIX UDP sockets
25320  */
25321 
25322 
25323 
25324 
25325 
25326 
25327 
25328 /*
25329  * DHCPv6 UDP ports
25330  */
25331 
25332 
25333 
25334 
25335 
25336 /*
25337  * Ports < IPPORT_RESERVED are reserved for
25338  * privileged processes (e.g. root).
25339  * Ports > IPPORT_USERRESERVED are reserved
25340  * for servers, not necessarily privileged.
25341  */
25342 
25343 
25344 
25345 /*
25346  * Link numbers
25347  */
25348 
25349 
25350 
25351 
25352 /*
25353  * IPv4 Internet address
25354  *	This definition contains obsolete fields for compatibility
25355  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
25356  *	divisions into fixed fields misleading at best.  New code
25357  *	should use only the s_addr field.
25358  */
25359 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25360 struct in_addr {
25361  union {
25362   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
25363   struct { uint16_t s_w1, s_w2; } S_un_w;
25364 
25365   uint32_t S_addr;
25366 
25367 
25368 
25369  } S_un;
25370 
25371 
25372 
25373 
25374 
25375 
25376 };
25377 
25378 /*
25379  * Definitions of bits in internet address integers.
25380  * On subnets, the decomposition of addresses to host and net parts
25381  * is done according to subnet mask, not the masks here.
25382  *
25383  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
25384  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
25385  * obsolete". IN_MULTICAST macro should be used to test if a address
25386  * is a multicast address.
25387  */
25388 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25389 /*
25390  * We have removed CLASS E checks from the kernel
25391  * But we preserve these defines for userland in order
25392  * to avoid compile  breakage of some 3rd party piece of software
25393  */
25394 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25395 /* Scoped IPv4 prefixes (in host byte-order) */
25396 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25397 /* RFC 3927 IPv4 link local address (i in host byte-order) */
25398 
25399 
25400 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
25401 
25402 
25403 
25404 
25405 
25406 
25407 /*
25408  * Define a macro to stuff the loopback address into an Internet address
25409  */
25410 
25411 
25412 
25413 
25414 
25415 
25416 /*
25417  * IPv4 Socket address.
25418  */
25419 struct sockaddr_in {
25420  sa_family_t sin_family;
25421  in_port_t sin_port;
25422  struct in_addr sin_addr;
25423 
25424  char sin_zero[8];
25425 
25426 
25427 
25428 };
25429 
25430 
25431 /*
25432  * IPv6 socket address.
25433  */
25434 struct sockaddr_in6 {
25435  sa_family_t sin6_family;
25436  in_port_t sin6_port;
25437  uint32_t sin6_flowinfo;
25438  struct in6_addr sin6_addr;
25439  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
25440  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
25441 };
25442 
25443 /*
25444  * Macros for accessing the traffic class and flow label fields from
25445  * sin6_flowinfo.
25446  * These are designed to be applied to a 32-bit value.
25447  */
25448 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25449 /* masks */
25450 
25451 
25452 
25453 
25454 
25455 /*
25456  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
25457  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
25458  * only. They need to be different for User/Kernel versions because union
25459  * component data structure is defined differently (it is identical at
25460  * binary representation level).
25461  *
25462  * const struct in6_addr IN6ADDR_ANY_INIT;
25463  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
25464  */
25465 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25466 /*
25467  * RFC 2553 specifies the following macros. Their type is defined
25468  * as "int" in the RFC but they only have boolean significance
25469  * (zero or non-zero). For the purposes of our comment notation,
25470  * we assume a hypothetical type "bool" defined as follows to
25471  * write the prototypes assumed for macros in our comments better.
25472  *
25473  * typedef int bool;
25474  */
25475 
25476 /*
25477  * IN6 macros used to test for special IPv6 addresses
25478  * (Mostly from spec)
25479  *
25480  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
25481  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
25482  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
25483  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
25484  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
25485  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
25486  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
25487  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
25488  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
25489  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
25490  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
25491  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
25492  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
25493  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
25494  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
25495  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
25496  *	     const struct in6_addr *);			    -- Not from RFC2553
25497  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
25498  */
25499 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25500 /*
25501  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
25502  * Note: This macro is currently NOT defined in RFC2553 specification
25503  * and not a standard macro that portable applications should use.
25504  */
25505 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25506 /* Exclude loopback and unspecified address */
25507 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25508 /*
25509  * Note:
25510  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
25511  * specification and not a standard macro that portable applications
25512  * should use.
25513  */
25514 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25515 /*
25516  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
25517  * RFC, and shouldn't be used by portable applications.  It is used to see
25518  * if an address is a solicited-node multicast address, which is prefixed
25519  * with ff02:0:0:0:0:1:ff00::/104.
25520  */
25521 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25522 /*
25523  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
25524  * 6to4 addresses have the same /48 prefix, and, hence, are from the
25525  * same 6to4 site.
25526  */
25527 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25528 /*
25529  * IN6_IS_ADDR_LINKSCOPE
25530  * Identifies an address as being either link-local, link-local multicast or
25531  * node-local multicast.  All types of addresses are considered to be unique
25532  * within the scope of a given link.
25533  */
25534 
25535 
25536 
25537 
25538 /*
25539  * Useful utility macros for operations with IPv6 addresses
25540  * Note: These macros are NOT defined in the RFC2553 or any other
25541  * standard specification and are not standard macros that portable
25542  * applications should use.
25543  */
25544 
25545 /*
25546  * IN6_V4MAPPED_TO_INADDR
25547  * IN6_V4MAPPED_TO_IPADDR
25548  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
25549  *	Note: These macros are NOT defined in RFC2553 or any other standard
25550  *	specification and are not macros that portable applications should
25551  *	use.
25552  *
25553  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
25554  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
25555  *
25556  */
25557 
25558 
25559 
25560 
25561 
25562 /*
25563  * IN6_INADDR_TO_V4MAPPED
25564  * IN6_IPADDR_TO_V4MAPPED
25565  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
25566  *	address.
25567  *	Note: These macros are NOT defined in RFC2553 or any other standard
25568  *	specification and are not macros that portable applications should
25569  *	use.
25570  *
25571  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
25572  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
25573  *
25574  */
25575 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25576 /*
25577  * IN6_6TO4_TO_V4ADDR
25578  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
25579  *      address.
25580  *	Note: This macro is NOT defined in RFC2553 or any other standard
25581  *	specification and is not a macro that portable applications should
25582  *	use.
25583  *	Note: we don't use the IPADDR form of the macro because we need
25584  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
25585  *	32-bit aligned.
25586  *
25587  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
25588  *
25589  */
25590 
25591 
25592 
25593 
25594 
25595 
25596 /*
25597  * IN6_V4ADDR_TO_6TO4
25598  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
25599  *	will be created from the IPv4 Address.
25600  *	Note:  This method for creating 6to4 addresses is not standardized
25601  *	outside of Solaris.  The newly created 6to4 address will be of the form
25602  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
25603  *	HOSTID will equal 1.
25604  *
25605  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
25606  *
25607  */
25608 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25609 /*
25610  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
25611  *	 Compares if IPv6 addresses are equal.
25612  * Note: Compares in order of high likelyhood of a miss so we minimize
25613  * compares. (Current heuristic order, compare in reverse order of
25614  * uint32_t units)
25615  *
25616  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
25617  *			    const struct in6_addr *);
25618  */
25619 
25620 
25621 
25622 
25623 
25624 
25625 /*
25626  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
25627  *	Compares if prefixed parts of IPv6 addresses are equal.
25628  *
25629  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
25630  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
25631  *				       const struct in6_addr *,
25632  *				       int);
25633  */
25634 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25635 /*
25636  * Options for use with [gs]etsockopt at the IP level.
25637  *
25638  * Note: Some of the IP_ namespace has conflict with and
25639  * and is exposed through <xti.h>. (It also requires exposing
25640  * options not implemented). The options with potential
25641  * for conflicts use #ifndef guards.
25642  */
25643 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25644 /*
25645  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
25646  * is used to differentiate b/w the two.
25647  */
25648 
25649 
25650 
25651 
25652 
25653 /*
25654  * Different preferences that can be requested from IPSEC protocols.
25655  */
25656 
25657 
25658 
25659 
25660 /*
25661  * This can be used with the setsockopt() call to set per socket security
25662  * options. When the application uses per-socket API, we will reflect
25663  * the request on both outbound and inbound packets.
25664  */
25665 
25666 typedef struct ipsec_req {
25667  uint_t ipsr_ah_req; /* AH request */
25668  uint_t ipsr_esp_req; /* ESP request */
25669  uint_t ipsr_self_encap_req; /* Self-Encap request */
25670  uint8_t ipsr_auth_alg; /* Auth algs for AH */
25671  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
25672  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
25673 } ipsec_req_t;
25674 
25675 /*
25676  * MCAST_* options are protocol-independent.  The actual definitions
25677  * are with the v6 options below; this comment is here to note the
25678  * namespace usage.
25679  *
25680  * #define	MCAST_JOIN_GROUP	0x29
25681  * #define	MCAST_LEAVE_GROUP	0x2a
25682  * #define	MCAST_BLOCK_SOURCE	0x2b
25683  * #define	MCAST_UNBLOCK_SOURCE	0x2c
25684  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
25685  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
25686  */
25687 
25688 
25689 /*
25690  * SunOS private (potentially not portable) IP_ option names
25691  */
25692 
25693 
25694 
25695 /* can be reused		0x44 */
25696 
25697 
25698 /*
25699  * Option values and names (when !_XPG5) shared with <xti_inet.h>
25700  */
25701 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25702 /*
25703  * The following option values are reserved by <xti_inet.h>
25704  *
25705  * T_IP_OPTIONS	0x107	 -  IP per-packet options
25706  * T_IP_TOS	0x108	 -  IP per packet type of service
25707  */
25708 
25709 /*
25710  * Default value constants for multicast attributes controlled by
25711  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
25712  */
25713 
25714 
25715 
25716 
25717 /*
25718  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
25719  */
25720 struct ip_mreq {
25721  struct in_addr imr_multiaddr; /* IP multicast address of group */
25722  struct in_addr imr_interface; /* local IP address of interface */
25723 };
25724 
25725 /*
25726  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
25727  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
25728  */
25729 struct ip_mreq_source {
25730  struct in_addr imr_multiaddr; /* IP address of group */
25731  struct in_addr imr_sourceaddr; /* IP address of source */
25732  struct in_addr imr_interface; /* IP address of interface */
25733 };
25734 
25735 /*
25736  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
25737  * IPv6 addresses.
25738  */
25739 struct ipv6_mreq {
25740  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
25741  unsigned int ipv6mr_interface; /* interface index */
25742 };
25743 
25744 /*
25745  * Use #pragma pack() construct to force 32-bit alignment on amd64.
25746  * This is needed to keep the structure size and offsets consistent
25747  * between a 32-bit app and the 64-bit amd64 kernel in structures
25748  * where 64-bit alignment would create gaps (in this case, structures
25749  * which have a uint32_t followed by a struct sockaddr_storage).
25750  */
25751 
25752 
25753 
25754 
25755 /*
25756  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
25757  */
25758 struct group_req {
25759  uint32_t gr_interface; /* interface index */
25760  struct sockaddr_storage gr_group; /* group address */
25761 };
25762 
25763 /*
25764  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
25765  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
25766  */
25767 struct group_source_req {
25768  uint32_t gsr_interface; /* interface index */
25769  struct sockaddr_storage gsr_group; /* group address */
25770  struct sockaddr_storage gsr_source; /* source address */
25771 };
25772 
25773 /*
25774  * Argument for SIOC[GS]MSFILTER ioctls
25775  */
25776 struct group_filter {
25777  uint32_t gf_interface; /* interface index */
25778  struct sockaddr_storage gf_group; /* multicast address */
25779  uint32_t gf_fmode; /* filter mode */
25780  uint32_t gf_numsrc; /* number of sources */
25781  struct sockaddr_storage gf_slist[1]; /* source address */
25782 };
25783 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25784 /*
25785  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
25786  */
25787 struct ip_msfilter {
25788  struct in_addr imsf_multiaddr; /* IP multicast address of group */
25789  struct in_addr imsf_interface; /* local IP address of interface */
25790  uint32_t imsf_fmode; /* filter mode */
25791  uint32_t imsf_numsrc; /* number of sources in src_list */
25792  struct in_addr imsf_slist[1]; /* start of source list */
25793 };
25794 
25795 
25796 
25797 
25798 
25799 /*
25800  * Multicast source filter manipulation functions in libsocket;
25801  * defined in RFC 3678.
25802  */
25803 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
25804    uint_t, struct sockaddr_storage *);
25805 
25806 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
25807    uint_t *, struct sockaddr_storage *);
25808 
25809 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
25810    uint32_t, struct in_addr *);
25811 
25812 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
25813    uint32_t *, struct in_addr *);
25814 
25815 /*
25816  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
25817  */
25818 
25819 
25820 
25821 /*
25822  * Argument struct for IP_PKTINFO option
25823  */
25824 typedef struct in_pktinfo {
25825  unsigned int ipi_ifindex; /* send/recv interface index */
25826  struct in_addr ipi_spec_dst; /* matched source address */
25827  struct in_addr ipi_addr; /* src/dst address in IP hdr */
25828 } in_pktinfo_t;
25829 
25830 /*
25831  * Argument struct for IPV6_PKTINFO option
25832  */
25833 struct in6_pktinfo {
25834  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
25835  unsigned int ipi6_ifindex; /* send/recv interface index */
25836 };
25837 
25838 /*
25839  * Argument struct for IPV6_MTUINFO option
25840  */
25841 struct ip6_mtuinfo {
25842  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
25843  uint32_t ip6m_mtu; /* path MTU in host byte order */
25844 };
25845 
25846 /*
25847  * IPv6 routing header types
25848  */
25849 
25850 
25851 extern socklen_t inet6_rth_space(int type, int segments);
25852 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
25853 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
25854 extern int inet6_rth_reverse(const void *in, void *out);
25855 extern int inet6_rth_segments(const void *bp);
25856 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
25857 
25858 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
25859 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
25860  uint8_t type, socklen_t len, uint_t align, void **databufp);
25861 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
25862 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
25863  socklen_t vallen);
25864 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
25865  uint8_t *typep, socklen_t *lenp, void **databufp);
25866 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
25867  uint8_t type, socklen_t *lenp, void **databufp);
25868 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
25869  socklen_t vallen);
25870 
25871 
25872 /*
25873  * Argument structure for IP_ADD_PROXY_ADDR.
25874  * Note that this is an unstable, experimental interface. It may change
25875  * later. Don't use it unless you know what it is.
25876  */
25877 typedef struct {
25878  struct in_addr in_prefix_addr;
25879  unsigned int in_prefix_len;
25880 } in_prefix_t;
25881 
25882 
25883 
25884 /*
25885  * IPv6 options
25886  */
25887 
25888      /* packets. */
25889      /* argument type: uint_t */
25890 
25891      /* multicast packets. */
25892      /* argument type: struct in6_addr */
25893 
25894      /* multicast packets. */
25895      /* argument type: uint_t */
25896 
25897      /* multicast packets on same socket. */
25898      /* argument type: uint_t */
25899 
25900      /* argument type: struct ipv6_mreq */
25901 
25902      /* argument type: struct ipv6_mreq */
25903 
25904 /*
25905  * Other XPG6 constants.
25906  */
25907 
25908      /* decimal notation. */
25909 
25910      /* standard colon-hex notation. */
25911 
25912 
25913 
25914 
25915 
25916 /*
25917  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
25918  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
25919  * and IPV6_LEAVE_GROUP respectively.
25920  */
25921 
25922      /* argument type: struct ipv6_mreq */
25923 
25924      /* argument type: struct ipv6_mreq */
25925 
25926 
25927      /* arg type: "struct in6_pktingo" - */
25928 
25929 
25930 
25931 
25932      /* the routing header */
25933 
25934 
25935      /* the routing header */
25936 
25937 
25938 
25939 
25940 /*
25941  * This options exists for backwards compatability and should no longer be
25942  * used.  Use IPV6_RECVDSTOPTS instead.
25943  */
25944 
25945 
25946 
25947 
25948 /*
25949  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
25950  * the receipt of both headers.
25951  */
25952 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25953 /*
25954  * enable/disable receipt of both both IPV6_DSTOPTS headers.
25955  */
25956 
25957 
25958 /*
25959  * protocol-independent multicast membership options.
25960  */
25961 
25962 
25963 
25964 
25965 
25966 
25967 
25968 /* 32Bit field for IPV6_SRC_PREFERENCES */
25969 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25970 /*
25971  * SunOS private (potentially not portable) IPV6_ option names
25972  */
25973 
25974 
25975      /* unspecified (all zeros) */
25976 
25977 /*
25978  * Miscellaneous IPv6 constants.
25979  */
25980 
25981 
25982 
25983 
25984 /*
25985  * Extern declarations for pre-defined global const variables
25986  */
25987 
25988 
25989 
25990 extern const struct in6_addr in6addr_any;
25991 extern const struct in6_addr in6addr_loopback;
25992 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25993 
25994 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
25995 /*
25996  * CDDL HEADER START
25997  *
25998  * The contents of this file are subject to the terms of the
25999  * Common Development and Distribution License (the "License").
26000  * You may not use this file except in compliance with the License.
26001  *
26002  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26003  * or http://www.opensolaris.org/os/licensing.
26004  * See the License for the specific language governing permissions
26005  * and limitations under the License.
26006  *
26007  * When distributing Covered Code, include this CDDL HEADER in each
26008  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26009  * If applicable, add the following below this CDDL HEADER, with the
26010  * fields enclosed by brackets "[]" replaced with your own identifying
26011  * information: Portions Copyright [yyyy] [name of copyright owner]
26012  *
26013  * CDDL HEADER END
26014  */
26015 /*
26016  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26017  *
26018  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
26019  */
26020 
26021 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26022 /*	  All Rights Reserved	*/
26023 
26024 /*
26025  * University Copyright- Copyright (c) 1982, 1986, 1988
26026  * The Regents of the University of California
26027  * All Rights Reserved
26028  *
26029  * University Acknowledgment- Portions of this document are derived from
26030  * software developed by the University of California, Berkeley, and its
26031  * contributors.
26032  */
26033 
26034 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
26035 
26036 
26037 
26038 
26039 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26040 /*
26041  * CDDL HEADER START
26042  *
26043  * The contents of this file are subject to the terms of the
26044  * Common Development and Distribution License (the "License").
26045  * You may not use this file except in compliance with the License.
26046  *
26047  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26048  * or http://www.opensolaris.org/os/licensing.
26049  * See the License for the specific language governing permissions
26050  * and limitations under the License.
26051  *
26052  * When distributing Covered Code, include this CDDL HEADER in each
26053  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26054  * If applicable, add the following below this CDDL HEADER, with the
26055  * fields enclosed by brackets "[]" replaced with your own identifying
26056  * information: Portions Copyright [yyyy] [name of copyright owner]
26057  *
26058  * CDDL HEADER END
26059  */
26060 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26061 /*	  All Rights Reserved  	*/
26062 
26063 
26064 /*
26065  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26066  * Use is subject to license terms.
26067  *
26068  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26069  * Copyright 2016 Joyent, Inc.
26070  */
26071 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26072 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
26073 /*
26074  * CDDL HEADER START
26075  *
26076  * The contents of this file are subject to the terms of the
26077  * Common Development and Distribution License (the "License").
26078  * You may not use this file except in compliance with the License.
26079  *
26080  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26081  * or http://www.opensolaris.org/os/licensing.
26082  * See the License for the specific language governing permissions
26083  * and limitations under the License.
26084  *
26085  * When distributing Covered Code, include this CDDL HEADER in each
26086  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26087  * If applicable, add the following below this CDDL HEADER, with the
26088  * fields enclosed by brackets "[]" replaced with your own identifying
26089  * information: Portions Copyright [yyyy] [name of copyright owner]
26090  *
26091  * CDDL HEADER END
26092  */
26093 /*
26094  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26095  *
26096  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
26097  * Use is subject to license terms.
26098  *
26099  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26100  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
26101  */
26102 
26103 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26104 /*	  All Rights Reserved  	*/
26105 
26106 /*
26107  * University Copyright- Copyright (c) 1982, 1986, 1988
26108  * The Regents of the University of California
26109  * All Rights Reserved
26110  *
26111  * University Acknowledgment- Portions of this document are derived from
26112  * software developed by the University of California, Berkeley, and its
26113  * contributors.
26114  */
26115 
26116 
26117 
26118 
26119 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
26120 /*
26121  * CDDL HEADER START
26122  *
26123  * The contents of this file are subject to the terms of the
26124  * Common Development and Distribution License (the "License").
26125  * You may not use this file except in compliance with the License.
26126  *
26127  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26128  * or http://www.opensolaris.org/os/licensing.
26129  * See the License for the specific language governing permissions
26130  * and limitations under the License.
26131  *
26132  * When distributing Covered Code, include this CDDL HEADER in each
26133  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26134  * If applicable, add the following below this CDDL HEADER, with the
26135  * fields enclosed by brackets "[]" replaced with your own identifying
26136  * information: Portions Copyright [yyyy] [name of copyright owner]
26137  *
26138  * CDDL HEADER END
26139  */
26140 
26141 /*
26142  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
26143  * Copyright 2016 Joyent, Inc.
26144  *
26145  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26146  * Use is subject to license terms.
26147  */
26148 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
26149 
26150 
26151 
26152 
26153 
26154 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26155 /*
26156  * CDDL HEADER START
26157  *
26158  * The contents of this file are subject to the terms of the
26159  * Common Development and Distribution License (the "License").
26160  * You may not use this file except in compliance with the License.
26161  *
26162  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26163  * or http://www.opensolaris.org/os/licensing.
26164  * See the License for the specific language governing permissions
26165  * and limitations under the License.
26166  *
26167  * When distributing Covered Code, include this CDDL HEADER in each
26168  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26169  * If applicable, add the following below this CDDL HEADER, with the
26170  * fields enclosed by brackets "[]" replaced with your own identifying
26171  * information: Portions Copyright [yyyy] [name of copyright owner]
26172  *
26173  * CDDL HEADER END
26174  */
26175 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26176 /*	  All Rights Reserved  	*/
26177 
26178 
26179 /*
26180  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26181  * Use is subject to license terms.
26182  *
26183  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26184  * Copyright 2016 Joyent, Inc.
26185  */
26186 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
26187 
26188 /*
26189  * I/O parameter information.  A uio structure describes the I/O which
26190  * is to be performed by an operation.  Typically the data movement will
26191  * be performed by a routine such as uiomove(), which updates the uio
26192  * structure to reflect what was done.
26193  */
26194 
26195 
26196 
26197 
26198 
26199 
26200 
26201 typedef struct iovec {
26202  caddr_t iov_base;
26203 
26204 
26205 
26206  long iov_len;
26207 
26208 } iovec_t;
26209 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26210 /*
26211  * Segment flag values.
26212  */
26213 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
26214 
26215 typedef struct uio {
26216  iovec_t *uio_iov; /* pointer to array of iovecs */
26217  int uio_iovcnt; /* number of iovecs */
26218  lloff_t _uio_offset; /* file offset */
26219  uio_seg_t uio_segflg; /* address space (kernel or user) */
26220  uint16_t uio_fmode; /* file mode flags */
26221  uint16_t uio_extflg; /* extended flags */
26222  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
26223  ssize_t uio_resid; /* residual count */
26224 } uio_t;
26225 
26226 /*
26227  * Extended uio_t uioa_t used for asynchronous uio.
26228  *
26229  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
26230  *	 as there isn't a formal definition of IOV_MAX for the kernel.
26231  */
26232 
26233 
26234 typedef struct uioa_page_s { /* locked uio_iov state */
26235  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
26236  void **uioa_ppp; /* page_t or pfn_t arrary */
26237  caddr_t uioa_base; /* address base */
26238  size_t uioa_len; /* span length */
26239 } uioa_page_t;
26240 
26241 typedef struct uioa_s {
26242  iovec_t *uio_iov; /* pointer to array of iovecs */
26243  int uio_iovcnt; /* number of iovecs */
26244  lloff_t _uio_offset; /* file offset */
26245  uio_seg_t uio_segflg; /* address space (kernel or user) */
26246  uint16_t uio_fmode; /* file mode flags */
26247  uint16_t uio_extflg; /* extended flags */
26248  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
26249  ssize_t uio_resid; /* residual count */
26250  /*
26251 	 * uioa extended members.
26252 	 */
26253  uint32_t uioa_state; /* state of asynch i/o */
26254  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
26255  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
26256  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
26257  void *uioa_hwst[4]; /* opaque hardware state */
26258  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
26259 } uioa_t;
26260 
26261 /*
26262  * uio extensions
26263  *
26264  * PSARC 2009/478: Copy Reduction Interfaces
26265  */
26266 typedef enum xuio_type {
26267  UIOTYPE_ASYNCIO,
26268  UIOTYPE_ZEROCOPY
26269 } xuio_type_t;
26270 
26271 typedef struct xuio {
26272  uio_t xu_uio; /* Embedded UIO structure */
26273 
26274  /* Extended uio fields */
26275  enum xuio_type xu_type; /* What kind of uio structure? */
26276  union {
26277   /* Async I/O Support, intend to replace uioa_t. */
26278   struct {
26279    uint32_t xu_a_state; /* state of async i/o */
26280    /* bytes that have been uioamove()ed */
26281    ssize_t xu_a_mbytes;
26282    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
26283    /* pointer into lcur->uioa_ppp[] */
26284    void **xu_a_lppp;
26285    void *xu_a_hwst[4]; /* opaque hardware state */
26286    /* Per iov locked pages */
26287    uioa_page_t xu_a_locked[16];
26288   } xu_aio;
26289 
26290   /*
26291 		 * Copy Reduction Support -- facilate loaning / returning of
26292 		 * filesystem cache buffers.
26293 		 */
26294   struct {
26295    int xu_zc_rw; /* read or write buffer */
26296    void *xu_zc_priv; /* fs specific */
26297   } xu_zc;
26298  } xu_ext;
26299 } xuio_t;
26300 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26301 /*
26302  * I/O direction.
26303  */
26304 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
26305 
26306 /*
26307  * uio_extflg: extended flags
26308  *
26309  * NOTE: This flag will be used in uiomove to determine if non-temporal
26310  * access, ie, access bypassing caches, should be used.  Filesystems that
26311  * don't initialize this field could experience suboptimal performance due to
26312  * the random data the field contains.
26313  *
26314  * NOTE: This flag is also used by uioasync callers to pass an extended
26315  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
26316  * consumers of a uioa_t require the uio_extflg to be initialized.
26317  */
26318 
26319 
26320 
26321 
26322 
26323 
26324 /*
26325  * Global uioasync capability shadow state.
26326  */
26327 typedef struct uioasync_s {
26328  boolean_t enabled; /* Is uioasync enabled? */
26329  size_t mincnt; /* Minimum byte count for use of */
26330 } uioasync_t;
26331 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26332 extern ssize_t readv(int, const struct iovec *, int);
26333 extern ssize_t writev(int, const struct iovec *, int);
26334 
26335 /*
26336  * When in the large file compilation environment,
26337  * map preadv/pwritev to their 64 bit offset versions
26338  */
26339 
26340 
26341 
26342 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26343 #pragma redefine_extname preadv preadv64
26344 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26345 
26346 
26347 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26348 #pragma redefine_extname pwritev pwritev64
26349 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26350 
26351 
26352 
26353 
26354 
26355 
26356 
26357 /* In the LP64 compilation environment, the APIs are already large file */
26358 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
26359 extern ssize_t preadv(int, const struct iovec *, int, off_t);
26360 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
26361 
26362 /*
26363  * preadv64 and pwritev64 should be defined when:
26364  * - Using the transitional compilation environment, and not
26365  *     the large file compilation environment.
26366  */
26367 
26368 
26369 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
26370 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
26371 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26372 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
26373 /*
26374  * CDDL HEADER START
26375  *
26376  * The contents of this file are subject to the terms of the
26377  * Common Development and Distribution License (the "License").
26378  * You may not use this file except in compliance with the License.
26379  *
26380  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26381  * or http://www.opensolaris.org/os/licensing.
26382  * See the License for the specific language governing permissions
26383  * and limitations under the License.
26384  *
26385  * When distributing Covered Code, include this CDDL HEADER in each
26386  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26387  * If applicable, add the following below this CDDL HEADER, with the
26388  * fields enclosed by brackets "[]" replaced with your own identifying
26389  * information: Portions Copyright [yyyy] [name of copyright owner]
26390  *
26391  * CDDL HEADER END
26392  */
26393 
26394 /*
26395  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
26396  * Copyright 2016 Joyent, Inc.
26397  *
26398  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26399  * Use is subject to license terms.
26400  */
26401 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26402 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
26403 /*
26404  * CDDL HEADER START
26405  *
26406  * The contents of this file are subject to the terms of the
26407  * Common Development and Distribution License (the "License").
26408  * You may not use this file except in compliance with the License.
26409  *
26410  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26411  * or http://www.opensolaris.org/os/licensing.
26412  * See the License for the specific language governing permissions
26413  * and limitations under the License.
26414  *
26415  * When distributing Covered Code, include this CDDL HEADER in each
26416  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26417  * If applicable, add the following below this CDDL HEADER, with the
26418  * fields enclosed by brackets "[]" replaced with your own identifying
26419  * information: Portions Copyright [yyyy] [name of copyright owner]
26420  *
26421  * CDDL HEADER END
26422  */
26423 /*
26424  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26425  * Use is subject to license terms.
26426  */
26427 
26428 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26429 /*	  All Rights Reserved	*/
26430 
26431 /*
26432  * Portions of this source code were derived from Berkeley 4.3 BSD
26433  * under license from the Regents of the University of California.
26434  */
26435 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26436 
26437 
26438 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
26439 /*
26440  * CDDL HEADER START
26441  *
26442  * The contents of this file are subject to the terms of the
26443  * Common Development and Distribution License, Version 1.0 only
26444  * (the "License").  You may not use this file except in compliance
26445  * with the License.
26446  *
26447  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26448  * or http://www.opensolaris.org/os/licensing.
26449  * See the License for the specific language governing permissions
26450  * and limitations under the License.
26451  *
26452  * When distributing Covered Code, include this CDDL HEADER in each
26453  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26454  * If applicable, add the following below this CDDL HEADER, with the
26455  * fields enclosed by brackets "[]" replaced with your own identifying
26456  * information: Portions Copyright [yyyy] [name of copyright owner]
26457  *
26458  * CDDL HEADER END
26459  */
26460 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26461 /*	  All Rights Reserved  	*/
26462 
26463 
26464 /*
26465  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26466  *
26467  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26468  * Use is subject to license terms.
26469  */
26470 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
26471 struct netconfig {
26472  char *nc_netid; /* network identifier		*/
26473  unsigned int nc_semantics; /* defined below		*/
26474  unsigned int nc_flag; /* defined below		*/
26475  char *nc_protofmly; /* protocol family name		*/
26476  char *nc_proto; /* protocol name		*/
26477  char *nc_device; /* device name for network id	*/
26478  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
26479  char **nc_lookups; /* list of lookup directories	*/
26480  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
26481 };
26482 
26483 typedef struct {
26484  struct netconfig **nc_head;
26485  struct netconfig **nc_curr;
26486 } NCONF_HANDLE;
26487 
26488 /*
26489  *	Values of nc_semantics
26490  */
26491 
26492 
26493 
26494 
26495 
26496 /*
26497  * NOT FOR PUBLIC USE, Solaris internal only.
26498  * This value of nc_semantics is strictly for use of Remote Direct
26499  * Memory Access provider interfaces in Solaris only and not for
26500  * general use. Do not use this value for general purpose user or
26501  * kernel programming. If used the behavior is undefined.
26502  * This is a PRIVATE interface to be used by Solaris kRPC only.
26503  */
26504 
26505 
26506 /*
26507  *	Values of nc_flag
26508  */
26509 
26510 
26511 
26512 
26513 
26514 /*
26515  *	Values of nc_protofmly
26516  */
26517 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
26518 /*
26519  * NOT FOR PUBLIC USE, Solaris internal only.
26520  * This value of nc_semantics is strictly for use of Remote Direct
26521  * Memory Access provider interfaces in Solaris only and not for
26522  * general use. Do not use this value for general purpose user or
26523  * kernel programming. If used the behavior is undefined.
26524  * This is a PRIVATE interface to be used by Solaris kRPC only.
26525  */
26526 
26527 
26528 /*
26529  *	Values for nc_proto
26530  */
26531 
26532 
26533 
26534 
26535 
26536 
26537 /*
26538  * 	Values for nc_proto for "rdma" protofmly
26539  */
26540 
26541 
26542 
26543 
26544 extern void *setnetconfig(void);
26545 extern int endnetconfig(void *);
26546 extern struct netconfig *getnetconfig(void *);
26547 extern struct netconfig *getnetconfigent(const char *);
26548 extern void freenetconfigent(struct netconfig *);
26549 extern void *setnetpath(void);
26550 extern int endnetpath(void *);
26551 extern struct netconfig *getnetpath(void *);
26552 extern void nc_perror(const char *);
26553 extern char *nc_sperror(void);
26554 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26555 
26556 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
26557 /*
26558  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26559  * Use is subject to license terms.
26560  *
26561  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26562  */
26563 /*
26564  * Copyright (c) 1982, 1986 Regents of the University of California.
26565  * All rights reserved.
26566  *
26567  * Redistribution and use in source and binary forms are permitted
26568  * provided that this notice is preserved and that due credit is given
26569  * to the University of California at Berkeley. The name of the University
26570  * may not be used to endorse or promote products derived from this
26571  * software without specific prior written permission. This software
26572  * is provided ``as is'' without express or implied warranty.
26573  */
26574 
26575 /*
26576  * Constants and structures defined by the internet system,
26577  * according to following documents
26578  *
26579  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
26580  *	http://www.iana.org/assignments/protocol-numbers
26581  *	http://www.iana.org/assignments/port-numbers
26582  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
26583  *
26584  */
26585 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26586 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26587 /*
26588  * Definitions related to sockets: types, address families, options.
26589  */
26590 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26591 /*
26592  * Types
26593  */
26594 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26595 /*
26596  * Flags for socket() and accept4()
26597  */
26598 
26599 
26600 
26601 
26602 /*
26603  * Option flags per-socket.
26604  */
26605 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26606 /*
26607  * Socket options are passed using a signed integer, but it is also rare
26608  * for more than one to ever be passed at the same time with setsockopt
26609  * and only one at a time can be retrieved with getsockopt.
26610  *
26611  * Since the lower numbers cannot be renumbered for compatibility reasons,
26612  * it would seem that we need to start a new number space (0x40000000 -
26613  * 0x7fffffff) for those that don't need to be stored as a bit flag
26614  * somewhere. This limits the flag options to 30 but that seems to be
26615  * plenty, anyway. 0x40000000 is reserved for future use.
26616  */
26617 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26618 /*
26619  * N.B.: The following definition is present only for compatibility
26620  * with release 3.0.  It will disappear in later releases.
26621  */
26622 
26623 
26624 /*
26625  * Additional options, not kept in so_options.
26626  */
26627 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26628 /* "Socket"-level control message types: */
26629 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26630 /*
26631  * Socket filter options
26632  */
26633 
26634 
26635 
26636 
26637 
26638 /*
26639  * Structure returned by FIL_LIST
26640  */
26641 struct fil_info {
26642  int fi_flags; /* see below (FILF_*) */
26643  int fi_pos; /* position (0 is bottom) */
26644  char fi_name[32]; /* filter name */
26645 };
26646 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26647 /*
26648  * Structure used for manipulating linger option.
26649  */
26650 struct linger {
26651  int l_onoff; /* option on/off */
26652  int l_linger; /* linger time */
26653 };
26654 
26655 /*
26656  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
26657  */
26658 
26659 
26660 
26661 
26662 
26663 
26664 
26665 /*
26666  * Address families.
26667  *
26668  * Some of these constant names are copied for the DTrace IP provider in
26669  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
26670  * in sync.
26671  */
26672 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26673 /*
26674  * Protocol families, same as address families for now.
26675  */
26676 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26677 /*
26678  * Maximum queue length specifiable by listen.
26679  */
26680 
26681 
26682 /*
26683  * Message header for recvmsg and sendmsg calls.
26684  */
26685 struct msghdr {
26686  void *msg_name; /* optional address */
26687  socklen_t msg_namelen; /* size of address */
26688  struct iovec *msg_iov; /* scatter/gather array */
26689  int msg_iovlen; /* # elements in msg_iov */
26690 
26691 
26692 
26693 
26694 
26695 
26696  caddr_t msg_accrights; /* access rights sent/received */
26697  int msg_accrightslen;
26698 
26699 };
26700 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26701 /* Added for XPGv2 compliance */
26702 
26703 
26704 
26705 
26706 
26707      /* with left over data */
26708 /* End of XPGv2 compliance */
26709 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26710 /* Added for XPGv2 compliance */
26711 
26712 
26713 
26714 
26715 struct cmsghdr {
26716  socklen_t cmsg_len; /* data byte count, including hdr */
26717  int cmsg_level; /* originating protocol */
26718  int cmsg_type; /* protocol-specific type */
26719 };
26720 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26721 extern int accept(int, struct sockaddr *, Psocklen_t);
26722 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
26723 extern int bind(int, const struct sockaddr *, socklen_t);
26724 extern int connect(int, const struct sockaddr *, socklen_t);
26725 extern int getpeername(int, struct sockaddr *, Psocklen_t);
26726 extern int getsockname(int, struct sockaddr *, Psocklen_t);
26727 extern int getsockopt(int, int, int, void *, Psocklen_t);
26728 extern int listen(int, int); /* XXX - fixme???  where do I go */
26729 extern int socketpair(int, int, int, int *);
26730 extern ssize_t recv(int, void *, size_t, int);
26731 extern ssize_t recvfrom(int, void *, size_t, int,
26732  struct sockaddr *, Psocklen_t);
26733 extern ssize_t recvmsg(int, struct msghdr *, int);
26734 extern ssize_t send(int, const void *, size_t, int);
26735 extern ssize_t sendmsg(int, const struct msghdr *, int);
26736 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
26737  socklen_t);
26738 extern int setsockopt(int, int, int, const void *, socklen_t);
26739 extern int shutdown(int, int);
26740 extern int socket(int, int, int);
26741 
26742 
26743 extern int sockatmark(int);
26744 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
26745 
26746 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
26747 /*
26748  * CDDL HEADER START
26749  *
26750  * The contents of this file are subject to the terms of the
26751  * Common Development and Distribution License (the "License").
26752  * You may not use this file except in compliance with the License.
26753  *
26754  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26755  * or http://www.opensolaris.org/os/licensing.
26756  * See the License for the specific language governing permissions
26757  * and limitations under the License.
26758  *
26759  * When distributing Covered Code, include this CDDL HEADER in each
26760  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26761  * If applicable, add the following below this CDDL HEADER, with the
26762  * fields enclosed by brackets "[]" replaced with your own identifying
26763  * information: Portions Copyright [yyyy] [name of copyright owner]
26764  *
26765  * CDDL HEADER END
26766  */
26767 
26768 /*
26769  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
26770  * Copyright 2016 Joyent, Inc.
26771  *
26772  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26773  * Use is subject to license terms.
26774  */
26775 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
26776 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26777 struct hostent {
26778  char *h_name; /* official name of host */
26779  char **h_aliases; /* alias list */
26780  int h_addrtype; /* host address type */
26781  int h_length; /* length of address */
26782  char **h_addr_list; /* list of addresses from name server */
26783 
26784 };
26785 
26786 
26787 /*
26788  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
26789  * and Service Name Translation.
26790  */
26791 
26792 
26793 struct addrinfo {
26794  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
26795  int ai_family; /* PF_xxx */
26796  int ai_socktype; /* SOCK_xxx */
26797  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
26798 
26799 
26800 
26801  socklen_t ai_addrlen;
26802  char *ai_canonname; /* canonical name for hostname */
26803  struct sockaddr *ai_addr; /* binary address */
26804  struct addrinfo *ai_next; /* next structure in linked list */
26805 };
26806 
26807 /*
26808  * The flag 0x8000 is currently reserved for private use between libnsl and
26809  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
26810  */
26811 /* addrinfo flags */
26812 
26813 
26814 
26815 
26816 
26817 /* getipnodebyname() flags */
26818 
26819 
26820 
26821 
26822 
26823 /*
26824  * These were defined in RFC 2553 but not SUSv3
26825  * or RFC 3493 which obsoleted 2553.
26826  */
26827 
26828 
26829 
26830 /* addrinfo errors */
26831 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26832 /* getnameinfo flags */
26833 
26834 
26835 
26836 
26837 
26838 
26839 
26840 /* Not listed in any standards document */
26841 
26842 
26843 
26844 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
26845 
26846 
26847 
26848 
26849 
26850 /*
26851  * Scope delimit character
26852  */
26853 
26854 
26855 
26856 /*
26857  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
26858  * and algorithms.
26859  */
26860 
26861 typedef struct ipsecalgent {
26862  char **a_names; /* algorithm names */
26863  int a_proto_num; /* protocol number */
26864  int a_alg_num; /* algorithm number */
26865  char *a_mech_name; /* encryption framework mechanism name */
26866  int *a_block_sizes; /* supported block sizes */
26867  int *a_key_sizes; /* supported key sizes */
26868  int a_key_increment; /* key size increment */
26869  int *a_mech_params; /* mechanism specific parameters */
26870  int a_alg_flags; /* algorithm flags */
26871 } ipsecalgent_t;
26872 
26873 /* well-known IPsec protocol numbers */
26874 
26875 
26876 
26877 
26878 
26879 /*
26880  * Assumption here is that a network number
26881  * fits in 32 bits -- probably a poor one.
26882  */
26883 struct netent {
26884  char *n_name; /* official name of net */
26885  char **n_aliases; /* alias list */
26886  int n_addrtype; /* net address type */
26887  in_addr_t n_net; /* network # */
26888 };
26889 
26890 struct protoent {
26891  char *p_name; /* official protocol name */
26892  char **p_aliases; /* alias list */
26893  int p_proto; /* protocol # */
26894 };
26895 
26896 struct servent {
26897  char *s_name; /* official service name */
26898  char **s_aliases; /* alias list */
26899  int s_port; /* port # */
26900  char *s_proto; /* protocol to use */
26901 };
26902 
26903 
26904 struct hostent *gethostbyname_r
26905  (const char *, struct hostent *, char *, int, int *h_errnop);
26906 struct hostent *gethostbyaddr_r
26907  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
26908 struct hostent *getipnodebyname(const char *, int, int, int *);
26909 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
26910 void freehostent(struct hostent *);
26911 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
26912 
26913 struct servent *getservbyname_r
26914  (const char *name, const char *, struct servent *, char *, int);
26915 struct servent *getservbyport_r
26916  (int port, const char *, struct servent *, char *, int);
26917 struct servent *getservent_r(struct servent *, char *, int);
26918 
26919 struct netent *getnetbyname_r
26920  (const char *, struct netent *, char *, int);
26921 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
26922 struct netent *getnetent_r(struct netent *, char *, int);
26923 
26924 struct protoent *getprotobyname_r
26925  (const char *, struct protoent *, char *, int);
26926 struct protoent *getprotobynumber_r
26927  (int, struct protoent *, char *, int);
26928 struct protoent *getprotoent_r(struct protoent *, char *, int);
26929 
26930 int getnetgrent_r(char **, char **, char **, char *, int);
26931 int innetgr(const char *, const char *, const char *, const char *);
26932 
26933 
26934 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
26935 struct hostent *gethostbyname(const char *);
26936 struct hostent *gethostent(void);
26937 struct netent *getnetbyaddr(in_addr_t, int);
26938 struct netent *getnetbyname(const char *);
26939 struct netent *getnetent(void);
26940 struct protoent *getprotobyname(const char *);
26941 struct protoent *getprotobynumber(int);
26942 struct protoent *getprotoent(void);
26943 struct servent *getservbyname(const char *, const char *);
26944 struct servent *getservbyport(int, const char *);
26945 struct servent *getservent(void);
26946 
26947 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
26948 
26949 struct hostent *gethostbyaddr(const void *, socklen_t, int);
26950 
26951 
26952 
26953 
26954 
26955 int endhostent(void);
26956 int endnetent(void);
26957 int endprotoent(void);
26958 int endservent(void);
26959 int sethostent(int);
26960 int setnetent(int);
26961 int setprotoent(int);
26962 int setservent(int);
26963 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26964 int getaddrinfo(const char *,
26965    const char *,
26966    const struct addrinfo *,
26967    struct addrinfo **);
26968 void freeaddrinfo(struct addrinfo *);
26969 const char *gai_strerror(int);
26970 int getnameinfo(const struct sockaddr *,
26971    socklen_t, char *, socklen_t,
26972    char *, socklen_t, int);
26973 
26974 
26975 
26976 int getnetgrent(char **, char **, char **);
26977 int setnetgrent(const char *);
26978 int endnetgrent(void);
26979 int rcmd(char **, unsigned short,
26980  const char *, const char *, const char *, int *);
26981 int rcmd_af(char **, unsigned short,
26982  const char *, const char *, const char *, int *, int);
26983 int rresvport_af(int *, int);
26984 int rresvport_addr(int *, struct sockaddr_storage *);
26985 int rexec(char **, unsigned short,
26986  const char *, const char *, const char *, int *);
26987 int rexec_af(char **, unsigned short,
26988  const char *, const char *, const char *, int *, int);
26989 int rresvport(int *);
26990 int ruserok(const char *, int, const char *, const char *);
26991 /* BIND */
26992 struct hostent *gethostbyname2(const char *, int);
26993 void herror(const char *);
26994 const char *hstrerror(int);
26995 /* End BIND */
26996 
26997 /* IPsec algorithm prototype definitions */
26998 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
26999 struct ipsecalgent *getipsecalgbynum(int, int, int *);
27000 int getipsecprotobyname(const char *doi_name);
27001 char *getipsecprotobynum(int doi_domain);
27002 void freeipsecalgent(struct ipsecalgent *ptr);
27003 /* END IPsec algorithm prototype definitions */
27004 
27005 
27006 
27007 /*
27008  * Error return codes from gethostbyname() and gethostbyaddr()
27009  * (when using the resolver)
27010  */
27011 
27012 extern int h_errno;
27013 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
27014 /*
27015  * Error return codes from gethostbyname() and gethostbyaddr()
27016  * (left in extern int h_errno).
27017  */
27018 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
27019 /* BIND */
27020 
27021 
27022 /* End BIND */
27023 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27024 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
27025 /*
27026  * CDDL HEADER START
27027  *
27028  * The contents of this file are subject to the terms of the
27029  * Common Development and Distribution License, Version 1.0 only
27030  * (the "License").  You may not use this file except in compliance
27031  * with the License.
27032  *
27033  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27034  * or http://www.opensolaris.org/os/licensing.
27035  * See the License for the specific language governing permissions
27036  * and limitations under the License.
27037  *
27038  * When distributing Covered Code, include this CDDL HEADER in each
27039  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27040  * If applicable, add the following below this CDDL HEADER, with the
27041  * fields enclosed by brackets "[]" replaced with your own identifying
27042  * information: Portions Copyright [yyyy] [name of copyright owner]
27043  *
27044  * CDDL HEADER END
27045  */
27046 /*
27047  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27048  * Use is subject to license terms.
27049  */
27050 
27051 
27052 
27053 
27054 #pragma ident "%Z%%M%	%I%	%E% SMI"
27055 
27056 
27057 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
27058 /*
27059  * CDDL HEADER START
27060  *
27061  * The contents of this file are subject to the terms of the
27062  * Common Development and Distribution License (the "License").
27063  * You may not use this file except in compliance with the License.
27064  *
27065  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27066  * or http://www.opensolaris.org/os/licensing.
27067  * See the License for the specific language governing permissions
27068  * and limitations under the License.
27069  *
27070  * When distributing Covered Code, include this CDDL HEADER in each
27071  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27072  * If applicable, add the following below this CDDL HEADER, with the
27073  * fields enclosed by brackets "[]" replaced with your own identifying
27074  * information: Portions Copyright [yyyy] [name of copyright owner]
27075  *
27076  * CDDL HEADER END
27077  */
27078 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27079 /*	  All Rights Reserved  	*/
27080 
27081 
27082 /*
27083  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27084  * Use is subject to license terms.
27085  *
27086  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
27087  * Copyright 2016 Joyent, Inc.
27088  */
27089 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
27090 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
27091 /*
27092  * CDDL HEADER START
27093  *
27094  * The contents of this file are subject to the terms of the
27095  * Common Development and Distribution License, Version 1.0 only
27096  * (the "License").  You may not use this file except in compliance
27097  * with the License.
27098  *
27099  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27100  * or http://www.opensolaris.org/os/licensing.
27101  * See the License for the specific language governing permissions
27102  * and limitations under the License.
27103  *
27104  * When distributing Covered Code, include this CDDL HEADER in each
27105  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27106  * If applicable, add the following below this CDDL HEADER, with the
27107  * fields enclosed by brackets "[]" replaced with your own identifying
27108  * information: Portions Copyright [yyyy] [name of copyright owner]
27109  *
27110  * CDDL HEADER END
27111  */
27112 /*
27113  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
27114  * Use is subject to license terms.
27115  */
27116 
27117 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
27118 /*	  All Rights Reserved  	*/
27119 
27120 /*
27121  * University Copyright- Copyright (c) 1982, 1986, 1988
27122  * The Regents of the University of California
27123  * All Rights Reserved
27124  *
27125  * University Acknowledgment- Portions of this document are derived from
27126  * software developed by the University of California, Berkeley, and its
27127  * contributors.
27128  */
27129 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
27130 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
27131 /*
27132  * CDDL HEADER START
27133  *
27134  * The contents of this file are subject to the terms of the
27135  * Common Development and Distribution License, Version 1.0 only
27136  * (the "License").  You may not use this file except in compliance
27137  * with the License.
27138  *
27139  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27140  * or http://www.opensolaris.org/os/licensing.
27141  * See the License for the specific language governing permissions
27142  * and limitations under the License.
27143  *
27144  * When distributing Covered Code, include this CDDL HEADER in each
27145  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27146  * If applicable, add the following below this CDDL HEADER, with the
27147  * fields enclosed by brackets "[]" replaced with your own identifying
27148  * information: Portions Copyright [yyyy] [name of copyright owner]
27149  *
27150  * CDDL HEADER END
27151  */
27152 /*
27153  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
27154  * Use is subject to license terms.
27155  */
27156 
27157 
27158 
27159 
27160 #pragma ident "%Z%%M%	%I%	%E% SMI"
27161 
27162 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
27163 /*
27164  * CDDL HEADER START
27165  *
27166  * The contents of this file are subject to the terms of the
27167  * Common Development and Distribution License (the "License").
27168  * You may not use this file except in compliance with the License.
27169  *
27170  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27171  * or http://www.opensolaris.org/os/licensing.
27172  * See the License for the specific language governing permissions
27173  * and limitations under the License.
27174  *
27175  * When distributing Covered Code, include this CDDL HEADER in each
27176  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27177  * If applicable, add the following below this CDDL HEADER, with the
27178  * fields enclosed by brackets "[]" replaced with your own identifying
27179  * information: Portions Copyright [yyyy] [name of copyright owner]
27180  *
27181  * CDDL HEADER END
27182  */
27183 
27184 /*
27185  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
27186  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
27187  */
27188 
27189 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
27190 /*	  All Rights Reserved  	*/
27191 
27192 /*
27193  * University Copyright- Copyright (c) 1982, 1986, 1988
27194  * The Regents of the University of California
27195  * All Rights Reserved
27196  *
27197  * University Acknowledgment- Portions of this document are derived from
27198  * software developed by the University of California, Berkeley, and its
27199  * contributors.
27200  */
27201 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
27202 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
27203 typedef struct {
27204  char hostname[256];
27205  ushort_t port;
27206 } url_hport_t;
27207 
27208 typedef struct {
27209  boolean_t https;
27210  url_hport_t hport;
27211  char abspath[1024];
27212 } url_t;
27213 
27214 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
27215 extern int url_parse(const char *, url_t *);
27216 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
27217 
27218 
27219 
27220 
27221 
27222 /* State information returned by http_conn_info() */
27223 typedef struct {
27224  url_t uri; /* URI last loaded */
27225  url_hport_t proxy; /* proxy, if any being used */
27226  boolean_t keepalive; /* Keepalive setting being used */
27227  uint_t read_timeout; /* Timeout to use for socket reads */
27228 } http_conninfo_t;
27229 
27230 
27231 /* Structure for version of the http file */
27232 typedef struct {
27233  uint_t maj_ver; /* Major version */
27234  uint_t min_ver; /* Minor version */
27235  uint_t micro_ver; /* Micro version */
27236 } boot_http_ver_t;
27237 
27238 /* Internal Libhttp errors */
27239 
27240 
27241 
27242     /* necessarily the underlying transport */
27243     /* connection). */
27244 
27245     /* error. */
27246 
27247 
27248 
27249     /* No matching entry */
27250 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
27251 /* Sources of errors */
27252 
27253 
27254 
27255 
27256 
27257 
27258 
27259 typedef struct {
27260  uint_t code; /* status code */
27261  char *statusmsg; /* status message */
27262  uint_t nresphdrs; /* number of response headers */
27263 } http_respinfo_t;
27264 
27265 
27266 typedef void *http_handle_t;
27267 
27268 boot_http_ver_t const *http_get_version(void);
27269 void http_set_p12_format(int);
27270 void http_set_verbose(boolean_t);
27271 int http_set_cipher_list(const char *);
27272 http_handle_t http_srv_init(const url_t *);
27273 int http_set_proxy(http_handle_t, const url_hport_t *);
27274 int http_set_keepalive(http_handle_t, boolean_t);
27275 int http_set_socket_read_timeout(http_handle_t, uint_t);
27276 int http_set_basic_auth(http_handle_t, const char *, const char *);
27277 int http_set_random_file(http_handle_t, const char *);
27278 int http_set_certificate_authority_file(const char *);
27279 int http_set_client_certificate_file(http_handle_t, const char *);
27280 int http_set_password(http_handle_t, const char *);
27281 int http_set_key_file_password(http_handle_t, const char *);
27282 int http_set_private_key_file(http_handle_t, const char *);
27283 
27284 int http_srv_connect(http_handle_t);
27285 int http_head_request(http_handle_t, const char *);
27286 int http_get_request(http_handle_t, const char *);
27287 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
27288 void http_free_respinfo(http_respinfo_t *);
27289 int http_process_headers(http_handle_t, http_respinfo_t **);
27290 int http_process_part_headers(http_handle_t, http_respinfo_t **);
27291 char *http_get_header_value(http_handle_t, const char *);
27292 char *http_get_response_header(http_handle_t, uint_t);
27293 int http_read_body(http_handle_t, char *, size_t);
27294 int http_srv_disconnect(http_handle_t);
27295 int http_srv_close(http_handle_t);
27296 http_conninfo_t *http_get_conn_info(http_handle_t);
27297 int http_conn_is_https(http_handle_t, boolean_t *);
27298 ulong_t http_get_lasterr(http_handle_t, uint_t *);
27299 void http_decode_err(ulong_t, int *, int *, int *);
27300 char const *http_errorstr(uint_t, ulong_t);
27301 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27302 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
27303 /*
27304  * CDDL HEADER START
27305  *
27306  * The contents of this file are subject to the terms of the
27307  * Common Development and Distribution License (the "License").
27308  * You may not use this file except in compliance with the License.
27309  *
27310  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27311  * or http://www.opensolaris.org/os/licensing.
27312  * See the License for the specific language governing permissions
27313  * and limitations under the License.
27314  *
27315  * When distributing Covered Code, include this CDDL HEADER in each
27316  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27317  * If applicable, add the following below this CDDL HEADER, with the
27318  * fields enclosed by brackets "[]" replaced with your own identifying
27319  * information: Portions Copyright [yyyy] [name of copyright owner]
27320  *
27321  * CDDL HEADER END
27322  */
27323 
27324 /*
27325  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
27326  * Use is subject to license terms.
27327  */
27328 
27329 
27330 
27331 
27332 
27333 /*
27334  * Module:	pkgerr.h
27335  * Description:
27336  *
27337  *   Implements error routines to handle the creation,
27338  *   management, and destruction of error objects, which
27339  *   hold error messages and codes returned from libpkg
27340  *   routines that support the objects defined herein.
27341  */
27342 
27343 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
27344 /*
27345  * CDDL HEADER START
27346  *
27347  * The contents of this file are subject to the terms of the
27348  * Common Development and Distribution License (the "License").
27349  * You may not use this file except in compliance with the License.
27350  *
27351  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27352  * or http://www.opensolaris.org/os/licensing.
27353  * See the License for the specific language governing permissions
27354  * and limitations under the License.
27355  *
27356  * When distributing Covered Code, include this CDDL HEADER in each
27357  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27358  * If applicable, add the following below this CDDL HEADER, with the
27359  * fields enclosed by brackets "[]" replaced with your own identifying
27360  * information: Portions Copyright [yyyy] [name of copyright owner]
27361  *
27362  * CDDL HEADER END
27363  */
27364 
27365 /*
27366  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27367  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
27368  */
27369 
27370 /*	Copyright (c) 1988 AT&T	*/
27371 /*	  All Rights Reserved  	*/
27372 
27373 /*
27374  * User-visible pieces of the ANSI C standard I/O package.
27375  */
27376 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
27377 
27378 
27379 
27380 
27381 
27382 /*
27383  * Public Definitions
27384  */
27385 
27386 typedef enum {
27387  PKGERR_OK = 0,
27388  PKGERR_EXIST,
27389  PKGERR_READ,
27390  PKGERR_CORRUPT,
27391  PKGERR_PARSE,
27392  PKGERR_BADPASS,
27393  PKGERR_BADALIAS,
27394  PKGERR_INTERNAL,
27395  PKGERR_UNSUP,
27396  PKGERR_NOALIAS,
27397  PKGERR_NOALIASMATCH,
27398  PKGERR_MULTIPLE,
27399  PKGERR_INCOMPLETE,
27400  PKGERR_NOPRIVKEY,
27401  PKGERR_NOPUBKEY,
27402  PKGERR_NOCACERT,
27403  PKGERR_NOMEM,
27404  PKGERR_CHAIN,
27405  PKGERR_LOCKED,
27406  PKGERR_WRITE,
27407  PKGERR_UNLOCK,
27408  PKGERR_TIME,
27409  PKGERR_DUPLICATE,
27410  PKGERR_WEB,
27411  PKGERR_VERIFY
27412 } PKG_ERR_CODE;
27413 
27414 /*
27415  * Public Structures
27416  */
27417 
27418 /* external reference to PKG_ERR object (contents private) */
27419 typedef PKG_ERR_CODE pkg_err_t;
27420 
27421 typedef struct _pkg_err_struct PKG_ERR;
27422 
27423 /*
27424  * Public Methods
27425  */
27426 
27427 PKG_ERR *pkgerr_new();
27428 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
27429 void pkgerr_clear(PKG_ERR *);
27430 int pkgerr_dump(PKG_ERR *, FILE *);
27431 int pkgerr_num(PKG_ERR *);
27432 char *pkgerr_get(PKG_ERR *, int);
27433 void pkgerr_free(PKG_ERR *);
27434 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27435 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
27436 /*
27437  * CDDL HEADER START
27438  *
27439  * The contents of this file are subject to the terms of the
27440  * Common Development and Distribution License (the "License").
27441  * You may not use this file except in compliance with the License.
27442  *
27443  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27444  * or http://www.opensolaris.org/os/licensing.
27445  * See the License for the specific language governing permissions
27446  * and limitations under the License.
27447  *
27448  * When distributing Covered Code, include this CDDL HEADER in each
27449  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27450  * If applicable, add the following below this CDDL HEADER, with the
27451  * fields enclosed by brackets "[]" replaced with your own identifying
27452  * information: Portions Copyright [yyyy] [name of copyright owner]
27453  *
27454  * CDDL HEADER END
27455  */
27456 
27457 /*
27458  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
27459  * Use is subject to license terms.
27460  */
27461 
27462 
27463 
27464 
27465 
27466 /*
27467  * Module:	keystore.h
27468  * Description:	This module contains the structure definitions for processing
27469  *		package keystore files.
27470  */
27471 
27472 
27473 
27474 
27475 
27476 # 1 "/usr/include/openssl/evp.h" 1 3 4
27477 /* crypto/evp/evp.h */
27478 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27479  * All rights reserved.
27480  *
27481  * This package is an SSL implementation written
27482  * by Eric Young (eay@cryptsoft.com).
27483  * The implementation was written so as to conform with Netscapes SSL.
27484  *
27485  * This library is free for commercial and non-commercial use as long as
27486  * the following conditions are aheared to.  The following conditions
27487  * apply to all code found in this distribution, be it the RC4, RSA,
27488  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27489  * included with this distribution is covered by the same copyright terms
27490  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27491  *
27492  * Copyright remains Eric Young's, and as such any Copyright notices in
27493  * the code are not to be removed.
27494  * If this package is used in a product, Eric Young should be given attribution
27495  * as the author of the parts of the library used.
27496  * This can be in the form of a textual message at program startup or
27497  * in documentation (online or textual) provided with the package.
27498  *
27499  * Redistribution and use in source and binary forms, with or without
27500  * modification, are permitted provided that the following conditions
27501  * are met:
27502  * 1. Redistributions of source code must retain the copyright
27503  *    notice, this list of conditions and the following disclaimer.
27504  * 2. Redistributions in binary form must reproduce the above copyright
27505  *    notice, this list of conditions and the following disclaimer in the
27506  *    documentation and/or other materials provided with the distribution.
27507  * 3. All advertising materials mentioning features or use of this software
27508  *    must display the following acknowledgement:
27509  *    "This product includes cryptographic software written by
27510  *     Eric Young (eay@cryptsoft.com)"
27511  *    The word 'cryptographic' can be left out if the rouines from the library
27512  *    being used are not cryptographic related :-).
27513  * 4. If you include any Windows specific code (or a derivative thereof) from
27514  *    the apps directory (application code) you must include an acknowledgement:
27515  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27516  *
27517  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27518  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27519  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27520  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27521  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27522  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27523  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27524  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27525  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27526  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27527  * SUCH DAMAGE.
27528  *
27529  * The licence and distribution terms for any publically available version or
27530  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27531  * copied and put under another distribution licence
27532  * [including the GNU Public Licence.]
27533  */
27534 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
27535 # 1 "/usr/include/openssl/x509.h" 1 3 4
27536 /* crypto/x509/x509.h */
27537 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27538  * All rights reserved.
27539  *
27540  * This package is an SSL implementation written
27541  * by Eric Young (eay@cryptsoft.com).
27542  * The implementation was written so as to conform with Netscapes SSL.
27543  *
27544  * This library is free for commercial and non-commercial use as long as
27545  * the following conditions are aheared to.  The following conditions
27546  * apply to all code found in this distribution, be it the RC4, RSA,
27547  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27548  * included with this distribution is covered by the same copyright terms
27549  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27550  *
27551  * Copyright remains Eric Young's, and as such any Copyright notices in
27552  * the code are not to be removed.
27553  * If this package is used in a product, Eric Young should be given attribution
27554  * as the author of the parts of the library used.
27555  * This can be in the form of a textual message at program startup or
27556  * in documentation (online or textual) provided with the package.
27557  *
27558  * Redistribution and use in source and binary forms, with or without
27559  * modification, are permitted provided that the following conditions
27560  * are met:
27561  * 1. Redistributions of source code must retain the copyright
27562  *    notice, this list of conditions and the following disclaimer.
27563  * 2. Redistributions in binary form must reproduce the above copyright
27564  *    notice, this list of conditions and the following disclaimer in the
27565  *    documentation and/or other materials provided with the distribution.
27566  * 3. All advertising materials mentioning features or use of this software
27567  *    must display the following acknowledgement:
27568  *    "This product includes cryptographic software written by
27569  *     Eric Young (eay@cryptsoft.com)"
27570  *    The word 'cryptographic' can be left out if the rouines from the library
27571  *    being used are not cryptographic related :-).
27572  * 4. If you include any Windows specific code (or a derivative thereof) from
27573  *    the apps directory (application code) you must include an acknowledgement:
27574  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27575  *
27576  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27577  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27578  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27579  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27580  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27581  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27582  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27583  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27584  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27585  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27586  * SUCH DAMAGE.
27587  *
27588  * The licence and distribution terms for any publically available version or
27589  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27590  * copied and put under another distribution licence
27591  * [including the GNU Public Licence.]
27592  */
27593 /* ====================================================================
27594  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
27595  * ECDH support in OpenSSL originally developed by
27596  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
27597  */
27598 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
27599 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
27600 /*
27601  * CDDL HEADER START
27602  *
27603  * The contents of this file are subject to the terms of the
27604  * Common Development and Distribution License (the "License").
27605  * You may not use this file except in compliance with the License.
27606  *
27607  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27608  * or http://www.opensolaris.org/os/licensing.
27609  * See the License for the specific language governing permissions
27610  * and limitations under the License.
27611  *
27612  * When distributing Covered Code, include this CDDL HEADER in each
27613  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27614  * If applicable, add the following below this CDDL HEADER, with the
27615  * fields enclosed by brackets "[]" replaced with your own identifying
27616  * information: Portions Copyright [yyyy] [name of copyright owner]
27617  *
27618  * CDDL HEADER END
27619  */
27620 
27621 /*
27622  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
27623  * Use is subject to license terms.
27624  */
27625 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
27626 
27627 /* keystore structures */
27628 
27629 /* this opaque type represents a keystore */
27630 typedef void *keystore_handle_t;
27631 
27632 /* flags passed to open_keystore */
27633 
27634 /* opens keystore read-only.  Attempts to modify results in an error */
27635 
27636 
27637 /* opens keystore read-write */
27638 
27639 
27640 /*
27641  * tells open_keystore to fall back to app-generic paths in the case that
27642  * the app-specific paths do not exist.
27643  */
27644 
27645 
27646 /*
27647  * tells open_keystore to use the app-specific paths no matter what,
27648  * failing if they cannot be used for any reason.
27649  */
27650 
27651 
27652 /* masks off various types of flags */
27653 
27654 
27655 
27656 /* default is read-only, soft */
27657 
27658 
27659 
27660 /*
27661  * possible encoding formats used by the library, used
27662  * by print_cert
27663  */
27664 typedef enum {
27665  KEYSTORE_FORMAT_PEM,
27666  KEYSTORE_FORMAT_DER,
27667  KEYSTORE_FORMAT_TEXT
27668 } keystore_encoding_format_t;
27669 
27670 /*
27671  * structure passed back to password callback for determining how
27672  * to prompt for passphrase, and where to record errors
27673  */
27674 typedef struct {
27675  PKG_ERR *err;
27676 } keystore_passphrase_data;
27677 
27678 
27679 /* max length of a passphrase.  One could use a short story! */
27680 
27681 
27682 /* callback for collecting passphrase when open_keystore() is called */
27683 typedef int keystore_passphrase_cb(char *, int, int, void *);
27684 
27685 /* names of the individual files within the keystore path */
27686 
27687 
27688 
27689 
27690 /* keystore.c */
27691 extern int open_keystore(PKG_ERR *, char *, char *,
27692     keystore_passphrase_cb, long flags, keystore_handle_t *);
27693 
27694 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
27695     keystore_encoding_format_t, FILE *);
27696 
27697 extern int check_cert(PKG_ERR *, X509 *);
27698 
27699 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
27700 
27701 extern int print_cert(PKG_ERR *, X509 *,
27702     keystore_encoding_format_t, char *, boolean_t, FILE *);
27703 
27704 extern int close_keystore(PKG_ERR *, keystore_handle_t,
27705     keystore_passphrase_cb);
27706 
27707 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
27708 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
27709     char *, keystore_handle_t);
27710 
27711 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
27712     char *);
27713 
27714 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
27715     char *, EVP_PKEY **, X509 **);
27716 
27717 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
27718     struct stack_st_X509 **);
27719 
27720 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
27721     struct stack_st_X509 **);
27722 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27723 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
27724 /*
27725  * CDDL HEADER START
27726  *
27727  * The contents of this file are subject to the terms of the
27728  * Common Development and Distribution License (the "License").
27729  * You may not use this file except in compliance with the License.
27730  *
27731  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27732  * or http://www.opensolaris.org/os/licensing.
27733  * See the License for the specific language governing permissions
27734  * and limitations under the License.
27735  *
27736  * When distributing Covered Code, include this CDDL HEADER in each
27737  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27738  * If applicable, add the following below this CDDL HEADER, with the
27739  * fields enclosed by brackets "[]" replaced with your own identifying
27740  * information: Portions Copyright [yyyy] [name of copyright owner]
27741  *
27742  * CDDL HEADER END
27743  */
27744 
27745 /*
27746  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27747  * Use is subject to license terms.
27748  */
27749 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
27750 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
27751 /*
27752  * CDDL HEADER START
27753  *
27754  * The contents of this file are subject to the terms of the
27755  * Common Development and Distribution License (the "License").
27756  * You may not use this file except in compliance with the License.
27757  *
27758  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27759  * or http://www.opensolaris.org/os/licensing.
27760  * See the License for the specific language governing permissions
27761  * and limitations under the License.
27762  *
27763  * When distributing Covered Code, include this CDDL HEADER in each
27764  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27765  * If applicable, add the following below this CDDL HEADER, with the
27766  * fields enclosed by brackets "[]" replaced with your own identifying
27767  * information: Portions Copyright [yyyy] [name of copyright owner]
27768  *
27769  * CDDL HEADER END
27770  */
27771 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27772 /*	  All Rights Reserved  	*/
27773 
27774 /*
27775  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
27776  * Use is subject to license terms.
27777  */
27778 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
27779 
27780 struct mergstat {
27781  unsigned setuid:1; /* pkgmap entry has setuid */
27782  unsigned setgid:1; /* ... and/or setgid bit set */
27783  unsigned contchg:1; /* contents of the files different */
27784  unsigned attrchg:1; /* attributes are different */
27785  unsigned shared:1; /* > 1 pkg associated with this */
27786  unsigned osetuid:1; /* installed set[ug]id process ... */
27787  unsigned osetgid:1; /* ... being overwritten by pkg. */
27788  unsigned rogue:1; /* conflicting file not owned by a package */
27789  unsigned dir2nondir:1; /* was a directory & now a non-directory */
27790  unsigned replace:1; /* merge makes no sense for this object pair */
27791  unsigned denied:1; /* for some reason this was not allowed in */
27792  unsigned preloaded:1; /* already checked in a prior pkg op */
27793  unsigned processed:1; /* already installed or removed */
27794  unsigned parentsyml2dir:1;
27795  /* parent directory changed from symlink to a directory */
27796 };
27797 
27798 /*
27799  * This is information required by pkgadd for fast operation. A
27800  * cfextra struct is tagged to each cfent structure requiring
27801  * processing. This is how we avoid some unneeded repetition. The
27802  * entries incorporating the word 'local' refer to the path that
27803  * gets us to the delivered package file. In other words, to install
27804  * a file we usually copy from 'local' to 'path' below. In the case
27805  * of a link, where no actual copying takes place, local is the source
27806  * of the link. Note that environment variables are not evaluated in
27807  * the locals unless they are links since the literal path is how
27808  * pkgadd finds the entry under the reloc directory.
27809  */
27810 struct cfextra {
27811  struct cfent cf_ent; /* basic contents file entry */
27812  struct mergstat mstat; /* merge status for installs */
27813  uint32_t fsys_value; /* fstab[] entry index */
27814  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
27815  char *client_path; /* the client-relative path */
27816  char *server_path; /* the server-relative path */
27817  char *map_path; /* as read from the pkgmap */
27818  char *client_local; /* client_relative local */
27819  char *server_local; /* server relative local */
27820 };
27821 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27822 
27823 /*
27824  * The contents database file interface.
27825  */
27826 
27827 typedef struct pkg_server *PKGserver;
27828 
27829 /* Some commands modify the internal database: add them here */
27830 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27831 typedef enum {
27832  INVALID, /* Not initialized */
27833  NEVER, /* Don't start, does check if it is running. */
27834  FLUSH_LOG, /* Run it once to incorporate the log. */
27835  RUN_ONCE, /* Run until the current client stops. */
27836  TIMEOUT, /* Run until a timeout occurs. */
27837  PERMANENT, /* Run until it is externally terminated. */
27838  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
27839 } start_mode_t;
27840 
27841 typedef struct pkgcmd {
27842  int cmd;
27843  char buf[1];
27844 } pkgcmd_t;
27845 
27846 typedef struct pkgfilter {
27847  int cmd;
27848  int len;
27849  char buf[1];
27850 } pkgfilter_t;
27851 
27852 /*
27853  * Virtual File Protocol definitions
27854  */
27855 
27856 /*
27857  * flags associated with virtual file protocol operations; note that these flags
27858  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
27859  */
27860 
27861 typedef unsigned long VFPFLAGS_T;
27862 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27863 /* virtual file protocol object */
27864 
27865 typedef struct _vfp VFP_T;
27866 
27867 /* structure behind the virtual file protocol object */
27868 
27869 struct _vfp {
27870  FILE *_vfpFile; /* -> opened FILE */
27871  char *_vfpCurr; /* -> current byte to read/write */
27872  char *_vfpHighWater; /* -> last byte modified */
27873  char *_vfpEnd; /* -> last data byte */
27874  char *_vfpPath; /* -> path associated with FILE */
27875  char *_vfpStart; /* -> first data byte */
27876  void *_vfpExtra; /* undefined */
27877  size_t _vfpSize; /* size of mapped/allocated area */
27878  size_t _vfpMapSize; /* # mapped bytes */
27879  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
27880  int _vfpOverflow; /* non-zero if buffer write overflow */
27881  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
27882  dev_t _vfpCkDev; /* checkpoint device i.d. */
27883  ino_t _vfpCkIno; /* checkpoint inode # */
27884  off_t _vfpCkSize; /* checkpoint size */
27885  time_t _vfpCkMtime; /* checkpoint modification time */
27886 };
27887 
27888 /*
27889  * get highest modified byte (length) contained in vfp
27890  *
27891  * determine number of bytes to write - it will be the highest of:
27892  *  -- the current pointer into the file - this is updated whenever
27893  *	the location of the file is changed by a single byte
27894  *  -- the last "high water mark" - the last known location that
27895  *	was written to the file - updated only when the location
27896  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
27897  *	vfpTruncate, vfpRewind.
27898  * this reduces the "bookkeeping" that needs to be done to know
27899  * how many bytes to write out to the file - typically a file is
27900  * written sequentially so the current file pointer is sufficient
27901  * to determine how many bytes to write out.
27902  */
27903 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27904 /*
27905  * increment current pointer by specified delta
27906  * if the delta exceeds the buffer size, set pointer to buffer end
27907  */
27908 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27909 /* get the path associated with the vfp */
27910 
27911 
27912 /* get a string from the vfp into a fixed size buffer */
27913 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27914 /* get number of bytes remaining to read */
27915 
27916 
27917 
27918 
27919 /* get number of bytes remaining to write */
27920 
27921 
27922 
27923 
27924 /* put current character and increment to next */
27925 
27926 
27927 
27928 
27929 
27930 
27931 /* put integer to current character and increment */
27932 
27933 
27934 /* put long to current character and increment */
27935 
27936 
27937 /* get current character and increment to next */
27938 
27939 
27940 /* get current character - do not increment */
27941 
27942 
27943 /* get pointer to current character */
27944 
27945 
27946 /* increment current character pointer */
27947 
27948 
27949 /* decrement current character pointer */
27950 
27951 
27952 /* get pointer to first data byte in buffer */
27953 
27954 
27955 /* get pointer to last data byte in buffer */
27956 
27957 
27958 /* set pointer to current character */
27959 
27960 
27961 
27962 
27963 
27964 
27965 /* set pointer to last data byte in buffer */
27966 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27967 /* seek to end of file - one past last data byte in file */
27968 
27969 
27970 /* get number of bytes between current char and specified char */
27971 
27972 
27973 
27974 /* put string to current character and increment */
27975 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27976 /* put fixed number of bytes to current character and increment */
27977 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27978 /* put format one arg to current character and increment */
27979 
27980 
27981 
27982 
27983 
27984 
27985 
27986 struct dm_buf {
27987  char *text_buffer; /* start of allocated buffer */
27988  int offset; /* number of bytes into the text_buffer */
27989  int allocation; /* size of buffer in bytes */
27990 };
27991 
27992 /* This structure is used to hold a dynamically growing string */
27993 
27994 struct dstr {
27995  char *pc;
27996  int len;
27997  int max;
27998 };
27999 
28000 /* setmapmode() defines */
28001 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
28002 /* max length for printed attributes */
28003 
28004 
28005 /*
28006  * These three defines indicate that the prototype file contains a '?'
28007  * meaning do not specify this data in the pkgmap entry.
28008  */
28009 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
28010 /* Settings for network admin defaults */
28011 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
28012 /* package header magic tokens */
28013 
28014 
28015 
28016 /* name of security files */
28017 
28018 
28019 
28020 
28021 
28022 
28023 /*
28024  * The next three mean that no mode, owner or group was specified or that the
28025  * one specified is invalid for some reason. Sometimes this is an error in
28026  * which case it is generally converted to CUR* with a warning. Other times
28027  * it means "look it up" by stating the existing file system object pointred
28028  * to in the prototype file.
28029  */
28030 
28031 
28032 
28033 
28034 /* string comparitor abbreviators */
28035 
28036 
28037 
28038 
28039 
28040 
28041 extern FILE *epopen(char *cmd, char *mode);
28042 extern char **gpkglist(char *dir, char **pkg, char **catg);
28043 extern int is_not_valid_length(char **category);
28044 extern int is_not_valid_category(char **category, char *progname);
28045 extern int is_same_CATEGORY(char **category, char *installed_category);
28046 extern char **get_categories(char *catg_arg);
28047 
28048 extern void pkglist_cont(char *keyword);
28049 extern char **pkgalias(char *pkg);
28050 extern char *get_prog_name(void);
28051 extern char *set_prog_name(char *name);
28052 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
28053 extern int ckparam(char *param, char *value);
28054 extern int ckvolseq(char *dir, int part, int nparts);
28055 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
28056    int allow_checksum);
28057 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
28058 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
28059       struct cinfo *cinfo);
28060 extern char *getErrbufAddr(void);
28061 extern int getErrbufSize(void);
28062 extern char *getErrstr(void);
28063 extern void setErrstr(char *errstr);
28064 extern int devtype(char *alias, struct pkgdev *devp);
28065 extern int ds_totread; /* total number of parts read */
28066 extern int ds_close(int pkgendflg);
28067 extern int ds_findpkg(char *device, char *pkg);
28068 extern int ds_getinfo(char *string);
28069 extern int ds_getpkg(char *device, int n, char *dstdir);
28070 extern int ds_ginit(char *device);
28071 extern boolean_t ds_fd_open(void);
28072 extern int ds_init(char *device, char **pkg, char *norewind);
28073 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
28074 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
28075 extern int BIO_dump_cmd(char *cmd, BIO *bio);
28076 extern int ds_next(char *, char *);
28077 extern int ds_readbuf(char *device);
28078 extern int epclose(FILE *pp);
28079 extern int esystem(char *cmd, int ifd, int ofd);
28080 extern int e_ExecCmdArray(int *r_status, char **r_results,
28081    char *a_inputFile, char *a_cmd, char **a_args);
28082 extern int e_ExecCmdList(int *r_status, char **r_results,
28083    char *a_inputFile, char *a_cmd, ...);
28084 extern int gpkgmap(struct cfent *ept, FILE *fp);
28085 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
28086 extern void setmapmode(int mode_no);
28087 extern int isFdRemote(int a_fd);
28088 extern int isFstypeRemote(char *a_fstype);
28089 extern int isPathRemote(char *a_path);
28090 extern int iscpio(char *path, int *iscomp);
28091 extern int isdir(char *path);
28092 extern int isfile(char *dir, char *file);
28093 extern int fmkdir(char *a_path, int a_mode);
28094 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
28095    ...);
28096 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
28097    char *arg[]);
28098 extern int pkghead(char *device);
28099 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
28100    int getvolflg);
28101 extern int pkgtrans(char *device1, char *device2, char **pkg,
28102    int options, keystore_handle_t, char *);
28103 extern int pkgumount(struct pkgdev *devp);
28104 extern int ppkgmap(struct cfent *ept, FILE *fp);
28105 extern int putcfile(struct cfent *ept, FILE *fp);
28106 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
28107 extern int rrmdir(char *path);
28108 extern void set_memalloc_failure_func(void (*)(int));
28109 extern void *xmalloc(size_t size);
28110 extern void *xrealloc(void *ptr, size_t size);
28111 extern char *xstrdup(char *str);
28112 extern void set_passphrase_prompt(char *);
28113 extern void set_passphrase_passarg(char *);
28114 extern int pkg_passphrase_cb(char *, int, int, void *);
28115 
28116 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
28117 extern struct group *cgrgid(gid_t gid);
28118 extern struct group *cgrnam(char *nam);
28119 extern struct passwd *cpwnam(char *nam);
28120 extern struct passwd *cpwuid(uid_t uid);
28121 extern struct group *clgrgid(gid_t gid);
28122 extern struct group *clgrnam(char *nam);
28123 extern struct passwd *clpwnam(char *nam);
28124 extern struct passwd *clpwuid(uid_t uid);
28125 extern void basepath(char *path, char *basedir, char *ir);
28126 extern void canonize(char *file);
28127 extern void canonize_slashes(char *file);
28128 extern void checksum_off(void);
28129 extern void checksum_on(void);
28130 extern void cvtpath(char *path, char *copy);
28131 extern void ds_order(char *list[]);
28132 extern void ds_putinfo(char *buf, size_t);
28133 extern void ds_skiptoend(char *device);
28134 extern void ecleanup(void);
28135 /*PRINTFLIKE1*/
28136 extern void logerr(char *fmt, ...);
28137 extern int mappath(int flag, char *path);
28138 extern int mapvar(int flag, char *varname);
28139 /*PRINTFLIKE1*/
28140 extern void progerr(char *fmt, ...);
28141 extern void pkgerr(PKG_ERR *);
28142 extern void rpterr(void);
28143 extern void tputcfent(struct cfent *ept, FILE *fp);
28144 extern void set_nonABI_symlinks(void);
28145 extern int nonABI_symlinks(void);
28146 extern void disable_attribute_check(void);
28147 extern int get_disable_attribute_check(void);
28148 
28149 /* security.c */
28150 extern void sec_init(void);
28151 extern char *get_subject_display_name(X509 *);
28152 extern char *get_issuer_display_name(X509 *);
28153 extern char *get_serial_num(X509 *);
28154 extern char *get_fingerprint(X509 *, const EVP_MD *);
28155 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
28156     struct stack_st_X509 *, struct stack_st_X509 **);
28157 
28158 /* pkgstr.c */
28159 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
28160    char *a_buf, int a_bufLen);
28161 char *pkgstrConvertPathToBasename(char *a_path);
28162 char *pkgstrConvertPathToDirname(char *a_path);
28163 char *pkgstrDup(char *a_str);
28164 char *pkgstrLocatePathBasename(char *a_path);
28165 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
28166 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
28167 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
28168    char *a_separators);
28169 void pkgstrExpandTokens(char **a_old, char *a_string,
28170    char a_separator, char *a_separators);
28171 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
28172    char *a_separators);
28173 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
28174    char *a_separators, char *a_buf, int a_bufLen);
28175 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
28176 char *pkgstrPrintf(char *a_format, ...);
28177 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
28178 void pkgstrRemoveToken(char **r_string, char *a_token,
28179    char *a_separators, int a_index);
28180 void pkgstrRemoveLeadingWhitespace(char **a_str);
28181 /* vfpops.c */
28182 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
28183    char *a_path);
28184 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
28185    char *a_mode, VFPFLAGS_T a_flags);
28186 extern int vfpClearModified(VFP_T *a_vfp);
28187 extern int vfpClose(VFP_T **r_vfp);
28188 extern int vfpGetModified(VFP_T *a_vfp);
28189 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
28190    VFPFLAGS_T a_flags);
28191 extern void vfpRewind(VFP_T *a_vfp);
28192 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
28193    size_t a_nbyte, off_t a_offset);
28194 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
28195 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
28196 extern int vfpSetModified(VFP_T *a_vfp);
28197 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
28198 extern void vfpTruncate(VFP_T *a_vfp);
28199 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
28200 
28201 /* handlelocalfs.c */
28202 boolean_t enable_local_fs(void);
28203 boolean_t restore_local_fs(void);
28204 
28205 /* pkgserv.c */
28206 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
28207 extern void pkgcloseserver(PKGserver);
28208 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
28209     int *);
28210 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
28211 extern int pkgsync(const char *, const char *, boolean_t);
28212 extern int pkgservercommitfile(VFP_T *, PKGserver);
28213 extern int pkgopenfilter(PKGserver server, const char *pkginst);
28214 extern void pkgclosefilter(PKGserver);
28215 extern char *pkggetentry(PKGserver, int *, int *);
28216 extern char *pkggetentry_named(PKGserver, const char *, int *,
28217     int *);
28218 extern void pkgserversetmode(start_mode_t);
28219 extern start_mode_t pkgservergetmode(void);
28220 extern start_mode_t pkgparsemode(const char *);
28221 extern char *pkgmodeargument(start_mode_t);
28222 # 44 "check.c" 2
28223 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
28224 /*
28225  * CDDL HEADER START
28226  *
28227  * The contents of this file are subject to the terms of the
28228  * Common Development and Distribution License (the "License").
28229  * You may not use this file except in compliance with the License.
28230  *
28231  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28232  * or http://www.opensolaris.org/os/licensing.
28233  * See the License for the specific language governing permissions
28234  * and limitations under the License.
28235  *
28236  * When distributing Covered Code, include this CDDL HEADER in each
28237  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28238  * If applicable, add the following below this CDDL HEADER, with the
28239  * fields enclosed by brackets "[]" replaced with your own identifying
28240  * information: Portions Copyright [yyyy] [name of copyright owner]
28241  *
28242  * CDDL HEADER END
28243  */
28244 
28245 /*
28246  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28247  * Use is subject to license terms.
28248  */
28249 
28250 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28251 /* All Rights Reserved */
28252 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
28253 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28254 /*
28255  * CDDL HEADER START
28256  *
28257  * The contents of this file are subject to the terms of the
28258  * Common Development and Distribution License (the "License").
28259  * You may not use this file except in compliance with the License.
28260  *
28261  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28262  * or http://www.opensolaris.org/os/licensing.
28263  * See the License for the specific language governing permissions
28264  * and limitations under the License.
28265  *
28266  * When distributing Covered Code, include this CDDL HEADER in each
28267  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28268  * If applicable, add the following below this CDDL HEADER, with the
28269  * fields enclosed by brackets "[]" replaced with your own identifying
28270  * information: Portions Copyright [yyyy] [name of copyright owner]
28271  *
28272  * CDDL HEADER END
28273  */
28274 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28275 /*	  All Rights Reserved  	*/
28276 
28277 
28278 /*
28279  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28280  * Use is subject to license terms.
28281  *
28282  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28283  * Copyright 2016 Joyent, Inc.
28284  */
28285 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
28286 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
28287 /*
28288  * CDDL HEADER START
28289  *
28290  * The contents of this file are subject to the terms of the
28291  * Common Development and Distribution License (the "License").
28292  * You may not use this file except in compliance with the License.
28293  *
28294  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28295  * or http://www.opensolaris.org/os/licensing.
28296  * See the License for the specific language governing permissions
28297  * and limitations under the License.
28298  *
28299  * When distributing Covered Code, include this CDDL HEADER in each
28300  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28301  * If applicable, add the following below this CDDL HEADER, with the
28302  * fields enclosed by brackets "[]" replaced with your own identifying
28303  * information: Portions Copyright [yyyy] [name of copyright owner]
28304  *
28305  * CDDL HEADER END
28306  */
28307 
28308 /*
28309  * Copyright (c) 2013 Gary Mills
28310  *
28311  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28312  * Use is subject to license terms.
28313  */
28314 
28315 /*	Copyright (c) 1988 AT&T	*/
28316 /*	  All Rights Reserved  	*/
28317 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
28318 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
28319 /*
28320  * CDDL HEADER START
28321  *
28322  * The contents of this file are subject to the terms of the
28323  * Common Development and Distribution License (the "License").
28324  * You may not use this file except in compliance with the License.
28325  *
28326  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28327  * or http://www.opensolaris.org/os/licensing.
28328  * See the License for the specific language governing permissions
28329  * and limitations under the License.
28330  *
28331  * When distributing Covered Code, include this CDDL HEADER in each
28332  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28333  * If applicable, add the following below this CDDL HEADER, with the
28334  * fields enclosed by brackets "[]" replaced with your own identifying
28335  * information: Portions Copyright [yyyy] [name of copyright owner]
28336  *
28337  * CDDL HEADER END
28338  */
28339 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28340 /*	  All Rights Reserved  	*/
28341 
28342 /*
28343  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28344  * Use is subject to license terms.
28345  */
28346 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
28347 
28348 /* Settings for procedure scripts */
28349 
28350 
28351 
28352 
28353 
28354 
28355 /* Settings for class action scripts */
28356 
28357 
28358 
28359 
28360 
28361 /* Settings for non-privileged scripts */
28362 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
28363 /* Settings for admin "rscriptalt" option */
28364 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
28365 /* Additional cfent/cfextra codes. */
28366 
28367 
28368 
28369 /* This holds admin file data. */
28370 struct admin {
28371  char *mail;
28372  char *instance;
28373  char *partial;
28374  char *runlevel;
28375  char *idepend;
28376  char *rdepend;
28377  char *space;
28378  char *setuid;
28379  char *conflict;
28380  char *action;
28381  char *networktimeout;
28382  char *networkretries;
28383  char *authentication;
28384  char *keystore;
28385  char *proxy;
28386  char *basedir;
28387  char *rscriptalt;
28388 };
28389 
28390 /*
28391  * This table details the status of all filesystems available to the target
28392  * host.
28393  */
28394 struct fstable {
28395  char *name; /* name of filesystem, (mount point) */
28396  int namlen; /* The length of the name (mountpoint) */
28397  fsblkcnt_t bsize; /* fundamental file system block size */
28398  fsblkcnt_t frsize; /* file system fragment size */
28399  fsblkcnt_t bfree; /* total # of free blocks */
28400  fsblkcnt_t bused; /* total # of used blocks */
28401  fsblkcnt_t ffree; /* total # of free file nodes */
28402  fsblkcnt_t fused; /* total # of used file nodes */
28403  char *fstype; /* type of filesystem - nfs, lo, ... */
28404  char *remote_name; /* client's mounted filesystem */
28405  unsigned writeable:1; /* access permission */
28406  unsigned write_tested:1; /* access permission fully tested */
28407  unsigned remote:1; /* on a remote filesystem */
28408  unsigned mounted:1; /* actually mounted right now */
28409  unsigned srvr_map:1; /* use server_map() */
28410  unsigned cl_mounted:1; /* mounted in client space */
28411  unsigned mnt_failed:1; /* attempt to loopback mount failed */
28412  unsigned served:1; /* filesystem comes from a server */
28413 };
28414 # 45 "check.c" 2
28415 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
28416 /*
28417  * CDDL HEADER START
28418  *
28419  * The contents of this file are subject to the terms of the
28420  * Common Development and Distribution License (the "License").
28421  * You may not use this file except in compliance with the License.
28422  *
28423  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28424  * or http://www.opensolaris.org/os/licensing.
28425  * See the License for the specific language governing permissions
28426  * and limitations under the License.
28427  *
28428  * When distributing Covered Code, include this CDDL HEADER in each
28429  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28430  * If applicable, add the following below this CDDL HEADER, with the
28431  * fields enclosed by brackets "[]" replaced with your own identifying
28432  * information: Portions Copyright [yyyy] [name of copyright owner]
28433  *
28434  * CDDL HEADER END
28435  */
28436 
28437 /*
28438  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
28439  */
28440 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
28441 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
28442 /*
28443  * CDDL HEADER START
28444  *
28445  * The contents of this file are subject to the terms of the
28446  * Common Development and Distribution License (the "License").
28447  * You may not use this file except in compliance with the License.
28448  *
28449  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28450  * or http://www.opensolaris.org/os/licensing.
28451  * See the License for the specific language governing permissions
28452  * and limitations under the License.
28453  *
28454  * When distributing Covered Code, include this CDDL HEADER in each
28455  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28456  * If applicable, add the following below this CDDL HEADER, with the
28457  * fields enclosed by brackets "[]" replaced with your own identifying
28458  * information: Portions Copyright [yyyy] [name of copyright owner]
28459  *
28460  * CDDL HEADER END
28461  */
28462 
28463 /*
28464  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28465  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28466  */
28467 
28468 /*	Copyright (c) 1988 AT&T	*/
28469 /*	  All Rights Reserved  	*/
28470 
28471 /*
28472  * User-visible pieces of the ANSI C standard I/O package.
28473  */
28474 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
28475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
28476 /*
28477  * CDDL HEADER START
28478  *
28479  * The contents of this file are subject to the terms of the
28480  * Common Development and Distribution License (the "License").
28481  * You may not use this file except in compliance with the License.
28482  *
28483  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28484  * or http://www.opensolaris.org/os/licensing.
28485  * See the License for the specific language governing permissions
28486  * and limitations under the License.
28487  *
28488  * When distributing Covered Code, include this CDDL HEADER in each
28489  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28490  * If applicable, add the following below this CDDL HEADER, with the
28491  * fields enclosed by brackets "[]" replaced with your own identifying
28492  * information: Portions Copyright [yyyy] [name of copyright owner]
28493  *
28494  * CDDL HEADER END
28495  */
28496 
28497 /*
28498  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28499  *
28500  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28501  * Use is subject to license terms.
28502  */
28503 
28504 /*	Copyright (c) 1988 AT&T	*/
28505 /*	  All Rights Reserved  	*/
28506 
28507 
28508 
28509 
28510 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28511 /*
28512  * CDDL HEADER START
28513  *
28514  * The contents of this file are subject to the terms of the
28515  * Common Development and Distribution License (the "License").
28516  * You may not use this file except in compliance with the License.
28517  *
28518  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28519  * or http://www.opensolaris.org/os/licensing.
28520  * See the License for the specific language governing permissions
28521  * and limitations under the License.
28522  *
28523  * When distributing Covered Code, include this CDDL HEADER in each
28524  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28525  * If applicable, add the following below this CDDL HEADER, with the
28526  * fields enclosed by brackets "[]" replaced with your own identifying
28527  * information: Portions Copyright [yyyy] [name of copyright owner]
28528  *
28529  * CDDL HEADER END
28530  */
28531 
28532 /*
28533  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28534  * Copyright 2016 Joyent, Inc.
28535  *
28536  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28537  * Use is subject to license terms.
28538  */
28539 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
28540 
28541 
28542 
28543 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28544 /*
28545  * CDDL HEADER START
28546  *
28547  * The contents of this file are subject to the terms of the
28548  * Common Development and Distribution License (the "License").
28549  * You may not use this file except in compliance with the License.
28550  *
28551  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28552  * or http://www.opensolaris.org/os/licensing.
28553  * See the License for the specific language governing permissions
28554  * and limitations under the License.
28555  *
28556  * When distributing Covered Code, include this CDDL HEADER in each
28557  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28558  * If applicable, add the following below this CDDL HEADER, with the
28559  * fields enclosed by brackets "[]" replaced with your own identifying
28560  * information: Portions Copyright [yyyy] [name of copyright owner]
28561  *
28562  * CDDL HEADER END
28563  */
28564 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28565 /*	  All Rights Reserved  	*/
28566 
28567 
28568 /*
28569  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28570  * Use is subject to license terms.
28571  *
28572  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28573  * Copyright 2016 Joyent, Inc.
28574  */
28575 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
28576 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 1
28577 /*
28578  * CDDL HEADER START
28579  *
28580  * The contents of this file are subject to the terms of the
28581  * Common Development and Distribution License (the "License").
28582  * You may not use this file except in compliance with the License.
28583  *
28584  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28585  * or http://www.opensolaris.org/os/licensing.
28586  * See the License for the specific language governing permissions
28587  * and limitations under the License.
28588  *
28589  * When distributing Covered Code, include this CDDL HEADER in each
28590  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28591  * If applicable, add the following below this CDDL HEADER, with the
28592  * fields enclosed by brackets "[]" replaced with your own identifying
28593  * information: Portions Copyright [yyyy] [name of copyright owner]
28594  *
28595  * CDDL HEADER END
28596  */
28597 
28598 /*
28599  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28600  */
28601 
28602 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28603 /*	  All Rights Reserved  	*/
28604 
28605 /*
28606  * University Copyright- Copyright (c) 1982, 1986, 1988
28607  * The Regents of the University of California
28608  * All Rights Reserved
28609  *
28610  * University Acknowledgment- Portions of this document are derived from
28611  * software developed by the University of California, Berkeley, and its
28612  * contributors.
28613  */
28614 
28615 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
28616 /* Copyright 2015, Joyent, Inc. */
28617 
28618 
28619 
28620 
28621 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28622 /*
28623  * CDDL HEADER START
28624  *
28625  * The contents of this file are subject to the terms of the
28626  * Common Development and Distribution License (the "License").
28627  * You may not use this file except in compliance with the License.
28628  *
28629  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28630  * or http://www.opensolaris.org/os/licensing.
28631  * See the License for the specific language governing permissions
28632  * and limitations under the License.
28633  *
28634  * When distributing Covered Code, include this CDDL HEADER in each
28635  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28636  * If applicable, add the following below this CDDL HEADER, with the
28637  * fields enclosed by brackets "[]" replaced with your own identifying
28638  * information: Portions Copyright [yyyy] [name of copyright owner]
28639  *
28640  * CDDL HEADER END
28641  */
28642 
28643 /*
28644  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28645  * Copyright 2016 Joyent, Inc.
28646  *
28647  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28648  * Use is subject to license terms.
28649  */
28650 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
28651 
28652 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28653 /*
28654  * CDDL HEADER START
28655  *
28656  * The contents of this file are subject to the terms of the
28657  * Common Development and Distribution License (the "License").
28658  * You may not use this file except in compliance with the License.
28659  *
28660  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28661  * or http://www.opensolaris.org/os/licensing.
28662  * See the License for the specific language governing permissions
28663  * and limitations under the License.
28664  *
28665  * When distributing Covered Code, include this CDDL HEADER in each
28666  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28667  * If applicable, add the following below this CDDL HEADER, with the
28668  * fields enclosed by brackets "[]" replaced with your own identifying
28669  * information: Portions Copyright [yyyy] [name of copyright owner]
28670  *
28671  * CDDL HEADER END
28672  */
28673 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28674 /*	  All Rights Reserved  	*/
28675 
28676 
28677 /*
28678  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28679  * Use is subject to license terms.
28680  *
28681  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28682  * Copyright 2016 Joyent, Inc.
28683  */
28684 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
28685 
28686 
28687 
28688 
28689 
28690 /*
28691  * Flag values accessible to open(2) and fcntl(2)
28692  * The first five can only be set (exclusively) by open(2).
28693  */
28694 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28695     /* defines read/write file integrity */
28696 
28697 
28698 
28699 
28700 
28701 
28702 /*
28703  * Flag values accessible only to open(2).
28704  */
28705 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28706 /*
28707  * fcntl(2) requests
28708  *
28709  * N.B.: values are not necessarily assigned sequentially below.
28710  */
28711 
28712 
28713 
28714 
28715 
28716 
28717 
28718 /*
28719  * Applications that read /dev/mem must be built like the kernel.  A
28720  * new symbol "_KMEMUSER" is defined for this purpose.
28721  */
28722 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28723      /* EINVAL is fildes matches arg1 */
28724 # 137 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28725 /*
28726  * Numbers 20-22 have been removed and should not be reused.
28727  */
28728 
28729 
28730 
28731 
28732 
28733     /* manager */
28734 
28735 /*
28736  * Commands that refer to flock structures.  The argument types differ between
28737  * the large and small file environments; therefore, the #defined values must
28738  * as well.
28739  * The NBMAND forms are private and should not be used.
28740  * The FLOCK forms are also private and should not be used.
28741  */
28742 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28743 /* ILP32 large file application compilation environment version */
28744 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28745 /*
28746  * transitional large file interface version
28747  * These are only valid in a 32 bit application compiled with large files
28748  * option, for source compatibility, the 64-bit versions are mapped back
28749  * to the native versions.
28750  */
28751 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28752 /*
28753  * File segment locking set data type - information passed to system by user.
28754  */
28755 
28756 /* regular version, for both small and large file compilation environment */
28757 typedef struct flock {
28758  short l_type;
28759  short l_whence;
28760  off_t l_start;
28761  off_t l_len; /* len == 0 means until end of file */
28762  int l_sysid;
28763  pid_t l_pid;
28764  long l_pad[4]; /* reserve area */
28765 } flock_t;
28766 # 264 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28767 /* transitional large file interface version */
28768 
28769 
28770 
28771 typedef struct flock64 {
28772  short l_type;
28773  short l_whence;
28774  off64_t l_start;
28775  off64_t l_len; /* len == 0 means until end of file */
28776  int l_sysid;
28777  pid_t l_pid;
28778  long l_pad[4]; /* reserve area */
28779 } flock64_t;
28780 # 328 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28781 /*
28782  * File segment locking types.
28783  */
28784 
28785 
28786 
28787 
28788 
28789 /*
28790  * POSIX constants
28791  */
28792 
28793 /* Mask for file access modes */
28794 
28795 
28796 
28797 /*
28798  * DIRECTIO
28799  */
28800 
28801 
28802 
28803 
28804 /*
28805  * File share reservation type
28806  */
28807 typedef struct fshare {
28808  short f_access;
28809  short f_deny;
28810  int f_id;
28811 } fshare_t;
28812 
28813 /*
28814  * f_access values
28815  */
28816 
28817 
28818 
28819 
28820 
28821 
28822 /*
28823  * f_deny values
28824  */
28825 # 381 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28826 /*
28827  * Special flags for functions such as openat(), fstatat()....
28828  */
28829 
28830 
28831  /* || defined(_XPG7) */
28832 # 396 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
28833 /* advice for posix_fadvise */
28834 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
28835 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28836 /* large file compilation environment setup */
28837 
28838 
28839 
28840 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28841 #pragma redefine_extname open open64
28842 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28843 
28844 
28845 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28846 #pragma redefine_extname creat creat64
28847 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28848 
28849 
28850 
28851 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28852 #pragma redefine_extname posix_fadvise posix_fadvise64
28853 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28854 
28855 
28856 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28857 #pragma redefine_extname posix_fallocate posix_fallocate64
28858 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28859 
28860 
28861 
28862 
28863 
28864 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28865 #pragma redefine_extname openat openat64
28866 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28867 
28868 
28869 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28870 #pragma redefine_extname attropen attropen64
28871 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28872 # 131 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
28873 extern int fcntl(int, int, ...);
28874 extern int open(const char *, int, ...);
28875 extern int creat(const char *, mode_t);
28876 
28877 extern int posix_fadvise(int, off_t, off_t, int);
28878 extern int posix_fallocate(int, off_t, off_t);
28879 
28880 
28881 
28882 extern int openat(int, const char *, int, ...);
28883 extern int attropen(const char *, const char *, int, ...);
28884 
28885 
28886 extern int directio(int, int);
28887 
28888 
28889 /* transitional large file interface versions */
28890 
28891 
28892 extern int open64(const char *, int, ...);
28893 extern int creat64(const char *, mode_t);
28894 
28895 extern int posix_fadvise64(int, off64_t, off64_t, int);
28896 extern int posix_fallocate64(int, off64_t, off64_t);
28897 
28898 
28899 
28900 extern int openat64(int, const char *, int, ...);
28901 extern int attropen64(const char *, const char *, int, ...);
28902 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
28903 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28904 /*
28905  * CDDL HEADER START
28906  *
28907  * The contents of this file are subject to the terms of the
28908  * Common Development and Distribution License (the "License").
28909  * You may not use this file except in compliance with the License.
28910  *
28911  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28912  * or http://www.opensolaris.org/os/licensing.
28913  * See the License for the specific language governing permissions
28914  * and limitations under the License.
28915  *
28916  * When distributing Covered Code, include this CDDL HEADER in each
28917  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28918  * If applicable, add the following below this CDDL HEADER, with the
28919  * fields enclosed by brackets "[]" replaced with your own identifying
28920  * information: Portions Copyright [yyyy] [name of copyright owner]
28921  *
28922  * CDDL HEADER END
28923  */
28924 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28925 /*	  All Rights Reserved  	*/
28926 
28927 
28928 /*
28929  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28930  * Use is subject to license terms.
28931  *
28932  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28933  * Copyright 2016 Joyent, Inc.
28934  */
28935 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
28936 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
28937 /*
28938  * CDDL HEADER START
28939  *
28940  * The contents of this file are subject to the terms of the
28941  * Common Development and Distribution License (the "License").
28942  * You may not use this file except in compliance with the License.
28943  *
28944  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28945  * or http://www.opensolaris.org/os/licensing.
28946  * See the License for the specific language governing permissions
28947  * and limitations under the License.
28948  *
28949  * When distributing Covered Code, include this CDDL HEADER in each
28950  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28951  * If applicable, add the following below this CDDL HEADER, with the
28952  * fields enclosed by brackets "[]" replaced with your own identifying
28953  * information: Portions Copyright [yyyy] [name of copyright owner]
28954  *
28955  * CDDL HEADER END
28956  */
28957 
28958 /*
28959  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28960  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
28961  */
28962 
28963 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
28964 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
28965 /*	All Rights Reserved	*/
28966 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
28967 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
28968 /*
28969  * CDDL HEADER START
28970  *
28971  * The contents of this file are subject to the terms of the
28972  * Common Development and Distribution License (the "License").
28973  * You may not use this file except in compliance with the License.
28974  *
28975  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28976  * or http://www.opensolaris.org/os/licensing.
28977  * See the License for the specific language governing permissions
28978  * and limitations under the License.
28979  *
28980  * When distributing Covered Code, include this CDDL HEADER in each
28981  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28982  * If applicable, add the following below this CDDL HEADER, with the
28983  * fields enclosed by brackets "[]" replaced with your own identifying
28984  * information: Portions Copyright [yyyy] [name of copyright owner]
28985  *
28986  * CDDL HEADER END
28987  */
28988 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28989 /*	  All Rights Reserved  	*/
28990 
28991 /*
28992  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28993  * Use is subject to license terms.
28994  */
28995 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
28996 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
28997 /*
28998  * CDDL HEADER START
28999  *
29000  * The contents of this file are subject to the terms of the
29001  * Common Development and Distribution License, Version 1.0 only
29002  * (the "License").  You may not use this file except in compliance
29003  * with the License.
29004  *
29005  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29006  * or http://www.opensolaris.org/os/licensing.
29007  * See the License for the specific language governing permissions
29008  * and limitations under the License.
29009  *
29010  * When distributing Covered Code, include this CDDL HEADER in each
29011  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29012  * If applicable, add the following below this CDDL HEADER, with the
29013  * fields enclosed by brackets "[]" replaced with your own identifying
29014  * information: Portions Copyright [yyyy] [name of copyright owner]
29015  *
29016  * CDDL HEADER END
29017  */
29018 /*
29019  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29020  */
29021 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29022 /*	  All Rights Reserved  	*/
29023 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
29024 struct pkginfo {
29025  char *pkginst;
29026  char *name;
29027  char *arch;
29028  char *version;
29029  char *vendor;
29030  char *basedir;
29031  char *catg;
29032  char status;
29033 };
29034 
29035 extern char *pkgdir;
29036 
29037 extern char *pkgparam(char *, char *);
29038 extern int pkginfo(struct pkginfo *, char *, ...),
29039   pkgnmchk(char *, char *, int);
29040 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29041 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
29042 /*
29043  * CDDL HEADER START
29044  *
29045  * The contents of this file are subject to the terms of the
29046  * Common Development and Distribution License (the "License").
29047  * You may not use this file except in compliance with the License.
29048  *
29049  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29050  * or http://www.opensolaris.org/os/licensing.
29051  * See the License for the specific language governing permissions
29052  * and limitations under the License.
29053  *
29054  * When distributing Covered Code, include this CDDL HEADER in each
29055  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29056  * If applicable, add the following below this CDDL HEADER, with the
29057  * fields enclosed by brackets "[]" replaced with your own identifying
29058  * information: Portions Copyright [yyyy] [name of copyright owner]
29059  *
29060  * CDDL HEADER END
29061  */
29062 
29063 /*
29064  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29065  * Use is subject to license terms.
29066  */
29067 
29068 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
29069 /* All Rights Reserved */
29070 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29071 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
29072 /*
29073  * CDDL HEADER START
29074  *
29075  * The contents of this file are subject to the terms of the
29076  * Common Development and Distribution License (the "License").
29077  * You may not use this file except in compliance with the License.
29078  *
29079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29080  * or http://www.opensolaris.org/os/licensing.
29081  * See the License for the specific language governing permissions
29082  * and limitations under the License.
29083  *
29084  * When distributing Covered Code, include this CDDL HEADER in each
29085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29086  * If applicable, add the following below this CDDL HEADER, with the
29087  * fields enclosed by brackets "[]" replaced with your own identifying
29088  * information: Portions Copyright [yyyy] [name of copyright owner]
29089  *
29090  * CDDL HEADER END
29091  */
29092 
29093 /*
29094  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29095  * Use is subject to license terms.
29096  */
29097 # 42 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29098 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
29099 /*
29100  * CDDL HEADER START
29101  *
29102  * The contents of this file are subject to the terms of the
29103  * Common Development and Distribution License (the "License").
29104  * You may not use this file except in compliance with the License.
29105  *
29106  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29107  * or http://www.opensolaris.org/os/licensing.
29108  * See the License for the specific language governing permissions
29109  * and limitations under the License.
29110  *
29111  * When distributing Covered Code, include this CDDL HEADER in each
29112  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29113  * If applicable, add the following below this CDDL HEADER, with the
29114  * fields enclosed by brackets "[]" replaced with your own identifying
29115  * information: Portions Copyright [yyyy] [name of copyright owner]
29116  *
29117  * CDDL HEADER END
29118  */
29119 
29120 /*
29121  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
29122  * Use is subject to license terms.
29123  */
29124 
29125 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
29126 /* All Rights Reserved */
29127 # 43 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29128 
29129 
29130 
29131 
29132 
29133 /* signal handler function definition */
29134 
29135 typedef void (sighdlrFunc_t)(int);
29136 
29137 /* maximum parameter length */
29138 
29139 
29140 
29141 /* flag for check_applicability */
29142 
29143 typedef unsigned long CAF_T;
29144 
29145 /* flags for check_applicability */
29146 
29147 
29148 
29149 
29150 
29151 /* path to the request file in the package directory */
29152 
29153 
29154 
29155 /* path to the copyright file in the package directory */
29156 
29157 
29158 
29159 /* path to the depend file in the package directory */
29160 
29161 
29162 
29163 /*
29164  * name of environment variable set to non-global zone name being installed:
29165  * pkgadd/pkginstall expects this name and passes it on to any scripts that
29166  * are run if it is set.
29167  */
29168 
29169 
29170 
29171 /*
29172  * name of environment variable set to indicate this package should be installed
29173  * in the current zone only - see PSARC/2004/789 - New Pkginfo(4) attributes
29174  * for zones
29175  */
29176 
29177 
29178 
29179 /*
29180  * name of environment variable set to indicate this package should be installed
29181  * in all zones, and only from the global zone - see PSARC/2003/460
29182  */
29183 
29184 
29185 
29186 /*
29187  * name of environment variable set to indicate this package should be installed
29188  * hollow (db update only) when installed in nonglobal zone - see PSARC/2003/460
29189  */
29190 
29191 
29192 
29193 /*
29194  * General purpose return codes used for functions which don't return a basic
29195  * success or failure. For those functions wherein a yes/no result is
29196  * possible, then 1 means OK and 0 means FAIL.
29197  */
29198 
29199 
29200 
29201 
29202 /* These are the file status indicators for the contents file */
29203 # 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
29204 /* control bits for pkgdbmerg() */
29205 
29206 
29207 
29208 /* control bits for file verification by class */
29209 
29210 
29211 
29212 
29213 /* control bit for path type to pass to CAS */
29214 
29215 
29216 
29217 /* findscripts() argument */
29218 
29219 
29220 
29221 struct cl_attr {
29222  char name[64 +1]; /* name of class */
29223  char *inst_script; /* install class action script */
29224  char *rem_script; /* remove class action script */
29225  unsigned src_verify:3; /* source verification level */
29226  unsigned dst_verify:4; /* destination verification level */
29227  unsigned relpath_2_CAS:1; /* CAS gets relative paths */
29228 };
29229 
29230 
29231 
29232 
29233 
29234 
29235 
29236 /* Common quit declaration used across many package commands */
29237 extern void quit(int) __attribute__((__noreturn__));
29238 
29239 
29240 /* listmgr.c */
29241 extern int bl_create (int count_per_block, int struct_size, char *desc);
29242 
29243 extern char *bl_next_avail (int list_handle);
29244 extern char *bl_get_record (int list_handle, int recno);
29245 extern void bl_free (int list_handle);
29246 extern int ar_create (int count_per_block, int struct_size, char *desc);
29247 
29248 extern char **ar_next_avail (int list_handle);
29249 extern char **ar_get_head (int list_handle);
29250 extern int ar_delete (int list_handle, int index);
29251 extern void ar_free (int list_handle);
29252 
29253 /* doulimit.c */
29254 extern int set_ulimit (char *script, char *err_msg);
29255 extern int clr_ulimit (void);
29256 extern int assign_ulimit (char *fslimit);
29257 
29258 /* dryrun.c */
29259 extern void set_continue_not_ok (void);
29260 extern int continue_is_ok (void);
29261 extern int in_dryrun_mode (void);
29262 extern int in_continue_mode (void);
29263 extern void init_dryrunfile (char *dr_dir);
29264 extern void init_contfile (char *cn_dir);
29265 extern void set_dr_exitmsg (char *value);
29266 extern void set_dr_info (int type, int value);
29267 extern void write_dryrun_file (struct cfextra **extlist);
29268 
29269 /* instvol.c */
29270 extern void regfiles_free (void);
29271 
29272 /* lockinst.c */
29273 extern int lockinst (char *util_name, char *pkg_name, char *place);
29274 extern void lockupd (char *place);
29275 extern void unlockinst (void);
29276 
29277 extern char *pathdup (char *s);
29278 extern char *pathalloc (int n);
29279 extern char *fixpath (char *path);
29280 extern char *get_info_basedir (void);
29281 extern char *get_basedir (void);
29282 extern char *get_client_basedir (void);
29283 extern int set_basedirs (int reloc, char *adm_basedir, char *pkginst, int nointeract);
29284 
29285 extern int eval_path (char **server_ptr, char **client_ptr, char **map_ptr, char *path);
29286 
29287 extern int get_orig_offset (void);
29288 extern char *get_inst_root (void);
29289 extern char *get_mount_point (uint32_t n);
29290 extern char *get_remote_path (uint32_t n);
29291 extern void set_env_cbdir (void);
29292 extern int set_inst_root (char *path);
29293 extern void put_path_params (void);
29294 extern int mkpath (char *p);
29295 extern void mkbasedir (int flag, char *path);
29296 extern int is_an_inst_root (void);
29297 extern int is_a_basedir (void);
29298 extern int is_a_cl_basedir (void);
29299 extern int is_relocatable (void);
29300 extern char *orig_path (char *path);
29301 extern char *orig_path_ptr (char *path);
29302 extern char *qreason (int caller, int retcode, int started, int includeZonename);
29303 
29304 extern char *qstrdup (char *s);
29305 extern char *srcpath (char *d, char *p, int part, int nparts);
29306 extern char *trans_srcp_pi (char *local_path);
29307 extern int copyf (char *from, char *to, time_t mytime);
29308 extern int copyFile (int, int, char *, char *, struct stat *, long);
29309 extern int openLocal (char *a_path, int a_oflag, char *a_tmpdir);
29310 extern int dockdeps (char *depfile, int removeFlag, boolean_t a_preinstallCheck);
29311 
29312 extern int finalck (struct cfent *ept, int attrchg, int contchg, boolean_t a_warning);
29313 
29314 
29315 /* dockdeps.c */
29316 extern void setUpdate (void);
29317 extern int isUpdate (void);
29318 
29319 /* mntinfo.c */
29320 extern int get_mntinfo (int map_client, char *vfstab_file);
29321 extern uint32_t fsys (char *path);
29322 extern struct fstable *get_fs_entry (uint32_t n);
29323 extern int mount_client (void);
29324 extern int unmount_client (void);
29325 extern uint32_t resolved_fsys (char *path);
29326 extern char *get_server_host (uint32_t n);
29327 extern char *server_map (char *path, uint32_t fsys_value);
29328 extern int use_srvr_map (char *path, uint32_t *fsys_value);
29329 extern int use_srvr_map_n (uint32_t n);
29330 extern int is_fs_writeable (char *path, uint32_t *fsys_value);
29331 extern int is_remote_fs (char *path, uint32_t *fsys_value);
29332 extern int is_served (char *path, uint32_t *fsys_value);
29333 extern int is_mounted (char *path, uint32_t *fsys_value);
29334 extern int is_fs_writeable_n (uint32_t n);
29335 extern int is_remote_fs_n (uint32_t n);
29336 extern int is_served_n (uint32_t n);
29337 extern int is_mounted_n (uint32_t n);
29338 extern fsblkcnt_t get_blk_size_n (uint32_t n);
29339 extern fsblkcnt_t get_frag_size_n (uint32_t n);
29340 extern fsblkcnt_t get_blk_used_n (uint32_t n);
29341 extern fsblkcnt_t get_blk_free_n (uint32_t n);
29342 extern fsblkcnt_t get_inode_used_n (uint32_t n);
29343 extern fsblkcnt_t get_inode_free_n (uint32_t n);
29344 extern void set_blk_used_n (uint32_t n, fsblkcnt_t value);
29345 extern char *get_source_name_n (uint32_t n);
29346 extern char *get_fs_name_n (uint32_t n);
29347 extern int load_fsentry (struct fstable *fs_entry, char *name, char *fstype, char *remote_name);
29348 
29349 extern int isreloc (char *pkginstdir);
29350 extern int is_local_host (char *hostname);
29351 extern void fs_tab_free (void);
29352 
29353 /* pkgdbmerg.c */
29354 extern int pkgdbmerg (PKGserver server, VFP_T *tmpvfp, struct cfextra **extlist);
29355 
29356 extern int files_installed (void);
29357 
29358 /* ocfile.c */
29359 extern int trunc_tcfile (int fd);
29360 extern int ocfile (PKGserver *serverp, VFP_T **tmpvfp, fsblkcnt_t map_blks);
29361 
29362 extern int swapcfile (PKGserver server, VFP_T **a_tmpvfp, char *pkginst, int dbchg);
29363 
29364 extern int set_cfdir (char *cfdir);
29365 extern int socfile (PKGserver *server, boolean_t quiet);
29366 extern int relslock (void);
29367 extern int pkgWlock (int verbose);
29368 extern int iscfile (void);
29369 extern int vcfile (void);
29370 
29371 extern fsblkcnt_t nblk (fsblkcnt_t size, ulong_t bsize, ulong_t frsize);
29372 
29373 extern struct cfent **procmap (VFP_T *vfp, int mapflag, char *ir);
29374 extern void repl_cfent (struct cfent *new, struct cfent *old);
29375 extern struct cfextra **pkgobjmap (VFP_T *vfp, int mapflag, char *ir);
29376 extern void pkgobjinit (void);
29377 extern int seed_pkgobjmap (struct cfextra *ext_entry, char *path, char *local);
29378 
29379 extern int init_pkgobjspace (void);
29380 
29381 /* eptstat.c */
29382 extern void pinfo_free (void);
29383 extern struct pinfo *eptstat (struct cfent *entry, char *pkg, char c);
29384 
29385 /* echo.c */
29386 /*PRINTFLIKE1*/
29387 extern void echo (char *a_fmt, ...);
29388 /*PRINTFLIKE1*/
29389 extern void echoDebug (char *a_fmt, ...);
29390 extern boolean_t echoGetFlag (void);
29391 extern boolean_t echoDebugGetFlag (void);
29392 extern boolean_t echoSetFlag (boolean_t a_debugFlag);
29393 extern boolean_t echoDebugSetFlag (boolean_t a_debugFlag);
29394 
29395 /* ptext.c */
29396 /*PRINTFLIKE2*/
29397 extern void ptext (FILE *fp, char *fmt, ...);
29398 
29399 /* putparam.c */
29400 extern void putparam (char *param, char *value);
29401 extern void getuserlocale (void);
29402 extern void putuserlocale (void);
29403 extern void putConditionInfo (char *, char *);
29404 
29405 /* setadmin.c */
29406 extern void setadminFile (char *file);
29407 extern char *setadminSetting (char *a_paramName, char *a_paramValue);
29408 
29409 extern char *set_keystore_admin (void);
29410 extern boolean_t get_proxy_port_admin (char **, ushort_t *);
29411 extern boolean_t check_keystore_admin (char **);
29412 extern int web_ck_retries (void);
29413 extern int web_ck_timeout (void);
29414 extern int web_ck_authentication (void);
29415 
29416 /* setlist.c */
29417 extern char *cl_iscript (int idx);
29418 extern char *cl_rscript (int idx);
29419 extern void find_CAS (int CAS_type, char *bin_ptr, char *inst_ptr);
29420 extern int setlist (struct cl_attr ***plist, char *slist);
29421 extern void addlist (struct cl_attr ***plist, char *item);
29422 extern char *cl_nam (int cl_idx);
29423 extern char *flex_device(char *device_name, int dev_ok);
29424 extern int cl_getn (void);
29425 extern int cl_idx (char *cl_nam);
29426 extern void cl_sets (char *slist);
29427 extern void cl_setl (struct cl_attr **cl_lst);
29428 extern void cl_putl (char *parm_name, struct cl_attr **list);
29429 extern int cl_deliscript (int i);
29430 extern unsigned cl_svfy (int i);
29431 extern unsigned cl_dvfy (int i);
29432 extern unsigned cl_pthrel (int i);
29433 
29434 /* passwd.c */
29435 extern int pkg_passphrase_cb (char *, int, int, void *);
29436 extern void set_passarg (char *);
29437 extern void set_prompt (char *);
29438 
29439 /* fixpath.c */
29440 extern void export_client_env(char *);
29441 extern void set_partial_inst(void);
29442 extern int is_partial_inst(void);
29443 extern void set_depend_pkginfo_DB(boolean_t a_setting);
29444 extern boolean_t is_depend_pkginfo_DB(void);
29445 extern void disable_spool_create(void);
29446 extern int is_spool_create(void);
29447 
29448 /* open_package_datastream.c */
29449 extern boolean_t open_package_datastream(int a_argc, char **a_argv,
29450     char *a_spoolto, char *a_device,
29451     int *r_repeat, char **r_idsName,
29452     char *a_tmpdir, struct pkgdev *a_pkgdev,
29453     int a_optind);
29454 
29455 /* setup_temporary_directory.c */
29456 extern boolean_t setup_temporary_directory(char **r_dirname,
29457     char *a_tmpdir, char *a_suffix);
29458 
29459 /* unpack_package_from_stream.c */
29460 extern boolean_t unpack_package_from_stream(char *a_idsName,
29461     char *a_pkginst, char *a_tempDir);
29462 
29463 /* pkgops.c */
29464 
29465 extern boolean_t pkgAddPackageToGzonlyList(char *a_pkgInst,
29466     char *a_rootPath);
29467 extern void pkgAddThisZonePackage(char *a_pkgInst);
29468 extern boolean_t pkgRemovePackageFromGzonlyList(char *a_rootPath,
29469     char *a_pkgInst);
29470 extern FILE *pkgOpenInGzOnlyFile(char *a_rootPath);
29471 extern void pkginfoFree(struct pkginfo **r_info);
29472 extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
29473     char *a_pkgInst);
29474 extern boolean_t pkgIsPkgInGzOnly(char *a_rootPath, char *a_pkgInst);
29475 extern boolean_t pkgIsPkgInGzOnlyFP(FILE *a_fp, char *a_pkgInst);
29476 extern boolean_t pkginfoParamTruth(FILE *a_fp, char *a_param,
29477     char *a_value, boolean_t a_default);
29478 extern int pkgGetPackageList(char ***r_pkgList, char **a_argv,
29479     int a_optind, char *a_categories,
29480     char **a_categoryList, struct pkgdev *a_pkgdev);
29481 extern void pkgLocateHighestInst(char *r_path, int r_pathLen,
29482     char *r_pkgInst, int r_pkgInstLen,
29483     char *a_rootPath, char *a_pkgInst);
29484 extern boolean_t pkgPackageIsThisZone(char *a_pkgInst);
29485 extern char *pkgGetGzOnlyPath(void);
29486 extern boolean_t pkgTestInstalled(char *a_packageName, char *a_rootPath);
29487 
29488 /* depchk.c */
29489 
29490 struct depckErrorRecord {
29491  int ier_numZones;
29492  char *ier_packageName;
29493  char **ier_zones;
29494  char **ier_values;
29495 };
29496 
29497 typedef struct depckErrorRecord depckErrorRecord_t;
29498 
29499 struct depckError {
29500  int er_numEntries;
29501  depckErrorRecord_t *er_theEntries;
29502 };
29503 
29504 typedef struct depckError depckError_t;
29505 
29506 typedef int (depcklFunc_t)(char *a_msg, char *a_pkg);
29507 
29508 /*
29509  * ignore_values:
29510  *	== NULL - record one message for each instance of "name" found
29511  *	== "" - record multiple instances
29512  *	!= "" - record multiple instances if value not in ignore_values
29513  */
29514 
29515 struct depckl_struct {
29516  char *name;
29517  char *ignore_values;
29518  char **err_msg;
29519  depcklFunc_t *depcklFunc;
29520  depckError_t *record;
29521 };
29522 
29523 typedef struct depckl_struct depckl_t;
29524 
29525 extern int depchkReportErrors(depckl_t *depckl);
29526 extern void depchkRecordError(depckError_t *a_erc,
29527     char *a_pkginst, char *a_zoneName,
29528     char *a_value);
29529 
29530 /* log.c */
29531 
29532 /* types of log messages we recognize */
29533 typedef enum {
29534  LOG_MSG_ERR,
29535  LOG_MSG_WRN,
29536  LOG_MSG_INFO,
29537  LOG_MSG_DEBUG
29538 } LogMsgType;
29539 
29540 /*PRINTFLIKE2*/
29541 extern void log_msg(LogMsgType, const char *, ...);
29542 extern void log_set_verbose(boolean_t);
29543 extern boolean_t log_get_verbose(void);
29544 
29545 /*
29546  * typedef for the 'ckreturn' function
29547  */
29548 typedef void (ckreturnFunc_t)(int a_retcode);
29549 
29550 /* sml.c */
29551 
29552 /* null reference to SML_TAG object */
29553 
29554 
29555 
29556 /* null reference to SML_TAG * object */
29557 
29558 
29559 
29560 /* is reference to SML_TAG object valid? */
29561 
29562 
29563 
29564 /* is indirect reference to SML_TAG object valid? */
29565 
29566 
29567 
29568 
29569 /* definitions for sml passed from pkginstall to pkgcond */
29570 # 505 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
29571 typedef struct _sml_tag_struct SML_TAG;
29572 typedef struct _sml_parameter_struct SML_PARAM;
29573 
29574 struct _sml_tag_struct {
29575  char *name; /* tag name */
29576  int params_num; /* # params in *params */
29577  SML_PARAM *params; /* tag parameters */
29578  int tags_num; /* # subtags in *tags */
29579  SML_TAG *tags; /* tag subtags */
29580 };
29581 
29582 struct _sml_parameter_struct {
29583  char *name; /* tag name */
29584  char *value; /* parameters */
29585 };
29586 
29587 SML_TAG *smlAddTag(SML_TAG **r_tag, int a_index,
29588    SML_TAG *a_subTag);
29589 boolean_t smlFstatCompareEq(struct stat *statbuf,
29590     SML_TAG *tag, char *path);
29591 char *smlConvertTagToString(SML_TAG *tag);
29592 /*PRINTFLIKE2*/
29593 void smlDbgPrintTag(SML_TAG *a_tag, char *a_format, ...);
29594 void smlDelTag(SML_TAG *tag, SML_TAG *sub_tag);
29595 void smlDelParam(SML_TAG *tag, char *name);
29596 SML_TAG *smlDup(SML_TAG *tag);
29597 boolean_t smlFindAndDelTag(SML_TAG *tag, char *findTag);
29598 void smlFreeTag(SML_TAG *tag);
29599 char *smlGetElementName(SML_TAG *a_tag);
29600 int smlGetNumParams(SML_TAG *a_tag);
29601 char *smlGetParam(SML_TAG *tag, char *name);
29602 /*PRINTFLIKE2*/
29603 char *smlGetParamF(SML_TAG *tag, char *format, ...);
29604 void smlGetParam_r(SML_TAG *tag, char *name, char *buf,
29605    int bufLen);
29606 char *smlGetParamByTag(SML_TAG *tag, int index,
29607    char *tagName, char *parmName);
29608 char *smlGetParamByTagParam(SML_TAG *tag, int index,
29609    char *tagName, char *parmName, char *parmValue,
29610    char *parmReturn);
29611 char *smlGetParamName(SML_TAG *tag, int index);
29612 SML_TAG *smlGetTag(SML_TAG *tag, int index);
29613 SML_TAG *smlGetTagByName(SML_TAG *tag, int index, char *name);
29614 SML_TAG *smlGetTagByTagParam(SML_TAG *tag, int index,
29615    char *tagName, char *paramName, char *paramValue);
29616 boolean_t smlGetVerbose(void);
29617 int smlLoadTagFromFile(SML_TAG **r_tag, char *a_fileName);
29618 SML_TAG *smlNewTag(char *name);
29619 boolean_t smlParamEq(SML_TAG *tag, char *findTag,
29620    char *findParam, char *str);
29621 /*PRINTFLIKE4*/
29622 boolean_t smlParamEqF(SML_TAG *tag, char *findTag, char *findParam,
29623    char *format, ...);
29624 void smlPrintTag(SML_TAG *tag);
29625 int smlReadOneTag(SML_TAG **r_tag, char *a_str);
29626 int smlConvertStringToTag(SML_TAG **r_tag, char *str);
29627 void smlSetFileStatInfo(SML_TAG **tag,
29628     struct stat *statbuf, char *path);
29629 void smlSetParam(SML_TAG *tag, char *name, char *value);
29630 /*PRINTFLIKE3*/
29631 void smlSetParamF(SML_TAG *tag, char *name, char *format, ...);
29632 void smlSetVerbose(boolean_t a_setting);
29633 int smlWriteTagToFd(SML_TAG *tag, int fd);
29634 int smlWriteTagToFile(SML_TAG *tag, char *filename);
29635 /*PRINTFLIKE3*/
29636 void sml_strPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
29637 /*PRINTFLIKE1*/
29638 char *sml_strPrintf(char *a_format, ...);
29639 char *sml_XmlEncodeString(char *a_plainTextString);
29640 char *sml_XmlDecodeString(char *a_xmlEncodedString);
29641 # 46 "check.c" 2
29642 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 1
29643 /*
29644  * CDDL HEADER START
29645  *
29646  * The contents of this file are subject to the terms of the
29647  * Common Development and Distribution License (the "License").
29648  * You may not use this file except in compliance with the License.
29649  *
29650  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29651  * or http://www.opensolaris.org/os/licensing.
29652  * See the License for the specific language governing permissions
29653  * and limitations under the License.
29654  *
29655  * When distributing Covered Code, include this CDDL HEADER in each
29656  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29657  * If applicable, add the following below this CDDL HEADER, with the
29658  * fields enclosed by brackets "[]" replaced with your own identifying
29659  * information: Portions Copyright [yyyy] [name of copyright owner]
29660  *
29661  * CDDL HEADER END
29662  */
29663 
29664 /*
29665  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
29666  * Use is subject to license terms.
29667  */
29668 
29669 
29670 
29671 
29672 
29673 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
29674 /*
29675  * CDDL HEADER START
29676  *
29677  * The contents of this file are subject to the terms of the
29678  * Common Development and Distribution License (the "License").
29679  * You may not use this file except in compliance with the License.
29680  *
29681  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29682  * or http://www.opensolaris.org/os/licensing.
29683  * See the License for the specific language governing permissions
29684  * and limitations under the License.
29685  *
29686  * When distributing Covered Code, include this CDDL HEADER in each
29687  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29688  * If applicable, add the following below this CDDL HEADER, with the
29689  * fields enclosed by brackets "[]" replaced with your own identifying
29690  * information: Portions Copyright [yyyy] [name of copyright owner]
29691  *
29692  * CDDL HEADER END
29693  */
29694 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29695 /*	  All Rights Reserved  	*/
29696 
29697 
29698 /*
29699  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29700  * Use is subject to license terms.
29701  *
29702  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
29703  * Copyright 2016 Joyent, Inc.
29704  */
29705 # 32 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
29706 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 1
29707 /*
29708  * CDDL HEADER START
29709  *
29710  * The contents of this file are subject to the terms of the
29711  * Common Development and Distribution License (the "License").
29712  * You may not use this file except in compliance with the License.
29713  *
29714  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29715  * or http://www.opensolaris.org/os/licensing.
29716  * See the License for the specific language governing permissions
29717  * and limitations under the License.
29718  *
29719  * When distributing Covered Code, include this CDDL HEADER in each
29720  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29721  * If applicable, add the following below this CDDL HEADER, with the
29722  * fields enclosed by brackets "[]" replaced with your own identifying
29723  * information: Portions Copyright [yyyy] [name of copyright owner]
29724  *
29725  * CDDL HEADER END
29726  */
29727 
29728 /*
29729  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29730  *
29731  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29732  * Use is subject to license terms.
29733  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
29734  * Copyright 2016 Toomas Soome <tsoome@me.com>
29735  */
29736 
29737 
29738 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29739 /*	  All Rights Reserved  	*/
29740 
29741 
29742 
29743 
29744 
29745 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 1
29746 /*
29747  * CDDL HEADER START
29748  *
29749  * The contents of this file are subject to the terms of the
29750  * Common Development and Distribution License (the "License").
29751  * You may not use this file except in compliance with the License.
29752  *
29753  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29754  * or http://www.opensolaris.org/os/licensing.
29755  * See the License for the specific language governing permissions
29756  * and limitations under the License.
29757  *
29758  * When distributing Covered Code, include this CDDL HEADER in each
29759  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29760  * If applicable, add the following below this CDDL HEADER, with the
29761  * fields enclosed by brackets "[]" replaced with your own identifying
29762  * information: Portions Copyright [yyyy] [name of copyright owner]
29763  *
29764  * CDDL HEADER END
29765  */
29766 
29767 /*
29768  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29769  * Use is subject to license terms.
29770  */
29771 
29772 
29773 
29774 
29775 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
29776 /*
29777  * CDDL HEADER START
29778  *
29779  * The contents of this file are subject to the terms of the
29780  * Common Development and Distribution License (the "License").
29781  * You may not use this file except in compliance with the License.
29782  *
29783  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29784  * or http://www.opensolaris.org/os/licensing.
29785  * See the License for the specific language governing permissions
29786  * and limitations under the License.
29787  *
29788  *
29789  * When distributing Covered Code, include this CDDL HEADER in each
29790  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29791  * If applicable, add the following below this CDDL HEADER, with the
29792  * fields enclosed by brackets "[]" replaced with your own identifying
29793  * information: Portions Copyright [yyyy] [name of copyright owner]
29794  *
29795  * CDDL HEADER END
29796  */
29797 
29798 /*
29799  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
29800  * Use is subject to license terms.
29801  * Copyright 2016 Joyent, Inc.
29802  */
29803 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
29804 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
29805 /*
29806  * CDDL HEADER START
29807  *
29808  * The contents of this file are subject to the terms of the
29809  * Common Development and Distribution License (the "License").
29810  * You may not use this file except in compliance with the License.
29811  *
29812  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29813  * or http://www.opensolaris.org/os/licensing.
29814  * See the License for the specific language governing permissions
29815  * and limitations under the License.
29816  *
29817  * When distributing Covered Code, include this CDDL HEADER in each
29818  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29819  * If applicable, add the following below this CDDL HEADER, with the
29820  * fields enclosed by brackets "[]" replaced with your own identifying
29821  * information: Portions Copyright [yyyy] [name of copyright owner]
29822  *
29823  * CDDL HEADER END
29824  */
29825 /*
29826  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
29827  * Use is subject to license terms.
29828  * Copyright 2015 Nexenta Systems, Inc.
29829  */
29830 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
29831 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
29832 /*
29833  * CDDL HEADER START
29834  *
29835  * The contents of this file are subject to the terms of the
29836  * Common Development and Distribution License (the "License").
29837  * You may not use this file except in compliance with the License.
29838  *
29839  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29840  * or http://www.opensolaris.org/os/licensing.
29841  * See the License for the specific language governing permissions
29842  * and limitations under the License.
29843  *
29844  *
29845  * When distributing Covered Code, include this CDDL HEADER in each
29846  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29847  * If applicable, add the following below this CDDL HEADER, with the
29848  * fields enclosed by brackets "[]" replaced with your own identifying
29849  * information: Portions Copyright [yyyy] [name of copyright owner]
29850  *
29851  * CDDL HEADER END
29852  */
29853 
29854 /*
29855  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
29856  * Use is subject to license terms.
29857  * Copyright 2016 Joyent, Inc.
29858  */
29859 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
29860 
29861 
29862 
29863 
29864 
29865 /*
29866  * Miscellaneous defines
29867  */
29868 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
29869 /*
29870  * Reserve two cylinders on SCSI disks.
29871  * One is for the backup disk label and the other is for the deviceid.
29872  *
29873  * IPI disks only reserve one cylinder, but they will go away soon.
29874  * CDROMs do not reserve any cylinders.
29875  */
29876 
29877 
29878 /*
29879  * Format of a Sun disk label.
29880  * Resides in cylinder 0, head 0, sector 0.
29881  *
29882  * sizeof (struct dk_label) should be 512 (the current sector size),
29883  * but should the sector size increase, this structure should remain
29884  * at the beginning of the sector.
29885  */
29886 
29887 
29888 
29889 
29890 
29891 
29892 
29893 typedef daddr_t blkaddr_t;
29894 typedef daddr32_t blkaddr32_t;
29895 
29896 
29897 
29898 /*
29899  * partition headers:  section 1
29900  * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I))
29901  */
29902 struct dk_map {
29903  blkaddr_t dkl_cylno; /* starting cylinder */
29904  blkaddr_t dkl_nblk; /* number of blocks;  if == 0, */
29905      /* partition is undefined */
29906 };
29907 
29908 /*
29909  * partition headers:  section 1
29910  * Fixed size for on-disk dk_label
29911  */
29912 struct dk_map32 {
29913  blkaddr32_t dkl_cylno; /* starting cylinder */
29914  blkaddr32_t dkl_nblk; /* number of blocks;  if == 0, */
29915      /* partition is undefined */
29916 };
29917 
29918 /*
29919  * partition headers:  section 2,
29920  * brought over from AT&T SVr4 vtoc structure.
29921  */
29922 struct dk_map2 {
29923  uint16_t p_tag; /* ID tag of partition */
29924  uint16_t p_flag; /* permission flag */
29925 };
29926 
29927 struct dkl_partition {
29928  uint16_t p_tag; /* ID tag of partition */
29929  uint16_t p_flag; /* permision flags */
29930  blkaddr32_t p_start; /* start sector no of partition */
29931  blkaddr32_t p_size; /* # of blocks in partition */
29932 };
29933 
29934 
29935 /*
29936  * VTOC inclusions from AT&T SVr4
29937  * Fixed sized types for on-disk VTOC
29938  */
29939 
29940 struct dk_vtoc {
29941 
29942  uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */
29943  uint32_t v_sanity; /* to verify vtoc sanity */
29944  uint32_t v_version; /* layout version */
29945  char v_volume[8]; /* volume name */
29946  uint16_t v_sectorsz; /* sector size in bytes */
29947  uint16_t v_nparts; /* number of partitions */
29948  uint32_t v_reserved[10]; /* free space */
29949  struct dkl_partition v_part[16]; /* partition headers */
29950  time32_t timestamp[16]; /* partition timestamp (unsupported) */
29951  char v_asciilabel[128]; /* for compatibility    */
29952 # 154 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
29953 };
29954 
29955 /*
29956  * define the amount of disk label padding needed to make
29957  * the entire structure occupy 512 bytes.
29958  */
29959 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
29960 struct dk_label {
29961 
29962  struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
29963  uint32_t dkl_pcyl; /* # of physical cylinders */
29964  uint32_t dkl_ncyl; /* # of data cylinders */
29965  uint16_t dkl_acyl; /* # of alternate cylinders */
29966  uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
29967  uint32_t dkl_nhead; /* # of heads */
29968  uint32_t dkl_nsect; /* # of data sectors per track */
29969  uint16_t dkl_intrlv; /* interleave factor */
29970  uint16_t dkl_skew; /* skew factor */
29971  uint16_t dkl_apc; /* alternates per cyl (SCSI only)   */
29972  uint16_t dkl_rpm; /* revolutions per minute */
29973  uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
29974  uint16_t dkl_read_reinstruct; /* # sectors to skip, reads  */
29975  uint16_t dkl_extra[4]; /* for compatible expansion */
29976  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 */
29977 # 217 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
29978  uint16_t dkl_magic; /* identifies this label format */
29979  uint16_t dkl_cksum; /* xor checksum of sector */
29980 };
29981 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
29982 struct fk_label { /* DOS floppy label */
29983  uchar_t fkl_type;
29984  uchar_t fkl_magich;
29985  uchar_t fkl_magicl;
29986  uchar_t filler;
29987 };
29988 
29989 /*
29990  * Layout of stored fabricated device id  (on-disk)
29991  */
29992 
29993 
29994 
29995 
29996 
29997 struct dk_devid {
29998  uchar_t dkd_rev_hi; /* revision (MSB) */
29999  uchar_t dkd_rev_lo; /* revision (LSB) */
30000  uchar_t dkd_flags; /* flags (not used yet) */
30001  uchar_t dkd_devid[((512) - ((sizeof (uchar_t) * 7)))]; /* devid stored here */
30002  uchar_t dkd_checksum3; /* checksum (MSB) */
30003  uchar_t dkd_checksum2;
30004  uchar_t dkd_checksum1;
30005  uchar_t dkd_checksum0; /* checksum (LSB) */
30006 };
30007 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 2
30008 
30009 
30010 
30011 
30012 
30013 /*
30014  *	Note:  the VTOC is not implemented fully, nor in the manner
30015  *	that AT&T implements it.  AT&T puts the vtoc structure
30016  *	into a sector, usually the second sector (pdsector is first).
30017  *
30018  *	Sun incorporates the tag, flag, version, and volume vtoc fields into
30019  *	its Disk Label, which already has some vtoc-equivalent fields.
30020  *	Upon reading the vtoc with read_vtoc(), the following exceptions
30021  *	occur:
30022  *		v_bootinfo [all]	returned as zero
30023  *		v_sanity		returned as VTOC_SANE
30024  *						if Disk Label was sane
30025  *		v_sectorsz		returned as 512
30026  *		v_reserved [all]	retunred as zero
30027  *		timestamp [all]		returned as zero
30028  *
30029  *	See  dklabel.h, read_vtoc(), and write_vtoc().
30030  */
30031 
30032 
30033      /* (from dkio.h) */
30034 
30035 
30036 
30037 
30038 
30039 /*
30040  * Partition identification tags
30041  */
30042 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
30043 /* Tags for EFI/GPT labels */
30044 
30045 
30046 
30047 
30048 
30049 
30050 /*
30051  * Partition permission flags
30052  */
30053 
30054 
30055 
30056 /*
30057  * error codes for reading & writing vtoc
30058  */
30059 
30060 
30061 
30062 
30063 
30064 
30065 
30066 struct partition {
30067  ushort_t p_tag; /* ID tag of partition */
30068  ushort_t p_flag; /* permission flags */
30069  daddr_t p_start; /* start sector no of partition */
30070  long p_size; /* # of blocks in partition */
30071 };
30072 
30073 struct vtoc {
30074  unsigned long v_bootinfo[3]; /* info needed by mboot (unsupported) */
30075  unsigned long v_sanity; /* to verify vtoc sanity */
30076  unsigned long v_version; /* layout version */
30077  char v_volume[8]; /* volume name */
30078  ushort_t v_sectorsz; /* sector size in bytes */
30079  ushort_t v_nparts; /* number of partitions */
30080  unsigned long v_reserved[10]; /* free space */
30081  struct partition v_part[16]; /* partition headers */
30082  time_t timestamp[16]; /* partition timestamp (unsupported) */
30083  char v_asciilabel[128]; /* for compatibility */
30084 };
30085 
30086 struct extpartition {
30087  ushort_t p_tag; /* ID tag of partition */
30088  ushort_t p_flag; /* permission flags */
30089  ushort_t p_pad[2];
30090  diskaddr_t p_start; /* start sector no of partition */
30091  diskaddr_t p_size; /* # of blocks in partition */
30092 };
30093 
30094 
30095 struct extvtoc {
30096  uint64_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
30097  uint64_t v_sanity; /* to verify vtoc sanity */
30098  uint64_t v_version; /* layout version */
30099  char v_volume[8]; /* volume name */
30100  ushort_t v_sectorsz; /* sector size in bytes */
30101  ushort_t v_nparts; /* number of partitions */
30102  ushort_t pad[2];
30103  uint64_t v_reserved[10];
30104  struct extpartition v_part[16]; /* partition headers */
30105  uint64_t timestamp[16]; /* partition timestamp (unsupported) */
30106  char v_asciilabel[128]; /* for compatibility */
30107 };
30108 # 334 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
30109 /*
30110  * These defines are the mode parameter for the checksum routines.
30111  */
30112 
30113 
30114 
30115 extern int read_vtoc(int, struct vtoc *);
30116 extern int write_vtoc(int, struct vtoc *);
30117 extern int read_extvtoc(int, struct extvtoc *);
30118 extern int write_extvtoc(int, struct extvtoc *);
30119 # 33 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30120 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
30121 /*
30122  * CDDL HEADER START
30123  *
30124  * The contents of this file are subject to the terms of the
30125  * Common Development and Distribution License (the "License").
30126  * You may not use this file except in compliance with the License.
30127  *
30128  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30129  * or http://www.opensolaris.org/os/licensing.
30130  * See the License for the specific language governing permissions
30131  * and limitations under the License.
30132  *
30133  * When distributing Covered Code, include this CDDL HEADER in each
30134  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30135  * If applicable, add the following below this CDDL HEADER, with the
30136  * fields enclosed by brackets "[]" replaced with your own identifying
30137  * information: Portions Copyright [yyyy] [name of copyright owner]
30138  *
30139  * CDDL HEADER END
30140  */
30141 
30142 /*
30143  * Copyright (c) 2013 Gary Mills
30144  *
30145  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
30146  * Use is subject to license terms.
30147  */
30148 
30149 /*	Copyright (c) 1988 AT&T	*/
30150 /*	  All Rights Reserved  	*/
30151 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30152 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
30153 /*
30154  * CDDL HEADER START
30155  *
30156  * The contents of this file are subject to the terms of the
30157  * Common Development and Distribution License (the "License").
30158  * You may not use this file except in compliance with the License.
30159  *
30160  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30161  * or http://www.opensolaris.org/os/licensing.
30162  * See the License for the specific language governing permissions
30163  * and limitations under the License.
30164  *
30165  * When distributing Covered Code, include this CDDL HEADER in each
30166  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30167  * If applicable, add the following below this CDDL HEADER, with the
30168  * fields enclosed by brackets "[]" replaced with your own identifying
30169  * information: Portions Copyright [yyyy] [name of copyright owner]
30170  *
30171  * CDDL HEADER END
30172  */
30173 
30174 /*
30175  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30176  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
30177  */
30178 
30179 /*	Copyright (c) 1988 AT&T	*/
30180 /*	  All Rights Reserved  	*/
30181 
30182 /*
30183  * User-visible pieces of the ANSI C standard I/O package.
30184  */
30185 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30186 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
30187 /*
30188  * CDDL HEADER START
30189  *
30190  * The contents of this file are subject to the terms of the
30191  * Common Development and Distribution License (the "License").
30192  * You may not use this file except in compliance with the License.
30193  *
30194  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30195  * or http://www.opensolaris.org/os/licensing.
30196  * See the License for the specific language governing permissions
30197  * and limitations under the License.
30198  *
30199  * When distributing Covered Code, include this CDDL HEADER in each
30200  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30201  * If applicable, add the following below this CDDL HEADER, with the
30202  * fields enclosed by brackets "[]" replaced with your own identifying
30203  * information: Portions Copyright [yyyy] [name of copyright owner]
30204  *
30205  * CDDL HEADER END
30206  */
30207 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30208 /*	  All Rights Reserved  	*/
30209 
30210 /*
30211  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30212  * Use is subject to license terms.
30213  */
30214 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30215 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
30216 /*
30217  * CDDL HEADER START
30218  *
30219  * The contents of this file are subject to the terms of the
30220  * Common Development and Distribution License, Version 1.0 only
30221  * (the "License").  You may not use this file except in compliance
30222  * with the License.
30223  *
30224  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30225  * or http://www.opensolaris.org/os/licensing.
30226  * See the License for the specific language governing permissions
30227  * and limitations under the License.
30228  *
30229  * When distributing Covered Code, include this CDDL HEADER in each
30230  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30231  * If applicable, add the following below this CDDL HEADER, with the
30232  * fields enclosed by brackets "[]" replaced with your own identifying
30233  * information: Portions Copyright [yyyy] [name of copyright owner]
30234  *
30235  * CDDL HEADER END
30236  */
30237 /*
30238  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30239  */
30240 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30241 /*	  All Rights Reserved  	*/
30242 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30243 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/valtools.h" 1
30244 /*
30245  * CDDL HEADER START
30246  *
30247  * The contents of this file are subject to the terms of the
30248  * Common Development and Distribution License, Version 1.0 only
30249  * (the "License").  You may not use this file except in compliance
30250  * with the License.
30251  *
30252  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30253  * or http://www.opensolaris.org/os/licensing.
30254  * See the License for the specific language governing permissions
30255  * and limitations under the License.
30256  *
30257  * When distributing Covered Code, include this CDDL HEADER in each
30258  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30259  * If applicable, add the following below this CDDL HEADER, with the
30260  * fields enclosed by brackets "[]" replaced with your own identifying
30261  * information: Portions Copyright [yyyy] [name of copyright owner]
30262  *
30263  * CDDL HEADER END
30264  */
30265 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30266 /*	  All Rights Reserved  	*/
30267 
30268 
30269 
30270 
30271 
30272 #pragma ident "%Z%%M%	%I%	%E% SMI"
30273 
30274 
30275 
30276 
30277 
30278 struct _choice_ {
30279  char *token;
30280  char *text;
30281  struct _choice_ *next;
30282 };
30283 
30284 struct _menu_ {
30285  char *label;
30286  int attr;
30287  short longest;
30288  short nchoices;
30289  struct _choice_
30290   *choice;
30291  char **invis;
30292 };
30293 
30294 typedef struct _menu_ CKMENU;
30295 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30296 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
30297 /*
30298  * CDDL HEADER START
30299  *
30300  * The contents of this file are subject to the terms of the
30301  * Common Development and Distribution License (the "License").
30302  * You may not use this file except in compliance with the License.
30303  *
30304  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30305  * or http://www.opensolaris.org/os/licensing.
30306  * See the License for the specific language governing permissions
30307  * and limitations under the License.
30308  *
30309  * When distributing Covered Code, include this CDDL HEADER in each
30310  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30311  * If applicable, add the following below this CDDL HEADER, with the
30312  * fields enclosed by brackets "[]" replaced with your own identifying
30313  * information: Portions Copyright [yyyy] [name of copyright owner]
30314  *
30315  * CDDL HEADER END
30316  */
30317 
30318 /*
30319  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
30320  * Use is subject to license terms.
30321  */
30322 
30323 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
30324 /* All Rights Reserved */
30325 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
30326 # 47 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h"
30327 /*
30328  * ckdate.c
30329  */
30330 extern int ckdate_err (char *fmt, char *error);
30331 extern int ckdate_hlp (char *fmt, char *help);
30332 extern int ckdate_val (char *fmt, char *input);
30333 extern int ckdate (char *date, char *fmt, char *defstr, char *error, char *help, char *prompt);
30334 
30335 
30336 /*
30337  * ckgid.c
30338  */
30339 extern int ckgid_dsp (void);
30340 extern int ckgid_val (char *grpnm);
30341 extern int ckgrpfile (void);
30342 extern void ckgid_err (int disp, char *error);
30343 extern void ckgid_hlp (int disp, char *help);
30344 extern int ckgid (char *gid, short disp, char *defstr, char *error, char *help, char *prompt);
30345 
30346 
30347 /*
30348  * ckint.c
30349  */
30350 extern int ckint_val (char *value, short base);
30351 extern void ckint_err (short base, char *error);
30352 extern void ckint_hlp (short base, char *help);
30353 extern int ckint (long *intval, short base, char *defstr, char *error, char *help, char *prompt);
30354 
30355 
30356 /*
30357  * ckitem.c
30358  */
30359 extern CKMENU *allocmenu (char *label, int attr);
30360 extern void ckitem_err (CKMENU *menup, char *error);
30361 extern void ckitem_hlp (CKMENU *menup, char *help);
30362 extern int ckitem (CKMENU *menup, char *item[], short max, char *defstr, char *error, char *help, char *prompt);
30363 
30364 
30365 extern int setitem (CKMENU *menup, char *choice);
30366 extern int setinvis (CKMENU *menup, char *choice);
30367 extern void printmenu (CKMENU *menup);
30368 
30369 /*
30370  * ckkeywd.c
30371  */
30372 extern int ckkeywd (char *strval, char *keyword[], char *defstr, char *error, char *help, char *prompt);
30373 
30374 
30375 /*
30376  * ckpath.c
30377  */
30378 extern int ckpath_stx (int pflags);
30379 extern int ckpath_val (char *path, int pflags);
30380 extern void ckpath_err (int pflags, char *error, char *input);
30381 extern void ckpath_hlp (int pflags, char *help);
30382 extern int ckpath (char *pathval, int pflags, char *defstr, char *error, char *help, char *prompt);
30383 
30384 
30385 /*
30386  * ckrange.c
30387  */
30388 extern void ckrange_err (long lower, long upper, int base, char *error);
30389 
30390 extern void ckrange_hlp (long lower, long upper, int base, char *help);
30391 extern int ckrange_val (long lower, long upper, int base, char *input);
30392 
30393 extern int ckrange (long *rngval, long lower, long upper, short base, char *defstr, char *error, char *help, char *prompt);
30394 
30395 
30396 
30397 /*
30398  * ckstr.c
30399  */
30400 extern int ckstr_val (char *regexp[], int length, char *input);
30401 extern void ckstr_err (char *regexp[], int length, char *error, char *input);
30402 
30403 extern void ckstr_hlp (char *regexp[], int length, char *help);
30404 extern int ckstr (char *strval, char *regexp[], int length, char *defstr, char *error, char *help, char *prompt);
30405 
30406 
30407 
30408 /*
30409  * cktime.c
30410  */
30411 extern int cktime_val (char *fmt, char *input);
30412 extern int cktime_err (char *fmt, char *error);
30413 extern int cktime_hlp (char *fmt, char *help);
30414 extern int fmtcheck (char *fmt);
30415 extern int cktime (char *tod, char *fmt, char *defstr, char *error, char *help, char *prompt);
30416 
30417 
30418 /*
30419  * ckuid.c
30420  */
30421 extern int ckuid_dsp (void);
30422 extern int ckuid_val (char *usrnm);
30423 extern int ckpwdfile (void);
30424 extern void ckuid_err (short disp, char *error);
30425 extern void ckuid_hlp (int disp, char *help);
30426 extern int ckuid (char *uid, short disp, char *defstr, char *error, char *help, char *prompt);
30427 
30428 
30429 /*
30430  * ckyorn.c
30431  */
30432 extern int ckyorn_val (char *str);
30433 extern void ckyorn_err (char *error);
30434 extern void ckyorn_hlp (char *help);
30435 extern int ckyorn (char *yorn, char *defstr, char *error, char *help, char *prompt);
30436 
30437 
30438 /*
30439  * devattr.c
30440  */
30441 extern char *devattr (char *device, char *attribute);
30442 
30443 /*
30444  * devreserv.c
30445  */
30446 extern char *_rsvtabpath (void);
30447 extern int _openlkfile (void);
30448 extern int _closelkfile (void);
30449 extern int unreserv (long key, char *device);
30450 extern char **devreserv (long key, char **rsvlst[]);
30451 extern int devfree (long key, char *device);
30452 extern struct reservdev **reservdev (void);
30453 
30454 /*
30455  * devtab.c
30456  */
30457 extern void _setdevtab (void);
30458 extern void _enddevtab (void);
30459 extern char *_devtabpath (void);
30460 extern int _opendevtab (char *mode);
30461 extern int _validalias (char *alias);
30462 extern struct devtabent *_getdevtabent (void);
30463 extern void _freedevtabent (struct devtabent *ent);
30464 extern struct devtabent *_getdevrec (char *device);
30465 
30466 /*
30467  * dgrpent.c
30468  */
30469 extern void _setdgrptab (void);
30470 extern void _enddgrptab (void);
30471 extern char *_dgrptabpath (void);
30472 extern int _opendgrptab (char *mode);
30473 extern struct dgrptabent *_getdgrptabent (void);
30474 extern void _freedgrptabent (struct dgrptabent *ent);
30475 extern struct dgrptabent *_getdgrprec (char *dgroup);
30476 
30477 /*
30478  * fulldevnm.c
30479  */
30480 extern char *getfullblkname (char *cp);
30481 extern char *getfullrawname (char *cp);
30482 
30483 /*
30484  * getdev.c
30485  */
30486 extern char **getdev (char **devices, char **criteria, int options);
30487 
30488 /*
30489  * getdgrp.c
30490  */
30491 extern char **getdgrp (char **dgroups, char **criteria, int options);
30492 
30493 /*
30494  * getinput.c
30495  */
30496 extern int getinput (char *s);
30497 
30498 /*
30499  * getvol.c
30500  */
30501 extern int getvol (char *device, char *label, int options, char *prompt);
30502 
30503 extern int _getvol (char *device, char *label, int options, char *prompt, char *norewind);
30504 
30505 extern void doremovecmd (char *device, int echo);
30506 
30507 /*
30508  * listdev.c
30509  */
30510 extern char **listdev (char *device);
30511 
30512 /*
30513  * listdgrp.c
30514  */
30515 extern char **listdgrp (char *dgroup);
30516 
30517 /*
30518  * memory.c
30519  */
30520 extern long sysmem (void);
30521 extern long asysmem (void);
30522 
30523 /*
30524  * pkginfo.c
30525  */
30526 extern int pkginfo (struct pkginfo *info, char *pkginst, ...);
30527 extern int fpkginfo (struct pkginfo *info, char *pkginst);
30528 extern char *fpkginst (char *pkg, ...);
30529 
30530 /*
30531  * pkgnmchk.c
30532  */
30533 extern int pkgnmchk (register char *pkg, register char *spec, int presvr4flg);
30534 
30535 extern void set_ABI_namelngth (void);
30536 extern int get_ABI_namelngth (void);
30537 
30538 /*
30539  * pkgparam.c
30540  */
30541 extern char *fpkgparam (FILE *fp, char *param);
30542 extern char *pkgparam (char *pkg, char *param);
30543 extern void set_PKGpaths (char *path);
30544 extern char *get_PKGLOC (void);
30545 extern char *get_PKGADM (void);
30546 extern void set_PKGADM(char *newpath);
30547 extern void set_PKGLOC(char *newpath);
30548 
30549 /*
30550  * putdev.c
30551  */
30552 extern int _putdevtabrec (FILE *stream, struct devtabent *rec);
30553 extern int _adddevtabrec (char *alias, char **attrval);
30554 extern int _moddevtabrec (char *device, char **attrval);
30555 extern int _rmdevtabrec (char *device);
30556 extern int _rmdevtabattrs (char *device, char **attributes, char ***notfounds);
30557 
30558 
30559 /*
30560  * putdgrp.c
30561  */
30562 extern int _putdgrptabrec (FILE *stream, struct dgrptabent *rec);
30563 extern int _adddgrptabrec (char *dgrp, char **members);
30564 extern int _rmdgrptabrec (char *dgrp);
30565 extern int _rmdgrpmems (char *dgrp, char **mems, char ***notfounds);
30566 
30567 /*
30568  * puterror.c
30569  */
30570 extern void puterror (FILE *fp, char *defmesg, char *error);
30571 
30572 /*
30573  * puthelp.c
30574  */
30575 extern void puthelp (FILE *fp, char *defmesg, char *help);
30576 
30577 /*
30578  * putprmpt.c
30579  */
30580 extern void putprmpt (FILE *fp, char *prompt, char *choices[], char *defstr);
30581 
30582 
30583 /*
30584  * puttext.c
30585  */
30586 extern int puttext (FILE *fp, char *str, int lmarg, int rmarg);
30587 
30588 /*
30589  * rdwr_vtoc.c
30590  */
30591 extern int read_vtoc (int fd, struct vtoc *vtoc);
30592 extern int write_vtoc (int fd, struct vtoc *vtoc);
30593 # 47 "check.c" 2
30594 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h" 1
30595 /*
30596  * CDDL HEADER START
30597  *
30598  * The contents of this file are subject to the terms of the
30599  * Common Development and Distribution License (the "License").
30600  * You may not use this file except in compliance with the License.
30601  *
30602  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30603  * or http://www.opensolaris.org/os/licensing.
30604  * See the License for the specific language governing permissions
30605  * and limitations under the License.
30606  *
30607  * When distributing Covered Code, include this CDDL HEADER in each
30608  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30609  * If applicable, add the following below this CDDL HEADER, with the
30610  * fields enclosed by brackets "[]" replaced with your own identifying
30611  * information: Portions Copyright [yyyy] [name of copyright owner]
30612  *
30613  * CDDL HEADER END
30614  */
30615 
30616 /*
30617  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
30618  */
30619 
30620 
30621 
30622 
30623 
30624 /*
30625  * Module:	messages
30626  * Group:	pkg commands
30627  * Description: l10n strings for all pkg commands
30628  */
30629 # 44 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30630 /* BEGIN CSTYLED */
30631 
30632 /*
30633  * I18N: these messages are questions asked of the user
30634  */
30635 # 57 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30636 /*
30637  * I18N: these messages are debugging message and are only displayed
30638  * when special debugging output has been enabled - these messages
30639  * will never be displayed during normal product usage
30640  */
30641 # 401 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30642 /*
30643  * I18N: these messages are error messages that can be displayed
30644  * during the normal usage of the products
30645  */
30646 # 675 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30647 /*
30648  * I18N: these messages are help messages that are displayed when the
30649  * user answers a question with "?" - asking for help to be displayed
30650  */
30651 # 852 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30652 /*
30653  * These messages are output by qreason() - they are the "reason"
30654  * for the success/fail of the operation
30655  */
30656 # 980 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30657 /* WITH ZONE NAME */
30658 # 1175 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30659 /*
30660  * I18N: MSG_GZONLY_FILE_HEADER must NOT be translated!
30661  * ----- This message is placed at the beginning of an internal (private)
30662  * ----- database file. The contents of the message is a warning telling
30663  * ----- anyone who examines the contents of the database to not modify the
30664  * ----- database manually (by hand).
30665  * ----- Do NOT change or translate this text!
30666  */
30667 # 1191 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
30668 /* END CSTYLED */
30669 # 48 "check.c" 2
30670 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 1
30671 /*
30672  * CDDL HEADER START
30673  *
30674  * The contents of this file are subject to the terms of the
30675  * Common Development and Distribution License (the "License").
30676  * You may not use this file except in compliance with the License.
30677  *
30678  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30679  * or http://www.opensolaris.org/os/licensing.
30680  * See the License for the specific language governing permissions
30681  * and limitations under the License.
30682  *
30683  * When distributing Covered Code, include this CDDL HEADER in each
30684  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30685  * If applicable, add the following below this CDDL HEADER, with the
30686  * fields enclosed by brackets "[]" replaced with your own identifying
30687  * information: Portions Copyright [yyyy] [name of copyright owner]
30688  *
30689  * CDDL HEADER END
30690  */
30691 
30692 /*
30693  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
30694  */
30695 
30696 
30697 
30698 
30699 
30700 /*
30701  * Module:	instzones_api.h
30702  * Group:	libinstzones
30703  * Description:	This module contains the libinstzones API data structures,
30704  *		constants, and function prototypes.
30705  */
30706 
30707 /*
30708  * required includes
30709  */
30710 
30711 /* System includes */
30712 
30713 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1
30714 /*
30715  * CDDL HEADER START
30716  *
30717  * The contents of this file are subject to the terms of the
30718  * Common Development and Distribution License, Version 1.0 only
30719  * (the "License").  You may not use this file except in compliance
30720  * with the License.
30721  *
30722  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30723  * or http://www.opensolaris.org/os/licensing.
30724  * See the License for the specific language governing permissions
30725  * and limitations under the License.
30726  *
30727  * When distributing Covered Code, include this CDDL HEADER in each
30728  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30729  * If applicable, add the following below this CDDL HEADER, with the
30730  * fields enclosed by brackets "[]" replaced with your own identifying
30731  * information: Portions Copyright [yyyy] [name of copyright owner]
30732  *
30733  * CDDL HEADER END
30734  */
30735 /*	Copyright (c) 1988 AT&T	*/
30736 /*	  All Rights Reserved	*/
30737 
30738 /*
30739  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30740  *
30741  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
30742  * Use is subject to license terms.
30743  */
30744 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
30745 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
30746 /*
30747  * CDDL HEADER START
30748  *
30749  * The contents of this file are subject to the terms of the
30750  * Common Development and Distribution License (the "License").
30751  * You may not use this file except in compliance with the License.
30752  *
30753  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30754  * or http://www.opensolaris.org/os/licensing.
30755  * See the License for the specific language governing permissions
30756  * and limitations under the License.
30757  *
30758  * When distributing Covered Code, include this CDDL HEADER in each
30759  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30760  * If applicable, add the following below this CDDL HEADER, with the
30761  * fields enclosed by brackets "[]" replaced with your own identifying
30762  * information: Portions Copyright [yyyy] [name of copyright owner]
30763  *
30764  * CDDL HEADER END
30765  */
30766 
30767 /*
30768  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30769  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
30770  */
30771 
30772 /*	Copyright (c) 1988 AT&T	*/
30773 /*	  All Rights Reserved  	*/
30774 
30775 /*
30776  * User-visible pieces of the ANSI C standard I/O package.
30777  */
30778 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
30779 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
30780 /*
30781  * CDDL HEADER START
30782  *
30783  * The contents of this file are subject to the terms of the
30784  * Common Development and Distribution License (the "License").
30785  * You may not use this file except in compliance with the License.
30786  *
30787  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30788  * or http://www.opensolaris.org/os/licensing.
30789  * See the License for the specific language governing permissions
30790  * and limitations under the License.
30791  *
30792  * When distributing Covered Code, include this CDDL HEADER in each
30793  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30794  * If applicable, add the following below this CDDL HEADER, with the
30795  * fields enclosed by brackets "[]" replaced with your own identifying
30796  * information: Portions Copyright [yyyy] [name of copyright owner]
30797  *
30798  * CDDL HEADER END
30799  */
30800 
30801 /*
30802  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30803  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
30804  */
30805 
30806 /*	Copyright (c) 1988 AT&T	*/
30807 /*	  All Rights Reserved  	*/
30808 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
30809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/termios.h" 1
30810 /*
30811  * CDDL HEADER START
30812  *
30813  * The contents of this file are subject to the terms of the
30814  * Common Development and Distribution License, Version 1.0 only
30815  * (the "License").  You may not use this file except in compliance
30816  * with the License.
30817  *
30818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30819  * or http://www.opensolaris.org/os/licensing.
30820  * See the License for the specific language governing permissions
30821  * and limitations under the License.
30822  *
30823  * When distributing Covered Code, include this CDDL HEADER in each
30824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30825  * If applicable, add the following below this CDDL HEADER, with the
30826  * fields enclosed by brackets "[]" replaced with your own identifying
30827  * information: Portions Copyright [yyyy] [name of copyright owner]
30828  *
30829  * CDDL HEADER END
30830  */
30831 /*	Copyright (c) 1988 AT&T	*/
30832 /*	  All Rights Reserved  	*/
30833 
30834 
30835 
30836 
30837 
30838 #pragma ident "%Z%%M%	%I%	%E% SMI"
30839 
30840 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 1
30841 /*
30842  * CDDL HEADER START
30843  *
30844  * The contents of this file are subject to the terms of the
30845  * Common Development and Distribution License (the "License").
30846  * You may not use this file except in compliance with the License.
30847  *
30848  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30849  * or http://www.opensolaris.org/os/licensing.
30850  * See the License for the specific language governing permissions
30851  * and limitations under the License.
30852  *
30853  * When distributing Covered Code, include this CDDL HEADER in each
30854  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30855  * If applicable, add the following below this CDDL HEADER, with the
30856  * fields enclosed by brackets "[]" replaced with your own identifying
30857  * information: Portions Copyright [yyyy] [name of copyright owner]
30858  *
30859  * CDDL HEADER END
30860  */
30861 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30862 /*	  All Rights Reserved  	*/
30863 
30864 
30865 /*
30866  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30867  *
30868  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
30869  */
30870 
30871 
30872 
30873 
30874 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
30875 /*
30876  * CDDL HEADER START
30877  *
30878  * The contents of this file are subject to the terms of the
30879  * Common Development and Distribution License (the "License").
30880  * You may not use this file except in compliance with the License.
30881  *
30882  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30883  * or http://www.opensolaris.org/os/licensing.
30884  * See the License for the specific language governing permissions
30885  * and limitations under the License.
30886  *
30887  * When distributing Covered Code, include this CDDL HEADER in each
30888  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30889  * If applicable, add the following below this CDDL HEADER, with the
30890  * fields enclosed by brackets "[]" replaced with your own identifying
30891  * information: Portions Copyright [yyyy] [name of copyright owner]
30892  *
30893  * CDDL HEADER END
30894  */
30895 
30896 /*
30897  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
30898  * Copyright 2016 Joyent, Inc.
30899  *
30900  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
30901  * Use is subject to license terms.
30902  */
30903 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
30904 
30905 
30906 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ttydev.h" 1
30907 /*
30908  * CDDL HEADER START
30909  *
30910  * The contents of this file are subject to the terms of the
30911  * Common Development and Distribution License, Version 1.0 only
30912  * (the "License").  You may not use this file except in compliance
30913  * with the License.
30914  *
30915  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30916  * or http://www.opensolaris.org/os/licensing.
30917  * See the License for the specific language governing permissions
30918  * and limitations under the License.
30919  *
30920  * When distributing Covered Code, include this CDDL HEADER in each
30921  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30922  * If applicable, add the following below this CDDL HEADER, with the
30923  * fields enclosed by brackets "[]" replaced with your own identifying
30924  * information: Portions Copyright [yyyy] [name of copyright owner]
30925  *
30926  * CDDL HEADER END
30927  */
30928 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30929 /*	  All Rights Reserved  	*/
30930 
30931 
30932 
30933 
30934 
30935 #pragma ident "%Z%%M%	%I%	%E% SMI"
30936 
30937 
30938 
30939 
30940 
30941 /*
30942  * Terminal definitions related to underlying hardware.
30943  */
30944 
30945 /*
30946  * Speeds
30947  */
30948 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
30949 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
30950 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30951 /*	  All Rights Reserved  	*/
30952 
30953 
30954 /*
30955  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
30956  * All rights reserved.  The Berkeley software License Agreement
30957  * specifies the terms and conditions for redistribution.
30958  */
30959 
30960 /*
30961  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30962  *
30963  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
30964  * Use is subject to license terms.
30965  *
30966  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
30967  */
30968 
30969 /*
30970  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
30971  */
30972 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
30973 
30974 
30975 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
30976 /*
30977  * CDDL HEADER START
30978  *
30979  * The contents of this file are subject to the terms of the
30980  * Common Development and Distribution License (the "License").
30981  * You may not use this file except in compliance with the License.
30982  *
30983  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30984  * or http://www.opensolaris.org/os/licensing.
30985  * See the License for the specific language governing permissions
30986  * and limitations under the License.
30987  *
30988  * When distributing Covered Code, include this CDDL HEADER in each
30989  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30990  * If applicable, add the following below this CDDL HEADER, with the
30991  * fields enclosed by brackets "[]" replaced with your own identifying
30992  * information: Portions Copyright [yyyy] [name of copyright owner]
30993  *
30994  * CDDL HEADER END
30995  */
30996 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30997 /*	  All Rights Reserved  	*/
30998 
30999 
31000 /*
31001  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31002  * Use is subject to license terms.
31003  *
31004  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31005  * Copyright 2016 Joyent, Inc.
31006  */
31007 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
31008 
31009 
31010 
31011 
31012 
31013 /*
31014  * _POSIX_VDISABLE has been defined in <sys/termios.h> since the
31015  * introduction of the header. The POSIX standard, IEEE Std.
31016  * 1003.1-1988 also required  the existence of _POSIX_VDISABLE in
31017  * this header. Subsequent versions of the IEEE Standard as well
31018  * as the X/Open specifications required that _POSIX_VDISABLE be
31019  * defined in <unistd.h> while still allowing for it's existence
31020  * here. With the introduction of XPG6, _POSIX_VDISABLE can only
31021  * be defined in <unistd.h>.
31022  */
31023 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31024 /* required by termio.h and VCEOF/VCEOL */
31025 
31026 
31027 
31028 
31029 
31030 /* some defines required by POSIX */
31031 
31032 
31033 /*
31034  * types defined by POSIX. These are better off in types.h, but
31035  * the standard says that they have to be in termios.h.
31036  */
31037 typedef unsigned int tcflag_t;
31038 typedef unsigned char cc_t;
31039 typedef unsigned int speed_t;
31040 
31041 /*
31042  * Ioctl control packet
31043  */
31044 struct termios {
31045  tcflag_t c_iflag; /* input modes */
31046  tcflag_t c_oflag; /* output modes */
31047  tcflag_t c_cflag; /* control modes */
31048  tcflag_t c_lflag; /* line discipline modes */
31049  cc_t c_cc[19]; /* control chars */
31050 };
31051 
31052 /*
31053  * POSIX termios functions
31054  * These functions get mapped into ioctls.
31055  */
31056 
31057 
31058 
31059 extern speed_t cfgetospeed(const struct termios *);
31060 extern int cfsetospeed(struct termios *, speed_t);
31061 extern speed_t cfgetispeed(const struct termios *);
31062 extern int cfsetispeed(struct termios *, speed_t);
31063 extern int tcgetattr(int, struct termios *);
31064 extern int tcsetattr(int, int, const struct termios *);
31065 extern int tcsendbreak(int, int);
31066 extern int tcdrain(int);
31067 extern int tcflush(int, int);
31068 extern int tcflow(int, int);
31069 
31070 
31071 
31072 extern pid_t tcgetsid(int);
31073 
31074 
31075 
31076 
31077 
31078 /* control characters */
31079 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31080 /* 17 through 19 reserved for future use */
31081 
31082 /*
31083  * control characters form Xenix termio.h
31084  */
31085 
31086 
31087 
31088 
31089 
31090 
31091 /* S5 default control chars */
31092 /* CINTR, CERASE and CKILL modified to SunOS traditional values */
31093 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31094 /* input modes */
31095 # 209 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31096 /* output modes */
31097 # 255 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31098 /* control modes */
31099 # 281 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31100 /*
31101  * 4.4BSD hardware flow control flags
31102  */
31103 
31104 
31105 
31106 
31107 
31108 /* line discipline 0 modes */
31109 # 327 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31110 /* Slots reserved for 386/XENIX compatibility - keyboard control */
31111 # 343 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31112 /*
31113  * Softcarrier ioctls
31114  */
31115 
31116 
31117 
31118 
31119 /* termios ioctls */
31120 # 363 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31121 /*
31122  * NTP PPS ioctls
31123  */
31124 
31125 
31126 
31127 
31128 /* Argument filled in by TIOCGPPSEV */
31129 struct ppsclockev {
31130  struct timeval tv;
31131  uint_t serial;
31132 };
31133 # 387 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31134 /* termios option flags */
31135 # 398 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31136 /* TIOC ioctls for BSD, ptys, job control and modem control */
31137 
31138 
31139 
31140 
31141 
31142 /* Slots for 386/XENIX compatibility */
31143 /* BSD includes these ioctls in ttold.h */
31144 # 421 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31145 /*
31146  * BSD ioctls that are not the same as XENIX are included here.
31147  * There are also some relevant ioctls from SUN/BSD sys/ttycom.h
31148  * BSD pty ioctls like TIOCPKT are not supported in SVR4.
31149  */
31150 # 449 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31151 /* POSIX job control ioctls */
31152 
31153 
31154 
31155 
31156 
31157 
31158 /* Miscellaneous */
31159 
31160 
31161 /* Modem control */
31162 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31163 /* pseudo-tty */
31164 
31165 
31166 
31167 
31168 
31169 /* Some more 386 xenix stuff */
31170 # 492 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31171 /* Slots for 386 compatibility */
31172 
31173 
31174 
31175 
31176 
31177 
31178 
31179 /*
31180  * These are retained for 386/XENIX compatibility.
31181  */
31182 
31183 
31184 
31185 
31186 
31187 /*
31188  * Returns a non-zero value if there
31189  * are characters in the input queue.
31190  *
31191  * XXX - somebody is confused here.  V7 had no such "ioctl", although XENIX may
31192  * have added it; 4BSD had FIONREAD, which returned the number of characters
31193  * waiting, and was supposed to work on all descriptors (i.e., every driver
31194  * should make a stab at implementing it).
31195  */
31196 
31197 
31198 
31199 /*
31200  * Speeds
31201  */
31202 # 551 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
31203 /* Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ */
31204 struct winsize {
31205  unsigned short ws_row; /* rows, in characters */
31206  unsigned short ws_col; /* columns, in character */
31207  unsigned short ws_xpixel; /* horizontal size, pixels */
31208  unsigned short ws_ypixel; /* vertical size, pixels */
31209 };
31210 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/termios.h" 2
31211 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
31212 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 1
31213 /*
31214  * CDDL HEADER START
31215  *
31216  * The contents of this file are subject to the terms of the
31217  * Common Development and Distribution License (the "License").
31218  * You may not use this file except in compliance with the License.
31219  *
31220  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31221  * or http://www.opensolaris.org/os/licensing.
31222  * See the License for the specific language governing permissions
31223  * and limitations under the License.
31224  *
31225  * When distributing Covered Code, include this CDDL HEADER in each
31226  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31227  * If applicable, add the following below this CDDL HEADER, with the
31228  * fields enclosed by brackets "[]" replaced with your own identifying
31229  * information: Portions Copyright [yyyy] [name of copyright owner]
31230  *
31231  * CDDL HEADER END
31232  */
31233 
31234 /* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. */
31235 /*
31236  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31237  *
31238  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
31239  * Use is subject to license terms.
31240  * Copyright 2015 Joyent, Inc.  All rights reserved.
31241  */
31242 
31243 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
31244 /*	  All Rights Reserved	*/
31245 
31246 /*
31247  * University Copyright- Copyright (c) 1982, 1986, 1988
31248  * The Regents of the University of California
31249  * All Rights Reserved
31250  *
31251  * University Acknowledgment- Portions of this document are derived from
31252  * software developed by the University of California, Berkeley, and its
31253  * contributors.
31254  */
31255 
31256 
31257 
31258 
31259 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
31260 /*
31261  * CDDL HEADER START
31262  *
31263  * The contents of this file are subject to the terms of the
31264  * Common Development and Distribution License (the "License").
31265  * You may not use this file except in compliance with the License.
31266  *
31267  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31268  * or http://www.opensolaris.org/os/licensing.
31269  * See the License for the specific language governing permissions
31270  * and limitations under the License.
31271  *
31272  * When distributing Covered Code, include this CDDL HEADER in each
31273  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31274  * If applicable, add the following below this CDDL HEADER, with the
31275  * fields enclosed by brackets "[]" replaced with your own identifying
31276  * information: Portions Copyright [yyyy] [name of copyright owner]
31277  *
31278  * CDDL HEADER END
31279  */
31280 
31281 /*
31282  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
31283  * Copyright 2016 Joyent, Inc.
31284  *
31285  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
31286  * Use is subject to license terms.
31287  */
31288 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 2
31289 
31290 
31291 
31292 
31293 
31294 
31295 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31296 /*
31297  * CDDL HEADER START
31298  *
31299  * The contents of this file are subject to the terms of the
31300  * Common Development and Distribution License (the "License").
31301  * You may not use this file except in compliance with the License.
31302  *
31303  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31304  * or http://www.opensolaris.org/os/licensing.
31305  * See the License for the specific language governing permissions
31306  * and limitations under the License.
31307  *
31308  * When distributing Covered Code, include this CDDL HEADER in each
31309  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31310  * If applicable, add the following below this CDDL HEADER, with the
31311  * fields enclosed by brackets "[]" replaced with your own identifying
31312  * information: Portions Copyright [yyyy] [name of copyright owner]
31313  *
31314  * CDDL HEADER END
31315  */
31316 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31317 /*	  All Rights Reserved  	*/
31318 
31319 
31320 /*
31321  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31322  * Use is subject to license terms.
31323  *
31324  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31325  * Copyright 2016 Joyent, Inc.
31326  */
31327 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 2
31328 
31329 
31330 /*
31331  * Protections are chosen from these bits, or-ed together.
31332  * Note - not all implementations literally provide all possible
31333  * combinations.  PROT_WRITE is often implemented as (PROT_READ |
31334  * PROT_WRITE) and (PROT_EXECUTE as PROT_READ | PROT_EXECUTE).
31335  * However, no implementation will permit a write to succeed
31336  * where PROT_WRITE has not been set.  Also, no implementation will
31337  * allow any access to succeed where prot is specified as PROT_NONE.
31338  */
31339 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31340 /* sharing types:  must choose either SHARED or PRIVATE */
31341 
31342 
31343 
31344 
31345 /* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */
31346 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31347 /* these flags not yet implemented */
31348 
31349 
31350 
31351 /* these flags are used by memcntl */
31352 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31353 /*
31354  * For the sake of backward object compatibility, we use the _MAP_NEW flag.
31355  * This flag will be automatically or'ed in by the C library for all
31356  * new mmap calls.  Previous binaries with old mmap calls will continue
31357  * to get 0 or -1 for return values.  New mmap calls will get the mapped
31358  * address as the return value if successful and -1 on errors.  By default,
31359  * new mmap calls automatically have the kernel assign the map address
31360  * unless the MAP_FIXED flag is given.
31361  */
31362 
31363 
31364 
31365 
31366 
31367 /* External flags for mmapobj syscall (Exclusive of MAP_* flags above) */
31368 
31369 
31370 
31371 
31372 
31373 /*
31374  * Values for mr_flags field of mmapobj_result_t below.
31375  * The bottom 16 bits are mutually exclusive and thus only one
31376  * of them can be set at a time.  Use MR_GET_TYPE below to check this value.
31377  * The top 16 bits are used for flags which are not mutually exclusive and
31378  * thus more than one of these flags can be set for a given mmapobj_result_t.
31379  *
31380  * MR_PADDING being set indicates that this memory range represents the user
31381  * requested padding.
31382  *
31383  * MR_HDR_ELF being set indicates that the ELF header of the mapped object
31384  * is mapped at mr_addr + mr_offset.
31385  *
31386  * MR_HDR_AOUT being set indicates that the AOUT (4.x) header of the mapped
31387  * object is mapped at mr_addr + mr_offset.
31388  */
31389 
31390 /*
31391  * External flags for mr_flags field below.
31392  */
31393 
31394 
31395 
31396 
31397 /*
31398  * Internal flags for mr_flags field below.
31399  */
31400 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31401 typedef struct mmapobj_result {
31402  caddr_t mr_addr; /* mapping address */
31403  size_t mr_msize; /* mapping size */
31404  size_t mr_fsize; /* file size */
31405  size_t mr_offset; /* offset into file */
31406  uint_t mr_prot; /* the protections provided */
31407  uint_t mr_flags; /* info on the mapping */
31408 } mmapobj_result_t;
31409 # 194 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31410 /*
31411  * large file compilation environment setup
31412  *
31413  * In the LP64 compilation environment, map large file interfaces
31414  * back to native versions where possible.
31415  */
31416 
31417 
31418 
31419 
31420 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31421 #pragma redefine_extname mmap mmap64
31422 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31423 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31424 
31425 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31426 #pragma redefine_extname getpagesizes getpagesizes2
31427 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31428 
31429 
31430 
31431 
31432 
31433 /*
31434  * Except for old binaries mmap() will return the resultant
31435  * address of mapping on success and (caddr_t)-1 on error.
31436  */
31437 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31438 extern caddr_t mmap(caddr_t, size_t, int, int, int, off_t);
31439 extern int munmap(caddr_t, size_t);
31440 extern int mprotect(caddr_t, size_t, int);
31441 extern int msync(caddr_t, size_t, int);
31442 extern int mlock(caddr_t, size_t);
31443 extern int munlock(caddr_t, size_t);
31444 extern int mincore(caddr_t, size_t, char *);
31445 extern int memcntl(caddr_t, size_t, int, caddr_t, int, int);
31446 extern int madvise(caddr_t, size_t, int);
31447 
31448 extern int getpagesizes(size_t *, int);
31449 extern int getpagesizes2(size_t *, int);
31450 extern int mmapobj(int, uint_t, mmapobj_result_t *, uint_t *, void *);
31451 /* guard visibility of uint64_t */
31452 
31453 extern int meminfo(const uint64_t *, int, const uint_t *, int, uint64_t *,
31454  uint_t *);
31455 
31456 
31457 /* transitional large file interface version */
31458 
31459 extern caddr_t mmap64(caddr_t, size_t, int, int, int, off64_t);
31460 
31461 
31462 
31463 
31464 extern int mlockall(int);
31465 extern int munlockall(void);
31466 extern int shm_open(const char *, int, mode_t);
31467 extern int shm_unlink(const char *);
31468 
31469 
31470 
31471 extern int posix_madvise(void *, size_t, int);
31472 
31473 
31474 /* mmap failure value */
31475 
31476 
31477 
31478 
31479 
31480 
31481 
31482 /*
31483  * structure for memcntl hat advise operations.
31484  */
31485 struct memcntl_mha {
31486  uint_t mha_cmd; /* command(s) */
31487  uint_t mha_flags;
31488  size_t mha_pagesize;
31489 };
31490 # 306 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31491 /*
31492  * advice to madvise
31493  *
31494  * Note, if more than 4 bits worth of advice (eg. 16) are specified then
31495  * changes will be necessary to the struct vpage.
31496  */
31497 # 326 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31498 /* advice to posix_madvise */
31499 /* these values must be kept in sync with the MADV_* values, above */
31500 
31501 
31502 
31503 
31504 
31505 
31506 
31507 /* flags to msync */
31508 
31509      /* modified for UNIX98 compliance */
31510 
31511 
31512 
31513 
31514 
31515 /* functions to mctl */
31516 # 353 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31517 /* sub-commands for MC_HAT_ADVISE */
31518 
31519 
31520      /* for last bss adjacent to */
31521      /* brk area and brk area itself */
31522 
31523      /* processes main stack */
31524 
31525 
31526 
31527 
31528 /* flags to mlockall */
31529 
31530 
31531 
31532 
31533 
31534 
31535 /* definitions for meminfosys syscall */
31536 
31537 
31538 
31539 
31540 
31541 /* private structure for meminfo */
31542 typedef struct meminfo {
31543  const uint64_t *mi_inaddr; /* array of input addresses */
31544  const uint_t *mi_info_req; /* array of types of info requested */
31545  uint64_t *mi_outdata; /* array of results are placed */
31546  uint_t *mi_validity; /* array of bitwise result codes */
31547  int mi_info_count; /* number of pieces of info requested */
31548 } meminfo_t;
31549 # 399 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31550 /*
31551  * info_req request type definitions for meminfo
31552  * request types starting with MEMINFO_V are used for Virtual addresses
31553  * and should not be mixed with MEMINFO_PLGRP which is targeted for Physical
31554  * addresses
31555  */
31556 # 415 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
31557 /* maximum number of addresses meminfo() can process at a time */
31558 
31559 
31560 /* maximum number of request types */
31561 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
31562 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
31563 /*
31564  * CDDL HEADER START
31565  *
31566  * The contents of this file are subject to the terms of the
31567  * Common Development and Distribution License (the "License").
31568  * You may not use this file except in compliance with the License.
31569  *
31570  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31571  * or http://www.opensolaris.org/os/licensing.
31572  * See the License for the specific language governing permissions
31573  * and limitations under the License.
31574  *
31575  * When distributing Covered Code, include this CDDL HEADER in each
31576  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31577  * If applicable, add the following below this CDDL HEADER, with the
31578  * fields enclosed by brackets "[]" replaced with your own identifying
31579  * information: Portions Copyright [yyyy] [name of copyright owner]
31580  *
31581  * CDDL HEADER END
31582  */
31583 
31584 /*
31585  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
31586  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
31587  */
31588 
31589 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
31590 /*	  All Rights Reserved  	*/
31591 
31592 /*
31593  * University Copyright- Copyright (c) 1982, 1986, 1988
31594  * The Regents of the University of California
31595  * All Rights Reserved
31596  *
31597  * University Acknowledgment- Portions of this document are derived from
31598  * software developed by the University of California, Berkeley, and its
31599  * contributors.
31600  */
31601 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
31602 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31603 /*
31604  * CDDL HEADER START
31605  *
31606  * The contents of this file are subject to the terms of the
31607  * Common Development and Distribution License (the "License").
31608  * You may not use this file except in compliance with the License.
31609  *
31610  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31611  * or http://www.opensolaris.org/os/licensing.
31612  * See the License for the specific language governing permissions
31613  * and limitations under the License.
31614  *
31615  * When distributing Covered Code, include this CDDL HEADER in each
31616  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31617  * If applicable, add the following below this CDDL HEADER, with the
31618  * fields enclosed by brackets "[]" replaced with your own identifying
31619  * information: Portions Copyright [yyyy] [name of copyright owner]
31620  *
31621  * CDDL HEADER END
31622  */
31623 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31624 /*	  All Rights Reserved  	*/
31625 
31626 
31627 /*
31628  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31629  * Use is subject to license terms.
31630  *
31631  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31632  * Copyright 2016 Joyent, Inc.
31633  */
31634 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
31635 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ioctl.h" 1
31636 /*
31637  * CDDL HEADER START
31638  *
31639  * The contents of this file are subject to the terms of the
31640  * Common Development and Distribution License, Version 1.0 only
31641  * (the "License").  You may not use this file except in compliance
31642  * with the License.
31643  *
31644  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31645  * or http://www.opensolaris.org/os/licensing.
31646  * See the License for the specific language governing permissions
31647  * and limitations under the License.
31648  *
31649  * When distributing Covered Code, include this CDDL HEADER in each
31650  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31651  * If applicable, add the following below this CDDL HEADER, with the
31652  * fields enclosed by brackets "[]" replaced with your own identifying
31653  * information: Portions Copyright [yyyy] [name of copyright owner]
31654  *
31655  * CDDL HEADER END
31656  */
31657 /*
31658  * Copyright 1991 Sun Microsystems, Inc.  All rights reserved.
31659  * Use is subject to license terms.
31660  */
31661 
31662 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31663 /*	  All Rights Reserved  	*/
31664 
31665 
31666 
31667 
31668 #pragma ident "%Z%%M%	%I%	%E% SMI"
31669 
31670 
31671 
31672 
31673 
31674 /*
31675  *	There are some inherent problems in having a single file
31676  *	ioctl.h, with both System V and BSD flags. Introducing
31677  *	BSD flags into this file creates compilation problems
31678  *	with flags such as ECHO, NL1 etc., if termio.h and ioctl.h
31679  *	are included by the same file. Since these two files can
31680  *	be only included by System V applications, /usr/inclule/sys/ioctl.h
31681  *	will be System V mode and all the BSD flags will be turned off
31682  *	using #ifdef BSD_COMP. This file will also exist in
31683  *	/usr/ucbinclude/sys/ioctl.h for BSD applications but without the
31684  *	BSD flags turned off. System V appliactions can use ioctl.h without
31685  *	any changes, System V applications requiring BSD flags should
31686  *	-D BSD_COMP when compiling (and be warned about the common
31687  *	flags between System V and BSD) and BSD applications should
31688  *	use /usr/ucbinclude/sys/ioctl.h.
31689  *
31690  */
31691 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ioctl.h"
31692 /* BSD related defines */
31693 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
31694 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 1
31695 /*
31696  * CDDL HEADER START
31697  *
31698  * The contents of this file are subject to the terms of the
31699  * Common Development and Distribution License (the "License").
31700  * You may not use this file except in compliance with the License.
31701  *
31702  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31703  * or http://www.opensolaris.org/os/licensing.
31704  * See the License for the specific language governing permissions
31705  * and limitations under the License.
31706  *
31707  * When distributing Covered Code, include this CDDL HEADER in each
31708  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31709  * If applicable, add the following below this CDDL HEADER, with the
31710  * fields enclosed by brackets "[]" replaced with your own identifying
31711  * information: Portions Copyright [yyyy] [name of copyright owner]
31712  *
31713  * CDDL HEADER END
31714  */
31715 
31716 /*
31717  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
31718  */
31719 
31720 
31721 
31722 
31723 /*
31724  * Zone configuration header file.
31725  */
31726 
31727 
31728 
31729 
31730 
31731 /* sys/socket.h is required by net/if.h, which has a constant needed here */
31732 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
31733 /*
31734  * CDDL HEADER START
31735  *
31736  * The contents of this file are subject to the terms of the
31737  * Common Development and Distribution License (the "License").
31738  * You may not use this file except in compliance with the License.
31739  *
31740  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31741  * or http://www.opensolaris.org/os/licensing.
31742  * See the License for the specific language governing permissions
31743  * and limitations under the License.
31744  *
31745  * When distributing Covered Code, include this CDDL HEADER in each
31746  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31747  * If applicable, add the following below this CDDL HEADER, with the
31748  * fields enclosed by brackets "[]" replaced with your own identifying
31749  * information: Portions Copyright [yyyy] [name of copyright owner]
31750  *
31751  * CDDL HEADER END
31752  */
31753 
31754 /*
31755  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
31756  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
31757  */
31758 
31759 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
31760 /*	  All Rights Reserved  	*/
31761 
31762 /*
31763  * University Copyright- Copyright (c) 1982, 1986, 1988
31764  * The Regents of the University of California
31765  * All Rights Reserved
31766  *
31767  * University Acknowledgment- Portions of this document are derived from
31768  * software developed by the University of California, Berkeley, and its
31769  * contributors.
31770  */
31771 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
31772 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fstyp.h" 1
31773 /*
31774  * CDDL HEADER START
31775  *
31776  * The contents of this file are subject to the terms of the
31777  * Common Development and Distribution License, Version 1.0 only
31778  * (the "License").  You may not use this file except in compliance
31779  * with the License.
31780  *
31781  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31782  * or http://www.opensolaris.org/os/licensing.
31783  * See the License for the specific language governing permissions
31784  * and limitations under the License.
31785  *
31786  * When distributing Covered Code, include this CDDL HEADER in each
31787  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31788  * If applicable, add the following below this CDDL HEADER, with the
31789  * fields enclosed by brackets "[]" replaced with your own identifying
31790  * information: Portions Copyright [yyyy] [name of copyright owner]
31791  *
31792  * CDDL HEADER END
31793  */
31794 /*
31795  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31796  */
31797 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31798 /*	  All Rights Reserved  	*/
31799 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fstyp.h"
31800 /*
31801  * Opcodes for the sysfs() system call.
31802  */
31803 
31804 
31805 
31806 
31807 
31808 int sysfs(int, ...);
31809 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
31810 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mount.h" 1
31811 /*
31812  * CDDL HEADER START
31813  *
31814  * The contents of this file are subject to the terms of the
31815  * Common Development and Distribution License, Version 1.0 only
31816  * (the "License").  You may not use this file except in compliance
31817  * with the License.
31818  *
31819  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31820  * or http://www.opensolaris.org/os/licensing.
31821  * See the License for the specific language governing permissions
31822  * and limitations under the License.
31823  *
31824  * When distributing Covered Code, include this CDDL HEADER in each
31825  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31826  * If applicable, add the following below this CDDL HEADER, with the
31827  * fields enclosed by brackets "[]" replaced with your own identifying
31828  * information: Portions Copyright [yyyy] [name of copyright owner]
31829  *
31830  * CDDL HEADER END
31831  */
31832 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31833 /*	  All Rights Reserved  	*/
31834 
31835 
31836 /*
31837  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31838  *
31839  * Copyright (c) 1996, 1999 by Sun Microsystems, Inc.
31840  * All rights reserved.
31841  */
31842 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mount.h"
31843 /*
31844  * Flag bits passed to mount(2).
31845  */
31846 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mount.h"
31847 /*
31848  * Additional flag bits that domount() is prepared to interpret, but that
31849  * can't be passed through mount(2).
31850  */
31851 
31852 
31853 
31854 /*
31855  * Mask to sift out flag bits allowable from mount(2).
31856  */
31857 
31858 
31859 
31860 
31861 /*
31862  * Mask to sift out flag bits allowable from umount2(2).
31863  */
31864 
31865 
31866 
31867 /*
31868  * Maximum option string length accepted or returned by mount(2).
31869  */
31870 
31871 
31872 
31873 int mount(const char *, const char *, int, ...);
31874 int umount(const char *);
31875 int umount2(const char *, int);
31876 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
31877 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 1
31878 /*
31879  * CDDL HEADER START
31880  *
31881  * The contents of this file are subject to the terms of the
31882  * Common Development and Distribution License (the "License").
31883  * You may not use this file except in compliance with the License.
31884  *
31885  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31886  * or http://www.opensolaris.org/os/licensing.
31887  * See the License for the specific language governing permissions
31888  * and limitations under the License.
31889  *
31890  * When distributing Covered Code, include this CDDL HEADER in each
31891  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31892  * If applicable, add the following below this CDDL HEADER, with the
31893  * fields enclosed by brackets "[]" replaced with your own identifying
31894  * information: Portions Copyright [yyyy] [name of copyright owner]
31895  *
31896  * CDDL HEADER END
31897  */
31898 /*
31899  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31900  *
31901  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
31902  * Use is subject to license terms.
31903  */
31904 
31905 
31906 
31907 
31908 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 1
31909 /*
31910  * CDDL HEADER START
31911  *
31912  * The contents of this file are subject to the terms of the
31913  * Common Development and Distribution License (the "License").
31914  * You may not use this file except in compliance with the License.
31915  *
31916  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31917  * or http://www.opensolaris.org/os/licensing.
31918  * See the License for the specific language governing permissions
31919  * and limitations under the License.
31920  *
31921  * When distributing Covered Code, include this CDDL HEADER in each
31922  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31923  * If applicable, add the following below this CDDL HEADER, with the
31924  * fields enclosed by brackets "[]" replaced with your own identifying
31925  * information: Portions Copyright [yyyy] [name of copyright owner]
31926  *
31927  * CDDL HEADER END
31928  */
31929 /*
31930  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31931  *
31932  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
31933  */
31934 
31935 
31936 
31937 
31938 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31939 /*
31940  * CDDL HEADER START
31941  *
31942  * The contents of this file are subject to the terms of the
31943  * Common Development and Distribution License (the "License").
31944  * You may not use this file except in compliance with the License.
31945  *
31946  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31947  * or http://www.opensolaris.org/os/licensing.
31948  * See the License for the specific language governing permissions
31949  * and limitations under the License.
31950  *
31951  * When distributing Covered Code, include this CDDL HEADER in each
31952  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31953  * If applicable, add the following below this CDDL HEADER, with the
31954  * fields enclosed by brackets "[]" replaced with your own identifying
31955  * information: Portions Copyright [yyyy] [name of copyright owner]
31956  *
31957  * CDDL HEADER END
31958  */
31959 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31960 /*	  All Rights Reserved  	*/
31961 
31962 
31963 /*
31964  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31965  * Use is subject to license terms.
31966  *
31967  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31968  * Copyright 2016 Joyent, Inc.
31969  */
31970 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
31971 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
31972 /*
31973  * CDDL HEADER START
31974  *
31975  * The contents of this file are subject to the terms of the
31976  * Common Development and Distribution License (the "License").
31977  * You may not use this file except in compliance with the License.
31978  *
31979  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31980  * or http://www.opensolaris.org/os/licensing.
31981  * See the License for the specific language governing permissions
31982  * and limitations under the License.
31983  *
31984  * When distributing Covered Code, include this CDDL HEADER in each
31985  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31986  * If applicable, add the following below this CDDL HEADER, with the
31987  * fields enclosed by brackets "[]" replaced with your own identifying
31988  * information: Portions Copyright [yyyy] [name of copyright owner]
31989  *
31990  * CDDL HEADER END
31991  */
31992 /*
31993  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31994  * Use is subject to license terms.
31995  */
31996 
31997 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
31998 /*	  All Rights Reserved  	*/
31999 
32000 /*
32001  * Portions of this source code were derived from Berkeley 4.3 BSD
32002  * under license from the Regents of the University of California.
32003  */
32004 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
32005 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv_names.h" 1
32006 /*
32007  * CDDL HEADER START
32008  *
32009  * The contents of this file are subject to the terms of the
32010  * Common Development and Distribution License (the "License").
32011  * You may not use this file except in compliance with the License.
32012  *
32013  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32014  * or http://www.opensolaris.org/os/licensing.
32015  * See the License for the specific language governing permissions
32016  * and limitations under the License.
32017  *
32018  * When distributing Covered Code, include this CDDL HEADER in each
32019  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32020  * If applicable, add the following below this CDDL HEADER, with the
32021  * fields enclosed by brackets "[]" replaced with your own identifying
32022  * information: Portions Copyright [yyyy] [name of copyright owner]
32023  *
32024  * CDDL HEADER END
32025  */
32026 /*
32027  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
32028  * Copyright 2015, Joyent, Inc. All rights reserved.
32029  *
32030  * Privilege constant definitions.  Privileges and privilege sets
32031  * are only known by name and should be mapped at runtime.
32032  *
32033  * THIS FILE WAS GENERATED; DO NOT EDIT
32034  */
32035 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv_names.h"
32036 /*
32037  * Privilege names
32038  */
32039 /*
32040  * Allows a process to request critical events without limitation.
32041  * Allows a process to request reliable delivery of all events on
32042  * any event queue.
32043  */
32044 
32045 
32046 /*
32047  * Allows a process to set the service FMRI value of a process
32048  * contract template.
32049  */
32050 
32051 
32052 /*
32053  * Allows a process to observe contract events generated by
32054  * contracts created and owned by users other than the process's
32055  * effective user ID.
32056  * Allows a process to open contract event endpoints belonging to
32057  * contracts created and owned by users other than the process's
32058  * effective user ID.
32059  */
32060 
32061 
32062 /*
32063  * Allow a process to access per-CPU hardware performance counters.
32064  */
32065 
32066 
32067 /*
32068  * Allows DTrace kernel-level tracing.
32069  */
32070 
32071 
32072 /*
32073  * Allows DTrace process-level tracing.
32074  * Allows process-level tracing probes to be placed and enabled in
32075  * processes to which the user has permissions.
32076  */
32077 
32078 
32079 /*
32080  * Allows DTrace user-level tracing.
32081  * Allows use of the syscall and profile DTrace providers to
32082  * examine processes to which the user has permissions.
32083  */
32084 
32085 
32086 /*
32087  * Allows a process to change a file's owner user ID.
32088  * Allows a process to change a file's group ID to one other than
32089  * the process' effective group ID or one of the process'
32090  * supplemental group IDs.
32091  */
32092 
32093 
32094 /*
32095  * Allows a process to give away its files; a process with this
32096  * privilege will run as if {_POSIX_CHOWN_RESTRICTED} is not
32097  * in effect.
32098  */
32099 
32100 
32101 /*
32102  * Allows a process to execute an executable file whose permission
32103  * bits or ACL do not allow the process execute permission.
32104  */
32105 
32106 
32107 /*
32108  * Allows a process to read a file or directory whose permission
32109  * bits or ACL do not allow the process read permission.
32110  */
32111 
32112 
32113 /*
32114  * Allows a process to search a directory whose permission bits or
32115  * ACL do not allow the process search permission.
32116  */
32117 
32118 
32119 /*
32120  * Allows a process to write a file or directory whose permission
32121  * bits or ACL do not allow the process write permission.
32122  * In order to write files owned by uid 0 in the absence of an
32123  * effective uid of 0 ALL privileges are required.
32124  */
32125 
32126 
32127 /*
32128  * Allows a process to set the sensitivity label of a file or
32129  * directory to a sensitivity label that does not dominate the
32130  * existing sensitivity label.
32131  * This privilege is interpreted only if the system is configured
32132  * with Trusted Extensions.
32133  */
32134 
32135 
32136 /*
32137  * Allows a process to set immutable, nounlink or appendonly
32138  * file attributes.
32139  */
32140 
32141 
32142 /*
32143  * Allows a process to create hardlinks to files owned by a uid
32144  * different from the process' effective uid.
32145  */
32146 
32147 
32148 /*
32149  * Allows a process which is not the owner of a file or directory
32150  * to perform the following operations that are normally permitted
32151  * only for the file owner: modify that file's access and
32152  * modification times; remove or rename a file or directory whose
32153  * parent directory has the ``save text image after execution''
32154  * (sticky) bit set; mount a ``namefs'' upon a file; modify
32155  * permission bits or ACL except for the set-uid and set-gid
32156  * bits.
32157  */
32158 
32159 
32160 /*
32161  * Allows a process to read objects in the filesystem.
32162  */
32163 
32164 
32165 /*
32166  * Allows a process to change the ownership of a file or write to
32167  * a file without the set-user-ID and set-group-ID bits being
32168  * cleared.
32169  * Allows a process to set the set-group-ID bit on a file or
32170  * directory whose group is not the process' effective group or
32171  * one of the process' supplemental groups.
32172  * Allows a process to set the set-user-ID bit on a file with
32173  * different ownership in the presence of PRIV_FILE_OWNER.
32174  * Additional restrictions apply when creating or modifying a
32175  * set-uid 0 file.
32176  */
32177 
32178 
32179 /*
32180  * Allows a process to set the sensitivity label of a file or
32181  * directory to a sensitivity label that dominates the existing
32182  * sensitivity label.
32183  * This privilege is interpreted only if the system is configured
32184  * with Trusted Extensions.
32185  */
32186 
32187 
32188 /*
32189  * Allows a process to modify objects in the filesystem.
32190  */
32191 
32192 
32193 /*
32194  * Allows a process to make privileged ioctls to graphics devices.
32195  * Typically only xserver process needs to have this privilege.
32196  * A process with this privilege is also allowed to perform
32197  * privileged graphics device mappings.
32198  */
32199 
32200 
32201 /*
32202  * Allows a process to perform privileged mappings through a
32203  * graphics device.
32204  */
32205 
32206 
32207 /*
32208  * Allows a process to read a System V IPC
32209  * Message Queue, Semaphore Set, or Shared Memory Segment whose
32210  * permission bits do not allow the process read permission.
32211  * Allows a process to read remote shared memory whose
32212  * permission bits do not allow the process read permission.
32213  */
32214 
32215 
32216 /*
32217  * Allows a process to write a System V IPC
32218  * Message Queue, Semaphore Set, or Shared Memory Segment whose
32219  * permission bits do not allow the process write permission.
32220  * Allows a process to read remote shared memory whose
32221  * permission bits do not allow the process write permission.
32222  * Additional restrictions apply if the owner of the object has uid 0
32223  * and the effective uid of the current process is not 0.
32224  */
32225 
32226 
32227 /*
32228  * Allows a process which is not the owner of a System
32229  * V IPC Message Queue, Semaphore Set, or Shared Memory Segment to
32230  * remove, change ownership of, or change permission bits of the
32231  * Message Queue, Semaphore Set, or Shared Memory Segment.
32232  * Additional restrictions apply if the owner of the object has uid 0
32233  * and the effective uid of the current process is not 0.
32234  */
32235 
32236 
32237 /*
32238  * Allows a process to open a TCP, UDP, SDP or SCTP network endpoint.
32239  */
32240 
32241 
32242 /*
32243  * Allow a process to bind to a port that is configured as a
32244  * multi-level port(MLP) for the process's zone. This privilege
32245  * applies to both shared address and zone-specific address MLPs.
32246  * See tnzonecfg(4) from the Trusted Extensions manual pages for
32247  * information on configuring MLP ports.
32248  * This privilege is interpreted only if the system is configured
32249  * with Trusted Extensions.
32250  */
32251 
32252 
32253 /*
32254  * Allows a process to send and receive ICMP packets.
32255  */
32256 
32257 
32258 /*
32259  * Allows a process to set NET_MAC_AWARE process flag by using
32260  * setpflags(2). This privilege also allows a process to set
32261  * SO_MAC_EXEMPT socket option by using setsockopt(3SOCKET).
32262  * The NET_MAC_AWARE process flag and the SO_MAC_EXEMPT socket
32263  * option both allow a local process to communicate with an
32264  * unlabeled peer if the local process' label dominates the
32265  * peer's default label, or if the local process runs in the
32266  * global zone.
32267  * This privilege is interpreted only if the system is configured
32268  * with Trusted Extensions.
32269  */
32270 
32271 
32272 /*
32273  * Allows a process to set SO_MAC_IMPLICIT option by using
32274  * setsockopt(3SOCKET).  This allows a privileged process to
32275  * transmit implicitly-labeled packets to a peer.
32276  * This privilege is interpreted only if the system is configured
32277  * with Trusted Extensions.
32278  */
32279 
32280 
32281 /*
32282  * Allows a process to access /dev/lo0 and the devices in /dev/ipnet/
32283  * while not requiring them to need PRIV_NET_RAWACCESS.
32284  */
32285 
32286 
32287 /*
32288  * Allows a process to bind to a privileged port
32289  * number. The privilege port numbers are 1-1023 (the traditional
32290  * UNIX privileged ports) as well as those ports marked as
32291  * "udp/tcp_extra_priv_ports" with the exception of the ports
32292  * reserved for use by NFS.
32293  */
32294 
32295 
32296 /*
32297  * Allows a process to have direct access to the network layer.
32298  */
32299 
32300 
32301 /*
32302  * Allows a process to generate audit records.
32303  * Allows a process to get its own audit pre-selection information.
32304  */
32305 
32306 
32307 /*
32308  * Allows a process to change its root directory.
32309  */
32310 
32311 
32312 /*
32313  * Allows a process to use high resolution timers.
32314  */
32315 
32316 
32317 /*
32318  * Allows a process to call execve().
32319  */
32320 
32321 
32322 /*
32323  * Allows a process to call fork1()/forkall()/vfork()
32324  */
32325 
32326 
32327 /*
32328  * Allows a process to examine the status of processes other
32329  * than those it can send signals to.  Processes which cannot
32330  * be examined cannot be seen in /proc and appear not to exist.
32331  */
32332 
32333 
32334 /*
32335  * Allows a process to lock pages in physical memory.
32336  */
32337 
32338 
32339 /*
32340  * Allows a process to access physical memory information.
32341  */
32342 
32343 
32344 /*
32345  * Allows a process to send signals to other processes, inspect
32346  * and modify process state to other processes regardless of
32347  * ownership.  When modifying another process, additional
32348  * restrictions apply:  the effective privilege set of the
32349  * attaching process must be a superset of the target process'
32350  * effective, permitted and inheritable sets; the limit set must
32351  * be a superset of the target's limit set; if the target process
32352  * has any uid set to 0 all privilege must be asserted unless the
32353  * effective uid is 0.
32354  * Allows a process to bind arbitrary processes to CPUs.
32355  */
32356 
32357 
32358 /*
32359  * Allows a process to elevate its priority above its current level.
32360  */
32361 
32362 
32363 /*
32364  * Allows all that PRIV_PROC_PRIOUP allows.
32365  * Allows a process to change its scheduling class to any scheduling class,
32366  * including the RT class.
32367  */
32368 
32369 
32370 /*
32371  * Allows a process to send signals or trace processes outside its
32372  * session.
32373  */
32374 
32375 
32376 /*
32377  * Allows a process to set its uids at will.
32378  * Assuming uid 0 requires all privileges to be asserted.
32379  */
32380 
32381 
32382 /*
32383  * Allows a process to assign a new task ID to the calling process.
32384  */
32385 
32386 
32387 /*
32388  * Allows a process to trace or send signals to processes in
32389  * other zones.
32390  */
32391 
32392 
32393 /*
32394  * Allows a process to enable and disable and manage accounting through
32395  * acct(2), getacct(2), putacct(2) and wracct(2).
32396  */
32397 
32398 
32399 /*
32400  * Allows a process to perform system administration tasks such
32401  * as setting node and domain name and specifying nscd and coreadm
32402  * settings.
32403  */
32404 
32405 
32406 /*
32407  * Allows a process to start the (kernel) audit daemon.
32408  * Allows a process to view and set audit state (audit user ID,
32409  * audit terminal ID, audit sessions ID, audit pre-selection mask).
32410  * Allows a process to turn off and on auditing.
32411  * Allows a process to configure the audit parameters (cache and
32412  * queue sizes, event to class mappings, policy options).
32413  */
32414 
32415 
32416 /*
32417  * Allows a process to perform various system configuration tasks.
32418  * Allows a process to add and remove swap devices; when adding a swap
32419  * device, a process must also have sufficient privileges to read from
32420  * and write to the swap device.
32421  */
32422 
32423 
32424 /*
32425  * Allows a process to successfully call a kernel module that
32426  * calls the kernel drv_priv(9F) function to check for allowed
32427  * access.
32428  * Allows a process to open the real console device directly.
32429  * Allows a process to open devices that have been exclusively opened.
32430  */
32431 
32432 
32433 /*
32434  * Allows a process to increase the size of a System V IPC Message
32435  * Queue buffer.
32436  */
32437 
32438 
32439 /*
32440  * Allows a process to unlink and link directories.
32441  */
32442 
32443 
32444 /*
32445  * Allows filesystem specific administrative procedures, such as
32446  * filesystem configuration ioctls, quota calls and creation/deletion
32447  * of snapshots.
32448  * Allows a process to mount and unmount filesystems which would
32449  * otherwise be restricted (i.e., most filesystems except
32450  * namefs).
32451  * A process performing a mount operation needs to have
32452  * appropriate access to the device being mounted (read-write for
32453  * "rw" mounts, read for "ro" mounts).
32454  * A process performing any of the aforementioned
32455  * filesystem operations needs to have read/write/owner
32456  * access to the mount point.
32457  * Only regular files and directories can serve as mount points
32458  * for processes which do not have all zone privileges asserted.
32459  * Unless a process has all zone privileges, the mount(2)
32460  * system call will force the "nosuid" and "restrict" options, the
32461  * latter only for autofs mountpoints.
32462  * Regardless of privileges, a process running in a non-global zone may
32463  * only control mounts performed from within said zone.
32464  * Outside the global zone, the "nodevices" option is always forced.
32465  */
32466 
32467 
32468 /*
32469  * Allows a process to configure IP tunnel links.
32470  */
32471 
32472 
32473 /*
32474  * Allows a process to configure all classes of datalinks, including
32475  * configuration allowed by PRIV_SYS_IPTUN_CONFIG.
32476  */
32477 
32478 
32479 /*
32480  * Allows a process to configure a system's IP interfaces and routes.
32481  * Allows a process to configure network parameters using ndd.
32482  * Allows a process access to otherwise restricted information using ndd.
32483  * Allows a process to configure IPsec.
32484  * Allows a process to pop anchored STREAMs modules with matching zoneid.
32485  */
32486 
32487 
32488 /*
32489  * Allows all that PRIV_SYS_IP_CONFIG, PRIV_SYS_DL_CONFIG, and
32490  * PRIV_SYS_PPP_CONFIG allow.
32491  * Allows a process to push the rpcmod STREAMs module.
32492  * Allows a process to INSERT/REMOVE STREAMs modules on locations other
32493  * than the top of the module stack.
32494  */
32495 
32496 
32497 /*
32498  * Allows a process to perform Sun private NFS specific system calls.
32499  * Allows a process to bind to ports reserved by NFS: ports 2049 (nfs)
32500  * and port 4045 (lockd).
32501  */
32502 
32503 
32504 /*
32505  * Allows a process to create and destroy PPP (sppp) interfaces.
32506  * Allows a process to configure PPP tunnels (sppptun).
32507  */
32508 
32509 
32510 /*
32511  * Allows a process to bind processes to processor sets.
32512  */
32513 
32514 
32515 /*
32516  * Allows all that PRIV_SYS_RES_BIND allows.
32517  * Allows a process to create and delete processor sets, assign
32518  * CPUs to processor sets and override the PSET_NOESCAPE property.
32519  * Allows a process to change the operational status of CPUs in
32520  * the system using p_online(2).
32521  * Allows a process to configure resource pools and to bind
32522  * processes to pools
32523  */
32524 
32525 
32526 /*
32527  * Allows a process to modify the resource limits specified
32528  * by setrlimit(2) and setrctl(2) without restriction.
32529  * Allows a process to exceed the per-user maximum number of
32530  * processes.
32531  * Allows a process to extend or create files on a filesystem that
32532  * has less than minfree space in reserve.
32533  */
32534 
32535 
32536 /*
32537  * Allows a process to access the Sun private SMB kernel module.
32538  * Allows a process to bind to ports reserved by NetBIOS and SMB:
32539  * ports 137 (NBNS), 138 (NetBIOS Datagram Service), 139 (NetBIOS
32540  * Session Service and SMB-over-NBT) and 445 (SMB-over-TCP).
32541  */
32542 
32543 
32544 /*
32545  * Allows a process to successfully call a third party loadable module
32546  * that calls the kernel suser() function to check for allowed access.
32547  * This privilege exists only for third party loadable module
32548  * compatibility and is not used by Solaris proper.
32549  */
32550 
32551 
32552 /*
32553  * Allows a process to manipulate system time using any of the
32554  * appropriate system calls: stime, adjtime, ntp_adjtime and
32555  * the IA specific RTC calls.
32556  */
32557 
32558 
32559 /*
32560  * Allows a process to translate labels that are not dominated
32561  * by the process' sensitivity label to and from an external
32562  * string form.
32563  * This privilege is interpreted only if the system is configured
32564  * with Trusted Extensions.
32565  */
32566 
32567 
32568 /*
32569  * Allows a process to manage virtualized environments such as
32570  * xVM(5).
32571  */
32572 
32573 
32574 /*
32575  * Allows a process to override colormap restrictions.
32576  * Allows a process to install or remove colormaps.
32577  * Allows a process to retrieve colormap cell entries allocated
32578  * by other processes.
32579  * This privilege is interpreted only if the system is configured
32580  * with Trusted Extensions.
32581  */
32582 
32583 
32584 /*
32585  * Allows a process to configure or destroy resources that are
32586  * permanently retained by the X server.
32587  * Allows a process to use SetScreenSaver to set the screen
32588  * saver timeout value.
32589  * Allows a process to use ChangeHosts to modify the display
32590  * access control list.
32591  * Allows a process to use GrabServer.
32592  * Allows a process to use the SetCloseDownMode request which
32593  * may retain window, pixmap, colormap, property, cursor, font,
32594  * or graphic context resources.
32595  * This privilege is interpreted only if the system is configured
32596  * with Trusted Extensions.
32597  */
32598 
32599 
32600 /*
32601  * Allows a process to read from a window resource that it does
32602  * not own (has a different user ID).
32603  * This privilege is interpreted only if the system is configured
32604  * with Trusted Extensions.
32605  */
32606 
32607 
32608 /*
32609  * Allows a process to write to or create a window resource that
32610  * it does not own (has a different user ID). A newly created
32611  * window property is created with the window's user ID.
32612  * This privilege is interpreted only if the system is configured
32613  * with Trusted Extensions.
32614  */
32615 
32616 
32617 /*
32618  * Allows a process to perform operations on window input devices.
32619  * Allows a process to get and set keyboard and pointer controls.
32620  * Allows a process to modify pointer button and key mappings.
32621  * This privilege is interpreted only if the system is configured
32622  * with Trusted Extensions.
32623  */
32624 
32625 
32626 /*
32627  * Allows a process to use the direct graphics access (DGA) X protocol
32628  * extensions. Direct process access to the frame buffer is still
32629  * required. Thus the process must have MAC and DAC privileges that
32630  * allow access to the frame buffer, or the frame buffer must be
32631  * allocated to the process.
32632  * This privilege is interpreted only if the system is configured
32633  * with Trusted Extensions.
32634  */
32635 
32636 
32637 /*
32638  * Allows a process to set the sensitivity label of a window resource
32639  * to a sensitivity label that does not dominate the existing
32640  * sensitivity label.
32641  * This privilege is interpreted only if the system is configured
32642  * with Trusted Extensions.
32643  */
32644 
32645 
32646 /*
32647  * Allows a process to set a font path.
32648  * This privilege is interpreted only if the system is configured
32649  * with Trusted Extensions.
32650  */
32651 
32652 
32653 /*
32654  * Allows a process to read from a window resource whose sensitivity
32655  * label is not equal to the process sensitivity label.
32656  * This privilege is interpreted only if the system is configured
32657  * with Trusted Extensions.
32658  */
32659 
32660 
32661 /*
32662  * Allows a process to create a window resource whose sensitivity
32663  * label is not equal to the process sensitivity label.
32664  * A newly created window property is created with the window's
32665  * sensitivity label.
32666  * This privilege is interpreted only if the system is configured
32667  * with Trusted Extensions.
32668  */
32669 
32670 
32671 /*
32672  * Allows a process to request inter-window data moves without the
32673  * intervention of the selection confirmer.
32674  * This privilege is interpreted only if the system is configured
32675  * with Trusted Extensions.
32676  */
32677 
32678 
32679 /*
32680  * Allows a process to set the sensitivity label of a window
32681  * resource to a sensitivity label that dominates the existing
32682  * sensitivity label.
32683  * This privilege is interpreted only if the system is configured
32684  * with Trusted Extensions.
32685  */
32686 
32687 
32688 /*
32689  * Allows a process access to the xVM(5) control devices for
32690  * managing guest domains and the hypervisor. This privilege is
32691  * used only if booted into xVM on x86 platforms.
32692  */
32693 
32694 
32695 
32696 /*
32697  * Privilege set names
32698  */
32699 /*
32700  * Set of privileges currently in effect.
32701  */
32702 
32703 
32704 /*
32705  * Set of privileges that comes into effect on exec.
32706  */
32707 
32708 
32709 /*
32710  * Set of privileges that can be put into the effective set without
32711  * restriction.
32712  */
32713 
32714 
32715 /*
32716  * Set of privileges that determines the absolute upper bound of
32717  * privileges this process and its off-spring can obtain.
32718  */
32719 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
32720 
32721 
32722 
32723 
32724 
32725 typedef uint32_t priv_chunk_t;
32726 typedef struct priv_set priv_set_t;
32727 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
32728 /*
32729  * Userland type definitions.
32730  */
32731 
32732 typedef const char *priv_ptype_t;
32733 typedef const char *priv_t;
32734 
32735 
32736 
32737 /*
32738  * priv_op_t indicates a privilege operation type
32739  */
32740 typedef enum priv_op {
32741  PRIV_ON,
32742  PRIV_OFF,
32743  PRIV_SET
32744 } priv_op_t;
32745 
32746 /*
32747  * Privilege system call subcodes.
32748  */
32749 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
32750 /*
32751  * Maximum length of a user defined privilege name.
32752  */
32753 
32754 
32755 /*
32756  * Privilege interface functions for those parts of the kernel that
32757  * know nothing of the privilege internals.
32758  *
32759  * A privilege implementation can have a varying number of sets; sets
32760  * consist of a number of priv_chunk_t's and the size is expressed as such.
32761  * The privileges can be represented as
32762  *
32763  *		priv_chunk_t privs[info.priv_nsets][info.priv_setsize]
32764  *		... priv_infosize of extra information ...
32765  *
32766  * Extra data contained in the privilege information consists of chunks
32767  * of data with specified size and type all headed by a priv_info_t header
32768  * which defines both the type of information as well as the size of the
32769  * information.  ((char*)&info)+info->priv_info_size should be rounded up
32770  * to point to the next piece of information.
32771  */
32772 
32773 typedef struct priv_impl_info {
32774  uint32_t priv_headersize; /* sizeof (priv_impl_info) */
32775  uint32_t priv_flags; /* additional flags */
32776  uint32_t priv_nsets; /* number of priv sets */
32777  uint32_t priv_setsize; /* size in priv_chunk_t */
32778  uint32_t priv_max; /* highest actual valid priv */
32779  uint32_t priv_infosize; /* Per proc. additional info */
32780  uint32_t priv_globalinfosize; /* Per system info */
32781 } priv_impl_info_t;
32782 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
32783 /*
32784  * Per credential flags.
32785  */
32786 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
32787 /* user-settable flags: */
32788 
32789 
32790 
32791 /*
32792  * Header of the privilege info data structure; multiple structures can
32793  * follow the privilege sets and priv_impl_info structures.
32794  */
32795 typedef struct priv_info {
32796  uint32_t priv_info_type;
32797  uint32_t priv_info_size;
32798 } priv_info_t;
32799 
32800 typedef struct priv_info_uint {
32801  priv_info_t info;
32802  uint_t val;
32803 } priv_info_uint_t;
32804 
32805 /*
32806  * Global privilege set information item; the actual size of the array is
32807  * {priv_setsize}.
32808  */
32809 typedef struct priv_info_set {
32810  priv_info_t info;
32811  priv_chunk_t set[1];
32812 } priv_info_set_t;
32813 
32814 /*
32815  * names[1] is a place holder which can contain multiple NUL terminated,
32816  * non-empty strings.
32817  */
32818 
32819 typedef struct priv_info_names {
32820  priv_info_t info;
32821  int cnt; /* number of strings */
32822  char names[1]; /* "string1\0string2\0 ..stringN\0" */
32823 } priv_info_names_t;
32824 
32825 /*
32826  * Privilege information types.
32827  */
32828 
32829 
32830 
32831 
32832 
32833 /*
32834  * Special "privileges" used to indicate special conditions in privilege
32835  * debugging/tracing code.
32836  */
32837 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 2
32838 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h"
32839 /*
32840  * library functions prototype.
32841  */
32842 
32843 extern int setppriv(priv_op_t, priv_ptype_t, const priv_set_t *);
32844 extern int getppriv(priv_ptype_t, priv_set_t *);
32845 extern int setpflags(uint_t, uint_t);
32846 extern uint_t getpflags(uint_t);
32847 extern const priv_impl_info_t *getprivimplinfo(void);
32848 
32849 extern int priv_set(priv_op_t, priv_ptype_t, ...);
32850 extern boolean_t priv_ineffect(const char *);
32851 extern priv_set_t *priv_str_to_set(const char *, const char *, const char **);
32852 extern char *priv_set_to_str(const priv_set_t *, char, int);
32853 
32854 extern int priv_getbyname(const char *);
32855 extern const char *priv_getbynum(int);
32856 extern int priv_getsetbyname(const char *);
32857 extern const char *priv_getsetbynum(int);
32858 extern char *priv_gettext(const char *);
32859 
32860 extern priv_set_t *priv_allocset(void);
32861 extern void priv_freeset(priv_set_t *);
32862 
32863 extern void priv_emptyset(priv_set_t *);
32864 extern void priv_basicset(priv_set_t *);
32865 extern void priv_fillset(priv_set_t *);
32866 extern boolean_t priv_isemptyset(const priv_set_t *);
32867 extern boolean_t priv_isfullset(const priv_set_t *);
32868 extern boolean_t priv_isequalset(const priv_set_t *, const priv_set_t *);
32869 extern boolean_t priv_issubset(const priv_set_t *, const priv_set_t *);
32870 extern void priv_intersect(const priv_set_t *, priv_set_t *);
32871 extern void priv_union(const priv_set_t *, priv_set_t *);
32872 extern void priv_inverse(priv_set_t *);
32873 extern int priv_addset(priv_set_t *, const char *);
32874 extern void priv_copyset(const priv_set_t *, priv_set_t *);
32875 extern int priv_delset(priv_set_t *, const char *);
32876 extern boolean_t priv_ismember(const priv_set_t *, const char *);
32877 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
32878 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
32879 /*
32880  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32881  * Use is subject to license terms.
32882  *
32883  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
32884  */
32885 /*
32886  * Copyright (c) 1982, 1986 Regents of the University of California.
32887  * All rights reserved.
32888  *
32889  * Redistribution and use in source and binary forms are permitted
32890  * provided that this notice is preserved and that due credit is given
32891  * to the University of California at Berkeley. The name of the University
32892  * may not be used to endorse or promote products derived from this
32893  * software without specific prior written permission. This software
32894  * is provided ``as is'' without express or implied warranty.
32895  */
32896 
32897 /*
32898  * Constants and structures defined by the internet system,
32899  * according to following documents
32900  *
32901  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
32902  *	http://www.iana.org/assignments/protocol-numbers
32903  *	http://www.iana.org/assignments/port-numbers
32904  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
32905  *
32906  */
32907 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
32908 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
32909 /*
32910  * CDDL HEADER START
32911  *
32912  * The contents of this file are subject to the terms of the
32913  * Common Development and Distribution License (the "License").
32914  * You may not use this file except in compliance with the License.
32915  *
32916  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32917  * or http://www.opensolaris.org/os/licensing.
32918  * See the License for the specific language governing permissions
32919  * and limitations under the License.
32920  *
32921  * When distributing Covered Code, include this CDDL HEADER in each
32922  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32923  * If applicable, add the following below this CDDL HEADER, with the
32924  * fields enclosed by brackets "[]" replaced with your own identifying
32925  * information: Portions Copyright [yyyy] [name of copyright owner]
32926  *
32927  * CDDL HEADER END
32928  */
32929 /*
32930  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32931  *
32932  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
32933  */
32934 
32935 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
32936 /*	  All Rights Reserved	*/
32937 
32938 /*
32939  * University Copyright- Copyright (c) 1982, 1986, 1988
32940  * The Regents of the University of California
32941  * All Rights Reserved
32942  *
32943  * University Acknowledgment- Portions of this document are derived from
32944  * software developed by the University of California, Berkeley, and its
32945  * contributors.
32946  */
32947 
32948 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
32949 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
32950 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 1
32951 /*
32952  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
32953  */
32954 
32955 /*
32956  * Copyright (c) 1982, 1986 Regents of the University of California.
32957  * All rights reserved.  The Berkeley software License Agreement
32958  * specifies the terms and conditions for redistribution.
32959  */
32960 
32961 
32962 
32963 
32964 /* if.h 1.26 90/05/29 SMI; from UCB 7.1 6/4/86		*/
32965 
32966 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
32967 /*
32968  * CDDL HEADER START
32969  *
32970  * The contents of this file are subject to the terms of the
32971  * Common Development and Distribution License (the "License").
32972  * You may not use this file except in compliance with the License.
32973  *
32974  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32975  * or http://www.opensolaris.org/os/licensing.
32976  * See the License for the specific language governing permissions
32977  * and limitations under the License.
32978  *
32979  * When distributing Covered Code, include this CDDL HEADER in each
32980  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32981  * If applicable, add the following below this CDDL HEADER, with the
32982  * fields enclosed by brackets "[]" replaced with your own identifying
32983  * information: Portions Copyright [yyyy] [name of copyright owner]
32984  *
32985  * CDDL HEADER END
32986  */
32987 
32988 /*
32989  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
32990  * Copyright 2016 Joyent, Inc.
32991  *
32992  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
32993  * Use is subject to license terms.
32994  */
32995 # 17 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 2
32996 
32997 
32998 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
32999 /*
33000  * CDDL HEADER START
33001  *
33002  * The contents of this file are subject to the terms of the
33003  * Common Development and Distribution License (the "License").
33004  * You may not use this file except in compliance with the License.
33005  *
33006  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33007  * or http://www.opensolaris.org/os/licensing.
33008  * See the License for the specific language governing permissions
33009  * and limitations under the License.
33010  *
33011  * When distributing Covered Code, include this CDDL HEADER in each
33012  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33013  * If applicable, add the following below this CDDL HEADER, with the
33014  * fields enclosed by brackets "[]" replaced with your own identifying
33015  * information: Portions Copyright [yyyy] [name of copyright owner]
33016  *
33017  * CDDL HEADER END
33018  */
33019 /*
33020  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
33021  *
33022  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
33023  */
33024 
33025 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
33026 /*	  All Rights Reserved	*/
33027 
33028 /*
33029  * University Copyright- Copyright (c) 1982, 1986, 1988
33030  * The Regents of the University of California
33031  * All Rights Reserved
33032  *
33033  * University Acknowledgment- Portions of this document are derived from
33034  * software developed by the University of California, Berkeley, and its
33035  * contributors.
33036  */
33037 
33038 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
33039 # 20 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 2
33040 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
33041 /*
33042  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
33043  * Use is subject to license terms.
33044  *
33045  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
33046  */
33047 /*
33048  * Copyright (c) 1982, 1986 Regents of the University of California.
33049  * All rights reserved.
33050  *
33051  * Redistribution and use in source and binary forms are permitted
33052  * provided that this notice is preserved and that due credit is given
33053  * to the University of California at Berkeley. The name of the University
33054  * may not be used to endorse or promote products derived from this
33055  * software without specific prior written permission. This software
33056  * is provided ``as is'' without express or implied warranty.
33057  */
33058 
33059 /*
33060  * Constants and structures defined by the internet system,
33061  * according to following documents
33062  *
33063  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
33064  *	http://www.iana.org/assignments/protocol-numbers
33065  *	http://www.iana.org/assignments/port-numbers
33066  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
33067  *
33068  */
33069 # 21 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 2
33070 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33071 /*
33072  * Structures defining a network interface, providing a packet
33073  * transport mechanism (ala level 0 of the PUP protocols).
33074  *
33075  * Each interface accepts output datagrams of a specified maximum
33076  * length, and provides higher level routines with input datagrams
33077  * received from its medium.
33078  *
33079  * Output occurs when the routine if_output is called, with three parameters:
33080  *	(*ifp->if_output)(ifp, m, dst)
33081  * Here m is the mbuf chain to be sent and dst is the destination address.
33082  * The output routine encapsulates the supplied datagram if necessary,
33083  * and then transmits it on its medium.
33084  *
33085  * On input, each interface unwraps the data received by it, and either
33086  * places it on the input queue of a internetwork datagram routine
33087  * and posts the associated software interrupt, or passes the datagram to a raw
33088  * packet input routine.
33089  *
33090  * Routines exist for locating interfaces by their addresses
33091  * or for locating a interface on a certain network, as well as more general
33092  * routing and gateway routines maintaining information used to locate
33093  * interfaces.  These routines live in the files if.c and route.c
33094  */
33095 
33096 
33097 
33098 /*
33099  * Structure defining a queue for a network interface.
33100  *
33101  * (Would like to call this struct ``if'', but C isn't PL/1.)
33102  */
33103 struct ifnet {
33104  char *if_name; /* name, e.g. ``en'' or ``lo'' */
33105  short if_unit; /* sub-unit for lower level driver */
33106  short if_mtu; /* maximum transmission unit */
33107  short if_flags; /* up/down, broadcast, etc. */
33108  short if_timer; /* time 'til if_watchdog called */
33109  ushort_t if_promisc; /* net # of requests for promisc mode */
33110  int if_metric; /* routing metric (external only) */
33111  struct ifaddr *if_addrlist; /* linked list of addresses per if */
33112  struct ifqueue {
33113   struct mbuf *ifq_head;
33114   struct mbuf *ifq_tail;
33115   int ifq_len;
33116   int ifq_maxlen;
33117   int ifq_drops;
33118  } if_snd; /* output queue */
33119 /* procedure handles */
33120  int (*if_init)(); /* init routine */
33121  int (*if_output)(); /* output routine */
33122  int (*if_ioctl)(); /* ioctl routine */
33123  int (*if_reset)(); /* bus reset routine */
33124  int (*if_watchdog)(); /* timer routine */
33125 /* generic interface statistics */
33126  int if_ipackets; /* packets received on interface */
33127  int if_ierrors; /* input errors on interface */
33128  int if_opackets; /* packets sent on interface */
33129  int if_oerrors; /* output errors on interface */
33130  int if_collisions; /* collisions on csma interfaces */
33131 /* end statistics */
33132  struct ifnet *if_next;
33133  struct ifnet *if_upper; /* next layer up */
33134  struct ifnet *if_lower; /* next layer down */
33135  int (*if_input)(); /* input routine */
33136  int (*if_ctlin)(); /* control input routine */
33137  int (*if_ctlout)(); /* control output routine */
33138  struct map *if_memmap; /* rmap for interface specific memory */
33139 };
33140 
33141 /*
33142  * NOTE : These flags are not directly used within IP.
33143  * ip_if.h has definitions derived from this which is used within IP.
33144  * If you define a flag here, you need to define one in ip_if.h before
33145  * using the new flag in IP. Don't use these flags directly in IP.
33146  */
33147 # 119 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33148 /*
33149  * The IFF_MULTICAST flag indicates that the network can support the
33150  * transmission and reception of higher-level (e.g., IP) multicast packets.
33151  * It is independent of hardware support for multicasting; for example,
33152  * point-to-point links or pure broadcast networks may well support
33153  * higher-level multicasts.
33154  */
33155 
33156 
33157 
33158 
33159 
33160 
33161 
33162 /*
33163  * The following flags can't be grabbed or altered by SIOC[GS]IFFLAGS.
33164  * Should use SIOC[GS]LIFFLAGS which has a larger flags field.
33165  */
33166 # 157 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33167 /*
33168  * The IFF_XRESOLV flag is an evolving interface and is subject
33169  * to change without notice.
33170  */
33171 # 175 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33172 /* flags that cannot be changed by userland on any interface */
33173 
33174 
33175 
33176 
33177 
33178 
33179 
33180 /* flags that cannot be changed by userland on an IPMP interface */
33181 
33182 
33183 /* flags that can never be set on an IPMP interface */
33184 
33185 
33186 
33187 /*
33188  * Output queues (ifp->if_snd) and internetwork datagram level (pup level 1)
33189  * input routines have queues of messages stored on ifqueue structures
33190  * (defined above).  Entries are added to and deleted from these structures
33191  * by these macros, which should be called with ipl raised to splimp().
33192  */
33193 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33194 /*
33195  * Packets destined for level-1 protocol input routines
33196  * have a pointer to the receiving interface prepended to the data.
33197  * IF_DEQUEUEIF extracts and returns this pointer when dequeuing the packet.
33198  * IF_ADJ should be used otherwise to adjust for its presence.
33199  */
33200 # 254 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33201 /*
33202  * The ifaddr structure contains information about one address
33203  * of an interface.  They are maintained by the different address families,
33204  * are allocated and attached when an address is set, and are linked
33205  * together so all addresses for an interface can be located.
33206  */
33207 struct ifaddr {
33208  struct sockaddr ifa_addr; /* address of interface */
33209  union {
33210   struct sockaddr ifu_broadaddr;
33211   struct sockaddr ifu_dstaddr;
33212  } ifa_ifu;
33213 
33214 
33215  struct ifnet *ifa_ifp; /* back-pointer to interface */
33216  struct ifaddr *ifa_next; /* next address for interface */
33217 };
33218 
33219 /*
33220  * For SIOCLIF*ND ioctls.
33221  *
33222  * The lnr_state_* fields use the ND_* neighbor reachability states.
33223  * The 3 different fields are for use with SIOCLIFSETND to cover the cases
33224  * when
33225  *	A new entry is created
33226  *	The entry already exists and the link-layer address is the same
33227  *	The entry already exists and the link-layer address differs
33228  *
33229  * Use ND_UNCHANGED to not change any state.
33230  */
33231 
33232 typedef struct lif_nd_req {
33233  struct sockaddr_storage lnr_addr;
33234  uint8_t lnr_state_create; /* When creating */
33235  uint8_t lnr_state_same_lla; /* Update same addr */
33236  uint8_t lnr_state_diff_lla; /* Update w/ diff. */
33237  int lnr_hdw_len;
33238  int lnr_flags; /* See below */
33239  /* padding because ia32 "long long"s are only 4-byte aligned. */
33240  int lnr_pad0;
33241  char lnr_hdw_addr[64];
33242 } lif_nd_req_t;
33243 
33244 /*
33245  * Neighbor reachability states
33246  * Used with SIOCLIF*ND ioctls.
33247  */
33248 # 313 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33249 /*
33250  * lnr_flags value of lif_nd_req.
33251  * Used with SIOCLIF*ND ioctls.
33252  */
33253 
33254 
33255 
33256 
33257 
33258 
33259 /*
33260  * the NDF_STATIC entry ensures that an NCE will not be deleted, and is
33261  * used by non-ON applications like IPv6 test suites.
33262  */
33263 
33264 
33265 /* For SIOC[GS]LIFLNKINFO */
33266 typedef struct lif_ifinfo_req {
33267  uint8_t lir_maxhops;
33268  uint32_t lir_reachtime; /* Reachable time in msec */
33269  uint32_t lir_reachretrans; /* Retransmission timer msec */
33270  uint32_t lir_maxmtu;
33271 } lif_ifinfo_req_t;
33272 
33273 
33274 
33275 /*
33276  * Maximum lengths of interface name and IPMP group name; these are the same
33277  * for historical reasons.  Note that the actual maximum length of a name is
33278  * one byte less than these constants since the kernel always sets the final
33279  * byte of lifr_name and lifr_groupname to NUL.
33280  */
33281 
33282 
33283 
33284 
33285 
33286 
33287 
33288 /*
33289  * Interface request structure used for socket
33290  * ioctl's.  All interface ioctl's must have parameter
33291  * definitions which begin with ifr_name.  The
33292  * remainder may be interface specific.
33293  * Note: This data structure uses 64bit type uint64_t which is not
33294  *	 a valid type for strict ANSI/ISO C compilation for ILP32.
33295  *	 Applications with ioctls using this structure that insist on
33296  *	 building with strict ANSI/ISO C (-Xc) will need to be LP64.
33297  */
33298 
33299 struct lifreq {
33300  char lifr_name[32]; /* if name, e.g. "en0" */
33301  union {
33302   int lifru_addrlen; /* for subnet/token etc */
33303   uint_t lifru_ppa; /* SIOCSLIFNAME */
33304  } lifr_lifru1;
33305 
33306 
33307  uint_t lifr_type; /* IFT_ETHER, ... */
33308  union {
33309   struct sockaddr_storage lifru_addr;
33310   struct sockaddr_storage lifru_dstaddr;
33311   struct sockaddr_storage lifru_broadaddr;
33312   struct sockaddr_storage lifru_token; /* With lifr_addrlen */
33313   struct sockaddr_storage lifru_subnet; /* With lifr_addrlen */
33314   int lifru_index; /* interface index */
33315   uint64_t lifru_flags; /* Flags for SIOC?LIFFLAGS */
33316   int lifru_metric;
33317   uint_t lifru_mtu;
33318   int lif_muxid[2]; /* mux id's for arp and ip */
33319   struct lif_nd_req lifru_nd_req; /* SIOCLIF*ND */
33320   struct lif_ifinfo_req lifru_ifinfo_req;
33321   char lifru_groupname[32]; /* SIOC[GS]LIFGROUPNAME */
33322   char lifru_binding[32]; /* SIOCGLIFBINDING */
33323   zoneid_t lifru_zoneid; /* SIOC[GS]LIFZONE */
33324   uint_t lifru_dadstate; /* SIOCGLIFDADSTATE */
33325  } lifr_lifru;
33326 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33327 };
33328 
33329 
33330 /*
33331  * Argument structure for SIOCT* address testing ioctls.
33332  */
33333 struct sioc_addrreq {
33334  struct sockaddr_storage sa_addr; /* Address to test */
33335  int sa_res; /* Result - 0/1 */
33336  int sa_pad;
33337 };
33338 
33339 /*
33340  * Argument structure used by mrouted to get src-grp pkt counts using
33341  * SIOCGETLSGCNT. See <netinet/ip_mroute.h>.
33342  */
33343 struct sioc_lsg_req {
33344  struct sockaddr_storage slr_src;
33345  struct sockaddr_storage slr_grp;
33346  uint_t slr_pktcnt;
33347  uint_t slr_bytecnt;
33348  uint_t slr_wrong_if;
33349  uint_t slr_pad;
33350 };
33351 
33352 /* Argument structure for SIOCGLIFDADSTATE ioctl */
33353 typedef enum {
33354  DAD_IN_PROGRESS = 0x1,
33355  DAD_DONE = 0x2
33356 } glif_dad_state_t;
33357 
33358 /*
33359  * OBSOLETE: Replaced by struct lifreq. Supported for compatibility.
33360  *
33361  * Interface request structure used for socket
33362  * ioctl's.  All interface ioctl's must have parameter
33363  * definitions which begin with ifr_name.  The
33364  * remainder may be interface specific.
33365  */
33366 struct ifreq {
33367 
33368  char ifr_name[16]; /* if name, e.g. "en0" */
33369  union {
33370   struct sockaddr ifru_addr;
33371   struct sockaddr ifru_dstaddr;
33372   char ifru_oname[16]; /* other if name */
33373   struct sockaddr ifru_broadaddr;
33374   int ifru_index; /* interface index */
33375   uint_t ifru_mtu;
33376   short ifru_flags;
33377   int ifru_metric;
33378   char ifru_data[1]; /* interface dependent data */
33379   char ifru_enaddr[6];
33380   int if_muxid[2]; /* mux id's for arp and ip */
33381 
33382   /* Struct for flags/ppa */
33383   struct ifr_ppaflags {
33384    short ifrup_flags; /* Space of ifru_flags. */
33385    short ifrup_filler;
33386    uint_t ifrup_ppa;
33387   } ifru_ppaflags;
33388 
33389   /* Struct for FDDI ioctl's */
33390   struct ifr_dnld_reqs {
33391    uint32_t v_addr;
33392    uint32_t m_addr;
33393    uint32_t ex_addr;
33394    uint32_t size;
33395   } ifru_dnld_req;
33396 
33397   /* Struct for FDDI stats */
33398   struct ifr_fddi_stats {
33399    uint32_t stat_size;
33400    uint32_t fddi_stats;
33401   } ifru_fddi_stat;
33402 
33403   struct ifr_netmapents {
33404    uint32_t map_ent_size, /* size of netmap structure */
33405     entry_number; /* index into netmap list */
33406    uint32_t fddi_map_ent; /* pointer to user structure */
33407   } ifru_netmapent;
33408 
33409   /* Field for generic ioctl for fddi */
33410 
33411   struct ifr_fddi_gen_struct {
33412    uint32_t ifru_fddi_gioctl; /* field for gen ioctl */
33413    uint32_t ifru_fddi_gaddr; /* Generic ptr to a field */
33414   } ifru_fddi_gstruct;
33415 
33416  } ifr_ifru;
33417 # 509 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33418 /* For setting ppa */
33419 
33420 
33421 /* FDDI specific */
33422 
33423 
33424 
33425 
33426 
33427 
33428 
33429 };
33430 
33431 /* Used by SIOCGLIFNUM. Uses same flags as in struct lifconf */
33432 struct lifnum {
33433  sa_family_t lifn_family;
33434  int lifn_flags; /* request specific interfaces */
33435  int lifn_count; /* Result */
33436 };
33437 
33438 /*
33439  * Structure used in SIOCGLIFCONF request.
33440  * Used to retrieve interface configuration
33441  * for machine (useful for programs which
33442  * must know all networks accessible) for a given address family.
33443  * Using AF_UNSPEC will retrieve all address families.
33444  */
33445 struct lifconf {
33446  sa_family_t lifc_family;
33447  int lifc_flags; /* request specific interfaces */
33448  int lifc_len; /* size of associated buffer */
33449  union {
33450   caddr_t lifcu_buf;
33451   struct lifreq *lifcu_req;
33452  } lifc_lifcu;
33453 
33454 
33455 };
33456 
33457 /*
33458  * Structure used in SIOCGLIFSRCOF to get the interface
33459  * configuration list for those interfaces that use an address
33460  * hosted on the interface (set in lifs_ifindex), as the source
33461  * address.
33462  */
33463 struct lifsrcof {
33464  uint_t lifs_ifindex; /* interface of interest */
33465  size_t lifs_maxlen; /* size of buffer: input */
33466  size_t lifs_len; /* size of buffer: output */
33467  union {
33468   caddr_t lifsu_buf;
33469   struct lifreq *lifsu_req;
33470  } lifs_lifsu;
33471 
33472 
33473 };
33474 
33475 /* Flags */
33476 
33477 
33478      /* be used to communicate outside the */
33479      /* node (exclude interfaces which are */
33480      /* IFF_NOXMIT, IFF_NOLOCAL, */
33481      /* IFF_LOOPBACK, IFF_DEPRECATED, or */
33482      /* not IFF_UP). Has priority over */
33483      /* LIFC_NOXMIT. */
33484 
33485 
33486      /* (must be issued from global zone) */
33487 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33488 /*
33489  * IPMP group information, for use with SIOCGLIFGROUPINFO.
33490  */
33491 typedef struct lifgroupinfo {
33492  char gi_grname[32]; /* group name (set by caller) */
33493  char gi_grifname[32]; /* IPMP meta-interface name */
33494  char gi_m4ifname[32]; /* v4 mcast interface name */
33495  char gi_m6ifname[32]; /* v6 mcast interface name */
33496  char gi_bcifname[32]; /* v4 bcast interface name */
33497  boolean_t gi_v4; /* group is plumbed for v4 */
33498  boolean_t gi_v6; /* group is plumbed for v6 */
33499  uint_t gi_nv4; /* # of underlying v4 if's */
33500  uint_t gi_nv6; /* # of underlying v6 if's */
33501  uint_t gi_mactype; /* DLPI mac type of group */
33502 } lifgroupinfo_t;
33503 
33504 /*
33505  * OBSOLETE: Structure used in SIOCGIFCONF request.
33506  * Used to retrieve interface configuration
33507  * for machine (useful for programs which
33508  * must know all networks accessible).
33509  */
33510 struct ifconf {
33511  int ifc_len; /* size of associated buffer */
33512  union {
33513   caddr_t ifcu_buf;
33514   struct ifreq *ifcu_req;
33515  } ifc_ifcu;
33516 
33517 
33518 };
33519 # 649 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
33520 typedef struct if_data {
33521     /* generic interface information */
33522  uchar_t ifi_type; /* ethernet, tokenring, etc */
33523  uchar_t ifi_addrlen; /* media address length */
33524  uchar_t ifi_hdrlen; /* media header length */
33525  uint_t ifi_mtu; /* maximum transmission unit */
33526  uint_t ifi_metric; /* routing metric (external only) */
33527  uint_t ifi_baudrate; /* linespeed */
33528     /* volatile statistics */
33529  uint_t ifi_ipackets; /* packets received on interface */
33530  uint_t ifi_ierrors; /* input errors on interface */
33531  uint_t ifi_opackets; /* packets sent on interface */
33532  uint_t ifi_oerrors; /* output errors on interface */
33533  uint_t ifi_collisions; /* collisions on csma interfaces */
33534  uint_t ifi_ibytes; /* total number of octets received */
33535  uint_t ifi_obytes; /* total number of octets sent */
33536  uint_t ifi_imcasts; /* packets received via multicast */
33537  uint_t ifi_omcasts; /* packets sent via multicast */
33538  uint_t ifi_iqdrops; /* dropped on input, this interface */
33539  uint_t ifi_noproto; /* destined for unsupported protocol */
33540 
33541 
33542 
33543  struct timeval ifi_lastchange; /* last updated */
33544 
33545 } if_data_t;
33546 
33547 /*
33548  * Message format for use in obtaining information about interfaces
33549  * from the routing socket
33550  */
33551 typedef struct if_msghdr {
33552  ushort_t ifm_msglen; /* to skip over non-understood messages */
33553  uchar_t ifm_version; /* future binary compatibility */
33554  uchar_t ifm_type; /* message type */
33555  int ifm_addrs; /* like rtm_addrs */
33556  int ifm_flags; /* value of if_flags */
33557  ushort_t ifm_index; /* index for associated ifp */
33558  struct if_data ifm_data; /* statistics and other data about if */
33559 } if_msghdr_t;
33560 
33561 /*
33562  * Message format for use in obtaining information about interface addresses
33563  * from the routing socket
33564  */
33565 typedef struct ifa_msghdr {
33566  ushort_t ifam_msglen; /* to skip over non-understood messages */
33567  uchar_t ifam_version; /* future binary compatibility */
33568  uchar_t ifam_type; /* message type */
33569  int ifam_addrs; /* like rtm_addrs */
33570  int ifam_flags; /* route flags */
33571  ushort_t ifam_index; /* index for associated ifp */
33572  int ifam_metric; /* value of ipif_metric */
33573 } ifa_msghdr_t;
33574 
33575 
33576 
33577 /*
33578  * The if_nameindex structure holds the interface index value about
33579  * a single interface. An array of this structure is used to return
33580  * all interfaces and indexes.
33581  */
33582 struct if_nameindex {
33583  unsigned if_index; /* positive interface index */
33584  char *if_name; /* if name, e.g. "en0" */
33585 };
33586 
33587 /* Interface index identification API definitions */
33588 extern unsigned if_nametoindex(const char *);
33589 extern char *if_indextoname(unsigned, char *);
33590 extern struct if_nameindex *if_nameindex(void);
33591 extern void if_freenameindex(struct if_nameindex *);
33592 
33593 
33594 /*
33595  * If changing IF_MAX_INDEX to a value greater than UINT16_MAX, check if
33596  * struct sockaddr_dl needs to be modified as the interface index is placed
33597  * in this structure by the kernel.
33598  */
33599 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
33600 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
33601 /*
33602  * CDDL HEADER START
33603  *
33604  * The contents of this file are subject to the terms of the
33605  * Common Development and Distribution License (the "License").
33606  * You may not use this file except in compliance with the License.
33607  *
33608  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33609  * or http://www.opensolaris.org/os/licensing.
33610  * See the License for the specific language governing permissions
33611  * and limitations under the License.
33612  *
33613  * When distributing Covered Code, include this CDDL HEADER in each
33614  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33615  * If applicable, add the following below this CDDL HEADER, with the
33616  * fields enclosed by brackets "[]" replaced with your own identifying
33617  * information: Portions Copyright [yyyy] [name of copyright owner]
33618  *
33619  * CDDL HEADER END
33620  */
33621 
33622 /*
33623  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
33624  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
33625  */
33626 
33627 /*	Copyright (c) 1988 AT&T	*/
33628 /*	  All Rights Reserved  	*/
33629 
33630 /*
33631  * User-visible pieces of the ANSI C standard I/O package.
33632  */
33633 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
33634 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/rctl.h" 1
33635 /*
33636  * CDDL HEADER START
33637  *
33638  * The contents of this file are subject to the terms of the
33639  * Common Development and Distribution License, Version 1.0 only
33640  * (the "License").  You may not use this file except in compliance
33641  * with the License.
33642  *
33643  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33644  * or http://www.opensolaris.org/os/licensing.
33645  * See the License for the specific language governing permissions
33646  * and limitations under the License.
33647  *
33648  * When distributing Covered Code, include this CDDL HEADER in each
33649  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33650  * If applicable, add the following below this CDDL HEADER, with the
33651  * fields enclosed by brackets "[]" replaced with your own identifying
33652  * information: Portions Copyright [yyyy] [name of copyright owner]
33653  *
33654  * CDDL HEADER END
33655  */
33656 /*
33657  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
33658  * Use is subject to license terms.
33659  */
33660 
33661 
33662 
33663 
33664 #pragma ident "%Z%%M%	%I%	%E% SMI"
33665 
33666 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
33667 /*
33668  * CDDL HEADER START
33669  *
33670  * The contents of this file are subject to the terms of the
33671  * Common Development and Distribution License (the "License").
33672  * You may not use this file except in compliance with the License.
33673  *
33674  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33675  * or http://www.opensolaris.org/os/licensing.
33676  * See the License for the specific language governing permissions
33677  * and limitations under the License.
33678  *
33679  * When distributing Covered Code, include this CDDL HEADER in each
33680  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33681  * If applicable, add the following below this CDDL HEADER, with the
33682  * fields enclosed by brackets "[]" replaced with your own identifying
33683  * information: Portions Copyright [yyyy] [name of copyright owner]
33684  *
33685  * CDDL HEADER END
33686  */
33687 /*
33688  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
33689  */
33690 
33691 
33692 
33693 
33694 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 1
33695 /*
33696  * CDDL HEADER START
33697  *
33698  * The contents of this file are subject to the terms of the
33699  * Common Development and Distribution License (the "License").
33700  * You may not use this file except in compliance with the License.
33701  *
33702  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33703  * or http://www.opensolaris.org/os/licensing.
33704  * See the License for the specific language governing permissions
33705  * and limitations under the License.
33706  *
33707  * When distributing Covered Code, include this CDDL HEADER in each
33708  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33709  * If applicable, add the following below this CDDL HEADER, with the
33710  * fields enclosed by brackets "[]" replaced with your own identifying
33711  * information: Portions Copyright [yyyy] [name of copyright owner]
33712  *
33713  * CDDL HEADER END
33714  */
33715 
33716 /*
33717  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
33718  * Copyright (c) 2012 by Delphix. All rights reserved.
33719  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
33720  */
33721 
33722 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
33723 /*	  All Rights Reserved	*/
33724 
33725 
33726 
33727 
33728 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
33729 /*
33730  * CDDL HEADER START
33731  *
33732  * The contents of this file are subject to the terms of the
33733  * Common Development and Distribution License (the "License").
33734  * You may not use this file except in compliance with the License.
33735  *
33736  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33737  * or http://www.opensolaris.org/os/licensing.
33738  * See the License for the specific language governing permissions
33739  * and limitations under the License.
33740  *
33741  * When distributing Covered Code, include this CDDL HEADER in each
33742  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33743  * If applicable, add the following below this CDDL HEADER, with the
33744  * fields enclosed by brackets "[]" replaced with your own identifying
33745  * information: Portions Copyright [yyyy] [name of copyright owner]
33746  *
33747  * CDDL HEADER END
33748  */
33749 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
33750 /*	  All Rights Reserved  	*/
33751 
33752 
33753 /*
33754  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
33755  * Use is subject to license terms.
33756  *
33757  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
33758  * Copyright 2016 Joyent, Inc.
33759  */
33760 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 2
33761 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h" 1
33762 /*
33763  * CDDL HEADER START
33764  *
33765  * The contents of this file are subject to the terms of the
33766  * Common Development and Distribution License (the "License").
33767  * You may not use this file except in compliance with the License.
33768  *
33769  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33770  * or http://www.opensolaris.org/os/licensing.
33771  * See the License for the specific language governing permissions
33772  * and limitations under the License.
33773  *
33774  * When distributing Covered Code, include this CDDL HEADER in each
33775  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33776  * If applicable, add the following below this CDDL HEADER, with the
33777  * fields enclosed by brackets "[]" replaced with your own identifying
33778  * information: Portions Copyright [yyyy] [name of copyright owner]
33779  *
33780  * CDDL HEADER END
33781  */
33782 /*
33783  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
33784  * Copyright (c) 2012 by Delphix. All rights reserved.
33785  */
33786 
33787 
33788 
33789 
33790 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
33791 /*
33792  * CDDL HEADER START
33793  *
33794  * The contents of this file are subject to the terms of the
33795  * Common Development and Distribution License (the "License").
33796  * You may not use this file except in compliance with the License.
33797  *
33798  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33799  * or http://www.opensolaris.org/os/licensing.
33800  * See the License for the specific language governing permissions
33801  * and limitations under the License.
33802  *
33803  * When distributing Covered Code, include this CDDL HEADER in each
33804  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33805  * If applicable, add the following below this CDDL HEADER, with the
33806  * fields enclosed by brackets "[]" replaced with your own identifying
33807  * information: Portions Copyright [yyyy] [name of copyright owner]
33808  *
33809  * CDDL HEADER END
33810  */
33811 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
33812 /*	  All Rights Reserved  	*/
33813 
33814 
33815 /*
33816  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
33817  * Use is subject to license terms.
33818  *
33819  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
33820  * Copyright 2016 Joyent, Inc.
33821  */
33822 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h" 2
33823 
33824 
33825 
33826 
33827 
33828 
33829 /*
33830  * Per-allocation flags
33831  */
33832 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h"
33833 /*
33834  * The following flags are restricted for use only within the kernel.
33835  * VM_MEMLOAD is for use by the HAT to avoid infinite recursion.
33836  * VM_NORELOC is used by the kernel when static VA->PA mappings are required.
33837  */
33838 
33839 
33840 /*
33841  * VM_ABORT requests that vmem_alloc() *ignore* the VM_SLEEP/VM_NOSLEEP flags
33842  * and forgo reaping if the allocation or attempted import, fails.  This
33843  * flag is a segkmem-specific flag, and should not be used by anyone else.
33844  */
33845 
33846 
33847 /*
33848  * VM_ENDALLOC requests that large addresses be preferred in allocations.
33849  * Has no effect if VM_NEXTFIT is active.
33850  */
33851 
33852 
33853 
33854 
33855 /*
33856  * Arena creation flags
33857  */
33858 
33859 
33860 
33861 
33862 /*
33863  * internal use only;	the import function uses the vmem_ximport_t interface
33864  *			and may increase the request size if it so desires.
33865  *			VMC_XALIGN, for use with vmem_xcreate, specifies that
33866  *			the address returned by the import function will be
33867  *			aligned according to the alignment argument.
33868  */
33869 
33870 
33871 
33872 
33873 /*
33874  * Public segment types
33875  */
33876 
33877 
33878 
33879 /*
33880  * Implementation-private segment types
33881  */
33882 
33883 
33884 
33885 
33886 /*
33887  * VMEM_REENTRANT indicates to vmem_walk() that the callback routine may
33888  * call back into the arena being walked, so vmem_walk() must drop the
33889  * arena lock before each callback.  The caveat is that since the arena
33890  * isn't locked, its state can change.  Therefore it is up to the callback
33891  * routine to handle cases where the segment isn't of the expected type.
33892  * For example, we use this to walk heap_arena when generating a crash dump;
33893  * see segkmem_dump() for sample usage.
33894  */
33895 
33896 
33897 typedef struct vmem vmem_t;
33898 typedef void *(vmem_alloc_t)(vmem_t *, size_t, int);
33899 typedef void (vmem_free_t)(vmem_t *, void *, size_t);
33900 
33901 /*
33902  * Alternate import style; the requested size is passed in a pointer,
33903  * which can be increased by the import function if desired.
33904  */
33905 typedef void *(vmem_ximport_t)(vmem_t *, size_t *, size_t, int);
33906 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h"
33907 extern vmem_t *vmem_create(const char *, void *, size_t, size_t,
33908     vmem_alloc_t *, vmem_free_t *, vmem_t *, size_t, int);
33909 extern vmem_t *vmem_xcreate(const char *, void *, size_t, size_t,
33910     vmem_ximport_t *, vmem_free_t *, vmem_t *, size_t, int);
33911 extern void vmem_destroy(vmem_t *);
33912 extern void *vmem_alloc(vmem_t *, size_t, int);
33913 extern void *vmem_xalloc(vmem_t *, size_t, size_t, size_t, size_t,
33914     void *, void *, int);
33915 extern void vmem_free(vmem_t *, void *, size_t);
33916 extern void vmem_xfree(vmem_t *, void *, size_t);
33917 extern void *vmem_add(vmem_t *, void *, size_t, int);
33918 extern int vmem_contains(vmem_t *, void *, size_t);
33919 extern void vmem_walk(vmem_t *, int, void (*)(void *, void *, size_t), void *);
33920 extern size_t vmem_size(vmem_t *, int);
33921 extern void vmem_qcache_reap(vmem_t *vmp);
33922 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 2
33923 
33924 
33925 
33926 
33927 
33928 /*
33929  * Kernel memory allocator: DDI interfaces.
33930  * See kmem_alloc(9F) for details.
33931  */
33932 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h"
33933 /*
33934  * Kernel memory allocator: private interfaces.
33935  * These interfaces are still evolving.
33936  * Do not use them in unbundled drivers.
33937  */
33938 
33939 /*
33940  * Flags for kmem_cache_create()
33941  */
33942 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h"
33943 struct kmem_cache; /* cache structure is opaque to kmem clients */
33944 
33945 typedef struct kmem_cache kmem_cache_t;
33946 
33947 /* Client response to kmem move callback */
33948 typedef enum kmem_cbrc {
33949  KMEM_CBRC_YES,
33950  KMEM_CBRC_NO,
33951  KMEM_CBRC_LATER,
33952  KMEM_CBRC_DONT_NEED,
33953  KMEM_CBRC_DONT_KNOW
33954 } kmem_cbrc_t;
33955 # 29 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
33956 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 1
33957 /*
33958  * CDDL HEADER START
33959  *
33960  * The contents of this file are subject to the terms of the
33961  * Common Development and Distribution License (the "License").
33962  * You may not use this file except in compliance with the License.
33963  *
33964  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33965  * or http://www.opensolaris.org/os/licensing.
33966  * See the License for the specific language governing permissions
33967  * and limitations under the License.
33968  *
33969  * When distributing Covered Code, include this CDDL HEADER in each
33970  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33971  * If applicable, add the following below this CDDL HEADER, with the
33972  * fields enclosed by brackets "[]" replaced with your own identifying
33973  * information: Portions Copyright [yyyy] [name of copyright owner]
33974  *
33975  * CDDL HEADER END
33976  */
33977 /*
33978  * Copyright 2014 Garrrett D'Amore <garrett@damore.org>
33979  *
33980  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
33981  * Use is subject to license terms.
33982  */
33983 
33984 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
33985 /*	  All Rights Reserved  	*/
33986 
33987 /*
33988  * University Copyright- Copyright (c) 1982, 1986, 1988
33989  * The Regents of the University of California
33990  * All Rights Reserved
33991  *
33992  * University Acknowledgment- Portions of this document are derived from
33993  * software developed by the University of California, Berkeley, and its
33994  * contributors.
33995  */
33996 
33997 
33998 
33999 
34000 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
34001 /*
34002  * CDDL HEADER START
34003  *
34004  * The contents of this file are subject to the terms of the
34005  * Common Development and Distribution License (the "License").
34006  * You may not use this file except in compliance with the License.
34007  *
34008  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34009  * or http://www.opensolaris.org/os/licensing.
34010  * See the License for the specific language governing permissions
34011  * and limitations under the License.
34012  *
34013  * When distributing Covered Code, include this CDDL HEADER in each
34014  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34015  * If applicable, add the following below this CDDL HEADER, with the
34016  * fields enclosed by brackets "[]" replaced with your own identifying
34017  * information: Portions Copyright [yyyy] [name of copyright owner]
34018  *
34019  * CDDL HEADER END
34020  */
34021 
34022 /*
34023  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
34024  * Copyright 2016 Joyent, Inc.
34025  *
34026  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
34027  * Use is subject to license terms.
34028  */
34029 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
34030 
34031 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34032 /*
34033  * CDDL HEADER START
34034  *
34035  * The contents of this file are subject to the terms of the
34036  * Common Development and Distribution License (the "License").
34037  * You may not use this file except in compliance with the License.
34038  *
34039  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34040  * or http://www.opensolaris.org/os/licensing.
34041  * See the License for the specific language governing permissions
34042  * and limitations under the License.
34043  *
34044  * When distributing Covered Code, include this CDDL HEADER in each
34045  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34046  * If applicable, add the following below this CDDL HEADER, with the
34047  * fields enclosed by brackets "[]" replaced with your own identifying
34048  * information: Portions Copyright [yyyy] [name of copyright owner]
34049  *
34050  * CDDL HEADER END
34051  */
34052 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34053 /*	  All Rights Reserved  	*/
34054 
34055 
34056 /*
34057  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34058  * Use is subject to license terms.
34059  *
34060  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34061  * Copyright 2016 Joyent, Inc.
34062  */
34063 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
34064 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
34065 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34066 /*	  All Rights Reserved  	*/
34067 
34068 
34069 /*
34070  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
34071  * All rights reserved.  The Berkeley software License Agreement
34072  * specifies the terms and conditions for redistribution.
34073  */
34074 
34075 /*
34076  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
34077  *
34078  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34079  * Use is subject to license terms.
34080  *
34081  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34082  */
34083 
34084 /*
34085  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
34086  */
34087 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
34088 
34089 
34090 
34091 
34092 
34093 /*
34094  * Process priority specifications
34095  */
34096 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34097 /*
34098  * Resource limits
34099  */
34100 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34101 /*
34102  * The definitions of the following types and constants differ between the
34103  * regular and large file compilation environments.
34104  */
34105 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34106 typedef u_longlong_t rlim_t;
34107 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34108 struct rlimit {
34109  rlim_t rlim_cur; /* current limit */
34110  rlim_t rlim_max; /* maximum value for rlim_cur */
34111 };
34112 
34113 /* transitional large file interface versions */
34114 
34115 
34116 typedef u_longlong_t rlim64_t;
34117 
34118 
34119 
34120 
34121 
34122 struct rlimit64 {
34123  rlim64_t rlim_cur; /* current limit */
34124  rlim64_t rlim_max; /* maximum value for rlim_cur */
34125 };
34126 
34127 
34128 
34129 /*
34130  * Although the saved rlimits were initially introduced by the large file API,
34131  * they are now available for all resource limits on the 64-bit kernel and for
34132  * cpu time and file size limits on the 32-bit kernel.
34133  */
34134 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34135 struct rusage {
34136  struct timeval ru_utime; /* user time used */
34137  struct timeval ru_stime; /* system time used */
34138  long ru_maxrss; /* <unimp> */
34139  long ru_ixrss; /* <unimp> */
34140  long ru_idrss; /* <unimp> */
34141  long ru_isrss; /* <unimp> */
34142  long ru_minflt; /* any page faults not requiring I/O */
34143  long ru_majflt; /* any page faults requiring I/O */
34144  long ru_nswap; /* swaps */
34145  long ru_inblock; /* block input operations */
34146  long ru_oublock; /* block output operations */
34147  long ru_msgsnd; /* streams messsages sent */
34148  long ru_msgrcv; /* streams messages received */
34149  long ru_nsignals; /* signals received */
34150  long ru_nvcsw; /* voluntary context switches */
34151  long ru_nivcsw; /* involuntary " */
34152 };
34153 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34154 /*
34155  * large file compilation environment setup
34156  */
34157 
34158 
34159 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34160 #pragma redefine_extname setrlimit setrlimit64
34161 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34162 
34163 
34164 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34165 #pragma redefine_extname getrlimit getrlimit64
34166 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34167 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
34168 extern int setrlimit(int, const struct rlimit *);
34169 extern int getrlimit(int, struct rlimit *);
34170 
34171 /* transitional large file interfaces */
34172 
34173 
34174 extern int setrlimit64(int, const struct rlimit64 *);
34175 extern int getrlimit64(int, struct rlimit64 *);
34176 
34177 
34178 extern int getpriority(int, id_t);
34179 extern int setpriority(int, id_t, int);
34180 extern int getrusage(int, struct rusage *);
34181 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
34182 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34183 /*
34184  * CDDL HEADER START
34185  *
34186  * The contents of this file are subject to the terms of the
34187  * Common Development and Distribution License (the "License").
34188  * You may not use this file except in compliance with the License.
34189  *
34190  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34191  * or http://www.opensolaris.org/os/licensing.
34192  * See the License for the specific language governing permissions
34193  * and limitations under the License.
34194  *
34195  * When distributing Covered Code, include this CDDL HEADER in each
34196  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34197  * If applicable, add the following below this CDDL HEADER, with the
34198  * fields enclosed by brackets "[]" replaced with your own identifying
34199  * information: Portions Copyright [yyyy] [name of copyright owner]
34200  *
34201  * CDDL HEADER END
34202  */
34203 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34204 /*	  All Rights Reserved  	*/
34205 
34206 
34207 /*
34208  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34209  * Use is subject to license terms.
34210  *
34211  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34212  * Copyright 2016 Joyent, Inc.
34213  */
34214 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
34215 
34216 
34217 
34218 
34219 
34220 /*
34221  * Available local actions and flags.
34222  */
34223 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
34224 /*
34225  * Available global actions and flags.
34226  */
34227 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
34228 /*
34229  * getrctl(2) flag values
34230  */
34231 
34232 
34233 
34234 
34235 /*
34236  * setrctl(2) flag values
34237  */
34238 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
34239 /*
34240  * rctl_priv_t: rctl privilege defined values
34241  *   A large amount of space has been deliberately left between these privileges
34242  *   to permit future enrichment of the control privilege value.
34243  */
34244 
34245 
34246 
34247 
34248 typedef u_longlong_t rctl_qty_t; /* resource control numerical values   */
34249 typedef int rctl_priv_t;
34250 
34251 typedef struct rctlblk rctlblk_t;
34252 
34253 extern int setrctl(const char *, rctlblk_t *, rctlblk_t *, int);
34254 extern int getrctl(const char *, rctlblk_t *, rctlblk_t *, int);
34255 
34256 typedef enum {
34257  RCENTITY_PROCESS,
34258  RCENTITY_TASK,
34259  RCENTITY_PROJECT,
34260  RCENTITY_ZONE
34261 } rctl_entity_t;
34262 
34263 
34264 
34265 
34266 typedef struct rctl_set rctl_set_t;
34267 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/rctl.h" 2
34268 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34269 /*
34270  * CDDL HEADER START
34271  *
34272  * The contents of this file are subject to the terms of the
34273  * Common Development and Distribution License (the "License").
34274  * You may not use this file except in compliance with the License.
34275  *
34276  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34277  * or http://www.opensolaris.org/os/licensing.
34278  * See the License for the specific language governing permissions
34279  * and limitations under the License.
34280  *
34281  * When distributing Covered Code, include this CDDL HEADER in each
34282  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34283  * If applicable, add the following below this CDDL HEADER, with the
34284  * fields enclosed by brackets "[]" replaced with your own identifying
34285  * information: Portions Copyright [yyyy] [name of copyright owner]
34286  *
34287  * CDDL HEADER END
34288  */
34289 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34290 /*	  All Rights Reserved  	*/
34291 
34292 
34293 /*
34294  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34295  * Use is subject to license terms.
34296  *
34297  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34298  * Copyright 2016 Joyent, Inc.
34299  */
34300 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/rctl.h" 2
34301 
34302 
34303 
34304 
34305 
34306 int rctl_walk(int (*)(const char *, void *), void *);
34307 
34308 hrtime_t rctlblk_get_firing_time(rctlblk_t *);
34309 uint_t rctlblk_get_global_action(rctlblk_t *);
34310 uint_t rctlblk_get_global_flags(rctlblk_t *);
34311 uint_t rctlblk_get_local_action(rctlblk_t *, int *);
34312 uint_t rctlblk_get_local_flags(rctlblk_t *);
34313 id_t rctlblk_get_recipient_pid(rctlblk_t *);
34314 rctl_priv_t rctlblk_get_privilege(rctlblk_t *);
34315 rctl_qty_t rctlblk_get_value(rctlblk_t *);
34316 rctl_qty_t rctlblk_get_enforced_value(rctlblk_t *);
34317 
34318 void rctlblk_set_local_action(rctlblk_t *, uint_t, int);
34319 void rctlblk_set_local_flags(rctlblk_t *, uint_t);
34320 void rctlblk_set_recipient_pid(rctlblk_t *, id_t);
34321 void rctlblk_set_privilege(rctlblk_t *, rctl_priv_t);
34322 void rctlblk_set_value(rctlblk_t *, rctl_qty_t);
34323 
34324 size_t rctlblk_size(void);
34325 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
34326 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 1
34327 /*
34328  * CDDL HEADER START
34329  *
34330  * The contents of this file are subject to the terms of the
34331  * Common Development and Distribution License (the "License").
34332  * You may not use this file except in compliance with the License.
34333  *
34334  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34335  * or http://www.opensolaris.org/os/licensing.
34336  * See the License for the specific language governing permissions
34337  * and limitations under the License.
34338  *
34339  * When distributing Covered Code, include this CDDL HEADER in each
34340  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34341  * If applicable, add the following below this CDDL HEADER, with the
34342  * fields enclosed by brackets "[]" replaced with your own identifying
34343  * information: Portions Copyright [yyyy] [name of copyright owner]
34344  *
34345  * CDDL HEADER END
34346  */
34347 /*
34348  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34349  * Use is subject to license terms.
34350  */
34351 
34352 
34353 
34354 
34355 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34356 /*
34357  * CDDL HEADER START
34358  *
34359  * The contents of this file are subject to the terms of the
34360  * Common Development and Distribution License (the "License").
34361  * You may not use this file except in compliance with the License.
34362  *
34363  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34364  * or http://www.opensolaris.org/os/licensing.
34365  * See the License for the specific language governing permissions
34366  * and limitations under the License.
34367  *
34368  * When distributing Covered Code, include this CDDL HEADER in each
34369  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34370  * If applicable, add the following below this CDDL HEADER, with the
34371  * fields enclosed by brackets "[]" replaced with your own identifying
34372  * information: Portions Copyright [yyyy] [name of copyright owner]
34373  *
34374  * CDDL HEADER END
34375  */
34376 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34377 /*	  All Rights Reserved  	*/
34378 
34379 
34380 /*
34381  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34382  * Use is subject to license terms.
34383  *
34384  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34385  * Copyright 2016 Joyent, Inc.
34386  */
34387 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
34388 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 1
34389 /*
34390  * CDDL HEADER START
34391  *
34392  * The contents of this file are subject to the terms of the
34393  * Common Development and Distribution License (the "License").
34394  * You may not use this file except in compliance with the License.
34395  *
34396  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34397  * or http://www.opensolaris.org/os/licensing.
34398  * See the License for the specific language governing permissions
34399  * and limitations under the License.
34400  *
34401  * When distributing Covered Code, include this CDDL HEADER in each
34402  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34403  * If applicable, add the following below this CDDL HEADER, with the
34404  * fields enclosed by brackets "[]" replaced with your own identifying
34405  * information: Portions Copyright [yyyy] [name of copyright owner]
34406  *
34407  * CDDL HEADER END
34408  */
34409 /*
34410  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
34411  * Copyright 2013, Joyent, Inc. All rights reserved.
34412  * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
34413  * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
34414  */
34415 
34416 
34417 
34418 
34419 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34420 /*
34421  * CDDL HEADER START
34422  *
34423  * The contents of this file are subject to the terms of the
34424  * Common Development and Distribution License (the "License").
34425  * You may not use this file except in compliance with the License.
34426  *
34427  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34428  * or http://www.opensolaris.org/os/licensing.
34429  * See the License for the specific language governing permissions
34430  * and limitations under the License.
34431  *
34432  * When distributing Covered Code, include this CDDL HEADER in each
34433  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34434  * If applicable, add the following below this CDDL HEADER, with the
34435  * fields enclosed by brackets "[]" replaced with your own identifying
34436  * information: Portions Copyright [yyyy] [name of copyright owner]
34437  *
34438  * CDDL HEADER END
34439  */
34440 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34441 /*	  All Rights Reserved  	*/
34442 
34443 
34444 /*
34445  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34446  * Use is subject to license terms.
34447  *
34448  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34449  * Copyright 2016 Joyent, Inc.
34450  */
34451 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
34452 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
34453 /*
34454  * CDDL HEADER START
34455  *
34456  * The contents of this file are subject to the terms of the
34457  * Common Development and Distribution License (the "License").
34458  * You may not use this file except in compliance with the License.
34459  *
34460  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34461  * or http://www.opensolaris.org/os/licensing.
34462  * See the License for the specific language governing permissions
34463  * and limitations under the License.
34464  *
34465  * When distributing Covered Code, include this CDDL HEADER in each
34466  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34467  * If applicable, add the following below this CDDL HEADER, with the
34468  * fields enclosed by brackets "[]" replaced with your own identifying
34469  * information: Portions Copyright [yyyy] [name of copyright owner]
34470  *
34471  * CDDL HEADER END
34472  */
34473 /*
34474  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
34475  */
34476 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
34477 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
34478 /*
34479  * CDDL HEADER START
34480  *
34481  * The contents of this file are subject to the terms of the
34482  * Common Development and Distribution License (the "License").
34483  * You may not use this file except in compliance with the License.
34484  *
34485  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34486  * or http://www.opensolaris.org/os/licensing.
34487  * See the License for the specific language governing permissions
34488  * and limitations under the License.
34489  *
34490  * When distributing Covered Code, include this CDDL HEADER in each
34491  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34492  * If applicable, add the following below this CDDL HEADER, with the
34493  * fields enclosed by brackets "[]" replaced with your own identifying
34494  * information: Portions Copyright [yyyy] [name of copyright owner]
34495  *
34496  * CDDL HEADER END
34497  */
34498 
34499 /*
34500  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
34501  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
34502  */
34503 
34504 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
34505 /*	  All Rights Reserved  	*/
34506 
34507 /*
34508  * University Copyright- Copyright (c) 1982, 1986, 1988
34509  * The Regents of the University of California
34510  * All Rights Reserved
34511  *
34512  * University Acknowledgment- Portions of this document are derived from
34513  * software developed by the University of California, Berkeley, and its
34514  * contributors.
34515  */
34516 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
34517 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
34518 /*
34519  * CDDL HEADER START
34520  *
34521  * The contents of this file are subject to the terms of the
34522  * Common Development and Distribution License (the "License").
34523  * You may not use this file except in compliance with the License.
34524  *
34525  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34526  * or http://www.opensolaris.org/os/licensing.
34527  * See the License for the specific language governing permissions
34528  * and limitations under the License.
34529  *
34530  * When distributing Covered Code, include this CDDL HEADER in each
34531  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34532  * If applicable, add the following below this CDDL HEADER, with the
34533  * fields enclosed by brackets "[]" replaced with your own identifying
34534  * information: Portions Copyright [yyyy] [name of copyright owner]
34535  *
34536  * CDDL HEADER END
34537  */
34538 /*
34539  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
34540  */
34541 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
34542 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ipc_rctl.h" 1
34543 /*
34544  * CDDL HEADER START
34545  *
34546  * The contents of this file are subject to the terms of the
34547  * Common Development and Distribution License (the "License").
34548  * You may not use this file except in compliance with the License.
34549  *
34550  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34551  * or http://www.opensolaris.org/os/licensing.
34552  * See the License for the specific language governing permissions
34553  * and limitations under the License.
34554  *
34555  * When distributing Covered Code, include this CDDL HEADER in each
34556  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34557  * If applicable, add the following below this CDDL HEADER, with the
34558  * fields enclosed by brackets "[]" replaced with your own identifying
34559  * information: Portions Copyright [yyyy] [name of copyright owner]
34560  *
34561  * CDDL HEADER END
34562  */
34563 /*
34564  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
34565  * Use is subject to license terms.
34566  */
34567 
34568 
34569 
34570 
34571 #pragma ident "%Z%%M%	%I%	%E% SMI"
34572 
34573 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
34574 /*
34575  * CDDL HEADER START
34576  *
34577  * The contents of this file are subject to the terms of the
34578  * Common Development and Distribution License (the "License").
34579  * You may not use this file except in compliance with the License.
34580  *
34581  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34582  * or http://www.opensolaris.org/os/licensing.
34583  * See the License for the specific language governing permissions
34584  * and limitations under the License.
34585  *
34586  * When distributing Covered Code, include this CDDL HEADER in each
34587  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34588  * If applicable, add the following below this CDDL HEADER, with the
34589  * fields enclosed by brackets "[]" replaced with your own identifying
34590  * information: Portions Copyright [yyyy] [name of copyright owner]
34591  *
34592  * CDDL HEADER END
34593  */
34594 /*
34595  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
34596  */
34597 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ipc_rctl.h" 2
34598 
34599 
34600 
34601 
34602 
34603 typedef struct ipc_rqty { /* datum protected by:	*/
34604  rctl_qty_t ipcq_shmmni; /* shm's ipcs_lock	*/
34605  rctl_qty_t ipcq_semmni; /* sem's ipcs_lock	*/
34606  rctl_qty_t ipcq_msgmni; /* msg's ipcs_lock	*/
34607 } ipc_rqty_t;
34608 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
34609 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 1
34610 /*
34611  * CDDL HEADER START
34612  *
34613  * The contents of this file are subject to the terms of the
34614  * Common Development and Distribution License (the "License").
34615  * You may not use this file except in compliance with the License.
34616  *
34617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34618  * or http://www.opensolaris.org/os/licensing.
34619  * See the License for the specific language governing permissions
34620  * and limitations under the License.
34621  *
34622  * When distributing Covered Code, include this CDDL HEADER in each
34623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34624  * If applicable, add the following below this CDDL HEADER, with the
34625  * fields enclosed by brackets "[]" replaced with your own identifying
34626  * information: Portions Copyright [yyyy] [name of copyright owner]
34627  *
34628  * CDDL HEADER END
34629  */
34630 /*
34631  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
34632  *
34633  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34634  * Use is subject to license terms.
34635  */
34636 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h"
34637 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34638 /*
34639  * CDDL HEADER START
34640  *
34641  * The contents of this file are subject to the terms of the
34642  * Common Development and Distribution License (the "License").
34643  * You may not use this file except in compliance with the License.
34644  *
34645  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34646  * or http://www.opensolaris.org/os/licensing.
34647  * See the License for the specific language governing permissions
34648  * and limitations under the License.
34649  *
34650  * When distributing Covered Code, include this CDDL HEADER in each
34651  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34652  * If applicable, add the following below this CDDL HEADER, with the
34653  * fields enclosed by brackets "[]" replaced with your own identifying
34654  * information: Portions Copyright [yyyy] [name of copyright owner]
34655  *
34656  * CDDL HEADER END
34657  */
34658 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34659 /*	  All Rights Reserved  	*/
34660 
34661 
34662 /*
34663  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34664  * Use is subject to license terms.
34665  *
34666  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34667  * Copyright 2016 Joyent, Inc.
34668  */
34669 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
34670 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 1
34671 /*
34672  * CDDL HEADER START
34673  *
34674  * The contents of this file are subject to the terms of the
34675  * Common Development and Distribution License (the "License").
34676  * You may not use this file except in compliance with the License.
34677  *
34678  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34679  * or http://www.opensolaris.org/os/licensing.
34680  * See the License for the specific language governing permissions
34681  * and limitations under the License.
34682  *
34683  * When distributing Covered Code, include this CDDL HEADER in each
34684  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34685  * If applicable, add the following below this CDDL HEADER, with the
34686  * fields enclosed by brackets "[]" replaced with your own identifying
34687  * information: Portions Copyright [yyyy] [name of copyright owner]
34688  *
34689  * CDDL HEADER END
34690  */
34691 /*
34692  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
34693  *	  All Rights Reserved
34694  *
34695  */
34696 
34697 /*
34698  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
34699  *
34700  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
34701  * Use is subject to license terms.
34702  */
34703 
34704 
34705 
34706 
34707 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34708 /*
34709  * CDDL HEADER START
34710  *
34711  * The contents of this file are subject to the terms of the
34712  * Common Development and Distribution License (the "License").
34713  * You may not use this file except in compliance with the License.
34714  *
34715  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34716  * or http://www.opensolaris.org/os/licensing.
34717  * See the License for the specific language governing permissions
34718  * and limitations under the License.
34719  *
34720  * When distributing Covered Code, include this CDDL HEADER in each
34721  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34722  * If applicable, add the following below this CDDL HEADER, with the
34723  * fields enclosed by brackets "[]" replaced with your own identifying
34724  * information: Portions Copyright [yyyy] [name of copyright owner]
34725  *
34726  * CDDL HEADER END
34727  */
34728 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34729 /*	  All Rights Reserved  	*/
34730 
34731 
34732 /*
34733  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34734  * Use is subject to license terms.
34735  *
34736  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34737  * Copyright 2016 Joyent, Inc.
34738  */
34739 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 2
34740 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
34741 /*
34742  * CDDL HEADER START
34743  *
34744  * The contents of this file are subject to the terms of the
34745  * Common Development and Distribution License, Version 1.0 only
34746  * (the "License").  You may not use this file except in compliance
34747  * with the License.
34748  *
34749  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34750  * or http://www.opensolaris.org/os/licensing.
34751  * See the License for the specific language governing permissions
34752  * and limitations under the License.
34753  *
34754  * When distributing Covered Code, include this CDDL HEADER in each
34755  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34756  * If applicable, add the following below this CDDL HEADER, with the
34757  * fields enclosed by brackets "[]" replaced with your own identifying
34758  * information: Portions Copyright [yyyy] [name of copyright owner]
34759  *
34760  * CDDL HEADER END
34761  */
34762 /*
34763  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
34764  * Use is subject to license terms.
34765  */
34766 
34767 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34768 /*	  All Rights Reserved  	*/
34769 
34770 
34771 
34772 
34773 
34774 #pragma ident "%Z%%M%	%I%	%E% SMI"
34775 
34776 
34777 
34778 
34779 
34780 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
34781 /*
34782  * CDDL HEADER START
34783  *
34784  * The contents of this file are subject to the terms of the
34785  * Common Development and Distribution License (the "License").
34786  * You may not use this file except in compliance with the License.
34787  *
34788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34789  * or http://www.opensolaris.org/os/licensing.
34790  * See the License for the specific language governing permissions
34791  * and limitations under the License.
34792  *
34793  * When distributing Covered Code, include this CDDL HEADER in each
34794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34795  * If applicable, add the following below this CDDL HEADER, with the
34796  * fields enclosed by brackets "[]" replaced with your own identifying
34797  * information: Portions Copyright [yyyy] [name of copyright owner]
34798  *
34799  * CDDL HEADER END
34800  */
34801 
34802 /*
34803  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
34804  * Copyright 2016 Joyent, Inc.
34805  *
34806  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
34807  * Use is subject to license terms.
34808  */
34809 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
34810 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34811 /*
34812  * CDDL HEADER START
34813  *
34814  * The contents of this file are subject to the terms of the
34815  * Common Development and Distribution License (the "License").
34816  * You may not use this file except in compliance with the License.
34817  *
34818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34819  * or http://www.opensolaris.org/os/licensing.
34820  * See the License for the specific language governing permissions
34821  * and limitations under the License.
34822  *
34823  * When distributing Covered Code, include this CDDL HEADER in each
34824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34825  * If applicable, add the following below this CDDL HEADER, with the
34826  * fields enclosed by brackets "[]" replaced with your own identifying
34827  * information: Portions Copyright [yyyy] [name of copyright owner]
34828  *
34829  * CDDL HEADER END
34830  */
34831 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34832 /*	  All Rights Reserved  	*/
34833 
34834 
34835 /*
34836  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34837  * Use is subject to license terms.
34838  *
34839  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34840  * Copyright 2016 Joyent, Inc.
34841  */
34842 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
34843 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
34844 /*
34845  * CDDL HEADER START
34846  *
34847  * The contents of this file are subject to the terms of the
34848  * Common Development and Distribution License (the "License").
34849  * You may not use this file except in compliance with the License.
34850  *
34851  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34852  * or http://www.opensolaris.org/os/licensing.
34853  * See the License for the specific language governing permissions
34854  * and limitations under the License.
34855  *
34856  * When distributing Covered Code, include this CDDL HEADER in each
34857  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34858  * If applicable, add the following below this CDDL HEADER, with the
34859  * fields enclosed by brackets "[]" replaced with your own identifying
34860  * information: Portions Copyright [yyyy] [name of copyright owner]
34861  *
34862  * CDDL HEADER END
34863  */
34864 
34865 /*
34866  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
34867  * Use is subject to license terms.
34868  */
34869 
34870 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34871 /*	  All Rights Reserved  	*/
34872 
34873 /*
34874  * University Copyright- Copyright (c) 1982, 1986, 1988
34875  * The Regents of the University of California
34876  * All Rights Reserved
34877  *
34878  * University Acknowledgment- Portions of this document are derived from
34879  * software developed by the University of California, Berkeley, and its
34880  * contributors.
34881  */
34882 
34883 
34884 
34885 
34886 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
34887 /*
34888  * CDDL HEADER START
34889  *
34890  * The contents of this file are subject to the terms of the
34891  * Common Development and Distribution License (the "License").
34892  * You may not use this file except in compliance with the License.
34893  *
34894  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34895  * or http://www.opensolaris.org/os/licensing.
34896  * See the License for the specific language governing permissions
34897  * and limitations under the License.
34898  *
34899  * When distributing Covered Code, include this CDDL HEADER in each
34900  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34901  * If applicable, add the following below this CDDL HEADER, with the
34902  * fields enclosed by brackets "[]" replaced with your own identifying
34903  * information: Portions Copyright [yyyy] [name of copyright owner]
34904  *
34905  * CDDL HEADER END
34906  */
34907 
34908 /*
34909  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
34910  * Copyright 2016 Joyent, Inc.
34911  *
34912  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
34913  * Use is subject to license terms.
34914  */
34915 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
34916 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
34917 /*
34918  * CDDL HEADER START
34919  *
34920  * The contents of this file are subject to the terms of the
34921  * Common Development and Distribution License (the "License").
34922  * You may not use this file except in compliance with the License.
34923  *
34924  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34925  * or http://www.opensolaris.org/os/licensing.
34926  * See the License for the specific language governing permissions
34927  * and limitations under the License.
34928  *
34929  * When distributing Covered Code, include this CDDL HEADER in each
34930  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34931  * If applicable, add the following below this CDDL HEADER, with the
34932  * fields enclosed by brackets "[]" replaced with your own identifying
34933  * information: Portions Copyright [yyyy] [name of copyright owner]
34934  *
34935  * CDDL HEADER END
34936  */
34937 
34938 /*
34939  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
34940  * Use is subject to license terms.
34941  */
34942 
34943 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34944 /*	  All Rights Reserved  	*/
34945 
34946 /*
34947  * An application should not include this header directly.  Instead it
34948  * should be included only through the inclusion of other Sun headers.
34949  *
34950  * The contents of this header is limited to identifiers specified in the
34951  * C Standard.  Any new identifiers specified in future amendments to the
34952  * C Standard must be placed in this header.  If these new identifiers
34953  * are required to also be in the C++ Standard "std" namespace, then for
34954  * anything other than macro definitions, corresponding "using" directives
34955  * must also be added to <sys/signal.h.h>.
34956  */
34957 
34958 
34959 
34960 
34961 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
34962 /*
34963  * CDDL HEADER START
34964  *
34965  * The contents of this file are subject to the terms of the
34966  * Common Development and Distribution License (the "License").
34967  * You may not use this file except in compliance with the License.
34968  *
34969  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34970  * or http://www.opensolaris.org/os/licensing.
34971  * See the License for the specific language governing permissions
34972  * and limitations under the License.
34973  *
34974  * When distributing Covered Code, include this CDDL HEADER in each
34975  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34976  * If applicable, add the following below this CDDL HEADER, with the
34977  * fields enclosed by brackets "[]" replaced with your own identifying
34978  * information: Portions Copyright [yyyy] [name of copyright owner]
34979  *
34980  * CDDL HEADER END
34981  */
34982 
34983 /*
34984  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
34985  *	  All Rights Reserved
34986  *
34987  */
34988 
34989 /*
34990  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34991  * Use is subject to license terms.
34992  */
34993 
34994 /*
34995  * WARNING: This is an implementation-specific header,
34996  * its contents are not guaranteed. Applications
34997  * should include <unistd.h> and not this header.
34998  */
34999 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 2
35000 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h"
35001 /* insert new signals here, and move _SIGRTM* appropriately */
35002 
35003 
35004 extern long _sysconf(int); /* System Private interface to sysconf() */
35005 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
35006 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
35007 /*
35008  * We need <sys/siginfo.h> for the declaration of siginfo_t.
35009  */
35010 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
35011 /*
35012  * CDDL HEADER START
35013  *
35014  * The contents of this file are subject to the terms of the
35015  * Common Development and Distribution License, Version 1.0 only
35016  * (the "License").  You may not use this file except in compliance
35017  * with the License.
35018  *
35019  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35020  * or http://www.opensolaris.org/os/licensing.
35021  * See the License for the specific language governing permissions
35022  * and limitations under the License.
35023  *
35024  * When distributing Covered Code, include this CDDL HEADER in each
35025  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35026  * If applicable, add the following below this CDDL HEADER, with the
35027  * fields enclosed by brackets "[]" replaced with your own identifying
35028  * information: Portions Copyright [yyyy] [name of copyright owner]
35029  *
35030  * CDDL HEADER END
35031  */
35032 /*
35033  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
35034  * Use is subject to license terms.
35035  */
35036 
35037 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
35038 /*	  All Rights Reserved  	*/
35039 
35040 
35041 
35042 
35043 #pragma ident "%Z%%M%	%I%	%E% SMI"
35044 
35045 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
35046 /*
35047  * CDDL HEADER START
35048  *
35049  * The contents of this file are subject to the terms of the
35050  * Common Development and Distribution License (the "License").
35051  * You may not use this file except in compliance with the License.
35052  *
35053  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35054  * or http://www.opensolaris.org/os/licensing.
35055  * See the License for the specific language governing permissions
35056  * and limitations under the License.
35057  *
35058  * When distributing Covered Code, include this CDDL HEADER in each
35059  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35060  * If applicable, add the following below this CDDL HEADER, with the
35061  * fields enclosed by brackets "[]" replaced with your own identifying
35062  * information: Portions Copyright [yyyy] [name of copyright owner]
35063  *
35064  * CDDL HEADER END
35065  */
35066 
35067 /*
35068  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
35069  * Copyright 2016 Joyent, Inc.
35070  *
35071  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
35072  * Use is subject to license terms.
35073  */
35074 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
35075 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
35076 /*
35077  * CDDL HEADER START
35078  *
35079  * The contents of this file are subject to the terms of the
35080  * Common Development and Distribution License (the "License").
35081  * You may not use this file except in compliance with the License.
35082  *
35083  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35084  * or http://www.opensolaris.org/os/licensing.
35085  * See the License for the specific language governing permissions
35086  * and limitations under the License.
35087  *
35088  * When distributing Covered Code, include this CDDL HEADER in each
35089  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35090  * If applicable, add the following below this CDDL HEADER, with the
35091  * fields enclosed by brackets "[]" replaced with your own identifying
35092  * information: Portions Copyright [yyyy] [name of copyright owner]
35093  *
35094  * CDDL HEADER END
35095  */
35096 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
35097 /*	  All Rights Reserved  	*/
35098 
35099 
35100 /*
35101  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35102  * Use is subject to license terms.
35103  *
35104  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
35105  * Copyright 2016 Joyent, Inc.
35106  */
35107 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
35108 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35109 /*
35110  * The union sigval is also defined in <time.h> as per X/Open and
35111  * POSIX requirements.
35112  */
35113 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35114 /*
35115  * The sigevent structure is also defined in <time.h> as per X/Open and
35116  * POSIX requirements.
35117  */
35118 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35119 /* values of sigev_notify */
35120 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35121 /*
35122  * negative signal codes are reserved for future use for user generated
35123  * signals
35124  */
35125 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35126 /*
35127  * Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
35128  * SIGBUS) from <sys/machsig.h>
35129  */
35130 
35131 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 1
35132 /*
35133  * CDDL HEADER START
35134  *
35135  * The contents of this file are subject to the terms of the
35136  * Common Development and Distribution License, Version 1.0 only
35137  * (the "License").  You may not use this file except in compliance
35138  * with the License.
35139  *
35140  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35141  * or http://www.opensolaris.org/os/licensing.
35142  * See the License for the specific language governing permissions
35143  * and limitations under the License.
35144  *
35145  * When distributing Covered Code, include this CDDL HEADER in each
35146  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35147  * If applicable, add the following below this CDDL HEADER, with the
35148  * fields enclosed by brackets "[]" replaced with your own identifying
35149  * information: Portions Copyright [yyyy] [name of copyright owner]
35150  *
35151  * CDDL HEADER END
35152  */
35153 /*
35154  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
35155  * Use is subject to license terms.
35156  */
35157 
35158 /*	Copyright (c) 1988 AT&T	*/
35159 /*	  All Rights Reserved  	*/
35160 
35161 
35162 
35163 
35164 
35165 #pragma ident "%Z%%M%	%I%	%E% SMI"
35166 
35167 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
35168 /*
35169  * CDDL HEADER START
35170  *
35171  * The contents of this file are subject to the terms of the
35172  * Common Development and Distribution License (the "License").
35173  * You may not use this file except in compliance with the License.
35174  *
35175  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35176  * or http://www.opensolaris.org/os/licensing.
35177  * See the License for the specific language governing permissions
35178  * and limitations under the License.
35179  *
35180  * When distributing Covered Code, include this CDDL HEADER in each
35181  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35182  * If applicable, add the following below this CDDL HEADER, with the
35183  * fields enclosed by brackets "[]" replaced with your own identifying
35184  * information: Portions Copyright [yyyy] [name of copyright owner]
35185  *
35186  * CDDL HEADER END
35187  */
35188 
35189 /*
35190  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
35191  * Copyright 2016 Joyent, Inc.
35192  *
35193  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
35194  * Use is subject to license terms.
35195  */
35196 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
35197 
35198 
35199 
35200 
35201 
35202 /*
35203  * machsig.h is the machine dependent portion of siginfo.h (and is
35204  * included by siginfo.h). A version of machsig.h should exist for
35205  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
35206  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
35207  * SIGPOLL are architecture independent and may be found in siginfo.h.
35208  */
35209 
35210 
35211 
35212 
35213 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h" 1
35214 /*
35215  * CDDL HEADER START
35216  *
35217  * The contents of this file are subject to the terms of the
35218  * Common Development and Distribution License (the "License").
35219  * You may not use this file except in compliance with the License.
35220  *
35221  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35222  * or http://www.opensolaris.org/os/licensing.
35223  * See the License for the specific language governing permissions
35224  * and limitations under the License.
35225  *
35226  * When distributing Covered Code, include this CDDL HEADER in each
35227  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35228  * If applicable, add the following below this CDDL HEADER, with the
35229  * fields enclosed by brackets "[]" replaced with your own identifying
35230  * information: Portions Copyright [yyyy] [name of copyright owner]
35231  *
35232  * CDDL HEADER END
35233  */
35234 /*
35235  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
35236  * Use is subject to license terms.
35237  */
35238 
35239 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
35240 /*	  All Rights Reserved  	*/
35241 
35242 /*
35243  * University Copyright- Copyright (c) 1982, 1986, 1988
35244  * The Regents of the University of California
35245  * All Rights Reserved
35246  *
35247  * University Acknowledgment- Portions of this document are derived from
35248  * software developed by the University of California, Berkeley, and its
35249  * contributors.
35250  */
35251 
35252 
35253 
35254 
35255 #pragma ident "%Z%%M%	%I%	%E% SMI"
35256 
35257 
35258 
35259 
35260 
35261 /*
35262  * This file describes the data type returned by vm routines
35263  * which handle faults.
35264  *
35265  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
35266  * returned by the underlying object mapped at the fault address.
35267  */
35268 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h"
35269 typedef int faultcode_t; /* type returned by vm fault routines */
35270 
35271 extern int fc_decode(faultcode_t);
35272 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
35273 
35274 
35275 /*
35276  * SIGILL signal codes
35277  */
35278 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
35279 /*
35280  * SIGEMT signal codes
35281  */
35282 
35283 
35284 
35285 
35286 
35287 
35288 /*
35289  * SIGFPE signal codes
35290  */
35291 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
35292 /*
35293  * SIGSEGV signal codes
35294  */
35295 
35296 
35297 
35298 
35299 
35300 
35301 
35302 /*
35303  * SIGBUS signal codes
35304  */
35305 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
35306 
35307 /*
35308  * SIGTRAP signal codes
35309  */
35310 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35311 /*
35312  * SIGCLD signal codes
35313  */
35314 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35315 /*
35316  * SIGPOLL signal codes
35317  */
35318 # 195 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35319 /*
35320  * SIGPROF signal codes
35321  */
35322 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35323 /*
35324  * Inclusion of <sys/time_impl.h> is needed for the declaration of
35325  * timestruc_t.  However, since inclusion of <sys/time_impl.h> results
35326  * in X/Open and POSIX namespace pollution, the definition for
35327  * timestruct_t has been duplicated in a standards namespace safe header
35328  * <sys/time_std_impl.h>.  In <sys/time_std_impl.h>, the structure
35329  * name, tag, and member names, as well as the type itself, all have
35330  * leading underscores to protect namespace.
35331  */
35332 
35333 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
35334 /*
35335  * CDDL HEADER START
35336  *
35337  * The contents of this file are subject to the terms of the
35338  * Common Development and Distribution License, Version 1.0 only
35339  * (the "License").  You may not use this file except in compliance
35340  * with the License.
35341  *
35342  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35343  * or http://www.opensolaris.org/os/licensing.
35344  * See the License for the specific language governing permissions
35345  * and limitations under the License.
35346  *
35347  * When distributing Covered Code, include this CDDL HEADER in each
35348  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35349  * If applicable, add the following below this CDDL HEADER, with the
35350  * fields enclosed by brackets "[]" replaced with your own identifying
35351  * information: Portions Copyright [yyyy] [name of copyright owner]
35352  *
35353  * CDDL HEADER END
35354  */
35355 /*
35356  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
35357  * Use is subject to license terms.
35358  */
35359 
35360 /*
35361  * Implementation-private.  This header should not be included
35362  * directly by an application.  The application should instead
35363  * include <time.h> which includes this header conditionally
35364  * depending on which feature test macros are defined. By default,
35365  * this header is included by <time.h>.  X/Open and POSIX
35366  * standards requirements result in this header being included
35367  * by <time.h> only under a restricted set of conditions.
35368  */
35369 # 226 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
35370 
35371 
35372 
35373 
35374 /*
35375  * The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
35376  * Placement here is due to a dependency in <sys/select.h> which is included
35377  * by <sys/types.h> for the sigevent structure.  Hence this inclusion must
35378  * follow that definition.
35379  */
35380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
35381 /*
35382  * CDDL HEADER START
35383  *
35384  * The contents of this file are subject to the terms of the
35385  * Common Development and Distribution License (the "License").
35386  * You may not use this file except in compliance with the License.
35387  *
35388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35389  * or http://www.opensolaris.org/os/licensing.
35390  * See the License for the specific language governing permissions
35391  * and limitations under the License.
35392  *
35393  * When distributing Covered Code, include this CDDL HEADER in each
35394  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35395  * If applicable, add the following below this CDDL HEADER, with the
35396  * fields enclosed by brackets "[]" replaced with your own identifying
35397  * information: Portions Copyright [yyyy] [name of copyright owner]
35398  *
35399  * CDDL HEADER END
35400  */
35401 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
35402 /*	  All Rights Reserved  	*/
35403 
35404 
35405 /*
35406  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35407  * Use is subject to license terms.
35408  *
35409  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
35410  * Copyright 2016 Joyent, Inc.
35411  */
35412 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
35413 
35414 
35415 typedef struct siginfo { /* pollutes POSIX/XOPEN namespace */
35416 
35417 
35418 
35419  int si_signo; /* signal from signal.h	*/
35420  int si_code; /* code from above	*/
35421  int si_errno; /* error from errno.h	*/
35422 
35423 
35424 
35425  union {
35426 
35427   int __pad[((128 / sizeof (int)) - 3)]; /* for future growth	*/
35428 
35429   struct { /* kill(), SIGCLD, siqqueue() */
35430    pid_t __pid; /* process ID		*/
35431    union {
35432     struct {
35433      uid_t __uid;
35434 
35435 
35436      union sigval __value;
35437 
35438 
35439 
35440     } __kill;
35441     struct {
35442      clock_t __utime;
35443      int __status;
35444      clock_t __stime;
35445     } __cld;
35446    } __pdata;
35447    ctid_t __ctid; /* contract ID		*/
35448    zoneid_t __zoneid; /* zone ID		*/
35449   } __proc;
35450 
35451   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
35452    void *__addr; /* faulting address	*/
35453    int __trapno; /* illegal trap number	*/
35454    caddr_t __pc; /* instruction address	*/
35455   } __fault;
35456 
35457   struct { /* SIGPOLL, SIGXFSZ	*/
35458   /* fd not currently available for SIGPOLL */
35459    int __fd; /* file descriptor	*/
35460    long __band;
35461   } __file;
35462 
35463   struct { /* SIGPROF */
35464    caddr_t __faddr; /* last fault address	*/
35465 
35466    timestruc_t __tstamp; /* real time stamp	*/
35467 
35468 
35469 
35470    short __syscall; /* current syscall	*/
35471    char __nsysarg; /* number of arguments	*/
35472    char __fault; /* last fault type	*/
35473    long __sysarg[8]; /* syscall arguments	*/
35474    int __mstate[10]; /* see <sys/msacct.h>	*/
35475   } __prof;
35476 
35477   struct { /* SI_RCTL */
35478    int32_t __entity; /* type of entity exceeding */
35479   } __rctl;
35480  } __data;
35481 
35482 } siginfo_t;
35483 # 374 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
35484 /*
35485  * XXX -- internal version is identical to siginfo_t but without the padding.
35486  * This must be maintained in sync with it.
35487  */
35488 
35489 
35490 
35491 typedef struct k_siginfo {
35492  int si_signo; /* signal from signal.h	*/
35493  int si_code; /* code from above	*/
35494  int si_errno; /* error from errno.h	*/
35495 
35496 
35497 
35498  union {
35499   struct { /* kill(), SIGCLD, siqqueue() */
35500    pid_t __pid; /* process ID		*/
35501    union {
35502     struct {
35503      uid_t __uid;
35504      union sigval __value;
35505     } __kill;
35506     struct {
35507      clock_t __utime;
35508      int __status;
35509      clock_t __stime;
35510     } __cld;
35511    } __pdata;
35512    ctid_t __ctid; /* contract ID		*/
35513    zoneid_t __zoneid; /* zone ID		*/
35514   } __proc;
35515 
35516   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
35517    void *__addr; /* faulting address	*/
35518    int __trapno; /* illegal trap number	*/
35519    caddr_t __pc; /* instruction address	*/
35520   } __fault;
35521 
35522   struct { /* SIGPOLL, SIGXFSZ	*/
35523   /* fd not currently available for SIGPOLL */
35524    int __fd; /* file descriptor	*/
35525    long __band;
35526   } __file;
35527 
35528   struct { /* SIGPROF */
35529    caddr_t __faddr; /* last fault address	*/
35530 
35531 
35532    timestruc_t __tstamp; /* real time stamp	*/
35533 
35534 
35535 
35536    short __syscall; /* current syscall	*/
35537    char __nsysarg; /* number of arguments	*/
35538    char __fault; /* last fault type	*/
35539    /* these are omitted to keep k_siginfo_t small	*/
35540    /* long	__sysarg[8]; */
35541    /* int	__mstate[10]; */
35542   } __prof;
35543 
35544   struct { /* SI_RCTL */
35545    int32_t __entity; /* type of entity exceeding */
35546   } __rctl;
35547 
35548  } __data;
35549 
35550 } k_siginfo_t;
35551 
35552 typedef struct sigqueue {
35553  struct sigqueue *sq_next;
35554  k_siginfo_t sq_info;
35555  void (*sq_func)(struct sigqueue *); /* destructor function */
35556  void *sq_backptr; /* pointer to the data structure */
35557      /* associated by sq_func()	*/
35558  int sq_external; /* comes from outside the contract */
35559 } sigqueue_t;
35560 
35561 /*  indication whether to queue the signal or not */
35562 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
35563 
35564 
35565 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements */
35566 
35567 
35568 
35569 
35570 
35571 
35572 
35573 typedef struct {
35574  unsigned int __sigbits[3];
35575 } k_sigset_t;
35576 
35577 /*
35578  * The signal handler routine can have either one or three arguments.
35579  * Existing C code has used either form so not specifing the arguments
35580  * neatly finesses the problem.  C++ doesn't accept this.  To C++
35581  * "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
35582  * specify this as "(*sa_handler)(void)").  One or the other form must be
35583  * used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
35584  * the SIG_* defines to work.  "(*sa_sigaction)(int, siginfo_t *, void *)"
35585  * can be used for the three argument form.
35586  */
35587 
35588 /*
35589  * Note: storage overlap by sa_handler and sa_sigaction
35590  */
35591 struct sigaction {
35592  int sa_flags;
35593  union {
35594 
35595 
35596 
35597   void (*_handler)();
35598 
35599 
35600 
35601 
35602   void (*_sigaction)(int, siginfo_t *, void *);
35603 
35604  } _funcptr;
35605  sigset_t sa_mask;
35606 
35607  int sa_resv[2];
35608 
35609 };
35610 # 126 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
35611 /* this is only valid for SIGCLD */
35612 
35613 
35614 
35615 
35616 
35617 
35618 
35619    /* non-conformant ANSI compilation	*/
35620 
35621 /* definitions for the sa_flags field */
35622 # 153 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
35623 /* this is only valid for SIGCLD */
35624 
35625 
35626 
35627 /*
35628  * use of these symbols by applications is injurious
35629  *	to binary compatibility
35630  */
35631 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
35632 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements. */
35633 
35634 
35635 
35636 typedef struct sigaltstack {
35637 
35638 
35639 
35640  void *ss_sp;
35641  size_t ss_size;
35642  int ss_flags;
35643 } stack_t;
35644 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
35645 /* signotify id used only by libc for mq_notify()/aio_notify() */
35646 typedef struct signotify_id { /* signotify id struct		*/
35647  pid_t sn_pid; /* pid of proc to be notified	*/
35648  int sn_index; /* index in preallocated pool	*/
35649  int sn_pad; /* reserved			*/
35650 } signotify_id_t;
35651 # 222 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
35652 /* Command codes for sig_notify call */
35653 
35654 
35655 
35656 
35657 
35658 
35659 
35660 /* Added as per XPG4v2 */
35661 
35662 
35663 
35664 struct sigstack {
35665  void *ss_sp;
35666  int ss_onstack;
35667 };
35668 
35669 
35670 /*
35671  * For definition of ucontext_t; must follow struct definition
35672  * for  sigset_t
35673  */
35674 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
35675 
35676 /*
35677  *	This file defines the data needed to specify a set of
35678  *	processes.  These types are used by the sigsend, sigsendset,
35679  *	priocntl, priocntlset, waitid, evexit, and evexitset system
35680  *	calls.
35681  */
35682 
35683 
35684 
35685 
35686 
35687 /*
35688  *	The following defines the values for an identifier type.  It
35689  *	specifies the interpretation of an id value.  An idtype and
35690  *	id together define a simple set of processes.
35691  */
35692 typedef enum
35693 
35694  idtype /* pollutes XPG4.2 namespace */
35695 
35696   {
35697  P_PID, /* A process identifier.		*/
35698  P_PPID, /* A parent process identifier.		*/
35699  P_PGID, /* A process group (job control group)	*/
35700    /* identifier.				*/
35701  P_SID, /* A session identifier.		*/
35702  P_CID, /* A scheduling class identifier.	*/
35703  P_UID, /* A user identifier.			*/
35704  P_GID, /* A group identifier.			*/
35705  P_ALL, /* All processes.			*/
35706  P_LWPID, /* An LWP identifier.			*/
35707  P_TASKID, /* A task identifier.			*/
35708  P_PROJID, /* A project identifier.		*/
35709  P_POOLID, /* A pool identifier.			*/
35710  P_ZONEID, /* A zone identifier.			*/
35711  P_CTID, /* A (process) contract identifier.	*/
35712  P_CPUID, /* CPU identifier.			*/
35713  P_PSETID /* Processor set identifier		*/
35714 } idtype_t;
35715 
35716 
35717 /*
35718  *	The following defines the operations which can be performed to
35719  *	combine two simple sets of processes to form another set of
35720  *	processes.
35721  */
35722 
35723 typedef enum idop {
35724  POP_DIFF, /* Set difference.  The processes which	*/
35725    /* are in the left operand set and not	*/
35726    /* in the right operand set.		*/
35727  POP_AND, /* Set disjunction.  The processes	*/
35728    /* which are in both the left and right	*/
35729    /* operand sets.			*/
35730  POP_OR, /* Set conjunction.  The processes	*/
35731    /* which are in either the left or the	*/
35732    /* right operand sets (or both).	*/
35733  POP_XOR /* Set exclusive or.  The processes 	*/
35734    /* which are in either the left or	*/
35735    /* right operand sets but not in both.	*/
35736 } idop_t;
35737 
35738 
35739 /*
35740  *	The following structure is used to define a set of processes.
35741  *	The set is defined in terms of two simple sets of processes
35742  *	and an operator which operates on these two operand sets.
35743  */
35744 typedef struct procset {
35745  idop_t p_op; /* The operator connection the	*/
35746     /* following two operands each	*/
35747     /* of which is a simple set of	*/
35748     /* processes.			*/
35749 
35750  idtype_t p_lidtype;
35751     /* The type of the left operand	*/
35752     /* simple set.			*/
35753  id_t p_lid; /* The id of the left operand.	*/
35754 
35755  idtype_t p_ridtype;
35756     /* The type of the right	*/
35757     /* operand simple set.		*/
35758  id_t p_rid; /* The id of the right operand.	*/
35759 } procset_t;
35760 
35761 /*
35762  *	The following macro can be used to initialize a procset_t
35763  *	structure.
35764  */
35765 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 2
35766 
35767 
35768 
35769 
35770 
35771 /*
35772  * Definitions for p_online, processor_info & lgrp system calls.
35773  */
35774 
35775 /*
35776  * Type for an lgrpid
35777  */
35778 typedef uint16_t lgrpid_t;
35779 
35780 /*
35781  * Type for processor name (CPU number).
35782  */
35783 typedef int processorid_t;
35784 typedef int chipid_t;
35785 
35786 /*
35787  * Flags and return values for p_online(2), and pi_state for processor_info(2).
35788  * These flags are *not* for in-kernel examination of CPU states.
35789  * See <sys/cpuvar.h> for appropriate informational functions.
35790  */
35791 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h"
35792 /*
35793  * String names for processor states defined above.
35794  */
35795 
35796 
35797 
35798 
35799 
35800 
35801 
35802 /*
35803  * Structure filled in by processor_info(2). This structure
35804  * SHOULD NOT BE MODIFIED. Changes to the structure would
35805  * negate ABI compatibility.
35806  *
35807  * The string fields are guaranteed to contain a NULL.
35808  *
35809  * The pi_fputypes field contains a (possibly empty) comma-separated
35810  * list of floating point identifier strings.
35811  */
35812 
35813 
35814 
35815 typedef struct {
35816  int pi_state; /* processor state, see above */
35817  char pi_processor_type[16]; /* ASCII CPU type */
35818  char pi_fputypes[32]; /* ASCII FPU types */
35819  int pi_clock; /* CPU clock freq in MHz */
35820 } processor_info_t;
35821 
35822 /*
35823  * Binding values for processor_bind(2)
35824  */
35825 
35826 
35827 
35828 
35829 
35830 
35831 /*
35832  * User-level system call interface prototypes
35833  */
35834 
35835 
35836 extern int p_online(processorid_t processorid, int flag);
35837 extern int processor_info(processorid_t processorid,
35838       processor_info_t *infop);
35839 extern int processor_bind(idtype_t idtype, id_t id,
35840       processorid_t processorid, processorid_t *obind);
35841 extern processorid_t getcpuid(void);
35842 extern lgrpid_t gethomelgroup(void);
35843 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
35844 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
35845 /*
35846  * CDDL HEADER START
35847  *
35848  * The contents of this file are subject to the terms of the
35849  * Common Development and Distribution License, Version 1.0 only
35850  * (the "License").  You may not use this file except in compliance
35851  * with the License.
35852  *
35853  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35854  * or http://www.opensolaris.org/os/licensing.
35855  * See the License for the specific language governing permissions
35856  * and limitations under the License.
35857  *
35858  * When distributing Covered Code, include this CDDL HEADER in each
35859  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35860  * If applicable, add the following below this CDDL HEADER, with the
35861  * fields enclosed by brackets "[]" replaced with your own identifying
35862  * information: Portions Copyright [yyyy] [name of copyright owner]
35863  *
35864  * CDDL HEADER END
35865  */
35866 /*
35867  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
35868  * Use is subject to license terms.
35869  */
35870 
35871 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
35872 /*	  All Rights Reserved  	*/
35873 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
35874 
35875 typedef int psetid_t;
35876 
35877 /* special processor set id's */
35878 
35879 
35880 
35881 
35882 
35883 
35884 
35885 /* types of processor sets */
35886 
35887 
35888 
35889 
35890 
35891 extern int pset_create(psetid_t *);
35892 extern int pset_destroy(psetid_t);
35893 extern int pset_assign(psetid_t, processorid_t, psetid_t *);
35894 extern int pset_info(psetid_t, int *, uint_t *, processorid_t *);
35895 extern int pset_bind(psetid_t, idtype_t, id_t, psetid_t *);
35896 extern int pset_bind_lwp(psetid_t, id_t, pid_t, psetid_t *);
35897 extern int pset_getloadavg(psetid_t, double [], int);
35898 extern int pset_list(psetid_t *, uint_t *);
35899 extern int pset_setattr(psetid_t, uint_t);
35900 extern int pset_getattr(psetid_t, uint_t *);
35901 
35902 
35903 
35904 
35905 
35906 /* system call subcodes */
35907 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h"
35908 /* attribute bits */
35909 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
35910 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 1
35911 /*
35912  * CDDL HEADER START
35913  *
35914  * The contents of this file are subject to the terms of the
35915  * Common Development and Distribution License (the "License").
35916  * You may not use this file except in compliance with the License.
35917  *
35918  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35919  * or http://www.opensolaris.org/os/licensing.
35920  * See the License for the specific language governing permissions
35921  * and limitations under the License.
35922  *
35923  * When distributing Covered Code, include this CDDL HEADER in each
35924  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35925  * If applicable, add the following below this CDDL HEADER, with the
35926  * fields enclosed by brackets "[]" replaced with your own identifying
35927  * information: Portions Copyright [yyyy] [name of copyright owner]
35928  *
35929  * CDDL HEADER END
35930  */
35931 /*
35932  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35933  * Use is subject to license terms.
35934  */
35935 
35936 
35937 
35938 
35939 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
35940 /*
35941  * CDDL HEADER START
35942  *
35943  * The contents of this file are subject to the terms of the
35944  * Common Development and Distribution License (the "License").
35945  * You may not use this file except in compliance with the License.
35946  *
35947  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35948  * or http://www.opensolaris.org/os/licensing.
35949  * See the License for the specific language governing permissions
35950  * and limitations under the License.
35951  *
35952  * When distributing Covered Code, include this CDDL HEADER in each
35953  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35954  * If applicable, add the following below this CDDL HEADER, with the
35955  * fields enclosed by brackets "[]" replaced with your own identifying
35956  * information: Portions Copyright [yyyy] [name of copyright owner]
35957  *
35958  * CDDL HEADER END
35959  */
35960 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
35961 /*	  All Rights Reserved  	*/
35962 
35963 
35964 /*
35965  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35966  * Use is subject to license terms.
35967  *
35968  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
35969  * Copyright 2016 Joyent, Inc.
35970  */
35971 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 2
35972 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h"
35973 /*
35974  * types of label comparison
35975  */
35976 
35977 
35978 
35979 /* Manifest human readable label names */
35980 
35981 
35982 
35983 /* Binary Label Structure Definitions */
35984 
35985 typedef struct _mac_label_impl m_label_t;
35986 
35987 typedef m_label_t blevel_t, /* compatibility */
35988    bslabel_t, /* Sensitivity Label */
35989    bclear_t; /* Clearance */
35990 
35991 typedef struct _tsol_binary_level_lrange { /* Level Range */
35992  m_label_t *lower_bound;
35993  m_label_t *upper_bound;
35994 } m_range_t;
35995 
35996 typedef m_range_t blrange_t;
35997 
35998 typedef struct tsol_mlp_s {
35999  uchar_t mlp_ipp;
36000  uint16_t mlp_port;
36001  uint16_t mlp_port_upper;
36002 } tsol_mlp_t;
36003 
36004 /* Procedure Interface Definitions available to user and kernel */
36005 
36006 extern int bltype(const void *, uint8_t);
36007 extern int blequal(const m_label_t *, const m_label_t *);
36008 extern int bldominates(const m_label_t *, const m_label_t *);
36009 extern int blstrictdom(const m_label_t *, const m_label_t *);
36010 extern int blinrange(const m_label_t *, const m_range_t *);
36011 extern void blmaximum(m_label_t *, const m_label_t *);
36012 extern void blminimum(m_label_t *, const m_label_t *);
36013 extern void bsllow(m_label_t *);
36014 extern void bslhigh(m_label_t *);
36015 extern void bclearlow(m_label_t *);
36016 extern void bclearhigh(m_label_t *);
36017 extern void bslundef(m_label_t *);
36018 extern void bclearundef(m_label_t *);
36019 extern void setbltype(void *, uint8_t);
36020 extern boolean_t bisinvalid(const void *);
36021 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
36022 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
36023 /*
36024  * CDDL HEADER START
36025  *
36026  * The contents of this file are subject to the terms of the
36027  * Common Development and Distribution License (the "License").
36028  * You may not use this file except in compliance with the License.
36029  *
36030  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36031  * or http://www.opensolaris.org/os/licensing.
36032  * See the License for the specific language governing permissions
36033  * and limitations under the License.
36034  *
36035  * When distributing Covered Code, include this CDDL HEADER in each
36036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36037  * If applicable, add the following below this CDDL HEADER, with the
36038  * fields enclosed by brackets "[]" replaced with your own identifying
36039  * information: Portions Copyright [yyyy] [name of copyright owner]
36040  *
36041  * CDDL HEADER END
36042  */
36043 /*
36044  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36045  * Use is subject to license terms.
36046  */
36047 
36048 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
36049 /*	  All Rights Reserved  	*/
36050 
36051 /*
36052  * Portions of this source code were derived from Berkeley 4.3 BSD
36053  * under license from the Regents of the University of California.
36054  */
36055 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
36056 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h" 1
36057 /*
36058  * CDDL HEADER START
36059  *
36060  * The contents of this file are subject to the terms of the
36061  * Common Development and Distribution License (the "License").
36062  * You may not use this file except in compliance with the License.
36063  *
36064  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36065  * or http://www.opensolaris.org/os/licensing.
36066  * See the License for the specific language governing permissions
36067  * and limitations under the License.
36068  *
36069  * When distributing Covered Code, include this CDDL HEADER in each
36070  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36071  * If applicable, add the following below this CDDL HEADER, with the
36072  * fields enclosed by brackets "[]" replaced with your own identifying
36073  * information: Portions Copyright [yyyy] [name of copyright owner]
36074  *
36075  * CDDL HEADER END
36076  */
36077 
36078 /*
36079  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36080  * Use is subject to license terms.
36081  */
36082 
36083 
36084 
36085 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 1
36086 /*
36087  * CDDL HEADER START
36088  *
36089  * The contents of this file are subject to the terms of the
36090  * Common Development and Distribution License (the "License").
36091  * You may not use this file except in compliance with the License.
36092  *
36093  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36094  * or http://www.opensolaris.org/os/licensing.
36095  * See the License for the specific language governing permissions
36096  * and limitations under the License.
36097  *
36098  * When distributing Covered Code, include this CDDL HEADER in each
36099  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36100  * If applicable, add the following below this CDDL HEADER, with the
36101  * fields enclosed by brackets "[]" replaced with your own identifying
36102  * information: Portions Copyright [yyyy] [name of copyright owner]
36103  *
36104  * CDDL HEADER END
36105  */
36106 /*
36107  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
36108  * Use is subject to license terms.
36109  *
36110  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
36111  */
36112 
36113 
36114 
36115 
36116 /*
36117  * Definition of general kernel statistics structures and /dev/kstat ioctls
36118  */
36119 
36120 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
36121 /*
36122  * CDDL HEADER START
36123  *
36124  * The contents of this file are subject to the terms of the
36125  * Common Development and Distribution License (the "License").
36126  * You may not use this file except in compliance with the License.
36127  *
36128  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36129  * or http://www.opensolaris.org/os/licensing.
36130  * See the License for the specific language governing permissions
36131  * and limitations under the License.
36132  *
36133  * When distributing Covered Code, include this CDDL HEADER in each
36134  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36135  * If applicable, add the following below this CDDL HEADER, with the
36136  * fields enclosed by brackets "[]" replaced with your own identifying
36137  * information: Portions Copyright [yyyy] [name of copyright owner]
36138  *
36139  * CDDL HEADER END
36140  */
36141 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
36142 /*	  All Rights Reserved  	*/
36143 
36144 
36145 /*
36146  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36147  * Use is subject to license terms.
36148  *
36149  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
36150  * Copyright 2016 Joyent, Inc.
36151  */
36152 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 2
36153 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
36154 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
36155 /*	  All Rights Reserved  	*/
36156 
36157 
36158 /*
36159  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
36160  * All rights reserved.  The Berkeley software License Agreement
36161  * specifies the terms and conditions for redistribution.
36162  */
36163 
36164 /*
36165  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
36166  *
36167  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36168  * Use is subject to license terms.
36169  *
36170  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
36171  */
36172 
36173 /*
36174  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
36175  */
36176 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 2
36177 
36178 
36179 
36180 
36181 
36182 typedef int kid_t; /* unique kstat id */
36183 
36184 /*
36185  * Kernel statistics driver (/dev/kstat) ioctls
36186  */
36187 
36188 
36189 
36190 
36191 
36192 
36193 
36194 /*
36195  * /dev/kstat ioctl usage (kd denotes /dev/kstat descriptor):
36196  *
36197  *	kcid = ioctl(kd, KSTAT_IOC_CHAIN_ID, NULL);
36198  *	kcid = ioctl(kd, KSTAT_IOC_READ, kstat_t *);
36199  *	kcid = ioctl(kd, KSTAT_IOC_WRITE, kstat_t *);
36200  */
36201 
36202 
36203 
36204 /*
36205  * The generic kstat header
36206  */
36207 
36208 typedef struct kstat {
36209  /*
36210 	 * Fields relevant to both kernel and user
36211 	 */
36212  hrtime_t ks_crtime; /* creation time (from gethrtime()) */
36213  struct kstat *ks_next; /* kstat chain linkage */
36214  kid_t ks_kid; /* unique kstat ID */
36215  char ks_module[31]; /* provider module name */
36216  uchar_t ks_resv; /* reserved, currently just padding */
36217  int ks_instance; /* provider module's instance */
36218  char ks_name[31]; /* kstat name */
36219  uchar_t ks_type; /* kstat data type */
36220  char ks_class[31]; /* kstat class */
36221  uchar_t ks_flags; /* kstat flags */
36222  void *ks_data; /* kstat type-specific data */
36223  uint_t ks_ndata; /* # of type-specific data records */
36224  size_t ks_data_size; /* total size of kstat data section */
36225  hrtime_t ks_snaptime; /* time of last data shapshot */
36226  /*
36227 	 * Fields relevant to kernel only
36228 	 */
36229  int (*ks_update)(struct kstat *, int); /* dynamic update */
36230  void *ks_private; /* arbitrary provider-private data */
36231  int (*ks_snapshot)(struct kstat *, void *, int);
36232  void *ks_lock; /* protects this kstat's data */
36233 } kstat_t;
36234 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
36235 /*
36236  * kstat structure and locking strategy
36237  *
36238  * Each kstat consists of a header section (a kstat_t) and a data section.
36239  * The system maintains a set of kstats, protected by kstat_chain_lock.
36240  * kstat_chain_lock protects all additions to/deletions from this set,
36241  * as well as all changes to kstat headers.  kstat data sections are
36242  * *optionally* protected by the per-kstat ks_lock.  If ks_lock is non-NULL,
36243  * kstat clients (e.g. /dev/kstat) will acquire this lock for all of their
36244  * operations on that kstat.  It is up to the kstat provider to decide whether
36245  * guaranteeing consistent data to kstat clients is sufficiently important
36246  * to justify the locking cost.  Note, however, that most statistic updates
36247  * already occur under one of the provider's mutexes, so if the provider sets
36248  * ks_lock to point to that mutex, then kstat data locking is free.
36249  *
36250  * NOTE: variable-size kstats MUST employ kstat data locking, to prevent
36251  * data-size races with kstat clients.
36252  *
36253  * NOTE: ks_lock is really of type (kmutex_t *); it is declared as (void *)
36254  * in the kstat header so that users don't have to be exposed to all of the
36255  * kernel's lock-related data structures.
36256  */
36257 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
36258 /*
36259  * kstat time
36260  *
36261  * All times associated with kstats (e.g. creation time, snapshot time,
36262  * kstat_timer_t and kstat_io_t timestamps, etc.) are 64-bit nanosecond values,
36263  * as returned by gethrtime().  The accuracy of these timestamps is machine
36264  * dependent, but the precision (units) is the same across all platforms.
36265  */
36266 
36267 /*
36268  * kstat identity (KID)
36269  *
36270  * Each kstat is assigned a unique KID (kstat ID) when it is added to the
36271  * global kstat chain.  The KID is used as a cookie by /dev/kstat to
36272  * request information about the corresponding kstat.  There is also
36273  * an identity associated with the entire kstat chain, kstat_chain_id,
36274  * which is bumped each time a kstat is added or deleted.  /dev/kstat uses
36275  * the chain ID to detect changes in the kstat chain (e.g., a new disk
36276  * coming online) between ioctl()s.
36277  */
36278 
36279 /*
36280  * kstat module, kstat instance
36281  *
36282  * ks_module and ks_instance contain the name and instance of the module
36283  * that created the kstat.  In cases where there can only be one instance,
36284  * ks_instance is 0.  The kernel proper (/kernel/unix) uses "unix" as its
36285  * module name.
36286  */
36287 
36288 /*
36289  * kstat name
36290  *
36291  * ks_name gives a meaningful name to a kstat.  The full kstat namespace
36292  * is module.instance.name, so the name only need be unique within a
36293  * module.  kstat_create() will fail if you try to create a kstat with
36294  * an already-used (ks_module, ks_instance, ks_name) triplet.  Spaces are
36295  * allowed in kstat names, but strongly discouraged, since they hinder
36296  * awk-style processing at user level.
36297  */
36298 
36299 /*
36300  * kstat type
36301  *
36302  * The kstat mechanism provides several flavors of kstat data, defined
36303  * below.  The "raw" kstat type is just treated as an array of bytes; you
36304  * can use this to export any kind of data you want.
36305  *
36306  * Some kstat types allow multiple data structures per kstat, e.g.
36307  * KSTAT_TYPE_NAMED; others do not.  This is part of the spec for each
36308  * kstat data type.
36309  *
36310  * User-level tools should *not* rely on the #define KSTAT_NUM_TYPES.  To
36311  * get this information, read out the standard system kstat "kstat_types".
36312  */
36313 
36314 
36315      /* ks_ndata >= 1 */
36316 
36317      /* ks_ndata >= 1 */
36318 
36319      /* ks_ndata == 1 */
36320 
36321      /* ks_ndata == 1 */
36322 
36323      /* ks_ndata >= 1 */
36324 
36325 
36326 
36327 /*
36328  * kstat class
36329  *
36330  * Each kstat can be characterized as belonging to some broad class
36331  * of statistics, e.g. disk, tape, net, vm, streams, etc.  This field
36332  * can be used as a filter to extract related kstats.  The following
36333  * values are currently in use: disk, tape, net, controller, vm, kvm,
36334  * hat, streams, kstat, and misc.  (The kstat class encompasses things
36335  * like kstat_types.)
36336  */
36337 
36338 /*
36339  * kstat flags
36340  *
36341  * Any of the following flags may be passed to kstat_create().  They are
36342  * all zero by default.
36343  *
36344  *	KSTAT_FLAG_VIRTUAL:
36345  *
36346  *		Tells kstat_create() not to allocate memory for the
36347  *		kstat data section; instead, you will set the ks_data
36348  *		field to point to the data you wish to export.  This
36349  *		provides a convenient way to export existing data
36350  *		structures.
36351  *
36352  *	KSTAT_FLAG_VAR_SIZE:
36353  *
36354  *		The size of the kstat you are creating will vary over time.
36355  *		For example, you may want to use the kstat mechanism to
36356  *		export a linked list.  NOTE: The kstat framework does not
36357  *		manage the data section, so all variable-size kstats must be
36358  *		virtual kstats.  Moreover, variable-size kstats MUST employ
36359  *		kstat data locking to prevent data-size races with kstat
36360  *		clients.  See the section on "kstat snapshot" for details.
36361  *
36362  *	KSTAT_FLAG_WRITABLE:
36363  *
36364  *		Makes the kstat's data section writable by root.
36365  *		The ks_snapshot routine (see below) does not need to check for
36366  *		this; permission checking is handled in the kstat driver.
36367  *
36368  *	KSTAT_FLAG_PERSISTENT:
36369  *
36370  *		Indicates that this kstat is to be persistent over time.
36371  *		For persistent kstats, kstat_delete() simply marks the
36372  *		kstat as dormant; a subsequent kstat_create() reactivates
36373  *		the kstat.  This feature is provided so that statistics
36374  *		are not lost across driver close/open (e.g., raw disk I/O
36375  *		on a disk with no mounted partitions.)
36376  *		NOTE: Persistent kstats cannot be virtual, since ks_data
36377  *		points to garbage as soon as the driver goes away.
36378  *
36379  * The following flags are maintained by the kstat framework:
36380  *
36381  *	KSTAT_FLAG_DORMANT:
36382  *
36383  *		For persistent kstats, indicates that the kstat is in the
36384  *		dormant state (e.g., the corresponding device is closed).
36385  *
36386  *	KSTAT_FLAG_INVALID:
36387  *
36388  *		This flag is set when a kstat is in a transitional state,
36389  *		e.g. between kstat_create() and kstat_install().
36390  *		kstat clients must not attempt to access the kstat's data
36391  *		if this flag is set.
36392  *
36393  *	KSTAT_FLAG_LONGSTRINGS:
36394  *
36395  *		Indicates that this kstat contains long strings (which
36396  *		are stored outside of the kstat data section). When copied
36397  *		out to user space the string data will be held in the data
36398  *		section provided by the user.
36399  */
36400 # 316 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
36401 /*
36402  * Dynamic update support
36403  *
36404  * The kstat mechanism allows for an optional ks_update function to update
36405  * kstat data.  This is useful for drivers where the underlying device
36406  * keeps cheap hardware stats, but extraction is expensive.  Instead of
36407  * constantly keeping the kstat data section up to date, you can supply a
36408  * ks_update function which updates the kstat's data section on demand.
36409  * To take advantage of this feature, simply set the ks_update field before
36410  * calling kstat_install().
36411  *
36412  * The ks_update function, if supplied, must have the following structure:
36413  *
36414  *	int
36415  *	foo_kstat_update(kstat_t *ksp, int rw)
36416  *	{
36417  *		if (rw == KSTAT_WRITE) {
36418  *			... update the native stats from ksp->ks_data;
36419  *				return EACCES if you don't support this
36420  *		} else {
36421  *			... update ksp->ks_data from the native stats
36422  *		}
36423  *	}
36424  *
36425  * The ks_update return codes are: 0 for success, EACCES if you don't allow
36426  * KSTAT_WRITE, and EIO for any other type of error.
36427  *
36428  * In general, the ks_update function may need to refer to provider-private
36429  * data; for example, it may need a pointer to the provider's raw statistics.
36430  * The ks_private field is available for this purpose.  Its use is entirely
36431  * at the provider's discretion.
36432  *
36433  * All variable-size kstats MUST supply a ks_update routine, which computes
36434  * and sets ks_data_size (and ks_ndata if that is meaningful), since these
36435  * are needed to perform kstat snapshots (see below).
36436  *
36437  * No kstat locking should be done inside the ks_update routine.  The caller
36438  * will already be holding the kstat's ks_lock (to ensure consistent data).
36439  */
36440 
36441 
36442 
36443 
36444 /*
36445  * Kstat snapshot
36446  *
36447  * In order to get a consistent view of a kstat's data, clients must obey
36448  * the kstat's locking strategy.  However, these clients may need to perform
36449  * operations on the data which could cause a fault (e.g. copyout()), or
36450  * operations which are simply expensive.  Doing so could cause deadlock
36451  * (e.g. if you're holding a disk's kstat lock which is ultimately required
36452  * to resolve a copyout() fault), performance degradation (since the providers'
36453  * activity is serialized at the kstat lock), device timing problems, etc.
36454  *
36455  * To avoid these problems, kstat data is provided via snapshots.  Taking
36456  * a snapshot is a simple process: allocate a wired-down kernel buffer,
36457  * acquire the kstat's data lock, copy the data into the buffer ("take the
36458  * snapshot"), and release the lock.  This ensures that the kstat's data lock
36459  * will be held as briefly as possible, and that no faults will occur while
36460  * the lock is held.
36461  *
36462  * Normally, the snapshot is taken by default_kstat_snapshot(), which
36463  * timestamps the data (sets ks_snaptime), copies it, and does a little
36464  * massaging to deal with incomplete transactions on i/o kstats.  However,
36465  * this routine only works for kstats with contiguous data (the typical case).
36466  * If you create a kstat whose data is, say, a linked list, you must provide
36467  * your own ks_snapshot routine.  The routine you supply must have the
36468  * following prototype (replace "foo" with something appropriate):
36469  *
36470  *	int foo_kstat_snapshot(kstat_t *ksp, void *buf, int rw);
36471  *
36472  * The minimal snapshot routine -- one which copies contiguous data that
36473  * doesn't need any massaging -- would be this:
36474  *
36475  *	ksp->ks_snaptime = gethrtime();
36476  *	if (rw == KSTAT_WRITE)
36477  *		bcopy(buf, ksp->ks_data, ksp->ks_data_size);
36478  *	else
36479  *		bcopy(ksp->ks_data, buf, ksp->ks_data_size);
36480  *	return (0);
36481  *
36482  * A more illuminating example is taking a snapshot of a linked list:
36483  *
36484  *	ksp->ks_snaptime = gethrtime();
36485  *	if (rw == KSTAT_WRITE)
36486  *		return (EACCES);		... See below ...
36487  *	for (foo = first_foo; foo; foo = foo->next) {
36488  *		bcopy((char *) foo, (char *) buf, sizeof (struct foo));
36489  *		buf = ((struct foo *) buf) + 1;
36490  *	}
36491  *	return (0);
36492  *
36493  * In the example above, we have decided that we don't want to allow
36494  * KSTAT_WRITE access, so we return EACCES if this is attempted.
36495  *
36496  * The key points are:
36497  *
36498  *	(1) ks_snaptime must be set (via gethrtime()) to timestamp the data.
36499  *	(2) Data gets copied from the kstat to the buffer on KSTAT_READ,
36500  *		and from the buffer to the kstat on KSTAT_WRITE.
36501  *	(3) ks_snapshot return values are: 0 for success, EACCES if you
36502  *		don't allow KSTAT_WRITE, and EIO for any other type of error.
36503  *
36504  * Named kstats (see section on "Named statistics" below) containing long
36505  * strings (KSTAT_DATA_STRING) need special handling.  The kstat driver
36506  * assumes that all strings are copied into the buffer after the array of
36507  * named kstats, and the pointers (KSTAT_NAMED_STR_PTR()) are updated to point
36508  * into the copy within the buffer. The default snapshot routine does this,
36509  * but overriding routines should contain at least the following:
36510  *
36511  * if (rw == KSTAT_READ) {
36512  * 	kstat_named_t *knp = buf;
36513  * 	char *end = knp + ksp->ks_ndata;
36514  * 	uint_t i;
36515  *
36516  * 	... Do the regular copy ...
36517  * 	bcopy(ksp->ks_data, buf, sizeof (kstat_named_t) * ksp->ks_ndata);
36518  *
36519  * 	for (i = 0; i < ksp->ks_ndata; i++, knp++) {
36520  *		if (knp[i].data_type == KSTAT_DATA_STRING &&
36521  *		    KSTAT_NAMED_STR_PTR(knp) != NULL) {
36522  *			bcopy(KSTAT_NAMED_STR_PTR(knp), end,
36523  *			    KSTAT_NAMED_STR_BUFLEN(knp));
36524  *			KSTAT_NAMED_STR_PTR(knp) = end;
36525  *			end += KSTAT_NAMED_STR_BUFLEN(knp);
36526  *		}
36527  *	}
36528  */
36529 
36530 /*
36531  * Named statistics.
36532  *
36533  * List of arbitrary name=value statistics.
36534  */
36535 
36536 typedef struct kstat_named {
36537  char name[31]; /* name of counter */
36538  uchar_t data_type; /* data type */
36539  union {
36540   char c[16]; /* enough for 128-bit ints */
36541   int32_t i32;
36542   uint32_t ui32;
36543   struct {
36544    union {
36545     char *ptr; /* NULL-term string */
36546 
36547 
36548 
36549     char __pad[8]; /* 64-bit padding */
36550    } addr;
36551    uint32_t len; /* # bytes for strlen + '\0' */
36552   } str;
36553 /*
36554  * The int64_t and uint64_t types are not valid for a maximally conformant
36555  * 32-bit compilation environment (cc -Xc) using compilers prior to the
36556  * introduction of C99 conforming compiler (reference ISO/IEC 9899:1990).
36557  * In these cases, the visibility of i64 and ui64 is only permitted for
36558  * 64-bit compilation environments or 32-bit non-maximally conformant
36559  * C89 or C90 ANSI C compilation environments (cc -Xt and cc -Xa). In the
36560  * C99 ANSI C compilation environment, the long long type is supported.
36561  * The _INT64_TYPE is defined by the implementation (see sys/int_types.h).
36562  */
36563 
36564   int64_t i64;
36565   uint64_t ui64;
36566 
36567   long l;
36568   ulong_t ul;
36569 
36570   /* These structure members are obsolete */
36571 
36572   longlong_t ll;
36573   u_longlong_t ull;
36574   float f;
36575   double d;
36576  } value; /* value of counter */
36577 } kstat_named_t;
36578 # 513 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
36579 /*
36580  * Statistics exporting named kstats with long strings (KSTAT_DATA_STRING)
36581  * may not make the assumption that ks_data_size is equal to (ks_ndata * sizeof
36582  * (kstat_named_t)).  ks_data_size in these cases is equal to the sum of the
36583  * amount of space required to store the strings (ie, the sum of
36584  * KSTAT_NAMED_STR_BUFLEN() for all KSTAT_DATA_STRING statistics) plus the
36585  * space required to store the kstat_named_t's.
36586  *
36587  * The default update routine will update ks_data_size automatically for
36588  * variable-length kstats containing long strings (using the default update
36589  * routine only makes sense if the string is the only thing that is changing
36590  * in size, and ks_ndata is constant).  Fixed-length kstats containing long
36591  * strings must explicitly change ks_data_size (after creation but before
36592  * initialization) to reflect the correct amount of space required for the
36593  * long strings and the kstat_named_t's.
36594  */
36595 
36596 
36597 /* These types are obsolete */
36598 # 540 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
36599 /*
36600  * Retrieve the pointer of the string contained in the given named kstat.
36601  */
36602 
36603 
36604 /*
36605  * Retrieve the length of the buffer required to store the string in the given
36606  * named kstat.
36607  */
36608 
36609 
36610 /*
36611  * Interrupt statistics.
36612  *
36613  * An interrupt is a hard interrupt (sourced from the hardware device
36614  * itself), a soft interrupt (induced by the system via the use of
36615  * some system interrupt source), a watchdog interrupt (induced by
36616  * a periodic timer call), spurious (an interrupt entry point was
36617  * entered but there was no interrupt condition to service),
36618  * or multiple service (an interrupt condition was detected and
36619  * serviced just prior to returning from any of the other types).
36620  *
36621  * Measurement of the spurious class of interrupts is useful for
36622  * autovectored devices in order to pinpoint any interrupt latency
36623  * problems in a particular system configuration.
36624  *
36625  * Devices that have more than one interrupt of the same
36626  * type should use multiple structures.
36627  */
36628 # 578 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
36629 typedef struct kstat_intr {
36630  uint_t intrs[5]; /* interrupt counters */
36631 } kstat_intr_t;
36632 
36633 
36634 
36635 /*
36636  * I/O statistics.
36637  */
36638 
36639 typedef struct kstat_io {
36640 
36641  /*
36642 	 * Basic counters.
36643 	 *
36644 	 * The counters should be updated at the end of service
36645 	 * (e.g., just prior to calling biodone()).
36646 	 */
36647 
36648  u_longlong_t nread; /* number of bytes read */
36649  u_longlong_t nwritten; /* number of bytes written */
36650  uint_t reads; /* number of read operations */
36651  uint_t writes; /* number of write operations */
36652 
36653  /*
36654 	 * Accumulated time and queue length statistics.
36655 	 *
36656 	 * Accumulated time statistics are kept as a running sum
36657 	 * of "active" time.  Queue length statistics are kept as a
36658 	 * running sum of the product of queue length and elapsed time
36659 	 * at that length -- i.e., a Riemann sum for queue length
36660 	 * integrated against time.  (You can also think of the active time
36661 	 * as a Riemann sum, for the boolean function (queue_length > 0)
36662 	 * integrated against time, or you can think of it as the
36663 	 * Lebesgue measure of the set on which queue_length > 0.)
36664 	 *
36665 	 *		^
36666 	 *		|			_________
36667 	 *		8			| i4	|
36668 	 *		|			|	|
36669 	 *	Queue	6			|	|
36670 	 *	Length	|	_________	|	|
36671 	 *		4	| i2	|_______|	|
36672 	 *		|	|	    i3		|
36673 	 *		2_______|			|
36674 	 *		|    i1				|
36675 	 *		|_______________________________|
36676 	 *		Time->	t1	t2	t3	t4
36677 	 *
36678 	 * At each change of state (entry or exit from the queue),
36679 	 * we add the elapsed time (since the previous state change)
36680 	 * to the active time if the queue length was non-zero during
36681 	 * that interval; and we add the product of the elapsed time
36682 	 * times the queue length to the running length*time sum.
36683 	 *
36684 	 * This method is generalizable to measuring residency
36685 	 * in any defined system: instead of queue lengths, think
36686 	 * of "outstanding RPC calls to server X".
36687 	 *
36688 	 * A large number of I/O subsystems have at least two basic
36689 	 * "lists" of transactions they manage: one for transactions
36690 	 * that have been accepted for processing but for which processing
36691 	 * has yet to begin, and one for transactions which are actively
36692 	 * being processed (but not done). For this reason, two cumulative
36693 	 * time statistics are defined here: wait (pre-service) time,
36694 	 * and run (service) time.
36695 	 *
36696 	 * All times are 64-bit nanoseconds (hrtime_t), as returned by
36697 	 * gethrtime().
36698 	 *
36699 	 * The units of cumulative busy time are accumulated nanoseconds.
36700 	 * The units of cumulative length*time products are elapsed time
36701 	 * times queue length.
36702 	 *
36703 	 * Updates to the fields below are performed implicitly by calls to
36704 	 * these five functions:
36705 	 *
36706 	 *	kstat_waitq_enter()
36707 	 *	kstat_waitq_exit()
36708 	 *	kstat_runq_enter()
36709 	 *	kstat_runq_exit()
36710 	 *
36711 	 *	kstat_waitq_to_runq()		(see below)
36712 	 *	kstat_runq_back_to_waitq()	(see below)
36713 	 *
36714 	 * Since kstat_waitq_exit() is typically followed immediately
36715 	 * by kstat_runq_enter(), there is a single kstat_waitq_to_runq()
36716 	 * function which performs both operations.  This is a performance
36717 	 * win since only one timestamp is required.
36718 	 *
36719 	 * In some instances, it may be necessary to move a request from
36720 	 * the run queue back to the wait queue, e.g. for write throttling.
36721 	 * For these situations, call kstat_runq_back_to_waitq().
36722 	 *
36723 	 * These fields should never be updated by any other means.
36724 	 */
36725 
36726  hrtime_t wtime; /* cumulative wait (pre-service) time */
36727  hrtime_t wlentime; /* cumulative wait length*time product */
36728  hrtime_t wlastupdate; /* last time wait queue changed */
36729  hrtime_t rtime; /* cumulative run (service) time */
36730  hrtime_t rlentime; /* cumulative run length*time product */
36731  hrtime_t rlastupdate; /* last time run queue changed */
36732 
36733  uint_t wcnt; /* count of elements in wait state */
36734  uint_t rcnt; /* count of elements in run state */
36735 
36736 } kstat_io_t;
36737 
36738 
36739 
36740 /*
36741  * Event timer statistics - cumulative elapsed time and number of events.
36742  *
36743  * Updates to these fields are performed implicitly by calls to
36744  * kstat_timer_start() and kstat_timer_stop().
36745  */
36746 
36747 typedef struct kstat_timer {
36748  char name[31]; /* event name */
36749  uchar_t resv; /* reserved */
36750  u_longlong_t num_events; /* number of events */
36751  hrtime_t elapsed_time; /* cumulative elapsed time */
36752  hrtime_t min_time; /* shortest event duration */
36753  hrtime_t max_time; /* longest event duration */
36754  hrtime_t start_time; /* previous event start time */
36755  hrtime_t stop_time; /* previous event stop time */
36756 } kstat_timer_t;
36757 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h" 2
36758 
36759 
36760 
36761 
36762 
36763 /*
36764  * This allows various pieces in and around IP to have a separate instance
36765  * for each instance of IP. This is used to support zones that have an
36766  * exclusive stack.
36767  * Pieces of software far removed from IP (e.g., kernel software
36768  * sitting on top of TCP or UDP) probably should not use the netstack
36769  * support; if such software wants to support separate zones it
36770  * can do that using the zones framework (zone_key_create() etc)
36771  * whether there is a shared IP stack or and exclusive IP stack underneath.
36772  */
36773 
36774 /*
36775  * Each netstack has an identifier. We reuse the zoneid allocation for
36776  * this but have a separate typedef. Thus the shared stack (used by
36777  * the global zone and other shared stack zones) have a zero ID, and
36778  * the exclusive stacks have a netstackid that is the same as their zoneid.
36779  */
36780 typedef id_t netstackid_t;
36781 
36782 
36783 
36784 /*
36785  * One for each module which uses netstack support.
36786  * Used in netstack_register().
36787  *
36788  * The order of these is important for some modules both for
36789  * the creation (which done in ascending order) and destruction (which is
36790  * done in in decending order).
36791  */
36792 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
36793 /*
36794  * State maintained for each module which tracks the state of
36795  * the create, shutdown and destroy callbacks.
36796  *
36797  * Keeps track of pending actions to avoid holding locks when
36798  * calling into the create/shutdown/destroy functions in the module.
36799  */
36800 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
36801 /* User-level compile like IP Filter needs a netstack_t. Dummy */
36802 typedef uint_t nm_state_t;
36803 
36804 
36805 /*
36806  * One for every netstack in the system.
36807  * We use a union so that the compilar and lint can provide type checking -
36808  * in principle we could have
36809  * #define	netstack_arp		netstack_modules[NS_ARP]
36810  * etc, but that would imply void * types hence no type checking by the
36811  * compiler.
36812  *
36813  * All the fields in netstack_t except netstack_next are protected by
36814  * netstack_lock. netstack_next is protected by netstack_g_lock.
36815  */
36816 struct netstack {
36817  union {
36818   void *nu_modules[(18 +1)];
36819   struct {
36820    struct dls_stack *nu_dls;
36821    struct iptun_stack *nu_iptun;
36822    struct str_stack *nu_str;
36823    struct hook_stack *nu_hook;
36824    struct neti_stack *nu_neti;
36825    struct arp_stack *nu_arp;
36826    struct ip_stack *nu_ip;
36827    struct icmp_stack *nu_icmp;
36828    struct udp_stack *nu_udp;
36829    struct tcp_stack *nu_tcp;
36830    struct sctp_stack *nu_sctp;
36831    struct rts_stack *nu_rts;
36832    struct ipsec_stack *nu_ipsec;
36833    struct keysock_stack *nu_keysock;
36834    struct spd_stack *nu_spdsock;
36835    struct ipsecah_stack *nu_ipsecah;
36836    struct ipsecesp_stack *nu_ipsecesp;
36837    struct ipnet_stack *nu_ipnet;
36838    struct ilb_stack *nu_ilb;
36839   } nu_s;
36840  } netstack_u;
36841 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
36842  nm_state_t netstack_m_state[(18 +1)]; /* module state */
36843 
36844  kmutex_t netstack_lock;
36845  struct netstack *netstack_next;
36846  netstackid_t netstack_stackid;
36847  int netstack_numzones; /* Number of zones using this */
36848  int netstack_refcnt; /* Number of hold-rele */
36849  int netstack_flags; /* See below */
36850 
36851 
36852 
36853 
36854 
36855 };
36856 typedef struct netstack netstack_t;
36857 
36858 /* netstack_flags values */
36859 # 209 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
36860 /*
36861  * One for each of the NS_* values.
36862  */
36863 struct netstack_registry {
36864  int nr_flags; /* 0 if nothing registered */
36865  void *(*nr_create)(netstackid_t, netstack_t *);
36866  void (*nr_shutdown)(netstackid_t, void *);
36867  void (*nr_destroy)(netstackid_t, void *);
36868 };
36869 
36870 /* nr_flags values */
36871 
36872 
36873 
36874 /*
36875  * To support kstat_create_netstack() using kstat_add_zone we need
36876  * to track both
36877  *  - all zoneids that use the global/shared stack
36878  *  - all kstats that have been added for the shared stack
36879  */
36880 
36881 extern void netstack_init(void);
36882 extern void netstack_hold(netstack_t *);
36883 extern void netstack_rele(netstack_t *);
36884 extern netstack_t *netstack_find_by_cred(const cred_t *);
36885 extern netstack_t *netstack_find_by_stackid(netstackid_t);
36886 extern netstack_t *netstack_find_by_zoneid(zoneid_t);
36887 
36888 extern zoneid_t netstackid_to_zoneid(netstackid_t);
36889 extern zoneid_t netstack_get_zoneid(netstack_t *);
36890 extern netstackid_t zoneid_to_netstackid(zoneid_t);
36891 
36892 extern netstack_t *netstack_get_current(void);
36893 
36894 /*
36895  * Register interest in changes to the set of netstacks.
36896  * The createfn and destroyfn are required, but the shutdownfn can be
36897  * NULL.
36898  * Note that due to the current zsd implementation, when the create
36899  * function is called the zone isn't fully present, thus functions
36900  * like zone_find_by_* will fail, hence the create function can not
36901  * use many zones kernel functions including zcmn_err().
36902  */
36903 extern void netstack_register(int,
36904     void *(*)(netstackid_t, netstack_t *),
36905     void (*)(netstackid_t, void *),
36906     void (*)(netstackid_t, void *));
36907 extern void netstack_unregister(int);
36908 extern kstat_t *kstat_create_netstack(char *, int, char *, char *, uchar_t,
36909     uint_t, uchar_t, netstackid_t);
36910 extern void kstat_delete_netstack(kstat_t *, netstackid_t);
36911 
36912 /*
36913  * Simple support for walking all the netstacks.
36914  * The caller of netstack_next() needs to call netstack_rele() when
36915  * done with a netstack.
36916  */
36917 typedef int netstack_handle_t;
36918 
36919 extern void netstack_next_init(netstack_handle_t *);
36920 extern void netstack_next_fini(netstack_handle_t *);
36921 extern netstack_t *netstack_next(netstack_handle_t *);
36922 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
36923 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 1
36924 /*
36925  * CDDL HEADER START
36926  *
36927  * The contents of this file are subject to the terms of the
36928  * Common Development and Distribution License (the "License").
36929  * You may not use this file except in compliance with the License.
36930  *
36931  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36932  * or http://www.opensolaris.org/os/licensing.
36933  * See the License for the specific language governing permissions
36934  * and limitations under the License.
36935  *
36936  * When distributing Covered Code, include this CDDL HEADER in each
36937  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36938  * If applicable, add the following below this CDDL HEADER, with the
36939  * fields enclosed by brackets "[]" replaced with your own identifying
36940  * information: Portions Copyright [yyyy] [name of copyright owner]
36941  *
36942  * CDDL HEADER END
36943  */
36944 /*
36945  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
36946  *
36947  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36948  * Use is subject to license terms.
36949  */
36950 
36951 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
36952 /*	  All Rights Reserved  	*/
36953 
36954 
36955 
36956 
36957 
36958 
36959 
36960 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
36961 /*
36962  * CDDL HEADER START
36963  *
36964  * The contents of this file are subject to the terms of the
36965  * Common Development and Distribution License (the "License").
36966  * You may not use this file except in compliance with the License.
36967  *
36968  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36969  * or http://www.opensolaris.org/os/licensing.
36970  * See the License for the specific language governing permissions
36971  * and limitations under the License.
36972  *
36973  * When distributing Covered Code, include this CDDL HEADER in each
36974  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36975  * If applicable, add the following below this CDDL HEADER, with the
36976  * fields enclosed by brackets "[]" replaced with your own identifying
36977  * information: Portions Copyright [yyyy] [name of copyright owner]
36978  *
36979  * CDDL HEADER END
36980  */
36981 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
36982 /*	  All Rights Reserved  	*/
36983 
36984 
36985 /*
36986  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36987  * Use is subject to license terms.
36988  *
36989  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
36990  * Copyright 2016 Joyent, Inc.
36991  */
36992 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 2
36993 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
36994 /*
36995  * CDDL HEADER START
36996  *
36997  * The contents of this file are subject to the terms of the
36998  * Common Development and Distribution License (the "License").
36999  * You may not use this file except in compliance with the License.
37000  *
37001  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37002  * or http://www.opensolaris.org/os/licensing.
37003  * See the License for the specific language governing permissions
37004  * and limitations under the License.
37005  *
37006  * When distributing Covered Code, include this CDDL HEADER in each
37007  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37008  * If applicable, add the following below this CDDL HEADER, with the
37009  * fields enclosed by brackets "[]" replaced with your own identifying
37010  * information: Portions Copyright [yyyy] [name of copyright owner]
37011  *
37012  * CDDL HEADER END
37013  */
37014 /*
37015  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37016  * Use is subject to license terms.
37017  */
37018 
37019 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
37020 /*	  All Rights Reserved  	*/
37021 
37022 /*
37023  * Portions of this source code were derived from Berkeley 4.3 BSD
37024  * under license from the Regents of the University of California.
37025  */
37026 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 2
37027 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
37028 /*			17-21	   reserved for obsolete interface */
37029 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
37030 /*
37031  * Functions reserved for A_FREEZE (may not be available on all platforms)
37032  * Note:  AD_COMPRESS, AD_CHECK and AD_FORCE are now obsolete
37033  *	The first two are succeeded by AD_SUSPEND_TO_DISK and
37034  *		AD_CHECK_SUSPEND_TO_DISK respectively.
37035  *	AD_FORCE should not be used by any new application
37036  *
37037  *	We maintain compatibility with the earlier interfaces:
37038  *	AD_COMPRESS and AD_CHECK, by preserving those values
37039  *	in the corresponding new interfaces
37040  */
37041 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
37042 /*
37043  * NOTE: the following defines comprise an Unstable interface.  Their semantics
37044  * may change or they may be removed completely in a later release
37045  */
37046 
37047 
37048 
37049 
37050 
37051 
37052 
37053 /*
37054  * Functions of A_CONFIG.  Unstable interface.
37055  */
37056 
37057 
37058 /*
37059  * When 'mdep' (the second argument to uadmin(2)) is initialized for A_REBOOT,
37060  * A_SHUTDOWN or A_DUMP, it represents the boot arguments string of at most
37061  * 256 characters.
37062  */
37063 
37064 
37065 
37066 /*
37067  * FMRI for boot-config service.
37068  */
37069 
37070 
37071 
37072 /*
37073  * Property group that contains all Fast Reboot configuration properties.
37074  */
37075 
37076 
37077 /*
37078  * Property group that contains all Fast Reboot blacklisting information.
37079  */
37080 
37081 
37082 /*
37083  * Non-persistent property group which contains all the properties that
37084  * will override settings in the BOOT_CONFIG_PG_PARAMS property group.
37085  */
37086 
37087 
37088 
37089 
37090 /*
37091  * Flag representations of fastboot configuration.
37092  */
37093 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
37094 extern int uadmin(int, int, uintptr_t);
37095 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
37096 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ksynch.h" 1
37097 /*
37098  * CDDL HEADER START
37099  *
37100  * The contents of this file are subject to the terms of the
37101  * Common Development and Distribution License, Version 1.0 only
37102  * (the "License").  You may not use this file except in compliance
37103  * with the License.
37104  *
37105  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37106  * or http://www.opensolaris.org/os/licensing.
37107  * See the License for the specific language governing permissions
37108  * and limitations under the License.
37109  *
37110  * When distributing Covered Code, include this CDDL HEADER in each
37111  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37112  * If applicable, add the following below this CDDL HEADER, with the
37113  * fields enclosed by brackets "[]" replaced with your own identifying
37114  * information: Portions Copyright [yyyy] [name of copyright owner]
37115  *
37116  * CDDL HEADER END
37117  */
37118 /*
37119  *	Copyright (c) 1991, Sun Microsystems, Inc.
37120  */
37121 
37122 /*
37123  * DKI/DDI MT synchronization primitives.
37124  */
37125 
37126 
37127 
37128 
37129 #pragma ident "%Z%%M%	%I%	%E% SMI"
37130 
37131 /*
37132  * The presence of this file is specified by the DKI/DDI.
37133  */
37134 
37135 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
37136 /*
37137  * CDDL HEADER START
37138  *
37139  * The contents of this file are subject to the terms of the
37140  * Common Development and Distribution License, Version 1.0 only
37141  * (the "License").  You may not use this file except in compliance
37142  * with the License.
37143  *
37144  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37145  * or http://www.opensolaris.org/os/licensing.
37146  * See the License for the specific language governing permissions
37147  * and limitations under the License.
37148  *
37149  * When distributing Covered Code, include this CDDL HEADER in each
37150  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37151  * If applicable, add the following below this CDDL HEADER, with the
37152  * fields enclosed by brackets "[]" replaced with your own identifying
37153  * information: Portions Copyright [yyyy] [name of copyright owner]
37154  *
37155  * CDDL HEADER END
37156  */
37157 /*
37158  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
37159  * All rights reserved.
37160  */
37161 
37162 /*
37163  * t_lock.h:	Prototypes for disp_locks, plus include files
37164  *		that describe the interfaces to kernel synch.
37165  *		objects.
37166  */
37167 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ksynch.h" 2
37168 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
37169 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
37170 /*
37171  * CDDL HEADER START
37172  *
37173  * The contents of this file are subject to the terms of the
37174  * Common Development and Distribution License (the "License").
37175  * You may not use this file except in compliance with the License.
37176  *
37177  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37178  * or http://www.opensolaris.org/os/licensing.
37179  * See the License for the specific language governing permissions
37180  * and limitations under the License.
37181  *
37182  * When distributing Covered Code, include this CDDL HEADER in each
37183  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37184  * If applicable, add the following below this CDDL HEADER, with the
37185  * fields enclosed by brackets "[]" replaced with your own identifying
37186  * information: Portions Copyright [yyyy] [name of copyright owner]
37187  *
37188  * CDDL HEADER END
37189  */
37190 /*
37191  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37192  * Use is subject to license terms.
37193  */
37194 
37195 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
37196 /*	  All Rights Reserved	*/
37197 
37198 /*
37199  * Portions of this source code were derived from Berkeley 4.3 BSD
37200  * under license from the Regents of the University of California.
37201  */
37202 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
37203 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
37204 /*
37205  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37206  * Use is subject to license terms.
37207  *
37208  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
37209  */
37210 /*
37211  * Copyright (c) 1982, 1986 Regents of the University of California.
37212  * All rights reserved.
37213  *
37214  * Redistribution and use in source and binary forms are permitted
37215  * provided that this notice is preserved and that due credit is given
37216  * to the University of California at Berkeley. The name of the University
37217  * may not be used to endorse or promote products derived from this
37218  * software without specific prior written permission. This software
37219  * is provided ``as is'' without express or implied warranty.
37220  */
37221 
37222 /*
37223  * Constants and structures defined by the internet system,
37224  * according to following documents
37225  *
37226  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
37227  *	http://www.iana.org/assignments/protocol-numbers
37228  *	http://www.iana.org/assignments/port-numbers
37229  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
37230  *
37231  */
37232 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
37233 
37234 
37235 
37236 
37237 
37238 /*
37239  * NOTE
37240  *
37241  * The contents of this file are private to the implementation of
37242  * Solaris and are subject to change at any time without notice.
37243  * Applications and drivers using these interfaces may fail to
37244  * run on future releases.
37245  */
37246 
37247 /* Available both in kernel and for user space */
37248 
37249 /* zone id restrictions and special ids */
37250 
37251 
37252 
37253 
37254 
37255 
37256 /*
37257  * Special zoneid_t token to refer to all zones.
37258  */
37259 
37260 
37261 /* system call subcodes */
37262 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
37263 /* zone attributes */
37264 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
37265 /* Start of the brand-specific attribute namespace */
37266 # 129 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
37267 /*
37268  * Exit values that may be returned by scripts or programs invoked by various
37269  * zone commands.
37270  *
37271  * These are defined as:
37272  *
37273  *	ZONE_SUBPROC_OK
37274  *	===============
37275  *	The subprocess completed successfully.
37276  *
37277  *	ZONE_SUBPROC_USAGE
37278  *	==================
37279  *	The subprocess failed with a usage message, or a usage message should
37280  *	be output in its behalf.
37281  *
37282  *	ZONE_SUBPROC_NOTCOMPLETE
37283  *	========================
37284  *	The subprocess did not complete, but the actions performed by the
37285  *	subprocess require no recovery actions by the user.
37286  *
37287  *	For example, if the subprocess were called by "zoneadm install," the
37288  *	installation of the zone did not succeed but the user need not perform
37289  *	a "zoneadm uninstall" before attempting another install.
37290  *
37291  *	ZONE_SUBPROC_FATAL
37292  *	==================
37293  *	The subprocess failed in a fatal manner, usually one that will require
37294  *	some type of recovery action by the user.
37295  *
37296  *	For example, if the subprocess were called by "zoneadm install," the
37297  *	installation of the zone did not succeed and the user will need to
37298  *	perform a "zoneadm uninstall" before another install attempt is
37299  *	possible.
37300  *
37301  *	The non-success exit values are large to avoid accidental collision
37302  *	with values used internally by some commands (e.g. "Z_ERR" and
37303  *	"Z_USAGE" as used by zoneadm.)
37304  */
37305 # 189 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
37306 typedef struct {
37307  const char *zone_name;
37308  const char *zone_root;
37309  const struct priv_set *zone_privs;
37310  size_t zone_privssz;
37311  const char *rctlbuf;
37312  size_t rctlbufsz;
37313  int *extended_error;
37314  const char *zfsbuf;
37315  size_t zfsbufsz;
37316  int match; /* match level */
37317  uint32_t doi; /* DOI for label */
37318  const bslabel_t *label; /* label associated with zone */
37319  int flags;
37320 } zone_def;
37321 
37322 /* extended error information */
37323 
37324 
37325 
37326 
37327 
37328 /*
37329  * zone_status values
37330  *
37331  * You must modify zone_status_names in mdb(1M)'s genunix module
37332  * (genunix/zone.c) when you modify this enum.
37333  */
37334 typedef enum {
37335  ZONE_IS_UNINITIALIZED = 0,
37336  ZONE_IS_INITIALIZED,
37337  ZONE_IS_READY,
37338  ZONE_IS_BOOTING,
37339  ZONE_IS_RUNNING,
37340  ZONE_IS_SHUTTING_DOWN,
37341  ZONE_IS_EMPTY,
37342  ZONE_IS_DOWN,
37343  ZONE_IS_DYING,
37344  ZONE_IS_DEAD
37345 } zone_status_t;
37346 
37347 
37348 
37349 /*
37350  * Valid commands which may be issued by zoneadm to zoneadmd.  The kernel also
37351  * communicates with zoneadmd, but only uses Z_REBOOT and Z_HALT.
37352  */
37353 typedef enum zone_cmd {
37354  Z_READY, Z_BOOT, Z_FORCEBOOT, Z_REBOOT, Z_HALT, Z_NOTE_UNINSTALLING,
37355  Z_MOUNT, Z_FORCEMOUNT, Z_UNMOUNT, Z_SHUTDOWN
37356 } zone_cmd_t;
37357 
37358 /*
37359  * The structure of a request to zoneadmd.
37360  */
37361 typedef struct zone_cmd_arg {
37362  uint64_t uniqid; /* unique "generation number" */
37363  zone_cmd_t cmd; /* requested action */
37364  uint32_t _pad; /* need consistent 32/64 bit alignmt */
37365  char locale[1024]; /* locale in which to render messages */
37366  char bootbuf[256]; /* arguments passed to zone_boot() */
37367 } zone_cmd_arg_t;
37368 
37369 /*
37370  * Structure of zoneadmd's response to a request.  A NULL return value means
37371  * the caller should attempt to restart zoneadmd and retry.
37372  */
37373 typedef struct zone_cmd_rval {
37374  int rval; /* return value of request */
37375  char errbuf[1]; /* variable-sized buffer containing error messages */
37376 } zone_cmd_rval_t;
37377 
37378 /*
37379  * The zone support infrastructure uses the zone name as a component
37380  * of unix domain (AF_UNIX) sockets, which are limited to 108 characters
37381  * in length, so ZONENAME_MAX is limited by that.
37382  */
37383 
37384 
37385 
37386 
37387 /*
37388  * Extended Regular expression (see regex(5)) which matches all valid zone
37389  * names.
37390  */
37391 
37392 
37393 /*
37394  * Where the zones support infrastructure places temporary files.
37395  */
37396 
37397 
37398 /*
37399  * The path to the door used by clients to communicate with zoneadmd.
37400  */
37401 
37402 
37403 
37404 /* zone_flags */
37405 /*
37406  * Threads that read or write the following flag must hold zone_lock.
37407  */
37408 
37409 
37410 /*
37411  * The following threads are set when the zone is created and never changed.
37412  * Threads that test for these flags don't have to hold zone_lock.
37413  */
37414 
37415 
37416 
37417 
37418 
37419 /* zone_create flags */
37420 
37421 
37422 /* zone network properties */
37423 
37424 
37425 
37426 
37427 
37428 
37429 typedef struct zone_net_data {
37430  int zn_type;
37431  int zn_len;
37432  datalink_id_t zn_linkid;
37433  uint8_t zn_val[1];
37434 } zone_net_data_t;
37435 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
37436 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 1
37437 /*
37438  * CDDL HEADER START
37439  *
37440  * The contents of this file are subject to the terms of the
37441  * Common Development and Distribution License (the "License").
37442  * You may not use this file except in compliance with the License.
37443  *
37444  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37445  * or http://www.opensolaris.org/os/licensing.
37446  * See the License for the specific language governing permissions
37447  * and limitations under the License.
37448  *
37449  * When distributing Covered Code, include this CDDL HEADER in each
37450  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37451  * If applicable, add the following below this CDDL HEADER, with the
37452  * fields enclosed by brackets "[]" replaced with your own identifying
37453  * information: Portions Copyright [yyyy] [name of copyright owner]
37454  *
37455  * CDDL HEADER END
37456  */
37457 /*
37458  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
37459  *
37460  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
37461  */
37462 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
37463 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 1
37464 /*
37465  * CDDL HEADER START
37466  *
37467  * The contents of this file are subject to the terms of the
37468  * Common Development and Distribution License (the "License").
37469  * You may not use this file except in compliance with the License.
37470  *
37471  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37472  * or http://www.opensolaris.org/os/licensing.
37473  * See the License for the specific language governing permissions
37474  * and limitations under the License.
37475  *
37476  * When distributing Covered Code, include this CDDL HEADER in each
37477  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37478  * If applicable, add the following below this CDDL HEADER, with the
37479  * fields enclosed by brackets "[]" replaced with your own identifying
37480  * information: Portions Copyright [yyyy] [name of copyright owner]
37481  *
37482  * CDDL HEADER END
37483  */
37484 /*
37485  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37486  * Use is subject to license terms.
37487  */
37488 
37489 
37490 
37491 
37492 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
37493 /*
37494  * CDDL HEADER START
37495  *
37496  * The contents of this file are subject to the terms of the
37497  * Common Development and Distribution License (the "License").
37498  * You may not use this file except in compliance with the License.
37499  *
37500  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37501  * or http://www.opensolaris.org/os/licensing.
37502  * See the License for the specific language governing permissions
37503  * and limitations under the License.
37504  *
37505  * When distributing Covered Code, include this CDDL HEADER in each
37506  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37507  * If applicable, add the following below this CDDL HEADER, with the
37508  * fields enclosed by brackets "[]" replaced with your own identifying
37509  * information: Portions Copyright [yyyy] [name of copyright owner]
37510  *
37511  * CDDL HEADER END
37512  */
37513 /*
37514  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
37515  * Use is subject to license terms.
37516  * Copyright 2015 Nexenta Systems, Inc.
37517  */
37518 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
37519 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 1
37520 /*
37521  * CDDL HEADER START
37522  *
37523  * The contents of this file are subject to the terms of the
37524  * Common Development and Distribution License (the "License").
37525  * You may not use this file except in compliance with the License.
37526  *
37527  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37528  * or http://www.opensolaris.org/os/licensing.
37529  * See the License for the specific language governing permissions
37530  * and limitations under the License.
37531  *
37532  * When distributing Covered Code, include this CDDL HEADER in each
37533  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37534  * If applicable, add the following below this CDDL HEADER, with the
37535  * fields enclosed by brackets "[]" replaced with your own identifying
37536  * information: Portions Copyright [yyyy] [name of copyright owner]
37537  *
37538  * CDDL HEADER END
37539  */
37540 /*
37541  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37542  * Use is subject to license terms.
37543  */
37544 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
37545 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 1
37546 /*
37547  * CDDL HEADER START
37548  *
37549  * The contents of this file are subject to the terms of the
37550  * Common Development and Distribution License (the "License").
37551  * You may not use this file except in compliance with the License.
37552  *
37553  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37554  * or http://www.opensolaris.org/os/licensing.
37555  * See the License for the specific language governing permissions
37556  * and limitations under the License.
37557  *
37558  * When distributing Covered Code, include this CDDL HEADER in each
37559  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37560  * If applicable, add the following below this CDDL HEADER, with the
37561  * fields enclosed by brackets "[]" replaced with your own identifying
37562  * information: Portions Copyright [yyyy] [name of copyright owner]
37563  *
37564  * CDDL HEADER END
37565  */
37566 /*
37567  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
37568  *
37569  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
37570  * Use is subject to license terms.
37571  */
37572 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
37573 
37574 
37575 
37576 
37577 
37578 /* Procedural Interface Structure Definitions */
37579 
37580 struct label_info { /* structure returned by label_info */
37581  short ilabel_len; /* max Information Label length */
37582  short slabel_len; /* max Sensitivity Label length */
37583  short clabel_len; /* max CMW Label length */
37584  short clear_len; /* max Clearance Label length */
37585  short vers_len; /* version string length */
37586  short header_len; /* max len of banner page header */
37587  short protect_as_len; /* max len of banner page protect as */
37588  short caveats_len; /* max len of banner page caveats */
37589  short channels_len; /* max len of banner page channels */
37590 };
37591 
37592 typedef struct label_set_identifier { /* valid label set identifier */
37593  int type; /* type of the set */
37594  char *name; /* name of the set if needed */
37595 } set_id;
37596 
37597 struct name_fields { /* names for label builder fields */
37598  char *class_name; /* Classifications field name */
37599  char *comps_name; /* Compartments field name */
37600  char *marks_name; /* Markings field name */
37601 };
37602 
37603 /* Label Set Identifier Types */
37604 
37605 /*
37606  * The accreditation ranges as specified in the label encodings file.
37607  * The name parameter is ignored.
37608  *
37609  * System Accreditation Range is all valid labels plus Admin High and Low.
37610  *
37611  * User Accreditation Range is valid user labels as defined in the
37612  *	ACCREDITATION RANGE: section of the label encodings file.
37613  */
37614 
37615 
37616 
37617 
37618 
37619 /* System Call Interface Definitions */
37620 
37621 extern int getlabel(const char *, m_label_t *);
37622 extern int fgetlabel(int, m_label_t *);
37623 
37624 extern int getplabel(m_label_t *);
37625 extern int setflabel(const char *, m_label_t *);
37626 extern char *getpathbylabel(const char *, char *, size_t,
37627     const m_label_t *sl);
37628 extern m_label_t *getzonelabelbyid(zoneid_t);
37629 extern m_label_t *getzonelabelbyname(const char *);
37630 extern zoneid_t getzoneidbylabel(const m_label_t *);
37631 extern char *getzonenamebylabel(const m_label_t *);
37632 extern char *getzonerootbyid(zoneid_t);
37633 extern char *getzonerootbyname(const char *);
37634 extern char *getzonerootbylabel(const m_label_t *);
37635 extern m_label_t *getlabelbypath(const char *);
37636 
37637 
37638 /* Flag word values */
37639 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h"
37640       /* implies NEW_LABEL */
37641 
37642 
37643 
37644 
37645 /* Procedure Interface Definitions available to user */
37646 
37647 /* APIs shared with the kernel are in <sys/tsol/label.h */
37648 
37649 extern m_label_t *blabel_alloc(void);
37650 extern void blabel_free(m_label_t *);
37651 extern size32_t blabel_size(void);
37652 extern char *bsltoh(const m_label_t *);
37653 extern char *bcleartoh(const m_label_t *);
37654 
37655 extern char *bsltoh_r(const m_label_t *, char *);
37656 extern char *bcleartoh_r(const m_label_t *, char *);
37657 extern char *h_alloc(uint8_t);
37658 extern void h_free(char *);
37659 
37660 extern int htobsl(const char *, m_label_t *);
37661 extern int htobclear(const char *, m_label_t *);
37662 
37663 extern m_range_t *getuserrange(const char *);
37664 extern m_range_t *getdevicerange(const char *);
37665 
37666 extern int set_effective_priv(priv_op_t, int, ...);
37667 extern int set_inheritable_priv(priv_op_t, int, ...);
37668 extern int set_permitted_priv(priv_op_t, int, ...);
37669 extern int is_system_labeled(void);
37670 
37671 /* Procedures needed for multi-level printing */
37672 
37673 extern int tsol_check_admin_auth(uid_t uid);
37674 
37675 /* APIs implemented via labeld */
37676 
37677 extern int blinset(const m_label_t *, const set_id *);
37678 extern int labelinfo(struct label_info *);
37679 extern ssize_t labelvers(char **, size_t);
37680 extern char *bltocolor(const m_label_t *);
37681 extern char *bltocolor_r(const m_label_t *, size_t, char *);
37682 
37683 extern ssize_t bsltos(const m_label_t *, char **, size_t, int);
37684 extern ssize_t bcleartos(const m_label_t *, char **, size_t, int);
37685 
37686 
37687 extern char *sbsltos(const m_label_t *, size_t);
37688 extern char *sbcleartos(const m_label_t *, size_t);
37689 
37690 
37691 extern int stobsl(const char *, m_label_t *, int, int *);
37692 extern int stobclear(const char *, m_label_t *, int, int *);
37693 extern int bslvalid(const m_label_t *);
37694 extern int bclearvalid(const m_label_t *);
37695 
37696 /* DIA label conversion and parsing */
37697 
37698 /* Conversion types */
37699 
37700 typedef enum _m_label_str {
37701  M_LABEL = 1, /* process or user clearance */
37702  M_INTERNAL = 2, /* internal form for use in public databases */
37703  M_COLOR = 3, /* process label color */
37704  PRINTER_TOP_BOTTOM = 4, /* DIA banner page top/bottom */
37705  PRINTER_LABEL = 5, /* DIA banner page label */
37706  PRINTER_CAVEATS = 6, /* DIA banner page caveats */
37707  PRINTER_CHANNELS = 7 /* DIA banner page handling channels */
37708 } m_label_str_t;
37709 
37710 /* Flags for conversion, not all flags apply to all types */
37711 
37712 
37713 
37714 
37715 extern int label_to_str(const m_label_t *, char **, const m_label_str_t,
37716     uint_t);
37717 extern int l_to_str_internal(const m_label_t *, char **);
37718 
37719 /* Parsing types */
37720 typedef enum _m_label_type {
37721  MAC_LABEL = 1, /* process or object label */
37722  USER_CLEAR = 2 /* user's clearance (LUB) */
37723 } m_label_type_t;
37724 
37725 /* Flags for parsing */
37726 
37727 
37728 
37729 
37730 
37731 
37732 /* EINVAL sub codes */
37733 
37734 
37735 
37736  /* bad requested label type, bad previous label type */
37737 
37738 
37739 extern int str_to_label(const char *, m_label_t **, const m_label_type_t,
37740     uint_t, int *);
37741 extern int hexstr_to_label(const char *, m_label_t *);
37742 
37743 extern m_label_t *m_label_alloc(const m_label_type_t);
37744 
37745 extern int m_label_dup(m_label_t **, const m_label_t *);
37746 
37747 extern void m_label_free(m_label_t *);
37748 
37749 /* Contract Private interfaces with the label builder GUIs */
37750 
37751 extern int bslcvtfull(const m_label_t *, const m_range_t *, int,
37752     char **, char **[], char **[], char *[], int *, int *);
37753 extern int bslcvt(const m_label_t *, int, char **, char *[]);
37754 extern int bclearcvtfull(const m_label_t *, const m_range_t *, int,
37755     char **, char **[], char **[], char *[], int *, int *);
37756 extern int bclearcvt(const m_label_t *, int, char **, char *[]);
37757 
37758 extern int labelfields(struct name_fields *);
37759 extern int userdefs(m_label_t *, m_label_t *);
37760 extern int zonecopy(m_label_t *, char *, char *, char *, int);
37761 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
37762 
37763 
37764 
37765 
37766 
37767 /*
37768  * Functions for mapping between id and name for active zones.
37769  */
37770 extern zoneid_t getzoneid(void);
37771 extern zoneid_t getzoneidbyname(const char *);
37772 extern ssize_t getzonenamebyid(zoneid_t, char *, size_t);
37773 
37774 /*
37775  * NOTE
37776  *
37777  * The remaining contents of this file are private to the implementation
37778  * of Solaris and are subject to change at any time without notice,
37779  * Applications using these interfaces may fail to run on future releases.
37780  */
37781 
37782 extern int zonept(int, zoneid_t);
37783 extern int zone_get_id(const char *, zoneid_t *);
37784 
37785 /* System call API */
37786 extern zoneid_t zone_create(const char *, const char *,
37787     const struct priv_set *, const char *, size_t, const char *, size_t, int *,
37788     int, int, const bslabel_t *, int);
37789 extern int zone_boot(zoneid_t);
37790 extern int zone_destroy(zoneid_t);
37791 extern ssize_t zone_getattr(zoneid_t, int, void *, size_t);
37792 extern int zone_setattr(zoneid_t, int, void *, size_t);
37793 extern int zone_enter(zoneid_t);
37794 extern int zone_list(zoneid_t *, uint_t *);
37795 extern int zone_shutdown(zoneid_t);
37796 extern int zone_version(int *);
37797 extern int zone_add_datalink(zoneid_t, datalink_id_t);
37798 extern int zone_remove_datalink(zoneid_t, datalink_id_t);
37799 extern int zone_check_datalink(zoneid_t *, datalink_id_t);
37800 extern int zone_list_datalink(zoneid_t, int *, datalink_id_t *);
37801 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
37802 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libbrand.h" 1
37803 /*
37804  * CDDL HEADER START
37805  *
37806  * The contents of this file are subject to the terms of the
37807  * Common Development and Distribution License (the "License").
37808  * You may not use this file except in compliance with the License.
37809  *
37810  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37811  * or http://www.opensolaris.org/os/licensing.
37812  * See the License for the specific language governing permissions
37813  * and limitations under the License.
37814  *
37815  * When distributing Covered Code, include this CDDL HEADER in each
37816  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37817  * If applicable, add the following below this CDDL HEADER, with the
37818  * fields enclosed by brackets "[]" replaced with your own identifying
37819  * information: Portions Copyright [yyyy] [name of copyright owner]
37820  *
37821  * CDDL HEADER END
37822  */
37823 
37824 /*
37825  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
37826  * Copyright (c) 2011, Joyent, Inc. All rights reserved.
37827  * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
37828  */
37829 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libbrand.h"
37830 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
37831 /*
37832  * CDDL HEADER START
37833  *
37834  * The contents of this file are subject to the terms of the
37835  * Common Development and Distribution License (the "License").
37836  * You may not use this file except in compliance with the License.
37837  *
37838  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37839  * or http://www.opensolaris.org/os/licensing.
37840  * See the License for the specific language governing permissions
37841  * and limitations under the License.
37842  *
37843  * When distributing Covered Code, include this CDDL HEADER in each
37844  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37845  * If applicable, add the following below this CDDL HEADER, with the
37846  * fields enclosed by brackets "[]" replaced with your own identifying
37847  * information: Portions Copyright [yyyy] [name of copyright owner]
37848  *
37849  * CDDL HEADER END
37850  */
37851 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
37852 /*	  All Rights Reserved  	*/
37853 
37854 
37855 /*
37856  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37857  * Use is subject to license terms.
37858  *
37859  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
37860  * Copyright 2016 Joyent, Inc.
37861  */
37862 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libbrand.h" 2
37863 
37864 typedef struct __brand_handle *brand_handle_t;
37865 
37866 typedef struct priv_iter_s {
37867  char *pi_name;
37868  char *pi_set;
37869  char *pi_iptype;
37870 } priv_iter_t;
37871 
37872 extern brand_handle_t brand_open(const char *);
37873 extern void brand_close(brand_handle_t);
37874 
37875 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
37876 
37877 extern int brand_get_attach(brand_handle_t, const char *, const char *,
37878     char *, size_t);
37879 extern int brand_get_boot(brand_handle_t, const char *, const char *,
37880     char *, size_t);
37881 extern int brand_get_brandname(brand_handle_t, char *, size_t);
37882 extern int brand_get_clone(brand_handle_t, const char *, const char *,
37883     char *, size_t);
37884 extern int brand_get_detach(brand_handle_t, const char *, const char *,
37885     char *, size_t);
37886 extern int brand_get_shutdown(brand_handle_t, const char *, const char *,
37887     char *, size_t);
37888 extern int brand_get_halt(brand_handle_t, const char *, const char *,
37889     char *, size_t);
37890 extern int brand_get_initname(brand_handle_t, char *, size_t);
37891 extern boolean_t brand_restartinit(brand_handle_t);
37892 extern int brand_get_install(brand_handle_t, const char *, const char *,
37893     char *, size_t);
37894 extern int brand_get_installopts(brand_handle_t, char *, size_t);
37895 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
37896 extern int brand_get_forcedlogin_cmd(brand_handle_t, const char *,
37897     char *, size_t);
37898 extern int brand_get_modname(brand_handle_t, char *, size_t);
37899 extern int brand_get_postattach(brand_handle_t, const char *, const char *,
37900     char *, size_t);
37901 extern int brand_get_postclone(brand_handle_t, const char *, const char *,
37902     char *, size_t);
37903 extern int brand_get_postinstall(brand_handle_t, const char *, const char *,
37904     char *, size_t);
37905 extern int brand_get_postsnap(brand_handle_t, const char *, const char *,
37906     char *, size_t);
37907 extern int brand_get_poststatechange(brand_handle_t, const char *, const char *,
37908     char *, size_t);
37909 extern int brand_get_predetach(brand_handle_t, const char *, const char *,
37910     char *, size_t);
37911 extern int brand_get_presnap(brand_handle_t, const char *, const char *,
37912     char *, size_t);
37913 extern int brand_get_prestatechange(brand_handle_t, const char *, const char *,
37914     char *, size_t);
37915 extern int brand_get_preuninstall(brand_handle_t, const char *, const char *,
37916     char *, size_t);
37917 extern int brand_get_query(brand_handle_t, const char *, const char *,
37918     char *, size_t);
37919 extern int brand_get_uninstall(brand_handle_t, const char *, const char *,
37920     char *, size_t);
37921 extern int brand_get_validatesnap(brand_handle_t, const char *, const char *,
37922     char *, size_t);
37923 extern int brand_get_user_cmd(brand_handle_t, const char *, char *, size_t);
37924 extern int brand_get_verify_cfg(brand_handle_t, char *, size_t);
37925 extern int brand_get_verify_adm(brand_handle_t, const char *, const char *,
37926     char *, size_t);
37927 extern int brand_get_sysboot(brand_handle_t, const char *, const char *, char *,
37928     size_t);
37929 
37930 extern int brand_config_iter_privilege(brand_handle_t,
37931     int (*func)(void *, priv_iter_t *), void *);
37932 
37933 extern int brand_platform_iter_devices(brand_handle_t, const char *,
37934     int (*)(void *, const char *, const char *), void *, const char *);
37935 extern int brand_platform_iter_gmounts(brand_handle_t, const char *,
37936     int (*)(void *, const char *, const char *, const char *, const char *),
37937     void *);
37938 extern int brand_platform_iter_link(brand_handle_t, int (*)(void *,
37939     const char *, const char *), void *);
37940 extern int brand_platform_iter_mounts(brand_handle_t, int (*)(void *,
37941     const char *, const char *, const char *, const char *), void *);
37942 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
37943 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uuid.h" 1
37944 /*
37945  * CDDL HEADER START
37946  *
37947  * The contents of this file are subject to the terms of the
37948  * Common Development and Distribution License, Version 1.0 only
37949  * (the "License").  You may not use this file except in compliance
37950  * with the License.
37951  *
37952  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37953  * or http://www.opensolaris.org/os/licensing.
37954  * See the License for the specific language governing permissions
37955  * and limitations under the License.
37956  *
37957  * When distributing Covered Code, include this CDDL HEADER in each
37958  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37959  * If applicable, add the following below this CDDL HEADER, with the
37960  * fields enclosed by brackets "[]" replaced with your own identifying
37961  * information: Portions Copyright [yyyy] [name of copyright owner]
37962  *
37963  * CDDL HEADER END
37964  */
37965 /*
37966  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
37967  * Use is subject to license terms.
37968  */
37969 
37970 
37971 
37972 
37973 #pragma ident "%Z%%M%	%I%	%E% SMI"
37974 
37975 
37976 
37977 
37978 
37979 /*
37980  * The copyright in this file is taken from the original Leach
37981  * & Salz UUID specification, from which this implementation
37982  * is derived.
37983  */
37984 
37985 /*
37986  * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
37987  * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
37988  * Digital Equipment Corporation, Maynard, Mass.  Copyright (c) 1998
37989  * Microsoft.  To anyone who acknowledges that this file is provided
37990  * "AS IS" without any express or implied warranty: permission to use,
37991  * copy, modify, and distribute this file for any purpose is hereby
37992  * granted without fee, provided that the above copyright notices and
37993  * this notice appears in all source code copies, and that none of the
37994  * names of Open Software Foundation, Inc., Hewlett-Packard Company,
37995  * or Digital Equipment Corporation be used in advertising or
37996  * publicity pertaining to distribution of the software without
37997  * specific, written prior permission.  Neither Open Software
37998  * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
37999  * Equipment Corporation makes any representations about the
38000  * suitability of this software for any purpose.
38001  */
38002 
38003 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
38004 /*
38005  * CDDL HEADER START
38006  *
38007  * The contents of this file are subject to the terms of the
38008  * Common Development and Distribution License (the "License").
38009  * You may not use this file except in compliance with the License.
38010  *
38011  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38012  * or http://www.opensolaris.org/os/licensing.
38013  * See the License for the specific language governing permissions
38014  * and limitations under the License.
38015  *
38016  * When distributing Covered Code, include this CDDL HEADER in each
38017  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38018  * If applicable, add the following below this CDDL HEADER, with the
38019  * fields enclosed by brackets "[]" replaced with your own identifying
38020  * information: Portions Copyright [yyyy] [name of copyright owner]
38021  *
38022  * CDDL HEADER END
38023  */
38024 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38025 /*	  All Rights Reserved  	*/
38026 
38027 
38028 /*
38029  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38030  * Use is subject to license terms.
38031  *
38032  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
38033  * Copyright 2016 Joyent, Inc.
38034  */
38035 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uuid.h" 2
38036 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
38037 /*
38038  * CDDL HEADER START
38039  *
38040  * The contents of this file are subject to the terms of the
38041  * Common Development and Distribution License (the "License").
38042  * You may not use this file except in compliance with the License.
38043  *
38044  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38045  * or http://www.opensolaris.org/os/licensing.
38046  * See the License for the specific language governing permissions
38047  * and limitations under the License.
38048  *
38049  * When distributing Covered Code, include this CDDL HEADER in each
38050  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38051  * If applicable, add the following below this CDDL HEADER, with the
38052  * fields enclosed by brackets "[]" replaced with your own identifying
38053  * information: Portions Copyright [yyyy] [name of copyright owner]
38054  *
38055  * CDDL HEADER END
38056  */
38057 
38058 /*
38059  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38060  * Use is subject to license terms.
38061  */
38062 
38063 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
38064 /*	  All Rights Reserved  	*/
38065 
38066 /*
38067  * University Copyright- Copyright (c) 1982, 1986, 1988
38068  * The Regents of the University of California
38069  * All Rights Reserved
38070  *
38071  * University Acknowledgment- Portions of this document are derived from
38072  * software developed by the University of California, Berkeley, and its
38073  * contributors.
38074  */
38075 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uuid.h" 2
38076 
38077 typedef struct {
38078  uint8_t nodeID[6];
38079 } uuid_node_t;
38080 
38081 /*
38082  * The uuid type used throughout when referencing uuids themselves
38083  */
38084 struct uuid {
38085  uint32_t time_low;
38086  uint16_t time_mid;
38087  uint16_t time_hi_and_version;
38088  uint8_t clock_seq_hi_and_reserved;
38089  uint8_t clock_seq_low;
38090  uint8_t node_addr[6];
38091 };
38092 
38093 
38094 
38095 
38096 
38097 typedef uchar_t uuid_t[16];
38098 
38099 /*
38100  * Convert a uuid to/from little-endian format
38101  */
38102 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
38103 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 1
38104 /*
38105  * CDDL HEADER START
38106  *
38107  * The contents of this file are subject to the terms of the
38108  * Common Development and Distribution License (the "License").
38109  * You may not use this file except in compliance with the License.
38110  *
38111  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38112  * or http://www.opensolaris.org/os/licensing.
38113  * See the License for the specific language governing permissions
38114  * and limitations under the License.
38115  *
38116  * When distributing Covered Code, include this CDDL HEADER in each
38117  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38118  * If applicable, add the following below this CDDL HEADER, with the
38119  * fields enclosed by brackets "[]" replaced with your own identifying
38120  * information: Portions Copyright [yyyy] [name of copyright owner]
38121  *
38122  * CDDL HEADER END
38123  */
38124 /*
38125  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
38126  */
38127 
38128 
38129 
38130 
38131 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
38132 /*
38133  * CDDL HEADER START
38134  *
38135  * The contents of this file are subject to the terms of the
38136  * Common Development and Distribution License (the "License").
38137  * You may not use this file except in compliance with the License.
38138  *
38139  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38140  * or http://www.opensolaris.org/os/licensing.
38141  * See the License for the specific language governing permissions
38142  * and limitations under the License.
38143  *
38144  * When distributing Covered Code, include this CDDL HEADER in each
38145  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38146  * If applicable, add the following below this CDDL HEADER, with the
38147  * fields enclosed by brackets "[]" replaced with your own identifying
38148  * information: Portions Copyright [yyyy] [name of copyright owner]
38149  *
38150  * CDDL HEADER END
38151  */
38152 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38153 /*	  All Rights Reserved  	*/
38154 
38155 
38156 /*
38157  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38158  * Use is subject to license terms.
38159  *
38160  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
38161  * Copyright 2016 Joyent, Inc.
38162  */
38163 # 29 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 2
38164 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1
38165 /*
38166  * CDDL HEADER START
38167  *
38168  * The contents of this file are subject to the terms of the
38169  * Common Development and Distribution License, Version 1.0 only
38170  * (the "License").  You may not use this file except in compliance
38171  * with the License.
38172  *
38173  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38174  * or http://www.opensolaris.org/os/licensing.
38175  * See the License for the specific language governing permissions
38176  * and limitations under the License.
38177  *
38178  * When distributing Covered Code, include this CDDL HEADER in each
38179  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38180  * If applicable, add the following below this CDDL HEADER, with the
38181  * fields enclosed by brackets "[]" replaced with your own identifying
38182  * information: Portions Copyright [yyyy] [name of copyright owner]
38183  *
38184  * CDDL HEADER END
38185  */
38186 /*	Copyright (c) 1988 AT&T	*/
38187 /*	  All Rights Reserved	*/
38188 
38189 /*
38190  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
38191  *
38192  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
38193  * Use is subject to license terms.
38194  */
38195 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 2
38196 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
38197 /*
38198  * CDDL HEADER START
38199  *
38200  * The contents of this file are subject to the terms of the
38201  * Common Development and Distribution License (the "License").
38202  * You may not use this file except in compliance with the License.
38203  *
38204  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38205  * or http://www.opensolaris.org/os/licensing.
38206  * See the License for the specific language governing permissions
38207  * and limitations under the License.
38208  *
38209  * When distributing Covered Code, include this CDDL HEADER in each
38210  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38211  * If applicable, add the following below this CDDL HEADER, with the
38212  * fields enclosed by brackets "[]" replaced with your own identifying
38213  * information: Portions Copyright [yyyy] [name of copyright owner]
38214  *
38215  * CDDL HEADER END
38216  */
38217 
38218 /*
38219  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
38220  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
38221  */
38222 
38223 /*	Copyright (c) 1988 AT&T	*/
38224 /*	  All Rights Reserved  	*/
38225 
38226 /*
38227  * User-visible pieces of the ANSI C standard I/O package.
38228  */
38229 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 2
38230 
38231 
38232 
38233 
38234 
38235 /*
38236  * Standard flags codes.
38237  */
38238 
38239 
38240 /*
38241  * Standard error codes.
38242  */
38243 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h"
38244 /*
38245  * Standard program exit codes.
38246  */
38247 
38248 
38249 
38250 
38251 /*
38252  * Exit status profiles.
38253  */
38254 
38255 
38256 
38257 /*
38258  * Error reporting functions.
38259  */
38260 uint32_t uu_error(void);
38261 const char *uu_strerror(uint32_t);
38262 
38263 /*
38264  * Program notification functions.
38265  */
38266 extern void uu_alt_exit(int);
38267 extern const char *uu_setpname(char *);
38268 extern const char *uu_getpname(void);
38269 /*PRINTFLIKE1*/
38270 extern void uu_warn(const char *, ...);
38271 extern void uu_vwarn(const char *, va_list);
38272 /*PRINTFLIKE1*/
38273 extern void uu_die(const char *, ...) __attribute__((__noreturn__));
38274 extern void uu_vdie(const char *, va_list) __attribute__((__noreturn__));
38275 /*PRINTFLIKE2*/
38276 extern void uu_xdie(int, const char *, ...) __attribute__((__noreturn__));
38277 extern void uu_vxdie(int, const char *, va_list) __attribute__((__noreturn__));
38278 
38279 /*
38280  * Exit status functions (not to be used directly)
38281  */
38282 extern int *uu_exit_ok(void);
38283 extern int *uu_exit_fatal(void);
38284 extern int *uu_exit_usage(void);
38285 
38286 /*
38287  * string->number conversions
38288  */
38289 extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
38290 extern int uu_strtouint(const char *, void *, size_t, int, uint64_t, uint64_t);
38291 
38292 /*
38293  * Debug print facility functions.
38294  */
38295 typedef struct uu_dprintf uu_dprintf_t;
38296 
38297 typedef enum {
38298  UU_DPRINTF_SILENT,
38299  UU_DPRINTF_FATAL,
38300  UU_DPRINTF_WARNING,
38301  UU_DPRINTF_NOTICE,
38302  UU_DPRINTF_INFO,
38303  UU_DPRINTF_DEBUG
38304 } uu_dprintf_severity_t;
38305 
38306 extern uu_dprintf_t *uu_dprintf_create(const char *, uu_dprintf_severity_t,
38307     uint_t);
38308 /*PRINTFLIKE3*/
38309 extern void uu_dprintf(uu_dprintf_t *, uu_dprintf_severity_t,
38310     const char *, ...);
38311 extern void uu_dprintf_destroy(uu_dprintf_t *);
38312 extern const char *uu_dprintf_getname(uu_dprintf_t *);
38313 
38314 /*
38315  * Identifier test flags and function.
38316  */
38317 
38318 
38319 
38320 int uu_check_name(const char *, uint_t);
38321 
38322 /*
38323  * File creation functions.
38324  */
38325 extern int uu_open_tmp(const char *dir, uint_t uflags);
38326 
38327 /*
38328  * Convenience functions.
38329  */
38330 
38331 
38332 /*PRINTFLIKE1*/
38333 extern char *uu_msprintf(const char *format, ...);
38334 extern void *uu_zalloc(size_t);
38335 extern char *uu_strdup(const char *);
38336 extern void uu_free(void *);
38337 
38338 extern boolean_t uu_strcaseeq(const char *a, const char *b);
38339 extern boolean_t uu_streq(const char *a, const char *b);
38340 extern char *uu_strndup(const char *s, size_t n);
38341 extern boolean_t uu_strbw(const char *a, const char *b);
38342 extern void *uu_memdup(const void *buf, size_t sz);
38343 extern void uu_dump(FILE *out, const char *prefix, const void *buf, size_t len);
38344 
38345 /*
38346  * Comparison function type definition.
38347  *   Developers should be careful in their use of the _private argument. If you
38348  *   break interface guarantees, you get undefined behavior.
38349  */
38350 typedef int uu_compare_fn_t(const void *__left, const void *__right,
38351     void *__private);
38352 
38353 /*
38354  * Walk variant flags.
38355  *   A data structure need not provide support for all variants and
38356  *   combinations.  Refer to the appropriate documentation.
38357  */
38358 
38359 
38360 
38361 
38362 
38363 
38364 /*
38365  * Walk callback function return codes.
38366  */
38367 
38368 
38369 
38370 
38371 /*
38372  * Walk callback function type definition.
38373  */
38374 typedef int uu_walk_fn_t(void *_elem, void *_private);
38375 
38376 /*
38377  * lists: opaque structures
38378  */
38379 typedef struct uu_list_pool uu_list_pool_t;
38380 typedef struct uu_list uu_list_t;
38381 
38382 typedef struct uu_list_node {
38383  uintptr_t uln_opaque[2];
38384 } uu_list_node_t;
38385 
38386 typedef struct uu_list_walk uu_list_walk_t;
38387 
38388 typedef uintptr_t uu_list_index_t;
38389 
38390 /*
38391  * lists: interface
38392  *
38393  * basic usage:
38394  *	typedef struct foo {
38395  *		...
38396  *		uu_list_node_t foo_node;
38397  *		...
38398  *	} foo_t;
38399  *
38400  *	static int
38401  *	foo_compare(void *l_arg, void *r_arg, void *private)
38402  *	{
38403  *		foo_t *l = l_arg;
38404  *		foo_t *r = r_arg;
38405  *
38406  *		if (... l greater than r ...)
38407  *			return (1);
38408  *		if (... l less than r ...)
38409  *			return (-1);
38410  *		return (0);
38411  *	}
38412  *
38413  *	...
38414  *		// at initialization time
38415  *		foo_pool = uu_list_pool_create("foo_pool",
38416  *		    sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare,
38417  *		    debugging? 0 : UU_AVL_POOL_DEBUG);
38418  *	...
38419  */
38420 uu_list_pool_t *uu_list_pool_create(const char *, size_t, size_t,
38421     uu_compare_fn_t *, uint32_t);
38422 
38423 
38424 void uu_list_pool_destroy(uu_list_pool_t *);
38425 
38426 /*
38427  * usage:
38428  *
38429  *	foo_t *a;
38430  *	a = malloc(sizeof(*a));
38431  *	uu_list_node_init(a, &a->foo_list, pool);
38432  *	...
38433  *	uu_list_node_fini(a, &a->foo_list, pool);
38434  *	free(a);
38435  */
38436 void uu_list_node_init(void *, uu_list_node_t *, uu_list_pool_t *);
38437 void uu_list_node_fini(void *, uu_list_node_t *, uu_list_pool_t *);
38438 
38439 uu_list_t *uu_list_create(uu_list_pool_t *, void *_parent, uint32_t);
38440 
38441 
38442 
38443 void uu_list_destroy(uu_list_t *); /* list must be empty */
38444 
38445 size_t uu_list_numnodes(uu_list_t *);
38446 
38447 void *uu_list_first(uu_list_t *);
38448 void *uu_list_last(uu_list_t *);
38449 
38450 void *uu_list_next(uu_list_t *, void *);
38451 void *uu_list_prev(uu_list_t *, void *);
38452 
38453 int uu_list_walk(uu_list_t *, uu_walk_fn_t *, void *, uint32_t);
38454 
38455 uu_list_walk_t *uu_list_walk_start(uu_list_t *, uint32_t);
38456 void *uu_list_walk_next(uu_list_walk_t *);
38457 void uu_list_walk_end(uu_list_walk_t *);
38458 
38459 void *uu_list_find(uu_list_t *, void *, void *, uu_list_index_t *);
38460 void uu_list_insert(uu_list_t *, void *, uu_list_index_t);
38461 
38462 void *uu_list_nearest_next(uu_list_t *, uu_list_index_t);
38463 void *uu_list_nearest_prev(uu_list_t *, uu_list_index_t);
38464 
38465 void *uu_list_teardown(uu_list_t *, void **);
38466 
38467 void uu_list_remove(uu_list_t *, void *);
38468 
38469 /*
38470  * lists: interfaces for non-sorted lists only
38471  */
38472 int uu_list_insert_before(uu_list_t *, void *_target, void *_elem);
38473 int uu_list_insert_after(uu_list_t *, void *_target, void *_elem);
38474 
38475 /*
38476  * avl trees: opaque structures
38477  */
38478 typedef struct uu_avl_pool uu_avl_pool_t;
38479 typedef struct uu_avl uu_avl_t;
38480 
38481 typedef struct uu_avl_node {
38482 
38483 
38484 
38485  uintptr_t uan_opaque[4];
38486 
38487 } uu_avl_node_t;
38488 
38489 typedef struct uu_avl_walk uu_avl_walk_t;
38490 
38491 typedef uintptr_t uu_avl_index_t;
38492 
38493 /*
38494  * avl trees: interface
38495  *
38496  * basic usage:
38497  *	typedef struct foo {
38498  *		...
38499  *		uu_avl_node_t foo_node;
38500  *		...
38501  *	} foo_t;
38502  *
38503  *	static int
38504  *	foo_compare(void *l_arg, void *r_arg, void *private)
38505  *	{
38506  *		foo_t *l = l_arg;
38507  *		foo_t *r = r_arg;
38508  *
38509  *		if (... l greater than r ...)
38510  *			return (1);
38511  *		if (... l less than r ...)
38512  *			return (-1);
38513  *		return (0);
38514  *	}
38515  *
38516  *	...
38517  *		// at initialization time
38518  *		foo_pool = uu_avl_pool_create("foo_pool",
38519  *		    sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare,
38520  *		    debugging? 0 : UU_AVL_POOL_DEBUG);
38521  *	...
38522  */
38523 uu_avl_pool_t *uu_avl_pool_create(const char *, size_t, size_t,
38524     uu_compare_fn_t *, uint32_t);
38525 
38526 
38527 void uu_avl_pool_destroy(uu_avl_pool_t *);
38528 
38529 /*
38530  * usage:
38531  *
38532  *	foo_t *a;
38533  *	a = malloc(sizeof(*a));
38534  *	uu_avl_node_init(a, &a->foo_avl, pool);
38535  *	...
38536  *	uu_avl_node_fini(a, &a->foo_avl, pool);
38537  *	free(a);
38538  */
38539 void uu_avl_node_init(void *, uu_avl_node_t *, uu_avl_pool_t *);
38540 void uu_avl_node_fini(void *, uu_avl_node_t *, uu_avl_pool_t *);
38541 
38542 uu_avl_t *uu_avl_create(uu_avl_pool_t *, void *_parent, uint32_t);
38543 
38544 
38545 void uu_avl_destroy(uu_avl_t *); /* list must be empty */
38546 
38547 size_t uu_avl_numnodes(uu_avl_t *);
38548 
38549 void *uu_avl_first(uu_avl_t *);
38550 void *uu_avl_last(uu_avl_t *);
38551 
38552 void *uu_avl_next(uu_avl_t *, void *);
38553 void *uu_avl_prev(uu_avl_t *, void *);
38554 
38555 int uu_avl_walk(uu_avl_t *, uu_walk_fn_t *, void *, uint32_t);
38556 
38557 uu_avl_walk_t *uu_avl_walk_start(uu_avl_t *, uint32_t);
38558 void *uu_avl_walk_next(uu_avl_walk_t *);
38559 void uu_avl_walk_end(uu_avl_walk_t *);
38560 
38561 void *uu_avl_find(uu_avl_t *, void *, void *, uu_avl_index_t *);
38562 void uu_avl_insert(uu_avl_t *, void *, uu_avl_index_t);
38563 
38564 void *uu_avl_nearest_next(uu_avl_t *, uu_avl_index_t);
38565 void *uu_avl_nearest_prev(uu_avl_t *, uu_avl_index_t);
38566 
38567 void *uu_avl_teardown(uu_avl_t *, void **);
38568 
38569 void uu_avl_remove(uu_avl_t *, void *);
38570 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
38571 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mnttab.h" 1
38572 /*
38573  * CDDL HEADER START
38574  *
38575  * The contents of this file are subject to the terms of the
38576  * Common Development and Distribution License (the "License").
38577  * You may not use this file except in compliance with the License.
38578  *
38579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38580  * or http://www.opensolaris.org/os/licensing.
38581  * See the License for the specific language governing permissions
38582  * and limitations under the License.
38583  *
38584  * When distributing Covered Code, include this CDDL HEADER in each
38585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38586  * If applicable, add the following below this CDDL HEADER, with the
38587  * fields enclosed by brackets "[]" replaced with your own identifying
38588  * information: Portions Copyright [yyyy] [name of copyright owner]
38589  *
38590  * CDDL HEADER END
38591  */
38592 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38593 /*	  All Rights Reserved  	*/
38594 
38595 
38596 /*
38597  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
38598  *
38599  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38600  * Use is subject to license terms.
38601  */
38602 
38603 
38604 
38605 
38606 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
38607 /*
38608  * CDDL HEADER START
38609  *
38610  * The contents of this file are subject to the terms of the
38611  * Common Development and Distribution License (the "License").
38612  * You may not use this file except in compliance with the License.
38613  *
38614  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38615  * or http://www.opensolaris.org/os/licensing.
38616  * See the License for the specific language governing permissions
38617  * and limitations under the License.
38618  *
38619  * When distributing Covered Code, include this CDDL HEADER in each
38620  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38621  * If applicable, add the following below this CDDL HEADER, with the
38622  * fields enclosed by brackets "[]" replaced with your own identifying
38623  * information: Portions Copyright [yyyy] [name of copyright owner]
38624  *
38625  * CDDL HEADER END
38626  */
38627 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38628 /*	  All Rights Reserved  	*/
38629 
38630 
38631 /*
38632  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38633  * Use is subject to license terms.
38634  *
38635  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
38636  * Copyright 2016 Joyent, Inc.
38637  */
38638 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mnttab.h" 2
38639 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mnttab.h"
38640 /*
38641  * The fields in struct extmnttab should match those in struct mnttab until new
38642  * fields are encountered. This allows hasmntopt(), getmntent_common() and
38643  * mntioctl() to cast one type to the other safely.
38644  *
38645  * The fields in struct mnttab, struct extmnttab and struct mntentbuf must all
38646  * match those in the corresponding 32-bit versions defined in mntvnops.c.
38647  */
38648 struct mnttab {
38649  char *mnt_special;
38650  char *mnt_mountp;
38651  char *mnt_fstype;
38652  char *mnt_mntopts;
38653  char *mnt_time;
38654 };
38655 
38656 struct extmnttab {
38657  char *mnt_special;
38658  char *mnt_mountp;
38659  char *mnt_fstype;
38660  char *mnt_mntopts;
38661  char *mnt_time;
38662  uint_t mnt_major;
38663  uint_t mnt_minor;
38664 };
38665 
38666 struct mntentbuf {
38667  struct extmnttab *mbuf_emp;
38668  size_t mbuf_bufsize;
38669  char *mbuf_buf;
38670 };
38671 
38672 
38673 extern void resetmnttab(FILE *);
38674 extern int getmntent(FILE *, struct mnttab *);
38675 extern int getextmntent(FILE *, struct extmnttab *, size_t);
38676 extern int getmntany(FILE *, struct mnttab *, struct mnttab *);
38677 extern char *hasmntopt(struct mnttab *, char *);
38678 extern char *mntopt(char **);
38679 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
38680 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
38681 /*
38682  * CDDL HEADER START
38683  *
38684  * The contents of this file are subject to the terms of the
38685  * Common Development and Distribution License (the "License").
38686  * You may not use this file except in compliance with the License.
38687  *
38688  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38689  * or http://www.opensolaris.org/os/licensing.
38690  * See the License for the specific language governing permissions
38691  * and limitations under the License.
38692  *
38693  * When distributing Covered Code, include this CDDL HEADER in each
38694  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38695  * If applicable, add the following below this CDDL HEADER, with the
38696  * fields enclosed by brackets "[]" replaced with your own identifying
38697  * information: Portions Copyright [yyyy] [name of copyright owner]
38698  *
38699  * CDDL HEADER END
38700  */
38701 
38702 /*
38703  * Copyright (c) 2013 Gary Mills
38704  *
38705  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
38706  * Use is subject to license terms.
38707  */
38708 
38709 /*	Copyright (c) 1988 AT&T	*/
38710 /*	  All Rights Reserved  	*/
38711 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
38712 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 1
38713 /*
38714  * CDDL HEADER START
38715  *
38716  * The contents of this file are subject to the terms of the
38717  * Common Development and Distribution License, Version 1.0 only
38718  * (the "License").  You may not use this file except in compliance
38719  * with the License.
38720  *
38721  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38722  * or http://www.opensolaris.org/os/licensing.
38723  * See the License for the specific language governing permissions
38724  * and limitations under the License.
38725  *
38726  * When distributing Covered Code, include this CDDL HEADER in each
38727  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38728  * If applicable, add the following below this CDDL HEADER, with the
38729  * fields enclosed by brackets "[]" replaced with your own identifying
38730  * information: Portions Copyright [yyyy] [name of copyright owner]
38731  *
38732  * CDDL HEADER END
38733  */
38734 /*
38735  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
38736  *
38737  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
38738  * Use is subject to license terms.
38739  */
38740 
38741 /*	Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T	*/
38742 /*	  All Rights Reserved  	*/
38743 
38744 /*
38745  * Portions of this source code were derived from Berkeley 4.3 BSD
38746  * under license from the Regents of the University of California.
38747  */
38748 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
38749 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h"
38750 /*
38751  * Warning: these are shared with the admin/install consolidation.
38752  * Do not insert states between any of the currently defined states,
38753  * and any new states must be evaluated for impact on range comparisons.
38754  */
38755 # 130 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h"
38756 /* Owner, group, and mode (defined by packaging) for the config directory */
38757 
38758 
38759 
38760 
38761 /* Owner, group, and mode (defined by packaging) for the index file */
38762 
38763 
38764 
38765 
38766 /* The maximum length of the VERSION string in the pkginfo(4) file. */
38767 
38768 
38769 /*
38770  * Shortened alias names for the zones rctls.
38771  */
38772 # 157 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h"
38773 /* Default name for zone detached manifest */
38774 
38775 
38776 /*
38777  * Bit flag definitions for passing into libzonecfg functions.
38778  */
38779 
38780 
38781 /*
38782  * The integer field expresses the current values on a get.
38783  * On a put, it represents the new values if >= 0 or "don't change" if < 0.
38784  */
38785 struct zoneent {
38786  char zone_name[64]; /* name of the zone */
38787  int zone_state; /* configured | incomplete | installed */
38788  char zone_path[1024]; /* path to zone storage */
38789  uuid_t zone_uuid; /* unique ID for zone */
38790  char zone_newname[64]; /* for doing renames */
38791 };
38792 
38793 typedef struct zone_dochandle *zone_dochandle_t; /* opaque handle */
38794 
38795 typedef uint_t zone_state_t;
38796 
38797 typedef struct zone_fsopt {
38798  struct zone_fsopt *zone_fsopt_next;
38799  char zone_fsopt_opt[1024];
38800 } zone_fsopt_t;
38801 
38802 struct zone_fstab {
38803  char zone_fs_special[1024]; /* special file */
38804  char zone_fs_dir[1024]; /* mount point */
38805  char zone_fs_type[16]; /* e.g. ufs */
38806  zone_fsopt_t *zone_fs_options; /* mount options */
38807  char zone_fs_raw[1024]; /* device to fsck */
38808 };
38809 
38810 struct zone_nwiftab {
38811  char zone_nwif_address[46]; /* shared-ip only */
38812  char zone_nwif_allowed_address[46]; /* excl-ip only */
38813  char zone_nwif_physical[32];
38814  char zone_nwif_defrouter[46];
38815 };
38816 
38817 struct zone_devtab {
38818  char zone_dev_match[1024];
38819 };
38820 
38821 struct zone_rctlvaltab {
38822  char zone_rctlval_priv[256];
38823  char zone_rctlval_limit[256];
38824  char zone_rctlval_action[256];
38825  struct zone_rctlvaltab *zone_rctlval_next;
38826 };
38827 
38828 struct zone_rctltab {
38829  char zone_rctl_name[256];
38830  struct zone_rctlvaltab *zone_rctl_valptr;
38831 };
38832 
38833 struct zone_attrtab {
38834  char zone_attr_name[256];
38835  char zone_attr_type[256];
38836  char zone_attr_value[2 * 1024];
38837 };
38838 
38839 struct zone_dstab {
38840  char zone_dataset_name[256];
38841 };
38842 
38843 struct zone_psettab {
38844  char zone_ncpu_min[256];
38845  char zone_ncpu_max[256];
38846  char zone_importance[256];
38847 };
38848 
38849 struct zone_mcaptab {
38850  char zone_physmem_cap[256];
38851 };
38852 
38853 struct zone_pkgtab {
38854  char zone_pkg_name[256];
38855  char zone_pkg_version[256];
38856 };
38857 
38858 struct zone_devpermtab {
38859  char zone_devperm_name[1024];
38860  uid_t zone_devperm_uid;
38861  gid_t zone_devperm_gid;
38862  mode_t zone_devperm_mode;
38863  char *zone_devperm_acl;
38864 };
38865 
38866 struct zone_admintab {
38867  char zone_admin_user[(sizeof (((struct utmpx *)0)->ut_user))];
38868  char zone_admin_auths[4096];
38869 };
38870 
38871 typedef struct zone_userauths {
38872  char user[(sizeof (((struct utmpx *)0)->ut_user))];
38873  char zonename[64];
38874  struct zone_userauths *next;
38875 } zone_userauths_t;
38876 
38877 typedef struct {
38878  uu_avl_node_t zpe_entry;
38879  char *zpe_name;
38880  char *zpe_vers;
38881 } zone_pkg_entry_t;
38882 
38883 typedef enum zone_iptype {
38884  ZS_SHARED,
38885  ZS_EXCLUSIVE
38886 } zone_iptype_t;
38887 
38888 /*
38889  * Basic configuration management routines.
38890  */
38891 extern zone_dochandle_t zonecfg_init_handle(void);
38892 extern int zonecfg_get_handle(const char *, zone_dochandle_t);
38893 extern int zonecfg_get_snapshot_handle(const char *, zone_dochandle_t);
38894 extern int zonecfg_get_template_handle(const char *, const char *,
38895     zone_dochandle_t);
38896 extern int zonecfg_get_xml_handle(const char *, zone_dochandle_t);
38897 extern int zonecfg_check_handle(zone_dochandle_t);
38898 extern void zonecfg_fini_handle(zone_dochandle_t);
38899 extern int zonecfg_destroy(const char *, boolean_t);
38900 extern int zonecfg_destroy_snapshot(const char *);
38901 extern int zonecfg_save(zone_dochandle_t);
38902 extern int zonecfg_create_snapshot(const char *);
38903 extern char *zonecfg_strerror(int);
38904 extern int zonecfg_access(const char *, int);
38905 extern void zonecfg_set_root(const char *);
38906 extern const char *zonecfg_get_root(void);
38907 extern boolean_t zonecfg_in_alt_root(void);
38908 extern int zonecfg_num_resources(zone_dochandle_t, char *);
38909 extern int zonecfg_del_all_resources(zone_dochandle_t, char *);
38910 extern boolean_t zonecfg_valid_ncpus(char *, char *);
38911 extern boolean_t zonecfg_valid_importance(char *);
38912 extern int zonecfg_str_to_bytes(char *, uint64_t *);
38913 extern boolean_t zonecfg_valid_memlimit(char *, uint64_t *);
38914 extern boolean_t zonecfg_valid_alias_limit(char *, char *, uint64_t *);
38915 
38916 /*
38917  * Zone name, path to zone directory, autoboot setting, pool, boot
38918  * arguments, and scheduling-class.
38919  */
38920 extern int zonecfg_validate_zonename(const char *);
38921 extern int zonecfg_get_name(zone_dochandle_t, char *, size_t);
38922 extern int zonecfg_set_name(zone_dochandle_t, char *);
38923 extern int zonecfg_get_zonepath(zone_dochandle_t, char *, size_t);
38924 extern int zonecfg_set_zonepath(zone_dochandle_t, char *);
38925 extern int zonecfg_get_autoboot(zone_dochandle_t, boolean_t *);
38926 extern int zonecfg_set_autoboot(zone_dochandle_t, boolean_t);
38927 extern int zonecfg_get_iptype(zone_dochandle_t, zone_iptype_t *);
38928 extern int zonecfg_set_iptype(zone_dochandle_t, zone_iptype_t);
38929 extern int zonecfg_get_pool(zone_dochandle_t, char *, size_t);
38930 extern int zonecfg_set_pool(zone_dochandle_t, char *);
38931 extern int zonecfg_get_bootargs(zone_dochandle_t, char *, size_t);
38932 extern int zonecfg_set_bootargs(zone_dochandle_t, char *);
38933 extern int zonecfg_get_sched_class(zone_dochandle_t, char *, size_t);
38934 extern int zonecfg_set_sched(zone_dochandle_t, char *);
38935 extern int zonecfg_get_dflt_sched_class(zone_dochandle_t, char *, int);
38936 
38937 /*
38938  * Set/retrieve the brand for the zone
38939  */
38940 extern int zonecfg_get_brand(zone_dochandle_t, char *, size_t);
38941 extern int zonecfg_set_brand(zone_dochandle_t, char *);
38942 
38943 /*
38944  * Filesystem configuration.
38945  */
38946 extern int zonecfg_add_filesystem(zone_dochandle_t, struct zone_fstab *);
38947 extern int zonecfg_delete_filesystem(zone_dochandle_t,
38948     struct zone_fstab *);
38949 extern int zonecfg_modify_filesystem(zone_dochandle_t,
38950     struct zone_fstab *, struct zone_fstab *);
38951 extern int zonecfg_lookup_filesystem(zone_dochandle_t,
38952     struct zone_fstab *);
38953 extern int zonecfg_add_fs_option(struct zone_fstab *, char *);
38954 extern int zonecfg_remove_fs_option(struct zone_fstab *, char *);
38955 extern void zonecfg_free_fs_option_list(zone_fsopt_t *);
38956 extern int zonecfg_find_mounts(char *, int(*)(const struct mnttab *,
38957     void *), void *);
38958 
38959 /*
38960  * Network interface configuration.
38961  */
38962 extern int zonecfg_add_nwif(zone_dochandle_t, struct zone_nwiftab *);
38963 extern int zonecfg_delete_nwif(zone_dochandle_t, struct zone_nwiftab *);
38964 extern int zonecfg_modify_nwif(zone_dochandle_t, struct zone_nwiftab *,
38965     struct zone_nwiftab *);
38966 extern int zonecfg_lookup_nwif(zone_dochandle_t, struct zone_nwiftab *);
38967 
38968 /*
38969  * Hostid emulation configuration.
38970  */
38971 extern int zonecfg_get_hostid(zone_dochandle_t, char *, size_t);
38972 extern int zonecfg_set_hostid(zone_dochandle_t, const char *);
38973 
38974 /*
38975  * Allowed FS mounts configuration.
38976  */
38977 extern int zonecfg_get_fs_allowed(zone_dochandle_t, char *, size_t);
38978 extern int zonecfg_set_fs_allowed(zone_dochandle_t, const char *);
38979 
38980 /*
38981  * Device configuration and rule matching.
38982  */
38983 extern int zonecfg_add_dev(zone_dochandle_t, struct zone_devtab *);
38984 extern int zonecfg_delete_dev(zone_dochandle_t, struct zone_devtab *);
38985 extern int zonecfg_modify_dev(zone_dochandle_t, struct zone_devtab *,
38986     struct zone_devtab *);
38987 extern int zonecfg_lookup_dev(zone_dochandle_t, struct zone_devtab *);
38988 
38989 /*
38990  * Resource control configuration.
38991  */
38992 extern int zonecfg_add_rctl(zone_dochandle_t, struct zone_rctltab *);
38993 extern int zonecfg_delete_rctl(zone_dochandle_t, struct zone_rctltab *);
38994 extern int zonecfg_modify_rctl(zone_dochandle_t, struct zone_rctltab *,
38995     struct zone_rctltab *);
38996 extern int zonecfg_lookup_rctl(zone_dochandle_t, struct zone_rctltab *);
38997 extern int zonecfg_add_rctl_value(struct zone_rctltab *,
38998     struct zone_rctlvaltab *);
38999 extern int zonecfg_remove_rctl_value(struct zone_rctltab *,
39000     struct zone_rctlvaltab *);
39001 extern void zonecfg_free_rctl_value_list(struct zone_rctlvaltab *);
39002 extern boolean_t zonecfg_aliased_rctl_ok(zone_dochandle_t, char *);
39003 extern int zonecfg_set_aliased_rctl(zone_dochandle_t, char *, uint64_t);
39004 extern int zonecfg_get_aliased_rctl(zone_dochandle_t, char *, uint64_t *);
39005 extern int zonecfg_rm_aliased_rctl(zone_dochandle_t, char *);
39006 extern int zonecfg_apply_rctls(char *, zone_dochandle_t);
39007 
39008 /*
39009  * Generic attribute configuration and type/value extraction.
39010  */
39011 extern int zonecfg_add_attr(zone_dochandle_t, struct zone_attrtab *);
39012 extern int zonecfg_delete_attr(zone_dochandle_t, struct zone_attrtab *);
39013 extern int zonecfg_modify_attr(zone_dochandle_t, struct zone_attrtab *,
39014     struct zone_attrtab *);
39015 extern int zonecfg_lookup_attr(zone_dochandle_t, struct zone_attrtab *);
39016 extern int zonecfg_get_attr_boolean(const struct zone_attrtab *,
39017     boolean_t *);
39018 extern int zonecfg_get_attr_int(const struct zone_attrtab *, int64_t *);
39019 extern int zonecfg_get_attr_string(const struct zone_attrtab *, char *,
39020     size_t);
39021 extern int zonecfg_get_attr_uint(const struct zone_attrtab *, uint64_t *);
39022 
39023 /*
39024  * ZFS configuration.
39025  */
39026 extern int zonecfg_add_ds(zone_dochandle_t, struct zone_dstab *);
39027 extern int zonecfg_delete_ds(zone_dochandle_t, struct zone_dstab *);
39028 extern int zonecfg_modify_ds(zone_dochandle_t, struct zone_dstab *,
39029     struct zone_dstab *);
39030 extern int zonecfg_lookup_ds(zone_dochandle_t, struct zone_dstab *);
39031 
39032 /*
39033  * cpu-set configuration.
39034  */
39035 extern int zonecfg_add_pset(zone_dochandle_t, struct zone_psettab *);
39036 extern int zonecfg_delete_pset(zone_dochandle_t);
39037 extern int zonecfg_modify_pset(zone_dochandle_t, struct zone_psettab *);
39038 extern int zonecfg_lookup_pset(zone_dochandle_t, struct zone_psettab *);
39039 
39040 /*
39041  * mem-cap configuration.
39042  */
39043 extern int zonecfg_delete_mcap(zone_dochandle_t);
39044 extern int zonecfg_modify_mcap(zone_dochandle_t, struct zone_mcaptab *);
39045 extern int zonecfg_lookup_mcap(zone_dochandle_t, struct zone_mcaptab *);
39046 
39047 /*
39048  * Temporary pool support functions.
39049  */
39050 extern int zonecfg_destroy_tmp_pool(char *, char *, int);
39051 extern int zonecfg_bind_tmp_pool(zone_dochandle_t, zoneid_t, char *, int);
39052 extern int zonecfg_bind_pool(zone_dochandle_t, zoneid_t, char *, int);
39053 extern boolean_t zonecfg_warn_poold(zone_dochandle_t);
39054 extern int zonecfg_get_poolname(zone_dochandle_t, char *, char *, size_t);
39055 
39056 /*
39057  * Miscellaneous utility functions.
39058  */
39059 extern int zonecfg_enable_rcapd(char *, int);
39060 
39061 /*
39062  * attach/detach support.
39063  */
39064 extern int zonecfg_get_attach_handle(const char *, const char *,
39065     const char *, boolean_t, zone_dochandle_t);
39066 extern int zonecfg_attach_manifest(int, zone_dochandle_t,
39067     zone_dochandle_t);
39068 extern int zonecfg_detach_save(zone_dochandle_t, uint_t);
39069 extern boolean_t zonecfg_detached(const char *);
39070 extern void zonecfg_rm_detached(zone_dochandle_t, boolean_t forced);
39071 extern int zonecfg_dev_manifest(zone_dochandle_t);
39072 extern int zonecfg_devperms_apply(zone_dochandle_t, const char *,
39073     uid_t, gid_t, mode_t, const char *);
39074 extern void zonecfg_set_swinv(zone_dochandle_t);
39075 extern int zonecfg_add_pkg(zone_dochandle_t, char *, char *);
39076 
39077 /*
39078  * External zone verification support.
39079  */
39080 extern int zonecfg_verify_save(zone_dochandle_t, char *);
39081 
39082 /*
39083  * '*ent' iterator routines.
39084  */
39085 extern int zonecfg_setfsent(zone_dochandle_t);
39086 extern int zonecfg_getfsent(zone_dochandle_t, struct zone_fstab *);
39087 extern int zonecfg_endfsent(zone_dochandle_t);
39088 extern int zonecfg_setnwifent(zone_dochandle_t);
39089 extern int zonecfg_getnwifent(zone_dochandle_t, struct zone_nwiftab *);
39090 extern int zonecfg_endnwifent(zone_dochandle_t);
39091 extern int zonecfg_setdevent(zone_dochandle_t);
39092 extern int zonecfg_getdevent(zone_dochandle_t, struct zone_devtab *);
39093 extern int zonecfg_enddevent(zone_dochandle_t);
39094 extern int zonecfg_setattrent(zone_dochandle_t);
39095 extern int zonecfg_getattrent(zone_dochandle_t, struct zone_attrtab *);
39096 extern int zonecfg_endattrent(zone_dochandle_t);
39097 extern int zonecfg_setrctlent(zone_dochandle_t);
39098 extern int zonecfg_getrctlent(zone_dochandle_t, struct zone_rctltab *);
39099 extern int zonecfg_endrctlent(zone_dochandle_t);
39100 extern int zonecfg_setdsent(zone_dochandle_t);
39101 extern int zonecfg_getdsent(zone_dochandle_t, struct zone_dstab *);
39102 extern int zonecfg_enddsent(zone_dochandle_t);
39103 extern int zonecfg_getpsetent(zone_dochandle_t, struct zone_psettab *);
39104 extern int zonecfg_getmcapent(zone_dochandle_t, struct zone_mcaptab *);
39105 extern int zonecfg_getpkgdata(zone_dochandle_t, uu_avl_pool_t *,
39106     uu_avl_t *);
39107 extern int zonecfg_setdevperment(zone_dochandle_t);
39108 extern int zonecfg_getdevperment(zone_dochandle_t,
39109     struct zone_devpermtab *);
39110 extern int zonecfg_enddevperment(zone_dochandle_t);
39111 extern int zonecfg_setadminent(zone_dochandle_t);
39112 extern int zonecfg_getadminent(zone_dochandle_t, struct zone_admintab *);
39113 extern int zonecfg_endadminent(zone_dochandle_t);
39114 
39115 /*
39116  * Privilege-related functions.
39117  */
39118 extern int zonecfg_default_privset(priv_set_t *, const char *);
39119 extern int zonecfg_get_privset(zone_dochandle_t, priv_set_t *,
39120     char **);
39121 extern int zonecfg_get_limitpriv(zone_dochandle_t, char **);
39122 extern int zonecfg_set_limitpriv(zone_dochandle_t, char *);
39123 
39124 /*
39125  * Higher-level routines.
39126  */
39127 extern int zone_get_brand(char *, char *, size_t);
39128 extern int zone_get_rootpath(char *, char *, size_t);
39129 extern int zone_get_devroot(char *, char *, size_t);
39130 extern int zone_get_zonepath(char *, char *, size_t);
39131 extern int zone_get_state(char *, zone_state_t *);
39132 extern int zone_set_state(char *, zone_state_t);
39133 extern char *zone_state_str(zone_state_t);
39134 extern int zonecfg_get_name_by_uuid(const uuid_t, char *, size_t);
39135 extern int zonecfg_get_uuid(const char *, uuid_t);
39136 extern int zonecfg_default_brand(char *, size_t);
39137 
39138 /*
39139  * Iterator for configured zones.
39140  */
39141 extern FILE *setzoneent(void);
39142 extern char *getzoneent(FILE *);
39143 extern struct zoneent *getzoneent_private(FILE *);
39144 extern void endzoneent(FILE *);
39145 
39146 /*
39147  * File-system-related convenience functions.
39148  */
39149 extern boolean_t zonecfg_valid_fs_type(const char *);
39150 
39151 /*
39152  * Network-related convenience functions.
39153  */
39154 extern boolean_t zonecfg_same_net_address(char *, char *);
39155 extern int zonecfg_valid_net_address(char *, struct lifreq *);
39156 extern boolean_t zonecfg_ifname_exists(sa_family_t, char *);
39157 
39158 /*
39159  * Rctl-related common functions.
39160  */
39161 extern boolean_t zonecfg_is_rctl(const char *);
39162 extern boolean_t zonecfg_valid_rctlname(const char *);
39163 extern boolean_t zonecfg_valid_rctlblk(const rctlblk_t *);
39164 extern boolean_t zonecfg_valid_rctl(const char *, const rctlblk_t *);
39165 extern int zonecfg_construct_rctlblk(const struct zone_rctlvaltab *,
39166     rctlblk_t *);
39167 
39168 /*
39169  * Live Upgrade support functions.  Shared between ON and install gate.
39170  */
39171 extern FILE *zonecfg_open_scratch(const char *, boolean_t);
39172 extern int zonecfg_lock_scratch(FILE *);
39173 extern void zonecfg_close_scratch(FILE *);
39174 extern int zonecfg_get_scratch(FILE *, char *, size_t, char *, size_t, char *,
39175     size_t);
39176 extern int zonecfg_find_scratch(FILE *, const char *, const char *, char *,
39177     size_t);
39178 extern int zonecfg_reverse_scratch(FILE *, const char *, char *, size_t,
39179     char *, size_t);
39180 extern int zonecfg_add_scratch(FILE *, const char *, const char *,
39181     const char *);
39182 extern int zonecfg_delete_scratch(FILE *, const char *);
39183 extern boolean_t zonecfg_is_scratch(const char *);
39184 
39185 /*
39186  * zoneadmd support functions.  Shared between zoneadm and brand hook code.
39187  */
39188 extern void zonecfg_init_lock_file(const char *, char **);
39189 extern void zonecfg_release_lock_file(const char *, int);
39190 extern int zonecfg_grab_lock_file(const char *, int *);
39191 extern boolean_t zonecfg_lock_file_held(int *);
39192 extern int zonecfg_ping_zoneadmd(const char *);
39193 extern int zonecfg_call_zoneadmd(const char *, zone_cmd_arg_t *, char *,
39194     boolean_t);
39195 extern int zonecfg_insert_userauths(zone_dochandle_t, char *, char *);
39196 extern int zonecfg_remove_userauths(zone_dochandle_t, char *, char *,
39197     boolean_t);
39198 extern int zonecfg_add_admin(zone_dochandle_t, struct zone_admintab *,
39199     char *);
39200 extern int zonecfg_delete_admin(zone_dochandle_t,
39201     struct zone_admintab *, char *);
39202 extern int zonecfg_modify_admin(zone_dochandle_t, struct zone_admintab *,
39203     struct zone_admintab *, char *);
39204 extern int zonecfg_delete_admins(zone_dochandle_t, char *);
39205 extern int zonecfg_lookup_admin(zone_dochandle_t, struct zone_admintab *);
39206 extern int zonecfg_authorize_users(zone_dochandle_t, char *);
39207 extern int zonecfg_update_userauths(zone_dochandle_t, char *);
39208 extern int zonecfg_deauthorize_user(zone_dochandle_t, char *, char *);
39209 extern int zonecfg_deauthorize_users(zone_dochandle_t, char *);
39210 extern boolean_t zonecfg_valid_auths(const char *, const char *);
39211 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
39212 
39213 /*
39214  * C++ prefix
39215  */
39216 
39217 
39218 
39219 
39220 
39221 
39222 /* function prototypes */
39223 
39224 /* PRINTFLIKE1 */
39225 typedef void (*_z_printf_fcn_t)(char *a_format, ...);
39226 
39227 /* zone list structure */
39228 
39229 typedef struct _zoneListElement_t *zoneList_t;
39230 
39231 /* zone brand list structure */
39232 
39233 typedef struct _zoneBrandList zoneBrandList_t;
39234 
39235 /* flag for zone locking functions */
39236 
39237 typedef unsigned long ZLOCKS_T;
39238 
39239 /* flags for zone locking */
39240 
39241 
39242 
39243 
39244 
39245 
39246 /*
39247  * external function definitions
39248  */
39249 
39250 /* zones.c */
39251 
39252 extern boolean_t z_zones_are_implemented(void);
39253 extern void z_set_zone_root(const char *zroot);
39254 extern boolean_t z_zlist_is_zone_runnable(zoneList_t a_zoneList,
39255     int a_zoneIndex);
39256 extern boolean_t z_zlist_restore_zone_state(zoneList_t a_zoneList,
39257     int a_zoneIndex);
39258 extern boolean_t z_zlist_change_zone_state(zoneList_t a_zoneList,
39259     int a_zoneIndex, zone_state_t a_newState);
39260 extern char *z_get_zonename(void);
39261 extern zone_state_t z_zlist_get_current_state(zoneList_t a_zoneList,
39262     int a_zoneIndex);
39263 extern zone_state_t z_zlist_get_original_state(zoneList_t a_zoneList,
39264     int a_zoneIndex);
39265 extern int z_zoneExecCmdArray(int *r_status, char **r_results,
39266     char *a_inputFile, char *a_path, char *a_argv[],
39267     const char *a_zoneName, int *a_fds);
39268 extern int z_zone_exec(const char *zonename, const char *path,
39269     char *argv[], char *a_stdoutPath,
39270     char *a_stderrPath, int *a_fds);
39271 extern boolean_t z_create_zone_admin_file(char *a_zoneAdminFilename,
39272     char *a_userAdminFilename);
39273 extern void z_free_zone_list(zoneList_t a_zoneList);
39274 extern zoneList_t z_get_nonglobal_zone_list(void);
39275 extern zoneList_t z_get_nonglobal_zone_list_by_brand(zoneBrandList_t *);
39276 extern void z_free_brand_list(zoneBrandList_t *a_brandList);
39277 extern zoneBrandList_t *z_make_brand_list(const char *brandList,
39278     const char *delim);
39279 extern boolean_t z_lock_zones(zoneList_t a_zlst, ZLOCKS_T a_lflags);
39280 extern boolean_t z_non_global_zones_exist(void);
39281 extern boolean_t z_running_in_global_zone(void);
39282 extern void z_set_output_functions(_z_printf_fcn_t a_echo_fcn,
39283     _z_printf_fcn_t a_echo_debug_fcn,
39284     _z_printf_fcn_t a_progerr_fcn);
39285 extern int z_set_zone_spec(const char *zlist);
39286 extern int z_verify_zone_spec(void);
39287 extern boolean_t z_on_zone_spec(const char *zonename);
39288 extern boolean_t z_global_only(void);
39289 extern boolean_t z_unlock_zones(zoneList_t a_zlst, ZLOCKS_T a_lflags);
39290 extern boolean_t z_lock_this_zone(ZLOCKS_T a_lflags);
39291 extern boolean_t z_unlock_this_zone(ZLOCKS_T a_lflags);
39292 extern char *z_zlist_get_zonename(zoneList_t a_zoneList,
39293     int a_zoneId);
39294 extern char *z_zlist_get_zonepath(zoneList_t a_zoneList,
39295     int a_zoneId);
39296 extern char *z_zlist_get_scratch(zoneList_t a_zoneList,
39297     int a_zoneId);
39298 extern boolean_t z_umount_lz_mount(char *a_lzMountPoint);
39299 extern boolean_t z_mount_in_lz(char **r_lzMountPoint,
39300     char **r_lzRootPath,
39301     char *a_zoneName, char *a_gzPath,
39302     char *a_mountPointPrefix);
39303 extern boolean_t z_is_zone_branded(char *zoneName);
39304 extern boolean_t z_is_zone_brand_in_list(char *zoneName,
39305        zoneBrandList_t *brands);
39306 extern boolean_t z_zones_are_implemented(void);
39307 
39308 /* zones_exec.c */
39309 extern int z_ExecCmdArray(int *r_status, char **r_results,
39310     char *a_inputFile, char *a_cmd, char **a_args);
39311 /*VARARGS*/
39312 extern int z_ExecCmdList(int *r_status, char **r_results,
39313     char *a_inputFile, char *a_cmd, ...);
39314 
39315 /* zones_paths.c */
39316 extern char *z_make_zone_root(char *);
39317 extern void z_path_canonize(char *file);
39318 extern void z_canoninplace(char *file);
39319 
39320 /* zones_lofs.c */
39321 extern void z_destroyMountTable(void);
39322 extern int z_createMountTable(void);
39323 extern int z_isPathWritable(const char *);
39324 extern void z_resolve_lofs(char *path, size_t);
39325 
39326 /* zones_states.c */
39327 extern int UmountAllZones(char *mntpnt);
39328 
39329 /*
39330  * C++ postfix
39331  */
39332 # 49 "check.c" 2
39333 
39334 extern int npkgs; /* the number of packages yet to be installed */
39335 
39336 /*
39337  * ckquit is a global that controls 'ckyorn' (defined in libadm)
39338  * If ckquit is non-zero, then "quit" is allowed as an answer when
39339  * ckyorn is called. If is it zero, then "quit" is not an allowed answer.
39340  */
39341 extern int ckquit;
39342 
39343 extern struct admin adm;
39344 
39345 /*
39346  * each one of these represents a single kind of dependency check
39347  */
39348 
39349 static depckError_t er_depsonme = {0, (depckErrorRecord_t *)0};
39350 static depckError_t er_prenci = {0, (depckErrorRecord_t *)0};
39351 static depckError_t er_prereq = {0, (depckErrorRecord_t *)0};
39352 static depckError_t er_rckdepend = {0, (depckErrorRecord_t *)0};
39353 static depckError_t er_rckpriv = {0, (depckErrorRecord_t *)0};
39354 static depckError_t er_rckrunlevel = {0, (depckErrorRecord_t *)0};
39355 static depckError_t er_runlevel = {0, (depckErrorRecord_t *)0};
39356 
39357 /*
39358  * each one of these represents a localized message for a single kind
39359  * of dependency check
39360  */
39361 
39362 static char *IMSG_PKGRMCHK_CKRUNLVL = (char *)0;
39363 static char *IMSG_PKGRMCHK_DEPEND = (char *)0;
39364 static char *IMSG_PKGRMCHK_DEPSONME = (char *)0;
39365 static char *IMSG_PKGRMCHK_PRENCI = (char *)0;
39366 static char *IMSG_PKGRMCHK_PREREQ = (char *)0;
39367 static char *IMSG_PKGRMCHK_PRIV = (char *)0;
39368 static char *IMSG_PKGRMCHK_RUNLEVEL = (char *)0;
39369 
39370 /*
39371  * each one of these represents a function to handle a single kind of
39372  * dependency check
39373  */
39374 
39375 static int rckdepend(char *a_msg, char *a_pkg);
39376 static int rckdepsonme(char *a_msg, char *a_pkg);
39377 static int rckprenci(char *a_msg, char *a_pkg);
39378 static int rckprereq(char *a_msg, char *a_pkg);
39379 static int rckpriv(char *a_msg, char *a_pkg);
39380 static int rckrunlevel(char *a_msg, char *a_pkg);
39381 
39382 static depckl_t DEPCKL[] = {
39383  /*
39384 	 * Message hierarchy:
39385 	 * -- runlevel=%s
39386 	 * --- rckrunlevel=%d
39387 	 * --- rckpriv=%d  ****
39388 	 * -- incompat=%s
39389 	 * -- prerequisite-incomplete=%s
39390 	 * -- dependonme=%s
39391 	 * -- dependsonme=%s:%s
39392 	 * -- prerequisite-installed=%s
39393 	 * ---rckdepend=%d ****
39394 	 */
39395 
39396  /* name,	ignore_values,	err_msg,	depcklFunc,	recrd */
39397  /*
39398 	 * package and zone information is collected in the "record" object for
39399 	 * each occurance - then a message is constructed for each zone that
39400 	 * reported the condition - the message includes that portion of the
39401 	 * check past the "=" - then the specified "depcklFunc" is called to
39402 	 * process each message.
39403 	 * Message format:
39404 	 * 	%s %s <%s> %s <%s>
39405 	 * Message arguments:
39406 	 *	value, "package", package-name, "zone/zones", zone-name
39407 	 */
39408 
39409  { "dependsonme=", 0, &IMSG_PKGRMCHK_DEPSONME,
39410      &rckdepsonme, &er_depsonme
39411  },
39412  { "dependonme=", 0, &IMSG_PKGRMCHK_DEPSONME,
39413      &rckdepsonme, &er_depsonme
39414  },
39415  { "prerequisite-incomplete=", 0, &IMSG_PKGRMCHK_PRENCI,
39416      &rckprenci, &er_prenci
39417  },
39418  { "prerequisite-installed=", 0, &IMSG_PKGRMCHK_PREREQ,
39419      &rckprereq, &er_prereq
39420  },
39421  { "runlevel=", 0, &IMSG_PKGRMCHK_RUNLEVEL,
39422      0, &er_runlevel
39423  },
39424 
39425  /*
39426 	 * these checks are ignored if they return one of the listed values
39427 	 * if they do NOT return one of the listed values, then the package
39428 	 * and zone information is collected in the "record" object for each
39429 	 * occurance - then a single unified message is constructed for all
39430 	 * zones that report the same condition; then the specified "depcklFunc"
39431 	 * is called to process the resulting combined message.
39432 	 * Message format:
39433 	 * 	%s <%s> %s <%s>
39434 	 * Message arguments:
39435 	 *	"package", package-name, "zone/zones", zone-name(s)
39436 	 */
39437 
39438  { "rckdepend=", "0", &IMSG_PKGRMCHK_DEPEND,
39439      &rckdepend, &er_rckdepend
39440  },
39441  { "rckpriv=", "0", &IMSG_PKGRMCHK_PRIV,
39442      &rckpriv, &er_rckpriv
39443  },
39444  { "rckrunlevel=", "0", &IMSG_PKGRMCHK_CKRUNLVL,
39445      &rckrunlevel, &er_rckrunlevel
39446  },
39447 
39448  /*
39449 	 * same as above BUT no check to ignore is done; message always reported
39450 	 */
39451 
39452  { 0, 0, 0,
39453       0, 0
39454  }
39455 };
39456 
39457 /*
39458  * Name:	preremove_verify
39459  * Description:	verify results of preremoval dependency checking
39460  * Arguments:	a_pkglist - pointer to array of strings representing the names
39461  *			of all the packages that have been checked
39462  *		a_zlst - list of zones that dependencies were checked on
39463  *		a_zoneTempDir - pointer to string representing the path where
39464  *			the files containing the preremoval dependency
39465  *			check data are located
39466  * Returns:	int
39467  *		== 0 - continue processing
39468  *		!= 0 - do not continue processing
39469  */
39470 
39471 int
39472 preremove_verify(char **a_pkglist, zoneList_t a_zlst, char *a_zoneTempDir)
39473 {
39474  char *pkginst;
39475  int i;
39476  int savenpkgs = npkgs;
39477 
39478  /*
39479 	 * entry assertions
39480 	 */
39481 
39482  (void)((a_pkglist != (char **)0) || (__assert("a_pkglist != (char **)NULL", "check.c", 198), 0));
39483  (void)((a_zlst != (zoneList_t)0) || (__assert("a_zlst != (zoneList_t)NULL", "check.c", 199), 0));
39484  (void)((a_zoneTempDir != (char *)0) || (__assert("a_zoneTempDir != (char *)NULL", "check.c", 200), 0));
39485 
39486  /*
39487 	 * entry debugging info
39488 	 */
39489 
39490  echoDebug(gettext("performing preremoval dependency verification"));
39491 
39492  /*
39493 	 * localize messages
39494 	 */
39495 
39496  IMSG_PKGRMCHK_DEPSONME = gettext("\\nThe package <%s> depends on %s <%s> currently being removed from %s <%s>.");
39497  IMSG_PKGRMCHK_PRENCI = gettext("\\nThe package <%s> is a prerequisite package and is not completely installed for %s <%s> on %s <%s>.");
39498  IMSG_PKGRMCHK_PREREQ = gettext("\\nThe package <%s> is a prerequisite package and should be removed for %s <%s> on %s <%s>.");
39499  IMSG_PKGRMCHK_RUNLEVEL = gettext("\\n run level <%s> for %s <%s> on %s <%s>.");
39500  IMSG_PKGRMCHK_DEPEND = gettext("\\nDependency checking failed for %s <%s> on %s <%s>.");
39501  IMSG_PKGRMCHK_PRIV = gettext("\\nThe %s <%s> contains scripts which will be executed on %s <%s> with super-user permission during the process of removing this package.");
39502  IMSG_PKGRMCHK_CKRUNLVL = gettext("\\nThe current run-level of this machine is <s%>, which is not a run-level suggested for removal of the %s <%s> on %s <%s>.");
39503 
39504  /*
39505 	 * outer loop - process each package first
39506 	 */
39507 
39508  for (i = 0; (pkginst = a_pkglist[i]) != 0; i++) {
39509 
39510   char *zoneName;
39511   int zoneIndex;
39512 
39513   /*
39514 		 * inner loop - for each package process each zone second
39515 		 */
39516 
39517   if (pkgIsPkgInGzOnly(get_inst_root(), pkginst) == B_TRUE) {
39518    continue;
39519   }
39520 
39521   for (zoneIndex = 0;
39522    (zoneName = z_zlist_get_zonename(a_zlst, zoneIndex)) !=
39523     (char *)0; zoneIndex++) {
39524 
39525    FILE *fp;
39526    char line[1024 +1];
39527    char preremovecheckPath[1024 +1];
39528    int len;
39529 
39530    /* skip the zone if it is NOT bootable */
39531 
39532    if (z_zlist_is_zone_runnable(a_zlst,
39533        zoneIndex) == B_FALSE) {
39534     continue;
39535    }
39536 
39537    /* create path to this packages preremove check data */
39538 
39539    len = snprintf(preremovecheckPath,
39540        sizeof (preremovecheckPath),
39541        "%s/%s.%s.preremovecheck.txt",
39542        a_zoneTempDir, pkginst,
39543        z_zlist_get_scratch(a_zlst, zoneIndex));
39544 
39545    if (len > sizeof (preremovecheckPath)) {
39546     progerr(gettext("unable to create path from <%s> and <%s> and <%s>"), a_zoneTempDir,
39547      pkginst, zoneName);
39548     continue;
39549    }
39550 
39551    /* error if preremove check data path is not a file */
39552 
39553    if (isfile((char *)0, preremovecheckPath) != 0) {
39554     echoDebug(gettext("unable to perform preremoval check of package <%s> in zone <%s> data file <%s>: %s"), pkginst, zoneName,
39555      preremovecheckPath, strerror((*(___errno()))));
39556     progerr(gettext("unable to perform preremoval check of package <%s> in zone <%s>"), pkginst, zoneName);
39557     continue;
39558    }
39559 
39560    /* open the preremove check data file */
39561 
39562    fp = fopen(preremovecheckPath, "r");
39563    if (fp == (FILE *)0) {
39564     progerr(gettext("unable to examine preremoval check file <%s> for package <%s> in zone <%s>: %s"),
39565      preremovecheckPath, pkginst, zoneName,
39566      strerror((*(___errno()))));
39567     continue;
39568    }
39569 
39570    /* read and process each preremove check data line */
39571 
39572    while (fgets(line, sizeof (line), fp) != (char *)0) {
39573     int len;
39574     int j;
39575 
39576     /* remove all new-lines from end of line */
39577 
39578     len = strlen(line);
39579     while ((len > 0) && (line[len-1] == '\n')) {
39580      line[--len] = '\0';
39581     }
39582 
39583     /* ignore comment lines */
39584 
39585     if (line[0] == '#') {
39586      continue;
39587     }
39588 
39589     /* ignore empty lines */
39590 
39591     if (line[0] == '\0') {
39592      continue;
39593     }
39594 
39595     /* scan dependency list for this item */
39596 
39597     for (j = 0;
39598      DEPCKL[j].name != (char *)0; j++) {
39599      len = strlen(DEPCKL[j].name);
39600 
39601      if (strncmp(line, DEPCKL[j].name,
39602         len) == 0) {
39603       break;
39604      }
39605     }
39606 
39607     echoDebug(gettext("scanning for line <%s> found package <%s> zone <%s>"), line, pkginst,
39608       zoneName);
39609 
39610     /* ignore line if not found */
39611 
39612     if (DEPCKL[j].name == (char *)0) {
39613      progerr(gettext("unknown preremoval dependency check line <%s> for package <%s> zone <%s>: ignored"), line,
39614        pkginst, zoneName);
39615      continue;
39616     }
39617 
39618     if ((DEPCKL[j].ignore_values != (char *)0) &&
39619      (*(DEPCKL[j].ignore_values) != '\0') &&
39620      (strchr(DEPCKL[j].ignore_values,
39621       line[len]) != (char *)0)) {
39622       continue;
39623     }
39624     /* found match - record this dependency issue */
39625 
39626     depchkRecordError(DEPCKL[j].record, pkginst,
39627      zoneName, &line[len]);
39628    }
39629 
39630    /* close preremove check data file */
39631 
39632    (void) fclose(fp);
39633   }
39634  }
39635 
39636  /*
39637 	 * all dependency issues have been recorded; report results
39638 	 */
39639 
39640  i = depchkReportErrors(DEPCKL);
39641 
39642  /* restore "npkgs" */
39643 
39644  npkgs = savenpkgs;
39645 
39646  /* return continue/dont dontinue results */
39647 
39648  return (i);
39649 }
39650 
39651 /*
39652  * Name:	getyorn
39653  * Description:	Deliver dependency check reason; ask question; return response
39654  * Arguments:	a_msg - pointer to string representing the message to output
39655  *			such as 'The package <..> contains <...>'
39656  *		a_pkg - pointer to string representing the package for which
39657  *			the question is being asked
39658  *		a_nocheck - should the message be output?
39659  *			== 0 - do not output the message
39660  *			!= 0 - output the message
39661  *		a_quit - should the question NOT be asked?
39662  *			== 0 - ask the question
39663  *			!= 0 - do not ask the question - return "no"
39664  *		a_helpMsg - pointer to string representing help message to be
39665  *			made available if the question is asked
39666  *			== NULL - no help message is available
39667  *		a_adminMsg - pointer to string representing the dependency check
39668  *			failure 'reason' - such as "Privilege checking failed."
39669  *			== NULL - no failure reason is available
39670  * Returns:	int - results of question/response actions
39671  *			0 - success
39672  *			1 - end of file
39673  *			2 - undefined error
39674  *			3 - answer was not "y"/was "q"
39675  *			4 - quit action taken
39676  *			5 - interactive mode required
39677  */
39678 
39679 static int
39680 getyorn(char *a_msg, char *a_pkg, int a_nocheck, int a_quit,
39681  char *a_helpMsg, char *a_adminMsg)
39682 {
39683  char ans[512];
39684  char ask_cont[1024];
39685  int n;
39686  int saveCkquit;
39687 
39688  /*
39689 	 * entry assertions
39690 	 */
39691 
39692  (void)((a_pkg != (char *)0) || (__assert("a_pkg != (char *)NULL", "check.c", 408), 0));
39693  (void)((*a_pkg != '\0') || (__assert("*a_pkg != '\\0'", "check.c", 409), 0));
39694 
39695  /*
39696 	 * entry debugging info
39697 	 */
39698 
39699  echoDebug(gettext("package <%s> nocheck <%d> quit <%d> message <%s> admin-msg <%s>"), a_pkg, a_nocheck, a_quit, a_msg,
39700    a_adminMsg ? a_adminMsg : "");
39701 
39702  /* return success (0) if "nocheck" is non-zero */
39703 
39704  if (a_nocheck != 0) {
39705   echoDebug(gettext("package <%s> no check - return <0> (success)"), a_pkg);
39706   return (0);
39707  }
39708 
39709  /* output reason for this particular failure */
39710 
39711  if ((a_msg != (char *)0) && (*a_msg != '\0')) {
39712   ptext((&__iob[2]), "%s", a_msg);
39713  }
39714 
39715  /* return "4 (administration)" if "quit" is non-zero */
39716 
39717  if (a_quit != 0) {
39718   /* output failure "admin reason" if available */
39719   if ((a_adminMsg != (char *)0) && (*a_adminMsg != '\0')) {
39720    ptext((&__iob[2]), a_adminMsg);
39721   }
39722   echoDebug(gettext("package <%s> quit - return <4> (administration)"), a_pkg);
39723   return (4);
39724  }
39725 
39726  /* return "5 (administration interaction required)" if -n */
39727 
39728  if (echoGetFlag() == B_FALSE) {
39729   ptext((&__iob[2]), gettext("\\nRemoval of <%s> was suspended (interaction required)."), a_pkg);
39730   echoDebug(gettext("package <%s> noninteractive mode - return <5> (administration required)"), a_pkg);
39731   return (5);
39732  }
39733 
39734  /* prepare question to ask "continue with removal of pkg <xxx>?" */
39735 
39736  (void) snprintf(ask_cont, sizeof (ask_cont), gettext(gettext("Do you want to continue with the removal of <%s>")),
39737   a_pkg);
39738 
39739  /* ask question */
39740 
39741  saveCkquit = ckquit;
39742  ckquit = 0;
39743 
39744  n = ckyorn(ans, 0, 0, a_helpMsg, ask_cont);
39745 
39746  ckquit = saveCkquit;
39747 
39748  if (n != 0) {
39749   ptext((&__iob[2]), gettext("\\nRemoval of <%s> was terminated."), a_pkg);
39750   echoDebug(gettext("package <%s> ckyorn return non-zero <%d>"), a_pkg, n);
39751   return (n);
39752  }
39753 
39754  /* return "3 (interruption) if not "y" or "Y" */
39755 
39756  if (strchr("yY", *ans) == 0) {
39757   ptext((&__iob[2]), gettext("\\nRemoval of <%s> was terminated due to user request."), a_pkg);
39758   echoDebug(gettext("package <%s> ckyorn answer <%s> - return <3> (interruption)"), a_pkg, ans);
39759   return (3);
39760  }
39761 
39762  /* return "0 - success" */
39763 
39764  echoDebug(gettext("package <%s> continue removal"), a_pkg);
39765 
39766  return (0);
39767 }
39768 
39769 /*
39770  * Trigger:	dependsonme=<<package>>
39771  * Sequence:	- one or more: dependsonme=<<package>>
39772  *		- one: rckdepend=<<n>>
39773  * Actions:	Output message if "rdepend!=nocheck"
39774  *		Return 0
39775  *		Terminate when 'rckdepend' processed
39776  */
39777 
39778 static int
39779 rckdepsonme(char *a_msg, char *a_pkg)
39780 {
39781  echoDebug(gettext("check depends on this package: package <%s> message <%s>"), a_pkg, a_msg);
39782 
39783  if (!(((adm.rdepend != 0) && ("nocheck" != 0) && strcmp(adm.rdepend, "nocheck") == 0))) {
39784   ptext((&__iob[2]), "%s", a_msg);
39785  }
39786 
39787  return (0);
39788 }
39789 
39790 /*
39791  * Trigger:	prerequisite-incomplete=<<package>>
39792  * Sequence:	- one or more: prerequisite-incomplete=<<package>>
39793  *		- one: rckdepend=<<n>>
39794  * Actions:	Output message if "rdepend!=nocheck"
39795  *		Return 0
39796  *		Terminate when 'rckdepend' processed
39797  */
39798 
39799 static int
39800 rckprenci(char *a_msg, char *a_pkg)
39801 {
39802  echoDebug(gettext("check prerequisite incomplete: package <%s> message <%s>"), a_pkg, a_msg);
39803 
39804  if (!(((adm.rdepend != 0) && ("nocheck" != 0) && strcmp(adm.rdepend, "nocheck") == 0))) {
39805   ptext((&__iob[2]), "%s", a_msg);
39806  }
39807 
39808  return (0);
39809 }
39810 
39811 /*
39812  * Trigger:	prerequisite-installed=<<package>>
39813  * Sequence:	- one or more: prerequisite-installed=<<package>>
39814  *		- one: rckdepend=<<n>>
39815  * Actions:	Output message if "rdepend!=nocheck"
39816  *		Return 0
39817  *		Terminate when 'rckdepend' processed
39818  */
39819 
39820 static int
39821 rckprereq(char *a_msg, char *a_pkg)
39822 {
39823  echoDebug(gettext("check prerequisite installed: package <%s> message <%s>"), a_pkg, a_msg);
39824 
39825  if (!(((adm.rdepend != 0) && ("nocheck" != 0) && strcmp(adm.rdepend, "nocheck") == 0))) {
39826   ptext((&__iob[2]), "%s", a_msg);
39827  }
39828 
39829  return (0);
39830 }
39831 
39832 /*
39833  * Return value:	int
39834  *			0 - success
39835  *			1 - end of file
39836  *			2 - undefined error
39837  *			3 - answer was not "y"/was "q"
39838  *			4 - quit action taken
39839  *			5 - interactive mode required
39840  *			99 - fatal error
39841  */
39842 
39843 static int
39844 rckrunlevel(char *a_msg, char *a_pkg)
39845 {
39846  echoDebug(gettext("check run level: package <%s> message <%s>"), a_pkg, a_msg);
39847  /*
39848 	 * For now, we are ignoring runlevel removal issues within
39849 	 * non-global zones.  This is questionable, but the RSTATES
39850 	 * feature is rarely used and known uses within Solaris are
39851 	 * effectively no-ops as of this time
39852 	 */
39853  return (0);
39854 }
39855 
39856 /*
39857  * Trigger:	rckdepend=<<n>>
39858  * Sequence:	- one or more of:
39859  *		-- incompat=<<package>>
39860  *		-- prerequisite-incomplete=<<package>>
39861  *		-- prerequisite-installed=<<package>>
39862  *		-- dependson=<<package>>
39863  *		-- dependsonme=<<package>>
39864  *		- one: ckpdepend=<<n>>
39865  * Actions:	process according to settings
39866  * Return value:	int
39867  *			0 - success
39868  *			1 - end of file
39869  *			2 - undefined error
39870  *			3 - answer was not "y"/was "q"
39871  *			4 - quit action taken
39872  *			5 - interactive mode required
39873  */
39874 
39875 static int
39876 rckdepend(char *a_msg, char *a_pkg)
39877 {
39878  echoDebug(gettext("check dependency: package <%s> message <%s>"), a_pkg, a_msg);
39879 
39880  return (getyorn(a_msg, a_pkg, ((adm.rdepend != 0) && ("nocheck" != 0) && strcmp(adm.rdepend, "nocheck") == 0),
39881   ((adm.rdepend != 0) && ("quit" != 0) && strcmp(adm.rdepend, "quit") == 0), gettext("The package being removed has indicated a dependency on the existence (or non-existence) of another software package.  If this dependency is not met before continuing, the package may not remove or operate properly.  If you wish to disregard this dependency, answer 'y' to continue the removal process."),
39882   gettext("Dependency checking failed.")));
39883 }
39884 
39885 /*
39886  * Trigger:	rckpriv=<<n>>
39887  * Sequence:	- one: rckpriv=<<n>>
39888  * Actions:	process according to settings
39889  * Return value:	int
39890  *			0 - success
39891  *			1 - end of file
39892  *			2 - undefined error
39893  *			3 - answer was not "y"/was "q"
39894  *			4 - quit action taken
39895  *			5 - interactive mode required
39896  */
39897 
39898 static int
39899 rckpriv(char *a_msg, char *a_pkg)
39900 {
39901  echoDebug(gettext("check privileges: package <%s> message <%s>"), a_pkg, a_msg);
39902 
39903  return (getyorn(a_msg, a_pkg, ((adm.action != 0) && ("nocheck" != 0) && strcmp(adm.action, "nocheck") == 0),
39904   ((adm.action != 0) && ("quit" != 0) && strcmp(adm.action, "quit") == 0), gettext("During the removal of this package, certain scripts provided with the package will execute with super-user permission.  These scripts may modify or otherwise change your system without your knowledge.  If you are certain of the origin and trustworthiness of the package being removed, answer 'y' to continue the removal process."),
39905   gettext("Privilege checking failed.")));
39906 }
39907