1 # 1 "lock.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "lock.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 /*
33  * Module: lock.c
34  * Program: pkgadm (/usr/bin/pkgadm)
35  * Synopsis: implements the zone/package administrative lock interface
36  * Public methods:
37  *	admin_lock
38  * Usage:
39  *  Acquire: -a [ -e | -s ] [ -o obj ] [ -k key ] [ -R root ] [ -q ]  *		[ -w ] [ -W timeout ]
40 ]
41  *  Release: -r -o object -k key [ -R altRoot ] [ -q ]
42  *  Status: [ -o object ] [ -k key ] [ -R altRoot ] [ -q ]
43  */
44 
45 /* enable extentions to standard Unix libraries */
46 
47 
48 
49 /* unix system includes */
50 
51 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
52 /*
53  * CDDL HEADER START
54  *
55  * The contents of this file are subject to the terms of the
56  * Common Development and Distribution License (the "License").
57  * You may not use this file except in compliance with the License.
58  *
59  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60  * or http://www.opensolaris.org/os/licensing.
61  * See the License for the specific language governing permissions
62  * and limitations under the License.
63  *
64  * When distributing Covered Code, include this CDDL HEADER in each
65  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
66  * If applicable, add the following below this CDDL HEADER, with the
67  * fields enclosed by brackets "[]" replaced with your own identifying
68  * information: Portions Copyright [yyyy] [name of copyright owner]
69  *
70  * CDDL HEADER END
71  */
72 
73 /*
74  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
75  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
76  */
77 
78 /*	Copyright (c) 1988 AT&T	*/
79 /*	  All Rights Reserved  	*/
80 
81 /*
82  * User-visible pieces of the ANSI C standard I/O package.
83  */
84 
85 
86 
87 
88 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
89 /*
90  * CDDL HEADER START
91  *
92  * The contents of this file are subject to the terms of the
93  * Common Development and Distribution License (the "License").
94  * You may not use this file except in compliance with the License.
95  *
96  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97  * or http://www.opensolaris.org/os/licensing.
98  * See the License for the specific language governing permissions
99  * and limitations under the License.
100  *
101  * When distributing Covered Code, include this CDDL HEADER in each
102  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
103  * If applicable, add the following below this CDDL HEADER, with the
104  * fields enclosed by brackets "[]" replaced with your own identifying
105  * information: Portions Copyright [yyyy] [name of copyright owner]
106  *
107  * CDDL HEADER END
108  */
109 
110 /*
111  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
112  * Copyright 2016 Joyent, Inc.
113  *
114  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
115  * Use is subject to license terms.
116  */
117 
118 
119 
120 
121 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
122 /*
123  * CDDL HEADER START
124  *
125  * The contents of this file are subject to the terms of the
126  * Common Development and Distribution License, Version 1.0 only
127  * (the "License").  You may not use this file except in compliance
128  * with the License.
129  *
130  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
131  * or http://www.opensolaris.org/os/licensing.
132  * See the License for the specific language governing permissions
133  * and limitations under the License.
134  *
135  * When distributing Covered Code, include this CDDL HEADER in each
136  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
137  * If applicable, add the following below this CDDL HEADER, with the
138  * fields enclosed by brackets "[]" replaced with your own identifying
139  * information: Portions Copyright [yyyy] [name of copyright owner]
140  *
141  * CDDL HEADER END
142  */
143 /*
144  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
145  * Use is subject to license terms.
146  */
147 /*
148  * Copyright 2015 EveryCity Ltd. All rights reserved.
149  */
150 
151 
152 
153 
154 /*
155  * This file contains definitions designed to enable different compilers
156  * to be used harmoniously on Solaris systems.
157  */
158 
159 
160 
161 
162 
163 /*
164  * Allow for version tests for compiler bugs and features.
165  */
166 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
167 /*
168  * analogous to lint's PRINTFLIKEn
169  */
170 
171 
172 
173 
174 
175 /*
176  * Handle the kernel printf routines that can take '%b' too
177  */
178 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
179 /*
180  * This one's pretty obvious -- the function never returns
181  */
182 
183 
184 /*
185  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
186  * behaviour.
187  *
188  * Should only be used on 'extern inline' definitions for GCC.
189  */
190 
191 
192 
193 
194 
195 
196 /*
197  * The function has control flow such that it may return multiple times (in
198  * the manner of setjmp or vfork)
199  */
200 
201 
202 
203 
204 
205 
206 /*
207  * This is an appropriate label for functions that do not
208  * modify their arguments, e.g. strlen()
209  */
210 
211 
212 /*
213  * This is a stronger form of __pure__. Can be used for functions
214  * that do not modify their arguments and don't depend on global
215  * memory.
216  */
217 
218 
219 
220 
221 /*
222  * This attribute, attached to a variable, means that the variable is meant to
223  * be possibly unused. GCC will not produce a warning for this variable.
224  */
225 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
226 /*
227  * Shorthand versions for readability
228  */
229 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
230 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
231 /*
232  * CDDL HEADER START
233  *
234  * The contents of this file are subject to the terms of the
235  * Common Development and Distribution License (the "License").
236  * You may not use this file except in compliance with the License.
237  *
238  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
239  * or http://www.opensolaris.org/os/licensing.
240  * See the License for the specific language governing permissions
241  * and limitations under the License.
242  *
243  *
244  * When distributing Covered Code, include this CDDL HEADER in each
245  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
246  * If applicable, add the following below this CDDL HEADER, with the
247  * fields enclosed by brackets "[]" replaced with your own identifying
248  * information: Portions Copyright [yyyy] [name of copyright owner]
249  *
250  * CDDL HEADER END
251  */
252 
253 /*
254  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
255  * Use is subject to license terms.
256  * Copyright 2016 Joyent, Inc.
257  */
258 
259 
260 
261 
262 /*
263  * This header file serves to group a set of well known defines and to
264  * set these for each instruction set architecture.  These defines may
265  * be divided into two groups;  characteristics of the processor and
266  * implementation choices for Solaris on a processor.
267  *
268  * Processor Characteristics:
269  *
270  * _LITTLE_ENDIAN / _BIG_ENDIAN:
271  *	The natural byte order of the processor.  A pointer to an int points
272  *	to the least/most significant byte of that int.
273  *
274  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
275  *	The processor specific direction of stack growth.  A push onto the
276  *	stack increases/decreases the stack pointer, so it stores data at
277  *	successively higher/lower addresses.  (Stackless machines ignored
278  *	without regrets).
279  *
280  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
281  *	A pointer to a long long points to the most/least significant long
282  *	within that long long.
283  *
284  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
285  *	The C compiler assigns bit fields from the high/low to the low/high end
286  *	of an int (most to least significant vs. least to most significant).
287  *
288  * _IEEE_754:
289  *	The processor (or supported implementations of the processor)
290  *	supports the ieee-754 floating point standard.  No other floating
291  *	point standards are supported (or significant).  Any other supported
292  *	floating point formats are expected to be cased on the ISA processor
293  *	symbol.
294  *
295  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
296  *	The C Compiler implements objects of type `char' as `unsigned' or
297  *	`signed' respectively.  This is really an implementation choice of
298  *	the compiler writer, but it is specified in the ABI and tends to
299  *	be uniform across compilers for an instruction set architecture.
300  *	Hence, it has the properties of a processor characteristic.
301  *
302  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
303  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
304  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
305  *	The ABI defines alignment requirements of each of the primitive
306  *	object types.  Some, if not all, may be hardware requirements as
307  * 	well.  The values are expressed in "byte-alignment" units.
308  *
309  * _MAX_ALIGNMENT:
310  *	The most stringent alignment requirement as specified by the ABI.
311  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
312  *
313  * _MAX_ALIGNMENT_TYPE:
314  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
315  *
316  * _ALIGNMENT_REQUIRED:
317  *	True or false (1 or 0) whether or not the hardware requires the ABI
318  *	alignment.
319  *
320  * _LONG_LONG_ALIGNMENT_32
321  *	The 32-bit ABI supported by a 64-bit kernel may have different
322  *	alignment requirements for primitive object types.  The value of this
323  *	identifier is expressed in "byte-alignment" units.
324  *
325  * _HAVE_CPUID_INSN
326  *	This indicates that the architecture supports the 'cpuid'
327  *	instruction as defined by Intel.  (Intel allows other vendors
328  *	to extend the instruction for their own purposes.)
329  *
330  *
331  * Implementation Choices:
332  *
333  * _ILP32 / _LP64:
334  *	This specifies the compiler data type implementation as specified in
335  *	the relevant ABI.  The choice between these is strongly influenced
336  *	by the underlying hardware, but is not absolutely tied to it.
337  *	Currently only two data type models are supported:
338  *
339  *	_ILP32:
340  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
341  *		and Solaris implementation.  Due to its historical standing,
342  *		this is the default case.
343  *
344  *	_LP64:
345  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
346  *		implementation for 64-bit ABIs such as SPARC V9.
347  *
348  *	_I32LPx:
349  *		A compilation environment where 'int' is 32-bit, and
350  *		longs and pointers are simply the same size.
351  *
352  *	In all cases, Char is 8 bits and Short is 16 bits.
353  *
354  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
355  *	This specifies the form of the disk VTOC (or label):
356  *
357  *	_SUNOS_VTOC_8:
358  *		This is a VTOC form which is upwardly compatible with the
359  *		SunOS 4.x disk label and allows 8 partitions per disk.
360  *
361  *	_SUNOS_VTOC_16:
362  *		In this format the incore vtoc image matches the ondisk
363  *		version.  It allows 16 slices per disk, and is not
364  *		compatible with the SunOS 4.x disk label.
365  *
366  *	Note that these are not the only two VTOC forms possible and
367  *	additional forms may be added.  One possible form would be the
368  *	SVr4 VTOC form.  The symbol for that is reserved now, although
369  *	it is not implemented.
370  *
371  *	_SVR4_VTOC_16:
372  *		This VTOC form is compatible with the System V Release 4
373  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
374  *		16 partitions per disk.
375  *
376  *
377  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
378  *	This describes the type of addresses used by system DMA:
379  *
380  *	_DMA_USES_PHYSADDR:
381  *		This type of DMA, used in the x86 implementation,
382  *		requires physical addresses for DMA buffers.  The 24-bit
383  *		addresses used by some legacy boards is the source of the
384  *		"low-memory" (<16MB) requirement for some devices using DMA.
385  *
386  *	_DMA_USES_VIRTADDR:
387  *		This method of DMA allows the use of virtual addresses for
388  *		DMA transfers.
389  *
390  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
391  *      This indicates the presence/absence of an fdisk table.
392  *
393  *      _FIRMWARE_NEEDS_FDISK
394  *              The fdisk table is required by system firmware.  If present,
395  *              it allows a disk to be subdivided into multiple fdisk
396  *              partitions, each of which is equivalent to a separate,
397  *              virtual disk.  This enables the co-existence of multiple
398  *              operating systems on a shared hard disk.
399  *
400  *      _NO_FDISK_PRESENT
401  *              If the fdisk table is absent, it is assumed that the entire
402  *              media is allocated for a single operating system.
403  *
404  * _HAVE_TEM_FIRMWARE
405  *	Defined if this architecture has the (fallback) option of
406  *	using prom_* calls for doing I/O if a suitable kernel driver
407  *	is not available to do it.
408  *
409  * _DONT_USE_1275_GENERIC_NAMES
410  *		Controls whether or not device tree node names should
411  *		comply with the IEEE 1275 "Generic Names" Recommended
412  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
413  *		names identifying the particular device will be used.
414  *
415  * __i386_COMPAT
416  *	This indicates whether the i386 ABI is supported as a *non-native*
417  *	mode for the platform.  When this symbol is defined:
418  *	-	32-bit xstat-style system calls are enabled
419  *	-	32-bit xmknod-style system calls are enabled
420  *	-	32-bit system calls use i386 sizes -and- alignments
421  *
422  *	Note that this is NOT defined for the i386 native environment!
423  *
424  * __x86
425  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
426  *	which is useful only insofar as these two architectures share
427  *	common attributes.  Analogous to __sparc.
428  *
429  * _PSM_MODULES
430  *	This indicates whether or not the implementation uses PSM
431  *	modules for processor support, reading /etc/mach from inside
432  *	the kernel to extract a list.
433  *
434  * _RTC_CONFIG
435  *	This indicates whether or not the implementation uses /etc/rtc_config
436  *	to configure the real-time clock in the kernel.
437  *
438  * _UNIX_KRTLD
439  *	This indicates that the implementation uses a dynamically
440  *	linked unix + krtld to form the core kernel image at boot
441  *	time, or (in the absence of this symbol) a prelinked kernel image.
442  *
443  * _OBP
444  *	This indicates the firmware interface is OBP.
445  *
446  * _SOFT_HOSTID
447  *	This indicates that the implementation obtains the hostid
448  *	from the file /etc/hostid, rather than from hardware.
449  */
450 
451 
452 
453 
454 
455 /*
456  * The following set of definitions characterize Solaris on AMD's
457  * 64-bit systems.
458  */
459 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
460 /*
461  * Define the appropriate "processor characteristics"
462  */
463 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
464 /*
465  * Define the appropriate "implementation choices".
466  */
467 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
468 /*
469  * The following set of definitions characterize the Solaris on SPARC systems.
470  *
471  * The symbol __sparc indicates any of the SPARC family of processor
472  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
473  *
474  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
475  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
476  * to SPARC V8 for the former to be subsumed into the latter definition.)
477  *
478  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
479  * by Version 9 of the SPARC Architecture Manual.
480  *
481  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
482  * relevant when the symbol __sparc is defined.
483  */
484 /*
485  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
486  * to support backwards builds.  This workaround should be removed in s10_71.
487  */
488 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
489 
490 
491 
492 
493 
494 /*
495  * Values of _POSIX_C_SOURCE
496  *
497  *		undefined   not a POSIX compilation
498  *		1	    POSIX.1-1990 compilation
499  *		2	    POSIX.2-1992 compilation
500  *		199309L	    POSIX.1b-1993 compilation (Real Time)
501  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
502  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
503  *		200809L     POSIX.1-2008 compilation
504  */
505 
506 
507 
508 
509 /*
510  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
511  * and _STDC_C99 are Sun implementation specific macros created in order to
512  * compress common standards specified feature test macros for easier reading.
513  * These macros should not be used by the application developer as
514  * unexpected results may occur. Instead, the user should reference
515  * standards(5) for correct usage of the standards feature test macros.
516  *
517  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
518  *                      X/Open or POSIX or in the negative, when neither
519  *                      X/Open or POSIX defines a symbol.
520  *
521  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
522  *                      by the compiler. For Sun compilers the value of
523  *                      __STDC__ is either 1, 0, or not defined based on the
524  *                      compilation mode (see cc(1)). When the value of
525  *                      __STDC__ is 1 and in the absence of any other feature
526  *                      test macros, the namespace available to the application
527  *                      is limited to only those symbols defined by the C
528  *                      Standard. _STRICT_STDC provides a more readable means
529  *                      of identifying symbols defined by the standard, or in
530  *                      the negative, symbols that are extensions to the C
531  *                      Standard. See additional comments for GNU C differences.
532  *
533  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
534  *                      defined by the compiler and indicates the version of
535  *                      the C standard. A value of 199901L indicates a
536  *                      compiler that complies with ISO/IEC 9899:1999, other-
537  *                      wise known as the C99 standard.
538  *
539  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
540  *                      is 201112L indicating a compiler that compiles with
541  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
542  *
543  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
544  *                      by the standards, and the user has not explicitly
545  *                      relaxed the strictness via __EXTENSIONS__.
546  */
547 
548 
549 
550 
551 
552 /*
553  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
554  * 99899:2011 specify the following predefined macro name:
555  *
556  * __STDC__	The integer constant 1, intended to indicate a conforming
557  *		implementation.
558  *
559  * Furthermore, a strictly conforming program shall use only those features
560  * of the language and library specified in these standards. A conforming
561  * implementation shall accept any strictly conforming program.
562  *
563  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
564  * strictly conforming environments and __STDC__ to 0 for environments that
565  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
566  * C semantics, Sun's C compiler does not define __STDC__.
567  *
568  * The GNU C project interpretation is that __STDC__ should always be defined
569  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
570  * or not extensions to the C standard are used. Violations of conforming
571  * behavior are conditionally flagged as warnings via the use of the
572  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
573  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
574  * conforming environments using the -ansi or -std=<standard> options.
575  *
576  * In the absence of any other compiler options, Sun and GNU set the value
577  * of __STDC__ as follows when using the following options:
578  *
579  *				Value of __STDC__  __STRICT_ANSI__
580  *
581  * cc -Xa (default)			0	      undefined
582  * cc -Xt (transitional)		0             undefined
583  * cc -Xc (strictly conforming)		1	      undefined
584  * cc -Xs (K&R C)		    undefined	      undefined
585  *
586  * gcc (default)			1	      undefined
587  * gcc -ansi, -std={c89, c99,...)  	1              defined
588  * gcc -traditional (K&R)	    undefined	      undefined
589  *
590  * The default compilation modes for Sun C compilers versus GNU C compilers
591  * results in a differing value for __STDC__ which results in a more
592  * restricted namespace when using Sun compilers. To allow both GNU and Sun
593  * interpretations to peacefully co-exist, we use the following Sun
594  * implementation _STRICT_STDC_ macro:
595  */
596 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
597 /*
598  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
599  */
600 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
601 /*
602  * Use strict symbol visibility.
603  */
604 
605 
606 
607 
608 
609 /*
610  * Large file interfaces:
611  *
612  *	_LARGEFILE_SOURCE
613  *		1		large file-related additions to POSIX
614  *				interfaces requested (fseeko, etc.)
615  *	_LARGEFILE64_SOURCE
616  *		1		transitional large-file-related interfaces
617  *				requested (seek64, stat64, etc.)
618  *
619  * The corresponding announcement macros are respectively:
620  *	_LFS_LARGEFILE
621  *	_LFS64_LARGEFILE
622  * (These are set in <unistd.h>.)
623  *
624  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
625  * well.
626  *
627  * The large file interfaces are made visible regardless of the initial values
628  * of the feature test macros under certain circumstances:
629  *    -	If no explicit standards-conforming environment is requested (neither
630  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
631  *	__STDC__ does not imply standards conformance).
632  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
633  * 	is defined).
634  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
635  *	defined).  (Note that this dependency is an artifact of the current
636  *	kernel implementation and may change in future releases.)
637  */
638 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
639 /*
640  * Large file compilation environment control:
641  *
642  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
643  * types and governs the mapping between file-related source function symbol
644  * names and the corresponding binary entry points.
645  *
646  * In the 32-bit environment, the default value is 32; if not set, set it to
647  * the default here, to simplify tests in other headers.
648  *
649  * In the 64-bit compilation environment, the only value allowed is 64.
650  */
651 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
652 /*
653  * Use of _XOPEN_SOURCE
654  *
655  * The following X/Open specifications are supported:
656  *
657  * X/Open Portability Guide, Issue 3 (XPG3)
658  * X/Open CAE Specification, Issue 4 (XPG4)
659  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
660  * X/Open CAE Specification, Issue 5 (XPG5)
661  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
662  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
663  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
664  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
665  *
666  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
667  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
668  *     Version 2 (SUSv2)
669  * XPG6 is the result of a merge of the X/Open and POSIX specifications
670  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
671  *     addition to UNIX 03 and SUSv3.
672  * XPG7 is also referred to as UNIX 08 and SUSv4.
673  *
674  * When writing a conforming X/Open application, as per the specification
675  * requirements, the appropriate feature test macros must be defined at
676  * compile time. These are as follows. For more info, see standards(5).
677  *
678  * Feature Test Macro				     Specification
679  * ------------------------------------------------  -------------
680  * _XOPEN_SOURCE                                         XPG3
681  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
682  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
683  * _XOPEN_SOURCE = 500                                   XPG5
684  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
685  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
686  *
687  * In order to simplify the guards within the headers, the following
688  * implementation private test macros have been created. Applications
689  * must NOT use these private test macros as unexpected results will
690  * occur.
691  *
692  * Note that in general, the use of these private macros is cumulative.
693  * For example, the use of _XPG3 with no other restrictions on the X/Open
694  * namespace will make the symbols visible for XPG3 through XPG6
695  * compilation environments. The use of _XPG4_2 with no other X/Open
696  * namespace restrictions indicates that the symbols were introduced in
697  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
698  * environments, but not for XPG3 or XPG4 compilation environments.
699  *
700  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
701  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
702  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
703  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
704  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
705  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
706  */
707 
708 /* X/Open Portability Guide, Issue 3 */
709 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
710 /*
711  * _XOPEN_VERSION is defined by the X/Open specifications and is not
712  * normally defined by the application, except in the case of an XPG4
713  * application.  On the implementation side, _XOPEN_VERSION defined with
714  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
715  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
716  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
717  * application and with a value of 600 indicates an XPG6 (UNIX 03)
718  * application and with a value of 700 indicates an XPG7 (UNIX 08).
719  * The appropriate version is determined by the use of the
720  * feature test macros described earlier.  The value of _XOPEN_VERSION
721  * defaults to 3 otherwise indicating support for XPG3 applications.
722  */
723 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
724 /*
725  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
726  * conforming environments.  ISO 9899:1999 says it does.
727  *
728  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
729  * defined in all but strictly conforming environments that disallow it.
730  */
731 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
732 /*
733  * The following macro defines a value for the ISO C99 restrict
734  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
735  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
736  * if any other compiler is used. This allows for the use of single
737  * prototype declarations regardless of compiler version.
738  */
739 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
740 /*
741  * The following macro defines a value for the ISO C11 _Noreturn
742  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
743  * an ISO C11 compiler is used and "" (null string) if any other
744  * compiler is used. This allows for the use of single prototype
745  * declarations regardless of compiler version.
746  */
747 
748 
749 
750 
751 
752 
753 
754 /*
755  * The following macro indicates header support for the ANSI C++
756  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
757  */
758 
759 
760 /*
761  * The following macro indicates header support for the C99 standard,
762  * ISO/IEC 9899:1999, Programming Languages - C.
763  */
764 
765 
766 /*
767  * The following macro indicates header support for the C99 standard,
768  * ISO/IEC 9899:2011, Programming Languages - C.
769  */
770 
771 
772 /*
773  * The following macro indicates header support for DTrace. The value is an
774  * integer that corresponds to the major version number for DTrace.
775  */
776 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
777 
778 
779 
780 
781 
782 /*
783  * Do all of our 'redefine_extname' processing before
784  * declarations of the associated functions are seen.
785  * This is necessary to keep gcc happy.
786  */
787 
788 
789 /* large file compilation environment setup */
790 
791 
792 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
793 #pragma redefine_extname fopen fopen64
794 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
795 
796 
797 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
798 #pragma redefine_extname freopen freopen64
799 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
800 
801 
802 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
803 #pragma redefine_extname tmpfile tmpfile64
804 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
805 
806 
807 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
808 #pragma redefine_extname fgetpos fgetpos64
809 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
810 
811 
812 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
813 #pragma redefine_extname fsetpos fsetpos64
814 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
815 
816 
817 
818 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
819 #pragma redefine_extname fseeko fseeko64
820 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
821 
822 
823 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
824 #pragma redefine_extname ftello ftello64
825 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
826 
827 
828 
829 
830 /* In the LP64 compilation environment, all APIs are already large file */
831 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
832 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
833 /*
834  * CDDL HEADER START
835  *
836  * The contents of this file are subject to the terms of the
837  * Common Development and Distribution License, Version 1.0 only
838  * (the "License").  You may not use this file except in compliance
839  * with the License.
840  *
841  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
842  * or http://www.opensolaris.org/os/licensing.
843  * See the License for the specific language governing permissions
844  * and limitations under the License.
845  *
846  * When distributing Covered Code, include this CDDL HEADER in each
847  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
848  * If applicable, add the following below this CDDL HEADER, with the
849  * fields enclosed by brackets "[]" replaced with your own identifying
850  * information: Portions Copyright [yyyy] [name of copyright owner]
851  *
852  * CDDL HEADER END
853  */
854 /*
855  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
856  * Copyright 2014 PALO, Richard.
857  *
858  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
859  * Use is subject to license terms.
860  */
861 
862 /*	Copyright (c) 1988 AT&T	*/
863 /*	  All Rights Reserved  	*/
864 
865 /*
866  * An application should not include this header directly.  Instead it
867  * should be included only through the inclusion of other Sun headers.
868  *
869  * The contents of this header is limited to identifiers specified in the
870  * C Standard.  Any new identifiers specified in future amendments to the
871  * C Standard must be placed in this header.  If these new identifiers
872  * are required to also be in the C++ Standard "std" namespace, then for
873  * anything other than macro definitions, corresponding "using" directives
874  * must also be added to <stdio.h>.
875  */
876 
877 /*
878  * User-visible pieces of the ANSI C standard I/O package.
879  */
880 
881 
882 
883 
884 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
885 /*
886  * CDDL HEADER START
887  *
888  * The contents of this file are subject to the terms of the
889  * Common Development and Distribution License (the "License").
890  * You may not use this file except in compliance with the License.
891  *
892  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
893  * or http://www.opensolaris.org/os/licensing.
894  * See the License for the specific language governing permissions
895  * and limitations under the License.
896  *
897  * When distributing Covered Code, include this CDDL HEADER in each
898  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
899  * If applicable, add the following below this CDDL HEADER, with the
900  * fields enclosed by brackets "[]" replaced with your own identifying
901  * information: Portions Copyright [yyyy] [name of copyright owner]
902  *
903  * CDDL HEADER END
904  */
905 
906 /*
907  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
908  * Copyright 2016 Joyent, Inc.
909  *
910  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
911  * Use is subject to license terms.
912  */
913 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
915 /*
916  * This file and its contents are supplied under the terms of the
917  * Common Development and Distribution License ("CDDL"), version 1.0.
918  * You may only use this file in accordance with the terms of version
919  * 1.0 of the CDDL.
920  *
921  * A full copy of the text of the CDDL should have accompanied this
922  * source.  A copy of the CDDL is also available via the Internet at
923  * http://www.illumos.org/license/CDDL.
924  */
925 
926 /*
927  * Copyright 2014-2016 PALO, Richard.
928  */
929 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
930 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
931 /*
932  * CDDL HEADER START
933  *
934  * The contents of this file are subject to the terms of the
935  * Common Development and Distribution License, Version 1.0 only
936  * (the "License").  You may not use this file except in compliance
937  * with the License.
938  *
939  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
940  * or http://www.opensolaris.org/os/licensing.
941  * See the License for the specific language governing permissions
942  * and limitations under the License.
943  *
944  * When distributing Covered Code, include this CDDL HEADER in each
945  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
946  * If applicable, add the following below this CDDL HEADER, with the
947  * fields enclosed by brackets "[]" replaced with your own identifying
948  * information: Portions Copyright [yyyy] [name of copyright owner]
949  *
950  * CDDL HEADER END
951  */
952 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
953 /*	  All Rights Reserved	*/
954 
955 
956 /*
957  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
958  *
959  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
960  * Use is subject to license terms.
961  */
962 
963 
964 
965 
966 /*
967  * An application should not include this header directly.  Instead it
968  * should be included only through the inclusion of other Sun headers.
969  *
970  * The purpose of this header is to provide the type definitions for
971  * the va_list argument used by a number of printf and printf like
972  * functions. The headers that define these various function prototypes
973  * #include this header directly. These include but are not necessarily
974  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
975  * <syslog.h>. The type definitions included in this header are for
976  * the benefit of consumers of va_list.
977  *
978  * Any application that accepts variable argument lists must as documented,
979  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
980  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
981  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
982  * in <sys/va_impl.h> for more detailed information regarding implementation
983  * and compiler specific protocols.
984  */
985 
986 /*
987  * The common definitions exported by this header or compilers using
988  * this header are:
989  *
990  * the identifier __builtin_va_alist for the variable list pseudo parameter
991  * the type __va_alist_type for the variable list pseudo parameter
992  * the type __va_list defining the type of the variable list iterator
993  *
994  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
995  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
996  * defined by the compilation system, not the user of the system.
997  */
998 
999 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1000 /*
1001  * CDDL HEADER START
1002  *
1003  * The contents of this file are subject to the terms of the
1004  * Common Development and Distribution License (the "License").
1005  * You may not use this file except in compliance with the License.
1006  *
1007  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1008  * or http://www.opensolaris.org/os/licensing.
1009  * See the License for the specific language governing permissions
1010  * and limitations under the License.
1011  *
1012  *
1013  * When distributing Covered Code, include this CDDL HEADER in each
1014  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1015  * If applicable, add the following below this CDDL HEADER, with the
1016  * fields enclosed by brackets "[]" replaced with your own identifying
1017  * information: Portions Copyright [yyyy] [name of copyright owner]
1018  *
1019  * CDDL HEADER END
1020  */
1021 
1022 /*
1023  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1024  * Use is subject to license terms.
1025  * Copyright 2016 Joyent, Inc.
1026  */
1027 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1028 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1029 typedef __builtin_va_list __gnuc_va_list;
1030 /*
1031  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1032  *	defined with __va_list instead of plain old va_list.
1033  *	Perhaps that should be fixed!
1034  */
1035 typedef __builtin_va_list __va_list;
1036 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1037 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1038 /*
1039  * CDDL HEADER START
1040  *
1041  * The contents of this file are subject to the terms of the
1042  * Common Development and Distribution License, Version 1.0 only
1043  * (the "License").  You may not use this file except in compliance
1044  * with the License.
1045  *
1046  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1047  * or http://www.opensolaris.org/os/licensing.
1048  * See the License for the specific language governing permissions
1049  * and limitations under the License.
1050  *
1051  * When distributing Covered Code, include this CDDL HEADER in each
1052  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1053  * If applicable, add the following below this CDDL HEADER, with the
1054  * fields enclosed by brackets "[]" replaced with your own identifying
1055  * information: Portions Copyright [yyyy] [name of copyright owner]
1056  *
1057  * CDDL HEADER END
1058  */
1059 /*
1060  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1061  * Use is subject to license terms.
1062  */
1063 
1064 
1065 
1066 
1067 #pragma ident "%Z%%M%	%I%	%E% SMI"
1068 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1069 typedef struct __FILE __FILE;
1070 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1071 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1072 /*
1073  * CDDL HEADER START
1074  *
1075  * The contents of this file are subject to the terms of the
1076  * Common Development and Distribution License (the "License").
1077  * You may not use this file except in compliance with the License.
1078  *
1079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1080  * or http://www.opensolaris.org/os/licensing.
1081  * See the License for the specific language governing permissions
1082  * and limitations under the License.
1083  *
1084  * When distributing Covered Code, include this CDDL HEADER in each
1085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1086  * If applicable, add the following below this CDDL HEADER, with the
1087  * fields enclosed by brackets "[]" replaced with your own identifying
1088  * information: Portions Copyright [yyyy] [name of copyright owner]
1089  *
1090  * CDDL HEADER END
1091  */
1092 
1093 /*
1094  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1095  * Use is subject to license terms.
1096  */
1097 
1098 
1099 
1100 
1101 #pragma ident "%Z%%M%	%I%	%E% SMI"
1102 
1103 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1104 /*
1105  * CDDL HEADER START
1106  *
1107  * The contents of this file are subject to the terms of the
1108  * Common Development and Distribution License (the "License").
1109  * You may not use this file except in compliance with the License.
1110  *
1111  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1112  * or http://www.opensolaris.org/os/licensing.
1113  * See the License for the specific language governing permissions
1114  * and limitations under the License.
1115  *
1116  *
1117  * When distributing Covered Code, include this CDDL HEADER in each
1118  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1119  * If applicable, add the following below this CDDL HEADER, with the
1120  * fields enclosed by brackets "[]" replaced with your own identifying
1121  * information: Portions Copyright [yyyy] [name of copyright owner]
1122  *
1123  * CDDL HEADER END
1124  */
1125 
1126 /*
1127  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1128  * Use is subject to license terms.
1129  * Copyright 2016 Joyent, Inc.
1130  */
1131 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1132 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1133 struct __FILE /* needs to be binary-compatible with old versions */
1134 {
1135 
1136 
1137 
1138 
1139  int _cnt; /* number of available characters in buffer */
1140  unsigned char *_ptr; /* next character from/to here in buffer */
1141 
1142  unsigned char *_base; /* the buffer */
1143  unsigned char _flag; /* the state of the stream */
1144  unsigned char _magic; /* Old home of the file descriptor */
1145     /* Only fileno(3C) can retrieve the value now */
1146  unsigned __orientation:2; /* the orientation of the stream */
1147  unsigned __ionolock:1; /* turn off implicit locking */
1148  unsigned __seekable:1; /* is file seekable? */
1149  unsigned __extendedfd:1; /* enable extended FILE */
1150  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1151  unsigned __filler:10;
1152 };
1153 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1154 
1155 /*
1156  * If feature test macros are set that enable interfaces that use types
1157  * defined in <sys/types.h>, get those types by doing the include.
1158  *
1159  * Note that in asking for the interfaces associated with this feature test
1160  * macro one also asks for definitions of the POSIX types.
1161  */
1162 
1163 
1164 
1165 
1166 
1167 
1168 /*
1169  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1170  * underscores added to avoid polluting the ANSI C name space).  See the
1171  * commentary there for further explanation.
1172  */
1173 
1174 typedef long long __longlong_t;
1175 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1176 typedef __FILE FILE;
1177 
1178 
1179 
1180 
1181 
1182 
1183 
1184 typedef unsigned int size_t; /* (historical version) */
1185 
1186 
1187 
1188 
1189 
1190 
1191 typedef __longlong_t fpos_t;
1192 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1193 /*
1194  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1195  * is chosen for historical reasons rather than for truly processor related
1196  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1197  * UNIX historical value of 20 so it is allowed to fall through.
1198  */
1199 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1200 extern __FILE __iob[60];
1201 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1202 extern int remove(const char *);
1203 extern int rename(const char *, const char *);
1204 extern FILE *tmpfile(void);
1205 extern char *tmpnam(char *);
1206 extern int fclose(FILE *);
1207 extern int fflush(FILE *);
1208 extern FILE *fopen(const char *, const char *);
1209 extern FILE *freopen(const char *,
1210    const char *, FILE *);
1211 extern void setbuf(FILE *, char *);
1212 extern int setvbuf(FILE *, char *, int,
1213    size_t);
1214 /* PRINTFLIKE2 */
1215 extern int fprintf(FILE *, const char *, ...);
1216 /* SCANFLIKE2 */
1217 extern int fscanf(FILE *, const char *, ...);
1218 /* PRINTFLIKE1 */
1219 extern int printf(const char *, ...);
1220 /* SCANFLIKE1 */
1221 extern int scanf(const char *, ...);
1222 /* PRINTFLIKE2 */
1223 extern int sprintf(char *, const char *, ...);
1224 /* SCANFLIKE2 */
1225 extern int sscanf(const char *,
1226    const char *, ...);
1227 extern int vfprintf(FILE *, const char *,
1228    __va_list);
1229 extern int vprintf(const char *, __va_list);
1230 extern int vsprintf(char *, const char *,
1231    __va_list);
1232 extern int fgetc(FILE *);
1233 extern char *fgets(char *, int, FILE *);
1234 extern int fputc(int, FILE *);
1235 extern int fputs(const char *, FILE *);
1236 
1237 
1238 extern int getc(FILE *);
1239 extern int putc(int, FILE *);
1240 
1241 
1242 
1243 extern int getchar(void);
1244 extern int putchar(int);
1245 
1246 
1247 /*
1248  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1249  * environment has been requested, we remove it.
1250  */
1251 
1252 extern char *gets(char *);
1253 
1254 extern int puts(const char *);
1255 extern int ungetc(int, FILE *);
1256 extern size_t fread(void *, size_t, size_t,
1257  FILE *);
1258 extern size_t fwrite(const void *, size_t, size_t,
1259  FILE *);
1260 
1261 extern int fgetpos(FILE *, fpos_t *);
1262 extern int fsetpos(FILE *, const fpos_t *);
1263 
1264 extern int fseek(FILE *, long, int);
1265 extern long ftell(FILE *);
1266 extern void rewind(FILE *);
1267 
1268 
1269 extern void clearerr(FILE *);
1270 extern int feof(FILE *);
1271 extern int ferror(FILE *);
1272 
1273 extern void perror(const char *);
1274 
1275 
1276 extern int __filbuf(FILE *);
1277 extern int __flsbuf(int, FILE *);
1278 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1279 
1280 /*
1281  * If feature test macros are set that enable interfaces that use types
1282  * defined in <sys/types.h>, get those types by doing the include.
1283  *
1284  * Note that in asking for the interfaces associated with this feature test
1285  * macro one also asks for definitions of the POSIX types.
1286  */
1287 
1288 /*
1289  * Allow global visibility for symbols defined in
1290  * C++ "std" namespace in <iso/stdio_iso.h>.
1291  */
1292 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1293 /*
1294  * This header needs to be included here because it relies on the global
1295  * visibility of FILE and size_t in the C++ environment.
1296  */
1297 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1298 /*
1299  * CDDL HEADER START
1300  *
1301  * The contents of this file are subject to the terms of the
1302  * Common Development and Distribution License, Version 1.0 only
1303  * (the "License").  You may not use this file except in compliance
1304  * with the License.
1305  *
1306  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1307  * or http://www.opensolaris.org/os/licensing.
1308  * See the License for the specific language governing permissions
1309  * and limitations under the License.
1310  *
1311  * When distributing Covered Code, include this CDDL HEADER in each
1312  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1313  * If applicable, add the following below this CDDL HEADER, with the
1314  * fields enclosed by brackets "[]" replaced with your own identifying
1315  * information: Portions Copyright [yyyy] [name of copyright owner]
1316  *
1317  * CDDL HEADER END
1318  */
1319 /*
1320  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1321  *
1322  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1323  * Use is subject to license terms.
1324  */
1325 
1326 /*
1327  * An application should not include this header directly.  Instead it
1328  * should be included only through the inclusion of other Sun headers.
1329  *
1330  * The contents of this header is limited to identifiers specified in
1331  * the C99 standard and in conflict with the C++ implementation of the
1332  * standard header.  The C++ standard may adopt the C99 standard at
1333  * which point it is expected that the symbols included here will
1334  * become part of the C++ std namespace.
1335  */
1336 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1337 /*
1338  * The following have been added as a result of the ISO/IEC 9899:1999
1339  * standard. For a strictly conforming C application, visibility is
1340  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1341  * For non-strictly conforming C applications, there are no restrictions
1342  * on the C namespace.
1343  */
1344 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1345 extern int vfscanf(FILE *, const char *, __va_list);
1346 extern int vscanf(const char *, __va_list);
1347 extern int vsscanf(const char *, const char *,
1348   __va_list);
1349 
1350 
1351 
1352 
1353 extern int snprintf(char *, size_t, const char *,
1354  ...);
1355 extern int vsnprintf(char *, size_t, const char *,
1356  __va_list);
1357 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1358 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1359 typedef __longlong_t off_t;
1360 
1361 
1362 
1363 
1364 
1365 typedef __longlong_t off64_t;
1366 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1367 typedef __longlong_t fpos64_t;
1368 
1369 
1370 
1371 /*
1372  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1373  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1374  * not be polluted with this name.
1375  */
1376 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1377 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1378 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1379 extern unsigned char _sibuf[], _sobuf[];
1380 
1381 
1382 /* large file compilation environment setup */
1383 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1384 extern unsigned char *_bufendtab[];
1385 extern FILE *_lastbuf;
1386 
1387 
1388 /* In the LP64 compilation environment, all APIs are already large file */
1389 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1390 typedef int ssize_t; /* (historical version) */
1391 
1392 
1393 
1394 
1395 
1396 
1397 extern char *tmpnam_r(char *);
1398 
1399 
1400 
1401 
1402 extern int fcloseall(void);
1403 extern void setbuffer(FILE *, char *, size_t);
1404 extern int setlinebuf(FILE *);
1405 /* PRINTFLIKE2 */
1406 extern int asprintf(char **, const char *, ...);
1407 /* PRINTFLIKE2 */
1408 extern int vasprintf(char **, const char *, __va_list);
1409 
1410 
1411 
1412 
1413  /* || defined(_XPG7) */
1414 extern ssize_t getdelim(char **, size_t *,
1415  int, FILE *);
1416 extern ssize_t getline(char **, size_t *,
1417  FILE *);
1418 
1419 
1420 /*
1421  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1422  */
1423 
1424 
1425 
1426 extern FILE *fdopen(int, const char *);
1427 extern char *ctermid(char *);
1428 extern int fileno(FILE *);
1429 
1430 
1431 
1432 /*
1433  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1434  */
1435 
1436 
1437 extern void flockfile(FILE *);
1438 extern int ftrylockfile(FILE *);
1439 extern void funlockfile(FILE *);
1440 extern int getc_unlocked(FILE *);
1441 extern int getchar_unlocked(void);
1442 extern int putc_unlocked(int, FILE *);
1443 extern int putchar_unlocked(int);
1444 
1445 
1446 
1447 /*
1448  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1449  */
1450 
1451 
1452 extern FILE *popen(const char *, const char *);
1453 extern char *tempnam(const char *, const char *);
1454 extern int pclose(FILE *);
1455 
1456 extern int getsubopt(char **, char *const *, char **);
1457 
1458 
1459 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1460 
1461 extern char *cuserid(char *);
1462 extern int getopt(int, char *const *, const char *);
1463 extern char *optarg;
1464 extern int optind, opterr, optopt;
1465 extern int getw(FILE *);
1466 extern int putw(int, FILE *);
1467 
1468 
1469 
1470 
1471 /*
1472  * The following are defined as part of the Large File Summit interfaces.
1473  */
1474 
1475 extern int fseeko(FILE *, off_t, int);
1476 extern off_t ftello(FILE *);
1477 
1478 
1479 /*
1480  * The following are defined as part of the transitional Large File Summit
1481  * interfaces.
1482  */
1483 
1484 
1485 extern FILE *fopen64(const char *, const char *);
1486 extern FILE *freopen64(const char *, const char *, FILE *);
1487 extern FILE *tmpfile64(void);
1488 extern int fgetpos64(FILE *, fpos64_t *);
1489 extern int fsetpos64(FILE *, const fpos64_t *);
1490 extern int fseeko64(FILE *, off64_t, int);
1491 extern off64_t ftello64(FILE *);
1492 
1493 
1494 /*
1495  * XPG7 symbols
1496  */
1497 
1498 extern FILE *fmemopen(void *, size_t,
1499       const char *);
1500 extern FILE *open_memstream(char **, size_t *);
1501 # 48 "lock.c" 2
1502 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1
1503 /*
1504  * CDDL HEADER START
1505  *
1506  * The contents of this file are subject to the terms of the
1507  * Common Development and Distribution License, Version 1.0 only
1508  * (the "License").  You may not use this file except in compliance
1509  * with the License.
1510  *
1511  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1512  * or http://www.opensolaris.org/os/licensing.
1513  * See the License for the specific language governing permissions
1514  * and limitations under the License.
1515  *
1516  * When distributing Covered Code, include this CDDL HEADER in each
1517  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1518  * If applicable, add the following below this CDDL HEADER, with the
1519  * fields enclosed by brackets "[]" replaced with your own identifying
1520  * information: Portions Copyright [yyyy] [name of copyright owner]
1521  *
1522  * CDDL HEADER END
1523  */
1524 /*	Copyright (c) 1988 AT&T	*/
1525 /*	  All Rights Reserved	*/
1526 
1527 /*
1528  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1529  *
1530  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1531  * Use is subject to license terms.
1532  */
1533 
1534 
1535 
1536 
1537 /*
1538  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
1539  * variable argument definitions.  For legacy support, it also defines
1540  * the pre-standard variable argument definitions.
1541  *
1542  * The varargs definitions within this header are defined in terms of
1543  * implementation definitions.  These implementation definitions reside
1544  * in <sys/va_list.h>.  This organization enables protected use of
1545  * the implementation by other standard headers without introducing
1546  * names into the users' namespace.
1547  */
1548 
1549 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1
1550 /*
1551  * CDDL HEADER START
1552  *
1553  * The contents of this file are subject to the terms of the
1554  * Common Development and Distribution License, Version 1.0 only
1555  * (the "License").  You may not use this file except in compliance
1556  * with the License.
1557  *
1558  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1559  * or http://www.opensolaris.org/os/licensing.
1560  * See the License for the specific language governing permissions
1561  * and limitations under the License.
1562  *
1563  * When distributing Covered Code, include this CDDL HEADER in each
1564  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1565  * If applicable, add the following below this CDDL HEADER, with the
1566  * fields enclosed by brackets "[]" replaced with your own identifying
1567  * information: Portions Copyright [yyyy] [name of copyright owner]
1568  *
1569  * CDDL HEADER END
1570  */
1571 /*	Copyright (c) 1988 AT&T	*/
1572 /*	  All Rights Reserved  	*/
1573 
1574 
1575 /*
1576  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1577  * Use is subject to license terms.
1578  */
1579 
1580 /*
1581  * An application should not include this header directly.  Instead it
1582  * should be included only through the inclusion of other Sun headers.
1583  *
1584  * The contents of this header is limited to identifiers specified in the
1585  * C Standard.  Any new identifiers specified in future amendments to the
1586  * C Standard must be placed in this header.  If these new identifiers
1587  * are required to also be in the C++ Standard "std" namespace, then for
1588  * anything other than macro definitions, corresponding "using" directives
1589  * must also be added to <stdarg.h>.
1590  */
1591 
1592 
1593 
1594 
1595 #pragma ident "%Z%%M%	%I%	%E% SMI"
1596 
1597 /*
1598  * This header defines the ISO C 1989 and ISO C++ 1998 variable
1599  * argument definitions.
1600  *
1601  * The varargs definitions within this header are defined in terms of
1602  * implementation definitions.  These implementation definitions reside
1603  * in <sys/va_impl.h>.  This organization enables protected use of
1604  * the implementation by other standard headers without introducing
1605  * names into the users' namespace.
1606  */
1607 
1608 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1
1609 /*
1610  * CDDL HEADER START
1611  *
1612  * The contents of this file are subject to the terms of the
1613  * Common Development and Distribution License, Version 1.0 only
1614  * (the "License").  You may not use this file except in compliance
1615  * with the License.
1616  *
1617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1618  * or http://www.opensolaris.org/os/licensing.
1619  * See the License for the specific language governing permissions
1620  * and limitations under the License.
1621  *
1622  * When distributing Covered Code, include this CDDL HEADER in each
1623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1624  * If applicable, add the following below this CDDL HEADER, with the
1625  * fields enclosed by brackets "[]" replaced with your own identifying
1626  * information: Portions Copyright [yyyy] [name of copyright owner]
1627  *
1628  * CDDL HEADER END
1629  */
1630 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1631 /*	  All Rights Reserved	*/
1632 
1633 
1634 /*
1635  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1636  *
1637  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1638  * Use is subject to license terms.
1639  */
1640 
1641 
1642 
1643 
1644 /*
1645  * An application should not include this header directly.  Instead it
1646  * should be included only through the inclusion of other Sun headers,
1647  * specifically <stdarg.h> and <varargs.h>.
1648  *
1649  * This header serves two purposes.
1650  *
1651  * First, it provides a common set of definitions that implementations
1652  * of the various standards for variable argument lists may use.  These
1653  * various standards are implemented in <varargs.h>, <stdarg.h>,
1654  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
1655  *
1656  * Second, it provides varying implementations of the common definitions,
1657  * depending upon the compiler.
1658  */
1659 
1660 /*
1661  * The common definitions exported by this header or compilers using
1662  * this header are:
1663  *
1664  * the macro __va_start(list, name) starting the list iteration
1665  * the macro __va_arg(list, type) getting the current arg and iterating
1666  * the macro __va_copy(to, from) to bookmark the list iteration
1667  * the macro __va_end(list) to end the iteration
1668  *
1669  * In addition, the following are exported via inclusion of <sys/va_list.h>:
1670  *
1671  * the identifier __builtin_va_alist for the variable list pseudo parameter
1672  * the type __va_alist_type for the variable list pseudo parameter
1673  * the type __va_list defining the type of the variable list iterator
1674  */
1675 
1676 /*
1677  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
1678  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
1679  * macros (e.g. __sparc) to determine the protocol appropriate to the
1680  * current compilation.  It is intended that the compilation system
1681  * define the feature, processor, and compiler macros, not the user of
1682  * the system.
1683  */
1684 
1685 /*
1686  * Many compilation systems depend upon the use of special functions
1687  * built into the the compilation system to handle variable argument
1688  * lists.  These built-in symbols may include one or more of the
1689  * following:
1690  *
1691  *      __builtin_va_alist
1692  *      __builtin_va_start
1693  *      __builtin_va_arg_incr
1694  *      __builtin_stdarg_start
1695  *      __builtin_va_end
1696  *      __builtin_va_arg
1697  *      __builtin_va_copy
1698  */
1699 
1700 /*
1701  * The following are defined in <sys/va_list.h>:
1702  *
1703  *      __va_alist_type
1704  *      __va_void()
1705  *      __va_ptr_base
1706  *      ISA definitions via inclusion of <sys/isa_defs.h>
1707  *
1708  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
1709  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
1710  * via inclusion of <iso/stdarg_iso.h>.
1711  */
1712 
1713 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
1714 /*
1715  * CDDL HEADER START
1716  *
1717  * The contents of this file are subject to the terms of the
1718  * Common Development and Distribution License, Version 1.0 only
1719  * (the "License").  You may not use this file except in compliance
1720  * with the License.
1721  *
1722  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1723  * or http://www.opensolaris.org/os/licensing.
1724  * See the License for the specific language governing permissions
1725  * and limitations under the License.
1726  *
1727  * When distributing Covered Code, include this CDDL HEADER in each
1728  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1729  * If applicable, add the following below this CDDL HEADER, with the
1730  * fields enclosed by brackets "[]" replaced with your own identifying
1731  * information: Portions Copyright [yyyy] [name of copyright owner]
1732  *
1733  * CDDL HEADER END
1734  */
1735 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1736 /*	  All Rights Reserved	*/
1737 
1738 
1739 /*
1740  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1741  *
1742  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1743  * Use is subject to license terms.
1744  */
1745 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2
1746 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2
1747 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h"
1748 typedef __va_list va_list;
1749 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2
1750 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1
1751 /*
1752  * CDDL HEADER START
1753  *
1754  * The contents of this file are subject to the terms of the
1755  * Common Development and Distribution License, Version 1.0 only
1756  * (the "License").  You may not use this file except in compliance
1757  * with the License.
1758  *
1759  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1760  * or http://www.opensolaris.org/os/licensing.
1761  * See the License for the specific language governing permissions
1762  * and limitations under the License.
1763  *
1764  * When distributing Covered Code, include this CDDL HEADER in each
1765  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1766  * If applicable, add the following below this CDDL HEADER, with the
1767  * fields enclosed by brackets "[]" replaced with your own identifying
1768  * information: Portions Copyright [yyyy] [name of copyright owner]
1769  *
1770  * CDDL HEADER END
1771  */
1772 /*	Copyright (c) 1988 AT&T	*/
1773 /*	  All Rights Reserved	*/
1774 
1775 
1776 /*
1777  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1778  * Use is subject to license terms.
1779  */
1780 
1781 
1782 
1783 
1784 #pragma ident "%Z%%M%	%I%	%E% SMI"
1785 
1786 /*
1787  * An application should not include this header directly.  Instead it
1788  * should be included only through the inclusion of other Sun headers.
1789  *
1790  * This header defines the va_copy variable argument macro, which is
1791  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
1792  * 1998.  Because this macro is a long-standing Solaris extension, it
1793  * is also permitted in other contexts.
1794  *
1795  * The varargs definitions within this header are defined in terms of
1796  * implementation definitions.  These implementation definitions reside
1797  * in <sys/va_list.h>.  This organization enables protected use of
1798  * the implementation by other standard headers without introducing
1799  * names into the users' namespace.
1800  */
1801 
1802 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1803 /*
1804  * CDDL HEADER START
1805  *
1806  * The contents of this file are subject to the terms of the
1807  * Common Development and Distribution License (the "License").
1808  * You may not use this file except in compliance with the License.
1809  *
1810  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1811  * or http://www.opensolaris.org/os/licensing.
1812  * See the License for the specific language governing permissions
1813  * and limitations under the License.
1814  *
1815  * When distributing Covered Code, include this CDDL HEADER in each
1816  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1817  * If applicable, add the following below this CDDL HEADER, with the
1818  * fields enclosed by brackets "[]" replaced with your own identifying
1819  * information: Portions Copyright [yyyy] [name of copyright owner]
1820  *
1821  * CDDL HEADER END
1822  */
1823 
1824 /*
1825  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1826  * Copyright 2016 Joyent, Inc.
1827  *
1828  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1829  * Use is subject to license terms.
1830  */
1831 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2
1832 
1833 
1834 
1835 
1836 
1837 /*
1838  * va_copy was initially a Solaris extension to provide a portable
1839  * way to perform a variable argument list ``bookmarking'' function.
1840  * It is now specified in the ISO/IEC 9899:1999 standard.
1841  */
1842 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2
1843 
1844 /*
1845  * Allow global visibility for symbols defined in
1846  * C++ "std" namespace in <iso/stdarg_iso.h>.
1847  */
1848 # 49 "lock.c" 2
1849 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
1850 /*
1851  * CDDL HEADER START
1852  *
1853  * The contents of this file are subject to the terms of the
1854  * Common Development and Distribution License (the "License").
1855  * You may not use this file except in compliance with the License.
1856  *
1857  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1858  * or http://www.opensolaris.org/os/licensing.
1859  * See the License for the specific language governing permissions
1860  * and limitations under the License.
1861  *
1862  * When distributing Covered Code, include this CDDL HEADER in each
1863  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1864  * If applicable, add the following below this CDDL HEADER, with the
1865  * fields enclosed by brackets "[]" replaced with your own identifying
1866  * information: Portions Copyright [yyyy] [name of copyright owner]
1867  *
1868  * CDDL HEADER END
1869  */
1870 
1871 /*
1872  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1873  * Copyright (c) 2013 Gary Mills
1874  *
1875  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
1876  */
1877 
1878 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
1879 
1880 /*	Copyright (c) 1988 AT&T	*/
1881 /*	  All Rights Reserved  	*/
1882 
1883 
1884 
1885 
1886 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
1887 /*
1888  * CDDL HEADER START
1889  *
1890  * The contents of this file are subject to the terms of the
1891  * Common Development and Distribution License, Version 1.0 only
1892  * (the "License").  You may not use this file except in compliance
1893  * with the License.
1894  *
1895  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1896  * or http://www.opensolaris.org/os/licensing.
1897  * See the License for the specific language governing permissions
1898  * and limitations under the License.
1899  *
1900  * When distributing Covered Code, include this CDDL HEADER in each
1901  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1902  * If applicable, add the following below this CDDL HEADER, with the
1903  * fields enclosed by brackets "[]" replaced with your own identifying
1904  * information: Portions Copyright [yyyy] [name of copyright owner]
1905  *
1906  * CDDL HEADER END
1907  */
1908 /*
1909  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1910  * Copyright 2014 PALO, Richard.
1911  *
1912  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
1913  * Use is subject to license terms.
1914  */
1915 
1916 /*	Copyright (c) 1988 AT&T	*/
1917 /*	  All Rights Reserved  	*/
1918 
1919 
1920 /*
1921  * An application should not include this header directly.  Instead it
1922  * should be included only through the inclusion of other Sun headers.
1923  *
1924  * The contents of this header is limited to identifiers specified in the
1925  * C Standard.  Any new identifiers specified in future amendments to the
1926  * C Standard must be placed in this header.  If these new identifiers
1927  * are required to also be in the C++ Standard "std" namespace, then for
1928  * anything other than macro definitions, corresponding "using" directives
1929  * must also be added to <locale.h>.
1930  */
1931 
1932 
1933 
1934 
1935 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1936 /*
1937  * CDDL HEADER START
1938  *
1939  * The contents of this file are subject to the terms of the
1940  * Common Development and Distribution License (the "License").
1941  * You may not use this file except in compliance with the License.
1942  *
1943  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1944  * or http://www.opensolaris.org/os/licensing.
1945  * See the License for the specific language governing permissions
1946  * and limitations under the License.
1947  *
1948  * When distributing Covered Code, include this CDDL HEADER in each
1949  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1950  * If applicable, add the following below this CDDL HEADER, with the
1951  * fields enclosed by brackets "[]" replaced with your own identifying
1952  * information: Portions Copyright [yyyy] [name of copyright owner]
1953  *
1954  * CDDL HEADER END
1955  */
1956 
1957 /*
1958  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1959  * Copyright 2016 Joyent, Inc.
1960  *
1961  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1962  * Use is subject to license terms.
1963  */
1964 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
1965 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
1966 /*
1967  * This file and its contents are supplied under the terms of the
1968  * Common Development and Distribution License ("CDDL"), version 1.0.
1969  * You may only use this file in accordance with the terms of version
1970  * 1.0 of the CDDL.
1971  *
1972  * A full copy of the text of the CDDL should have accompanied this
1973  * source.  A copy of the CDDL is also available via the Internet at
1974  * http://www.illumos.org/license/CDDL.
1975  */
1976 
1977 /*
1978  * Copyright 2014-2016 PALO, Richard.
1979  */
1980 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
1981 
1982 
1983 
1984 
1985 
1986 unsigned char __mb_cur_max(void);
1987 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
1988 typedef struct {
1989  int quot;
1990  int rem;
1991 } div_t;
1992 
1993 typedef struct {
1994  long quot;
1995  long rem;
1996 } ldiv_t;
1997 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
1998 /*
1999  * wchar_t is a built-in type in standard C++ and as such is not
2000  * defined here when using standard C++. However, the GNU compiler
2001  * fixincludes utility nonetheless creates its own version of this
2002  * header for use by gcc and g++. In that version it adds a redundant
2003  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
2004  * header we need to include the following magic comment:
2005  *
2006  * we must use the C++ compiler's type
2007  *
2008  * The above comment should not be removed or changed until GNU
2009  * gcc/fixinc/inclhack.def is updated to bypass this header.
2010  */
2011 
2012 
2013 
2014 
2015 
2016 
2017 typedef long wchar_t;
2018 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
2019 extern void abort(void) __attribute__((__noreturn__));
2020 extern int abs(int);
2021 extern int atexit(void (*)(void));
2022 extern double atof(const char *);
2023 extern int atoi(const char *);
2024 extern long int atol(const char *);
2025 extern void *bsearch(const void *, const void *, size_t, size_t,
2026  int (*)(const void *, const void *));
2027 
2028 
2029 
2030 
2031 
2032 
2033 extern void *calloc(size_t, size_t);
2034 extern div_t div(int, int);
2035 extern void exit(int)
2036  __attribute__((__noreturn__));
2037 extern void free(void *);
2038 extern char *getenv(const char *);
2039 extern long int labs(long);
2040 extern ldiv_t ldiv(long, long);
2041 extern void *malloc(size_t);
2042 extern int mblen(const char *, size_t);
2043 extern size_t mbstowcs(wchar_t *, const char *,
2044  size_t);
2045 extern int mbtowc(wchar_t *, const char *, size_t);
2046 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
2047 
2048 
2049 
2050 
2051 
2052 extern int rand(void);
2053 extern void *realloc(void *, size_t);
2054 extern void srand(unsigned int);
2055 extern double strtod(const char *, char **);
2056 extern long int strtol(const char *, char **, int);
2057 extern unsigned long int strtoul(const char *,
2058  char **, int);
2059 extern int system(const char *);
2060 extern int wctomb(char *, wchar_t);
2061 extern size_t wcstombs(char *, const wchar_t *,
2062  size_t);
2063 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
2064 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
2065 /*
2066  * CDDL HEADER START
2067  *
2068  * The contents of this file are subject to the terms of the
2069  * Common Development and Distribution License, Version 1.0 only
2070  * (the "License").  You may not use this file except in compliance
2071  * with the License.
2072  *
2073  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2074  * or http://www.opensolaris.org/os/licensing.
2075  * See the License for the specific language governing permissions
2076  * and limitations under the License.
2077  *
2078  * When distributing Covered Code, include this CDDL HEADER in each
2079  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2080  * If applicable, add the following below this CDDL HEADER, with the
2081  * fields enclosed by brackets "[]" replaced with your own identifying
2082  * information: Portions Copyright [yyyy] [name of copyright owner]
2083  *
2084  * CDDL HEADER END
2085  */
2086 /*
2087  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2088  *
2089  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2090  * Use is subject to license terms.
2091  */
2092 
2093 /*
2094  * An application should not include this header directly.  Instead it
2095  * should be included only through the inclusion of other Sun headers.
2096  *
2097  * The contents of this header is limited to identifiers specified in
2098  * the C99 standard and in conflict with the C++ implementation of the
2099  * standard header.  The C++ standard may adopt the C99 standard at
2100  * which point it is expected that the symbols included here will
2101  * become part of the C++ std namespace.
2102  */
2103 
2104 
2105 
2106 
2107 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2108 /*
2109  * CDDL HEADER START
2110  *
2111  * The contents of this file are subject to the terms of the
2112  * Common Development and Distribution License (the "License").
2113  * You may not use this file except in compliance with the License.
2114  *
2115  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2116  * or http://www.opensolaris.org/os/licensing.
2117  * See the License for the specific language governing permissions
2118  * and limitations under the License.
2119  *
2120  * When distributing Covered Code, include this CDDL HEADER in each
2121  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2122  * If applicable, add the following below this CDDL HEADER, with the
2123  * fields enclosed by brackets "[]" replaced with your own identifying
2124  * information: Portions Copyright [yyyy] [name of copyright owner]
2125  *
2126  * CDDL HEADER END
2127  */
2128 
2129 /*
2130  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2131  * Copyright 2016 Joyent, Inc.
2132  *
2133  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2134  * Use is subject to license terms.
2135  */
2136 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
2137 
2138 
2139 
2140 
2141 
2142 /*
2143  * The following have been added as a result of the ISO/IEC 9899:1999
2144  * standard. For a strictly conforming C application, visibility is
2145  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
2146  * For non-strictly conforming C applications, there are no restrictions
2147  * on the C namespace.
2148  */
2149 
2150 
2151 typedef struct {
2152  long long quot;
2153  long long rem;
2154 } lldiv_t;
2155 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
2156 extern void _Exit(int);
2157 extern float strtof(const char *, char **);
2158 extern long double strtold(const char *, char **);
2159 
2160 
2161 extern long long atoll(const char *);
2162 extern long long llabs(long long);
2163 extern lldiv_t lldiv(long long, long long);
2164 extern long long strtoll(const char *, char **,
2165  int);
2166 extern unsigned long long strtoull(const char *,
2167  char **, int);
2168 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
2169 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
2170 /*
2171  * This file and its contents are supplied under the terms of the
2172  * Common Development and Distribution License ("CDDL"), version 1.0.
2173  * You may only use this file in accordance with the terms of version
2174  * 1.0 of the CDDL.
2175  *
2176  * A full copy of the text of the CDDL should have accompanied this
2177  * source.  A copy of the CDDL is also available via the Internet at
2178  * http://www.illumos.org/license/CDDL.
2179  */
2180 
2181 /*
2182  * Copyright 2016 Joyent, Inc.
2183  */
2184 
2185 /*
2186  * An application should not include this header directly.  Instead it
2187  * should be included only through the inclusion of other illumos headers.
2188  *
2189  * The contents of this header is limited to identifiers specified in
2190  * the C11 standard and in conflict with the C++ implementation of the
2191  * standard header.  The C++ standard may adopt the C11 standard at
2192  * which point it is expected that the symbols included here will
2193  * become part of the C++ std namespace.
2194  */
2195 
2196 
2197 
2198 
2199 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.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 (the "License").
2205  * You may not use this file except in compliance with the License.
2206  *
2207  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2208  * or http://www.opensolaris.org/os/licensing.
2209  * See the License for the specific language governing permissions
2210  * and limitations under the License.
2211  *
2212  * When distributing Covered Code, include this CDDL HEADER in each
2213  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2214  * If applicable, add the following below this CDDL HEADER, with the
2215  * fields enclosed by brackets "[]" replaced with your own identifying
2216  * information: Portions Copyright [yyyy] [name of copyright owner]
2217  *
2218  * CDDL HEADER END
2219  */
2220 
2221 /*
2222  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2223  * Copyright 2016 Joyent, Inc.
2224  *
2225  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2226  * Use is subject to license terms.
2227  */
2228 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
2229 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
2230 /*
2231  * The following have been added as a result of the ISO/IEC 9899:2011
2232  * standard. For a strictly conforming C application, visibility is
2233  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
2234  * For non-strictly conforming C applications, there are no restrictions
2235  * on the C namespace.
2236  */
2237 
2238 /*
2239  * Work around fix-includes and other bad actors with using multiple headers.
2240  */
2241 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
2242 extern void *aligned_alloc(size_t, size_t);
2243 extern int at_quick_exit(void (*)(void));
2244 extern void quick_exit(int);
2245 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
2246 
2247 
2248 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.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, Version 1.0 only
2254  * (the "License").  You may not use this file except in compliance
2255  * with the License.
2256  *
2257  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2258  * or http://www.opensolaris.org/os/licensing.
2259  * See the License for the specific language governing permissions
2260  * and limitations under the License.
2261  *
2262  * When distributing Covered Code, include this CDDL HEADER in each
2263  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2264  * If applicable, add the following below this CDDL HEADER, with the
2265  * fields enclosed by brackets "[]" replaced with your own identifying
2266  * information: Portions Copyright [yyyy] [name of copyright owner]
2267  *
2268  * CDDL HEADER END
2269  */
2270 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2271 /*	  All Rights Reserved  	*/
2272 
2273 /*
2274  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2275  *
2276  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2277  * Use is subject to license terms.
2278  */
2279 
2280 
2281 
2282 
2283 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2284 /*
2285  * CDDL HEADER START
2286  *
2287  * The contents of this file are subject to the terms of the
2288  * Common Development and Distribution License (the "License").
2289  * You may not use this file except in compliance with the License.
2290  *
2291  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2292  * or http://www.opensolaris.org/os/licensing.
2293  * See the License for the specific language governing permissions
2294  * and limitations under the License.
2295  *
2296  * When distributing Covered Code, include this CDDL HEADER in each
2297  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2298  * If applicable, add the following below this CDDL HEADER, with the
2299  * fields enclosed by brackets "[]" replaced with your own identifying
2300  * information: Portions Copyright [yyyy] [name of copyright owner]
2301  *
2302  * CDDL HEADER END
2303  */
2304 
2305 /*
2306  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2307  * Copyright 2016 Joyent, Inc.
2308  *
2309  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2310  * Use is subject to license terms.
2311  */
2312 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
2313 
2314 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2315 /*
2316  * CDDL HEADER START
2317  *
2318  * The contents of this file are subject to the terms of the
2319  * Common Development and Distribution License (the "License").
2320  * You may not use this file except in compliance with the License.
2321  *
2322  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2323  * or http://www.opensolaris.org/os/licensing.
2324  * See the License for the specific language governing permissions
2325  * and limitations under the License.
2326  *
2327  * When distributing Covered Code, include this CDDL HEADER in each
2328  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2329  * If applicable, add the following below this CDDL HEADER, with the
2330  * fields enclosed by brackets "[]" replaced with your own identifying
2331  * information: Portions Copyright [yyyy] [name of copyright owner]
2332  *
2333  * CDDL HEADER END
2334  */
2335 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2336 /*	  All Rights Reserved  	*/
2337 
2338 
2339 /*
2340  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2341  * Use is subject to license terms.
2342  *
2343  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2344  * Copyright 2016 Joyent, Inc.
2345  */
2346 
2347 
2348 
2349 
2350 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2351 /*
2352  * CDDL HEADER START
2353  *
2354  * The contents of this file are subject to the terms of the
2355  * Common Development and Distribution License (the "License").
2356  * You may not use this file except in compliance with the License.
2357  *
2358  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2359  * or http://www.opensolaris.org/os/licensing.
2360  * See the License for the specific language governing permissions
2361  * and limitations under the License.
2362  *
2363  * When distributing Covered Code, include this CDDL HEADER in each
2364  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2365  * If applicable, add the following below this CDDL HEADER, with the
2366  * fields enclosed by brackets "[]" replaced with your own identifying
2367  * information: Portions Copyright [yyyy] [name of copyright owner]
2368  *
2369  * CDDL HEADER END
2370  */
2371 
2372 /*
2373  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2374  * Copyright 2016 Joyent, Inc.
2375  *
2376  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2377  * Use is subject to license terms.
2378  */
2379 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
2381 /*
2382  * CDDL HEADER START
2383  *
2384  * The contents of this file are subject to the terms of the
2385  * Common Development and Distribution License (the "License").
2386  * You may not use this file except in compliance with the License.
2387  *
2388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2389  * or http://www.opensolaris.org/os/licensing.
2390  * See the License for the specific language governing permissions
2391  * and limitations under the License.
2392  *
2393  *
2394  * When distributing Covered Code, include this CDDL HEADER in each
2395  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2396  * If applicable, add the following below this CDDL HEADER, with the
2397  * fields enclosed by brackets "[]" replaced with your own identifying
2398  * information: Portions Copyright [yyyy] [name of copyright owner]
2399  *
2400  * CDDL HEADER END
2401  */
2402 
2403 /*
2404  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2405  * Use is subject to license terms.
2406  * Copyright 2016 Joyent, Inc.
2407  */
2408 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2409 
2410 /*
2411  * Machine dependent definitions moved to <sys/machtypes.h>.
2412  */
2413 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
2414 /*
2415  * CDDL HEADER START
2416  *
2417  * The contents of this file are subject to the terms of the
2418  * Common Development and Distribution License, Version 1.0 only
2419  * (the "License").  You may not use this file except in compliance
2420  * with the License.
2421  *
2422  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2423  * or http://www.opensolaris.org/os/licensing.
2424  * See the License for the specific language governing permissions
2425  * and limitations under the License.
2426  *
2427  * When distributing Covered Code, include this CDDL HEADER in each
2428  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2429  * If applicable, add the following below this CDDL HEADER, with the
2430  * fields enclosed by brackets "[]" replaced with your own identifying
2431  * information: Portions Copyright [yyyy] [name of copyright owner]
2432  *
2433  * CDDL HEADER END
2434  */
2435 /*
2436  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2437  * Use is subject to license terms.
2438  */
2439 
2440 
2441 
2442 
2443 #pragma ident "%Z%%M%	%I%	%E% SMI"
2444 
2445 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2446 /*
2447  * CDDL HEADER START
2448  *
2449  * The contents of this file are subject to the terms of the
2450  * Common Development and Distribution License (the "License").
2451  * You may not use this file except in compliance with the License.
2452  *
2453  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2454  * or http://www.opensolaris.org/os/licensing.
2455  * See the License for the specific language governing permissions
2456  * and limitations under the License.
2457  *
2458  * When distributing Covered Code, include this CDDL HEADER in each
2459  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2460  * If applicable, add the following below this CDDL HEADER, with the
2461  * fields enclosed by brackets "[]" replaced with your own identifying
2462  * information: Portions Copyright [yyyy] [name of copyright owner]
2463  *
2464  * CDDL HEADER END
2465  */
2466 
2467 /*
2468  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2469  * Copyright 2016 Joyent, Inc.
2470  *
2471  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2472  * Use is subject to license terms.
2473  */
2474 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
2475 
2476 
2477 
2478 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
2479 /*
2480  * CDDL HEADER START
2481  *
2482  * The contents of this file are subject to the terms of the
2483  * Common Development and Distribution License (the "License").
2484  * You may not use this file except in compliance with the License.
2485  *
2486  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2487  * or http://www.opensolaris.org/os/licensing.
2488  * See the License for the specific language governing permissions
2489  * and limitations under the License.
2490  *
2491  * When distributing Covered Code, include this CDDL HEADER in each
2492  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2493  * If applicable, add the following below this CDDL HEADER, with the
2494  * fields enclosed by brackets "[]" replaced with your own identifying
2495  * information: Portions Copyright [yyyy] [name of copyright owner]
2496  *
2497  * CDDL HEADER END
2498  */
2499 /*
2500  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2501  * Use is subject to license terms.
2502  */
2503 
2504 
2505 
2506 
2507 #pragma ident "%Z%%M%	%I%	%E% SMI"
2508 
2509 
2510 
2511 
2512 
2513 /*
2514  * Machine dependent types:
2515  *
2516  *	intel ia32 Version
2517  */
2518 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
2519 typedef struct _label_t { long val[6]; } label_t;
2520 
2521 
2522 
2523 typedef unsigned char lock_t; /* lock work for busy wait */
2524 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
2525 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2526 
2527 /*
2528  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
2529  * committee's working draft for the revision of the current ISO C standard,
2530  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
2531  * required by any standard but constitute a useful, general purpose set
2532  * of type definitions which is namespace clean with respect to all standards.
2533  */
2534 
2535 
2536 
2537 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
2538 /*
2539  * CDDL HEADER START
2540  *
2541  * The contents of this file are subject to the terms of the
2542  * Common Development and Distribution License, Version 1.0 only
2543  * (the "License").  You may not use this file except in compliance
2544  * with the License.
2545  *
2546  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2547  * or http://www.opensolaris.org/os/licensing.
2548  * See the License for the specific language governing permissions
2549  * and limitations under the License.
2550  *
2551  * When distributing Covered Code, include this CDDL HEADER in each
2552  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2553  * If applicable, add the following below this CDDL HEADER, with the
2554  * fields enclosed by brackets "[]" replaced with your own identifying
2555  * information: Portions Copyright [yyyy] [name of copyright owner]
2556  *
2557  * CDDL HEADER END
2558  */
2559 /*
2560  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2561  *
2562  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2563  * Use is subject to license terms.
2564  */
2565 
2566 
2567 
2568 
2569 /*
2570  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
2571  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
2572  * Programming language - C.
2573  *
2574  * Programs/Modules should not directly include this file.  Access to the
2575  * types defined in this file should be through the inclusion of one of the
2576  * following files:
2577  *
2578  *	<sys/types.h>		Provides only the "_t" types defined in this
2579  *				file which is a subset of the contents of
2580  *				<inttypes.h>.  (This can be appropriate for
2581  *				all programs/modules except those claiming
2582  *				ANSI-C conformance.)
2583  *
2584  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2585  *				components of <inttypes.h>.
2586  *
2587  *	<inttypes.h>		For use by applications.
2588  *
2589  * See these files for more details.
2590  */
2591 
2592 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2593 /*
2594  * CDDL HEADER START
2595  *
2596  * The contents of this file are subject to the terms of the
2597  * Common Development and Distribution License (the "License").
2598  * You may not use this file except in compliance with the License.
2599  *
2600  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2601  * or http://www.opensolaris.org/os/licensing.
2602  * See the License for the specific language governing permissions
2603  * and limitations under the License.
2604  *
2605  * When distributing Covered Code, include this CDDL HEADER in each
2606  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2607  * If applicable, add the following below this CDDL HEADER, with the
2608  * fields enclosed by brackets "[]" replaced with your own identifying
2609  * information: Portions Copyright [yyyy] [name of copyright owner]
2610  *
2611  * CDDL HEADER END
2612  */
2613 
2614 /*
2615  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2616  * Copyright 2016 Joyent, Inc.
2617  *
2618  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2619  * Use is subject to license terms.
2620  */
2621 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
2622 
2623 
2624 
2625 
2626 
2627 /*
2628  * Basic / Extended integer types
2629  *
2630  * The following defines the basic fixed-size integer types.
2631  *
2632  * Implementations are free to typedef them to Standard C integer types or
2633  * extensions that they support. If an implementation does not support one
2634  * of the particular integer data types below, then it should not define the
2635  * typedefs and macros corresponding to that data type.  Note that int8_t
2636  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
2637  * as an unsigned entity because there is no way to define an eight bit
2638  * signed integral.
2639  */
2640 
2641 typedef char int8_t;
2642 
2643 
2644 
2645 typedef short int16_t;
2646 typedef int int32_t;
2647 
2648 
2649 
2650 
2651 
2652 
2653 typedef long long int64_t;
2654 
2655 
2656 
2657 typedef unsigned char uint8_t;
2658 typedef unsigned short uint16_t;
2659 typedef unsigned int uint32_t;
2660 
2661 
2662 
2663 
2664 typedef unsigned long long uint64_t;
2665 
2666 
2667 
2668 /*
2669  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
2670  * and unsigned integer types supported by the implementation.
2671  */
2672 
2673 typedef int64_t intmax_t;
2674 typedef uint64_t uintmax_t;
2675 
2676 
2677 
2678 
2679 
2680 /*
2681  * intptr_t and uintptr_t are signed and unsigned integer types large enough
2682  * to hold any data pointer; that is, data pointers can be assigned into or
2683  * from these integer types without losing precision.
2684  */
2685 
2686 
2687 
2688 
2689 typedef int intptr_t;
2690 typedef unsigned int uintptr_t;
2691 
2692 
2693 /*
2694  * The following define the fastest integer types that can hold the
2695  * specified number of bits.
2696  */
2697 
2698 typedef char int_fast8_t;
2699 
2700 
2701 
2702 typedef int int_fast16_t;
2703 typedef int int_fast32_t;
2704 
2705 
2706 
2707 
2708 typedef long long int_fast64_t;
2709 
2710 
2711 
2712 typedef unsigned char uint_fast8_t;
2713 typedef unsigned int uint_fast16_t;
2714 typedef unsigned int uint_fast32_t;
2715 
2716 
2717 
2718 
2719 typedef unsigned long long uint_fast64_t;
2720 
2721 
2722 
2723 /*
2724  * The following define the smallest integer types that can hold the
2725  * specified number of bits.
2726  */
2727 
2728 typedef char int_least8_t;
2729 
2730 
2731 
2732 typedef short int_least16_t;
2733 typedef int int_least32_t;
2734 
2735 
2736 
2737 
2738 typedef long long int_least64_t;
2739 
2740 
2741 
2742 /*
2743  * If these are changed, please update char16_t and char32_t in head/uchar.h.
2744  */
2745 typedef unsigned char uint_least8_t;
2746 typedef unsigned short uint_least16_t;
2747 typedef unsigned int uint_least32_t;
2748 
2749 
2750 
2751 
2752 typedef unsigned long long uint_least64_t;
2753 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2754 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2755 /*
2756  * Strictly conforming ANSI C environments prior to the 1999
2757  * revision of the C Standard (ISO/IEC 9899:1999) do not have
2758  * the long long data type.
2759  */
2760 
2761 typedef long long longlong_t;
2762 typedef unsigned long long u_longlong_t;
2763 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2764 /*
2765  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
2766  * to use them instead of int32_t and uint32_t because DEC had
2767  * shipped 64-bit wide.
2768  */
2769 
2770 
2771 
2772 
2773 typedef long t_scalar_t; /* historical versions */
2774 typedef unsigned long t_uscalar_t;
2775 
2776 
2777 /*
2778  * POSIX Extensions
2779  */
2780 typedef unsigned char uchar_t;
2781 typedef unsigned short ushort_t;
2782 typedef unsigned int uint_t;
2783 typedef unsigned long ulong_t;
2784 
2785 typedef char *caddr_t; /* ?<core address> type */
2786 typedef long daddr_t; /* <disk address> type */
2787 typedef short cnt_t; /* ?<count> type */
2788 
2789 
2790 
2791 
2792 
2793 
2794 typedef int ptrdiff_t; /* (historical version) */
2795 
2796 
2797 
2798 /*
2799  * VM-related types
2800  */
2801 typedef ulong_t pfn_t; /* page frame number */
2802 typedef ulong_t pgcnt_t; /* number of pages */
2803 typedef long spgcnt_t; /* signed number of pages */
2804 
2805 typedef uchar_t use_t; /* use count for swap.  */
2806 typedef short sysid_t;
2807 typedef short index_t;
2808 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2809 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2810 
2811 /*
2812  * The size of off_t and related types depends on the setting of
2813  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2814  * related to those defined here.)
2815  *
2816  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2817  * explicitly 64 bits wide become available.
2818  */
2819 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2820 typedef u_longlong_t ino_t; /* expanded inode type	*/
2821 typedef longlong_t blkcnt_t; /* count of file blocks */
2822 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2823 typedef u_longlong_t fsfilcnt_t; /* count of files */
2824 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2825 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2826 typedef longlong_t blkcnt64_t; /* count of file blocks */
2827 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2828 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2829 
2830 
2831 
2832 
2833 
2834 
2835 typedef long blksize_t; /* used for block sizes */
2836 
2837 
2838 
2839 
2840 
2841 typedef enum { B_FALSE, B_TRUE } boolean_t;
2842 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2843 /*
2844  * The {u,}pad64_t types can be used in structures such that those structures
2845  * may be accessed by code produced by compilation environments which don't
2846  * support a 64 bit integral datatype.  The intention is not to allow
2847  * use of these fields in such environments, but to maintain the alignment
2848  * and offsets of the structure.
2849  *
2850  * Similar comments for {u,}pad128_t.
2851  *
2852  * Note that these types do NOT generate any stronger alignment constraints
2853  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2854  */
2855 
2856 typedef int64_t pad64_t;
2857 typedef uint64_t upad64_t;
2858 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2859 typedef union {
2860  long double _q;
2861  int32_t _l[4];
2862 } pad128_t;
2863 
2864 typedef union {
2865  long double _q;
2866  uint32_t _l[4];
2867 } upad128_t;
2868 
2869 typedef longlong_t offset_t;
2870 typedef u_longlong_t u_offset_t;
2871 typedef u_longlong_t len_t;
2872 typedef u_longlong_t diskaddr_t;
2873 
2874 
2875 
2876 
2877 /*
2878  * Definitions remaining from previous partial support for 64-bit file
2879  * offsets.  This partial support for devices greater than 2gb requires
2880  * compiler support for long long.
2881  */
2882 
2883 typedef union {
2884  offset_t _f; /* Full 64 bit offset value */
2885  struct {
2886   int32_t _l; /* lower 32 bits of offset value */
2887   int32_t _u; /* upper 32 bits of offset value */
2888  } _p;
2889 } lloff_t;
2890 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2891 typedef union {
2892  longlong_t _f; /* Full 64 bit disk address value */
2893  struct {
2894   int32_t _l; /* lower 32 bits of disk address value */
2895   int32_t _u; /* upper 32 bits of disk address value */
2896  } _p;
2897 } lldaddr_t;
2898 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2899 typedef uint_t k_fltset_t; /* kernel fault set type */
2900 
2901 /*
2902  * The following type is for various kinds of identifiers.  The
2903  * actual type must be the same for all since some system calls
2904  * (such as sigsend) take arguments that may be any of these
2905  * types.  The enumeration type idtype_t defined in sys/procset.h
2906  * is used to indicate what type of id is being specified --
2907  * a process id, process group id, session id, scheduling class id,
2908  * user id, group id, project id, task id or zone id.
2909  */
2910 
2911 
2912 
2913 typedef long id_t; /* (historical version) */
2914 
2915 
2916 typedef id_t lgrp_id_t; /* lgroup ID */
2917 
2918 /*
2919  * Type useconds_t is an unsigned integral type capable of storing
2920  * values at least in the range of zero to 1,000,000.
2921  */
2922 typedef uint_t useconds_t; /* Time, in microseconds */
2923 
2924 
2925 
2926 typedef long suseconds_t; /* signed # of microseconds */
2927 
2928 
2929 /*
2930  * Typedefs for dev_t components.
2931  */
2932 
2933 
2934 
2935 
2936 typedef ulong_t major_t; /* (historical version) */
2937 typedef ulong_t minor_t; /* (historical version) */
2938 
2939 
2940 /*
2941  * The data type of a thread priority.
2942  */
2943 typedef short pri_t;
2944 
2945 /*
2946  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2947  * types, if needed, limited by ability to update atomically.)
2948  */
2949 typedef ushort_t cpu_flag_t;
2950 
2951 /*
2952  * For compatibility reasons the following typedefs (prefixed o_)
2953  * can't grow regardless of the EFT definition. Although,
2954  * applications should not explicitly use these typedefs
2955  * they may be included via a system header definition.
2956  * WARNING: These typedefs may be removed in a future
2957  * release.
2958  *		ex. the definitions in s5inode.h (now obsoleted)
2959  *			remained small to preserve compatibility
2960  *			in the S5 file system type.
2961  */
2962 typedef ushort_t o_mode_t; /* old file attribute type */
2963 typedef short o_dev_t; /* old device type	*/
2964 typedef ushort_t o_uid_t; /* old UID type		*/
2965 typedef o_uid_t o_gid_t; /* old GID type		*/
2966 typedef short o_nlink_t; /* old file link type	*/
2967 typedef short o_pid_t; /* old process id type	*/
2968 typedef ushort_t o_ino_t; /* old inode type	*/
2969 
2970 
2971 /*
2972  * POSIX and XOPEN Declarations
2973  */
2974 typedef int key_t; /* IPC key type		*/
2975 
2976 
2977 
2978 typedef ulong_t mode_t; /* (historical version) */
2979 
2980 
2981 
2982 
2983 typedef unsigned int uid_t; /* UID type		*/
2984 
2985 
2986 typedef uid_t gid_t; /* GID type		*/
2987 
2988 typedef uint32_t datalink_id_t;
2989 typedef uint32_t vrid_t;
2990 
2991 typedef id_t taskid_t;
2992 typedef id_t projid_t;
2993 typedef id_t poolid_t;
2994 typedef id_t zoneid_t;
2995 typedef id_t ctid_t;
2996 
2997 /*
2998  * POSIX definitions are same as defined in thread.h and synch.h.
2999  * Any changes made to here should be reflected in corresponding
3000  * files as described in comments.
3001  */
3002 typedef uint_t pthread_t; /* = thread_t in thread.h */
3003 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
3004 
3005 /* "Magic numbers" tagging synchronization object types */
3006 
3007 
3008 
3009 
3010 
3011 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
3012  struct {
3013   uint16_t __pthread_mutex_flag1;
3014   uint8_t __pthread_mutex_flag2;
3015   uint8_t __pthread_mutex_ceiling;
3016   uint16_t __pthread_mutex_type;
3017   uint16_t __pthread_mutex_magic;
3018  } __pthread_mutex_flags;
3019  union {
3020   struct {
3021    uint8_t __pthread_mutex_pad[8];
3022   } __pthread_mutex_lock64;
3023   struct {
3024    uint32_t __pthread_ownerpid;
3025    uint32_t __pthread_lockword;
3026   } __pthread_mutex_lock32;
3027   upad64_t __pthread_mutex_owner64;
3028  } __pthread_mutex_lock;
3029  upad64_t __pthread_mutex_data;
3030 } pthread_mutex_t;
3031 
3032 typedef struct _pthread_cond { /* = cond_t in synch.h */
3033  struct {
3034   uint8_t __pthread_cond_flag[4];
3035   uint16_t __pthread_cond_type;
3036   uint16_t __pthread_cond_magic;
3037  } __pthread_cond_flags;
3038  upad64_t __pthread_cond_data;
3039 } pthread_cond_t;
3040 
3041 /*
3042  * UNIX 98 Extension
3043  */
3044 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
3045  int32_t __pthread_rwlock_readers;
3046  uint16_t __pthread_rwlock_type;
3047  uint16_t __pthread_rwlock_magic;
3048  pthread_mutex_t __pthread_rwlock_mutex;
3049  pthread_cond_t __pthread_rwlock_readercv;
3050  pthread_cond_t __pthread_rwlock_writercv;
3051 } pthread_rwlock_t;
3052 
3053 /*
3054  * SUSV3
3055  */
3056 typedef struct {
3057  uint32_t __pthread_barrier_count;
3058  uint32_t __pthread_barrier_current;
3059  upad64_t __pthread_barrier_cycle;
3060  upad64_t __pthread_barrier_reserved;
3061  pthread_mutex_t __pthread_barrier_lock;
3062  pthread_cond_t __pthread_barrier_cond;
3063 } pthread_barrier_t;
3064 
3065 typedef pthread_mutex_t pthread_spinlock_t;
3066 
3067 /*
3068  * attributes for threads, dynamically allocated by library
3069  */
3070 typedef struct _pthread_attr {
3071  void *__pthread_attrp;
3072 } pthread_attr_t;
3073 
3074 /*
3075  * attributes for mutex, dynamically allocated by library
3076  */
3077 typedef struct _pthread_mutexattr {
3078  void *__pthread_mutexattrp;
3079 } pthread_mutexattr_t;
3080 
3081 /*
3082  * attributes for cond, dynamically allocated by library
3083  */
3084 typedef struct _pthread_condattr {
3085  void *__pthread_condattrp;
3086 } pthread_condattr_t;
3087 
3088 /*
3089  * pthread_once
3090  */
3091 typedef struct _once {
3092  upad64_t __pthread_once_pad[4];
3093 } pthread_once_t;
3094 
3095 /*
3096  * UNIX 98 Extensions
3097  * attributes for rwlock, dynamically allocated by library
3098  */
3099 typedef struct _pthread_rwlockattr {
3100  void *__pthread_rwlockattrp;
3101 } pthread_rwlockattr_t;
3102 
3103 /*
3104  * SUSV3
3105  * attributes for pthread_barrier_t, dynamically allocated by library
3106  */
3107 typedef struct {
3108  void *__pthread_barrierattrp;
3109 } pthread_barrierattr_t;
3110 
3111 typedef ulong_t dev_t; /* expanded device type */
3112 
3113 
3114 
3115 
3116 
3117 typedef ulong_t nlink_t; /* (historical version) */
3118 typedef long pid_t; /* (historical version) */
3119 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3120 typedef long time_t; /* time of day in seconds */
3121 
3122 
3123 
3124 
3125 typedef long clock_t; /* relative time in a specified resolution */
3126 
3127 
3128 
3129 
3130 typedef int clockid_t; /* clock identifier type */
3131 
3132 
3133 
3134 
3135 typedef int timer_t; /* timer identifier type */
3136 
3137 
3138 
3139 
3140 /* BEGIN CSTYLED */
3141 typedef unsigned char unchar;
3142 typedef unsigned short ushort;
3143 typedef unsigned int uint;
3144 typedef unsigned long ulong;
3145 /* END CSTYLED */
3146 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3147 /*
3148  * The following is the value of type id_t to use to indicate the
3149  * caller's current id.  See procset.h for the type idtype_t
3150  * which defines which kind of id is being specified.
3151  */
3152 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3153 /*
3154  * The following value of type pfn_t is used to indicate
3155  * invalid page frame number.
3156  */
3157 
3158 
3159 
3160 /* BEGIN CSTYLED */
3161 typedef unsigned char u_char;
3162 typedef unsigned short u_short;
3163 typedef unsigned int u_int;
3164 typedef unsigned long u_long;
3165 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
3166 typedef quad_t quad; /* used by UFS */
3167 /* END CSTYLED */
3168 
3169 /*
3170  * Nested include for BSD/sockets source compatibility.
3171  * (The select macros used to be defined here).
3172  */
3173 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
3174 /*
3175  * CDDL HEADER START
3176  *
3177  * The contents of this file are subject to the terms of the
3178  * Common Development and Distribution License (the "License").
3179  * You may not use this file except in compliance with the License.
3180  *
3181  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3182  * or http://www.opensolaris.org/os/licensing.
3183  * See the License for the specific language governing permissions
3184  * and limitations under the License.
3185  *
3186  * When distributing Covered Code, include this CDDL HEADER in each
3187  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3188  * If applicable, add the following below this CDDL HEADER, with the
3189  * fields enclosed by brackets "[]" replaced with your own identifying
3190  * information: Portions Copyright [yyyy] [name of copyright owner]
3191  *
3192  * CDDL HEADER END
3193  */
3194 
3195 /*
3196  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3197  *
3198  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3199  *
3200  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3201  * Use is subject to license terms.
3202  */
3203 
3204 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3205 /*	  All Rights Reserved	*/
3206 
3207 /*
3208  * University Copyright- Copyright (c) 1982, 1986, 1988
3209  * The Regents of the University of California
3210  * All Rights Reserved
3211  *
3212  * University Acknowledgment- Portions of this document are derived from
3213  * software developed by the University of California, Berkeley, and its
3214  * contributors.
3215  */
3216 
3217 
3218 
3219 
3220 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3221 /*
3222  * CDDL HEADER START
3223  *
3224  * The contents of this file are subject to the terms of the
3225  * Common Development and Distribution License (the "License").
3226  * You may not use this file except in compliance with the License.
3227  *
3228  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3229  * or http://www.opensolaris.org/os/licensing.
3230  * See the License for the specific language governing permissions
3231  * and limitations under the License.
3232  *
3233  * When distributing Covered Code, include this CDDL HEADER in each
3234  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3235  * If applicable, add the following below this CDDL HEADER, with the
3236  * fields enclosed by brackets "[]" replaced with your own identifying
3237  * information: Portions Copyright [yyyy] [name of copyright owner]
3238  *
3239  * CDDL HEADER END
3240  */
3241 
3242 /*
3243  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3244  * Copyright 2016 Joyent, Inc.
3245  *
3246  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3247  * Use is subject to license terms.
3248  */
3249 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3250 
3251 
3252 
3253 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3254 /*
3255  * CDDL HEADER START
3256  *
3257  * The contents of this file are subject to the terms of the
3258  * Common Development and Distribution License, Version 1.0 only
3259  * (the "License").  You may not use this file except in compliance
3260  * with the License.
3261  *
3262  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3263  * or http://www.opensolaris.org/os/licensing.
3264  * See the License for the specific language governing permissions
3265  * and limitations under the License.
3266  *
3267  * When distributing Covered Code, include this CDDL HEADER in each
3268  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3269  * If applicable, add the following below this CDDL HEADER, with the
3270  * fields enclosed by brackets "[]" replaced with your own identifying
3271  * information: Portions Copyright [yyyy] [name of copyright owner]
3272  *
3273  * CDDL HEADER END
3274  */
3275 /*
3276  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3277  * Use is subject to license terms.
3278  */
3279 
3280 /*
3281  * Implementation-private.  This header should not be included
3282  * directly by an application.  The application should instead
3283  * include <time.h> which includes this header conditionally
3284  * depending on which feature test macros are defined. By default,
3285  * this header is included by <time.h>.  X/Open and POSIX
3286  * standards requirements result in this header being included
3287  * by <time.h> only under a restricted set of conditions.
3288  */
3289 
3290 
3291 
3292 
3293 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3294 /*
3295  * CDDL HEADER START
3296  *
3297  * The contents of this file are subject to the terms of the
3298  * Common Development and Distribution License (the "License").
3299  * You may not use this file except in compliance with the License.
3300  *
3301  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3302  * or http://www.opensolaris.org/os/licensing.
3303  * See the License for the specific language governing permissions
3304  * and limitations under the License.
3305  *
3306  * When distributing Covered Code, include this CDDL HEADER in each
3307  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3308  * If applicable, add the following below this CDDL HEADER, with the
3309  * fields enclosed by brackets "[]" replaced with your own identifying
3310  * information: Portions Copyright [yyyy] [name of copyright owner]
3311  *
3312  * CDDL HEADER END
3313  */
3314 
3315 /*
3316  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3317  * Copyright 2016 Joyent, Inc.
3318  *
3319  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3320  * Use is subject to license terms.
3321  */
3322 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
3323 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
3324 /*
3325  * Time expressed in seconds and nanoseconds
3326  */
3327 
3328 typedef struct timespec { /* definition per POSIX.4 */
3329  time_t tv_sec; /* seconds */
3330  long tv_nsec; /* and nanoseconds */
3331 } timespec_t;
3332 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
3333 typedef struct timespec timestruc_t; /* definition per SVr4 */
3334 
3335 /*
3336  * The following has been left in for backward compatibility. Portable
3337  * applications should not use the structure name timestruc.
3338  */
3339 
3340 
3341 
3342 
3343 
3344 /*
3345  * Timer specification
3346  */
3347 typedef struct itimerspec { /* definition per POSIX.4 */
3348  struct timespec it_interval; /* timer period */
3349  struct timespec it_value; /* timer expiration */
3350 } itimerspec_t;
3351 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3352 
3353 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
3354 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3355 /*	  All Rights Reserved  	*/
3356 
3357 
3358 /*
3359  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
3360  * All rights reserved.  The Berkeley software License Agreement
3361  * specifies the terms and conditions for redistribution.
3362  */
3363 
3364 /*
3365  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3366  *
3367  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3368  * Use is subject to license terms.
3369  *
3370  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3371  */
3372 
3373 /*
3374  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
3375  */
3376 
3377 
3378 
3379 
3380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3381 /*
3382  * CDDL HEADER START
3383  *
3384  * The contents of this file are subject to the terms of the
3385  * Common Development and Distribution License (the "License").
3386  * You may not use this file except in compliance with the License.
3387  *
3388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3389  * or http://www.opensolaris.org/os/licensing.
3390  * See the License for the specific language governing permissions
3391  * and limitations under the License.
3392  *
3393  * When distributing Covered Code, include this CDDL HEADER in each
3394  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3395  * If applicable, add the following below this CDDL HEADER, with the
3396  * fields enclosed by brackets "[]" replaced with your own identifying
3397  * information: Portions Copyright [yyyy] [name of copyright owner]
3398  *
3399  * CDDL HEADER END
3400  */
3401 
3402 /*
3403  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3404  * Copyright 2016 Joyent, Inc.
3405  *
3406  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3407  * Use is subject to license terms.
3408  */
3409 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3410 
3411 /*
3412  * Structure returned by gettimeofday(2) system call,
3413  * and used in other calls.
3414  */
3415 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3416 struct timeval {
3417  time_t tv_sec; /* seconds */
3418  suseconds_t tv_usec; /* and microseconds */
3419 };
3420 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3421 struct timezone {
3422  int tz_minuteswest; /* minutes west of Greenwich */
3423  int tz_dsttime; /* type of dst correction */
3424 };
3425 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3426 /*
3427  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
3428  * including <sys/select.h> which relies on the presense of the itimerval
3429  * structure.
3430  */
3431 
3432 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3433 /*
3434  * CDDL HEADER START
3435  *
3436  * The contents of this file are subject to the terms of the
3437  * Common Development and Distribution License (the "License").
3438  * You may not use this file except in compliance with the License.
3439  *
3440  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3441  * or http://www.opensolaris.org/os/licensing.
3442  * See the License for the specific language governing permissions
3443  * and limitations under the License.
3444  *
3445  * When distributing Covered Code, include this CDDL HEADER in each
3446  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3447  * If applicable, add the following below this CDDL HEADER, with the
3448  * fields enclosed by brackets "[]" replaced with your own identifying
3449  * information: Portions Copyright [yyyy] [name of copyright owner]
3450  *
3451  * CDDL HEADER END
3452  */
3453 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3454 /*	  All Rights Reserved  	*/
3455 
3456 
3457 /*
3458  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3459  * Use is subject to license terms.
3460  *
3461  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3462  * Copyright 2016 Joyent, Inc.
3463  */
3464 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3465 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3466 /*
3467  * Operations on timevals.
3468  */
3469 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3470 /*
3471  * Names of the interval timers, and structure
3472  * defining a timer setting.
3473  */
3474 
3475 
3476 
3477     /* time and when system is running on */
3478     /* behalf of the process. */
3479 
3480     /* time profiling of multithreaded */
3481     /* programs. */
3482 
3483 
3484 struct itimerval {
3485  struct timeval it_interval; /* timer interval */
3486  struct timeval it_value; /* current value */
3487 };
3488 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3489 /*
3490  *	Definitions for commonly used resolutions.
3491  */
3492 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3493 /*
3494  * Time expressed as a 64-bit nanosecond counter.
3495  */
3496 typedef longlong_t hrtime_t;
3497 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3498 int adjtime(struct timeval *, struct timeval *);
3499 
3500 
3501 
3502 
3503 int futimesat(int, const char *, const struct timeval *);
3504 
3505 
3506 
3507 
3508 
3509 int getitimer(int, struct itimerval *);
3510 int utimes(const char *, const struct timeval *);
3511 
3512 
3513 
3514 
3515 int setitimer(int, struct itimerval *,
3516  struct itimerval *);
3517 
3518 
3519 
3520 
3521 /*
3522  * gettimeofday() and settimeofday() were included in SVr4 due to their
3523  * common use in BSD based applications.  They were to be included exactly
3524  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
3525  * parameter was unused and deleted it, thereby making a routine included
3526  * for compatibility, incompatible.
3527  *
3528  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
3529  * parameters.
3530  *
3531  * This has caused general disagreement in the application community as to
3532  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
3533  * The flag _SVID_GETTOD may be used to force the SVID version.
3534  */
3535 
3536 
3537 
3538 
3539 
3540 int settimeofday(struct timeval *, void *);
3541 
3542 hrtime_t gethrtime(void);
3543 hrtime_t gethrvtime(void);
3544 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3545 int gettimeofday(struct timeval *, void *);
3546 
3547 
3548 
3549 
3550 /*
3551  * The inclusion of <time.h> is historical and was added for
3552  * backward compatibility in delta 1.2 when a number of definitions
3553  * were moved out of <sys/time.h>.  More recently, the timespec and
3554  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
3555  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
3556  * which is now included by <time.h>.  This change was due to POSIX
3557  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
3558  * non-X/Open applications, including this header will still make
3559  * visible these definitions.
3560  */
3561 
3562 
3563 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
3564 /*
3565  * CDDL HEADER START
3566  *
3567  * The contents of this file are subject to the terms of the
3568  * Common Development and Distribution License (the "License").
3569  * You may not use this file except in compliance with the License.
3570  *
3571  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3572  * or http://www.opensolaris.org/os/licensing.
3573  * See the License for the specific language governing permissions
3574  * and limitations under the License.
3575  *
3576  * When distributing Covered Code, include this CDDL HEADER in each
3577  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3578  * If applicable, add the following below this CDDL HEADER, with the
3579  * fields enclosed by brackets "[]" replaced with your own identifying
3580  * information: Portions Copyright [yyyy] [name of copyright owner]
3581  *
3582  * CDDL HEADER END
3583  */
3584 /*	Copyright (c) 1988 AT&T	*/
3585 /*	  All Rights Reserved  	*/
3586 
3587 
3588 /*
3589  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3590  *
3591  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3592  * Use is subject to license terms.
3593  */
3594 /*
3595  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
3596  * Copyright 2016 Joyent, Inc.
3597  */
3598 
3599 
3600 
3601 
3602 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3603 /*
3604  * CDDL HEADER START
3605  *
3606  * The contents of this file are subject to the terms of the
3607  * Common Development and Distribution License (the "License").
3608  * You may not use this file except in compliance with the License.
3609  *
3610  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3611  * or http://www.opensolaris.org/os/licensing.
3612  * See the License for the specific language governing permissions
3613  * and limitations under the License.
3614  *
3615  * When distributing Covered Code, include this CDDL HEADER in each
3616  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3617  * If applicable, add the following below this CDDL HEADER, with the
3618  * fields enclosed by brackets "[]" replaced with your own identifying
3619  * information: Portions Copyright [yyyy] [name of copyright owner]
3620  *
3621  * CDDL HEADER END
3622  */
3623 
3624 /*
3625  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3626  * Copyright 2016 Joyent, Inc.
3627  *
3628  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3629  * Use is subject to license terms.
3630  */
3631 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3632 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
3633 /*
3634  * CDDL HEADER START
3635  *
3636  * The contents of this file are subject to the terms of the
3637  * Common Development and Distribution License, Version 1.0 only
3638  * (the "License").  You may not use this file except in compliance
3639  * with the License.
3640  *
3641  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3642  * or http://www.opensolaris.org/os/licensing.
3643  * See the License for the specific language governing permissions
3644  * and limitations under the License.
3645  *
3646  * When distributing Covered Code, include this CDDL HEADER in each
3647  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3648  * If applicable, add the following below this CDDL HEADER, with the
3649  * fields enclosed by brackets "[]" replaced with your own identifying
3650  * information: Portions Copyright [yyyy] [name of copyright owner]
3651  *
3652  * CDDL HEADER END
3653  */
3654 /*	Copyright (c) 1988 AT&T	*/
3655 /*	  All Rights Reserved  	*/
3656 
3657 /*
3658  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3659  * Copyright 2014 PALO, Richard.
3660  *
3661  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3662  * Use is subject to license terms.
3663  */
3664 
3665 /*
3666  * An application should not include this header directly.  Instead it
3667  * should be included only through the inclusion of other Sun headers.
3668  *
3669  * The contents of this header is limited to identifiers specified in the
3670  * C Standard.  Any new identifiers specified in future amendments to the
3671  * C Standard must be placed in this header.  If these new identifiers
3672  * are required to also be in the C++ Standard "std" namespace, then for
3673  * anything other than macro definitions, corresponding "using" directives
3674  * must also be added to <time.h.h>.
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 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
3710 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
3711 /*
3712  * This file and its contents are supplied under the terms of the
3713  * Common Development and Distribution License ("CDDL"), version 1.0.
3714  * You may only use this file in accordance with the terms of version
3715  * 1.0 of the CDDL.
3716  *
3717  * A full copy of the text of the CDDL should have accompanied this
3718  * source.  A copy of the CDDL is also available via the Internet at
3719  * http://www.illumos.org/license/CDDL.
3720  */
3721 
3722 /*
3723  * Copyright 2014-2016 PALO, Richard.
3724  */
3725 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
3726 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
3727 struct tm { /* see ctime(3) */
3728  int tm_sec;
3729  int tm_min;
3730  int tm_hour;
3731  int tm_mday;
3732  int tm_mon;
3733  int tm_year;
3734  int tm_wday;
3735  int tm_yday;
3736  int tm_isdst;
3737 };
3738 
3739 
3740 extern char *asctime(const struct tm *);
3741 extern clock_t clock(void);
3742 extern char *ctime(const time_t *);
3743 extern double difftime(time_t, time_t);
3744 extern struct tm *gmtime(const time_t *);
3745 extern struct tm *localtime(const time_t *);
3746 extern time_t mktime(struct tm *);
3747 extern time_t time(time_t *);
3748 extern size_t strftime(char *, size_t, const char *,
3749  const struct tm *);
3750 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3751 /*
3752  * C11 requires sys/time_impl.h for the definition of the struct timespec.
3753  */
3754 
3755 
3756 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3757 /*
3758  * CDDL HEADER START
3759  *
3760  * The contents of this file are subject to the terms of the
3761  * Common Development and Distribution License (the "License").
3762  * You may not use this file except in compliance with the License.
3763  *
3764  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3765  * or http://www.opensolaris.org/os/licensing.
3766  * See the License for the specific language governing permissions
3767  * and limitations under the License.
3768  *
3769  * When distributing Covered Code, include this CDDL HEADER in each
3770  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3771  * If applicable, add the following below this CDDL HEADER, with the
3772  * fields enclosed by brackets "[]" replaced with your own identifying
3773  * information: Portions Copyright [yyyy] [name of copyright owner]
3774  *
3775  * CDDL HEADER END
3776  */
3777 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3778 /*	  All Rights Reserved  	*/
3779 
3780 
3781 /*
3782  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3783  * Use is subject to license terms.
3784  *
3785  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3786  * Copyright 2016 Joyent, Inc.
3787  */
3788 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3789 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3790 /*
3791  * CDDL HEADER START
3792  *
3793  * The contents of this file are subject to the terms of the
3794  * Common Development and Distribution License, Version 1.0 only
3795  * (the "License").  You may not use this file except in compliance
3796  * with the License.
3797  *
3798  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3799  * or http://www.opensolaris.org/os/licensing.
3800  * See the License for the specific language governing permissions
3801  * and limitations under the License.
3802  *
3803  * When distributing Covered Code, include this CDDL HEADER in each
3804  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3805  * If applicable, add the following below this CDDL HEADER, with the
3806  * fields enclosed by brackets "[]" replaced with your own identifying
3807  * information: Portions Copyright [yyyy] [name of copyright owner]
3808  *
3809  * CDDL HEADER END
3810  */
3811 /*
3812  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3813  * Use is subject to license terms.
3814  */
3815 
3816 /*
3817  * Implementation-private.  This header should not be included
3818  * directly by an application.  The application should instead
3819  * include <time.h> which includes this header conditionally
3820  * depending on which feature test macros are defined. By default,
3821  * this header is included by <time.h>.  X/Open and POSIX
3822  * standards requirements result in this header being included
3823  * by <time.h> only under a restricted set of conditions.
3824  */
3825 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3826 
3827 
3828 /*
3829  * Allow global visibility for symbols defined in
3830  * C++ "std" namespace in <iso/time_iso.h>.
3831  */
3832 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3833 extern struct tm *gmtime_r(const time_t *,
3834    struct tm *);
3835 extern struct tm *localtime_r(const time_t *,
3836    struct tm *);
3837 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3838 extern char *strptime(const char *, const char *,
3839   struct tm *);
3840 
3841 
3842 
3843 
3844 
3845 /*
3846  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3847  * definition of the sigevent structure.  Both require the inclusion
3848  * of <signal.h> and <time.h> when using the timer_create() function.
3849  * However, X/Open also specifies that the sigevent structure be defined
3850  * in <time.h> as described in the header <signal.h>.  This prevents
3851  * compiler warnings for applications that only include <time.h> and not
3852  * also <signal.h>.  The sigval union and the sigevent structure is
3853  * therefore defined both here and in <sys/siginfo.h> which gets included
3854  * via inclusion of <signal.h>.
3855  */
3856 
3857 
3858 union sigval {
3859  int sival_int; /* integer value */
3860  void *sival_ptr; /* pointer value */
3861 };
3862 
3863 
3864 
3865 
3866 struct sigevent {
3867  int sigev_notify; /* notification mode */
3868  int sigev_signo; /* signal number */
3869  union sigval sigev_value; /* signal value */
3870  void (*sigev_notify_function)(union sigval);
3871  pthread_attr_t *sigev_notify_attributes;
3872  int __sigev_pad2;
3873 };
3874 
3875 
3876 extern int clock_getres(clockid_t, struct timespec *);
3877 extern int clock_gettime(clockid_t, struct timespec *);
3878 extern int clock_settime(clockid_t, const struct timespec *);
3879 extern int timer_create(clockid_t, struct sigevent *,
3880   timer_t *);
3881 extern int timer_delete(timer_t);
3882 extern int timer_getoverrun(timer_t);
3883 extern int timer_gettime(timer_t, struct itimerspec *);
3884 extern int timer_settime(timer_t, int, const struct itimerspec *,
3885   struct itimerspec *);
3886 
3887 extern int nanosleep(const struct timespec *, struct timespec *);
3888 extern int clock_nanosleep(clockid_t, int,
3889  const struct timespec *, struct timespec *);
3890 
3891 
3892 
3893 
3894 
3895 
3896 extern void tzset(void);
3897 extern char *tzname[2];
3898 
3899 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3900 
3901 
3902 extern long _sysconf(int); /* System Private interface to sysconf() */
3903 
3904     /* 3 is _SC_CLK_TCK */
3905 
3906 
3907 
3908 
3909 
3910 extern long timezone;
3911 extern int daylight;
3912 
3913 
3914 
3915 
3916 
3917 
3918 extern time_t timegm(struct tm *);
3919 extern int cftime(char *, char *, const time_t *);
3920 extern int ascftime(char *, const char *, const struct tm *);
3921 extern long altzone;
3922 
3923 
3924 
3925 
3926 extern struct tm *getdate(const char *);
3927 
3928 
3929 
3930 
3931 
3932 extern int getdate_err;
3933 
3934 
3935 
3936 /*
3937  * ctime_r() & asctime_r() prototypes are defined here.
3938  */
3939 
3940 /*
3941  * Previous releases of Solaris, starting at 2.3, provided definitions of
3942  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3943  * functions, the final POSIX 1003.1c standard had a different number of
3944  * arguments and return values.
3945  *
3946  * The following segment of this header provides support for the standard
3947  * interfaces while supporting applications written under earlier
3948  * releases.  The application defines appropriate values of the feature
3949  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3950  * whether it was written to expect the Draft 6 or standard versions of
3951  * these interfaces, before including this header.  This header then
3952  * provides a mapping from the source version of the interface to an
3953  * appropriate binary interface.  Such mappings permit an application
3954  * to be built from libraries and objects which have mixed expectations
3955  * of the definitions of these functions.
3956  *
3957  * For applications using the Draft 6 definitions, the binary symbol is the
3958  * same as the source symbol, and no explicit mapping is needed.  For the
3959  * standard interface, the function func() is mapped to the binary symbol
3960  * _posix_func().  The preferred mechanism for the remapping is a compiler
3961  * #pragma.  If the compiler does not provide such a #pragma, the header file
3962  * defines a static function func() which calls the _posix_func() version;
3963  * this has to be done instead of #define since POSIX specifies that an
3964  * application can #undef the symbol and still be bound to the correct
3965  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3966  * #define in that case.
3967  *
3968  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3969  * only.  New applications/libraries should use the standard definitions.
3970  */
3971 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3972 extern char *asctime_r(const struct tm *, char *, int);
3973 extern char *ctime_r(const time_t *, char *, int);
3974 # 292 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3975 typedef struct _locale *locale_t;
3976 
3977 
3978 extern size_t strftime_l(char *, size_t,
3979  const char *, const struct tm *, locale_t);
3980 
3981 
3982 
3983 
3984 
3985 /*
3986  * Note, the C11 standard requires that all the various base values that are
3987  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3988  */
3989 
3990 
3991 extern int timespec_get(struct timespec *, int);
3992 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3993 
3994 
3995 /*
3996  * The inclusion of <sys/select.h> is needed for the FD_CLR,
3997  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
3998  * select() prototype defined in the XOpen specifications
3999  * beginning with XSH4v2.  Placement required after definition
4000  * for itimerval.
4001  */
4002 
4003 
4004 
4005 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
4006 /*
4007  * CDDL HEADER START
4008  *
4009  * The contents of this file are subject to the terms of the
4010  * Common Development and Distribution License (the "License").
4011  * You may not use this file except in compliance with the License.
4012  *
4013  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4014  * or http://www.opensolaris.org/os/licensing.
4015  * See the License for the specific language governing permissions
4016  * and limitations under the License.
4017  *
4018  * When distributing Covered Code, include this CDDL HEADER in each
4019  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4020  * If applicable, add the following below this CDDL HEADER, with the
4021  * fields enclosed by brackets "[]" replaced with your own identifying
4022  * information: Portions Copyright [yyyy] [name of copyright owner]
4023  *
4024  * CDDL HEADER END
4025  */
4026 
4027 /*
4028  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4029  *
4030  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4031  *
4032  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4033  * Use is subject to license terms.
4034  */
4035 
4036 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4037 /*	  All Rights Reserved	*/
4038 
4039 /*
4040  * University Copyright- Copyright (c) 1982, 1986, 1988
4041  * The Regents of the University of California
4042  * All Rights Reserved
4043  *
4044  * University Acknowledgment- Portions of this document are derived from
4045  * software developed by the University of California, Berkeley, and its
4046  * contributors.
4047  */
4048 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4049 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
4050 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4051 /*
4052  * The sigset_t type is defined in <sys/signal.h> and duplicated
4053  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
4054  * now allows the visibility of signal.h in this header, however
4055  * an order of inclusion problem occurs as a result of inclusion
4056  * of <sys/select.h> in <signal.h> under certain conditions.
4057  * Rather than include <sys/signal.h> here, we've duplicated
4058  * the sigset_t type instead. This type is required for the XPG6
4059  * introduced pselect() function also declared in this header.
4060  */
4061 
4062 
4063 typedef struct { /* signal set type */
4064  unsigned int __sigbits[4];
4065 } sigset_t;
4066 
4067 
4068 
4069 
4070 /*
4071  * Select uses bit masks of file descriptors in longs.
4072  * These macros manipulate such bit fields.
4073  * FD_SETSIZE may be defined by the user, but the default here
4074  * should be >= NOFILE (param.h).
4075  */
4076 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4077 typedef long fd_mask;
4078 
4079 typedef long fds_mask;
4080 
4081 /*
4082  *  The value of _NBBY needs to be consistant with the value
4083  *  of NBBY in <sys/param.h>.
4084  */
4085 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4086 typedef struct fd_set {
4087 
4088 
4089 
4090  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
4091 } fd_set;
4092 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4093 extern int select(int, fd_set *, fd_set *,
4094  fd_set *, struct timeval *);
4095 
4096 
4097 extern int pselect(int, fd_set *, fd_set *,
4098  fd_set *, const struct timespec *,
4099  const sigset_t *);
4100 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
4101 
4102 
4103 
4104 /*
4105  * _VOID was defined to be either void or char but this is not
4106  * required because previous SunOS compilers have accepted the void
4107  * type. However, because many system header and source files use the
4108  * void keyword, the volatile keyword, and ANSI C function prototypes,
4109  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
4110  * should therefore not be used and remains for source compatibility
4111  * only.
4112  */
4113 /* CSTYLED */
4114 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4115 
4116 
4117 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 1
4118 /*
4119  * CDDL HEADER START
4120  *
4121  * The contents of this file are subject to the terms of the
4122  * Common Development and Distribution License (the "License").
4123  * You may not use this file except in compliance with the License.
4124  *
4125  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4126  * or http://www.opensolaris.org/os/licensing.
4127  * See the License for the specific language governing permissions
4128  * and limitations under the License.
4129  *
4130  * When distributing Covered Code, include this CDDL HEADER in each
4131  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4132  * If applicable, add the following below this CDDL HEADER, with the
4133  * fields enclosed by brackets "[]" replaced with your own identifying
4134  * information: Portions Copyright [yyyy] [name of copyright owner]
4135  *
4136  * CDDL HEADER END
4137  */
4138 /*
4139  * Copyright 2014 Garrrett D'Amore <garrett@damore.org>
4140  *
4141  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4142  * Use is subject to license terms.
4143  */
4144 
4145 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4146 /*	  All Rights Reserved  	*/
4147 
4148 /*
4149  * University Copyright- Copyright (c) 1982, 1986, 1988
4150  * The Regents of the University of California
4151  * All Rights Reserved
4152  *
4153  * University Acknowledgment- Portions of this document are derived from
4154  * software developed by the University of California, Berkeley, and its
4155  * contributors.
4156  */
4157 
4158 
4159 
4160 
4161 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4162 /*
4163  * CDDL HEADER START
4164  *
4165  * The contents of this file are subject to the terms of the
4166  * Common Development and Distribution License (the "License").
4167  * You may not use this file except in compliance with the License.
4168  *
4169  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4170  * or http://www.opensolaris.org/os/licensing.
4171  * See the License for the specific language governing permissions
4172  * and limitations under the License.
4173  *
4174  * When distributing Covered Code, include this CDDL HEADER in each
4175  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4176  * If applicable, add the following below this CDDL HEADER, with the
4177  * fields enclosed by brackets "[]" replaced with your own identifying
4178  * information: Portions Copyright [yyyy] [name of copyright owner]
4179  *
4180  * CDDL HEADER END
4181  */
4182 
4183 /*
4184  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4185  * Copyright 2016 Joyent, Inc.
4186  *
4187  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4188  * Use is subject to license terms.
4189  */
4190 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4191 
4192 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4193 /*
4194  * CDDL HEADER START
4195  *
4196  * The contents of this file are subject to the terms of the
4197  * Common Development and Distribution License (the "License").
4198  * You may not use this file except in compliance with the License.
4199  *
4200  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4201  * or http://www.opensolaris.org/os/licensing.
4202  * See the License for the specific language governing permissions
4203  * and limitations under the License.
4204  *
4205  * When distributing Covered Code, include this CDDL HEADER in each
4206  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4207  * If applicable, add the following below this CDDL HEADER, with the
4208  * fields enclosed by brackets "[]" replaced with your own identifying
4209  * information: Portions Copyright [yyyy] [name of copyright owner]
4210  *
4211  * CDDL HEADER END
4212  */
4213 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4214 /*	  All Rights Reserved  	*/
4215 
4216 
4217 /*
4218  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4219  * Use is subject to license terms.
4220  *
4221  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4222  * Copyright 2016 Joyent, Inc.
4223  */
4224 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4225 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
4226 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4227 /*	  All Rights Reserved  	*/
4228 
4229 
4230 /*
4231  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
4232  * All rights reserved.  The Berkeley software License Agreement
4233  * specifies the terms and conditions for redistribution.
4234  */
4235 
4236 /*
4237  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4238  *
4239  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4240  * Use is subject to license terms.
4241  *
4242  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4243  */
4244 
4245 /*
4246  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
4247  */
4248 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4249 
4250 
4251 
4252 
4253 
4254 /*
4255  * Process priority specifications
4256  */
4257 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4258 /*
4259  * Resource limits
4260  */
4261 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4262 /*
4263  * The definitions of the following types and constants differ between the
4264  * regular and large file compilation environments.
4265  */
4266 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4267 typedef u_longlong_t rlim_t;
4268 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4269 struct rlimit {
4270  rlim_t rlim_cur; /* current limit */
4271  rlim_t rlim_max; /* maximum value for rlim_cur */
4272 };
4273 
4274 /* transitional large file interface versions */
4275 
4276 
4277 typedef u_longlong_t rlim64_t;
4278 
4279 
4280 
4281 
4282 
4283 struct rlimit64 {
4284  rlim64_t rlim_cur; /* current limit */
4285  rlim64_t rlim_max; /* maximum value for rlim_cur */
4286 };
4287 
4288 
4289 
4290 /*
4291  * Although the saved rlimits were initially introduced by the large file API,
4292  * they are now available for all resource limits on the 64-bit kernel and for
4293  * cpu time and file size limits on the 32-bit kernel.
4294  */
4295 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4296 struct rusage {
4297  struct timeval ru_utime; /* user time used */
4298  struct timeval ru_stime; /* system time used */
4299  long ru_maxrss; /* <unimp> */
4300  long ru_ixrss; /* <unimp> */
4301  long ru_idrss; /* <unimp> */
4302  long ru_isrss; /* <unimp> */
4303  long ru_minflt; /* any page faults not requiring I/O */
4304  long ru_majflt; /* any page faults requiring I/O */
4305  long ru_nswap; /* swaps */
4306  long ru_inblock; /* block input operations */
4307  long ru_oublock; /* block output operations */
4308  long ru_msgsnd; /* streams messsages sent */
4309  long ru_msgrcv; /* streams messages received */
4310  long ru_nsignals; /* signals received */
4311  long ru_nvcsw; /* voluntary context switches */
4312  long ru_nivcsw; /* involuntary " */
4313 };
4314 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4315 /*
4316  * large file compilation environment setup
4317  */
4318 
4319 
4320 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4321 #pragma redefine_extname setrlimit setrlimit64
4322 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4323 
4324 
4325 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4326 #pragma redefine_extname getrlimit getrlimit64
4327 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4328 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4329 extern int setrlimit(int, const struct rlimit *);
4330 extern int getrlimit(int, struct rlimit *);
4331 
4332 /* transitional large file interfaces */
4333 
4334 
4335 extern int setrlimit64(int, const struct rlimit64 *);
4336 extern int getrlimit64(int, struct rlimit64 *);
4337 
4338 
4339 extern int getpriority(int, id_t);
4340 extern int setpriority(int, id_t, int);
4341 extern int getrusage(int, struct rusage *);
4342 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4343 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4344 /*
4345  * CDDL HEADER START
4346  *
4347  * The contents of this file are subject to the terms of the
4348  * Common Development and Distribution License, Version 1.0 only
4349  * (the "License").  You may not use this file except in compliance
4350  * with the License.
4351  *
4352  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4353  * or http://www.opensolaris.org/os/licensing.
4354  * See the License for the specific language governing permissions
4355  * and limitations under the License.
4356  *
4357  * When distributing Covered Code, include this CDDL HEADER in each
4358  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4359  * If applicable, add the following below this CDDL HEADER, with the
4360  * fields enclosed by brackets "[]" replaced with your own identifying
4361  * information: Portions Copyright [yyyy] [name of copyright owner]
4362  *
4363  * CDDL HEADER END
4364  */
4365 /*
4366  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4367  * Use is subject to license terms.
4368  */
4369 
4370 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4371 /*	  All Rights Reserved  	*/
4372 
4373 
4374 
4375 
4376 #pragma ident "%Z%%M%	%I%	%E% SMI"
4377 
4378 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4379 /*
4380  * CDDL HEADER START
4381  *
4382  * The contents of this file are subject to the terms of the
4383  * Common Development and Distribution License (the "License").
4384  * You may not use this file except in compliance with the License.
4385  *
4386  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4387  * or http://www.opensolaris.org/os/licensing.
4388  * See the License for the specific language governing permissions
4389  * and limitations under the License.
4390  *
4391  * When distributing Covered Code, include this CDDL HEADER in each
4392  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4393  * If applicable, add the following below this CDDL HEADER, with the
4394  * fields enclosed by brackets "[]" replaced with your own identifying
4395  * information: Portions Copyright [yyyy] [name of copyright owner]
4396  *
4397  * CDDL HEADER END
4398  */
4399 
4400 /*
4401  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4402  * Copyright 2016 Joyent, Inc.
4403  *
4404  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4405  * Use is subject to license terms.
4406  */
4407 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4408 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4409 /*
4410  * CDDL HEADER START
4411  *
4412  * The contents of this file are subject to the terms of the
4413  * Common Development and Distribution License (the "License").
4414  * You may not use this file except in compliance with the License.
4415  *
4416  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4417  * or http://www.opensolaris.org/os/licensing.
4418  * See the License for the specific language governing permissions
4419  * and limitations under the License.
4420  *
4421  * When distributing Covered Code, include this CDDL HEADER in each
4422  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4423  * If applicable, add the following below this CDDL HEADER, with the
4424  * fields enclosed by brackets "[]" replaced with your own identifying
4425  * information: Portions Copyright [yyyy] [name of copyright owner]
4426  *
4427  * CDDL HEADER END
4428  */
4429 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4430 /*	  All Rights Reserved  	*/
4431 
4432 
4433 /*
4434  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4435  * Use is subject to license terms.
4436  *
4437  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4438  * Copyright 2016 Joyent, Inc.
4439  */
4440 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4441 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4442 /*
4443  * The union sigval is also defined in <time.h> as per X/Open and
4444  * POSIX requirements.
4445  */
4446 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4447 /*
4448  * The sigevent structure is also defined in <time.h> as per X/Open and
4449  * POSIX requirements.
4450  */
4451 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4452 /* values of sigev_notify */
4453 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4454 /*
4455  * negative signal codes are reserved for future use for user generated
4456  * signals
4457  */
4458 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4459 /*
4460  * Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
4461  * SIGBUS) from <sys/machsig.h>
4462  */
4463 
4464 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 1
4465 /*
4466  * CDDL HEADER START
4467  *
4468  * The contents of this file are subject to the terms of the
4469  * Common Development and Distribution License, Version 1.0 only
4470  * (the "License").  You may not use this file except in compliance
4471  * with the License.
4472  *
4473  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4474  * or http://www.opensolaris.org/os/licensing.
4475  * See the License for the specific language governing permissions
4476  * and limitations under the License.
4477  *
4478  * When distributing Covered Code, include this CDDL HEADER in each
4479  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4480  * If applicable, add the following below this CDDL HEADER, with the
4481  * fields enclosed by brackets "[]" replaced with your own identifying
4482  * information: Portions Copyright [yyyy] [name of copyright owner]
4483  *
4484  * CDDL HEADER END
4485  */
4486 /*
4487  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
4488  * Use is subject to license terms.
4489  */
4490 
4491 /*	Copyright (c) 1988 AT&T	*/
4492 /*	  All Rights Reserved  	*/
4493 
4494 
4495 
4496 
4497 
4498 #pragma ident "%Z%%M%	%I%	%E% SMI"
4499 
4500 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4501 /*
4502  * CDDL HEADER START
4503  *
4504  * The contents of this file are subject to the terms of the
4505  * Common Development and Distribution License (the "License").
4506  * You may not use this file except in compliance with the License.
4507  *
4508  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4509  * or http://www.opensolaris.org/os/licensing.
4510  * See the License for the specific language governing permissions
4511  * and limitations under the License.
4512  *
4513  * When distributing Covered Code, include this CDDL HEADER in each
4514  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4515  * If applicable, add the following below this CDDL HEADER, with the
4516  * fields enclosed by brackets "[]" replaced with your own identifying
4517  * information: Portions Copyright [yyyy] [name of copyright owner]
4518  *
4519  * CDDL HEADER END
4520  */
4521 
4522 /*
4523  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4524  * Copyright 2016 Joyent, Inc.
4525  *
4526  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4527  * Use is subject to license terms.
4528  */
4529 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
4530 
4531 
4532 
4533 
4534 
4535 /*
4536  * machsig.h is the machine dependent portion of siginfo.h (and is
4537  * included by siginfo.h). A version of machsig.h should exist for
4538  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
4539  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
4540  * SIGPOLL are architecture independent and may be found in siginfo.h.
4541  */
4542 
4543 
4544 
4545 
4546 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h" 1
4547 /*
4548  * CDDL HEADER START
4549  *
4550  * The contents of this file are subject to the terms of the
4551  * Common Development and Distribution License (the "License").
4552  * You may not use this file except in compliance with the License.
4553  *
4554  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4555  * or http://www.opensolaris.org/os/licensing.
4556  * See the License for the specific language governing permissions
4557  * and limitations under the License.
4558  *
4559  * When distributing Covered Code, include this CDDL HEADER in each
4560  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4561  * If applicable, add the following below this CDDL HEADER, with the
4562  * fields enclosed by brackets "[]" replaced with your own identifying
4563  * information: Portions Copyright [yyyy] [name of copyright owner]
4564  *
4565  * CDDL HEADER END
4566  */
4567 /*
4568  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4569  * Use is subject to license terms.
4570  */
4571 
4572 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4573 /*	  All Rights Reserved  	*/
4574 
4575 /*
4576  * University Copyright- Copyright (c) 1982, 1986, 1988
4577  * The Regents of the University of California
4578  * All Rights Reserved
4579  *
4580  * University Acknowledgment- Portions of this document are derived from
4581  * software developed by the University of California, Berkeley, and its
4582  * contributors.
4583  */
4584 
4585 
4586 
4587 
4588 #pragma ident "%Z%%M%	%I%	%E% SMI"
4589 
4590 
4591 
4592 
4593 
4594 /*
4595  * This file describes the data type returned by vm routines
4596  * which handle faults.
4597  *
4598  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
4599  * returned by the underlying object mapped at the fault address.
4600  */
4601 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h"
4602 typedef int faultcode_t; /* type returned by vm fault routines */
4603 
4604 extern int fc_decode(faultcode_t);
4605 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
4606 
4607 
4608 /*
4609  * SIGILL signal codes
4610  */
4611 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
4612 /*
4613  * SIGEMT signal codes
4614  */
4615 
4616 
4617 
4618 
4619 
4620 
4621 /*
4622  * SIGFPE signal codes
4623  */
4624 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
4625 /*
4626  * SIGSEGV signal codes
4627  */
4628 
4629 
4630 
4631 
4632 
4633 
4634 
4635 /*
4636  * SIGBUS signal codes
4637  */
4638 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4639 
4640 /*
4641  * SIGTRAP signal codes
4642  */
4643 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4644 /*
4645  * SIGCLD signal codes
4646  */
4647 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4648 /*
4649  * SIGPOLL signal codes
4650  */
4651 # 195 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4652 /*
4653  * SIGPROF signal codes
4654  */
4655 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4656 /*
4657  * Inclusion of <sys/time_impl.h> is needed for the declaration of
4658  * timestruc_t.  However, since inclusion of <sys/time_impl.h> results
4659  * in X/Open and POSIX namespace pollution, the definition for
4660  * timestruct_t has been duplicated in a standards namespace safe header
4661  * <sys/time_std_impl.h>.  In <sys/time_std_impl.h>, the structure
4662  * name, tag, and member names, as well as the type itself, all have
4663  * leading underscores to protect namespace.
4664  */
4665 
4666 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4667 /*
4668  * CDDL HEADER START
4669  *
4670  * The contents of this file are subject to the terms of the
4671  * Common Development and Distribution License, Version 1.0 only
4672  * (the "License").  You may not use this file except in compliance
4673  * with the License.
4674  *
4675  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4676  * or http://www.opensolaris.org/os/licensing.
4677  * See the License for the specific language governing permissions
4678  * and limitations under the License.
4679  *
4680  * When distributing Covered Code, include this CDDL HEADER in each
4681  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4682  * If applicable, add the following below this CDDL HEADER, with the
4683  * fields enclosed by brackets "[]" replaced with your own identifying
4684  * information: Portions Copyright [yyyy] [name of copyright owner]
4685  *
4686  * CDDL HEADER END
4687  */
4688 /*
4689  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4690  * Use is subject to license terms.
4691  */
4692 
4693 /*
4694  * Implementation-private.  This header should not be included
4695  * directly by an application.  The application should instead
4696  * include <time.h> which includes this header conditionally
4697  * depending on which feature test macros are defined. By default,
4698  * this header is included by <time.h>.  X/Open and POSIX
4699  * standards requirements result in this header being included
4700  * by <time.h> only under a restricted set of conditions.
4701  */
4702 # 226 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4703 
4704 
4705 
4706 
4707 /*
4708  * The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
4709  * Placement here is due to a dependency in <sys/select.h> which is included
4710  * by <sys/types.h> for the sigevent structure.  Hence this inclusion must
4711  * follow that definition.
4712  */
4713 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4714 /*
4715  * CDDL HEADER START
4716  *
4717  * The contents of this file are subject to the terms of the
4718  * Common Development and Distribution License (the "License").
4719  * You may not use this file except in compliance with the License.
4720  *
4721  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4722  * or http://www.opensolaris.org/os/licensing.
4723  * See the License for the specific language governing permissions
4724  * and limitations under the License.
4725  *
4726  * When distributing Covered Code, include this CDDL HEADER in each
4727  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4728  * If applicable, add the following below this CDDL HEADER, with the
4729  * fields enclosed by brackets "[]" replaced with your own identifying
4730  * information: Portions Copyright [yyyy] [name of copyright owner]
4731  *
4732  * CDDL HEADER END
4733  */
4734 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4735 /*	  All Rights Reserved  	*/
4736 
4737 
4738 /*
4739  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4740  * Use is subject to license terms.
4741  *
4742  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4743  * Copyright 2016 Joyent, Inc.
4744  */
4745 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4746 
4747 
4748 typedef struct siginfo { /* pollutes POSIX/XOPEN namespace */
4749 
4750 
4751 
4752  int si_signo; /* signal from signal.h	*/
4753  int si_code; /* code from above	*/
4754  int si_errno; /* error from errno.h	*/
4755 
4756 
4757 
4758  union {
4759 
4760   int __pad[((128 / sizeof (int)) - 3)]; /* for future growth	*/
4761 
4762   struct { /* kill(), SIGCLD, siqqueue() */
4763    pid_t __pid; /* process ID		*/
4764    union {
4765     struct {
4766      uid_t __uid;
4767 
4768 
4769      union sigval __value;
4770 
4771 
4772 
4773     } __kill;
4774     struct {
4775      clock_t __utime;
4776      int __status;
4777      clock_t __stime;
4778     } __cld;
4779    } __pdata;
4780    ctid_t __ctid; /* contract ID		*/
4781    zoneid_t __zoneid; /* zone ID		*/
4782   } __proc;
4783 
4784   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
4785    void *__addr; /* faulting address	*/
4786    int __trapno; /* illegal trap number	*/
4787    caddr_t __pc; /* instruction address	*/
4788   } __fault;
4789 
4790   struct { /* SIGPOLL, SIGXFSZ	*/
4791   /* fd not currently available for SIGPOLL */
4792    int __fd; /* file descriptor	*/
4793    long __band;
4794   } __file;
4795 
4796   struct { /* SIGPROF */
4797    caddr_t __faddr; /* last fault address	*/
4798 
4799    timestruc_t __tstamp; /* real time stamp	*/
4800 
4801 
4802 
4803    short __syscall; /* current syscall	*/
4804    char __nsysarg; /* number of arguments	*/
4805    char __fault; /* last fault type	*/
4806    long __sysarg[8]; /* syscall arguments	*/
4807    int __mstate[10]; /* see <sys/msacct.h>	*/
4808   } __prof;
4809 
4810   struct { /* SI_RCTL */
4811    int32_t __entity; /* type of entity exceeding */
4812   } __rctl;
4813  } __data;
4814 
4815 } siginfo_t;
4816 # 374 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4817 /*
4818  * XXX -- internal version is identical to siginfo_t but without the padding.
4819  * This must be maintained in sync with it.
4820  */
4821 
4822 
4823 
4824 typedef struct k_siginfo {
4825  int si_signo; /* signal from signal.h	*/
4826  int si_code; /* code from above	*/
4827  int si_errno; /* error from errno.h	*/
4828 
4829 
4830 
4831  union {
4832   struct { /* kill(), SIGCLD, siqqueue() */
4833    pid_t __pid; /* process ID		*/
4834    union {
4835     struct {
4836      uid_t __uid;
4837      union sigval __value;
4838     } __kill;
4839     struct {
4840      clock_t __utime;
4841      int __status;
4842      clock_t __stime;
4843     } __cld;
4844    } __pdata;
4845    ctid_t __ctid; /* contract ID		*/
4846    zoneid_t __zoneid; /* zone ID		*/
4847   } __proc;
4848 
4849   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
4850    void *__addr; /* faulting address	*/
4851    int __trapno; /* illegal trap number	*/
4852    caddr_t __pc; /* instruction address	*/
4853   } __fault;
4854 
4855   struct { /* SIGPOLL, SIGXFSZ	*/
4856   /* fd not currently available for SIGPOLL */
4857    int __fd; /* file descriptor	*/
4858    long __band;
4859   } __file;
4860 
4861   struct { /* SIGPROF */
4862    caddr_t __faddr; /* last fault address	*/
4863 
4864 
4865    timestruc_t __tstamp; /* real time stamp	*/
4866 
4867 
4868 
4869    short __syscall; /* current syscall	*/
4870    char __nsysarg; /* number of arguments	*/
4871    char __fault; /* last fault type	*/
4872    /* these are omitted to keep k_siginfo_t small	*/
4873    /* long	__sysarg[8]; */
4874    /* int	__mstate[10]; */
4875   } __prof;
4876 
4877   struct { /* SI_RCTL */
4878    int32_t __entity; /* type of entity exceeding */
4879   } __rctl;
4880 
4881  } __data;
4882 
4883 } k_siginfo_t;
4884 
4885 typedef struct sigqueue {
4886  struct sigqueue *sq_next;
4887  k_siginfo_t sq_info;
4888  void (*sq_func)(struct sigqueue *); /* destructor function */
4889  void *sq_backptr; /* pointer to the data structure */
4890      /* associated by sq_func()	*/
4891  int sq_external; /* comes from outside the contract */
4892 } sigqueue_t;
4893 
4894 /*  indication whether to queue the signal or not */
4895 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4896 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
4897 /*
4898  * CDDL HEADER START
4899  *
4900  * The contents of this file are subject to the terms of the
4901  * Common Development and Distribution License, Version 1.0 only
4902  * (the "License").  You may not use this file except in compliance
4903  * with the License.
4904  *
4905  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4906  * or http://www.opensolaris.org/os/licensing.
4907  * See the License for the specific language governing permissions
4908  * and limitations under the License.
4909  *
4910  * When distributing Covered Code, include this CDDL HEADER in each
4911  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4912  * If applicable, add the following below this CDDL HEADER, with the
4913  * fields enclosed by brackets "[]" replaced with your own identifying
4914  * information: Portions Copyright [yyyy] [name of copyright owner]
4915  *
4916  * CDDL HEADER END
4917  */
4918 /*
4919  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4920  * Use is subject to license terms.
4921  */
4922 
4923 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4924 /*	  All Rights Reserved  	*/
4925 
4926 
4927 
4928 
4929 
4930 #pragma ident "%Z%%M%	%I%	%E% SMI"
4931 
4932 
4933 
4934 
4935 
4936 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4937 /*
4938  * CDDL HEADER START
4939  *
4940  * The contents of this file are subject to the terms of the
4941  * Common Development and Distribution License (the "License").
4942  * You may not use this file except in compliance with the License.
4943  *
4944  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4945  * or http://www.opensolaris.org/os/licensing.
4946  * See the License for the specific language governing permissions
4947  * and limitations under the License.
4948  *
4949  * When distributing Covered Code, include this CDDL HEADER in each
4950  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4951  * If applicable, add the following below this CDDL HEADER, with the
4952  * fields enclosed by brackets "[]" replaced with your own identifying
4953  * information: Portions Copyright [yyyy] [name of copyright owner]
4954  *
4955  * CDDL HEADER END
4956  */
4957 
4958 /*
4959  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4960  * Copyright 2016 Joyent, Inc.
4961  *
4962  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4963  * Use is subject to license terms.
4964  */
4965 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4966 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4967 /*
4968  * CDDL HEADER START
4969  *
4970  * The contents of this file are subject to the terms of the
4971  * Common Development and Distribution License (the "License").
4972  * You may not use this file except in compliance with the License.
4973  *
4974  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4975  * or http://www.opensolaris.org/os/licensing.
4976  * See the License for the specific language governing permissions
4977  * and limitations under the License.
4978  *
4979  * When distributing Covered Code, include this CDDL HEADER in each
4980  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4981  * If applicable, add the following below this CDDL HEADER, with the
4982  * fields enclosed by brackets "[]" replaced with your own identifying
4983  * information: Portions Copyright [yyyy] [name of copyright owner]
4984  *
4985  * CDDL HEADER END
4986  */
4987 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4988 /*	  All Rights Reserved  	*/
4989 
4990 
4991 /*
4992  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4993  * Use is subject to license terms.
4994  *
4995  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4996  * Copyright 2016 Joyent, Inc.
4997  */
4998 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4999 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
5000 /*
5001  * CDDL HEADER START
5002  *
5003  * The contents of this file are subject to the terms of the
5004  * Common Development and Distribution License (the "License").
5005  * You may not use this file except in compliance with the License.
5006  *
5007  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5008  * or http://www.opensolaris.org/os/licensing.
5009  * See the License for the specific language governing permissions
5010  * and limitations under the License.
5011  *
5012  * When distributing Covered Code, include this CDDL HEADER in each
5013  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5014  * If applicable, add the following below this CDDL HEADER, with the
5015  * fields enclosed by brackets "[]" replaced with your own identifying
5016  * information: Portions Copyright [yyyy] [name of copyright owner]
5017  *
5018  * CDDL HEADER END
5019  */
5020 
5021 /*
5022  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
5023  * Use is subject to license terms.
5024  */
5025 
5026 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5027 /*	  All Rights Reserved  	*/
5028 
5029 /*
5030  * University Copyright- Copyright (c) 1982, 1986, 1988
5031  * The Regents of the University of California
5032  * All Rights Reserved
5033  *
5034  * University Acknowledgment- Portions of this document are derived from
5035  * software developed by the University of California, Berkeley, and its
5036  * contributors.
5037  */
5038 
5039 
5040 
5041 
5042 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5043 /*
5044  * CDDL HEADER START
5045  *
5046  * The contents of this file are subject to the terms of the
5047  * Common Development and Distribution License (the "License").
5048  * You may not use this file except in compliance with the License.
5049  *
5050  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5051  * or http://www.opensolaris.org/os/licensing.
5052  * See the License for the specific language governing permissions
5053  * and limitations under the License.
5054  *
5055  * When distributing Covered Code, include this CDDL HEADER in each
5056  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5057  * If applicable, add the following below this CDDL HEADER, with the
5058  * fields enclosed by brackets "[]" replaced with your own identifying
5059  * information: Portions Copyright [yyyy] [name of copyright owner]
5060  *
5061  * CDDL HEADER END
5062  */
5063 
5064 /*
5065  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5066  * Copyright 2016 Joyent, Inc.
5067  *
5068  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5069  * Use is subject to license terms.
5070  */
5071 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
5072 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
5073 /*
5074  * CDDL HEADER START
5075  *
5076  * The contents of this file are subject to the terms of the
5077  * Common Development and Distribution License (the "License").
5078  * You may not use this file except in compliance with the License.
5079  *
5080  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5081  * or http://www.opensolaris.org/os/licensing.
5082  * See the License for the specific language governing permissions
5083  * and limitations under the License.
5084  *
5085  * When distributing Covered Code, include this CDDL HEADER in each
5086  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5087  * If applicable, add the following below this CDDL HEADER, with the
5088  * fields enclosed by brackets "[]" replaced with your own identifying
5089  * information: Portions Copyright [yyyy] [name of copyright owner]
5090  *
5091  * CDDL HEADER END
5092  */
5093 
5094 /*
5095  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
5096  * Use is subject to license terms.
5097  */
5098 
5099 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5100 /*	  All Rights Reserved  	*/
5101 
5102 /*
5103  * An application should not include this header directly.  Instead it
5104  * should be included only through the inclusion of other Sun headers.
5105  *
5106  * The contents of this header is limited to identifiers specified in the
5107  * C Standard.  Any new identifiers specified in future amendments to the
5108  * C Standard must be placed in this header.  If these new identifiers
5109  * are required to also be in the C++ Standard "std" namespace, then for
5110  * anything other than macro definitions, corresponding "using" directives
5111  * must also be added to <sys/signal.h.h>.
5112  */
5113 
5114 
5115 
5116 
5117 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
5118 /*
5119  * CDDL HEADER START
5120  *
5121  * The contents of this file are subject to the terms of the
5122  * Common Development and Distribution License (the "License").
5123  * You may not use this file except in compliance with the License.
5124  *
5125  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5126  * or http://www.opensolaris.org/os/licensing.
5127  * See the License for the specific language governing permissions
5128  * and limitations under the License.
5129  *
5130  * When distributing Covered Code, include this CDDL HEADER in each
5131  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5132  * If applicable, add the following below this CDDL HEADER, with the
5133  * fields enclosed by brackets "[]" replaced with your own identifying
5134  * information: Portions Copyright [yyyy] [name of copyright owner]
5135  *
5136  * CDDL HEADER END
5137  */
5138 
5139 /*
5140  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
5141  *	  All Rights Reserved
5142  *
5143  */
5144 
5145 /*
5146  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5147  * Use is subject to license terms.
5148  */
5149 
5150 /*
5151  * WARNING: This is an implementation-specific header,
5152  * its contents are not guaranteed. Applications
5153  * should include <unistd.h> and not this header.
5154  */
5155 
5156 
5157 
5158 
5159 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5160 /*
5161  * CDDL HEADER START
5162  *
5163  * The contents of this file are subject to the terms of the
5164  * Common Development and Distribution License (the "License").
5165  * You may not use this file except in compliance with the License.
5166  *
5167  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5168  * or http://www.opensolaris.org/os/licensing.
5169  * See the License for the specific language governing permissions
5170  * and limitations under the License.
5171  *
5172  * When distributing Covered Code, include this CDDL HEADER in each
5173  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5174  * If applicable, add the following below this CDDL HEADER, with the
5175  * fields enclosed by brackets "[]" replaced with your own identifying
5176  * information: Portions Copyright [yyyy] [name of copyright owner]
5177  *
5178  * CDDL HEADER END
5179  */
5180 
5181 /*
5182  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5183  * Copyright 2016 Joyent, Inc.
5184  *
5185  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5186  * Use is subject to license terms.
5187  */
5188 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
5189 
5190 
5191 
5192 
5193 
5194 /* command names for confstr */
5195 
5196 
5197 
5198 /*
5199  * command names for large file configuration information
5200  */
5201 /* large file compilation environment configuration */
5202 
5203 
5204 
5205 
5206 /* transitional large file interface configuration */
5207 
5208 
5209 
5210 
5211 
5212 /* UNIX 98 */
5213 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5214 /* UNIX 03 */
5215 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5216 /* command names for POSIX sysconf */
5217 
5218 /* POSIX.1 names */
5219 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5220 /* SVR4 names */
5221 
5222 
5223 
5224 
5225 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
5226 
5227 
5228 
5229 
5230 /* POSIX.4 names */
5231 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5232 /* XPG4 names */
5233 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5234 /* additional XSH4/XCU4 command names for sysconf */
5235 
5236 
5237 
5238 /* additional XPG4v2 (UNIX 95) command names */
5239 
5240 
5241 
5242 
5243 
5244 /* defined for XTI (XNS Issue 5) */
5245 
5246 
5247 
5248 
5249 
5250 
5251 
5252 /*
5253  * Hardware specific items
5254  * Note that not all items are supported on all architectures
5255  */
5256 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5257 /*
5258  * POSIX.1c (pthreads) names. These values are defined above
5259  * the sub-500 range. See psarc case 1995/257.
5260  */
5261 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5262 /* UNIX 98 */
5263 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5264 /* UNIX 03 */
5265 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5266 /* command names for POSIX pathconf */
5267 
5268 /* POSIX.1 names */
5269 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5270 /* POSIX.4 names */
5271 
5272 
5273 
5274 /* UNIX 03 names */
5275 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5276 /* UNIX 08 names */
5277 
5278 
5279 /*
5280  * Large File Summit names
5281  *
5282  * This value matches the MIPS ABI choice, but leaves a large gap in the
5283  * value space.
5284  */
5285 
5286 
5287 /*
5288  * Extended attributes
5289  */
5290 
5291 
5292 
5293 /*
5294  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
5295  */
5296 
5297 
5298 /*
5299  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
5300  */
5301 
5302 
5303 
5304 /*
5305  * The value of 0 is returned when
5306  * ACL's are not supported
5307  */
5308 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5309 /*
5310  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
5311  * should not rely on this value, it has been aligned with the current
5312  * standard to avoid confusion if used.
5313  */
5314 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5315 /* UNIX 03 names */
5316 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 2
5317 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h"
5318 /* insert new signals here, and move _SIGRTM* appropriately */
5319 
5320 
5321 extern long _sysconf(int); /* System Private interface to sysconf() */
5322 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
5323 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
5324 /*
5325  * We need <sys/siginfo.h> for the declaration of siginfo_t.
5326  */
5327 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
5328 /*
5329  * CDDL HEADER START
5330  *
5331  * The contents of this file are subject to the terms of the
5332  * Common Development and Distribution License, Version 1.0 only
5333  * (the "License").  You may not use this file except in compliance
5334  * with the License.
5335  *
5336  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5337  * or http://www.opensolaris.org/os/licensing.
5338  * See the License for the specific language governing permissions
5339  * and limitations under the License.
5340  *
5341  * When distributing Covered Code, include this CDDL HEADER in each
5342  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5343  * If applicable, add the following below this CDDL HEADER, with the
5344  * fields enclosed by brackets "[]" replaced with your own identifying
5345  * information: Portions Copyright [yyyy] [name of copyright owner]
5346  *
5347  * CDDL HEADER END
5348  */
5349 /*
5350  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5351  * Use is subject to license terms.
5352  */
5353 
5354 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5355 /*	  All Rights Reserved  	*/
5356 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
5357 
5358 
5359 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements */
5360 
5361 
5362 
5363 
5364 
5365 
5366 
5367 typedef struct {
5368  unsigned int __sigbits[3];
5369 } k_sigset_t;
5370 
5371 /*
5372  * The signal handler routine can have either one or three arguments.
5373  * Existing C code has used either form so not specifing the arguments
5374  * neatly finesses the problem.  C++ doesn't accept this.  To C++
5375  * "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
5376  * specify this as "(*sa_handler)(void)").  One or the other form must be
5377  * used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
5378  * the SIG_* defines to work.  "(*sa_sigaction)(int, siginfo_t *, void *)"
5379  * can be used for the three argument form.
5380  */
5381 
5382 /*
5383  * Note: storage overlap by sa_handler and sa_sigaction
5384  */
5385 struct sigaction {
5386  int sa_flags;
5387  union {
5388 
5389 
5390 
5391   void (*_handler)();
5392 
5393 
5394 
5395 
5396   void (*_sigaction)(int, siginfo_t *, void *);
5397 
5398  } _funcptr;
5399  sigset_t sa_mask;
5400 
5401  int sa_resv[2];
5402 
5403 };
5404 # 126 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
5405 /* this is only valid for SIGCLD */
5406 
5407 
5408 
5409 
5410 
5411 
5412 
5413    /* non-conformant ANSI compilation	*/
5414 
5415 /* definitions for the sa_flags field */
5416 # 153 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
5417 /* this is only valid for SIGCLD */
5418 
5419 
5420 
5421 /*
5422  * use of these symbols by applications is injurious
5423  *	to binary compatibility
5424  */
5425 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
5426 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements. */
5427 
5428 
5429 
5430 typedef struct sigaltstack {
5431 
5432 
5433 
5434  void *ss_sp;
5435  size_t ss_size;
5436  int ss_flags;
5437 } stack_t;
5438 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
5439 /* signotify id used only by libc for mq_notify()/aio_notify() */
5440 typedef struct signotify_id { /* signotify id struct		*/
5441  pid_t sn_pid; /* pid of proc to be notified	*/
5442  int sn_index; /* index in preallocated pool	*/
5443  int sn_pad; /* reserved			*/
5444 } signotify_id_t;
5445 # 222 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
5446 /* Command codes for sig_notify call */
5447 
5448 
5449 
5450 
5451 
5452 
5453 
5454 /* Added as per XPG4v2 */
5455 
5456 
5457 
5458 struct sigstack {
5459  void *ss_sp;
5460  int ss_onstack;
5461 };
5462 
5463 
5464 /*
5465  * For definition of ucontext_t; must follow struct definition
5466  * for  sigset_t
5467  */
5468 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
5469 
5470 /*
5471  *	This file defines the data needed to specify a set of
5472  *	processes.  These types are used by the sigsend, sigsendset,
5473  *	priocntl, priocntlset, waitid, evexit, and evexitset system
5474  *	calls.
5475  */
5476 
5477 
5478 
5479 
5480 
5481 /*
5482  *	The following defines the values for an identifier type.  It
5483  *	specifies the interpretation of an id value.  An idtype and
5484  *	id together define a simple set of processes.
5485  */
5486 typedef enum
5487 
5488  idtype /* pollutes XPG4.2 namespace */
5489 
5490   {
5491  P_PID, /* A process identifier.		*/
5492  P_PPID, /* A parent process identifier.		*/
5493  P_PGID, /* A process group (job control group)	*/
5494    /* identifier.				*/
5495  P_SID, /* A session identifier.		*/
5496  P_CID, /* A scheduling class identifier.	*/
5497  P_UID, /* A user identifier.			*/
5498  P_GID, /* A group identifier.			*/
5499  P_ALL, /* All processes.			*/
5500  P_LWPID, /* An LWP identifier.			*/
5501  P_TASKID, /* A task identifier.			*/
5502  P_PROJID, /* A project identifier.		*/
5503  P_POOLID, /* A pool identifier.			*/
5504  P_ZONEID, /* A zone identifier.			*/
5505  P_CTID, /* A (process) contract identifier.	*/
5506  P_CPUID, /* CPU identifier.			*/
5507  P_PSETID /* Processor set identifier		*/
5508 } idtype_t;
5509 
5510 
5511 /*
5512  *	The following defines the operations which can be performed to
5513  *	combine two simple sets of processes to form another set of
5514  *	processes.
5515  */
5516 
5517 typedef enum idop {
5518  POP_DIFF, /* Set difference.  The processes which	*/
5519    /* are in the left operand set and not	*/
5520    /* in the right operand set.		*/
5521  POP_AND, /* Set disjunction.  The processes	*/
5522    /* which are in both the left and right	*/
5523    /* operand sets.			*/
5524  POP_OR, /* Set conjunction.  The processes	*/
5525    /* which are in either the left or the	*/
5526    /* right operand sets (or both).	*/
5527  POP_XOR /* Set exclusive or.  The processes 	*/
5528    /* which are in either the left or	*/
5529    /* right operand sets but not in both.	*/
5530 } idop_t;
5531 
5532 
5533 /*
5534  *	The following structure is used to define a set of processes.
5535  *	The set is defined in terms of two simple sets of processes
5536  *	and an operator which operates on these two operand sets.
5537  */
5538 typedef struct procset {
5539  idop_t p_op; /* The operator connection the	*/
5540     /* following two operands each	*/
5541     /* of which is a simple set of	*/
5542     /* processes.			*/
5543 
5544  idtype_t p_lidtype;
5545     /* The type of the left operand	*/
5546     /* simple set.			*/
5547  id_t p_lid; /* The id of the left operand.	*/
5548 
5549  idtype_t p_ridtype;
5550     /* The type of the right	*/
5551     /* operand simple set.		*/
5552  id_t p_rid; /* The id of the right operand.	*/
5553 } procset_t;
5554 
5555 /*
5556  *	The following macro can be used to initialize a procset_t
5557  *	structure.
5558  */
5559 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
5560 
5561 
5562 
5563 
5564 
5565 
5566 /*
5567  * arguments to wait functions
5568  */
5569 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h"
5570 /*
5571  * macros for stat return from wait functions
5572  */
5573 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h"
5574 extern pid_t wait(int *);
5575 extern pid_t waitpid(pid_t, int *, int);
5576 
5577 
5578 extern int waitid(idtype_t, id_t, siginfo_t *, int);
5579 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5580 
5581 extern pid_t wait3(int *, int, struct rusage *);
5582 
5583 
5584 
5585 
5586 extern pid_t wait4(pid_t, int *, int, struct rusage *);
5587 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5588 
5589 
5590 /*
5591  * Allow global visibility for symbols defined in
5592  * C++ "std" namespace in <iso/stdlib_iso.h>.
5593  */
5594 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5595 /*
5596  * Allow global visibility for symbols defined in
5597  * C++ "std" namespace in <iso/stdlib_c11.h>.
5598  */
5599 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5600 /* large file compilation environment setup */
5601 
5602 
5603 
5604 
5605 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5606 #pragma redefine_extname mkstemp mkstemp64
5607 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5608 
5609 
5610 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5611 #pragma redefine_extname mkstemps mkstemps64
5612 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5613 
5614 
5615 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5616 #pragma redefine_extname mkostemp mkostemp64
5617 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5618 
5619 
5620 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5621 #pragma redefine_extname mkostemps mkostemps64
5622 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5623 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5624 /* In the LP64 compilation environment, all APIs are already large file */
5625 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5626 extern int rand_r(unsigned int *);
5627 
5628 
5629 extern void _exithandle(void);
5630 
5631 
5632 
5633 
5634 extern double drand48(void);
5635 extern double erand48(unsigned short *);
5636 extern long jrand48(unsigned short *);
5637 extern void lcong48(unsigned short *);
5638 extern long lrand48(void);
5639 extern long mrand48(void);
5640 extern long nrand48(unsigned short *);
5641 extern unsigned short *seed48(unsigned short *);
5642 extern void srand48(long);
5643 extern int putenv(char *);
5644 extern void setkey(const char *);
5645 
5646 
5647 /*
5648  * swab() has historically been in <stdlib.h> as delivered from AT&T
5649  * and continues to be visible in the default compilation environment.
5650  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
5651  * in <unistd.h>. As a result, with respect to X/Open namespace the
5652  * swab() declaration in this header is only visible for the XPG3
5653  * environment.
5654  */
5655 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5656 extern void swab(const char *, char *, ssize_t);
5657 
5658 
5659 
5660 
5661 
5662 extern int mkstemp(char *);
5663 
5664 extern int mkstemps(char *, int);
5665 
5666 
5667 
5668 
5669 
5670 extern int mkstemp64(char *);
5671 
5672 extern int mkstemps64(char *, int);
5673 
5674 
5675 
5676 
5677 extern char *mkdtemp(char *);
5678 
5679 
5680 
5681 extern int mkostemp(char *, int);
5682 extern int mkostemps(char *, int, int);
5683 
5684 
5685 extern int mkostemp64(char *, int);
5686 extern int mkostemps64(char *, int, int);
5687 
5688 
5689 
5690 
5691 
5692 
5693 extern long a64l(const char *);
5694 extern char *ecvt(double, int, int *, int *);
5695 extern char *fcvt(double, int, int *, int *);
5696 extern char *gcvt(double, int, char *);
5697 extern int getsubopt(char **, char *const *, char **);
5698 extern int grantpt(int);
5699 extern char *initstate(unsigned, char *, size_t);
5700 extern char *l64a(long);
5701 extern char *mktemp(char *);
5702 extern char *ptsname(int);
5703 extern long random(void);
5704 extern char *realpath(const char *, char *);
5705 extern char *setstate(const char *);
5706 extern void srandom(unsigned);
5707 extern int unlockpt(int);
5708 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
5709 
5710 extern int ttyslot(void);
5711 extern void *valloc(size_t);
5712 
5713 
5714 
5715 
5716 
5717 
5718 extern int posix_memalign(void **, size_t, size_t);
5719 extern int posix_openpt(int);
5720 extern int setenv(const char *, const char *, int);
5721 extern int unsetenv(const char *);
5722 
5723 
5724 
5725 
5726 extern char *canonicalize_file_name(const char *);
5727 extern int clearenv(void);
5728 extern void closefrom(int);
5729 extern int daemon(int, int);
5730 extern int dup2(int, int);
5731 extern int dup3(int, int, int);
5732 extern int fdwalk(int (*)(void *, int), void *);
5733 extern char *qecvt(long double, int, int *, int *);
5734 extern char *qfcvt(long double, int, int *, int *);
5735 extern char *qgcvt(long double, int, char *);
5736 extern char *getcwd(char *, size_t);
5737 extern const char *getexecname(void);
5738 
5739 
5740 
5741 
5742 
5743 
5744 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5745 #pragma redefine_extname getlogin getloginx
5746 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5747 
5748 
5749 
5750 
5751 
5752 
5753 extern char *getlogin(void);
5754 
5755 
5756 extern int getopt(int, char *const *, const char *);
5757 extern char *optarg;
5758 extern int optind, opterr, optopt;
5759 extern char *getpass(const char *);
5760 extern char *getpassphrase(const char *);
5761 extern int getpw(uid_t, char *);
5762 extern int isatty(int);
5763 extern void *memalign(size_t, size_t);
5764 extern char *ttyname(int);
5765 extern char *mkdtemp(char *);
5766 extern const char *getprogname(void);
5767 extern void setprogname(const char *);
5768 
5769 
5770 extern char *lltostr(long long, char *);
5771 extern char *ulltostr(unsigned long long, char *);
5772 
5773 
5774 
5775 
5776 /* OpenBSD compatibility functions */
5777 
5778 
5779 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
5780 /*
5781  * CDDL HEADER START
5782  *
5783  * The contents of this file are subject to the terms of the
5784  * Common Development and Distribution License, Version 1.0 only
5785  * (the "License").  You may not use this file except in compliance
5786  * with the License.
5787  *
5788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5789  * or http://www.opensolaris.org/os/licensing.
5790  * See the License for the specific language governing permissions
5791  * and limitations under the License.
5792  *
5793  * When distributing Covered Code, include this CDDL HEADER in each
5794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5795  * If applicable, add the following below this CDDL HEADER, with the
5796  * fields enclosed by brackets "[]" replaced with your own identifying
5797  * information: Portions Copyright [yyyy] [name of copyright owner]
5798  *
5799  * CDDL HEADER END
5800  */
5801 /*
5802  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5803  *
5804  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5805  * Use is subject to license terms.
5806  */
5807 
5808 
5809 
5810 
5811 /*
5812  * This file, <inttypes.h>, is specified by the ISO C standard,
5813  * standard, ISO/IEC 9899:1999 Programming language - C and is
5814  * also defined by SUSv3.
5815  *
5816  * ISO	  International Organization for Standardization.
5817  * SUSv3  Single Unix Specification, Version 3
5818  */
5819 
5820 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5821 /*
5822  * CDDL HEADER START
5823  *
5824  * The contents of this file are subject to the terms of the
5825  * Common Development and Distribution License (the "License").
5826  * You may not use this file except in compliance with the License.
5827  *
5828  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5829  * or http://www.opensolaris.org/os/licensing.
5830  * See the License for the specific language governing permissions
5831  * and limitations under the License.
5832  *
5833  * When distributing Covered Code, include this CDDL HEADER in each
5834  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5835  * If applicable, add the following below this CDDL HEADER, with the
5836  * fields enclosed by brackets "[]" replaced with your own identifying
5837  * information: Portions Copyright [yyyy] [name of copyright owner]
5838  *
5839  * CDDL HEADER END
5840  */
5841 
5842 /*
5843  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5844  * Copyright 2016 Joyent, Inc.
5845  *
5846  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5847  * Use is subject to license terms.
5848  */
5849 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
5850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
5851 /*
5852  * CDDL HEADER START
5853  *
5854  * The contents of this file are subject to the terms of the
5855  * Common Development and Distribution License, Version 1.0 only
5856  * (the "License").  You may not use this file except in compliance
5857  * with the License.
5858  *
5859  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5860  * or http://www.opensolaris.org/os/licensing.
5861  * See the License for the specific language governing permissions
5862  * and limitations under the License.
5863  *
5864  * When distributing Covered Code, include this CDDL HEADER in each
5865  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5866  * If applicable, add the following below this CDDL HEADER, with the
5867  * fields enclosed by brackets "[]" replaced with your own identifying
5868  * information: Portions Copyright [yyyy] [name of copyright owner]
5869  *
5870  * CDDL HEADER END
5871  */
5872 /*
5873  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
5874  * Use is subject to license terms.
5875  */
5876 
5877 
5878 
5879 
5880 #pragma ident "%Z%%M%	%I%	%E% SMI"
5881 
5882 /*
5883  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
5884  * vast majority of the facilities specified for <inttypes.h> as defined
5885  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
5886  *
5887  * Kernel/Driver developers are encouraged to include this file to access
5888  * the fixed size types, limits and utility macros. Application developers
5889  * should use the standard defined header <inttypes.h>.
5890  */
5891 
5892 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5893 /*
5894  * CDDL HEADER START
5895  *
5896  * The contents of this file are subject to the terms of the
5897  * Common Development and Distribution License (the "License").
5898  * You may not use this file except in compliance with the License.
5899  *
5900  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5901  * or http://www.opensolaris.org/os/licensing.
5902  * See the License for the specific language governing permissions
5903  * and limitations under the License.
5904  *
5905  * When distributing Covered Code, include this CDDL HEADER in each
5906  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5907  * If applicable, add the following below this CDDL HEADER, with the
5908  * fields enclosed by brackets "[]" replaced with your own identifying
5909  * information: Portions Copyright [yyyy] [name of copyright owner]
5910  *
5911  * CDDL HEADER END
5912  */
5913 
5914 /*
5915  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5916  * Copyright 2016 Joyent, Inc.
5917  *
5918  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5919  * Use is subject to license terms.
5920  */
5921 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5922 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
5923 /*
5924  * CDDL HEADER START
5925  *
5926  * The contents of this file are subject to the terms of the
5927  * Common Development and Distribution License, Version 1.0 only
5928  * (the "License").  You may not use this file except in compliance
5929  * with the License.
5930  *
5931  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5932  * or http://www.opensolaris.org/os/licensing.
5933  * See the License for the specific language governing permissions
5934  * and limitations under the License.
5935  *
5936  * When distributing Covered Code, include this CDDL HEADER in each
5937  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5938  * If applicable, add the following below this CDDL HEADER, with the
5939  * fields enclosed by brackets "[]" replaced with your own identifying
5940  * information: Portions Copyright [yyyy] [name of copyright owner]
5941  *
5942  * CDDL HEADER END
5943  */
5944 /*
5945  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5946  *
5947  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5948  * Use is subject to license terms.
5949  */
5950 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5951 
5952 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
5953 /*
5954  * CDDL HEADER START
5955  *
5956  * The contents of this file are subject to the terms of the
5957  * Common Development and Distribution License, Version 1.0 only
5958  * (the "License").  You may not use this file except in compliance
5959  * with the License.
5960  *
5961  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5962  * or http://www.opensolaris.org/os/licensing.
5963  * See the License for the specific language governing permissions
5964  * and limitations under the License.
5965  *
5966  * When distributing Covered Code, include this CDDL HEADER in each
5967  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5968  * If applicable, add the following below this CDDL HEADER, with the
5969  * fields enclosed by brackets "[]" replaced with your own identifying
5970  * information: Portions Copyright [yyyy] [name of copyright owner]
5971  *
5972  * CDDL HEADER END
5973  */
5974 /*
5975  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5976  *
5977  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5978  * Use is subject to license terms.
5979  */
5980 
5981 
5982 
5983 
5984 /*
5985  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
5986  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
5987  * Programming language - C.
5988  *
5989  * Programs/Modules should not directly include this file.  Access to the
5990  * types defined in this file should be through the inclusion of one of the
5991  * following files:
5992  *
5993  *	<limits.h>		This nested inclusion is disabled for strictly
5994  *				ANSI-C conforming compilations.  The *_MIN
5995  *				definitions are not visible to POSIX or XPG
5996  *				conforming applications (due to what may be
5997  *				a bug in the specification - this is under
5998  *				investigation)
5999  *
6000  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6001  *				components of <inttypes.h>.
6002  *
6003  *	<inttypes.h>		For use by applications.
6004  *
6005  * See these files for more details.
6006  */
6007 
6008 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6009 /*
6010  * CDDL HEADER START
6011  *
6012  * The contents of this file are subject to the terms of the
6013  * Common Development and Distribution License (the "License").
6014  * You may not use this file except in compliance with the License.
6015  *
6016  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6017  * or http://www.opensolaris.org/os/licensing.
6018  * See the License for the specific language governing permissions
6019  * and limitations under the License.
6020  *
6021  * When distributing Covered Code, include this CDDL HEADER in each
6022  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6023  * If applicable, add the following below this CDDL HEADER, with the
6024  * fields enclosed by brackets "[]" replaced with your own identifying
6025  * information: Portions Copyright [yyyy] [name of copyright owner]
6026  *
6027  * CDDL HEADER END
6028  */
6029 
6030 /*
6031  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6032  * Copyright 2016 Joyent, Inc.
6033  *
6034  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6035  * Use is subject to license terms.
6036  */
6037 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
6038 
6039 
6040 
6041 
6042 
6043 /*
6044  * Limits
6045  *
6046  * The following define the limits for the types defined in <sys/int_types.h>.
6047  *
6048  * INTMAX_MIN (minimum value of the largest supported signed integer type),
6049  * INTMAX_MAX (maximum value of the largest supported signed integer type),
6050  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
6051  * type) can be set to implementation defined limits.
6052  *
6053  * NOTE : A programmer can test to see whether an implementation supports
6054  * a particular size of integer by testing if the macro that gives the
6055  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
6056  * tests false, the implementation does not support unsigned 64 bit integers.
6057  *
6058  * The type of these macros is intentionally unspecified.
6059  *
6060  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
6061  * where the ABI specifies "char" as unsigned when the translation mode is
6062  * not ANSI-C.
6063  */
6064 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
6065 /*
6066  * The following 2 macros are provided for testing whether the types
6067  * intptr_t and uintptr_t (integers large enough to hold a void *) are
6068  * defined in this header. They are needed in case the architecture can't
6069  * represent a pointer in any standard integral type.
6070  */
6071 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
6072 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
6073 
6074 
6075 
6076 
6077 
6078 
6079 /*
6080  * Maximum value of a "size_t".  SIZE_MAX was previously defined
6081  * in <limits.h>, however, the standards specify it be defined
6082  * in <stdint.h>. The <stdint.h> headers includes this header as
6083  * does <limits.h>. The value of SIZE_MAX should not deviate
6084  * from the value of ULONG_MAX defined <sys/types.h>.
6085  */
6086 
6087 
6088 
6089 
6090 
6091 
6092 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
6093 
6094 
6095 
6096 
6097 /*
6098  * Maximum limit of wchar_t. The WCHAR_* macros are also
6099  * defined in <iso/wchar_iso.h>, but inclusion of that header
6100  * will break ISO/IEC C namespace.
6101  */
6102 
6103 
6104 
6105 
6106 /* Maximum limit of wint_t */
6107 
6108 
6109 
6110 
6111 /*
6112  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
6113  * when including <limits.h> that the suffix _MAX is reserved but not the
6114  * suffix _MIN.  However, until that issue is resolved....
6115  */
6116 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
6117 /* Minimum value of a pointer-holding signed integer type */
6118 
6119 
6120 
6121 
6122 
6123 
6124 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
6125 
6126 
6127 
6128 
6129 
6130 
6131 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
6132 
6133 
6134 
6135 
6136 /*
6137  * Minimum limit of wchar_t. The WCHAR_* macros are also
6138  * defined in <iso/wchar_iso.h>, but inclusion of that header
6139  * will break ISO/IEC C namespace.
6140  */
6141 
6142 
6143 
6144 
6145 /* Minimum limit of wint_t */
6146 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6147 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6148 /*
6149  * CDDL HEADER START
6150  *
6151  * The contents of this file are subject to the terms of the
6152  * Common Development and Distribution License, Version 1.0 only
6153  * (the "License").  You may not use this file except in compliance
6154  * with the License.
6155  *
6156  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6157  * or http://www.opensolaris.org/os/licensing.
6158  * See the License for the specific language governing permissions
6159  * and limitations under the License.
6160  *
6161  * When distributing Covered Code, include this CDDL HEADER in each
6162  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6163  * If applicable, add the following below this CDDL HEADER, with the
6164  * fields enclosed by brackets "[]" replaced with your own identifying
6165  * information: Portions Copyright [yyyy] [name of copyright owner]
6166  *
6167  * CDDL HEADER END
6168  */
6169 /*
6170  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6171  *
6172  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6173  * Use is subject to license terms.
6174  */
6175 
6176 
6177 
6178 
6179 /*
6180  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
6181  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
6182  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
6183  * Programming language - C.
6184  *
6185  * Programs/Modules should not directly include this file.  Access to the
6186  * types defined in this file should be through the inclusion of one of the
6187  * following files:
6188  *
6189  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6190  *				components of <inttypes.h>.
6191  *
6192  *	<inttypes.h>		For use by applications.
6193  *
6194  * See these files for more details.
6195  *
6196  * Use at your own risk.  This file will track the evolution of the revision
6197  * of the current ISO C standard.  As of February 1996, the committee is
6198  * squarely behind the fixed sized types.
6199  */
6200 
6201 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6202 /*
6203  * CDDL HEADER START
6204  *
6205  * The contents of this file are subject to the terms of the
6206  * Common Development and Distribution License (the "License").
6207  * You may not use this file except in compliance with the License.
6208  *
6209  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6210  * or http://www.opensolaris.org/os/licensing.
6211  * See the License for the specific language governing permissions
6212  * and limitations under the License.
6213  *
6214  * When distributing Covered Code, include this CDDL HEADER in each
6215  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6216  * If applicable, add the following below this CDDL HEADER, with the
6217  * fields enclosed by brackets "[]" replaced with your own identifying
6218  * information: Portions Copyright [yyyy] [name of copyright owner]
6219  *
6220  * CDDL HEADER END
6221  */
6222 
6223 /*
6224  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6225  * Copyright 2016 Joyent, Inc.
6226  *
6227  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6228  * Use is subject to license terms.
6229  */
6230 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
6231 
6232 
6233 
6234 
6235 
6236 /*
6237  * Constants
6238  *
6239  * The following macros create constants of the types defined in
6240  * <sys/int_types.h>. The intent is that:
6241  *	Constants defined using these macros have a specific size and
6242  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
6243  *	are for examples only. Implementations are permitted to use other
6244  *	suffixes.
6245  *
6246  * The "CSTYLED" comments are flags to an internal code style analysis tool
6247  * telling it to silently accept the line which follows.  This internal
6248  * standard requires a space between arguments, but the historical,
6249  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
6250  */
6251 /* CSTYLED */
6252 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6253 /* CSTYLED */
6254 
6255 
6256 
6257 
6258 /* CSTYLED */
6259 
6260 /* CSTYLED */
6261 
6262 /* CSTYLED */
6263 
6264 
6265 
6266 
6267 
6268 
6269 /* CSTYLED */
6270 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6271 /* CSTYLED */
6272 
6273 /* CSTYLED */
6274 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6275 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
6276 /*
6277  * CDDL HEADER START
6278  *
6279  * The contents of this file are subject to the terms of the
6280  * Common Development and Distribution License, Version 1.0 only
6281  * (the "License").  You may not use this file except in compliance
6282  * with the License.
6283  *
6284  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6285  * or http://www.opensolaris.org/os/licensing.
6286  * See the License for the specific language governing permissions
6287  * and limitations under the License.
6288  *
6289  * When distributing Covered Code, include this CDDL HEADER in each
6290  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6291  * If applicable, add the following below this CDDL HEADER, with the
6292  * fields enclosed by brackets "[]" replaced with your own identifying
6293  * information: Portions Copyright [yyyy] [name of copyright owner]
6294  *
6295  * CDDL HEADER END
6296  */
6297 /*
6298  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6299  *
6300  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6301  * Use is subject to license terms.
6302  */
6303 
6304 
6305 
6306 
6307 /*
6308  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
6309  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
6310  * Programming language - C.
6311  *
6312  * ISO  International Organization for Standardization.
6313  *
6314  * Programs/Modules should not directly include this file.  Access to the
6315  * types defined in this file should be through the inclusion of one of the
6316  * following files:
6317  *
6318  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6319  *				components of <inttypes.h>.
6320  *
6321  *	<inttypes.h>		For use by applications.
6322  *
6323  * See these files for more details.
6324  */
6325 
6326 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6327 /*
6328  * CDDL HEADER START
6329  *
6330  * The contents of this file are subject to the terms of the
6331  * Common Development and Distribution License (the "License").
6332  * You may not use this file except in compliance with the License.
6333  *
6334  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6335  * or http://www.opensolaris.org/os/licensing.
6336  * See the License for the specific language governing permissions
6337  * and limitations under the License.
6338  *
6339  * When distributing Covered Code, include this CDDL HEADER in each
6340  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6341  * If applicable, add the following below this CDDL HEADER, with the
6342  * fields enclosed by brackets "[]" replaced with your own identifying
6343  * information: Portions Copyright [yyyy] [name of copyright owner]
6344  *
6345  * CDDL HEADER END
6346  */
6347 
6348 /*
6349  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6350  * Copyright 2016 Joyent, Inc.
6351  *
6352  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6353  * Use is subject to license terms.
6354  */
6355 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
6356 
6357 
6358 
6359 
6360 
6361 /*
6362  * Formatted I/O
6363  *
6364  * The following macros can be used even when an implementation has not
6365  * extended the printf/scanf family of functions.
6366  *
6367  * The form of the names of the macros is either "PRI" for printf specifiers
6368  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
6369  * followed by the datatype size. For example, PRId32 is the macro for
6370  * the printf d conversion specifier with the flags for 32 bit datatype.
6371  *
6372  * An example using one of these macros:
6373  *
6374  *	uint64_t u;
6375  *	printf("u = %016" PRIx64 "\n", u);
6376  *
6377  * For the purpose of example, the definitions of the printf/scanf macros
6378  * below have the values appropriate for a machine with 8 bit shorts, 16
6379  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
6380  * mode, and 64 bit long longs.
6381  */
6382 
6383 /*
6384  * fprintf macros for signed integers
6385  */
6386 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6387 /*
6388  * fprintf macros for unsigned integers
6389  */
6390 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6391 /*
6392  * fprintf macros for pointers
6393  */
6394 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6395 /*
6396  * fscanf macros for signed integers
6397  */
6398 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6399 /*
6400  * fscanf macros for unsigned integers
6401  */
6402 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6403 /*
6404  * The following macros define I/O formats for intmax_t and uintmax_t.
6405  */
6406 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6407 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6408 
6409 
6410 
6411 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
6412 /*
6413  * CDDL HEADER START
6414  *
6415  * The contents of this file are subject to the terms of the
6416  * Common Development and Distribution License, Version 1.0 only
6417  * (the "License").  You may not use this file except in compliance
6418  * with the License.
6419  *
6420  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6421  * or http://www.opensolaris.org/os/licensing.
6422  * See the License for the specific language governing permissions
6423  * and limitations under the License.
6424  *
6425  * When distributing Covered Code, include this CDDL HEADER in each
6426  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6427  * If applicable, add the following below this CDDL HEADER, with the
6428  * fields enclosed by brackets "[]" replaced with your own identifying
6429  * information: Portions Copyright [yyyy] [name of copyright owner]
6430  *
6431  * CDDL HEADER END
6432  */
6433 /*
6434  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6435  * Use is subject to license terms.
6436  */
6437 
6438 
6439 
6440 
6441 #pragma ident "%Z%%M%	%I%	%E% SMI"
6442 
6443 /*
6444  * This header is included by <stdint.h> which was introduced by
6445  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6446  * The header is a subset of the <inttypes.h> header.
6447  */
6448 
6449 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6450 /*
6451  * CDDL HEADER START
6452  *
6453  * The contents of this file are subject to the terms of the
6454  * Common Development and Distribution License, Version 1.0 only
6455  * (the "License").  You may not use this file except in compliance
6456  * with the License.
6457  *
6458  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6459  * or http://www.opensolaris.org/os/licensing.
6460  * See the License for the specific language governing permissions
6461  * and limitations under the License.
6462  *
6463  * When distributing Covered Code, include this CDDL HEADER in each
6464  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6465  * If applicable, add the following below this CDDL HEADER, with the
6466  * fields enclosed by brackets "[]" replaced with your own identifying
6467  * information: Portions Copyright [yyyy] [name of copyright owner]
6468  *
6469  * CDDL HEADER END
6470  */
6471 /*
6472  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6473  *
6474  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6475  * Use is subject to license terms.
6476  */
6477 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6478 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6479 /*
6480  * CDDL HEADER START
6481  *
6482  * The contents of this file are subject to the terms of the
6483  * Common Development and Distribution License, Version 1.0 only
6484  * (the "License").  You may not use this file except in compliance
6485  * with the License.
6486  *
6487  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6488  * or http://www.opensolaris.org/os/licensing.
6489  * See the License for the specific language governing permissions
6490  * and limitations under the License.
6491  *
6492  * When distributing Covered Code, include this CDDL HEADER in each
6493  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6494  * If applicable, add the following below this CDDL HEADER, with the
6495  * fields enclosed by brackets "[]" replaced with your own identifying
6496  * information: Portions Copyright [yyyy] [name of copyright owner]
6497  *
6498  * CDDL HEADER END
6499  */
6500 /*
6501  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6502  *
6503  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6504  * Use is subject to license terms.
6505  */
6506 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6507 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6508 /*
6509  * CDDL HEADER START
6510  *
6511  * The contents of this file are subject to the terms of the
6512  * Common Development and Distribution License, Version 1.0 only
6513  * (the "License").  You may not use this file except in compliance
6514  * with the License.
6515  *
6516  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6517  * or http://www.opensolaris.org/os/licensing.
6518  * See the License for the specific language governing permissions
6519  * and limitations under the License.
6520  *
6521  * When distributing Covered Code, include this CDDL HEADER in each
6522  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6523  * If applicable, add the following below this CDDL HEADER, with the
6524  * fields enclosed by brackets "[]" replaced with your own identifying
6525  * information: Portions Copyright [yyyy] [name of copyright owner]
6526  *
6527  * CDDL HEADER END
6528  */
6529 /*
6530  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6531  *
6532  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6533  * Use is subject to license terms.
6534  */
6535 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6536 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6537 
6538 
6539 
6540 
6541 
6542 
6543 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
6544 
6545 /*
6546  * wchar_t is a built-in type in standard C++ and as such is not
6547  * defined here when using standard C++. However, the GNU compiler
6548  * fixincludes utility nonetheless creates its own version of this
6549  * header for use by gcc and g++. In that version it adds a redundant
6550  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6551  * header we need to include the following magic comment:
6552  *
6553  * we must use the C++ compiler's type
6554  *
6555  * The above comment should not be removed or changed until GNU
6556  * gcc/fixinc/inclhack.def is updated to bypass this header.
6557  */
6558 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6559 typedef struct {
6560  intmax_t quot;
6561  intmax_t rem;
6562 } imaxdiv_t;
6563 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6564 extern intmax_t imaxabs(intmax_t);
6565 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
6566 extern intmax_t strtoimax(const char *, char **,
6567  int);
6568 extern uintmax_t strtoumax(const char *, char **,
6569  int);
6570 extern intmax_t wcstoimax(const wchar_t *,
6571  wchar_t **, int);
6572 extern uintmax_t wcstoumax(const wchar_t *,
6573  wchar_t **, int);
6574 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6575 extern uint32_t arc4random(void);
6576 extern void arc4random_buf(void *, size_t);
6577 extern uint32_t arc4random_uniform(uint32_t);
6578 extern void freezero(void *, size_t);
6579 extern void *recallocarray(void *, size_t, size_t, size_t);
6580 # 50 "lock.c" 2
6581 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
6582 /*
6583  * CDDL HEADER START
6584  *
6585  * The contents of this file are subject to the terms of the
6586  * Common Development and Distribution License (the "License").
6587  * You may not use this file except in compliance with the License.
6588  *
6589  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6590  * or http://www.opensolaris.org/os/licensing.
6591  * See the License for the specific language governing permissions
6592  * and limitations under the License.
6593  *
6594  * When distributing Covered Code, include this CDDL HEADER in each
6595  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6596  * If applicable, add the following below this CDDL HEADER, with the
6597  * fields enclosed by brackets "[]" replaced with your own identifying
6598  * information: Portions Copyright [yyyy] [name of copyright owner]
6599  *
6600  * CDDL HEADER END
6601  */
6602 
6603 /*
6604  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6605  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6606  */
6607 
6608 /*	Copyright (c) 1988 AT&T	*/
6609 /*	  All Rights Reserved  	*/
6610 
6611 
6612 
6613 
6614 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
6615 /*
6616  * CDDL HEADER START
6617  *
6618  * The contents of this file are subject to the terms of the
6619  * Common Development and Distribution License, Version 1.0 only
6620  * (the "License").  You may not use this file except in compliance
6621  * with the License.
6622  *
6623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6624  * or http://www.opensolaris.org/os/licensing.
6625  * See the License for the specific language governing permissions
6626  * and limitations under the License.
6627  *
6628  * When distributing Covered Code, include this CDDL HEADER in each
6629  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6630  * If applicable, add the following below this CDDL HEADER, with the
6631  * fields enclosed by brackets "[]" replaced with your own identifying
6632  * information: Portions Copyright [yyyy] [name of copyright owner]
6633  *
6634  * CDDL HEADER END
6635  */
6636 /*	Copyright (c) 1988 AT&T	*/
6637 /*	  All Rights Reserved  	*/
6638 
6639 
6640 /*
6641  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6642  * Copyright 2014 PALO, Richard.
6643  *
6644  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6645  * Use is subject to license terms.
6646  */
6647 
6648 /*
6649  * An application should not include this header directly.  Instead it
6650  * should be included only through the inclusion of other Sun headers.
6651  *
6652  * The contents of this header is limited to identifiers specified in the
6653  * C Standard.  Any new identifiers specified in future amendments to the
6654  * C Standard must be placed in this header.  If these new identifiers
6655  * are required to also be in the C++ Standard "std" namespace, then for
6656  * anything other than macro definitions, corresponding "using" directives
6657  * must also be added to <string.h>.
6658  */
6659 
6660 
6661 
6662 
6663 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6664 /*
6665  * CDDL HEADER START
6666  *
6667  * The contents of this file are subject to the terms of the
6668  * Common Development and Distribution License (the "License").
6669  * You may not use this file except in compliance with the License.
6670  *
6671  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6672  * or http://www.opensolaris.org/os/licensing.
6673  * See the License for the specific language governing permissions
6674  * and limitations under the License.
6675  *
6676  * When distributing Covered Code, include this CDDL HEADER in each
6677  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6678  * If applicable, add the following below this CDDL HEADER, with the
6679  * fields enclosed by brackets "[]" replaced with your own identifying
6680  * information: Portions Copyright [yyyy] [name of copyright owner]
6681  *
6682  * CDDL HEADER END
6683  */
6684 
6685 /*
6686  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6687  * Copyright 2016 Joyent, Inc.
6688  *
6689  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6690  * Use is subject to license terms.
6691  */
6692 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
6693 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
6694 /*
6695  * This file and its contents are supplied under the terms of the
6696  * Common Development and Distribution License ("CDDL"), version 1.0.
6697  * You may only use this file in accordance with the terms of version
6698  * 1.0 of the CDDL.
6699  *
6700  * A full copy of the text of the CDDL should have accompanied this
6701  * source.  A copy of the CDDL is also available via the Internet at
6702  * http://www.illumos.org/license/CDDL.
6703  */
6704 
6705 /*
6706  * Copyright 2014-2016 PALO, Richard.
6707  */
6708 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
6709 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
6710 extern int memcmp(const void *, const void *, size_t);
6711 extern void *memcpy(void *, const void *, size_t);
6712 extern void *memmove(void *, const void *, size_t);
6713 extern void *memset(void *, int, size_t);
6714 extern char *strcat(char *, const char *);
6715 extern int strcmp(const char *, const char *);
6716 extern char *strcpy(char *, const char *);
6717 extern int strcoll(const char *, const char *);
6718 extern size_t strcspn(const char *, const char *);
6719 extern char *strerror(int);
6720 extern size_t strlen(const char *);
6721 extern char *strncat(char *, const char *, size_t);
6722 extern int strncmp(const char *, const char *, size_t);
6723 extern char *strncpy(char *, const char *, size_t);
6724 extern size_t strspn(const char *, const char *);
6725 extern char *strtok(char *, const char *);
6726 extern size_t strxfrm(char *, const char *, size_t);
6727 
6728 /*
6729  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
6730  * function signatures for the following functions be replaced by
6731  * two declarations, both of which have the same behavior.
6732  */
6733 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
6734 extern void *memchr(const void *, int, size_t);
6735 extern char *strchr(const char *, int);
6736 extern char *strpbrk(const char *, const char *);
6737 extern char *strrchr(const char *, int);
6738 extern char *strstr(const char *, const char *);
6739 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
6740 
6741 /*
6742  * Allow global visibility for symbols defined in
6743  * C++ "std" namespace in <iso/string_iso.h>.
6744  */
6745 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
6746 extern int strerror_r(int, char *, size_t);
6747 
6748 
6749 
6750 
6751 
6752 extern char *strtok_r(char *, const char *,
6753  char **);
6754 
6755 
6756 
6757 
6758 extern void *memccpy(void *, const void *,
6759   int, size_t);
6760 
6761 
6762 
6763 
6764 extern char *stpcpy(char *, const char *);
6765 extern char *stpncpy(char *, const char *, size_t);
6766 extern char *strndup(const char *, size_t);
6767 extern size_t strnlen(const char *, size_t);
6768 extern char *strsignal(int);
6769 
6770 
6771 
6772 
6773 
6774 
6775 extern int strcoll_l(const char *, const char *, locale_t);
6776 extern size_t strxfrm_l(char *, const char *,
6777     size_t, locale_t);
6778 extern int strcasecmp_l(const char *, const char *, locale_t);
6779 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
6780 extern char *strerror_l(int, locale_t);
6781 
6782 
6783 
6784 
6785 
6786 /* Note that some of these are also declared in strings.h for XPG4_2+ */
6787 extern void explicit_bzero(void *, size_t);
6788 extern int uucopy(const void *, void *, size_t);
6789 extern int uucopystr(const void *, void *, size_t);
6790 extern int ffs(int);
6791 extern int ffsl(long);
6792 extern int ffsll(long long);
6793 extern int fls(int);
6794 extern int flsl(long);
6795 extern int flsll(long long);
6796 extern void *memmem(const void *, size_t, const void *, size_t);
6797 extern char *strcasestr(const char *, const char *);
6798 extern char *strnstr(const char *, const char *, size_t);
6799 extern size_t strlcpy(char *, const char *, size_t);
6800 extern size_t strlcat(char *, const char *, size_t);
6801 extern char *strsep(char **stringp, const char *delim);
6802 extern char *strchrnul(const char *, int);
6803 extern char *strcasestr_l(const char *, const char *, locale_t);
6804 extern int strcasecmp(const char *, const char *);
6805 extern int strncasecmp(const char *, const char *, size_t);
6806 
6807 
6808 
6809 
6810 
6811 extern char *strdup(const char *);
6812 
6813 
6814 
6815 
6816 
6817 
6818 /*
6819  * gcc provides this inlining facility but Studio C does not.
6820  * We should use it exclusively once Studio C also provides it.
6821  */
6822 extern void *__builtin_alloca(size_t);
6823 # 51 "lock.c" 2
6824 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 1
6825 /*
6826  * CDDL HEADER START
6827  *
6828  * The contents of this file are subject to the terms of the
6829  * Common Development and Distribution License, Version 1.0 only
6830  * (the "License").  You may not use this file except in compliance
6831  * with the License.
6832  *
6833  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6834  * or http://www.opensolaris.org/os/licensing.
6835  * See the License for the specific language governing permissions
6836  * and limitations under the License.
6837  *
6838  * When distributing Covered Code, include this CDDL HEADER in each
6839  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6840  * If applicable, add the following below this CDDL HEADER, with the
6841  * fields enclosed by brackets "[]" replaced with your own identifying
6842  * information: Portions Copyright [yyyy] [name of copyright owner]
6843  *
6844  * CDDL HEADER END
6845  */
6846 /*
6847  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6848  *
6849  * Copyright (c) 1995, 1996, by Sun Microsystems, Inc.
6850  * All rights reserved.
6851  */
6852 
6853 
6854 
6855 
6856 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6857 /*
6858  * CDDL HEADER START
6859  *
6860  * The contents of this file are subject to the terms of the
6861  * Common Development and Distribution License (the "License").
6862  * You may not use this file except in compliance with the License.
6863  *
6864  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6865  * or http://www.opensolaris.org/os/licensing.
6866  * See the License for the specific language governing permissions
6867  * and limitations under the License.
6868  *
6869  * When distributing Covered Code, include this CDDL HEADER in each
6870  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6871  * If applicable, add the following below this CDDL HEADER, with the
6872  * fields enclosed by brackets "[]" replaced with your own identifying
6873  * information: Portions Copyright [yyyy] [name of copyright owner]
6874  *
6875  * CDDL HEADER END
6876  */
6877 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6878 /*	  All Rights Reserved  	*/
6879 
6880 
6881 /*
6882  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6883  * Use is subject to license terms.
6884  *
6885  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6886  * Copyright 2016 Joyent, Inc.
6887  */
6888 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 2
6889 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6890 /*
6891  * CDDL HEADER START
6892  *
6893  * The contents of this file are subject to the terms of the
6894  * Common Development and Distribution License (the "License").
6895  * You may not use this file except in compliance with the License.
6896  *
6897  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6898  * or http://www.opensolaris.org/os/licensing.
6899  * See the License for the specific language governing permissions
6900  * and limitations under the License.
6901  *
6902  * When distributing Covered Code, include this CDDL HEADER in each
6903  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6904  * If applicable, add the following below this CDDL HEADER, with the
6905  * fields enclosed by brackets "[]" replaced with your own identifying
6906  * information: Portions Copyright [yyyy] [name of copyright owner]
6907  *
6908  * CDDL HEADER END
6909  */
6910 
6911 /*
6912  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6913  * Copyright 2016 Joyent, Inc.
6914  *
6915  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6916  * Use is subject to license terms.
6917  */
6918 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 2
6919 
6920 
6921 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
6922 /*
6923  * CDDL HEADER START
6924  *
6925  * The contents of this file are subject to the terms of the
6926  * Common Development and Distribution License (the "License").
6927  * You may not use this file except in compliance with the License.
6928  *
6929  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6930  * or http://www.opensolaris.org/os/licensing.
6931  * See the License for the specific language governing permissions
6932  * and limitations under the License.
6933  *
6934  * When distributing Covered Code, include this CDDL HEADER in each
6935  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6936  * If applicable, add the following below this CDDL HEADER, with the
6937  * fields enclosed by brackets "[]" replaced with your own identifying
6938  * information: Portions Copyright [yyyy] [name of copyright owner]
6939  *
6940  * CDDL HEADER END
6941  */
6942 
6943 /*
6944  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6945  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6946  */
6947 
6948 /*	Copyright (c) 1988 AT&T	*/
6949 /*	  All Rights Reserved  	*/
6950 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 2
6951 
6952 
6953 
6954 
6955 
6956 
6957 extern int bcmp(const void *, const void *, size_t);
6958 extern void bcopy(const void *, void *, size_t);
6959 extern void bzero(void *, size_t);
6960 
6961 extern char *index(const char *, int);
6962 extern char *rindex(const char *, int);
6963 
6964 /*
6965  * X/Open System Interfaces and Headers, Issue 4, Version 2, defines
6966  * both <string.h> and <strings.h>.  The namespace requirements
6967  * do not permit the visibility of anything other than what is
6968  * specifically defined for each of these headers.  As a result,
6969  * inclusion of <string.h> would result in declarations not allowed
6970  * in <strings.h>, and making the following prototypes visible for
6971  * anything other than X/Open UNIX Extension would result in
6972  * conflicts with what is now in <string.h>.
6973  */
6974 # 52 "lock.c" 2
6975 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6976 /*
6977  * CDDL HEADER START
6978  *
6979  * The contents of this file are subject to the terms of the
6980  * Common Development and Distribution License (the "License").
6981  * You may not use this file except in compliance with the License.
6982  *
6983  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6984  * or http://www.opensolaris.org/os/licensing.
6985  * See the License for the specific language governing permissions
6986  * and limitations under the License.
6987  *
6988  * When distributing Covered Code, include this CDDL HEADER in each
6989  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6990  * If applicable, add the following below this CDDL HEADER, with the
6991  * fields enclosed by brackets "[]" replaced with your own identifying
6992  * information: Portions Copyright [yyyy] [name of copyright owner]
6993  *
6994  * CDDL HEADER END
6995  */
6996 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6997 /*	  All Rights Reserved  	*/
6998 
6999 
7000 /*
7001  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7002  * Use is subject to license terms.
7003  *
7004  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7005  * Copyright 2016 Joyent, Inc.
7006  */
7007 # 53 "lock.c" 2
7008 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 1
7009 /*
7010  * CDDL HEADER START
7011  *
7012  * The contents of this file are subject to the terms of the
7013  * Common Development and Distribution License, Version 1.0 only
7014  * (the "License").  You may not use this file except in compliance
7015  * with the License.
7016  *
7017  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7018  * or http://www.opensolaris.org/os/licensing.
7019  * See the License for the specific language governing permissions
7020  * and limitations under the License.
7021  *
7022  * When distributing Covered Code, include this CDDL HEADER in each
7023  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7024  * If applicable, add the following below this CDDL HEADER, with the
7025  * fields enclosed by brackets "[]" replaced with your own identifying
7026  * information: Portions Copyright [yyyy] [name of copyright owner]
7027  *
7028  * CDDL HEADER END
7029  */
7030 /*
7031  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7032  */
7033 /*	Copyright (c) 1988 AT&T	*/
7034 /*	  All Rights Reserved  	*/
7035 
7036 
7037 
7038 
7039 
7040 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7041 /*
7042  * CDDL HEADER START
7043  *
7044  * The contents of this file are subject to the terms of the
7045  * Common Development and Distribution License (the "License").
7046  * You may not use this file except in compliance with the License.
7047  *
7048  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7049  * or http://www.opensolaris.org/os/licensing.
7050  * See the License for the specific language governing permissions
7051  * and limitations under the License.
7052  *
7053  * When distributing Covered Code, include this CDDL HEADER in each
7054  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7055  * If applicable, add the following below this CDDL HEADER, with the
7056  * fields enclosed by brackets "[]" replaced with your own identifying
7057  * information: Portions Copyright [yyyy] [name of copyright owner]
7058  *
7059  * CDDL HEADER END
7060  */
7061 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7062 /*	  All Rights Reserved  	*/
7063 
7064 
7065 /*
7066  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7067  * Use is subject to license terms.
7068  *
7069  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7070  * Copyright 2016 Joyent, Inc.
7071  */
7072 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
7073 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
7074 /*
7075  * CDDL HEADER START
7076  *
7077  * The contents of this file are subject to the terms of the
7078  * Common Development and Distribution License, Version 1.0 only
7079  * (the "License").  You may not use this file except in compliance
7080  * with the License.
7081  *
7082  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7083  * or http://www.opensolaris.org/os/licensing.
7084  * See the License for the specific language governing permissions
7085  * and limitations under the License.
7086  *
7087  * When distributing Covered Code, include this CDDL HEADER in each
7088  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7089  * If applicable, add the following below this CDDL HEADER, with the
7090  * fields enclosed by brackets "[]" replaced with your own identifying
7091  * information: Portions Copyright [yyyy] [name of copyright owner]
7092  *
7093  * CDDL HEADER END
7094  */
7095 /*
7096  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7097  * Use is subject to license terms.
7098  */
7099 
7100 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7101 /*	  All Rights Reserved  	*/
7102 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
7103 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
7104 /*
7105  * CDDL HEADER START
7106  *
7107  * The contents of this file are subject to the terms of the
7108  * Common Development and Distribution License, Version 1.0 only
7109  * (the "License").  You may not use this file except in compliance
7110  * with the License.
7111  *
7112  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7113  * or http://www.opensolaris.org/os/licensing.
7114  * See the License for the specific language governing permissions
7115  * and limitations under the License.
7116  *
7117  * When distributing Covered Code, include this CDDL HEADER in each
7118  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7119  * If applicable, add the following below this CDDL HEADER, with the
7120  * fields enclosed by brackets "[]" replaced with your own identifying
7121  * information: Portions Copyright [yyyy] [name of copyright owner]
7122  *
7123  * CDDL HEADER END
7124  */
7125 /*
7126  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7127  * Use is subject to license terms.
7128  */
7129 
7130 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7131 /*	  All Rights Reserved  	*/
7132 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
7133 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.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, Version 1.0 only
7139  * (the "License").  You may not use this file except in compliance
7140  * with the License.
7141  *
7142  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7143  * or http://www.opensolaris.org/os/licensing.
7144  * See the License for the specific language governing permissions
7145  * and limitations under the License.
7146  *
7147  * When distributing Covered Code, include this CDDL HEADER in each
7148  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7149  * If applicable, add the following below this CDDL HEADER, with the
7150  * fields enclosed by brackets "[]" replaced with your own identifying
7151  * information: Portions Copyright [yyyy] [name of copyright owner]
7152  *
7153  * CDDL HEADER END
7154  */
7155 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7156 /*	  All Rights Reserved  	*/
7157 
7158 /*
7159  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7160  *
7161  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7162  * Use is subject to license terms.
7163  */
7164 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
7165 
7166 
7167 
7168 
7169 
7170 extern pid_t wait(int *);
7171 extern pid_t waitpid(pid_t, int *, int);
7172 extern int waitid(idtype_t, id_t, siginfo_t *, int);
7173 # 54 "lock.c" 2
7174 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
7175 /*
7176  * CDDL HEADER START
7177  *
7178  * The contents of this file are subject to the terms of the
7179  * Common Development and Distribution License (the "License").
7180  * You may not use this file except in compliance with the License.
7181  *
7182  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7183  * or http://www.opensolaris.org/os/licensing.
7184  * See the License for the specific language governing permissions
7185  * and limitations under the License.
7186  *
7187  * When distributing Covered Code, include this CDDL HEADER in each
7188  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7189  * If applicable, add the following below this CDDL HEADER, with the
7190  * fields enclosed by brackets "[]" replaced with your own identifying
7191  * information: Portions Copyright [yyyy] [name of copyright owner]
7192  *
7193  * CDDL HEADER END
7194  */
7195 
7196 /*
7197  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7198  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
7199  */
7200 
7201 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
7202 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
7203 /*	All Rights Reserved	*/
7204 
7205 
7206 
7207 
7208 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7209 /*
7210  * CDDL HEADER START
7211  *
7212  * The contents of this file are subject to the terms of the
7213  * Common Development and Distribution License (the "License").
7214  * You may not use this file except in compliance with the License.
7215  *
7216  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7217  * or http://www.opensolaris.org/os/licensing.
7218  * See the License for the specific language governing permissions
7219  * and limitations under the License.
7220  *
7221  * When distributing Covered Code, include this CDDL HEADER in each
7222  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7223  * If applicable, add the following below this CDDL HEADER, with the
7224  * fields enclosed by brackets "[]" replaced with your own identifying
7225  * information: Portions Copyright [yyyy] [name of copyright owner]
7226  *
7227  * CDDL HEADER END
7228  */
7229 
7230 /*
7231  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7232  * Copyright 2016 Joyent, Inc.
7233  *
7234  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7235  * Use is subject to license terms.
7236  */
7237 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7238 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7239 /*
7240  * CDDL HEADER START
7241  *
7242  * The contents of this file are subject to the terms of the
7243  * Common Development and Distribution License (the "License").
7244  * You may not use this file except in compliance with the License.
7245  *
7246  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7247  * or http://www.opensolaris.org/os/licensing.
7248  * See the License for the specific language governing permissions
7249  * and limitations under the License.
7250  *
7251  * When distributing Covered Code, include this CDDL HEADER in each
7252  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7253  * If applicable, add the following below this CDDL HEADER, with the
7254  * fields enclosed by brackets "[]" replaced with your own identifying
7255  * information: Portions Copyright [yyyy] [name of copyright owner]
7256  *
7257  * CDDL HEADER END
7258  */
7259 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7260 /*	  All Rights Reserved  	*/
7261 
7262 
7263 /*
7264  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7265  * Use is subject to license terms.
7266  *
7267  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7268  * Copyright 2016 Joyent, Inc.
7269  */
7270 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7271 
7272 
7273 
7274 
7275 
7276 /*
7277  * The implementation specific header <sys/time_impl.h> includes a
7278  * definition for timestruc_t needed by the stat structure.  However,
7279  * including either <time.h>, which includes <sys/time_impl.h>, or
7280  * including <sys/time_impl.h> directly will break both X/Open and
7281  * POSIX namespace. Preceeding tag, structure, and structure member
7282  * names with underscores eliminates the namespace breakage and at the
7283  * same time, with unique type names, eliminates the possibility of
7284  * timespec_t or timestruct_t naming conflicts that could otherwise
7285  * result based on the order of inclusion of <sys/stat.h> and
7286  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
7287  * standards namespace safe versions of these definitions.
7288  */
7289 
7290 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
7291 /*
7292  * CDDL HEADER START
7293  *
7294  * The contents of this file are subject to the terms of the
7295  * Common Development and Distribution License, Version 1.0 only
7296  * (the "License").  You may not use this file except in compliance
7297  * with the License.
7298  *
7299  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7300  * or http://www.opensolaris.org/os/licensing.
7301  * See the License for the specific language governing permissions
7302  * and limitations under the License.
7303  *
7304  * When distributing Covered Code, include this CDDL HEADER in each
7305  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7306  * If applicable, add the following below this CDDL HEADER, with the
7307  * fields enclosed by brackets "[]" replaced with your own identifying
7308  * information: Portions Copyright [yyyy] [name of copyright owner]
7309  *
7310  * CDDL HEADER END
7311  */
7312 /*
7313  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7314  * Use is subject to license terms.
7315  */
7316 
7317 /*
7318  * Implementation-private.  This header should not be included
7319  * directly by an application.  The application should instead
7320  * include <time.h> which includes this header conditionally
7321  * depending on which feature test macros are defined. By default,
7322  * this header is included by <time.h>.  X/Open and POSIX
7323  * standards requirements result in this header being included
7324  * by <time.h> only under a restricted set of conditions.
7325  */
7326 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7327 
7328 
7329 
7330 
7331 
7332 
7333 /*
7334  * stat structure, used by stat(2) and fstat(2)
7335  */
7336 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7337 /*
7338  * large file compilation environment setup
7339  */
7340 
7341 
7342 
7343 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7344 #pragma redefine_extname fstat fstat64
7345 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7346 
7347 
7348 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7349 #pragma redefine_extname stat stat64
7350 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7351 
7352 
7353 
7354 
7355 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7356 #pragma redefine_extname fstatat fstatat64
7357 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7358 
7359 
7360 
7361 
7362 
7363 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7364 #pragma redefine_extname lstat lstat64
7365 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7366 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7367 /*
7368  * In the LP64 compilation environment, map large file interfaces
7369  * back to native versions where possible.
7370  */
7371 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7372 /*
7373  * User level stat structure definitions.
7374  */
7375 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7376 struct stat {
7377  dev_t st_dev;
7378  long st_pad1[3]; /* reserved for network id */
7379  ino_t st_ino;
7380  mode_t st_mode;
7381  nlink_t st_nlink;
7382  uid_t st_uid;
7383  gid_t st_gid;
7384  dev_t st_rdev;
7385  long st_pad2[2];
7386  off_t st_size;
7387 
7388 
7389 
7390 
7391  timestruc_t st_atim;
7392  timestruc_t st_mtim;
7393  timestruc_t st_ctim;
7394 
7395 
7396 
7397 
7398 
7399  blksize_t st_blksize;
7400  blkcnt_t st_blocks;
7401  char st_fstype[16];
7402  long st_pad4[8]; /* expansion area */
7403 };
7404 
7405 
7406 
7407 /* transitional large file interface version */
7408 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7409 struct stat64 {
7410  dev_t st_dev;
7411  long st_pad1[3]; /* reserved for network id */
7412  ino64_t st_ino;
7413  mode_t st_mode;
7414  nlink_t st_nlink;
7415  uid_t st_uid;
7416  gid_t st_gid;
7417  dev_t st_rdev;
7418  long st_pad2[2];
7419  off64_t st_size;
7420 
7421  timestruc_t st_atim;
7422  timestruc_t st_mtim;
7423  timestruc_t st_ctim;
7424 
7425 
7426 
7427 
7428 
7429  blksize_t st_blksize;
7430  blkcnt64_t st_blocks;
7431  char st_fstype[16];
7432  long st_pad4[8]; /* expansion area */
7433 };
7434 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7435 /* MODE MASKS */
7436 
7437 /* de facto standard definitions */
7438 
7439 
7440 
7441 
7442 
7443 
7444 /* XENIX definitions are not relevant to Solaris */
7445 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7446 /* the following macros are for POSIX conformance */
7447 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7448 /* POSIX.4 macros */
7449 
7450 
7451 
7452 
7453 
7454 
7455 /*
7456  * A version number is included in the x86 SVR4 stat and mknod interfaces
7457  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
7458  * the i386 ABI need to be aware of this too.
7459  */
7460 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7461  /* || defined(_XPG7) */
7462 /* for use with futimens() and utimensat() */
7463 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7464 extern int fchmod(int, mode_t);
7465 
7466 
7467 extern int chmod(const char *, mode_t);
7468 extern int mkdir(const char *, mode_t);
7469 extern int mkfifo(const char *, mode_t);
7470 extern mode_t umask(mode_t);
7471 
7472 /* transitional large file interfaces */
7473 
7474 
7475 extern int fstat64(int, struct stat64 *);
7476 extern int stat64(const char *, struct stat64 *);
7477 extern int lstat64(const char *, struct stat64 *);
7478 
7479 
7480 extern int fstatat64(int, const char *, struct stat64 *, int);
7481 
7482 
7483 
7484 
7485 
7486  /* || defined(_XPG7) */
7487 extern int mkdirat(int, const char *, mode_t);
7488 extern int mkfifoat(int, const char *, mode_t);
7489 extern int mknodat(int, const char *, mode_t, dev_t);
7490 extern int fchmodat(int, const char *, mode_t, int);
7491 extern int futimens(int, const struct timespec[2]);
7492 extern int utimensat(int, const char *, const struct timespec[2], int);
7493 
7494 
7495 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
7496 /*
7497  * CDDL HEADER START
7498  *
7499  * The contents of this file are subject to the terms of the
7500  * Common Development and Distribution License (the "License").
7501  * You may not use this file except in compliance with the License.
7502  *
7503  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7504  * or http://www.opensolaris.org/os/licensing.
7505  * See the License for the specific language governing permissions
7506  * and limitations under the License.
7507  *
7508  * When distributing Covered Code, include this CDDL HEADER in each
7509  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7510  * If applicable, add the following below this CDDL HEADER, with the
7511  * fields enclosed by brackets "[]" replaced with your own identifying
7512  * information: Portions Copyright [yyyy] [name of copyright owner]
7513  *
7514  * CDDL HEADER END
7515  */
7516 
7517 /*
7518  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
7519  * Use is subject to license terms.
7520  */
7521 
7522 
7523 
7524 
7525 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7526 /*
7527  * CDDL HEADER START
7528  *
7529  * The contents of this file are subject to the terms of the
7530  * Common Development and Distribution License (the "License").
7531  * You may not use this file except in compliance with the License.
7532  *
7533  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7534  * or http://www.opensolaris.org/os/licensing.
7535  * See the License for the specific language governing permissions
7536  * and limitations under the License.
7537  *
7538  * When distributing Covered Code, include this CDDL HEADER in each
7539  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7540  * If applicable, add the following below this CDDL HEADER, with the
7541  * fields enclosed by brackets "[]" replaced with your own identifying
7542  * information: Portions Copyright [yyyy] [name of copyright owner]
7543  *
7544  * CDDL HEADER END
7545  */
7546 
7547 /*
7548  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7549  * Copyright 2016 Joyent, Inc.
7550  *
7551  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7552  * Use is subject to license terms.
7553  */
7554 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
7555 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7556 /*
7557  * CDDL HEADER START
7558  *
7559  * The contents of this file are subject to the terms of the
7560  * Common Development and Distribution License (the "License").
7561  * You may not use this file except in compliance with the License.
7562  *
7563  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7564  * or http://www.opensolaris.org/os/licensing.
7565  * See the License for the specific language governing permissions
7566  * and limitations under the License.
7567  *
7568  * When distributing Covered Code, include this CDDL HEADER in each
7569  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7570  * If applicable, add the following below this CDDL HEADER, with the
7571  * fields enclosed by brackets "[]" replaced with your own identifying
7572  * information: Portions Copyright [yyyy] [name of copyright owner]
7573  *
7574  * CDDL HEADER END
7575  */
7576 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7577 /*	  All Rights Reserved  	*/
7578 
7579 
7580 /*
7581  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7582  * Use is subject to license terms.
7583  *
7584  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7585  * Copyright 2016 Joyent, Inc.
7586  */
7587 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
7588 
7589 
7590 
7591 
7592 
7593 /*
7594  * The implementation specific header for <sys/stat.h>
7595  */
7596 
7597 
7598 
7599 
7600 
7601 extern int fstat(int, struct stat *);
7602 extern int stat(const char *, struct stat *);
7603 
7604 
7605 
7606 extern int fstatat(int, const char *, struct stat *, int);
7607 
7608 
7609 
7610 extern int lstat(const char *, struct stat *);
7611 extern int mknod(const char *, mode_t, dev_t);
7612 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7613 # 55 "lock.c" 2
7614 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
7615 /*
7616  * CDDL HEADER START
7617  *
7618  * The contents of this file are subject to the terms of the
7619  * Common Development and Distribution License (the "License").
7620  * You may not use this file except in compliance with the License.
7621  *
7622  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7623  * or http://www.opensolaris.org/os/licensing.
7624  * See the License for the specific language governing permissions
7625  * and limitations under the License.
7626  *
7627  * When distributing Covered Code, include this CDDL HEADER in each
7628  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7629  * If applicable, add the following below this CDDL HEADER, with the
7630  * fields enclosed by brackets "[]" replaced with your own identifying
7631  * information: Portions Copyright [yyyy] [name of copyright owner]
7632  *
7633  * CDDL HEADER END
7634  */
7635 
7636 /*
7637  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7638  *
7639  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7640  * Use is subject to license terms.
7641  */
7642 
7643 /*	Copyright (c) 1988 AT&T	*/
7644 /*	  All Rights Reserved  	*/
7645 
7646 
7647 
7648 
7649 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7650 /*
7651  * CDDL HEADER START
7652  *
7653  * The contents of this file are subject to the terms of the
7654  * Common Development and Distribution License (the "License").
7655  * You may not use this file except in compliance with the License.
7656  *
7657  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7658  * or http://www.opensolaris.org/os/licensing.
7659  * See the License for the specific language governing permissions
7660  * and limitations under the License.
7661  *
7662  * When distributing Covered Code, include this CDDL HEADER in each
7663  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7664  * If applicable, add the following below this CDDL HEADER, with the
7665  * fields enclosed by brackets "[]" replaced with your own identifying
7666  * information: Portions Copyright [yyyy] [name of copyright owner]
7667  *
7668  * CDDL HEADER END
7669  */
7670 
7671 /*
7672  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7673  * Copyright 2016 Joyent, Inc.
7674  *
7675  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7676  * Use is subject to license terms.
7677  */
7678 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7679 
7680 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
7681 /*
7682  * CDDL HEADER START
7683  *
7684  * The contents of this file are subject to the terms of the
7685  * Common Development and Distribution License (the "License").
7686  * You may not use this file except in compliance with the License.
7687  *
7688  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7689  * or http://www.opensolaris.org/os/licensing.
7690  * See the License for the specific language governing permissions
7691  * and limitations under the License.
7692  *
7693  * When distributing Covered Code, include this CDDL HEADER in each
7694  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7695  * If applicable, add the following below this CDDL HEADER, with the
7696  * fields enclosed by brackets "[]" replaced with your own identifying
7697  * information: Portions Copyright [yyyy] [name of copyright owner]
7698  *
7699  * CDDL HEADER END
7700  */
7701 
7702 /*
7703  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7704  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
7705  */
7706 
7707 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
7708 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
7709 /*	All Rights Reserved	*/
7710 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7711 
7712 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7713 /*
7714  * CDDL HEADER START
7715  *
7716  * The contents of this file are subject to the terms of the
7717  * Common Development and Distribution License (the "License").
7718  * You may not use this file except in compliance with the License.
7719  *
7720  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7721  * or http://www.opensolaris.org/os/licensing.
7722  * See the License for the specific language governing permissions
7723  * and limitations under the License.
7724  *
7725  * When distributing Covered Code, include this CDDL HEADER in each
7726  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7727  * If applicable, add the following below this CDDL HEADER, with the
7728  * fields enclosed by brackets "[]" replaced with your own identifying
7729  * information: Portions Copyright [yyyy] [name of copyright owner]
7730  *
7731  * CDDL HEADER END
7732  */
7733 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7734 /*	  All Rights Reserved  	*/
7735 
7736 
7737 /*
7738  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7739  * Use is subject to license terms.
7740  *
7741  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7742  * Copyright 2016 Joyent, Inc.
7743  */
7744 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7745 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 1
7746 /*
7747  * CDDL HEADER START
7748  *
7749  * The contents of this file are subject to the terms of the
7750  * Common Development and Distribution License (the "License").
7751  * You may not use this file except in compliance with the License.
7752  *
7753  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7754  * or http://www.opensolaris.org/os/licensing.
7755  * See the License for the specific language governing permissions
7756  * and limitations under the License.
7757  *
7758  * When distributing Covered Code, include this CDDL HEADER in each
7759  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7760  * If applicable, add the following below this CDDL HEADER, with the
7761  * fields enclosed by brackets "[]" replaced with your own identifying
7762  * information: Portions Copyright [yyyy] [name of copyright owner]
7763  *
7764  * CDDL HEADER END
7765  */
7766 
7767 /*
7768  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7769  */
7770 
7771 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7772 /*	  All Rights Reserved  	*/
7773 
7774 /*
7775  * University Copyright- Copyright (c) 1982, 1986, 1988
7776  * The Regents of the University of California
7777  * All Rights Reserved
7778  *
7779  * University Acknowledgment- Portions of this document are derived from
7780  * software developed by the University of California, Berkeley, and its
7781  * contributors.
7782  */
7783 
7784 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
7785 /* Copyright 2015, Joyent, Inc. */
7786 
7787 
7788 
7789 
7790 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7791 /*
7792  * CDDL HEADER START
7793  *
7794  * The contents of this file are subject to the terms of the
7795  * Common Development and Distribution License (the "License").
7796  * You may not use this file except in compliance with the License.
7797  *
7798  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7799  * or http://www.opensolaris.org/os/licensing.
7800  * See the License for the specific language governing permissions
7801  * and limitations under the License.
7802  *
7803  * When distributing Covered Code, include this CDDL HEADER in each
7804  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7805  * If applicable, add the following below this CDDL HEADER, with the
7806  * fields enclosed by brackets "[]" replaced with your own identifying
7807  * information: Portions Copyright [yyyy] [name of copyright owner]
7808  *
7809  * CDDL HEADER END
7810  */
7811 
7812 /*
7813  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7814  * Copyright 2016 Joyent, Inc.
7815  *
7816  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7817  * Use is subject to license terms.
7818  */
7819 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7820 
7821 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7822 /*
7823  * CDDL HEADER START
7824  *
7825  * The contents of this file are subject to the terms of the
7826  * Common Development and Distribution License (the "License").
7827  * You may not use this file except in compliance with the License.
7828  *
7829  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7830  * or http://www.opensolaris.org/os/licensing.
7831  * See the License for the specific language governing permissions
7832  * and limitations under the License.
7833  *
7834  * When distributing Covered Code, include this CDDL HEADER in each
7835  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7836  * If applicable, add the following below this CDDL HEADER, with the
7837  * fields enclosed by brackets "[]" replaced with your own identifying
7838  * information: Portions Copyright [yyyy] [name of copyright owner]
7839  *
7840  * CDDL HEADER END
7841  */
7842 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7843 /*	  All Rights Reserved  	*/
7844 
7845 
7846 /*
7847  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7848  * Use is subject to license terms.
7849  *
7850  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7851  * Copyright 2016 Joyent, Inc.
7852  */
7853 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7854 
7855 
7856 
7857 
7858 
7859 /*
7860  * Flag values accessible to open(2) and fcntl(2)
7861  * The first five can only be set (exclusively) by open(2).
7862  */
7863 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7864     /* defines read/write file integrity */
7865 
7866 
7867 
7868 
7869 
7870 
7871 /*
7872  * Flag values accessible only to open(2).
7873  */
7874 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7875 /*
7876  * fcntl(2) requests
7877  *
7878  * N.B.: values are not necessarily assigned sequentially below.
7879  */
7880 
7881 
7882 
7883 
7884 
7885 
7886 
7887 /*
7888  * Applications that read /dev/mem must be built like the kernel.  A
7889  * new symbol "_KMEMUSER" is defined for this purpose.
7890  */
7891 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7892      /* EINVAL is fildes matches arg1 */
7893 # 137 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7894 /*
7895  * Numbers 20-22 have been removed and should not be reused.
7896  */
7897 
7898 
7899 
7900 
7901 
7902     /* manager */
7903 
7904 /*
7905  * Commands that refer to flock structures.  The argument types differ between
7906  * the large and small file environments; therefore, the #defined values must
7907  * as well.
7908  * The NBMAND forms are private and should not be used.
7909  * The FLOCK forms are also private and should not be used.
7910  */
7911 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7912 /* ILP32 large file application compilation environment version */
7913 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7914 /*
7915  * transitional large file interface version
7916  * These are only valid in a 32 bit application compiled with large files
7917  * option, for source compatibility, the 64-bit versions are mapped back
7918  * to the native versions.
7919  */
7920 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7921 /*
7922  * File segment locking set data type - information passed to system by user.
7923  */
7924 
7925 /* regular version, for both small and large file compilation environment */
7926 typedef struct flock {
7927  short l_type;
7928  short l_whence;
7929  off_t l_start;
7930  off_t l_len; /* len == 0 means until end of file */
7931  int l_sysid;
7932  pid_t l_pid;
7933  long l_pad[4]; /* reserve area */
7934 } flock_t;
7935 # 264 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7936 /* transitional large file interface version */
7937 
7938 
7939 
7940 typedef struct flock64 {
7941  short l_type;
7942  short l_whence;
7943  off64_t l_start;
7944  off64_t l_len; /* len == 0 means until end of file */
7945  int l_sysid;
7946  pid_t l_pid;
7947  long l_pad[4]; /* reserve area */
7948 } flock64_t;
7949 # 328 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7950 /*
7951  * File segment locking types.
7952  */
7953 
7954 
7955 
7956 
7957 
7958 /*
7959  * POSIX constants
7960  */
7961 
7962 /* Mask for file access modes */
7963 
7964 
7965 
7966 /*
7967  * DIRECTIO
7968  */
7969 
7970 
7971 
7972 
7973 /*
7974  * File share reservation type
7975  */
7976 typedef struct fshare {
7977  short f_access;
7978  short f_deny;
7979  int f_id;
7980 } fshare_t;
7981 
7982 /*
7983  * f_access values
7984  */
7985 
7986 
7987 
7988 
7989 
7990 
7991 /*
7992  * f_deny values
7993  */
7994 # 381 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7995 /*
7996  * Special flags for functions such as openat(), fstatat()....
7997  */
7998 
7999 
8000  /* || defined(_XPG7) */
8001 # 396 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8002 /* advice for posix_fadvise */
8003 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
8004 
8005 
8006 
8007 
8008 
8009 
8010 
8011 /* Symbolic constants for the "lseek" routine. */
8012 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8013 /* large file compilation environment setup */
8014 
8015 
8016 
8017 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8018 #pragma redefine_extname open open64
8019 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8020 
8021 
8022 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8023 #pragma redefine_extname creat creat64
8024 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8025 
8026 
8027 
8028 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8029 #pragma redefine_extname posix_fadvise posix_fadvise64
8030 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8031 
8032 
8033 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8034 #pragma redefine_extname posix_fallocate posix_fallocate64
8035 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8036 
8037 
8038 
8039 
8040 
8041 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8042 #pragma redefine_extname openat openat64
8043 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8044 
8045 
8046 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8047 #pragma redefine_extname attropen attropen64
8048 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8049 # 131 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8050 extern int fcntl(int, int, ...);
8051 extern int open(const char *, int, ...);
8052 extern int creat(const char *, mode_t);
8053 
8054 extern int posix_fadvise(int, off_t, off_t, int);
8055 extern int posix_fallocate(int, off_t, off_t);
8056 
8057 
8058 
8059 extern int openat(int, const char *, int, ...);
8060 extern int attropen(const char *, const char *, int, ...);
8061 
8062 
8063 extern int directio(int, int);
8064 
8065 
8066 /* transitional large file interface versions */
8067 
8068 
8069 extern int open64(const char *, int, ...);
8070 extern int creat64(const char *, mode_t);
8071 
8072 extern int posix_fadvise64(int, off64_t, off64_t, int);
8073 extern int posix_fallocate64(int, off64_t, off64_t);
8074 
8075 
8076 
8077 extern int openat64(int, const char *, int, ...);
8078 extern int attropen64(const char *, const char *, int, ...);
8079 # 56 "lock.c" 2
8080 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
8081 /*
8082  * CDDL HEADER START
8083  *
8084  * The contents of this file are subject to the terms of the
8085  * Common Development and Distribution License (the "License").
8086  * You may not use this file except in compliance with the License.
8087  *
8088  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8089  * or http://www.opensolaris.org/os/licensing.
8090  * See the License for the specific language governing permissions
8091  * and limitations under the License.
8092  *
8093  * When distributing Covered Code, include this CDDL HEADER in each
8094  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8095  * If applicable, add the following below this CDDL HEADER, with the
8096  * fields enclosed by brackets "[]" replaced with your own identifying
8097  * information: Portions Copyright [yyyy] [name of copyright owner]
8098  *
8099  * CDDL HEADER END
8100  */
8101 
8102 /*
8103  * Copyright 2014 PALO, Richard.
8104  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8105  * Copyright (c) 2013 Gary Mills
8106  *
8107  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8108  */
8109 
8110 /*	Copyright (c) 1988 AT&T	*/
8111 /*	  All Rights Reserved  	*/
8112 
8113 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
8114 
8115 
8116 
8117 
8118 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8119 /*
8120  * CDDL HEADER START
8121  *
8122  * The contents of this file are subject to the terms of the
8123  * Common Development and Distribution License (the "License").
8124  * You may not use this file except in compliance with the License.
8125  *
8126  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8127  * or http://www.opensolaris.org/os/licensing.
8128  * See the License for the specific language governing permissions
8129  * and limitations under the License.
8130  *
8131  * When distributing Covered Code, include this CDDL HEADER in each
8132  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8133  * If applicable, add the following below this CDDL HEADER, with the
8134  * fields enclosed by brackets "[]" replaced with your own identifying
8135  * information: Portions Copyright [yyyy] [name of copyright owner]
8136  *
8137  * CDDL HEADER END
8138  */
8139 
8140 /*
8141  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8142  * Copyright 2016 Joyent, Inc.
8143  *
8144  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8145  * Use is subject to license terms.
8146  */
8147 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
8148 
8149 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
8150 /*
8151  * This file and its contents are supplied under the terms of the
8152  * Common Development and Distribution License ("CDDL"), version 1.0.
8153  * You may only use this file in accordance with the terms of version
8154  * 1.0 of the CDDL.
8155  *
8156  * A full copy of the text of the CDDL should have accompanied this
8157  * source.  A copy of the CDDL is also available via the Internet at
8158  * http://www.illumos.org/license/CDDL.
8159  */
8160 
8161 /*
8162  * Copyright 2014-2016 PALO, Richard.
8163  */
8164 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
8165 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8166 /*
8167  * CDDL HEADER START
8168  *
8169  * The contents of this file are subject to the terms of the
8170  * Common Development and Distribution License (the "License").
8171  * You may not use this file except in compliance with the License.
8172  *
8173  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8174  * or http://www.opensolaris.org/os/licensing.
8175  * See the License for the specific language governing permissions
8176  * and limitations under the License.
8177  *
8178  * When distributing Covered Code, include this CDDL HEADER in each
8179  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8180  * If applicable, add the following below this CDDL HEADER, with the
8181  * fields enclosed by brackets "[]" replaced with your own identifying
8182  * information: Portions Copyright [yyyy] [name of copyright owner]
8183  *
8184  * CDDL HEADER END
8185  */
8186 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8187 /*	  All Rights Reserved  	*/
8188 
8189 
8190 /*
8191  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8192  * Use is subject to license terms.
8193  *
8194  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8195  * Copyright 2016 Joyent, Inc.
8196  */
8197 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
8198 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
8199 /*
8200  * CDDL HEADER START
8201  *
8202  * The contents of this file are subject to the terms of the
8203  * Common Development and Distribution License (the "License").
8204  * You may not use this file except in compliance with the License.
8205  *
8206  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8207  * or http://www.opensolaris.org/os/licensing.
8208  * See the License for the specific language governing permissions
8209  * and limitations under the License.
8210  *
8211  * When distributing Covered Code, include this CDDL HEADER in each
8212  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8213  * If applicable, add the following below this CDDL HEADER, with the
8214  * fields enclosed by brackets "[]" replaced with your own identifying
8215  * information: Portions Copyright [yyyy] [name of copyright owner]
8216  *
8217  * CDDL HEADER END
8218  */
8219 
8220 /*
8221  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
8222  *	  All Rights Reserved
8223  *
8224  */
8225 
8226 /*
8227  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8228  * Use is subject to license terms.
8229  */
8230 
8231 /*
8232  * WARNING: This is an implementation-specific header,
8233  * its contents are not guaranteed. Applications
8234  * should include <unistd.h> and not this header.
8235  */
8236 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
8237 
8238 
8239 
8240 
8241 
8242 /* Symbolic constants for the "access" routine: */
8243 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8244 /* Symbolic constants for the "lseek" routine: */
8245 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8246 /* Path names: */
8247 
8248 
8249 
8250 
8251 /*
8252  * compile-time symbolic constants,
8253  * Support does not mean the feature is enabled.
8254  * Use pathconf/sysconf to obtain actual configuration value.
8255  */
8256 
8257 /* Values unchanged in UNIX 03 */
8258 
8259 
8260 
8261 
8262 
8263 /*
8264  * POSIX.1b compile-time symbolic constants.
8265  */
8266 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8267 /*
8268  * POSIX.1c compile-time symbolic constants.
8269  */
8270 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8271 /* New in UNIX 03 */
8272 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8273 /*
8274  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
8275  * which need mutexes to support priority inheritance/ceiling.
8276  */
8277 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8278 /*
8279  * Large File Summit-related announcement macros.  The system supports both
8280  * the additional and transitional Large File Summit interfaces.  (The final
8281  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
8282  */
8283 
8284 
8285 
8286 
8287 
8288 /* large file compilation environment setup */
8289 
8290 
8291 
8292 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8293 #pragma redefine_extname ftruncate ftruncate64
8294 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8295 
8296 
8297 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8298 #pragma redefine_extname lseek lseek64
8299 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8300 
8301 
8302 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8303 #pragma redefine_extname pread pread64
8304 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8305 
8306 
8307 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8308 #pragma redefine_extname pwrite pwrite64
8309 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8310 
8311 
8312 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8313 #pragma redefine_extname truncate truncate64
8314 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8315 
8316 
8317 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8318 #pragma redefine_extname lockf lockf64
8319 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8320 
8321 
8322 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8323 #pragma redefine_extname tell tell64
8324 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8325 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8326 /* In the LP64 compilation environment, the APIs are already large file */
8327 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8328 extern int access(const char *, int);
8329 
8330 extern int acct(const char *);
8331 
8332 extern unsigned alarm(unsigned);
8333 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
8334 
8335 
8336 extern int brk(void *);
8337 
8338 extern int chdir(const char *);
8339 extern int chown(const char *, uid_t, gid_t);
8340 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
8341 
8342 
8343 extern int chroot(const char *);
8344 
8345 extern int close(int);
8346 
8347 extern size_t confstr(int, char *, size_t);
8348 extern char *crypt(const char *, const char *);
8349 
8350 
8351 
8352 extern char *ctermid(char *);
8353 
8354 
8355 extern char *ctermid_r(char *);
8356 
8357 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
8358 
8359 extern char *cuserid(char *);
8360 
8361 extern int dup(int);
8362 extern int dup2(int, int);
8363 extern int dup3(int, int, int);
8364 
8365 extern void encrypt(char *, int);
8366 
8367 
8368 extern void endusershell(void);
8369 
8370 extern int execl(const char *, const char *, ...);
8371 extern int execle(const char *, const char *, ...);
8372 extern int execlp(const char *, const char *, ...);
8373 extern int execv(const char *, char *const *);
8374 extern int execve(const char *, char *const *, char *const *);
8375 extern int execvp(const char *, char *const *);
8376 extern void _exit(int)
8377  __attribute__((__noreturn__));
8378 /*
8379  * The following fattach prototype is duplicated in <stropts.h>. The
8380  * duplication is necessitated by XPG4.2 which requires the prototype
8381  * be defined in <stropts.h>.
8382  */
8383 
8384 extern int fattach(int, const char *);
8385 
8386 
8387 extern int fchdir(int);
8388 extern int fchown(int, uid_t, gid_t);
8389 
8390 
8391 extern int fchroot(int);
8392 
8393 
8394 
8395 extern int fdatasync(int);
8396 
8397 /*
8398  * The following fdetach prototype is duplicated in <stropts.h>. The
8399  * duplication is necessitated by XPG4.2 which requires the prototype
8400  * be defined in <stropts.h>.
8401  */
8402 
8403 extern int fdetach(const char *);
8404 
8405 extern pid_t fork(void);
8406 
8407 extern pid_t fork1(void);
8408 extern pid_t forkall(void);
8409 
8410 extern long fpathconf(int, int);
8411 
8412 
8413 extern int fsync(int);
8414 
8415 
8416 
8417 
8418 extern int ftruncate(int, off_t);
8419 
8420 extern char *getcwd(char *, size_t);
8421 
8422 
8423 extern int getdtablesize(void);
8424 
8425 extern gid_t getegid(void);
8426 extern uid_t geteuid(void);
8427 extern gid_t getgid(void);
8428 extern int getgroups(int, gid_t *);
8429 
8430 extern long gethostid(void);
8431 
8432 
8433 
8434 
8435 extern int gethostname(char *, int);
8436 # 363 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8437 extern int getopt(int, char *const *, const char *);
8438 extern char *optarg;
8439 extern int opterr, optind, optopt;
8440 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
8441 
8442 extern char *getpass(const char *);
8443 
8444 
8445 
8446 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
8447 
8448 extern int getpagesize(void);
8449 
8450 extern pid_t getpgid(pid_t);
8451 
8452 extern pid_t getpid(void);
8453 extern pid_t getppid(void);
8454 extern pid_t getpgrp(void);
8455 
8456 
8457 char *gettxt(const char *, const char *);
8458 
8459 
8460 extern pid_t getsid(pid_t);
8461 
8462 extern uid_t getuid(void);
8463 
8464 extern char *getusershell(void);
8465 
8466 /*
8467  * The following ioctl prototype is duplicated in <stropts.h>. The
8468  * duplication is necessitated by XPG4.2 which requires the prototype
8469  * be defined in <stropts.h>.
8470  */
8471 
8472 extern int ioctl(int, int, ...);
8473 extern int isaexec(const char *, char *const *, char *const *);
8474 extern int issetugid(void);
8475 
8476 extern int isatty(int);
8477 
8478 extern int lchown(const char *, uid_t, gid_t);
8479 
8480 extern int link(const char *, const char *);
8481 
8482 extern offset_t llseek(int, offset_t, int);
8483 
8484 
8485 
8486 
8487 extern int lockf(int, int, off_t);
8488 
8489 extern off_t lseek(int, off_t, int);
8490 
8491 
8492 extern int nice(int);
8493 
8494 
8495 extern int mincore(caddr_t, size_t, char *);
8496 
8497 extern long pathconf(const char *, int);
8498 extern int pause(void);
8499 extern int pipe(int *);
8500 extern int pipe2(int *, int);
8501 
8502 
8503 
8504 extern ssize_t pread(int, void *, size_t, off_t);
8505 
8506 
8507 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
8508 
8509 /*
8510  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
8511  * declarations are identical. A change to either one may also require
8512  * appropriate namespace updates in order to avoid redeclaration
8513  * warnings in the case where both prototypes are exposed via inclusion
8514  * of both <pthread.h> and <unistd.h>.
8515  */
8516 
8517 
8518 
8519 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
8520 
8521 
8522 
8523 extern int ptrace(int, pid_t, int, int);
8524 
8525 
8526 
8527 
8528 extern ssize_t pwrite(int, const void *, size_t, off_t);
8529 
8530 
8531 /* per RFC 3542; This is also defined in netdb.h */
8532 extern int rcmd_af(char **, unsigned short, const char *, const char *,
8533  const char *, int *, int);
8534 
8535 extern ssize_t read(int, void *, size_t);
8536 
8537 
8538 extern ssize_t readlink(const char *, char *,
8539  size_t);
8540 
8541 
8542 
8543 
8544 
8545 
8546 extern int rename(const char *, const char *);
8547 
8548 
8549 
8550 
8551 
8552 
8553 
8554 extern int resolvepath(const char *, char *, size_t);
8555 /* per RFC 3542; This is also defined in netdb.h */
8556 extern int rexec_af(char **, unsigned short, const char *, const char *,
8557  const char *, int *, int);
8558 
8559 extern int rmdir(const char *);
8560 
8561 /* per RFC 3542; This is also defined in netdb.h */
8562 extern int rresvport_af(int *, int);
8563 
8564 
8565 
8566 
8567 extern void *sbrk(intptr_t);
8568 
8569 
8570 extern int setegid(gid_t);
8571 extern int seteuid(uid_t);
8572 
8573 extern int setgid(gid_t);
8574 
8575 extern int setgroups(int, const gid_t *);
8576 extern int sethostname(char *, int);
8577 
8578 extern int setpgid(pid_t, pid_t);
8579 
8580 extern pid_t setpgrp(void);
8581 extern int setregid(gid_t, gid_t);
8582 extern int setreuid(uid_t, uid_t);
8583 
8584 extern pid_t setsid(void);
8585 extern int setuid(uid_t);
8586 
8587 extern void setusershell(void);
8588 
8589 extern unsigned sleep(unsigned);
8590 
8591 extern int stime(const time_t *);
8592 
8593 
8594 
8595 
8596 
8597 
8598 extern int symlink(const char *, const char *);
8599 extern void sync(void);
8600 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8601 extern long sysconf(int);
8602 extern pid_t tcgetpgrp(int);
8603 extern int tcsetpgrp(int, pid_t);
8604 
8605 
8606 
8607 extern off_t tell(int);
8608 
8609 
8610 
8611 
8612 extern int truncate(const char *, off_t);
8613 
8614 extern char *ttyname(int);
8615 
8616 extern useconds_t ualarm(useconds_t, useconds_t);
8617 
8618 extern int unlink(const char *);
8619 
8620 extern char *getwd(char *);
8621 extern int usleep(useconds_t);
8622 extern pid_t vfork(void) __attribute__((__returns_twice__));
8623 #pragma unknown_control_flow(vfork)
8624 
8625 
8626 extern void vhangup(void);
8627 
8628 extern ssize_t write(int, const void *, size_t);
8629 
8630 extern void yield(void);
8631 
8632 
8633 
8634 
8635  /* || defined(_XPG7) */
8636 extern int faccessat(int, const char *, int, int);
8637 extern int fchownat(int, const char *, uid_t, gid_t, int);
8638 extern int linkat(int, const char *, int, const char *, int);
8639 extern ssize_t readlinkat(int, const char *,
8640  char *, size_t);
8641 extern int renameat(int, const char *, int, const char *);
8642 extern int symlinkat(const char *, int, const char *);
8643 extern int unlinkat(int, const char *, int);
8644 
8645 
8646 extern int get_nprocs(void);
8647 extern int get_nprocs_conf(void);
8648 
8649 
8650 /* transitional large file interface versions */
8651 
8652 
8653 extern int ftruncate64(int, off64_t);
8654 extern off64_t lseek64(int, off64_t, int);
8655 extern ssize_t pread64(int, void *, size_t, off64_t);
8656 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
8657 extern off64_t tell64(int);
8658 extern int truncate64(const char *, off64_t);
8659 extern int lockf64(int, int, off64_t);
8660 
8661 
8662 /*
8663  * getlogin_r() & ttyname_r() prototypes are defined here.
8664  */
8665 
8666 /*
8667  * Previous releases of Solaris, starting at 2.3, provided definitions of
8668  * various functions as specified in POSIX.1c, Draft 6.  For some of these
8669  * functions, the final POSIX 1003.1c standard had a different number of
8670  * arguments and return values.
8671  *
8672  * The following segment of this header provides support for the standard
8673  * interfaces while supporting applications written under earlier
8674  * releases.  The application defines appropriate values of the feature
8675  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
8676  * whether it was written to expect the Draft 6 or standard versions of
8677  * these interfaces, before including this header.  This header then
8678  * provides a mapping from the source version of the interface to an
8679  * appropriate binary interface.  Such mappings permit an application
8680  * to be built from libraries and objects which have mixed expectations
8681  * of the definitions of these functions.
8682  *
8683  * For applications using the Draft 6 definitions, the binary symbol is the
8684  * same as the source symbol, and no explicit mapping is needed.  For the
8685  * standard interface, the function func() is mapped to the binary symbol
8686  * _posix_func().  The preferred mechanism for the remapping is a compiler
8687  * #pragma.  If the compiler does not provide such a #pragma, the header file
8688  * defines a static function func() which calls the _posix_func() version;
8689  * this has to be done instead of #define since POSIX specifies that an
8690  * application can #undef the symbol and still be bound to the correct
8691  * implementation.  Unfortunately, the statics confuse lint so we fallback to
8692  * #define in that case.
8693  *
8694  * NOTE: Support for the Draft 6 definitions is provided for compatibility
8695  * only.  New applications/libraries should use the standard definitions.
8696  */
8697 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8698 
8699 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8700 #pragma redefine_extname getlogin_r getloginx_r
8701 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
8702 
8703 
8704 
8705 
8706 
8707 
8708 extern char *getlogin_r(char *, int);
8709 
8710 extern char *ttyname_r(int, char *, int);
8711 
8712 
8713 
8714 
8715 
8716 
8717 extern int getentropy(void *, size_t);
8718 # 57 "lock.c" 2
8719 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 1
8720 /*
8721  * CDDL HEADER START
8722  *
8723  * The contents of this file are subject to the terms of the
8724  * Common Development and Distribution License, Version 1.0 only
8725  * (the "License").  You may not use this file except in compliance
8726  * with the License.
8727  *
8728  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8729  * or http://www.opensolaris.org/os/licensing.
8730  * See the License for the specific language governing permissions
8731  * and limitations under the License.
8732  *
8733  * When distributing Covered Code, include this CDDL HEADER in each
8734  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8735  * If applicable, add the following below this CDDL HEADER, with the
8736  * fields enclosed by brackets "[]" replaced with your own identifying
8737  * information: Portions Copyright [yyyy] [name of copyright owner]
8738  *
8739  * CDDL HEADER END
8740  */
8741 /*	Copyright (c) 1988 AT&T	*/
8742 /*	  All Rights Reserved  	*/
8743 
8744 /*
8745  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8746  *
8747  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8748  * Use is subject to license terms.
8749  */
8750 
8751 
8752 
8753 
8754 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8755 /*
8756  * CDDL HEADER START
8757  *
8758  * The contents of this file are subject to the terms of the
8759  * Common Development and Distribution License (the "License").
8760  * You may not use this file except in compliance with the License.
8761  *
8762  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8763  * or http://www.opensolaris.org/os/licensing.
8764  * See the License for the specific language governing permissions
8765  * and limitations under the License.
8766  *
8767  * When distributing Covered Code, include this CDDL HEADER in each
8768  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8769  * If applicable, add the following below this CDDL HEADER, with the
8770  * fields enclosed by brackets "[]" replaced with your own identifying
8771  * information: Portions Copyright [yyyy] [name of copyright owner]
8772  *
8773  * CDDL HEADER END
8774  */
8775 
8776 /*
8777  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8778  * Copyright 2016 Joyent, Inc.
8779  *
8780  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8781  * Use is subject to license terms.
8782  */
8783 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
8784 
8785 
8786 
8787 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8788 /*
8789  * CDDL HEADER START
8790  *
8791  * The contents of this file are subject to the terms of the
8792  * Common Development and Distribution License (the "License").
8793  * You may not use this file except in compliance with the License.
8794  *
8795  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8796  * or http://www.opensolaris.org/os/licensing.
8797  * See the License for the specific language governing permissions
8798  * and limitations under the License.
8799  *
8800  * When distributing Covered Code, include this CDDL HEADER in each
8801  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8802  * If applicable, add the following below this CDDL HEADER, with the
8803  * fields enclosed by brackets "[]" replaced with your own identifying
8804  * information: Portions Copyright [yyyy] [name of copyright owner]
8805  *
8806  * CDDL HEADER END
8807  */
8808 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8809 /*	  All Rights Reserved  	*/
8810 
8811 
8812 /*
8813  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8814  * Use is subject to license terms.
8815  *
8816  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8817  * Copyright 2016 Joyent, Inc.
8818  */
8819 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
8820 
8821 
8822 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 1
8823 /*
8824  * CDDL HEADER START
8825  *
8826  * The contents of this file are subject to the terms of the
8827  * Common Development and Distribution License, Version 1.0 only
8828  * (the "License").  You may not use this file except in compliance
8829  * with the License.
8830  *
8831  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8832  * or http://www.opensolaris.org/os/licensing.
8833  * See the License for the specific language governing permissions
8834  * and limitations under the License.
8835  *
8836  * When distributing Covered Code, include this CDDL HEADER in each
8837  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8838  * If applicable, add the following below this CDDL HEADER, with the
8839  * fields enclosed by brackets "[]" replaced with your own identifying
8840  * information: Portions Copyright [yyyy] [name of copyright owner]
8841  *
8842  * CDDL HEADER END
8843  */
8844 /*	Copyright (c) 1988 AT&T	*/
8845 /*	  All Rights Reserved  	*/
8846 
8847 
8848 /*
8849  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8850  *
8851  * Copyright (c) 1998-1999, by Sun Microsystems, Inc.
8852  * All rights reserved.
8853  */
8854 
8855 /*
8856  * An application should not include this header directly.  Instead it
8857  * should be included only through the inclusion of other Sun headers.
8858  *
8859  * The contents of this header is limited to identifiers specified in the
8860  * C Standard.  Any new identifiers specified in future amendments to the
8861  * C Standard must be placed in this header.  If these new identifiers
8862  * are required to also be in the C++ Standard "std" namespace, then for
8863  * anything other than macro definitions, corresponding "using" directives
8864  * must also be added to <signal.h>.
8865  */
8866 
8867 
8868 
8869 
8870 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
8871 /*
8872  * CDDL HEADER START
8873  *
8874  * The contents of this file are subject to the terms of the
8875  * Common Development and Distribution License (the "License").
8876  * You may not use this file except in compliance with the License.
8877  *
8878  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8879  * or http://www.opensolaris.org/os/licensing.
8880  * See the License for the specific language governing permissions
8881  * and limitations under the License.
8882  *
8883  * When distributing Covered Code, include this CDDL HEADER in each
8884  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8885  * If applicable, add the following below this CDDL HEADER, with the
8886  * fields enclosed by brackets "[]" replaced with your own identifying
8887  * information: Portions Copyright [yyyy] [name of copyright owner]
8888  *
8889  * CDDL HEADER END
8890  */
8891 
8892 /*
8893  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
8894  * Use is subject to license terms.
8895  */
8896 
8897 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8898 /*	  All Rights Reserved  	*/
8899 
8900 /*
8901  * An application should not include this header directly.  Instead it
8902  * should be included only through the inclusion of other Sun headers.
8903  *
8904  * The contents of this header is limited to identifiers specified in the
8905  * C Standard.  Any new identifiers specified in future amendments to the
8906  * C Standard must be placed in this header.  If these new identifiers
8907  * are required to also be in the C++ Standard "std" namespace, then for
8908  * anything other than macro definitions, corresponding "using" directives
8909  * must also be added to <sys/signal.h.h>.
8910  */
8911 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 2
8912 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h"
8913 typedef int sig_atomic_t;
8914 
8915 
8916 
8917 
8918 extern void (*signal(int, void (*)(int)))(int);
8919 
8920 extern int raise(int);
8921 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
8922 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
8923 /*
8924  * CDDL HEADER START
8925  *
8926  * The contents of this file are subject to the terms of the
8927  * Common Development and Distribution License (the "License").
8928  * You may not use this file except in compliance with the License.
8929  *
8930  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8931  * or http://www.opensolaris.org/os/licensing.
8932  * See the License for the specific language governing permissions
8933  * and limitations under the License.
8934  *
8935  * When distributing Covered Code, include this CDDL HEADER in each
8936  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8937  * If applicable, add the following below this CDDL HEADER, with the
8938  * fields enclosed by brackets "[]" replaced with your own identifying
8939  * information: Portions Copyright [yyyy] [name of copyright owner]
8940  *
8941  * CDDL HEADER END
8942  */
8943 
8944 /*
8945  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
8946  * Use is subject to license terms.
8947  */
8948 
8949 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8950 /*	  All Rights Reserved  	*/
8951 
8952 /*
8953  * University Copyright- Copyright (c) 1982, 1986, 1988
8954  * The Regents of the University of California
8955  * All Rights Reserved
8956  *
8957  * University Acknowledgment- Portions of this document are derived from
8958  * software developed by the University of California, Berkeley, and its
8959  * contributors.
8960  */
8961 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
8962 
8963 /*
8964  * Allow global visibility for symbols defined in
8965  * C++ "std" namespace in <iso/signal_iso.h>.
8966  */
8967 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
8968 extern const char **_sys_siglistp; /* signal descriptions */
8969 extern const int _sys_siglistn; /* # of signal descriptions */
8970 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
8971 extern int kill(pid_t, int);
8972 extern int sigaction(int, const struct sigaction *,
8973  struct sigaction *);
8974 
8975 extern int sigaddset(sigset_t *, int);
8976 extern int sigdelset(sigset_t *, int);
8977 extern int sigemptyset(sigset_t *);
8978 extern int sigfillset(sigset_t *);
8979 extern int sigismember(const sigset_t *, int);
8980 
8981 extern int sigpending(sigset_t *);
8982 extern int sigprocmask(int, const sigset_t *,
8983  sigset_t *);
8984 extern int sigsuspend(const sigset_t *);
8985 
8986 
8987 
8988 
8989 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
8990 /*
8991  * CDDL HEADER START
8992  *
8993  * The contents of this file are subject to the terms of the
8994  * Common Development and Distribution License, Version 1.0 only
8995  * (the "License").  You may not use this file except in compliance
8996  * with the License.
8997  *
8998  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8999  * or http://www.opensolaris.org/os/licensing.
9000  * See the License for the specific language governing permissions
9001  * and limitations under the License.
9002  *
9003  * When distributing Covered Code, include this CDDL HEADER in each
9004  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9005  * If applicable, add the following below this CDDL HEADER, with the
9006  * fields enclosed by brackets "[]" replaced with your own identifying
9007  * information: Portions Copyright [yyyy] [name of copyright owner]
9008  *
9009  * CDDL HEADER END
9010  */
9011 /*
9012  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9013  * Use is subject to license terms.
9014  */
9015 
9016 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9017 /*	  All Rights Reserved  	*/
9018 # 89 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9019 extern int gsignal(int);
9020 extern int (*ssignal(int, int (*)(int)))(int);
9021 extern int sigsend(idtype_t, id_t, int);
9022 extern int sigsendset(const procset_t *, int);
9023 extern int sig2str(int, char *);
9024 extern int str2sig(const char *, int *);
9025 
9026 
9027 
9028 
9029 
9030 extern void (*bsd_signal(int, void (*)(int)))(int);
9031 extern int killpg(pid_t, int);
9032 extern int siginterrupt(int, int);
9033 extern int sigaltstack(const stack_t *, stack_t *);
9034 extern int sighold(int);
9035 extern int sigignore(int);
9036 extern int sigpause(int);
9037 extern int sigrelse(int);
9038 extern void (*sigset(int, void (*)(int)))(int);
9039 
9040 
9041 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
9042 
9043 
9044 
9045 extern int sigstack(struct sigstack *, struct sigstack *);
9046 
9047 
9048 
9049 
9050 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
9051 /*
9052  * CDDL HEADER START
9053  *
9054  * The contents of this file are subject to the terms of the
9055  * Common Development and Distribution License, Version 1.0 only
9056  * (the "License").  You may not use this file except in compliance
9057  * with the License.
9058  *
9059  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9060  * or http://www.opensolaris.org/os/licensing.
9061  * See the License for the specific language governing permissions
9062  * and limitations under the License.
9063  *
9064  * When distributing Covered Code, include this CDDL HEADER in each
9065  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9066  * If applicable, add the following below this CDDL HEADER, with the
9067  * fields enclosed by brackets "[]" replaced with your own identifying
9068  * information: Portions Copyright [yyyy] [name of copyright owner]
9069  *
9070  * CDDL HEADER END
9071  */
9072 /*
9073  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9074  * Use is subject to license terms.
9075  */
9076 
9077 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9078 /*	  All Rights Reserved  	*/
9079 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9080 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9081 /*
9082  * CDDL HEADER START
9083  *
9084  * The contents of this file are subject to the terms of the
9085  * Common Development and Distribution License (the "License").
9086  * You may not use this file except in compliance with the License.
9087  *
9088  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9089  * or http://www.opensolaris.org/os/licensing.
9090  * See the License for the specific language governing permissions
9091  * and limitations under the License.
9092  *
9093  * When distributing Covered Code, include this CDDL HEADER in each
9094  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9095  * If applicable, add the following below this CDDL HEADER, with the
9096  * fields enclosed by brackets "[]" replaced with your own identifying
9097  * information: Portions Copyright [yyyy] [name of copyright owner]
9098  *
9099  * CDDL HEADER END
9100  */
9101 /*	Copyright (c) 1988 AT&T	*/
9102 /*	  All Rights Reserved  	*/
9103 
9104 
9105 /*
9106  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9107  *
9108  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9109  * Use is subject to license terms.
9110  */
9111 /*
9112  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9113  * Copyright 2016 Joyent, Inc.
9114  */
9115 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9116 extern int pthread_kill(pthread_t, int);
9117 extern int pthread_sigmask(int, const sigset_t *,
9118  sigset_t *);
9119 extern int sigwaitinfo(const sigset_t *,
9120  siginfo_t *);
9121 extern int sigtimedwait(const sigset_t *,
9122  siginfo_t *, const struct timespec *);
9123 extern int sigqueue(pid_t, int, const union sigval);
9124 
9125 
9126 /*
9127  * sigwait() prototype is defined here.
9128  */
9129 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9130 extern int sigwait(sigset_t *);
9131 # 58 "lock.c" 2
9132 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
9133 /*
9134  * CDDL HEADER START
9135  *
9136  * The contents of this file are subject to the terms of the
9137  * Common Development and Distribution License, Version 1.0 only
9138  * (the "License").  You may not use this file except in compliance
9139  * with the License.
9140  *
9141  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9142  * or http://www.opensolaris.org/os/licensing.
9143  * See the License for the specific language governing permissions
9144  * and limitations under the License.
9145  *
9146  * When distributing Covered Code, include this CDDL HEADER in each
9147  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9148  * If applicable, add the following below this CDDL HEADER, with the
9149  * fields enclosed by brackets "[]" replaced with your own identifying
9150  * information: Portions Copyright [yyyy] [name of copyright owner]
9151  *
9152  * CDDL HEADER END
9153  */
9154 /*
9155  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9156  * Use is subject to license terms.
9157  */
9158 
9159 /*
9160  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9161  *
9162  * Portions of this file developed by Garrett D'Amore are licensed
9163  * under the terms of the Common Development and Distribution License (CDDL)
9164  * version 1.0 only.  The use of subsequent versions of the License are
9165  * is specifically prohibited unless those terms are not in conflict with
9166  * version 1.0 of the License.  You can find this license on-line at
9167  * http://www.illumos.org/license/CDDL
9168  */
9169 
9170 
9171 
9172 
9173 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
9174 /*
9175  * CDDL HEADER START
9176  *
9177  * The contents of this file are subject to the terms of the
9178  * Common Development and Distribution License, Version 1.0 only
9179  * (the "License").  You may not use this file except in compliance
9180  * with the License.
9181  *
9182  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9183  * or http://www.opensolaris.org/os/licensing.
9184  * See the License for the specific language governing permissions
9185  * and limitations under the License.
9186  *
9187  * When distributing Covered Code, include this CDDL HEADER in each
9188  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9189  * If applicable, add the following below this CDDL HEADER, with the
9190  * fields enclosed by brackets "[]" replaced with your own identifying
9191  * information: Portions Copyright [yyyy] [name of copyright owner]
9192  *
9193  * CDDL HEADER END
9194  */
9195 /*
9196  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9197  * Copyright 2014 PALO, Richard.
9198  *
9199  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9200  * Use is subject to license terms.
9201  */
9202 
9203 /*	Copyright (c) 1988 AT&T	*/
9204 /*	  All Rights Reserved  	*/
9205 
9206 
9207 /*
9208  * An application should not include this header directly.  Instead it
9209  * should be included only through the inclusion of other Sun headers.
9210  *
9211  * The contents of this header is limited to identifiers specified in the
9212  * C Standard.  Any new identifiers specified in future amendments to the
9213  * C Standard must be placed in this header.  If these new identifiers
9214  * are required to also be in the C++ Standard "std" namespace, then for
9215  * anything other than macro definitions, corresponding "using" directives
9216  * must also be added to <locale.h>.
9217  */
9218 
9219 
9220 
9221 
9222 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9223 /*
9224  * CDDL HEADER START
9225  *
9226  * The contents of this file are subject to the terms of the
9227  * Common Development and Distribution License (the "License").
9228  * You may not use this file except in compliance with the License.
9229  *
9230  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9231  * or http://www.opensolaris.org/os/licensing.
9232  * See the License for the specific language governing permissions
9233  * and limitations under the License.
9234  *
9235  * When distributing Covered Code, include this CDDL HEADER in each
9236  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9237  * If applicable, add the following below this CDDL HEADER, with the
9238  * fields enclosed by brackets "[]" replaced with your own identifying
9239  * information: Portions Copyright [yyyy] [name of copyright owner]
9240  *
9241  * CDDL HEADER END
9242  */
9243 
9244 /*
9245  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9246  * Copyright 2016 Joyent, Inc.
9247  *
9248  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9249  * Use is subject to license terms.
9250  */
9251 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9252 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
9253 /*
9254  * This file and its contents are supplied under the terms of the
9255  * Common Development and Distribution License ("CDDL"), version 1.0.
9256  * You may only use this file in accordance with the terms of version
9257  * 1.0 of the CDDL.
9258  *
9259  * A full copy of the text of the CDDL should have accompanied this
9260  * source.  A copy of the CDDL is also available via the Internet at
9261  * http://www.illumos.org/license/CDDL.
9262  */
9263 
9264 /*
9265  * Copyright 2014-2016 PALO, Richard.
9266  */
9267 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9268 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9269 struct lconv {
9270  char *decimal_point;
9271  char *thousands_sep;
9272  char *grouping;
9273  char *int_curr_symbol;
9274  char *currency_symbol;
9275  char *mon_decimal_point;
9276  char *mon_thousands_sep;
9277  char *mon_grouping;
9278  char *positive_sign;
9279  char *negative_sign;
9280  char int_frac_digits;
9281  char frac_digits;
9282  char p_cs_precedes;
9283  char p_sep_by_space;
9284  char n_cs_precedes;
9285  char n_sep_by_space;
9286  char p_sign_posn;
9287  char n_sign_posn;
9288 
9289 /*
9290  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
9291  * standard.  Namespace and binary compatibility dictate that visibility
9292  * of these new members be limited.  Visibility is limited to a strictly
9293  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
9294  */
9295 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9296 };
9297 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9298 extern char *setlocale(int, const char *);
9299 extern struct lconv *localeconv(void);
9300 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9301 
9302 
9303 
9304 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
9305 /*
9306  * CDDL HEADER START
9307  *
9308  * The contents of this file are subject to the terms of the
9309  * Common Development and Distribution License (the "License").
9310  * You may not use this file except in compliance with the License.
9311  *
9312  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9313  * or http://www.opensolaris.org/os/licensing.
9314  * See the License for the specific language governing permissions
9315  * and limitations under the License.
9316  *
9317  * When distributing Covered Code, include this CDDL HEADER in each
9318  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9319  * If applicable, add the following below this CDDL HEADER, with the
9320  * fields enclosed by brackets "[]" replaced with your own identifying
9321  * information: Portions Copyright [yyyy] [name of copyright owner]
9322  *
9323  * CDDL HEADER END
9324  */
9325 /*
9326  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9327  *
9328  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9329  * Use is subject to license terms.
9330  */
9331 
9332 
9333 
9334 
9335 
9336 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
9337 /*
9338  * CDDL HEADER START
9339  *
9340  * The contents of this file are subject to the terms of the
9341  * Common Development and Distribution License (the "License").
9342  * You may not use this file except in compliance with the License.
9343  *
9344  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9345  * or http://www.opensolaris.org/os/licensing.
9346  * See the License for the specific language governing permissions
9347  * and limitations under the License.
9348  *
9349  *
9350  * When distributing Covered Code, include this CDDL HEADER in each
9351  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9352  * If applicable, add the following below this CDDL HEADER, with the
9353  * fields enclosed by brackets "[]" replaced with your own identifying
9354  * information: Portions Copyright [yyyy] [name of copyright owner]
9355  *
9356  * CDDL HEADER END
9357  */
9358 
9359 /*
9360  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9361  * Use is subject to license terms.
9362  * Copyright 2016 Joyent, Inc.
9363  */
9364 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
9365 
9366 
9367 
9368 
9369 
9370 /*
9371  * wchar_t is a built-in type in standard C++ and as such is not
9372  * defined here when using standard C++. However, the GNU compiler
9373  * fixincludes utility nonetheless creates its own version of this
9374  * header for use by gcc and g++. In that version it adds a redundant
9375  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
9376  * header we need to include the following magic comment:
9377  *
9378  * we must use the C++ compiler's type
9379  *
9380  * The above comment should not be removed or changed until GNU
9381  * gcc/fixinc/inclhack.def is updated to bypass this header.
9382  */
9383 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
9384 extern char *dcgettext(const char *, const char *, const int);
9385 extern char *dgettext(const char *, const char *);
9386 extern char *gettext(const char *);
9387 extern char *textdomain(const char *);
9388 extern char *bindtextdomain(const char *, const char *);
9389 
9390 /*
9391  * LI18NUX 2000 Globalization Specification Version 1.0
9392  * with Amendment 2
9393  */
9394 extern char *dcngettext(const char *, const char *,
9395  const char *, unsigned long int, int);
9396 extern char *dngettext(const char *, const char *,
9397  const char *, unsigned long int);
9398 extern char *ngettext(const char *, const char *, unsigned long int);
9399 extern char *bind_textdomain_codeset(const char *, const char *);
9400 
9401 /* Word handling functions --- requires dynamic linking */
9402 /* Warning: these are experimental and subject to change. */
9403 extern int wdinit(void);
9404 extern int wdchkind(wchar_t);
9405 extern int wdbindf(wchar_t, wchar_t, int);
9406 extern wchar_t *wddelim(wchar_t, wchar_t, int);
9407 extern wchar_t mcfiller(void);
9408 extern int mcwrap(void);
9409 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9410 
9411 
9412 /*
9413  * Allow global visibility for symbols defined in
9414  * C++ "std" namespace in <iso/locale_iso.h>.
9415  */
9416 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
9417 /*
9418  * These were added in POSIX 2008 as part of the newlocale() specification.
9419  */
9420 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
9421 extern locale_t duplocale(locale_t);
9422 extern void freelocale(locale_t);
9423 extern locale_t newlocale(int, const char *, locale_t);
9424 extern locale_t uselocale(locale_t);
9425 
9426 
9427 extern locale_t __global_locale(void);
9428 # 59 "lock.c" 2
9429 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h" 1
9430 /*
9431  * CDDL HEADER START
9432  *
9433  * The contents of this file are subject to the terms of the
9434  * Common Development and Distribution License, Version 1.0 only
9435  * (the "License").  You may not use this file except in compliance
9436  * with the License.
9437  *
9438  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9439  * or http://www.opensolaris.org/os/licensing.
9440  * See the License for the specific language governing permissions
9441  * and limitations under the License.
9442  *
9443  * When distributing Covered Code, include this CDDL HEADER in each
9444  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9445  * If applicable, add the following below this CDDL HEADER, with the
9446  * fields enclosed by brackets "[]" replaced with your own identifying
9447  * information: Portions Copyright [yyyy] [name of copyright owner]
9448  *
9449  * CDDL HEADER END
9450  */
9451 /*
9452  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9453  *
9454  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
9455  * Use is subject to license terms.
9456  */
9457 
9458 /*	Copyright (c) 1988 AT&T	*/
9459 /*	  All Rights Reserved  	*/
9460 
9461 
9462 /*
9463  * declarations of functions found in libgen
9464  */
9465 
9466 
9467 
9468 
9469 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9470 /*
9471  * CDDL HEADER START
9472  *
9473  * The contents of this file are subject to the terms of the
9474  * Common Development and Distribution License (the "License").
9475  * You may not use this file except in compliance with the License.
9476  *
9477  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9478  * or http://www.opensolaris.org/os/licensing.
9479  * See the License for the specific language governing permissions
9480  * and limitations under the License.
9481  *
9482  * When distributing Covered Code, include this CDDL HEADER in each
9483  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9484  * If applicable, add the following below this CDDL HEADER, with the
9485  * fields enclosed by brackets "[]" replaced with your own identifying
9486  * information: Portions Copyright [yyyy] [name of copyright owner]
9487  *
9488  * CDDL HEADER END
9489  */
9490 
9491 /*
9492  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9493  * Copyright 2016 Joyent, Inc.
9494  *
9495  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9496  * Use is subject to license terms.
9497  */
9498 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h" 2
9499 
9500 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9501 /*
9502  * CDDL HEADER START
9503  *
9504  * The contents of this file are subject to the terms of the
9505  * Common Development and Distribution License (the "License").
9506  * You may not use this file except in compliance with the License.
9507  *
9508  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9509  * or http://www.opensolaris.org/os/licensing.
9510  * See the License for the specific language governing permissions
9511  * and limitations under the License.
9512  *
9513  * When distributing Covered Code, include this CDDL HEADER in each
9514  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9515  * If applicable, add the following below this CDDL HEADER, with the
9516  * fields enclosed by brackets "[]" replaced with your own identifying
9517  * information: Portions Copyright [yyyy] [name of copyright owner]
9518  *
9519  * CDDL HEADER END
9520  */
9521 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9522 /*	  All Rights Reserved  	*/
9523 
9524 
9525 /*
9526  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9527  * Use is subject to license terms.
9528  *
9529  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9530  * Copyright 2016 Joyent, Inc.
9531  */
9532 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h" 2
9533 
9534 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9535 /*
9536  * CDDL HEADER START
9537  *
9538  * The contents of this file are subject to the terms of the
9539  * Common Development and Distribution License (the "License").
9540  * You may not use this file except in compliance with the License.
9541  *
9542  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9543  * or http://www.opensolaris.org/os/licensing.
9544  * See the License for the specific language governing permissions
9545  * and limitations under the License.
9546  *
9547  * When distributing Covered Code, include this CDDL HEADER in each
9548  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9549  * If applicable, add the following below this CDDL HEADER, with the
9550  * fields enclosed by brackets "[]" replaced with your own identifying
9551  * information: Portions Copyright [yyyy] [name of copyright owner]
9552  *
9553  * CDDL HEADER END
9554  */
9555 /*	Copyright (c) 1988 AT&T	*/
9556 /*	  All Rights Reserved  	*/
9557 
9558 
9559 /*
9560  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9561  *
9562  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9563  * Use is subject to license terms.
9564  */
9565 /*
9566  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9567  * Copyright 2016 Joyent, Inc.
9568  */
9569 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h" 2
9570 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
9571 /*
9572  * CDDL HEADER START
9573  *
9574  * The contents of this file are subject to the terms of the
9575  * Common Development and Distribution License (the "License").
9576  * You may not use this file except in compliance with the License.
9577  *
9578  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9579  * or http://www.opensolaris.org/os/licensing.
9580  * See the License for the specific language governing permissions
9581  * and limitations under the License.
9582  *
9583  * When distributing Covered Code, include this CDDL HEADER in each
9584  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9585  * If applicable, add the following below this CDDL HEADER, with the
9586  * fields enclosed by brackets "[]" replaced with your own identifying
9587  * information: Portions Copyright [yyyy] [name of copyright owner]
9588  *
9589  * CDDL HEADER END
9590  */
9591 
9592 /*
9593  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9594  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
9595  */
9596 
9597 /*	Copyright (c) 1988 AT&T	*/
9598 /*	  All Rights Reserved  	*/
9599 
9600 /*
9601  * User-visible pieces of the ANSI C standard I/O package.
9602  */
9603 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h" 2
9604 
9605 
9606 
9607 
9608 
9609 
9610 extern char *basename(char *);
9611 extern char *dirname(char *);
9612 
9613 
9614 extern char *regcmp(const char *, ...);
9615 extern char *regex(const char *, const char *, ...);
9616 
9617 
9618 
9619 
9620 
9621 
9622 extern char *__loc1; /* Marked LEGACY in XPG5 and removed in XPG6 */
9623 
9624 
9625 
9626 
9627 extern char *bgets(char *, size_t, FILE *, char *);
9628 extern size_t bufsplit(char *, size_t, char **);
9629 
9630 
9631 
9632 
9633 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h"
9634 #pragma redefine_extname copylist copylist64
9635 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h"
9636 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libgen.h"
9637 extern char *copylist(const char *, off_t *);
9638 
9639 
9640 extern char *copylist64(const char *, off64_t *);
9641 
9642 
9643 extern int eaccess(const char *, int);
9644 extern int gmatch(const char *, const char *);
9645 extern int isencrypt(const char *, size_t);
9646 extern int mkdirp(const char *, mode_t);
9647 extern int p2open(const char *, FILE *[2]);
9648 extern int p2close(FILE *[2]);
9649 extern char *pathfind(const char *, const char *, const char *);
9650 
9651 
9652 
9653 
9654 extern int __i_size;
9655 
9656 
9657 extern int rmdirp(char *, char *);
9658 extern char *strcadd(char *, const char *);
9659 extern char *strccpy(char *, const char *);
9660 extern char *streadd(char *, const char *, const char *);
9661 extern char *strecpy(char *, const char *, const char *);
9662 extern int strfind(const char *, const char *);
9663 extern char *strrspn(const char *, const char *);
9664 extern char *strtrns(const char *, const char *, const char *, char *);
9665 # 60 "lock.c" 2
9666 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
9667 /*
9668  * CDDL HEADER START
9669  *
9670  * The contents of this file are subject to the terms of the
9671  * Common Development and Distribution License (the "License").
9672  * You may not use this file except in compliance with the License.
9673  *
9674  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9675  * or http://www.opensolaris.org/os/licensing.
9676  * See the License for the specific language governing permissions
9677  * and limitations under the License.
9678  *
9679  * When distributing Covered Code, include this CDDL HEADER in each
9680  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9681  * If applicable, add the following below this CDDL HEADER, with the
9682  * fields enclosed by brackets "[]" replaced with your own identifying
9683  * information: Portions Copyright [yyyy] [name of copyright owner]
9684  *
9685  * CDDL HEADER END
9686  */
9687 
9688 /*
9689  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
9690  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
9691  */
9692 
9693 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
9694 /*	  All Rights Reserved  	*/
9695 
9696 /*
9697  * University Copyright- Copyright (c) 1982, 1986, 1988
9698  * The Regents of the University of California
9699  * All Rights Reserved
9700  *
9701  * University Acknowledgment- Portions of this document are derived from
9702  * software developed by the University of California, Berkeley, and its
9703  * contributors.
9704  */
9705 
9706 
9707 
9708 
9709 
9710 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9711 /*
9712  * CDDL HEADER START
9713  *
9714  * The contents of this file are subject to the terms of the
9715  * Common Development and Distribution License (the "License").
9716  * You may not use this file except in compliance with the License.
9717  *
9718  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9719  * or http://www.opensolaris.org/os/licensing.
9720  * See the License for the specific language governing permissions
9721  * and limitations under the License.
9722  *
9723  * When distributing Covered Code, include this CDDL HEADER in each
9724  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9725  * If applicable, add the following below this CDDL HEADER, with the
9726  * fields enclosed by brackets "[]" replaced with your own identifying
9727  * information: Portions Copyright [yyyy] [name of copyright owner]
9728  *
9729  * CDDL HEADER END
9730  */
9731 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9732 /*	  All Rights Reserved  	*/
9733 
9734 
9735 /*
9736  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9737  * Use is subject to license terms.
9738  *
9739  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9740  * Copyright 2016 Joyent, Inc.
9741  */
9742 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
9743 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
9744 /*
9745  * CDDL HEADER START
9746  *
9747  * The contents of this file are subject to the terms of the
9748  * Common Development and Distribution License (the "License").
9749  * You may not use this file except in compliance with the License.
9750  *
9751  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9752  * or http://www.opensolaris.org/os/licensing.
9753  * See the License for the specific language governing permissions
9754  * and limitations under the License.
9755  *
9756  *
9757  * When distributing Covered Code, include this CDDL HEADER in each
9758  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9759  * If applicable, add the following below this CDDL HEADER, with the
9760  * fields enclosed by brackets "[]" replaced with your own identifying
9761  * information: Portions Copyright [yyyy] [name of copyright owner]
9762  *
9763  * CDDL HEADER END
9764  */
9765 
9766 /*
9767  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9768  * Use is subject to license terms.
9769  * Copyright 2016 Joyent, Inc.
9770  */
9771 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
9772 
9773 
9774 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
9775 /*
9776  * This file and its contents are supplied under the terms of the
9777  * Common Development and Distribution License ("CDDL"), version 1.0.
9778  * You may only use this file in accordance with the terms of version
9779  * 1.0 of the CDDL.
9780  *
9781  * A full copy of the text of the CDDL should have accompanied this
9782  * source.  A copy of the CDDL is also available via the Internet at
9783  * http://www.illumos.org/license/CDDL.
9784  */
9785 
9786 /*
9787  * Copyright 2014-2016 PALO, Richard.
9788  */
9789 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
9790 
9791 
9792 
9793 
9794 
9795 /*
9796  * Fundamental variables; don't change too often.
9797  */
9798 
9799 /*
9800  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
9801  * an early merge with AT&T source.  It has also historically been defined
9802  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
9803  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
9804  * Subsequent versions of the IEEE Standard as well as the X/Open
9805  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
9806  * while still allowing for it's existence in other headers.  With the
9807  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
9808  */
9809 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9810     /* compatibility purposes only	*/
9811     /* and will be removed in a	*/
9812     /* later release		*/
9813 
9814 /*
9815  * These define the maximum and minimum allowable values of the
9816  * configurable parameter NGROUPS_MAX.
9817  */
9818 
9819 
9820 
9821 
9822 /*
9823  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
9824  */
9825 
9826 
9827 /*
9828  * Default process priority.  Keep it in sync with limits.h.
9829  */
9830 
9831 
9832 /*
9833  * Fundamental constants of the implementation--cannot be changed easily.
9834  */
9835 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9836 /* REMOTE -- whether machine is primary, secondary, or regular */
9837 
9838 
9839 
9840 /*
9841  * MAXPATHLEN defines the longest permissible path length,
9842  * including the terminating null, after expanding symbolic links.
9843  * TYPICALMAXPATHLEN is used in a few places as an optimization
9844  * with a local buffer on the stack to avoid kmem_alloc().
9845  * MAXSYMLINKS defines the maximum number of symbolic links
9846  * that may be expanded in a path name. It should be set high
9847  * enough to allow all legitimate uses, but halt infinite loops
9848  * reasonably quickly.
9849  * MAXNAMELEN is the length (including the terminating null) of
9850  * the longest permissible file (component) name.
9851  */
9852 
9853 
9854 
9855 
9856 
9857 /*
9858  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
9859  * including the terminating NUL.  Note that this must not be larger
9860  * than related networking constants such as LIFNAMSIZ.
9861  */
9862 
9863 
9864 
9865 
9866 
9867 
9868 /*
9869  * The following are defined to be the same as
9870  * defined in /usr/include/limits.h.  They are
9871  * needed for pipe and FIFO compatibility.
9872  */
9873 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9874 /* macros replacing interleaving functions */
9875 
9876 
9877 
9878 /*
9879  * File system parameters and macros.
9880  *
9881  * The file system is made out of blocks of at most MAXBSIZE units,
9882  * with smaller units (fragments) only in the last direct block.
9883  * MAXBSIZE primarily determines the size of buffers in the buffer
9884  * pool. It may be made larger without any effect on existing
9885  * file systems; however making it smaller make make some file
9886  * systems unmountable.
9887  *
9888  * Note that the blocked devices are assumed to have DEV_BSIZE
9889  * "sectors" and that fragments must be some multiple of this size.
9890  */
9891 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9892 /*	64 bit versions of btodb and dbtob */
9893 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9894 /*
9895  * Size of arg list passed in by user.
9896  */
9897 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9898 /*
9899  * Scale factor for scaled integers used to count
9900  * %cpu time and load averages.
9901  */
9902 
9903 
9904 
9905 /*
9906  * Delay units are in microseconds.
9907  *
9908  * XXX	These macros are not part of the DDI!
9909  */
9910 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9911 /*
9912  * The following is to free utilities from machine dependencies within
9913  * an architecture. Must be included after definition of DEV_BSIZE.
9914  */
9915 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
9916 /*
9917  * The following are assorted machine dependent values which can be
9918  * obtained in a machine independent manner through sysconf(2) or
9919  * sysinfo(2). In order to guarantee that these provide the expected
9920  * value at all times, the System Private interface (leading underscore)
9921  * is used.
9922  */
9923 
9924 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
9925 /*
9926  * CDDL HEADER START
9927  *
9928  * The contents of this file are subject to the terms of the
9929  * Common Development and Distribution License (the "License").
9930  * You may not use this file except in compliance with the License.
9931  *
9932  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9933  * or http://www.opensolaris.org/os/licensing.
9934  * See the License for the specific language governing permissions
9935  * and limitations under the License.
9936  *
9937  * When distributing Covered Code, include this CDDL HEADER in each
9938  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9939  * If applicable, add the following below this CDDL HEADER, with the
9940  * fields enclosed by brackets "[]" replaced with your own identifying
9941  * information: Portions Copyright [yyyy] [name of copyright owner]
9942  *
9943  * CDDL HEADER END
9944  */
9945 
9946 /*
9947  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
9948  *	  All Rights Reserved
9949  *
9950  */
9951 
9952 /*
9953  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9954  * Use is subject to license terms.
9955  */
9956 
9957 /*
9958  * WARNING: This is an implementation-specific header,
9959  * its contents are not guaranteed. Applications
9960  * should include <unistd.h> and not this header.
9961  */
9962 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
9963 
9964 
9965 
9966 
9967 
9968 
9969 extern long _sysconf(int); /* System Private interface to sysconf() */
9970 # 61 "lock.c" 2
9971 # 1 "/usr/include/openssl/bio.h" 1 3 4
9972 /* crypto/bio/bio.h */
9973 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9974  * All rights reserved.
9975  *
9976  * This package is an SSL implementation written
9977  * by Eric Young (eay@cryptsoft.com).
9978  * The implementation was written so as to conform with Netscapes SSL.
9979  *
9980  * This library is free for commercial and non-commercial use as long as
9981  * the following conditions are aheared to.  The following conditions
9982  * apply to all code found in this distribution, be it the RC4, RSA,
9983  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9984  * included with this distribution is covered by the same copyright terms
9985  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9986  *
9987  * Copyright remains Eric Young's, and as such any Copyright notices in
9988  * the code are not to be removed.
9989  * If this package is used in a product, Eric Young should be given attribution
9990  * as the author of the parts of the library used.
9991  * This can be in the form of a textual message at program startup or
9992  * in documentation (online or textual) provided with the package.
9993  *
9994  * Redistribution and use in source and binary forms, with or without
9995  * modification, are permitted provided that the following conditions
9996  * are met:
9997  * 1. Redistributions of source code must retain the copyright
9998  *    notice, this list of conditions and the following disclaimer.
9999  * 2. Redistributions in binary form must reproduce the above copyright
10000  *    notice, this list of conditions and the following disclaimer in the
10001  *    documentation and/or other materials provided with the distribution.
10002  * 3. All advertising materials mentioning features or use of this software
10003  *    must display the following acknowledgement:
10004  *    "This product includes cryptographic software written by
10005  *     Eric Young (eay@cryptsoft.com)"
10006  *    The word 'cryptographic' can be left out if the rouines from the library
10007  *    being used are not cryptographic related :-).
10008  * 4. If you include any Windows specific code (or a derivative thereof) from
10009  *    the apps directory (application code) you must include an acknowledgement:
10010  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10011  *
10012  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10013  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10014  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10015  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10016  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10017  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10018  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10019  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10020  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10021  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10022  * SUCH DAMAGE.
10023  *
10024  * The licence and distribution terms for any publically available version or
10025  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10026  * copied and put under another distribution licence
10027  * [including the GNU Public Licence.]
10028  */
10029 
10030 
10031 
10032 
10033 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10034 /* e_os2.h */
10035 /* ====================================================================
10036  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10037  *
10038  * Redistribution and use in source and binary forms, with or without
10039  * modification, are permitted provided that the following conditions
10040  * are met:
10041  *
10042  * 1. Redistributions of source code must retain the above copyright
10043  *    notice, this list of conditions and the following disclaimer.
10044  *
10045  * 2. Redistributions in binary form must reproduce the above copyright
10046  *    notice, this list of conditions and the following disclaimer in
10047  *    the documentation and/or other materials provided with the
10048  *    distribution.
10049  *
10050  * 3. All advertising materials mentioning features or use of this
10051  *    software must display the following acknowledgment:
10052  *    "This product includes software developed by the OpenSSL Project
10053  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10054  *
10055  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10056  *    endorse or promote products derived from this software without
10057  *    prior written permission. For written permission, please contact
10058  *    openssl-core@openssl.org.
10059  *
10060  * 5. Products derived from this software may not be called "OpenSSL"
10061  *    nor may "OpenSSL" appear in their names without prior written
10062  *    permission of the OpenSSL Project.
10063  *
10064  * 6. Redistributions of any form whatsoever must retain the following
10065  *    acknowledgment:
10066  *    "This product includes software developed by the OpenSSL Project
10067  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10068  *
10069  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10070  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10071  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10072  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10073  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10074  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10075  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10076  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10077  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10078  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10079  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10080  * OF THE POSSIBILITY OF SUCH DAMAGE.
10081  * ====================================================================
10082  *
10083  * This product includes cryptographic software written by Eric Young
10084  * (eay@cryptsoft.com).  This product includes software written by Tim
10085  * Hudson (tjh@cryptsoft.com).
10086  *
10087  */
10088 
10089 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10090 /* opensslconf.h */
10091 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10092 
10093 
10094 
10095 
10096 /* OpenSSL was configured with the following options: */
10097 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10098 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10099    asks for it.  This is a transient feature that is provided for those
10100    who haven't had the time to do the appropriate changes in their
10101    applications.  */
10102 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10103 /* crypto/opensslconf.h.in */
10104 
10105 /* Generate 80386 code? */
10106 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10107 # 65 "/usr/include/openssl/e_os2.h" 3 4
10108 /******************************************************************************
10109  * Detect operating systems.  This probably needs completing.
10110  * The result is that at least one OPENSSL_SYS_os macro should be defined.
10111  * However, if none is defined, Unix is assumed.
10112  **/
10113 
10114 
10115 
10116 /* ---------------------- Macintosh, before MacOS X ----------------------- */
10117 
10118 
10119 
10120 
10121 
10122 /* ---------------------- NetWare ----------------------------------------- */
10123 
10124 
10125 
10126 
10127 
10128 /* --------------------- Microsoft operating systems ---------------------- */
10129 
10130 /*
10131  * Note that MSDOS actually denotes 32-bit environments running on top of
10132  * MS-DOS, such as DJGPP one.
10133  */
10134 
10135 
10136 
10137 
10138 
10139 /*
10140  * For 32 bit environment, there seems to be the CygWin environment and then
10141  * all the others that try to do the same thing Microsoft does...
10142  */
10143 # 129 "/usr/include/openssl/e_os2.h" 3 4
10144 /* Anything that tries to look like Microsoft is "Windows" */
10145 # 138 "/usr/include/openssl/e_os2.h" 3 4
10146 /*
10147  * DLL settings.  This part is a bit tough, because it's up to the
10148  * application implementor how he or she will link the application, so it
10149  * requires some macro to be used.
10150  */
10151 # 152 "/usr/include/openssl/e_os2.h" 3 4
10152 /* ------------------------------- OpenVMS -------------------------------- */
10153 # 166 "/usr/include/openssl/e_os2.h" 3 4
10154 /* -------------------------------- OS/2 ---------------------------------- */
10155 
10156 
10157 
10158 
10159 
10160 /* -------------------------------- Unix ---------------------------------- */
10161 # 207 "/usr/include/openssl/e_os2.h" 3 4
10162 /* -------------------------------- VOS ----------------------------------- */
10163 # 218 "/usr/include/openssl/e_os2.h" 3 4
10164 /* ------------------------------ VxWorks --------------------------------- */
10165 
10166 
10167 
10168 
10169 /* -------------------------------- BeOS ---------------------------------- */
10170 # 234 "/usr/include/openssl/e_os2.h" 3 4
10171 /**
10172  * That's it for OS-specific stuff
10173  *****************************************************************************/
10174 
10175 /* Specials for I/O an exit */
10176 # 247 "/usr/include/openssl/e_os2.h" 3 4
10177 /*-
10178  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
10179  * certain global symbols that, with some compilers under VMS, have to be
10180  * defined and declared explicitely with globaldef and globalref.
10181  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
10182  * DLL exports and imports for compilers under Win32.  These are a little
10183  * more complicated to use.  Basically, for any library that exports some
10184  * global variables, the following code must be present in the header file
10185  * that declares them, before OPENSSL_EXTERN is used:
10186  *
10187  * #ifdef SOME_BUILD_FLAG_MACRO
10188  * # undef OPENSSL_EXTERN
10189  * # define OPENSSL_EXTERN OPENSSL_EXPORT
10190  * #endif
10191  *
10192  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
10193  * have some generally sensible values, and for OPENSSL_EXTERN to have the
10194  * value OPENSSL_IMPORT.
10195  */
10196 # 282 "/usr/include/openssl/e_os2.h" 3 4
10197 /*-
10198  * Macros to allow global variables to be reached through function calls when
10199  * required (if a shared library version requires it, for example.
10200  * The way it's done allows definitions like this:
10201  *
10202  *      // in foobar.c
10203  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
10204  *      // in foobar.h
10205  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
10206  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
10207  */
10208 # 63 "/usr/include/openssl/bio.h" 2 3 4
10209 
10210 
10211 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
10212 /*
10213  * CDDL HEADER START
10214  *
10215  * The contents of this file are subject to the terms of the
10216  * Common Development and Distribution License (the "License").
10217  * You may not use this file except in compliance with the License.
10218  *
10219  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10220  * or http://www.opensolaris.org/os/licensing.
10221  * See the License for the specific language governing permissions
10222  * and limitations under the License.
10223  *
10224  * When distributing Covered Code, include this CDDL HEADER in each
10225  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10226  * If applicable, add the following below this CDDL HEADER, with the
10227  * fields enclosed by brackets "[]" replaced with your own identifying
10228  * information: Portions Copyright [yyyy] [name of copyright owner]
10229  *
10230  * CDDL HEADER END
10231  */
10232 
10233 /*
10234  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10235  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10236  */
10237 
10238 /*	Copyright (c) 1988 AT&T	*/
10239 /*	  All Rights Reserved  	*/
10240 
10241 /*
10242  * User-visible pieces of the ANSI C standard I/O package.
10243  */
10244 # 66 "/usr/include/openssl/bio.h" 2 3 4
10245 
10246 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
10247 /*
10248  * CDDL HEADER START
10249  *
10250  * The contents of this file are subject to the terms of the
10251  * Common Development and Distribution License, Version 1.0 only
10252  * (the "License").  You may not use this file except in compliance
10253  * with the License.
10254  *
10255  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10256  * or http://www.opensolaris.org/os/licensing.
10257  * See the License for the specific language governing permissions
10258  * and limitations under the License.
10259  *
10260  * When distributing Covered Code, include this CDDL HEADER in each
10261  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10262  * If applicable, add the following below this CDDL HEADER, with the
10263  * fields enclosed by brackets "[]" replaced with your own identifying
10264  * information: Portions Copyright [yyyy] [name of copyright owner]
10265  *
10266  * CDDL HEADER END
10267  */
10268 /*	Copyright (c) 1988 AT&T	*/
10269 /*	  All Rights Reserved	*/
10270 
10271 /*
10272  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10273  *
10274  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10275  * Use is subject to license terms.
10276  */
10277 # 68 "/usr/include/openssl/bio.h" 2 3 4
10278 
10279 # 1 "/usr/include/openssl/crypto.h" 1 3 4
10280 /* crypto/crypto.h */
10281 /* ====================================================================
10282  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
10283  *
10284  * Redistribution and use in source and binary forms, with or without
10285  * modification, are permitted provided that the following conditions
10286  * are met:
10287  *
10288  * 1. Redistributions of source code must retain the above copyright
10289  *    notice, this list of conditions and the following disclaimer.
10290  *
10291  * 2. Redistributions in binary form must reproduce the above copyright
10292  *    notice, this list of conditions and the following disclaimer in
10293  *    the documentation and/or other materials provided with the
10294  *    distribution.
10295  *
10296  * 3. All advertising materials mentioning features or use of this
10297  *    software must display the following acknowledgment:
10298  *    "This product includes software developed by the OpenSSL Project
10299  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10300  *
10301  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10302  *    endorse or promote products derived from this software without
10303  *    prior written permission. For written permission, please contact
10304  *    openssl-core@openssl.org.
10305  *
10306  * 5. Products derived from this software may not be called "OpenSSL"
10307  *    nor may "OpenSSL" appear in their names without prior written
10308  *    permission of the OpenSSL Project.
10309  *
10310  * 6. Redistributions of any form whatsoever must retain the following
10311  *    acknowledgment:
10312  *    "This product includes software developed by the OpenSSL Project
10313  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10314  *
10315  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10316  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10317  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10318  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10319  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10320  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10321  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10322  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10323  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10324  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10325  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10326  * OF THE POSSIBILITY OF SUCH DAMAGE.
10327  * ====================================================================
10328  *
10329  * This product includes cryptographic software written by Eric Young
10330  * (eay@cryptsoft.com).  This product includes software written by Tim
10331  * Hudson (tjh@cryptsoft.com).
10332  *
10333  */
10334 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10335  * All rights reserved.
10336  *
10337  * This package is an SSL implementation written
10338  * by Eric Young (eay@cryptsoft.com).
10339  * The implementation was written so as to conform with Netscapes SSL.
10340  *
10341  * This library is free for commercial and non-commercial use as long as
10342  * the following conditions are aheared to.  The following conditions
10343  * apply to all code found in this distribution, be it the RC4, RSA,
10344  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10345  * included with this distribution is covered by the same copyright terms
10346  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10347  *
10348  * Copyright remains Eric Young's, and as such any Copyright notices in
10349  * the code are not to be removed.
10350  * If this package is used in a product, Eric Young should be given attribution
10351  * as the author of the parts of the library used.
10352  * This can be in the form of a textual message at program startup or
10353  * in documentation (online or textual) provided with the package.
10354  *
10355  * Redistribution and use in source and binary forms, with or without
10356  * modification, are permitted provided that the following conditions
10357  * are met:
10358  * 1. Redistributions of source code must retain the copyright
10359  *    notice, this list of conditions and the following disclaimer.
10360  * 2. Redistributions in binary form must reproduce the above copyright
10361  *    notice, this list of conditions and the following disclaimer in the
10362  *    documentation and/or other materials provided with the distribution.
10363  * 3. All advertising materials mentioning features or use of this software
10364  *    must display the following acknowledgement:
10365  *    "This product includes cryptographic software written by
10366  *     Eric Young (eay@cryptsoft.com)"
10367  *    The word 'cryptographic' can be left out if the rouines from the library
10368  *    being used are not cryptographic related :-).
10369  * 4. If you include any Windows specific code (or a derivative thereof) from
10370  *    the apps directory (application code) you must include an acknowledgement:
10371  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10372  *
10373  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10374  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10375  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10376  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10377  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10378  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10379  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10380  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10381  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10382  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10383  * SUCH DAMAGE.
10384  *
10385  * The licence and distribution terms for any publically available version or
10386  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10387  * copied and put under another distribution licence
10388  * [including the GNU Public Licence.]
10389  */
10390 /* ====================================================================
10391  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
10392  * ECDH support in OpenSSL originally developed by
10393  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
10394  */
10395 
10396 
10397 
10398 
10399 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
10400 /*
10401  * CDDL HEADER START
10402  *
10403  * The contents of this file are subject to the terms of the
10404  * Common Development and Distribution License (the "License").
10405  * You may not use this file except in compliance with the License.
10406  *
10407  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10408  * or http://www.opensolaris.org/os/licensing.
10409  * See the License for the specific language governing permissions
10410  * and limitations under the License.
10411  *
10412  * When distributing Covered Code, include this CDDL HEADER in each
10413  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10414  * If applicable, add the following below this CDDL HEADER, with the
10415  * fields enclosed by brackets "[]" replaced with your own identifying
10416  * information: Portions Copyright [yyyy] [name of copyright owner]
10417  *
10418  * CDDL HEADER END
10419  */
10420 
10421 /*
10422  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10423  * Copyright (c) 2013 Gary Mills
10424  *
10425  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10426  */
10427 
10428 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
10429 
10430 /*	Copyright (c) 1988 AT&T	*/
10431 /*	  All Rights Reserved  	*/
10432 # 121 "/usr/include/openssl/crypto.h" 2 3 4
10433 
10434 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10435 /* e_os2.h */
10436 /* ====================================================================
10437  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10438  *
10439  * Redistribution and use in source and binary forms, with or without
10440  * modification, are permitted provided that the following conditions
10441  * are met:
10442  *
10443  * 1. Redistributions of source code must retain the above copyright
10444  *    notice, this list of conditions and the following disclaimer.
10445  *
10446  * 2. Redistributions in binary form must reproduce the above copyright
10447  *    notice, this list of conditions and the following disclaimer in
10448  *    the documentation and/or other materials provided with the
10449  *    distribution.
10450  *
10451  * 3. All advertising materials mentioning features or use of this
10452  *    software must display the following acknowledgment:
10453  *    "This product includes software developed by the OpenSSL Project
10454  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10455  *
10456  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10457  *    endorse or promote products derived from this software without
10458  *    prior written permission. For written permission, please contact
10459  *    openssl-core@openssl.org.
10460  *
10461  * 5. Products derived from this software may not be called "OpenSSL"
10462  *    nor may "OpenSSL" appear in their names without prior written
10463  *    permission of the OpenSSL Project.
10464  *
10465  * 6. Redistributions of any form whatsoever must retain the following
10466  *    acknowledgment:
10467  *    "This product includes software developed by the OpenSSL Project
10468  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10469  *
10470  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10471  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10472  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10473  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10474  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10475  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10476  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10477  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10478  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10479  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10480  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10481  * OF THE POSSIBILITY OF SUCH DAMAGE.
10482  * ====================================================================
10483  *
10484  * This product includes cryptographic software written by Eric Young
10485  * (eay@cryptsoft.com).  This product includes software written by Tim
10486  * Hudson (tjh@cryptsoft.com).
10487  *
10488  */
10489 
10490 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10491 /* opensslconf.h */
10492 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10493 
10494 
10495 
10496 
10497 /* OpenSSL was configured with the following options: */
10498 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10499 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10500    asks for it.  This is a transient feature that is provided for those
10501    who haven't had the time to do the appropriate changes in their
10502    applications.  */
10503 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10504 /* crypto/opensslconf.h.in */
10505 
10506 /* Generate 80386 code? */
10507 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10508 # 123 "/usr/include/openssl/crypto.h" 2 3 4
10509 
10510 
10511 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
10512 /*
10513  * CDDL HEADER START
10514  *
10515  * The contents of this file are subject to the terms of the
10516  * Common Development and Distribution License (the "License").
10517  * You may not use this file except in compliance with the License.
10518  *
10519  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10520  * or http://www.opensolaris.org/os/licensing.
10521  * See the License for the specific language governing permissions
10522  * and limitations under the License.
10523  *
10524  * When distributing Covered Code, include this CDDL HEADER in each
10525  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10526  * If applicable, add the following below this CDDL HEADER, with the
10527  * fields enclosed by brackets "[]" replaced with your own identifying
10528  * information: Portions Copyright [yyyy] [name of copyright owner]
10529  *
10530  * CDDL HEADER END
10531  */
10532 
10533 /*
10534  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10535  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10536  */
10537 
10538 /*	Copyright (c) 1988 AT&T	*/
10539 /*	  All Rights Reserved  	*/
10540 
10541 /*
10542  * User-visible pieces of the ANSI C standard I/O package.
10543  */
10544 # 126 "/usr/include/openssl/crypto.h" 2 3 4
10545 
10546 
10547 # 1 "/usr/include/openssl/stack.h" 1 3 4
10548 /* crypto/stack/stack.h */
10549 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10550  * All rights reserved.
10551  *
10552  * This package is an SSL implementation written
10553  * by Eric Young (eay@cryptsoft.com).
10554  * The implementation was written so as to conform with Netscapes SSL.
10555  *
10556  * This library is free for commercial and non-commercial use as long as
10557  * the following conditions are aheared to.  The following conditions
10558  * apply to all code found in this distribution, be it the RC4, RSA,
10559  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10560  * included with this distribution is covered by the same copyright terms
10561  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10562  *
10563  * Copyright remains Eric Young's, and as such any Copyright notices in
10564  * the code are not to be removed.
10565  * If this package is used in a product, Eric Young should be given attribution
10566  * as the author of the parts of the library used.
10567  * This can be in the form of a textual message at program startup or
10568  * in documentation (online or textual) provided with the package.
10569  *
10570  * Redistribution and use in source and binary forms, with or without
10571  * modification, are permitted provided that the following conditions
10572  * are met:
10573  * 1. Redistributions of source code must retain the copyright
10574  *    notice, this list of conditions and the following disclaimer.
10575  * 2. Redistributions in binary form must reproduce the above copyright
10576  *    notice, this list of conditions and the following disclaimer in the
10577  *    documentation and/or other materials provided with the distribution.
10578  * 3. All advertising materials mentioning features or use of this software
10579  *    must display the following acknowledgement:
10580  *    "This product includes cryptographic software written by
10581  *     Eric Young (eay@cryptsoft.com)"
10582  *    The word 'cryptographic' can be left out if the rouines from the library
10583  *    being used are not cryptographic related :-).
10584  * 4. If you include any Windows specific code (or a derivative thereof) from
10585  *    the apps directory (application code) you must include an acknowledgement:
10586  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10587  *
10588  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10589  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10590  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10591  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10592  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10593  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10594  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10595  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10596  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10597  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10598  * SUCH DAMAGE.
10599  *
10600  * The licence and distribution terms for any publically available version or
10601  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10602  * copied and put under another distribution licence
10603  * [including the GNU Public Licence.]
10604  */
10605 # 66 "/usr/include/openssl/stack.h" 3 4
10606 typedef struct stack_st {
10607     int num;
10608     char **data;
10609     int sorted;
10610     int num_alloc;
10611     int (*comp) (const void *, const void *);
10612 } _STACK; /* Use STACK_OF(...) instead */
10613 
10614 
10615 
10616 
10617 int sk_num(const _STACK *);
10618 void *sk_value(const _STACK *, int);
10619 
10620 void *sk_set(_STACK *, int, void *);
10621 
10622 _STACK *sk_new(int (*cmp) (const void *, const void *));
10623 _STACK *sk_new_null(void);
10624 void sk_free(_STACK *);
10625 void sk_pop_free(_STACK *st, void (*func) (void *));
10626 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
10627 int sk_insert(_STACK *sk, void *data, int where);
10628 void *sk_delete(_STACK *st, int loc);
10629 void *sk_delete_ptr(_STACK *st, void *p);
10630 int sk_find(_STACK *st, void *data);
10631 int sk_find_ex(_STACK *st, void *data);
10632 int sk_push(_STACK *st, void *data);
10633 int sk_unshift(_STACK *st, void *data);
10634 void *sk_shift(_STACK *st);
10635 void *sk_pop(_STACK *st);
10636 void sk_zero(_STACK *st);
10637 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
10638  (const void *, const void *);
10639 _STACK *sk_dup(_STACK *st);
10640 void sk_sort(_STACK *st);
10641 int sk_is_sorted(const _STACK *st);
10642 # 129 "/usr/include/openssl/crypto.h" 2 3 4
10643 # 1 "/usr/include/openssl/safestack.h" 1 3 4
10644 /* ====================================================================
10645  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10646  *
10647  * Redistribution and use in source and binary forms, with or without
10648  * modification, are permitted provided that the following conditions
10649  * are met:
10650  *
10651  * 1. Redistributions of source code must retain the above copyright
10652  *    notice, this list of conditions and the following disclaimer.
10653  *
10654  * 2. Redistributions in binary form must reproduce the above copyright
10655  *    notice, this list of conditions and the following disclaimer in
10656  *    the documentation and/or other materials provided with the
10657  *    distribution.
10658  *
10659  * 3. All advertising materials mentioning features or use of this
10660  *    software must display the following acknowledgment:
10661  *    "This product includes software developed by the OpenSSL Project
10662  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10663  *
10664  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10665  *    endorse or promote products derived from this software without
10666  *    prior written permission. For written permission, please contact
10667  *    openssl-core@openssl.org.
10668  *
10669  * 5. Products derived from this software may not be called "OpenSSL"
10670  *    nor may "OpenSSL" appear in their names without prior written
10671  *    permission of the OpenSSL Project.
10672  *
10673  * 6. Redistributions of any form whatsoever must retain the following
10674  *    acknowledgment:
10675  *    "This product includes software developed by the OpenSSL Project
10676  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10677  *
10678  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10679  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10680  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10681  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10682  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10683  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10684  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10685  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10686  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10687  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10688  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10689  * OF THE POSSIBILITY OF SUCH DAMAGE.
10690  * ====================================================================
10691  *
10692  * This product includes cryptographic software written by Eric Young
10693  * (eay@cryptsoft.com).  This product includes software written by Tim
10694  * Hudson (tjh@cryptsoft.com).
10695  *
10696  */
10697 
10698 
10699 
10700 
10701 # 1 "/usr/include/openssl/stack.h" 1 3 4
10702 /* crypto/stack/stack.h */
10703 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10704  * All rights reserved.
10705  *
10706  * This package is an SSL implementation written
10707  * by Eric Young (eay@cryptsoft.com).
10708  * The implementation was written so as to conform with Netscapes SSL.
10709  *
10710  * This library is free for commercial and non-commercial use as long as
10711  * the following conditions are aheared to.  The following conditions
10712  * apply to all code found in this distribution, be it the RC4, RSA,
10713  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10714  * included with this distribution is covered by the same copyright terms
10715  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10716  *
10717  * Copyright remains Eric Young's, and as such any Copyright notices in
10718  * the code are not to be removed.
10719  * If this package is used in a product, Eric Young should be given attribution
10720  * as the author of the parts of the library used.
10721  * This can be in the form of a textual message at program startup or
10722  * in documentation (online or textual) provided with the package.
10723  *
10724  * Redistribution and use in source and binary forms, with or without
10725  * modification, are permitted provided that the following conditions
10726  * are met:
10727  * 1. Redistributions of source code must retain the copyright
10728  *    notice, this list of conditions and the following disclaimer.
10729  * 2. Redistributions in binary form must reproduce the above copyright
10730  *    notice, this list of conditions and the following disclaimer in the
10731  *    documentation and/or other materials provided with the distribution.
10732  * 3. All advertising materials mentioning features or use of this software
10733  *    must display the following acknowledgement:
10734  *    "This product includes cryptographic software written by
10735  *     Eric Young (eay@cryptsoft.com)"
10736  *    The word 'cryptographic' can be left out if the rouines from the library
10737  *    being used are not cryptographic related :-).
10738  * 4. If you include any Windows specific code (or a derivative thereof) from
10739  *    the apps directory (application code) you must include an acknowledgement:
10740  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10741  *
10742  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10743  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10744  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10745  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10746  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10747  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10748  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10749  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10750  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10751  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10752  * SUCH DAMAGE.
10753  *
10754  * The licence and distribution terms for any publically available version or
10755  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10756  * copied and put under another distribution licence
10757  * [including the GNU Public Licence.]
10758  */
10759 # 59 "/usr/include/openssl/safestack.h" 2 3 4
10760 # 69 "/usr/include/openssl/safestack.h" 3 4
10761 /*
10762  * In C++ we get problems because an explicit cast is needed from (void *) we
10763  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
10764  * below.
10765  */
10766 # 102 "/usr/include/openssl/safestack.h" 3 4
10767 /* nada (obsolete in new safestack approach)*/
10768 
10769 
10770 /*-
10771  * Strings are special: normally an lhash entry will point to a single
10772  * (somewhat) mutable object. In the case of strings:
10773  *
10774  * a) Instead of a single char, there is an array of chars, NUL-terminated.
10775  * b) The string may have be immutable.
10776  *
10777  * So, they need their own declarations. Especially important for
10778  * type-checking tools, such as Deputy.
10779  *
10780  * In practice, however, it appears to be hard to have a const
10781  * string. For now, I'm settling for dealing with the fact it is a
10782  * string at all.
10783  */
10784 typedef char *OPENSSL_STRING;
10785 
10786 typedef const char *OPENSSL_CSTRING;
10787 
10788 /*
10789  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
10790  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
10791  * above, instead of a single char each entry is a NUL-terminated array of
10792  * chars. So, we have to implement STRING specially for STACK_OF. This is
10793  * dealt with in the autogenerated macros below.
10794  */
10795 
10796 struct stack_st_OPENSSL_STRING { _STACK stack; };
10797 
10798 /*
10799  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
10800  * These should also be distinguished from "normal" stacks.
10801  */
10802 typedef void *OPENSSL_BLOCK;
10803 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
10804 
10805 /*
10806  * SKM_sk_... stack macros are internal to safestack.h: never use them
10807  * directly, use sk_<type>_... instead
10808  */
10809 # 211 "/usr/include/openssl/safestack.h" 3 4
10810 /*
10811  * This block of defines is updated by util/mkstack.pl, please do not touch!
10812  */
10813 # 130 "/usr/include/openssl/crypto.h" 2 3 4
10814 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
10815 
10816 
10817 
10818 
10819 
10820 
10821 
10822 /*-
10823  * Numeric release version identifier:
10824  * MNNFFPPS: major minor fix patch status
10825  * The status nibble has one of the values 0 for development, 1 to e for betas
10826  * 1 to 14, and f for release.  The patch level is exactly that.
10827  * For example:
10828  * 0.9.3-dev      0x00903000
10829  * 0.9.3-beta1    0x00903001
10830  * 0.9.3-beta2-dev 0x00903002
10831  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
10832  * 0.9.3          0x0090300f
10833  * 0.9.3a         0x0090301f
10834  * 0.9.4          0x0090400f
10835  * 1.2.3z         0x102031af
10836  *
10837  * For continuity reasons (because 0.9.5 is already out, and is coded
10838  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
10839  * part is slightly different, by setting the highest bit.  This means
10840  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
10841  * with 0x0090600S...
10842  *
10843  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
10844  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
10845  *  major minor fix final patch/beta)
10846  */
10847 # 41 "/usr/include/openssl/opensslv.h" 3 4
10848 /*-
10849  * The macros below are to be used for shared library (.so, .dll, ...)
10850  * versioning.  That kind of versioning works a bit differently between
10851  * operating systems.  The most usual scheme is to set a major and a minor
10852  * number, and have the runtime loader check that the major number is equal
10853  * to what it was at application link time, while the minor number has to
10854  * be greater or equal to what it was at application link time.  With this
10855  * scheme, the version number is usually part of the file name, like this:
10856  *
10857  *      libcrypto.so.0.9
10858  *
10859  * Some unixen also make a softlink with the major verson number only:
10860  *
10861  *      libcrypto.so.0
10862  *
10863  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
10864  * shared library version is stored in the file, and is actually a series
10865  * of versions, separated by colons.  The rightmost version present in the
10866  * library when linking an application is stored in the application to be
10867  * matched at run time.  When the application is run, a check is done to
10868  * see if the library version stored in the application matches any of the
10869  * versions in the version string of the library itself.
10870  * This version string can be constructed in any way, depending on what
10871  * kind of matching is desired.  However, to implement the same scheme as
10872  * the one used in the other unixen, all compatible versions, from lowest
10873  * to highest, should be part of the string.  Consecutive builds would
10874  * give the following versions strings:
10875  *
10876  *      3.0
10877  *      3.0:3.1
10878  *      3.0:3.1:3.2
10879  *      4.0
10880  *      4.0:4.1
10881  *
10882  * Notice how version 4 is completely incompatible with version, and
10883  * therefore give the breach you can see.
10884  *
10885  * There may be other schemes as well that I haven't yet discovered.
10886  *
10887  * So, here's the way it works here: first of all, the library version
10888  * number doesn't need at all to match the overall OpenSSL version.
10889  * However, it's nice and more understandable if it actually does.
10890  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
10891  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
10892  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
10893  * we need to keep a history of version numbers, which is done in the
10894  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
10895  * should only keep the versions that are binary compatible with the current.
10896  */
10897 # 131 "/usr/include/openssl/crypto.h" 2 3 4
10898 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10899 /* ====================================================================
10900  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10901  *
10902  * Redistribution and use in source and binary forms, with or without
10903  * modification, are permitted provided that the following conditions
10904  * are met:
10905  *
10906  * 1. Redistributions of source code must retain the above copyright
10907  *    notice, this list of conditions and the following disclaimer.
10908  *
10909  * 2. Redistributions in binary form must reproduce the above copyright
10910  *    notice, this list of conditions and the following disclaimer in
10911  *    the documentation and/or other materials provided with the
10912  *    distribution.
10913  *
10914  * 3. All advertising materials mentioning features or use of this
10915  *    software must display the following acknowledgment:
10916  *    "This product includes software developed by the OpenSSL Project
10917  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10918  *
10919  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10920  *    endorse or promote products derived from this software without
10921  *    prior written permission. For written permission, please contact
10922  *    openssl-core@openssl.org.
10923  *
10924  * 5. Products derived from this software may not be called "OpenSSL"
10925  *    nor may "OpenSSL" appear in their names without prior written
10926  *    permission of the OpenSSL Project.
10927  *
10928  * 6. Redistributions of any form whatsoever must retain the following
10929  *    acknowledgment:
10930  *    "This product includes software developed by the OpenSSL Project
10931  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10932  *
10933  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10934  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10935  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10936  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10937  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10938  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10939  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10940  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10941  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10942  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10943  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10944  * OF THE POSSIBILITY OF SUCH DAMAGE.
10945  * ====================================================================
10946  *
10947  * This product includes cryptographic software written by Eric Young
10948  * (eay@cryptsoft.com).  This product includes software written by Tim
10949  * Hudson (tjh@cryptsoft.com).
10950  *
10951  */
10952 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
10953 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10954 /* e_os2.h */
10955 /* ====================================================================
10956  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10957  *
10958  * Redistribution and use in source and binary forms, with or without
10959  * modification, are permitted provided that the following conditions
10960  * are met:
10961  *
10962  * 1. Redistributions of source code must retain the above copyright
10963  *    notice, this list of conditions and the following disclaimer.
10964  *
10965  * 2. Redistributions in binary form must reproduce the above copyright
10966  *    notice, this list of conditions and the following disclaimer in
10967  *    the documentation and/or other materials provided with the
10968  *    distribution.
10969  *
10970  * 3. All advertising materials mentioning features or use of this
10971  *    software must display the following acknowledgment:
10972  *    "This product includes software developed by the OpenSSL Project
10973  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10974  *
10975  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10976  *    endorse or promote products derived from this software without
10977  *    prior written permission. For written permission, please contact
10978  *    openssl-core@openssl.org.
10979  *
10980  * 5. Products derived from this software may not be called "OpenSSL"
10981  *    nor may "OpenSSL" appear in their names without prior written
10982  *    permission of the OpenSSL Project.
10983  *
10984  * 6. Redistributions of any form whatsoever must retain the following
10985  *    acknowledgment:
10986  *    "This product includes software developed by the OpenSSL Project
10987  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10988  *
10989  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10990  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10991  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10992  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10993  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10994  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10995  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10996  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10997  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10998  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10999  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11000  * OF THE POSSIBILITY OF SUCH DAMAGE.
11001  * ====================================================================
11002  *
11003  * This product includes cryptographic software written by Eric Young
11004  * (eay@cryptsoft.com).  This product includes software written by Tim
11005  * Hudson (tjh@cryptsoft.com).
11006  *
11007  */
11008 
11009 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11010 /* opensslconf.h */
11011 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11012 
11013 
11014 
11015 
11016 /* OpenSSL was configured with the following options: */
11017 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11018 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11019    asks for it.  This is a transient feature that is provided for those
11020    who haven't had the time to do the appropriate changes in their
11021    applications.  */
11022 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11023 /* crypto/opensslconf.h.in */
11024 
11025 /* Generate 80386 code? */
11026 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11027 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
11028 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
11029 typedef struct asn1_string_st ASN1_INTEGER;
11030 typedef struct asn1_string_st ASN1_ENUMERATED;
11031 typedef struct asn1_string_st ASN1_BIT_STRING;
11032 typedef struct asn1_string_st ASN1_OCTET_STRING;
11033 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
11034 typedef struct asn1_string_st ASN1_T61STRING;
11035 typedef struct asn1_string_st ASN1_IA5STRING;
11036 typedef struct asn1_string_st ASN1_GENERALSTRING;
11037 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
11038 typedef struct asn1_string_st ASN1_BMPSTRING;
11039 typedef struct asn1_string_st ASN1_UTCTIME;
11040 typedef struct asn1_string_st ASN1_TIME;
11041 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
11042 typedef struct asn1_string_st ASN1_VISIBLESTRING;
11043 typedef struct asn1_string_st ASN1_UTF8STRING;
11044 typedef struct asn1_string_st ASN1_STRING;
11045 typedef int ASN1_BOOLEAN;
11046 typedef int ASN1_NULL;
11047 
11048 
11049 typedef struct asn1_object_st ASN1_OBJECT;
11050 
11051 typedef struct ASN1_ITEM_st ASN1_ITEM;
11052 typedef struct asn1_pctx_st ASN1_PCTX;
11053 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
11054 typedef struct bignum_st BIGNUM;
11055 typedef struct bignum_ctx BN_CTX;
11056 typedef struct bn_blinding_st BN_BLINDING;
11057 typedef struct bn_mont_ctx_st BN_MONT_CTX;
11058 typedef struct bn_recp_ctx_st BN_RECP_CTX;
11059 typedef struct bn_gencb_st BN_GENCB;
11060 
11061 typedef struct buf_mem_st BUF_MEM;
11062 
11063 typedef struct evp_cipher_st EVP_CIPHER;
11064 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
11065 typedef struct env_md_st EVP_MD;
11066 typedef struct env_md_ctx_st EVP_MD_CTX;
11067 typedef struct evp_pkey_st EVP_PKEY;
11068 
11069 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
11070 
11071 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
11072 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
11073 
11074 typedef struct dh_st DH;
11075 typedef struct dh_method DH_METHOD;
11076 
11077 typedef struct dsa_st DSA;
11078 typedef struct dsa_method DSA_METHOD;
11079 
11080 typedef struct rsa_st RSA;
11081 typedef struct rsa_meth_st RSA_METHOD;
11082 
11083 typedef struct rand_meth_st RAND_METHOD;
11084 
11085 typedef struct ecdh_method ECDH_METHOD;
11086 typedef struct ecdsa_method ECDSA_METHOD;
11087 
11088 typedef struct x509_st X509;
11089 typedef struct X509_algor_st X509_ALGOR;
11090 typedef struct X509_crl_st X509_CRL;
11091 typedef struct x509_crl_method_st X509_CRL_METHOD;
11092 typedef struct x509_revoked_st X509_REVOKED;
11093 typedef struct X509_name_st X509_NAME;
11094 typedef struct X509_pubkey_st X509_PUBKEY;
11095 typedef struct x509_store_st X509_STORE;
11096 typedef struct x509_store_ctx_st X509_STORE_CTX;
11097 
11098 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
11099 
11100 typedef struct v3_ext_ctx X509V3_CTX;
11101 typedef struct conf_st CONF;
11102 
11103 typedef struct store_st STORE;
11104 typedef struct store_method_st STORE_METHOD;
11105 
11106 typedef struct ui_st UI;
11107 typedef struct ui_method_st UI_METHOD;
11108 
11109 typedef struct st_ERR_FNS ERR_FNS;
11110 
11111 typedef struct engine_st ENGINE;
11112 typedef struct ssl_st SSL;
11113 typedef struct ssl_ctx_st SSL_CTX;
11114 
11115 typedef struct comp_method_st COMP_METHOD;
11116 
11117 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
11118 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
11119 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
11120 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
11121 
11122 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
11123 typedef struct DIST_POINT_st DIST_POINT;
11124 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
11125 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
11126 
11127   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
11128 
11129 
11130 
11131 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
11132 /* Callback types for crypto.h */
11133 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
11134                            int idx, long argl, void *argp);
11135 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
11136                              int idx, long argl, void *argp);
11137 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
11138                            void *from_d, int idx, long argl, void *argp);
11139 
11140 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
11141 typedef struct ocsp_response_st OCSP_RESPONSE;
11142 typedef struct ocsp_responder_id_st OCSP_RESPID;
11143 # 132 "/usr/include/openssl/crypto.h" 2 3 4
11144 
11145 
11146 
11147 
11148 
11149 /*
11150  * Resolve problems on some operating systems with symbol names that clash
11151  * one way or another
11152  */
11153 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
11154 /* ====================================================================
11155  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11156  *
11157  * Redistribution and use in source and binary forms, with or without
11158  * modification, are permitted provided that the following conditions
11159  * are met:
11160  *
11161  * 1. Redistributions of source code must retain the above copyright
11162  *    notice, this list of conditions and the following disclaimer.
11163  *
11164  * 2. Redistributions in binary form must reproduce the above copyright
11165  *    notice, this list of conditions and the following disclaimer in
11166  *    the documentation and/or other materials provided with the
11167  *    distribution.
11168  *
11169  * 3. All advertising materials mentioning features or use of this
11170  *    software must display the following acknowledgment:
11171  *    "This product includes software developed by the OpenSSL Project
11172  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11173  *
11174  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11175  *    endorse or promote products derived from this software without
11176  *    prior written permission. For written permission, please contact
11177  *    openssl-core@openssl.org.
11178  *
11179  * 5. Products derived from this software may not be called "OpenSSL"
11180  *    nor may "OpenSSL" appear in their names without prior written
11181  *    permission of the OpenSSL Project.
11182  *
11183  * 6. Redistributions of any form whatsoever must retain the following
11184  *    acknowledgment:
11185  *    "This product includes software developed by the OpenSSL Project
11186  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11187  *
11188  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11189  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11190  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11191  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11192  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11193  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11194  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11195  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11196  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11197  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11198  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11199  * OF THE POSSIBILITY OF SUCH DAMAGE.
11200  * ====================================================================
11201  *
11202  * This product includes cryptographic software written by Eric Young
11203  * (eay@cryptsoft.com).  This product includes software written by Tim
11204  * Hudson (tjh@cryptsoft.com).
11205  *
11206  */
11207 
11208 
11209 
11210 
11211 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11212 /* e_os2.h */
11213 /* ====================================================================
11214  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11215  *
11216  * Redistribution and use in source and binary forms, with or without
11217  * modification, are permitted provided that the following conditions
11218  * are met:
11219  *
11220  * 1. Redistributions of source code must retain the above copyright
11221  *    notice, this list of conditions and the following disclaimer.
11222  *
11223  * 2. Redistributions in binary form must reproduce the above copyright
11224  *    notice, this list of conditions and the following disclaimer in
11225  *    the documentation and/or other materials provided with the
11226  *    distribution.
11227  *
11228  * 3. All advertising materials mentioning features or use of this
11229  *    software must display the following acknowledgment:
11230  *    "This product includes software developed by the OpenSSL Project
11231  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11232  *
11233  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11234  *    endorse or promote products derived from this software without
11235  *    prior written permission. For written permission, please contact
11236  *    openssl-core@openssl.org.
11237  *
11238  * 5. Products derived from this software may not be called "OpenSSL"
11239  *    nor may "OpenSSL" appear in their names without prior written
11240  *    permission of the OpenSSL Project.
11241  *
11242  * 6. Redistributions of any form whatsoever must retain the following
11243  *    acknowledgment:
11244  *    "This product includes software developed by the OpenSSL Project
11245  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11246  *
11247  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11248  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11249  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11250  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11251  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11252  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11253  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11254  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11255  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11256  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11257  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11258  * OF THE POSSIBILITY OF SUCH DAMAGE.
11259  * ====================================================================
11260  *
11261  * This product includes cryptographic software written by Eric Young
11262  * (eay@cryptsoft.com).  This product includes software written by Tim
11263  * Hudson (tjh@cryptsoft.com).
11264  *
11265  */
11266 
11267 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11268 /* opensslconf.h */
11269 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11270 
11271 
11272 
11273 
11274 /* OpenSSL was configured with the following options: */
11275 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11276 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11277    asks for it.  This is a transient feature that is provided for those
11278    who haven't had the time to do the appropriate changes in their
11279    applications.  */
11280 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11281 /* crypto/opensslconf.h.in */
11282 
11283 /* Generate 80386 code? */
11284 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11285 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
11286 
11287 /*
11288  * Hacks to solve the problem with linkers incapable of handling very long
11289  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
11290  * VAX.
11291  */
11292 /*
11293  * Note that this affects util/libeay.num and util/ssleay.num...  you may
11294  * change those manually, but that's not recommended, as those files are
11295  * controlled centrally and updated on Unix, and the central definition may
11296  * disagree with yours, which in turn may come with shareable library
11297  * incompatibilities.
11298  */
11299 # 481 "/usr/include/openssl/symhacks.h" 3 4
11300 /* Case insensitive linking causes problems.... */
11301 # 142 "/usr/include/openssl/crypto.h" 2 3 4
11302 
11303 
11304 
11305 
11306 
11307 /* Backward compatibility to SSLeay */
11308 /*
11309  * This is more to be used to check the correct DLL is being used in the MS
11310  * world.
11311  */
11312 
11313 
11314 /* #define SSLEAY_OPTIONS       1 no longer supported */
11315 
11316 
11317 
11318 
11319 
11320 /* Already declared in ossl_typ.h */
11321 # 174 "/usr/include/openssl/crypto.h" 3 4
11322 /* A generic structure to pass assorted data in a expandable way */
11323 typedef struct openssl_item_st {
11324     int code;
11325     void *value; /* Not used for flag attributes */
11326     size_t value_size; /* Max size of value for output, length for
11327                                  * input */
11328     size_t *value_length; /* Returned length of value for output */
11329 } OPENSSL_ITEM;
11330 
11331 /*
11332  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
11333  * names in cryptlib.c
11334  */
11335 # 256 "/usr/include/openssl/crypto.h" 3 4
11336 /*
11337  * Some applications as well as some parts of OpenSSL need to allocate and
11338  * deallocate locks in a dynamic fashion.  The following typedef makes this
11339  * possible in a type-safe manner.
11340  */
11341 /* struct CRYPTO_dynlock_value has to be defined by the application. */
11342 typedef struct {
11343     int references;
11344     struct CRYPTO_dynlock_value *data;
11345 } CRYPTO_dynlock;
11346 
11347 /*
11348  * The following can be used to detect memory leaks in the SSLeay library. It
11349  * used, it turns on malloc checking
11350  */
11351 
11352 
11353 
11354 
11355 
11356 
11357 /*
11358  * The following are bit values to turn on or off options connected to the
11359  * malloc checking functionality
11360  */
11361 
11362 /* Adds time to the memory checking information */
11363 
11364 /* Adds thread number to the memory checking information */
11365 
11366 
11367 
11368 
11369 /* predec of the BIO type */
11370 typedef struct bio_st BIO_dummy;
11371 
11372 struct crypto_ex_data_st {
11373     struct stack_st_void *sk;
11374     /* gcc is screwing up this data structure :-( */
11375     int dummy;
11376 };
11377 struct stack_st_void { _STACK stack; };
11378 
11379 /*
11380  * This stuff is basically class callback functions The current classes are
11381  * SSL_CTX, SSL, SSL_SESSION, and a few more
11382  */
11383 
11384 typedef struct crypto_ex_data_func_st {
11385     long argl; /* Arbitary long */
11386     void *argp; /* Arbitary void * */
11387     CRYPTO_EX_new *new_func;
11388     CRYPTO_EX_free *free_func;
11389     CRYPTO_EX_dup *dup_func;
11390 } CRYPTO_EX_DATA_FUNCS;
11391 
11392 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
11393 
11394 /*
11395  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
11396  * entry.
11397  */
11398 # 336 "/usr/include/openssl/crypto.h" 3 4
11399 /*
11400  * Dynamically assigned indexes start from this value (don't use directly,
11401  * use via CRYPTO_ex_data_new_class).
11402  */
11403 
11404 
11405 /*
11406  * This is the default callbacks, but we can have others as well: this is
11407  * needed in Win32 where the application malloc and the library malloc may
11408  * not be the same.
11409  */
11410 # 356 "/usr/include/openssl/crypto.h" 3 4
11411 /*
11412  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
11413  * is defined)
11414  */
11415 # 369 "/usr/include/openssl/crypto.h" 3 4
11416 int CRYPTO_mem_ctrl(int mode);
11417 int CRYPTO_is_mem_check_on(void);
11418 
11419 /* for applications */
11420 
11421 
11422 
11423 /* for library-internal use */
11424 # 396 "/usr/include/openssl/crypto.h" 3 4
11425 const char *SSLeay_version(int type);
11426 unsigned long SSLeay(void);
11427 
11428 int OPENSSL_issetugid(void);
11429 
11430 /* An opaque type representing an implementation of "ex_data" support */
11431 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
11432 /* Return an opaque pointer to the current "ex_data" implementation */
11433 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
11434 /* Sets the "ex_data" implementation to be used (if it's not too late) */
11435 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
11436 /* Get a new "ex_data" class, and return the corresponding "class_index" */
11437 int CRYPTO_ex_data_new_class(void);
11438 /* Within a given class, get/register a new index */
11439 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
11440                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
11441                             CRYPTO_EX_free *free_func);
11442 /*
11443  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
11444  * given class (invokes whatever per-class callbacks are applicable)
11445  */
11446 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
11447 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
11448                        CRYPTO_EX_DATA *from);
11449 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
11450 /*
11451  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
11452  * index (relative to the class type involved)
11453  */
11454 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
11455 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
11456 /*
11457  * This function cleans up all "ex_data" state. It mustn't be called under
11458  * potential race-conditions.
11459  */
11460 void CRYPTO_cleanup_all_ex_data(void);
11461 
11462 int CRYPTO_get_new_lockid(char *name);
11463 
11464 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
11465 void CRYPTO_lock(int mode, int type, const char *file, int line);
11466 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
11467                                                const char *file, int line));
11468 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
11469                                            const char *file, int line);
11470 void CRYPTO_set_add_lock_callback(int (*func)
11471                                    (int *num, int mount, int type,
11472                                     const char *file, int line));
11473 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
11474                                            const char *file, int line);
11475 
11476 /* Don't use this structure directly. */
11477 typedef struct crypto_threadid_st {
11478     void *ptr;
11479     unsigned long val;
11480 } CRYPTO_THREADID;
11481 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
11482 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
11483 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
11484 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
11485 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
11486 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
11487 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
11488 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
11489 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
11490 
11491 void CRYPTO_set_id_callback(unsigned long (*func) (void));
11492 unsigned long (*CRYPTO_get_id_callback(void)) (void);
11493 unsigned long CRYPTO_thread_id(void);
11494 
11495 
11496 const char *CRYPTO_get_lock_name(int type);
11497 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
11498                     int line);
11499 
11500 int CRYPTO_get_new_dynlockid(void);
11501 void CRYPTO_destroy_dynlockid(int i);
11502 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
11503 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
11504                                         *(*dyn_create_function) (const char
11505                                                                  *file,
11506                                                                  int line));
11507 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
11508                                        (int mode,
11509                                         struct CRYPTO_dynlock_value *l,
11510                                         const char *file, int line));
11511 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
11512                                           (struct CRYPTO_dynlock_value *l,
11513                                            const char *file, int line));
11514 struct CRYPTO_dynlock_value
11515 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
11516 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
11517                                                 struct CRYPTO_dynlock_value
11518                                                 *l, const char *file,
11519                                                 int line);
11520 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
11521                                                    *l, const char *file,
11522                                                    int line);
11523 
11524 /*
11525  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
11526  * the latter last if you need different functions
11527  */
11528 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
11529                              void (*f) (void *));
11530 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
11531                                     void (*free_func) (void *));
11532 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
11533                                 void *(*r) (void *, size_t, const char *,
11534                                             int), void (*f) (void *));
11535 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
11536                                        void (*free_func) (void *));
11537 int CRYPTO_set_mem_debug_functions(void (*m)
11538                                     (void *, int, const char *, int, int),
11539                                    void (*r) (void *, void *, int,
11540                                               const char *, int, int),
11541                                    void (*f) (void *, int), void (*so) (long),
11542                                    long (*go) (void));
11543 void CRYPTO_get_mem_functions(void *(**m) (size_t),
11544                               void *(**r) (void *, size_t),
11545                               void (**f) (void *));
11546 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
11547                                      void (**f) (void *));
11548 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
11549                                  void *(**r) (void *, size_t, const char *,
11550                                               int), void (**f) (void *));
11551 void CRYPTO_get_locked_mem_ex_functions(void
11552                                         *(**m) (size_t, const char *, int),
11553                                         void (**f) (void *));
11554 void CRYPTO_get_mem_debug_functions(void (**m)
11555                                      (void *, int, const char *, int, int),
11556                                     void (**r) (void *, void *, int,
11557                                                 const char *, int, int),
11558                                     void (**f) (void *, int),
11559                                     void (**so) (long), long (**go) (void));
11560 
11561 void *CRYPTO_malloc_locked(int num, const char *file, int line);
11562 void CRYPTO_free_locked(void *ptr);
11563 void *CRYPTO_malloc(int num, const char *file, int line);
11564 char *CRYPTO_strdup(const char *str, const char *file, int line);
11565 void CRYPTO_free(void *ptr);
11566 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
11567 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
11568                            int line);
11569 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
11570 
11571 void OPENSSL_cleanse(void *ptr, size_t len);
11572 
11573 void CRYPTO_set_mem_debug_options(long bits);
11574 long CRYPTO_get_mem_debug_options(void);
11575 
11576 
11577 
11578 int CRYPTO_push_info_(const char *info, const char *file, int line);
11579 int CRYPTO_pop_info(void);
11580 int CRYPTO_remove_all_info(void);
11581 
11582 /*
11583  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
11584  * used as default in CRYPTO_MDEBUG compilations):
11585  */
11586 /*-
11587  * The last argument has the following significance:
11588  *
11589  * 0:   called before the actual memory allocation has taken place
11590  * 1:   called after the actual memory allocation has taken place
11591  */
11592 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
11593                        int before_p);
11594 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
11595                         int line, int before_p);
11596 void CRYPTO_dbg_free(void *addr, int before_p);
11597 /*-
11598  * Tell the debugging code about options.  By default, the following values
11599  * apply:
11600  *
11601  * 0:                           Clear all options.
11602  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
11603  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
11604  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
11605  */
11606 void CRYPTO_dbg_set_options(long bits);
11607 long CRYPTO_dbg_get_options(void);
11608 
11609 
11610 void CRYPTO_mem_leaks_fp(FILE *);
11611 
11612 void CRYPTO_mem_leaks(struct bio_st *bio);
11613 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
11614 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
11615                                   void *);
11616 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
11617 
11618 /* die if we have to */
11619 void OpenSSLDie(const char *file, int line, const char *assertion);
11620 
11621 
11622 unsigned long *OPENSSL_ia32cap_loc(void);
11623 
11624 int OPENSSL_isservice(void);
11625 
11626 int FIPS_mode(void);
11627 int FIPS_mode_set(int r);
11628 
11629 void OPENSSL_init(void);
11630 # 624 "/usr/include/openssl/crypto.h" 3 4
11631 /*
11632  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
11633  * It takes an amount of time dependent on |len|, but independent of the
11634  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
11635  * into a defined order as the return value when a != b is undefined, other
11636  * than to be non-zero.
11637  */
11638 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
11639 
11640 /* BEGIN ERROR CODES */
11641 /*
11642  * The following lines are auto generated by the script mkerr.pl. Any changes
11643  * made after this point may be overwritten when the script is next run.
11644  */
11645 void ERR_load_CRYPTO_strings(void);
11646 
11647 /* Error codes for the CRYPTO functions. */
11648 
11649 /* Function codes. */
11650 # 654 "/usr/include/openssl/crypto.h" 3 4
11651 /* Reason codes. */
11652 # 70 "/usr/include/openssl/bio.h" 2 3 4
11653 # 83 "/usr/include/openssl/bio.h" 3 4
11654 /* These are the 'types' of BIOs */
11655 # 116 "/usr/include/openssl/bio.h" 3 4
11656 /*
11657  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
11658  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
11659  */
11660 
11661 
11662 
11663 /*
11664  * These are used in the following macros and are passed to BIO_ctrl()
11665  */
11666 # 139 "/usr/include/openssl/bio.h" 3 4
11667 /* callback is int cb(BIO *bio,state,ret); */
11668 
11669 
11670 
11671 
11672 
11673 /* dgram BIO stuff */
11674 # 157 "/usr/include/openssl/bio.h" 3 4
11675 /* #ifdef IP_MTU_DISCOVER */
11676 
11677 /* #endif */
11678 # 196 "/usr/include/openssl/bio.h" 3 4
11679 /* modifiers */
11680 # 208 "/usr/include/openssl/bio.h" 3 4
11681 /*
11682  * "UPLINK" flag denotes file descriptors provided by application. It
11683  * defaults to 0, as most platforms don't require UPLINK interface.
11684  */
11685 
11686 
11687 
11688 /* Used in BIO_gethostbyname() */
11689 
11690 
11691 
11692 
11693 
11694 
11695 /* Mostly used in the SSL BIO */
11696 /*-
11697  * Not used anymore
11698  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
11699  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
11700  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
11701  */
11702 
11703 
11704 
11705 /*
11706  * This is used with memory BIOs: it means we shouldn't free up or change the
11707  * data in any way.
11708  */
11709 
11710 
11711 typedef struct bio_st BIO;
11712 
11713 void BIO_set_flags(BIO *b, int flags);
11714 int BIO_test_flags(const BIO *b, int flags);
11715 void BIO_clear_flags(BIO *b, int flags);
11716 # 252 "/usr/include/openssl/bio.h" 3 4
11717 /* These are normally used internally in BIOs */
11718 
11719 
11720 
11721 
11722 
11723 /* These should be used by the application to tell why we should retry */
11724 
11725 
11726 
11727 
11728 
11729 
11730 /*
11731  * The next three are used in conjunction with the BIO_should_io_special()
11732  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
11733  * *reason); will walk the BIO stack and return the 'reason' for the special
11734  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
11735  * the code.
11736  */
11737 /*
11738  * Returned from the SSL bio when the certificate retrieval code had an error
11739  */
11740 
11741 /* Returned from the connect BIO when a connect would have blocked */
11742 
11743 /* Returned from the accept BIO when an accept would have blocked */
11744 
11745 
11746 /* These are passed by the BIO callback */
11747 
11748 
11749 
11750 
11751 
11752 
11753 
11754 /*
11755  * The callback is called before and after the underling operation, The
11756  * BIO_CB_RETURN flag indicates if it is after the call
11757  */
11758 
11759 
11760 
11761 
11762 
11763 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
11764                                         int, long, long);
11765 void BIO_set_callback(BIO *b,
11766                       long (*callback) (struct bio_st *, int, const char *,
11767                                         int, long, long));
11768 char *BIO_get_callback_arg(const BIO *b);
11769 void BIO_set_callback_arg(BIO *b, char *arg);
11770 
11771 const char *BIO_method_name(const BIO *b);
11772 int BIO_method_type(const BIO *b);
11773 
11774 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
11775                           long);
11776 
11777 typedef struct bio_method_st {
11778     int type;
11779     const char *name;
11780     int (*bwrite) (BIO *, const char *, int);
11781     int (*bread) (BIO *, char *, int);
11782     int (*bputs) (BIO *, const char *);
11783     int (*bgets) (BIO *, char *, int);
11784     long (*ctrl) (BIO *, int, long, void *);
11785     int (*create) (BIO *);
11786     int (*destroy) (BIO *);
11787     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
11788 } BIO_METHOD;
11789 
11790 struct bio_st {
11791     BIO_METHOD *method;
11792     /* bio, mode, argp, argi, argl, ret */
11793     long (*callback) (struct bio_st *, int, const char *, int, long, long);
11794     char *cb_arg; /* first argument for the callback */
11795     int init;
11796     int shutdown;
11797     int flags; /* extra storage */
11798     int retry_reason;
11799     int num;
11800     void *ptr;
11801     struct bio_st *next_bio; /* used by filter BIOs */
11802     struct bio_st *prev_bio; /* used by filter BIOs */
11803     int references;
11804     unsigned long num_read;
11805     unsigned long num_write;
11806     CRYPTO_EX_DATA ex_data;
11807 };
11808 
11809 struct stack_st_BIO { _STACK stack; };
11810 
11811 typedef struct bio_f_buffer_ctx_struct {
11812     /*-
11813      * Buffers are setup like this:
11814      *
11815      * <---------------------- size ----------------------->
11816      * +---------------------------------------------------+
11817      * | consumed | remaining          | free space        |
11818      * +---------------------------------------------------+
11819      * <-- off --><------- len ------->
11820      */
11821     /*- BIO *bio; *//*
11822      * this is now in the BIO struct
11823      */
11824     int ibuf_size; /* how big is the input buffer */
11825     int obuf_size; /* how big is the output buffer */
11826     char *ibuf; /* the char array */
11827     int ibuf_len; /* how many bytes are in it */
11828     int ibuf_off; /* write/read offset */
11829     char *obuf; /* the char array */
11830     int obuf_len; /* how many bytes are in it */
11831     int obuf_off; /* write/read offset */
11832 } BIO_F_BUFFER_CTX;
11833 
11834 /* Prefix and suffix callback in ASN1 BIO */
11835 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
11836                           void *parg);
11837 # 398 "/usr/include/openssl/bio.h" 3 4
11838 /* connect BIO stuff */
11839 # 407 "/usr/include/openssl/bio.h" 3 4
11840 /*
11841  * #define BIO_CONN_get_param_hostname BIO_ctrl
11842  */
11843 # 474 "/usr/include/openssl/bio.h" 3 4
11844 /* BIO_s_connect() and BIO_s_socks4a_connect() */
11845 # 486 "/usr/include/openssl/bio.h" 3 4
11846 /* BIO_s_accept() */
11847 
11848 
11849 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
11850 # 499 "/usr/include/openssl/bio.h" 3 4
11851 /* BIO_s_accept() and BIO_s_connect() */
11852 
11853 
11854 
11855 
11856 /* BIO_s_proxy_client() */
11857 
11858 
11859 /* BIO_set_nbio(b,n) */
11860 
11861 /* BIO *BIO_get_filter_bio(BIO *bio); */
11862 # 519 "/usr/include/openssl/bio.h" 3 4
11863 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
11864 
11865 
11866 
11867 /* BIO_s_file() */
11868 
11869 
11870 
11871 /* BIO_s_fd() and BIO_s_file() */
11872 
11873 
11874 
11875 /*
11876  * name is cast to lose const, but might be better to route through a
11877  * function so we can do it safely
11878  */
11879 # 552 "/usr/include/openssl/bio.h" 3 4
11880 /*
11881  * WARNING WARNING, this ups the reference count on the read bio of the SSL
11882  * structure.  This is because the ssl read BIO is now pointed to by the
11883  * next_bio field in the bio.  So when you free the BIO, make sure you are
11884  * doing a BIO_free_all() to catch the underlying BIO.
11885  */
11886 # 568 "/usr/include/openssl/bio.h" 3 4
11887 /* defined in evp.h */
11888 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
11889 
11890 
11891 
11892 
11893 
11894 
11895 
11896 /* For the BIO_f_buffer() type */
11897 
11898 
11899 
11900 
11901 
11902 
11903 /* Don't use the next one unless you know what you are doing :-) */
11904 # 593 "/usr/include/openssl/bio.h" 3 4
11905 /* ...pending macros have inappropriate return type */
11906 size_t BIO_ctrl_pending(BIO *b);
11907 size_t BIO_ctrl_wpending(BIO *b);
11908 
11909 
11910 
11911 
11912 
11913 /* For the BIO_f_buffer() type */
11914 
11915 
11916 /* For BIO_s_bio() */
11917 
11918 
11919 
11920 
11921 
11922 /* macros with inappropriate type -- but ...pending macros use int too: */
11923 
11924 
11925 size_t BIO_ctrl_get_write_guarantee(BIO *b);
11926 size_t BIO_ctrl_get_read_request(BIO *b);
11927 int BIO_ctrl_reset_read_request(BIO *b);
11928 
11929 /* ctrl macros for dgram */
11930 # 633 "/usr/include/openssl/bio.h" 3 4
11931 /* These two aren't currently implemented */
11932 /* int BIO_get_ex_num(BIO *bio); */
11933 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
11934 int BIO_set_ex_data(BIO *bio, int idx, void *data);
11935 void *BIO_get_ex_data(BIO *bio, int idx);
11936 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
11937                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
11938 unsigned long BIO_number_read(BIO *bio);
11939 unsigned long BIO_number_written(BIO *bio);
11940 
11941 /* For BIO_f_asn1() */
11942 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
11943                         asn1_ps_func *prefix_free);
11944 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
11945                         asn1_ps_func **pprefix_free);
11946 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
11947                         asn1_ps_func *suffix_free);
11948 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
11949                         asn1_ps_func **psuffix_free);
11950 
11951 
11952 BIO_METHOD *BIO_s_file(void);
11953 BIO *BIO_new_file(const char *filename, const char *mode);
11954 BIO *BIO_new_fp(FILE *stream, int close_flag);
11955 
11956 
11957 BIO *BIO_new(BIO_METHOD *type);
11958 int BIO_set(BIO *a, BIO_METHOD *type);
11959 int BIO_free(BIO *a);
11960 void BIO_vfree(BIO *a);
11961 int BIO_read(BIO *b, void *data, int len);
11962 int BIO_gets(BIO *bp, char *buf, int size);
11963 int BIO_write(BIO *b, const void *data, int len);
11964 int BIO_puts(BIO *bp, const char *buf);
11965 int BIO_indent(BIO *b, int indent, int max);
11966 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
11967 long BIO_callback_ctrl(BIO *b, int cmd,
11968                        void (*fp) (struct bio_st *, int, const char *, int,
11969                                    long, long));
11970 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
11971 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
11972 BIO *BIO_push(BIO *b, BIO *append);
11973 BIO *BIO_pop(BIO *b);
11974 void BIO_free_all(BIO *a);
11975 BIO *BIO_find_type(BIO *b, int bio_type);
11976 BIO *BIO_next(BIO *b);
11977 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
11978 int BIO_get_retry_reason(BIO *bio);
11979 BIO *BIO_dup_chain(BIO *in);
11980 
11981 int BIO_nread0(BIO *bio, char **buf);
11982 int BIO_nread(BIO *bio, char **buf, int num);
11983 int BIO_nwrite0(BIO *bio, char **buf);
11984 int BIO_nwrite(BIO *bio, char **buf, int num);
11985 
11986 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
11987                         long argl, long ret);
11988 
11989 BIO_METHOD *BIO_s_mem(void);
11990 BIO *BIO_new_mem_buf(const void *buf, int len);
11991 BIO_METHOD *BIO_s_socket(void);
11992 BIO_METHOD *BIO_s_connect(void);
11993 BIO_METHOD *BIO_s_accept(void);
11994 BIO_METHOD *BIO_s_fd(void);
11995 
11996 BIO_METHOD *BIO_s_log(void);
11997 
11998 BIO_METHOD *BIO_s_bio(void);
11999 BIO_METHOD *BIO_s_null(void);
12000 BIO_METHOD *BIO_f_null(void);
12001 BIO_METHOD *BIO_f_buffer(void);
12002 
12003 
12004 
12005 BIO_METHOD *BIO_f_nbio_test(void);
12006 
12007 BIO_METHOD *BIO_s_datagram(void);
12008 
12009 
12010 
12011 
12012 
12013 /* BIO_METHOD *BIO_f_ber(void); */
12014 
12015 int BIO_sock_should_retry(int i);
12016 int BIO_sock_non_fatal_error(int error);
12017 int BIO_dgram_non_fatal_error(int error);
12018 
12019 int BIO_fd_should_retry(int i);
12020 int BIO_fd_non_fatal_error(int error);
12021 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
12022                 void *u, const char *s, int len);
12023 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
12024                        void *u, const char *s, int len, int indent);
12025 int BIO_dump(BIO *b, const char *bytes, int len);
12026 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
12027 
12028 int BIO_dump_fp(FILE *fp, const char *s, int len);
12029 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
12030 
12031 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
12032                    int datalen);
12033 
12034 struct hostent *BIO_gethostbyname(const char *name);
12035 /*-
12036  * We might want a thread-safe interface too:
12037  * struct hostent *BIO_gethostbyname_r(const char *name,
12038  *     struct hostent *result, void *buffer, size_t buflen);
12039  * or something similar (caller allocates a struct hostent,
12040  * pointed to by "result", and additional buffer space for the various
12041  * substructures; if the buffer does not suffice, NULL is returned
12042  * and an appropriate error code is set).
12043  */
12044 int BIO_sock_error(int sock);
12045 int BIO_socket_ioctl(int fd, long type, void *arg);
12046 int BIO_socket_nbio(int fd, int mode);
12047 int BIO_get_port(const char *str, unsigned short *port_ptr);
12048 int BIO_get_host_ip(const char *str, unsigned char *ip);
12049 int BIO_get_accept_socket(char *host_port, int mode);
12050 int BIO_accept(int sock, char **ip_port);
12051 int BIO_sock_init(void);
12052 void BIO_sock_cleanup(void);
12053 int BIO_set_tcp_ndelay(int sock, int turn_on);
12054 
12055 BIO *BIO_new_socket(int sock, int close_flag);
12056 BIO *BIO_new_dgram(int fd, int close_flag);
12057 # 771 "/usr/include/openssl/bio.h" 3 4
12058 BIO *BIO_new_fd(int fd, int close_flag);
12059 BIO *BIO_new_connect(const char *host_port);
12060 BIO *BIO_new_accept(const char *host_port);
12061 
12062 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
12063                      BIO **bio2, size_t writebuf2);
12064 /*
12065  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
12066  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
12067  * value.
12068  */
12069 
12070 void BIO_copy_next_retry(BIO *b);
12071 
12072 /*
12073  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
12074  */
12075 
12076 
12077 
12078 
12079 
12080 
12081 int BIO_printf(BIO *bio, const char *format, ...)
12082 __attribute__((__format__(__printf__, 2, 3)));
12083 int BIO_vprintf(BIO *bio, const char *format, va_list args)
12084 __attribute__((__format__(__printf__, 2, 0)));
12085 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
12086 __attribute__((__format__(__printf__, 3, 4)));
12087 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
12088 __attribute__((__format__(__printf__, 3, 0)));
12089 
12090 
12091 /* BEGIN ERROR CODES */
12092 /*
12093  * The following lines are auto generated by the script mkerr.pl. Any changes
12094  * made after this point may be overwritten when the script is next run.
12095  */
12096 void ERR_load_BIO_strings(void);
12097 
12098 /* Error codes for the BIO functions. */
12099 
12100 /* Function codes. */
12101 # 849 "/usr/include/openssl/bio.h" 3 4
12102 /* Reason codes. */
12103 # 62 "lock.c" 2
12104 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 1
12105 /*
12106  * CDDL HEADER START
12107  *
12108  * The contents of this file are subject to the terms of the
12109  * Common Development and Distribution License, Version 1.0 only
12110  * (the "License").  You may not use this file except in compliance
12111  * with the License.
12112  *
12113  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12114  * or http://www.opensolaris.org/os/licensing.
12115  * See the License for the specific language governing permissions
12116  * and limitations under the License.
12117  *
12118  * When distributing Covered Code, include this CDDL HEADER in each
12119  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12120  * If applicable, add the following below this CDDL HEADER, with the
12121  * fields enclosed by brackets "[]" replaced with your own identifying
12122  * information: Portions Copyright [yyyy] [name of copyright owner]
12123  *
12124  * CDDL HEADER END
12125  */
12126 /*	Copyright (c) 1988 AT&T	*/
12127 /*	  All Rights Reserved  	*/
12128 
12129 
12130 /*
12131  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
12132  * Use is subject to license terms.
12133  */
12134 
12135 
12136 
12137 
12138 
12139 #pragma ident "%Z%%M%	%I%	%E% SMI"
12140 
12141 /*
12142  * Error codes
12143  */
12144 
12145 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
12146 /*
12147  * CDDL HEADER START
12148  *
12149  * The contents of this file are subject to the terms of the
12150  * Common Development and Distribution License, Version 1.0 only
12151  * (the "License").  You may not use this file except in compliance
12152  * with the License.
12153  *
12154  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12155  * or http://www.opensolaris.org/os/licensing.
12156  * See the License for the specific language governing permissions
12157  * and limitations under the License.
12158  *
12159  * When distributing Covered Code, include this CDDL HEADER in each
12160  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12161  * If applicable, add the following below this CDDL HEADER, with the
12162  * fields enclosed by brackets "[]" replaced with your own identifying
12163  * information: Portions Copyright [yyyy] [name of copyright owner]
12164  *
12165  * CDDL HEADER END
12166  */
12167 /*
12168  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
12169  * Use is subject to license terms.
12170  */
12171 
12172 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
12173 /*	  All Rights Reserved  	*/
12174 
12175 /*
12176  * University Copyright- Copyright (c) 1982, 1986, 1988
12177  * The Regents of the University of California
12178  * All Rights Reserved
12179  *
12180  * University Acknowledgment- Portions of this document are derived from
12181  * software developed by the University of California, Berkeley, and its
12182  * contributors.
12183  */
12184 
12185 
12186 
12187 
12188 #pragma ident "%Z%%M%	%I%	%E% SMI"
12189 
12190 
12191 
12192 
12193 
12194 /*
12195  * Error codes
12196  */
12197 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12198 /* Filesystem Quotas */
12199 
12200 
12201 /* Convergent Error Returns */
12202 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12203 /* Interprocess Robust Locks */
12204 
12205 
12206 
12207 /* stream problems */
12208 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12209 /* Interprocess Robust Locks */
12210 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12211 /* shared library problems */
12212 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12213 /* BSD Networking Software */
12214  /* argument errors */
12215 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12216     /* protocol family */
12217 
12218 
12219  /* operational errors */
12220 
12221 
12222 
12223     /* of reset */
12224 
12225 
12226 
12227 
12228 
12229 /* XENIX has 135 - 142 */
12230 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
12231 /* SUN Network File System */
12232 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 2
12233 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h"
12234 extern int *___errno();
12235 # 63 "lock.c" 2
12236 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h" 1
12237 /*
12238  * CDDL HEADER START
12239  *
12240  * The contents of this file are subject to the terms of the
12241  * Common Development and Distribution License, Version 1.0 only
12242  * (the "License").  You may not use this file except in compliance
12243  * with the License.
12244  *
12245  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12246  * or http://www.opensolaris.org/os/licensing.
12247  * See the License for the specific language governing permissions
12248  * and limitations under the License.
12249  *
12250  * When distributing Covered Code, include this CDDL HEADER in each
12251  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12252  * If applicable, add the following below this CDDL HEADER, with the
12253  * fields enclosed by brackets "[]" replaced with your own identifying
12254  * information: Portions Copyright [yyyy] [name of copyright owner]
12255  *
12256  * CDDL HEADER END
12257  */
12258 /*	Copyright (c) 1988 AT&T	*/
12259 /*	  All Rights Reserved  	*/
12260 
12261 /*
12262  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
12263  * Copyright 2016 Joyent, Inc.
12264  * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
12265  *
12266  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
12267  * Use is subject to license terms.
12268  */
12269 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
12270 extern void __assert(const char *, const char *, int);
12271 
12272 
12273 /*
12274  * In C11 the static_assert macro is always defined, unlike the assert macro.
12275  */
12276 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
12277 /*
12278  * Note that the ANSI C Standard requires all headers to be idempotent except
12279  * <assert.h> which is explicitly required not to be idempotent (section 4.1.2).
12280  * Therefore, it is by intent that the header guards (#ifndef _ASSERT_H) do
12281  * not span this entire file.
12282  */
12283 # 64 "lock.c" 2
12284 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
12285 /*
12286  * CDDL HEADER START
12287  *
12288  * The contents of this file are subject to the terms of the
12289  * Common Development and Distribution License (the "License").
12290  * You may not use this file except in compliance with the License.
12291  *
12292  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12293  * or http://www.opensolaris.org/os/licensing.
12294  * See the License for the specific language governing permissions
12295  * and limitations under the License.
12296  *
12297  * When distributing Covered Code, include this CDDL HEADER in each
12298  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12299  * If applicable, add the following below this CDDL HEADER, with the
12300  * fields enclosed by brackets "[]" replaced with your own identifying
12301  * information: Portions Copyright [yyyy] [name of copyright owner]
12302  *
12303  * CDDL HEADER END
12304  */
12305 /*	Copyright (c) 1988 AT&T	*/
12306 /*	  All Rights Reserved  	*/
12307 
12308 
12309 /*
12310  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
12311  *
12312  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
12313  * Use is subject to license terms.
12314  */
12315 /*
12316  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
12317  * Copyright 2016 Joyent, Inc.
12318  */
12319 # 65 "lock.c" 2
12320 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fnmatch.h" 1
12321 /*
12322  * CDDL HEADER START
12323  *
12324  * The contents of this file are subject to the terms of the
12325  * Common Development and Distribution License, Version 1.0 only
12326  * (the "License").  You may not use this file except in compliance
12327  * with the License.
12328  *
12329  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12330  * or http://www.opensolaris.org/os/licensing.
12331  * See the License for the specific language governing permissions
12332  * and limitations under the License.
12333  *
12334  * When distributing Covered Code, include this CDDL HEADER in each
12335  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12336  * If applicable, add the following below this CDDL HEADER, with the
12337  * fields enclosed by brackets "[]" replaced with your own identifying
12338  * information: Portions Copyright [yyyy] [name of copyright owner]
12339  *
12340  * CDDL HEADER END
12341  */
12342 /*
12343  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
12344  * Copyright (c) 1994 by Sun Microsystems, Inc.
12345  * Copyright 1985, 1994 by Mortice Kern Systems Inc.  All rights reserved.
12346  */
12347 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fnmatch.h"
12348     /* matched by period in pattern	*/
12349 
12350 
12351 
12352 
12353 
12354 
12355 extern int fnmatch(const char *, const char *, int);
12356 # 66 "lock.c" 2
12357 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 1
12358 /*
12359  * CDDL HEADER START
12360  *
12361  * The contents of this file are subject to the terms of the
12362  * Common Development and Distribution License (the "License").
12363  * You may not use this file except in compliance with the License.
12364  *
12365  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12366  * or http://www.opensolaris.org/os/licensing.
12367  * See the License for the specific language governing permissions
12368  * and limitations under the License.
12369  *
12370  * When distributing Covered Code, include this CDDL HEADER in each
12371  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12372  * If applicable, add the following below this CDDL HEADER, with the
12373  * fields enclosed by brackets "[]" replaced with your own identifying
12374  * information: Portions Copyright [yyyy] [name of copyright owner]
12375  *
12376  * CDDL HEADER END
12377  */
12378 /*
12379  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12380  * Use is subject to license terms.
12381  */
12382 
12383 
12384 
12385 
12386 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12387 /*
12388  * CDDL HEADER START
12389  *
12390  * The contents of this file are subject to the terms of the
12391  * Common Development and Distribution License (the "License").
12392  * You may not use this file except in compliance with the License.
12393  *
12394  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12395  * or http://www.opensolaris.org/os/licensing.
12396  * See the License for the specific language governing permissions
12397  * and limitations under the License.
12398  *
12399  * When distributing Covered Code, include this CDDL HEADER in each
12400  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12401  * If applicable, add the following below this CDDL HEADER, with the
12402  * fields enclosed by brackets "[]" replaced with your own identifying
12403  * information: Portions Copyright [yyyy] [name of copyright owner]
12404  *
12405  * CDDL HEADER END
12406  */
12407 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12408 /*	  All Rights Reserved  	*/
12409 
12410 
12411 /*
12412  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12413  * Use is subject to license terms.
12414  *
12415  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12416  * Copyright 2016 Joyent, Inc.
12417  */
12418 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
12419 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 1
12420 /*
12421  * CDDL HEADER START
12422  *
12423  * The contents of this file are subject to the terms of the
12424  * Common Development and Distribution License (the "License").
12425  * You may not use this file except in compliance with the License.
12426  *
12427  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12428  * or http://www.opensolaris.org/os/licensing.
12429  * See the License for the specific language governing permissions
12430  * and limitations under the License.
12431  *
12432  * When distributing Covered Code, include this CDDL HEADER in each
12433  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12434  * If applicable, add the following below this CDDL HEADER, with the
12435  * fields enclosed by brackets "[]" replaced with your own identifying
12436  * information: Portions Copyright [yyyy] [name of copyright owner]
12437  *
12438  * CDDL HEADER END
12439  */
12440 /*
12441  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
12442  * Copyright 2013, Joyent, Inc. All rights reserved.
12443  * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
12444  * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
12445  */
12446 
12447 
12448 
12449 
12450 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12451 /*
12452  * CDDL HEADER START
12453  *
12454  * The contents of this file are subject to the terms of the
12455  * Common Development and Distribution License (the "License").
12456  * You may not use this file except in compliance with the License.
12457  *
12458  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12459  * or http://www.opensolaris.org/os/licensing.
12460  * See the License for the specific language governing permissions
12461  * and limitations under the License.
12462  *
12463  * When distributing Covered Code, include this CDDL HEADER in each
12464  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12465  * If applicable, add the following below this CDDL HEADER, with the
12466  * fields enclosed by brackets "[]" replaced with your own identifying
12467  * information: Portions Copyright [yyyy] [name of copyright owner]
12468  *
12469  * CDDL HEADER END
12470  */
12471 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12472 /*	  All Rights Reserved  	*/
12473 
12474 
12475 /*
12476  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12477  * Use is subject to license terms.
12478  *
12479  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12480  * Copyright 2016 Joyent, Inc.
12481  */
12482 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
12483 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
12484 /*
12485  * CDDL HEADER START
12486  *
12487  * The contents of this file are subject to the terms of the
12488  * Common Development and Distribution License (the "License").
12489  * You may not use this file except in compliance with the License.
12490  *
12491  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12492  * or http://www.opensolaris.org/os/licensing.
12493  * See the License for the specific language governing permissions
12494  * and limitations under the License.
12495  *
12496  * When distributing Covered Code, include this CDDL HEADER in each
12497  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12498  * If applicable, add the following below this CDDL HEADER, with the
12499  * fields enclosed by brackets "[]" replaced with your own identifying
12500  * information: Portions Copyright [yyyy] [name of copyright owner]
12501  *
12502  * CDDL HEADER END
12503  */
12504 /*
12505  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
12506  */
12507 
12508 
12509 
12510 
12511 
12512 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12513 /*
12514  * CDDL HEADER START
12515  *
12516  * The contents of this file are subject to the terms of the
12517  * Common Development and Distribution License (the "License").
12518  * You may not use this file except in compliance with the License.
12519  *
12520  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12521  * or http://www.opensolaris.org/os/licensing.
12522  * See the License for the specific language governing permissions
12523  * and limitations under the License.
12524  *
12525  * When distributing Covered Code, include this CDDL HEADER in each
12526  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12527  * If applicable, add the following below this CDDL HEADER, with the
12528  * fields enclosed by brackets "[]" replaced with your own identifying
12529  * information: Portions Copyright [yyyy] [name of copyright owner]
12530  *
12531  * CDDL HEADER END
12532  */
12533 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12534 /*	  All Rights Reserved  	*/
12535 
12536 
12537 /*
12538  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12539  * Use is subject to license terms.
12540  *
12541  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12542  * Copyright 2016 Joyent, Inc.
12543  */
12544 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
12545 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
12546 /*
12547  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
12548  *
12549  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
12550  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
12551  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
12552  * cookie argument to mutex_init() encodes the interrupt level to block.
12553  * The iblock cookie must be NULL for adaptive locks.
12554  *
12555  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
12556  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
12557  *
12558  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
12559  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
12560  *
12561  * Mutex statistics can be gathered on the fly, without rebooting or
12562  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
12563  */
12564 typedef enum {
12565  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
12566  MUTEX_SPIN = 1, /* block interrupts and spin */
12567  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
12568  MUTEX_DEFAULT = 6 /* kernel default mutex */
12569 } kmutex_type_t;
12570 
12571 typedef struct mutex {
12572 
12573 
12574 
12575  void *_opaque[2];
12576 
12577 } kmutex_t;
12578 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
12579 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
12580 /*
12581  * CDDL HEADER START
12582  *
12583  * The contents of this file are subject to the terms of the
12584  * Common Development and Distribution License (the "License").
12585  * You may not use this file except in compliance with the License.
12586  *
12587  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12588  * or http://www.opensolaris.org/os/licensing.
12589  * See the License for the specific language governing permissions
12590  * and limitations under the License.
12591  *
12592  * When distributing Covered Code, include this CDDL HEADER in each
12593  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12594  * If applicable, add the following below this CDDL HEADER, with the
12595  * fields enclosed by brackets "[]" replaced with your own identifying
12596  * information: Portions Copyright [yyyy] [name of copyright owner]
12597  *
12598  * CDDL HEADER END
12599  */
12600 
12601 /*
12602  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
12603  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
12604  */
12605 
12606 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
12607 /*	  All Rights Reserved  	*/
12608 
12609 /*
12610  * University Copyright- Copyright (c) 1982, 1986, 1988
12611  * The Regents of the University of California
12612  * All Rights Reserved
12613  *
12614  * University Acknowledgment- Portions of this document are derived from
12615  * software developed by the University of California, Berkeley, and its
12616  * contributors.
12617  */
12618 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
12619 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
12620 /*
12621  * CDDL HEADER START
12622  *
12623  * The contents of this file are subject to the terms of the
12624  * Common Development and Distribution License (the "License").
12625  * You may not use this file except in compliance with the License.
12626  *
12627  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12628  * or http://www.opensolaris.org/os/licensing.
12629  * See the License for the specific language governing permissions
12630  * and limitations under the License.
12631  *
12632  * When distributing Covered Code, include this CDDL HEADER in each
12633  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12634  * If applicable, add the following below this CDDL HEADER, with the
12635  * fields enclosed by brackets "[]" replaced with your own identifying
12636  * information: Portions Copyright [yyyy] [name of copyright owner]
12637  *
12638  * CDDL HEADER END
12639  */
12640 /*
12641  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
12642  */
12643 
12644 
12645 
12646 
12647 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 1
12648 /*
12649  * CDDL HEADER START
12650  *
12651  * The contents of this file are subject to the terms of the
12652  * Common Development and Distribution License (the "License").
12653  * You may not use this file except in compliance with the License.
12654  *
12655  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12656  * or http://www.opensolaris.org/os/licensing.
12657  * See the License for the specific language governing permissions
12658  * and limitations under the License.
12659  *
12660  * When distributing Covered Code, include this CDDL HEADER in each
12661  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12662  * If applicable, add the following below this CDDL HEADER, with the
12663  * fields enclosed by brackets "[]" replaced with your own identifying
12664  * information: Portions Copyright [yyyy] [name of copyright owner]
12665  *
12666  * CDDL HEADER END
12667  */
12668 
12669 /*
12670  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
12671  * Copyright (c) 2012 by Delphix. All rights reserved.
12672  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12673  */
12674 
12675 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
12676 /*	  All Rights Reserved	*/
12677 
12678 
12679 
12680 
12681 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12682 /*
12683  * CDDL HEADER START
12684  *
12685  * The contents of this file are subject to the terms of the
12686  * Common Development and Distribution License (the "License").
12687  * You may not use this file except in compliance with the License.
12688  *
12689  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12690  * or http://www.opensolaris.org/os/licensing.
12691  * See the License for the specific language governing permissions
12692  * and limitations under the License.
12693  *
12694  * When distributing Covered Code, include this CDDL HEADER in each
12695  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12696  * If applicable, add the following below this CDDL HEADER, with the
12697  * fields enclosed by brackets "[]" replaced with your own identifying
12698  * information: Portions Copyright [yyyy] [name of copyright owner]
12699  *
12700  * CDDL HEADER END
12701  */
12702 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12703 /*	  All Rights Reserved  	*/
12704 
12705 
12706 /*
12707  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12708  * Use is subject to license terms.
12709  *
12710  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12711  * Copyright 2016 Joyent, Inc.
12712  */
12713 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 2
12714 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h" 1
12715 /*
12716  * CDDL HEADER START
12717  *
12718  * The contents of this file are subject to the terms of the
12719  * Common Development and Distribution License (the "License").
12720  * You may not use this file except in compliance with the License.
12721  *
12722  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12723  * or http://www.opensolaris.org/os/licensing.
12724  * See the License for the specific language governing permissions
12725  * and limitations under the License.
12726  *
12727  * When distributing Covered Code, include this CDDL HEADER in each
12728  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12729  * If applicable, add the following below this CDDL HEADER, with the
12730  * fields enclosed by brackets "[]" replaced with your own identifying
12731  * information: Portions Copyright [yyyy] [name of copyright owner]
12732  *
12733  * CDDL HEADER END
12734  */
12735 /*
12736  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
12737  * Copyright (c) 2012 by Delphix. All rights reserved.
12738  */
12739 
12740 
12741 
12742 
12743 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12744 /*
12745  * CDDL HEADER START
12746  *
12747  * The contents of this file are subject to the terms of the
12748  * Common Development and Distribution License (the "License").
12749  * You may not use this file except in compliance with the License.
12750  *
12751  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12752  * or http://www.opensolaris.org/os/licensing.
12753  * See the License for the specific language governing permissions
12754  * and limitations under the License.
12755  *
12756  * When distributing Covered Code, include this CDDL HEADER in each
12757  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12758  * If applicable, add the following below this CDDL HEADER, with the
12759  * fields enclosed by brackets "[]" replaced with your own identifying
12760  * information: Portions Copyright [yyyy] [name of copyright owner]
12761  *
12762  * CDDL HEADER END
12763  */
12764 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12765 /*	  All Rights Reserved  	*/
12766 
12767 
12768 /*
12769  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12770  * Use is subject to license terms.
12771  *
12772  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12773  * Copyright 2016 Joyent, Inc.
12774  */
12775 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h" 2
12776 
12777 
12778 
12779 
12780 
12781 
12782 /*
12783  * Per-allocation flags
12784  */
12785 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h"
12786 /*
12787  * The following flags are restricted for use only within the kernel.
12788  * VM_MEMLOAD is for use by the HAT to avoid infinite recursion.
12789  * VM_NORELOC is used by the kernel when static VA->PA mappings are required.
12790  */
12791 
12792 
12793 /*
12794  * VM_ABORT requests that vmem_alloc() *ignore* the VM_SLEEP/VM_NOSLEEP flags
12795  * and forgo reaping if the allocation or attempted import, fails.  This
12796  * flag is a segkmem-specific flag, and should not be used by anyone else.
12797  */
12798 
12799 
12800 /*
12801  * VM_ENDALLOC requests that large addresses be preferred in allocations.
12802  * Has no effect if VM_NEXTFIT is active.
12803  */
12804 
12805 
12806 
12807 
12808 /*
12809  * Arena creation flags
12810  */
12811 
12812 
12813 
12814 
12815 /*
12816  * internal use only;	the import function uses the vmem_ximport_t interface
12817  *			and may increase the request size if it so desires.
12818  *			VMC_XALIGN, for use with vmem_xcreate, specifies that
12819  *			the address returned by the import function will be
12820  *			aligned according to the alignment argument.
12821  */
12822 
12823 
12824 
12825 
12826 /*
12827  * Public segment types
12828  */
12829 
12830 
12831 
12832 /*
12833  * Implementation-private segment types
12834  */
12835 
12836 
12837 
12838 
12839 /*
12840  * VMEM_REENTRANT indicates to vmem_walk() that the callback routine may
12841  * call back into the arena being walked, so vmem_walk() must drop the
12842  * arena lock before each callback.  The caveat is that since the arena
12843  * isn't locked, its state can change.  Therefore it is up to the callback
12844  * routine to handle cases where the segment isn't of the expected type.
12845  * For example, we use this to walk heap_arena when generating a crash dump;
12846  * see segkmem_dump() for sample usage.
12847  */
12848 
12849 
12850 typedef struct vmem vmem_t;
12851 typedef void *(vmem_alloc_t)(vmem_t *, size_t, int);
12852 typedef void (vmem_free_t)(vmem_t *, void *, size_t);
12853 
12854 /*
12855  * Alternate import style; the requested size is passed in a pointer,
12856  * which can be increased by the import function if desired.
12857  */
12858 typedef void *(vmem_ximport_t)(vmem_t *, size_t *, size_t, int);
12859 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h"
12860 extern vmem_t *vmem_create(const char *, void *, size_t, size_t,
12861     vmem_alloc_t *, vmem_free_t *, vmem_t *, size_t, int);
12862 extern vmem_t *vmem_xcreate(const char *, void *, size_t, size_t,
12863     vmem_ximport_t *, vmem_free_t *, vmem_t *, size_t, int);
12864 extern void vmem_destroy(vmem_t *);
12865 extern void *vmem_alloc(vmem_t *, size_t, int);
12866 extern void *vmem_xalloc(vmem_t *, size_t, size_t, size_t, size_t,
12867     void *, void *, int);
12868 extern void vmem_free(vmem_t *, void *, size_t);
12869 extern void vmem_xfree(vmem_t *, void *, size_t);
12870 extern void *vmem_add(vmem_t *, void *, size_t, int);
12871 extern int vmem_contains(vmem_t *, void *, size_t);
12872 extern void vmem_walk(vmem_t *, int, void (*)(void *, void *, size_t), void *);
12873 extern size_t vmem_size(vmem_t *, int);
12874 extern void vmem_qcache_reap(vmem_t *vmp);
12875 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 2
12876 
12877 
12878 
12879 
12880 
12881 /*
12882  * Kernel memory allocator: DDI interfaces.
12883  * See kmem_alloc(9F) for details.
12884  */
12885 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h"
12886 /*
12887  * Kernel memory allocator: private interfaces.
12888  * These interfaces are still evolving.
12889  * Do not use them in unbundled drivers.
12890  */
12891 
12892 /*
12893  * Flags for kmem_cache_create()
12894  */
12895 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h"
12896 struct kmem_cache; /* cache structure is opaque to kmem clients */
12897 
12898 typedef struct kmem_cache kmem_cache_t;
12899 
12900 /* Client response to kmem move callback */
12901 typedef enum kmem_cbrc {
12902  KMEM_CBRC_YES,
12903  KMEM_CBRC_NO,
12904  KMEM_CBRC_LATER,
12905  KMEM_CBRC_DONT_NEED,
12906  KMEM_CBRC_DONT_KNOW
12907 } kmem_cbrc_t;
12908 # 29 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
12909 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 1
12910 /*
12911  * CDDL HEADER START
12912  *
12913  * The contents of this file are subject to the terms of the
12914  * Common Development and Distribution License (the "License").
12915  * You may not use this file except in compliance with the License.
12916  *
12917  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12918  * or http://www.opensolaris.org/os/licensing.
12919  * See the License for the specific language governing permissions
12920  * and limitations under the License.
12921  *
12922  * When distributing Covered Code, include this CDDL HEADER in each
12923  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12924  * If applicable, add the following below this CDDL HEADER, with the
12925  * fields enclosed by brackets "[]" replaced with your own identifying
12926  * information: Portions Copyright [yyyy] [name of copyright owner]
12927  *
12928  * CDDL HEADER END
12929  */
12930 /*
12931  * Copyright 2014 Garrrett D'Amore <garrett@damore.org>
12932  *
12933  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
12934  * Use is subject to license terms.
12935  */
12936 
12937 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12938 /*	  All Rights Reserved  	*/
12939 
12940 /*
12941  * University Copyright- Copyright (c) 1982, 1986, 1988
12942  * The Regents of the University of California
12943  * All Rights Reserved
12944  *
12945  * University Acknowledgment- Portions of this document are derived from
12946  * software developed by the University of California, Berkeley, and its
12947  * contributors.
12948  */
12949 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
12950 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12951 /*
12952  * CDDL HEADER START
12953  *
12954  * The contents of this file are subject to the terms of the
12955  * Common Development and Distribution License (the "License").
12956  * You may not use this file except in compliance with the License.
12957  *
12958  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12959  * or http://www.opensolaris.org/os/licensing.
12960  * See the License for the specific language governing permissions
12961  * and limitations under the License.
12962  *
12963  * When distributing Covered Code, include this CDDL HEADER in each
12964  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12965  * If applicable, add the following below this CDDL HEADER, with the
12966  * fields enclosed by brackets "[]" replaced with your own identifying
12967  * information: Portions Copyright [yyyy] [name of copyright owner]
12968  *
12969  * CDDL HEADER END
12970  */
12971 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12972 /*	  All Rights Reserved  	*/
12973 
12974 
12975 /*
12976  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12977  * Use is subject to license terms.
12978  *
12979  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12980  * Copyright 2016 Joyent, Inc.
12981  */
12982 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
12983 
12984 
12985 
12986 
12987 
12988 /*
12989  * Available local actions and flags.
12990  */
12991 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
12992 /*
12993  * Available global actions and flags.
12994  */
12995 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
12996 /*
12997  * getrctl(2) flag values
12998  */
12999 
13000 
13001 
13002 
13003 /*
13004  * setrctl(2) flag values
13005  */
13006 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
13007 /*
13008  * rctl_priv_t: rctl privilege defined values
13009  *   A large amount of space has been deliberately left between these privileges
13010  *   to permit future enrichment of the control privilege value.
13011  */
13012 
13013 
13014 
13015 
13016 typedef u_longlong_t rctl_qty_t; /* resource control numerical values   */
13017 typedef int rctl_priv_t;
13018 
13019 typedef struct rctlblk rctlblk_t;
13020 
13021 extern int setrctl(const char *, rctlblk_t *, rctlblk_t *, int);
13022 extern int getrctl(const char *, rctlblk_t *, rctlblk_t *, int);
13023 
13024 typedef enum {
13025  RCENTITY_PROCESS,
13026  RCENTITY_TASK,
13027  RCENTITY_PROJECT,
13028  RCENTITY_ZONE
13029 } rctl_entity_t;
13030 
13031 
13032 
13033 
13034 typedef struct rctl_set rctl_set_t;
13035 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
13036 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ipc_rctl.h" 1
13037 /*
13038  * CDDL HEADER START
13039  *
13040  * The contents of this file are subject to the terms of the
13041  * Common Development and Distribution License (the "License").
13042  * You may not use this file except in compliance with the License.
13043  *
13044  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13045  * or http://www.opensolaris.org/os/licensing.
13046  * See the License for the specific language governing permissions
13047  * and limitations under the License.
13048  *
13049  * When distributing Covered Code, include this CDDL HEADER in each
13050  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13051  * If applicable, add the following below this CDDL HEADER, with the
13052  * fields enclosed by brackets "[]" replaced with your own identifying
13053  * information: Portions Copyright [yyyy] [name of copyright owner]
13054  *
13055  * CDDL HEADER END
13056  */
13057 /*
13058  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
13059  * Use is subject to license terms.
13060  */
13061 
13062 
13063 
13064 
13065 #pragma ident "%Z%%M%	%I%	%E% SMI"
13066 
13067 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
13068 /*
13069  * CDDL HEADER START
13070  *
13071  * The contents of this file are subject to the terms of the
13072  * Common Development and Distribution License (the "License").
13073  * You may not use this file except in compliance with the License.
13074  *
13075  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13076  * or http://www.opensolaris.org/os/licensing.
13077  * See the License for the specific language governing permissions
13078  * and limitations under the License.
13079  *
13080  * When distributing Covered Code, include this CDDL HEADER in each
13081  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13082  * If applicable, add the following below this CDDL HEADER, with the
13083  * fields enclosed by brackets "[]" replaced with your own identifying
13084  * information: Portions Copyright [yyyy] [name of copyright owner]
13085  *
13086  * CDDL HEADER END
13087  */
13088 /*
13089  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
13090  */
13091 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ipc_rctl.h" 2
13092 
13093 
13094 
13095 
13096 
13097 typedef struct ipc_rqty { /* datum protected by:	*/
13098  rctl_qty_t ipcq_shmmni; /* shm's ipcs_lock	*/
13099  rctl_qty_t ipcq_semmni; /* sem's ipcs_lock	*/
13100  rctl_qty_t ipcq_msgmni; /* msg's ipcs_lock	*/
13101 } ipc_rqty_t;
13102 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
13103 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 1
13104 /*
13105  * CDDL HEADER START
13106  *
13107  * The contents of this file are subject to the terms of the
13108  * Common Development and Distribution License (the "License").
13109  * You may not use this file except in compliance with the License.
13110  *
13111  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13112  * or http://www.opensolaris.org/os/licensing.
13113  * See the License for the specific language governing permissions
13114  * and limitations under the License.
13115  *
13116  * When distributing Covered Code, include this CDDL HEADER in each
13117  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13118  * If applicable, add the following below this CDDL HEADER, with the
13119  * fields enclosed by brackets "[]" replaced with your own identifying
13120  * information: Portions Copyright [yyyy] [name of copyright owner]
13121  *
13122  * CDDL HEADER END
13123  */
13124 /*
13125  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
13126  *
13127  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13128  * Use is subject to license terms.
13129  */
13130 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h"
13131 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13132 /*
13133  * CDDL HEADER START
13134  *
13135  * The contents of this file are subject to the terms of the
13136  * Common Development and Distribution License (the "License").
13137  * You may not use this file except in compliance with the License.
13138  *
13139  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13140  * or http://www.opensolaris.org/os/licensing.
13141  * See the License for the specific language governing permissions
13142  * and limitations under the License.
13143  *
13144  * When distributing Covered Code, include this CDDL HEADER in each
13145  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13146  * If applicable, add the following below this CDDL HEADER, with the
13147  * fields enclosed by brackets "[]" replaced with your own identifying
13148  * information: Portions Copyright [yyyy] [name of copyright owner]
13149  *
13150  * CDDL HEADER END
13151  */
13152 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13153 /*	  All Rights Reserved  	*/
13154 
13155 
13156 /*
13157  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13158  * Use is subject to license terms.
13159  *
13160  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13161  * Copyright 2016 Joyent, Inc.
13162  */
13163 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
13164 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 1
13165 /*
13166  * CDDL HEADER START
13167  *
13168  * The contents of this file are subject to the terms of the
13169  * Common Development and Distribution License (the "License").
13170  * You may not use this file except in compliance with the License.
13171  *
13172  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13173  * or http://www.opensolaris.org/os/licensing.
13174  * See the License for the specific language governing permissions
13175  * and limitations under the License.
13176  *
13177  * When distributing Covered Code, include this CDDL HEADER in each
13178  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13179  * If applicable, add the following below this CDDL HEADER, with the
13180  * fields enclosed by brackets "[]" replaced with your own identifying
13181  * information: Portions Copyright [yyyy] [name of copyright owner]
13182  *
13183  * CDDL HEADER END
13184  */
13185 /*
13186  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
13187  *	  All Rights Reserved
13188  *
13189  */
13190 
13191 /*
13192  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
13193  *
13194  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13195  * Use is subject to license terms.
13196  */
13197 
13198 
13199 
13200 
13201 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13202 /*
13203  * CDDL HEADER START
13204  *
13205  * The contents of this file are subject to the terms of the
13206  * Common Development and Distribution License (the "License").
13207  * You may not use this file except in compliance with the License.
13208  *
13209  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13210  * or http://www.opensolaris.org/os/licensing.
13211  * See the License for the specific language governing permissions
13212  * and limitations under the License.
13213  *
13214  * When distributing Covered Code, include this CDDL HEADER in each
13215  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13216  * If applicable, add the following below this CDDL HEADER, with the
13217  * fields enclosed by brackets "[]" replaced with your own identifying
13218  * information: Portions Copyright [yyyy] [name of copyright owner]
13219  *
13220  * CDDL HEADER END
13221  */
13222 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13223 /*	  All Rights Reserved  	*/
13224 
13225 
13226 /*
13227  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13228  * Use is subject to license terms.
13229  *
13230  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13231  * Copyright 2016 Joyent, Inc.
13232  */
13233 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 2
13234 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
13235 /*
13236  * CDDL HEADER START
13237  *
13238  * The contents of this file are subject to the terms of the
13239  * Common Development and Distribution License, Version 1.0 only
13240  * (the "License").  You may not use this file except in compliance
13241  * with the License.
13242  *
13243  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13244  * or http://www.opensolaris.org/os/licensing.
13245  * See the License for the specific language governing permissions
13246  * and limitations under the License.
13247  *
13248  * When distributing Covered Code, include this CDDL HEADER in each
13249  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13250  * If applicable, add the following below this CDDL HEADER, with the
13251  * fields enclosed by brackets "[]" replaced with your own identifying
13252  * information: Portions Copyright [yyyy] [name of copyright owner]
13253  *
13254  * CDDL HEADER END
13255  */
13256 /*
13257  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
13258  * Use is subject to license terms.
13259  */
13260 
13261 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13262 /*	  All Rights Reserved  	*/
13263 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 2
13264 
13265 
13266 
13267 
13268 
13269 /*
13270  * Definitions for p_online, processor_info & lgrp system calls.
13271  */
13272 
13273 /*
13274  * Type for an lgrpid
13275  */
13276 typedef uint16_t lgrpid_t;
13277 
13278 /*
13279  * Type for processor name (CPU number).
13280  */
13281 typedef int processorid_t;
13282 typedef int chipid_t;
13283 
13284 /*
13285  * Flags and return values for p_online(2), and pi_state for processor_info(2).
13286  * These flags are *not* for in-kernel examination of CPU states.
13287  * See <sys/cpuvar.h> for appropriate informational functions.
13288  */
13289 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h"
13290 /*
13291  * String names for processor states defined above.
13292  */
13293 
13294 
13295 
13296 
13297 
13298 
13299 
13300 /*
13301  * Structure filled in by processor_info(2). This structure
13302  * SHOULD NOT BE MODIFIED. Changes to the structure would
13303  * negate ABI compatibility.
13304  *
13305  * The string fields are guaranteed to contain a NULL.
13306  *
13307  * The pi_fputypes field contains a (possibly empty) comma-separated
13308  * list of floating point identifier strings.
13309  */
13310 
13311 
13312 
13313 typedef struct {
13314  int pi_state; /* processor state, see above */
13315  char pi_processor_type[16]; /* ASCII CPU type */
13316  char pi_fputypes[32]; /* ASCII FPU types */
13317  int pi_clock; /* CPU clock freq in MHz */
13318 } processor_info_t;
13319 
13320 /*
13321  * Binding values for processor_bind(2)
13322  */
13323 
13324 
13325 
13326 
13327 
13328 
13329 /*
13330  * User-level system call interface prototypes
13331  */
13332 
13333 
13334 extern int p_online(processorid_t processorid, int flag);
13335 extern int processor_info(processorid_t processorid,
13336       processor_info_t *infop);
13337 extern int processor_bind(idtype_t idtype, id_t id,
13338       processorid_t processorid, processorid_t *obind);
13339 extern processorid_t getcpuid(void);
13340 extern lgrpid_t gethomelgroup(void);
13341 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
13342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
13343 /*
13344  * CDDL HEADER START
13345  *
13346  * The contents of this file are subject to the terms of the
13347  * Common Development and Distribution License, Version 1.0 only
13348  * (the "License").  You may not use this file except in compliance
13349  * with the License.
13350  *
13351  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13352  * or http://www.opensolaris.org/os/licensing.
13353  * See the License for the specific language governing permissions
13354  * and limitations under the License.
13355  *
13356  * When distributing Covered Code, include this CDDL HEADER in each
13357  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13358  * If applicable, add the following below this CDDL HEADER, with the
13359  * fields enclosed by brackets "[]" replaced with your own identifying
13360  * information: Portions Copyright [yyyy] [name of copyright owner]
13361  *
13362  * CDDL HEADER END
13363  */
13364 /*
13365  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
13366  * Use is subject to license terms.
13367  */
13368 
13369 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13370 /*	  All Rights Reserved  	*/
13371 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
13372 
13373 typedef int psetid_t;
13374 
13375 /* special processor set id's */
13376 
13377 
13378 
13379 
13380 
13381 
13382 
13383 /* types of processor sets */
13384 
13385 
13386 
13387 
13388 
13389 extern int pset_create(psetid_t *);
13390 extern int pset_destroy(psetid_t);
13391 extern int pset_assign(psetid_t, processorid_t, psetid_t *);
13392 extern int pset_info(psetid_t, int *, uint_t *, processorid_t *);
13393 extern int pset_bind(psetid_t, idtype_t, id_t, psetid_t *);
13394 extern int pset_bind_lwp(psetid_t, id_t, pid_t, psetid_t *);
13395 extern int pset_getloadavg(psetid_t, double [], int);
13396 extern int pset_list(psetid_t *, uint_t *);
13397 extern int pset_setattr(psetid_t, uint_t);
13398 extern int pset_getattr(psetid_t, uint_t *);
13399 
13400 
13401 
13402 
13403 
13404 /* system call subcodes */
13405 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h"
13406 /* attribute bits */
13407 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
13408 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 1
13409 /*
13410  * CDDL HEADER START
13411  *
13412  * The contents of this file are subject to the terms of the
13413  * Common Development and Distribution License (the "License").
13414  * You may not use this file except in compliance with the License.
13415  *
13416  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13417  * or http://www.opensolaris.org/os/licensing.
13418  * See the License for the specific language governing permissions
13419  * and limitations under the License.
13420  *
13421  * When distributing Covered Code, include this CDDL HEADER in each
13422  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13423  * If applicable, add the following below this CDDL HEADER, with the
13424  * fields enclosed by brackets "[]" replaced with your own identifying
13425  * information: Portions Copyright [yyyy] [name of copyright owner]
13426  *
13427  * CDDL HEADER END
13428  */
13429 /*
13430  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13431  * Use is subject to license terms.
13432  */
13433 
13434 
13435 
13436 
13437 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13438 /*
13439  * CDDL HEADER START
13440  *
13441  * The contents of this file are subject to the terms of the
13442  * Common Development and Distribution License (the "License").
13443  * You may not use this file except in compliance with the License.
13444  *
13445  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13446  * or http://www.opensolaris.org/os/licensing.
13447  * See the License for the specific language governing permissions
13448  * and limitations under the License.
13449  *
13450  * When distributing Covered Code, include this CDDL HEADER in each
13451  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13452  * If applicable, add the following below this CDDL HEADER, with the
13453  * fields enclosed by brackets "[]" replaced with your own identifying
13454  * information: Portions Copyright [yyyy] [name of copyright owner]
13455  *
13456  * CDDL HEADER END
13457  */
13458 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13459 /*	  All Rights Reserved  	*/
13460 
13461 
13462 /*
13463  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13464  * Use is subject to license terms.
13465  *
13466  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13467  * Copyright 2016 Joyent, Inc.
13468  */
13469 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 2
13470 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h"
13471 /*
13472  * types of label comparison
13473  */
13474 
13475 
13476 
13477 /* Manifest human readable label names */
13478 
13479 
13480 
13481 /* Binary Label Structure Definitions */
13482 
13483 typedef struct _mac_label_impl m_label_t;
13484 
13485 typedef m_label_t blevel_t, /* compatibility */
13486    bslabel_t, /* Sensitivity Label */
13487    bclear_t; /* Clearance */
13488 
13489 typedef struct _tsol_binary_level_lrange { /* Level Range */
13490  m_label_t *lower_bound;
13491  m_label_t *upper_bound;
13492 } m_range_t;
13493 
13494 typedef m_range_t blrange_t;
13495 
13496 typedef struct tsol_mlp_s {
13497  uchar_t mlp_ipp;
13498  uint16_t mlp_port;
13499  uint16_t mlp_port_upper;
13500 } tsol_mlp_t;
13501 
13502 /* Procedure Interface Definitions available to user and kernel */
13503 
13504 extern int bltype(const void *, uint8_t);
13505 extern int blequal(const m_label_t *, const m_label_t *);
13506 extern int bldominates(const m_label_t *, const m_label_t *);
13507 extern int blstrictdom(const m_label_t *, const m_label_t *);
13508 extern int blinrange(const m_label_t *, const m_range_t *);
13509 extern void blmaximum(m_label_t *, const m_label_t *);
13510 extern void blminimum(m_label_t *, const m_label_t *);
13511 extern void bsllow(m_label_t *);
13512 extern void bslhigh(m_label_t *);
13513 extern void bclearlow(m_label_t *);
13514 extern void bclearhigh(m_label_t *);
13515 extern void bslundef(m_label_t *);
13516 extern void bclearundef(m_label_t *);
13517 extern void setbltype(void *, uint8_t);
13518 extern boolean_t bisinvalid(const void *);
13519 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
13520 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
13521 /*
13522  * CDDL HEADER START
13523  *
13524  * The contents of this file are subject to the terms of the
13525  * Common Development and Distribution License (the "License").
13526  * You may not use this file except in compliance with the License.
13527  *
13528  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13529  * or http://www.opensolaris.org/os/licensing.
13530  * See the License for the specific language governing permissions
13531  * and limitations under the License.
13532  *
13533  * When distributing Covered Code, include this CDDL HEADER in each
13534  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13535  * If applicable, add the following below this CDDL HEADER, with the
13536  * fields enclosed by brackets "[]" replaced with your own identifying
13537  * information: Portions Copyright [yyyy] [name of copyright owner]
13538  *
13539  * CDDL HEADER END
13540  */
13541 /*
13542  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13543  * Use is subject to license terms.
13544  */
13545 
13546 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
13547 /*	  All Rights Reserved  	*/
13548 
13549 /*
13550  * Portions of this source code were derived from Berkeley 4.3 BSD
13551  * under license from the Regents of the University of California.
13552  */
13553 
13554 
13555 
13556 
13557 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13558 /*
13559  * CDDL HEADER START
13560  *
13561  * The contents of this file are subject to the terms of the
13562  * Common Development and Distribution License (the "License").
13563  * You may not use this file except in compliance with the License.
13564  *
13565  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13566  * or http://www.opensolaris.org/os/licensing.
13567  * See the License for the specific language governing permissions
13568  * and limitations under the License.
13569  *
13570  * When distributing Covered Code, include this CDDL HEADER in each
13571  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13572  * If applicable, add the following below this CDDL HEADER, with the
13573  * fields enclosed by brackets "[]" replaced with your own identifying
13574  * information: Portions Copyright [yyyy] [name of copyright owner]
13575  *
13576  * CDDL HEADER END
13577  */
13578 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13579 /*	  All Rights Reserved  	*/
13580 
13581 
13582 /*
13583  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13584  * Use is subject to license terms.
13585  *
13586  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13587  * Copyright 2016 Joyent, Inc.
13588  */
13589 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
13590 
13591 
13592 
13593 
13594 
13595 /*
13596  * The credential is an opaque kernel private data structure defined in
13597  * <sys/cred_impl.h>.
13598  */
13599 
13600 typedef struct cred cred_t;
13601 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
13602 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h" 1
13603 /*
13604  * CDDL HEADER START
13605  *
13606  * The contents of this file are subject to the terms of the
13607  * Common Development and Distribution License (the "License").
13608  * You may not use this file except in compliance with the License.
13609  *
13610  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13611  * or http://www.opensolaris.org/os/licensing.
13612  * See the License for the specific language governing permissions
13613  * and limitations under the License.
13614  *
13615  * When distributing Covered Code, include this CDDL HEADER in each
13616  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13617  * If applicable, add the following below this CDDL HEADER, with the
13618  * fields enclosed by brackets "[]" replaced with your own identifying
13619  * information: Portions Copyright [yyyy] [name of copyright owner]
13620  *
13621  * CDDL HEADER END
13622  */
13623 
13624 /*
13625  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13626  * Use is subject to license terms.
13627  */
13628 
13629 
13630 
13631 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 1
13632 /*
13633  * CDDL HEADER START
13634  *
13635  * The contents of this file are subject to the terms of the
13636  * Common Development and Distribution License (the "License").
13637  * You may not use this file except in compliance with the License.
13638  *
13639  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13640  * or http://www.opensolaris.org/os/licensing.
13641  * See the License for the specific language governing permissions
13642  * and limitations under the License.
13643  *
13644  * When distributing Covered Code, include this CDDL HEADER in each
13645  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13646  * If applicable, add the following below this CDDL HEADER, with the
13647  * fields enclosed by brackets "[]" replaced with your own identifying
13648  * information: Portions Copyright [yyyy] [name of copyright owner]
13649  *
13650  * CDDL HEADER END
13651  */
13652 /*
13653  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
13654  * Use is subject to license terms.
13655  *
13656  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
13657  */
13658 
13659 
13660 
13661 
13662 /*
13663  * Definition of general kernel statistics structures and /dev/kstat ioctls
13664  */
13665 
13666 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13667 /*
13668  * CDDL HEADER START
13669  *
13670  * The contents of this file are subject to the terms of the
13671  * Common Development and Distribution License (the "License").
13672  * You may not use this file except in compliance with the License.
13673  *
13674  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13675  * or http://www.opensolaris.org/os/licensing.
13676  * See the License for the specific language governing permissions
13677  * and limitations under the License.
13678  *
13679  * When distributing Covered Code, include this CDDL HEADER in each
13680  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13681  * If applicable, add the following below this CDDL HEADER, with the
13682  * fields enclosed by brackets "[]" replaced with your own identifying
13683  * information: Portions Copyright [yyyy] [name of copyright owner]
13684  *
13685  * CDDL HEADER END
13686  */
13687 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13688 /*	  All Rights Reserved  	*/
13689 
13690 
13691 /*
13692  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13693  * Use is subject to license terms.
13694  *
13695  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13696  * Copyright 2016 Joyent, Inc.
13697  */
13698 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 2
13699 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
13700 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13701 /*	  All Rights Reserved  	*/
13702 
13703 
13704 /*
13705  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
13706  * All rights reserved.  The Berkeley software License Agreement
13707  * specifies the terms and conditions for redistribution.
13708  */
13709 
13710 /*
13711  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
13712  *
13713  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13714  * Use is subject to license terms.
13715  *
13716  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13717  */
13718 
13719 /*
13720  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
13721  */
13722 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 2
13723 
13724 
13725 
13726 
13727 
13728 typedef int kid_t; /* unique kstat id */
13729 
13730 /*
13731  * Kernel statistics driver (/dev/kstat) ioctls
13732  */
13733 
13734 
13735 
13736 
13737 
13738 
13739 
13740 /*
13741  * /dev/kstat ioctl usage (kd denotes /dev/kstat descriptor):
13742  *
13743  *	kcid = ioctl(kd, KSTAT_IOC_CHAIN_ID, NULL);
13744  *	kcid = ioctl(kd, KSTAT_IOC_READ, kstat_t *);
13745  *	kcid = ioctl(kd, KSTAT_IOC_WRITE, kstat_t *);
13746  */
13747 
13748 
13749 
13750 /*
13751  * The generic kstat header
13752  */
13753 
13754 typedef struct kstat {
13755  /*
13756 	 * Fields relevant to both kernel and user
13757 	 */
13758  hrtime_t ks_crtime; /* creation time (from gethrtime()) */
13759  struct kstat *ks_next; /* kstat chain linkage */
13760  kid_t ks_kid; /* unique kstat ID */
13761  char ks_module[31]; /* provider module name */
13762  uchar_t ks_resv; /* reserved, currently just padding */
13763  int ks_instance; /* provider module's instance */
13764  char ks_name[31]; /* kstat name */
13765  uchar_t ks_type; /* kstat data type */
13766  char ks_class[31]; /* kstat class */
13767  uchar_t ks_flags; /* kstat flags */
13768  void *ks_data; /* kstat type-specific data */
13769  uint_t ks_ndata; /* # of type-specific data records */
13770  size_t ks_data_size; /* total size of kstat data section */
13771  hrtime_t ks_snaptime; /* time of last data shapshot */
13772  /*
13773 	 * Fields relevant to kernel only
13774 	 */
13775  int (*ks_update)(struct kstat *, int); /* dynamic update */
13776  void *ks_private; /* arbitrary provider-private data */
13777  int (*ks_snapshot)(struct kstat *, void *, int);
13778  void *ks_lock; /* protects this kstat's data */
13779 } kstat_t;
13780 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
13781 /*
13782  * kstat structure and locking strategy
13783  *
13784  * Each kstat consists of a header section (a kstat_t) and a data section.
13785  * The system maintains a set of kstats, protected by kstat_chain_lock.
13786  * kstat_chain_lock protects all additions to/deletions from this set,
13787  * as well as all changes to kstat headers.  kstat data sections are
13788  * *optionally* protected by the per-kstat ks_lock.  If ks_lock is non-NULL,
13789  * kstat clients (e.g. /dev/kstat) will acquire this lock for all of their
13790  * operations on that kstat.  It is up to the kstat provider to decide whether
13791  * guaranteeing consistent data to kstat clients is sufficiently important
13792  * to justify the locking cost.  Note, however, that most statistic updates
13793  * already occur under one of the provider's mutexes, so if the provider sets
13794  * ks_lock to point to that mutex, then kstat data locking is free.
13795  *
13796  * NOTE: variable-size kstats MUST employ kstat data locking, to prevent
13797  * data-size races with kstat clients.
13798  *
13799  * NOTE: ks_lock is really of type (kmutex_t *); it is declared as (void *)
13800  * in the kstat header so that users don't have to be exposed to all of the
13801  * kernel's lock-related data structures.
13802  */
13803 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
13804 /*
13805  * kstat time
13806  *
13807  * All times associated with kstats (e.g. creation time, snapshot time,
13808  * kstat_timer_t and kstat_io_t timestamps, etc.) are 64-bit nanosecond values,
13809  * as returned by gethrtime().  The accuracy of these timestamps is machine
13810  * dependent, but the precision (units) is the same across all platforms.
13811  */
13812 
13813 /*
13814  * kstat identity (KID)
13815  *
13816  * Each kstat is assigned a unique KID (kstat ID) when it is added to the
13817  * global kstat chain.  The KID is used as a cookie by /dev/kstat to
13818  * request information about the corresponding kstat.  There is also
13819  * an identity associated with the entire kstat chain, kstat_chain_id,
13820  * which is bumped each time a kstat is added or deleted.  /dev/kstat uses
13821  * the chain ID to detect changes in the kstat chain (e.g., a new disk
13822  * coming online) between ioctl()s.
13823  */
13824 
13825 /*
13826  * kstat module, kstat instance
13827  *
13828  * ks_module and ks_instance contain the name and instance of the module
13829  * that created the kstat.  In cases where there can only be one instance,
13830  * ks_instance is 0.  The kernel proper (/kernel/unix) uses "unix" as its
13831  * module name.
13832  */
13833 
13834 /*
13835  * kstat name
13836  *
13837  * ks_name gives a meaningful name to a kstat.  The full kstat namespace
13838  * is module.instance.name, so the name only need be unique within a
13839  * module.  kstat_create() will fail if you try to create a kstat with
13840  * an already-used (ks_module, ks_instance, ks_name) triplet.  Spaces are
13841  * allowed in kstat names, but strongly discouraged, since they hinder
13842  * awk-style processing at user level.
13843  */
13844 
13845 /*
13846  * kstat type
13847  *
13848  * The kstat mechanism provides several flavors of kstat data, defined
13849  * below.  The "raw" kstat type is just treated as an array of bytes; you
13850  * can use this to export any kind of data you want.
13851  *
13852  * Some kstat types allow multiple data structures per kstat, e.g.
13853  * KSTAT_TYPE_NAMED; others do not.  This is part of the spec for each
13854  * kstat data type.
13855  *
13856  * User-level tools should *not* rely on the #define KSTAT_NUM_TYPES.  To
13857  * get this information, read out the standard system kstat "kstat_types".
13858  */
13859 
13860 
13861      /* ks_ndata >= 1 */
13862 
13863      /* ks_ndata >= 1 */
13864 
13865      /* ks_ndata == 1 */
13866 
13867      /* ks_ndata == 1 */
13868 
13869      /* ks_ndata >= 1 */
13870 
13871 
13872 
13873 /*
13874  * kstat class
13875  *
13876  * Each kstat can be characterized as belonging to some broad class
13877  * of statistics, e.g. disk, tape, net, vm, streams, etc.  This field
13878  * can be used as a filter to extract related kstats.  The following
13879  * values are currently in use: disk, tape, net, controller, vm, kvm,
13880  * hat, streams, kstat, and misc.  (The kstat class encompasses things
13881  * like kstat_types.)
13882  */
13883 
13884 /*
13885  * kstat flags
13886  *
13887  * Any of the following flags may be passed to kstat_create().  They are
13888  * all zero by default.
13889  *
13890  *	KSTAT_FLAG_VIRTUAL:
13891  *
13892  *		Tells kstat_create() not to allocate memory for the
13893  *		kstat data section; instead, you will set the ks_data
13894  *		field to point to the data you wish to export.  This
13895  *		provides a convenient way to export existing data
13896  *		structures.
13897  *
13898  *	KSTAT_FLAG_VAR_SIZE:
13899  *
13900  *		The size of the kstat you are creating will vary over time.
13901  *		For example, you may want to use the kstat mechanism to
13902  *		export a linked list.  NOTE: The kstat framework does not
13903  *		manage the data section, so all variable-size kstats must be
13904  *		virtual kstats.  Moreover, variable-size kstats MUST employ
13905  *		kstat data locking to prevent data-size races with kstat
13906  *		clients.  See the section on "kstat snapshot" for details.
13907  *
13908  *	KSTAT_FLAG_WRITABLE:
13909  *
13910  *		Makes the kstat's data section writable by root.
13911  *		The ks_snapshot routine (see below) does not need to check for
13912  *		this; permission checking is handled in the kstat driver.
13913  *
13914  *	KSTAT_FLAG_PERSISTENT:
13915  *
13916  *		Indicates that this kstat is to be persistent over time.
13917  *		For persistent kstats, kstat_delete() simply marks the
13918  *		kstat as dormant; a subsequent kstat_create() reactivates
13919  *		the kstat.  This feature is provided so that statistics
13920  *		are not lost across driver close/open (e.g., raw disk I/O
13921  *		on a disk with no mounted partitions.)
13922  *		NOTE: Persistent kstats cannot be virtual, since ks_data
13923  *		points to garbage as soon as the driver goes away.
13924  *
13925  * The following flags are maintained by the kstat framework:
13926  *
13927  *	KSTAT_FLAG_DORMANT:
13928  *
13929  *		For persistent kstats, indicates that the kstat is in the
13930  *		dormant state (e.g., the corresponding device is closed).
13931  *
13932  *	KSTAT_FLAG_INVALID:
13933  *
13934  *		This flag is set when a kstat is in a transitional state,
13935  *		e.g. between kstat_create() and kstat_install().
13936  *		kstat clients must not attempt to access the kstat's data
13937  *		if this flag is set.
13938  *
13939  *	KSTAT_FLAG_LONGSTRINGS:
13940  *
13941  *		Indicates that this kstat contains long strings (which
13942  *		are stored outside of the kstat data section). When copied
13943  *		out to user space the string data will be held in the data
13944  *		section provided by the user.
13945  */
13946 # 316 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
13947 /*
13948  * Dynamic update support
13949  *
13950  * The kstat mechanism allows for an optional ks_update function to update
13951  * kstat data.  This is useful for drivers where the underlying device
13952  * keeps cheap hardware stats, but extraction is expensive.  Instead of
13953  * constantly keeping the kstat data section up to date, you can supply a
13954  * ks_update function which updates the kstat's data section on demand.
13955  * To take advantage of this feature, simply set the ks_update field before
13956  * calling kstat_install().
13957  *
13958  * The ks_update function, if supplied, must have the following structure:
13959  *
13960  *	int
13961  *	foo_kstat_update(kstat_t *ksp, int rw)
13962  *	{
13963  *		if (rw == KSTAT_WRITE) {
13964  *			... update the native stats from ksp->ks_data;
13965  *				return EACCES if you don't support this
13966  *		} else {
13967  *			... update ksp->ks_data from the native stats
13968  *		}
13969  *	}
13970  *
13971  * The ks_update return codes are: 0 for success, EACCES if you don't allow
13972  * KSTAT_WRITE, and EIO for any other type of error.
13973  *
13974  * In general, the ks_update function may need to refer to provider-private
13975  * data; for example, it may need a pointer to the provider's raw statistics.
13976  * The ks_private field is available for this purpose.  Its use is entirely
13977  * at the provider's discretion.
13978  *
13979  * All variable-size kstats MUST supply a ks_update routine, which computes
13980  * and sets ks_data_size (and ks_ndata if that is meaningful), since these
13981  * are needed to perform kstat snapshots (see below).
13982  *
13983  * No kstat locking should be done inside the ks_update routine.  The caller
13984  * will already be holding the kstat's ks_lock (to ensure consistent data).
13985  */
13986 
13987 
13988 
13989 
13990 /*
13991  * Kstat snapshot
13992  *
13993  * In order to get a consistent view of a kstat's data, clients must obey
13994  * the kstat's locking strategy.  However, these clients may need to perform
13995  * operations on the data which could cause a fault (e.g. copyout()), or
13996  * operations which are simply expensive.  Doing so could cause deadlock
13997  * (e.g. if you're holding a disk's kstat lock which is ultimately required
13998  * to resolve a copyout() fault), performance degradation (since the providers'
13999  * activity is serialized at the kstat lock), device timing problems, etc.
14000  *
14001  * To avoid these problems, kstat data is provided via snapshots.  Taking
14002  * a snapshot is a simple process: allocate a wired-down kernel buffer,
14003  * acquire the kstat's data lock, copy the data into the buffer ("take the
14004  * snapshot"), and release the lock.  This ensures that the kstat's data lock
14005  * will be held as briefly as possible, and that no faults will occur while
14006  * the lock is held.
14007  *
14008  * Normally, the snapshot is taken by default_kstat_snapshot(), which
14009  * timestamps the data (sets ks_snaptime), copies it, and does a little
14010  * massaging to deal with incomplete transactions on i/o kstats.  However,
14011  * this routine only works for kstats with contiguous data (the typical case).
14012  * If you create a kstat whose data is, say, a linked list, you must provide
14013  * your own ks_snapshot routine.  The routine you supply must have the
14014  * following prototype (replace "foo" with something appropriate):
14015  *
14016  *	int foo_kstat_snapshot(kstat_t *ksp, void *buf, int rw);
14017  *
14018  * The minimal snapshot routine -- one which copies contiguous data that
14019  * doesn't need any massaging -- would be this:
14020  *
14021  *	ksp->ks_snaptime = gethrtime();
14022  *	if (rw == KSTAT_WRITE)
14023  *		bcopy(buf, ksp->ks_data, ksp->ks_data_size);
14024  *	else
14025  *		bcopy(ksp->ks_data, buf, ksp->ks_data_size);
14026  *	return (0);
14027  *
14028  * A more illuminating example is taking a snapshot of a linked list:
14029  *
14030  *	ksp->ks_snaptime = gethrtime();
14031  *	if (rw == KSTAT_WRITE)
14032  *		return (EACCES);		... See below ...
14033  *	for (foo = first_foo; foo; foo = foo->next) {
14034  *		bcopy((char *) foo, (char *) buf, sizeof (struct foo));
14035  *		buf = ((struct foo *) buf) + 1;
14036  *	}
14037  *	return (0);
14038  *
14039  * In the example above, we have decided that we don't want to allow
14040  * KSTAT_WRITE access, so we return EACCES if this is attempted.
14041  *
14042  * The key points are:
14043  *
14044  *	(1) ks_snaptime must be set (via gethrtime()) to timestamp the data.
14045  *	(2) Data gets copied from the kstat to the buffer on KSTAT_READ,
14046  *		and from the buffer to the kstat on KSTAT_WRITE.
14047  *	(3) ks_snapshot return values are: 0 for success, EACCES if you
14048  *		don't allow KSTAT_WRITE, and EIO for any other type of error.
14049  *
14050  * Named kstats (see section on "Named statistics" below) containing long
14051  * strings (KSTAT_DATA_STRING) need special handling.  The kstat driver
14052  * assumes that all strings are copied into the buffer after the array of
14053  * named kstats, and the pointers (KSTAT_NAMED_STR_PTR()) are updated to point
14054  * into the copy within the buffer. The default snapshot routine does this,
14055  * but overriding routines should contain at least the following:
14056  *
14057  * if (rw == KSTAT_READ) {
14058  * 	kstat_named_t *knp = buf;
14059  * 	char *end = knp + ksp->ks_ndata;
14060  * 	uint_t i;
14061  *
14062  * 	... Do the regular copy ...
14063  * 	bcopy(ksp->ks_data, buf, sizeof (kstat_named_t) * ksp->ks_ndata);
14064  *
14065  * 	for (i = 0; i < ksp->ks_ndata; i++, knp++) {
14066  *		if (knp[i].data_type == KSTAT_DATA_STRING &&
14067  *		    KSTAT_NAMED_STR_PTR(knp) != NULL) {
14068  *			bcopy(KSTAT_NAMED_STR_PTR(knp), end,
14069  *			    KSTAT_NAMED_STR_BUFLEN(knp));
14070  *			KSTAT_NAMED_STR_PTR(knp) = end;
14071  *			end += KSTAT_NAMED_STR_BUFLEN(knp);
14072  *		}
14073  *	}
14074  */
14075 
14076 /*
14077  * Named statistics.
14078  *
14079  * List of arbitrary name=value statistics.
14080  */
14081 
14082 typedef struct kstat_named {
14083  char name[31]; /* name of counter */
14084  uchar_t data_type; /* data type */
14085  union {
14086   char c[16]; /* enough for 128-bit ints */
14087   int32_t i32;
14088   uint32_t ui32;
14089   struct {
14090    union {
14091     char *ptr; /* NULL-term string */
14092 
14093 
14094 
14095     char __pad[8]; /* 64-bit padding */
14096    } addr;
14097    uint32_t len; /* # bytes for strlen + '\0' */
14098   } str;
14099 /*
14100  * The int64_t and uint64_t types are not valid for a maximally conformant
14101  * 32-bit compilation environment (cc -Xc) using compilers prior to the
14102  * introduction of C99 conforming compiler (reference ISO/IEC 9899:1990).
14103  * In these cases, the visibility of i64 and ui64 is only permitted for
14104  * 64-bit compilation environments or 32-bit non-maximally conformant
14105  * C89 or C90 ANSI C compilation environments (cc -Xt and cc -Xa). In the
14106  * C99 ANSI C compilation environment, the long long type is supported.
14107  * The _INT64_TYPE is defined by the implementation (see sys/int_types.h).
14108  */
14109 
14110   int64_t i64;
14111   uint64_t ui64;
14112 
14113   long l;
14114   ulong_t ul;
14115 
14116   /* These structure members are obsolete */
14117 
14118   longlong_t ll;
14119   u_longlong_t ull;
14120   float f;
14121   double d;
14122  } value; /* value of counter */
14123 } kstat_named_t;
14124 # 513 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
14125 /*
14126  * Statistics exporting named kstats with long strings (KSTAT_DATA_STRING)
14127  * may not make the assumption that ks_data_size is equal to (ks_ndata * sizeof
14128  * (kstat_named_t)).  ks_data_size in these cases is equal to the sum of the
14129  * amount of space required to store the strings (ie, the sum of
14130  * KSTAT_NAMED_STR_BUFLEN() for all KSTAT_DATA_STRING statistics) plus the
14131  * space required to store the kstat_named_t's.
14132  *
14133  * The default update routine will update ks_data_size automatically for
14134  * variable-length kstats containing long strings (using the default update
14135  * routine only makes sense if the string is the only thing that is changing
14136  * in size, and ks_ndata is constant).  Fixed-length kstats containing long
14137  * strings must explicitly change ks_data_size (after creation but before
14138  * initialization) to reflect the correct amount of space required for the
14139  * long strings and the kstat_named_t's.
14140  */
14141 
14142 
14143 /* These types are obsolete */
14144 # 540 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
14145 /*
14146  * Retrieve the pointer of the string contained in the given named kstat.
14147  */
14148 
14149 
14150 /*
14151  * Retrieve the length of the buffer required to store the string in the given
14152  * named kstat.
14153  */
14154 
14155 
14156 /*
14157  * Interrupt statistics.
14158  *
14159  * An interrupt is a hard interrupt (sourced from the hardware device
14160  * itself), a soft interrupt (induced by the system via the use of
14161  * some system interrupt source), a watchdog interrupt (induced by
14162  * a periodic timer call), spurious (an interrupt entry point was
14163  * entered but there was no interrupt condition to service),
14164  * or multiple service (an interrupt condition was detected and
14165  * serviced just prior to returning from any of the other types).
14166  *
14167  * Measurement of the spurious class of interrupts is useful for
14168  * autovectored devices in order to pinpoint any interrupt latency
14169  * problems in a particular system configuration.
14170  *
14171  * Devices that have more than one interrupt of the same
14172  * type should use multiple structures.
14173  */
14174 # 578 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
14175 typedef struct kstat_intr {
14176  uint_t intrs[5]; /* interrupt counters */
14177 } kstat_intr_t;
14178 
14179 
14180 
14181 /*
14182  * I/O statistics.
14183  */
14184 
14185 typedef struct kstat_io {
14186 
14187  /*
14188 	 * Basic counters.
14189 	 *
14190 	 * The counters should be updated at the end of service
14191 	 * (e.g., just prior to calling biodone()).
14192 	 */
14193 
14194  u_longlong_t nread; /* number of bytes read */
14195  u_longlong_t nwritten; /* number of bytes written */
14196  uint_t reads; /* number of read operations */
14197  uint_t writes; /* number of write operations */
14198 
14199  /*
14200 	 * Accumulated time and queue length statistics.
14201 	 *
14202 	 * Accumulated time statistics are kept as a running sum
14203 	 * of "active" time.  Queue length statistics are kept as a
14204 	 * running sum of the product of queue length and elapsed time
14205 	 * at that length -- i.e., a Riemann sum for queue length
14206 	 * integrated against time.  (You can also think of the active time
14207 	 * as a Riemann sum, for the boolean function (queue_length > 0)
14208 	 * integrated against time, or you can think of it as the
14209 	 * Lebesgue measure of the set on which queue_length > 0.)
14210 	 *
14211 	 *		^
14212 	 *		|			_________
14213 	 *		8			| i4	|
14214 	 *		|			|	|
14215 	 *	Queue	6			|	|
14216 	 *	Length	|	_________	|	|
14217 	 *		4	| i2	|_______|	|
14218 	 *		|	|	    i3		|
14219 	 *		2_______|			|
14220 	 *		|    i1				|
14221 	 *		|_______________________________|
14222 	 *		Time->	t1	t2	t3	t4
14223 	 *
14224 	 * At each change of state (entry or exit from the queue),
14225 	 * we add the elapsed time (since the previous state change)
14226 	 * to the active time if the queue length was non-zero during
14227 	 * that interval; and we add the product of the elapsed time
14228 	 * times the queue length to the running length*time sum.
14229 	 *
14230 	 * This method is generalizable to measuring residency
14231 	 * in any defined system: instead of queue lengths, think
14232 	 * of "outstanding RPC calls to server X".
14233 	 *
14234 	 * A large number of I/O subsystems have at least two basic
14235 	 * "lists" of transactions they manage: one for transactions
14236 	 * that have been accepted for processing but for which processing
14237 	 * has yet to begin, and one for transactions which are actively
14238 	 * being processed (but not done). For this reason, two cumulative
14239 	 * time statistics are defined here: wait (pre-service) time,
14240 	 * and run (service) time.
14241 	 *
14242 	 * All times are 64-bit nanoseconds (hrtime_t), as returned by
14243 	 * gethrtime().
14244 	 *
14245 	 * The units of cumulative busy time are accumulated nanoseconds.
14246 	 * The units of cumulative length*time products are elapsed time
14247 	 * times queue length.
14248 	 *
14249 	 * Updates to the fields below are performed implicitly by calls to
14250 	 * these five functions:
14251 	 *
14252 	 *	kstat_waitq_enter()
14253 	 *	kstat_waitq_exit()
14254 	 *	kstat_runq_enter()
14255 	 *	kstat_runq_exit()
14256 	 *
14257 	 *	kstat_waitq_to_runq()		(see below)
14258 	 *	kstat_runq_back_to_waitq()	(see below)
14259 	 *
14260 	 * Since kstat_waitq_exit() is typically followed immediately
14261 	 * by kstat_runq_enter(), there is a single kstat_waitq_to_runq()
14262 	 * function which performs both operations.  This is a performance
14263 	 * win since only one timestamp is required.
14264 	 *
14265 	 * In some instances, it may be necessary to move a request from
14266 	 * the run queue back to the wait queue, e.g. for write throttling.
14267 	 * For these situations, call kstat_runq_back_to_waitq().
14268 	 *
14269 	 * These fields should never be updated by any other means.
14270 	 */
14271 
14272  hrtime_t wtime; /* cumulative wait (pre-service) time */
14273  hrtime_t wlentime; /* cumulative wait length*time product */
14274  hrtime_t wlastupdate; /* last time wait queue changed */
14275  hrtime_t rtime; /* cumulative run (service) time */
14276  hrtime_t rlentime; /* cumulative run length*time product */
14277  hrtime_t rlastupdate; /* last time run queue changed */
14278 
14279  uint_t wcnt; /* count of elements in wait state */
14280  uint_t rcnt; /* count of elements in run state */
14281 
14282 } kstat_io_t;
14283 
14284 
14285 
14286 /*
14287  * Event timer statistics - cumulative elapsed time and number of events.
14288  *
14289  * Updates to these fields are performed implicitly by calls to
14290  * kstat_timer_start() and kstat_timer_stop().
14291  */
14292 
14293 typedef struct kstat_timer {
14294  char name[31]; /* event name */
14295  uchar_t resv; /* reserved */
14296  u_longlong_t num_events; /* number of events */
14297  hrtime_t elapsed_time; /* cumulative elapsed time */
14298  hrtime_t min_time; /* shortest event duration */
14299  hrtime_t max_time; /* longest event duration */
14300  hrtime_t start_time; /* previous event start time */
14301  hrtime_t stop_time; /* previous event stop time */
14302 } kstat_timer_t;
14303 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h" 2
14304 
14305 
14306 
14307 
14308 
14309 /*
14310  * This allows various pieces in and around IP to have a separate instance
14311  * for each instance of IP. This is used to support zones that have an
14312  * exclusive stack.
14313  * Pieces of software far removed from IP (e.g., kernel software
14314  * sitting on top of TCP or UDP) probably should not use the netstack
14315  * support; if such software wants to support separate zones it
14316  * can do that using the zones framework (zone_key_create() etc)
14317  * whether there is a shared IP stack or and exclusive IP stack underneath.
14318  */
14319 
14320 /*
14321  * Each netstack has an identifier. We reuse the zoneid allocation for
14322  * this but have a separate typedef. Thus the shared stack (used by
14323  * the global zone and other shared stack zones) have a zero ID, and
14324  * the exclusive stacks have a netstackid that is the same as their zoneid.
14325  */
14326 typedef id_t netstackid_t;
14327 
14328 
14329 
14330 /*
14331  * One for each module which uses netstack support.
14332  * Used in netstack_register().
14333  *
14334  * The order of these is important for some modules both for
14335  * the creation (which done in ascending order) and destruction (which is
14336  * done in in decending order).
14337  */
14338 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
14339 /*
14340  * State maintained for each module which tracks the state of
14341  * the create, shutdown and destroy callbacks.
14342  *
14343  * Keeps track of pending actions to avoid holding locks when
14344  * calling into the create/shutdown/destroy functions in the module.
14345  */
14346 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
14347 /* User-level compile like IP Filter needs a netstack_t. Dummy */
14348 typedef uint_t nm_state_t;
14349 
14350 
14351 /*
14352  * One for every netstack in the system.
14353  * We use a union so that the compilar and lint can provide type checking -
14354  * in principle we could have
14355  * #define	netstack_arp		netstack_modules[NS_ARP]
14356  * etc, but that would imply void * types hence no type checking by the
14357  * compiler.
14358  *
14359  * All the fields in netstack_t except netstack_next are protected by
14360  * netstack_lock. netstack_next is protected by netstack_g_lock.
14361  */
14362 struct netstack {
14363  union {
14364   void *nu_modules[(18 +1)];
14365   struct {
14366    struct dls_stack *nu_dls;
14367    struct iptun_stack *nu_iptun;
14368    struct str_stack *nu_str;
14369    struct hook_stack *nu_hook;
14370    struct neti_stack *nu_neti;
14371    struct arp_stack *nu_arp;
14372    struct ip_stack *nu_ip;
14373    struct icmp_stack *nu_icmp;
14374    struct udp_stack *nu_udp;
14375    struct tcp_stack *nu_tcp;
14376    struct sctp_stack *nu_sctp;
14377    struct rts_stack *nu_rts;
14378    struct ipsec_stack *nu_ipsec;
14379    struct keysock_stack *nu_keysock;
14380    struct spd_stack *nu_spdsock;
14381    struct ipsecah_stack *nu_ipsecah;
14382    struct ipsecesp_stack *nu_ipsecesp;
14383    struct ipnet_stack *nu_ipnet;
14384    struct ilb_stack *nu_ilb;
14385   } nu_s;
14386  } netstack_u;
14387 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
14388  nm_state_t netstack_m_state[(18 +1)]; /* module state */
14389 
14390  kmutex_t netstack_lock;
14391  struct netstack *netstack_next;
14392  netstackid_t netstack_stackid;
14393  int netstack_numzones; /* Number of zones using this */
14394  int netstack_refcnt; /* Number of hold-rele */
14395  int netstack_flags; /* See below */
14396 
14397 
14398 
14399 
14400 
14401 };
14402 typedef struct netstack netstack_t;
14403 
14404 /* netstack_flags values */
14405 # 209 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
14406 /*
14407  * One for each of the NS_* values.
14408  */
14409 struct netstack_registry {
14410  int nr_flags; /* 0 if nothing registered */
14411  void *(*nr_create)(netstackid_t, netstack_t *);
14412  void (*nr_shutdown)(netstackid_t, void *);
14413  void (*nr_destroy)(netstackid_t, void *);
14414 };
14415 
14416 /* nr_flags values */
14417 
14418 
14419 
14420 /*
14421  * To support kstat_create_netstack() using kstat_add_zone we need
14422  * to track both
14423  *  - all zoneids that use the global/shared stack
14424  *  - all kstats that have been added for the shared stack
14425  */
14426 
14427 extern void netstack_init(void);
14428 extern void netstack_hold(netstack_t *);
14429 extern void netstack_rele(netstack_t *);
14430 extern netstack_t *netstack_find_by_cred(const cred_t *);
14431 extern netstack_t *netstack_find_by_stackid(netstackid_t);
14432 extern netstack_t *netstack_find_by_zoneid(zoneid_t);
14433 
14434 extern zoneid_t netstackid_to_zoneid(netstackid_t);
14435 extern zoneid_t netstack_get_zoneid(netstack_t *);
14436 extern netstackid_t zoneid_to_netstackid(zoneid_t);
14437 
14438 extern netstack_t *netstack_get_current(void);
14439 
14440 /*
14441  * Register interest in changes to the set of netstacks.
14442  * The createfn and destroyfn are required, but the shutdownfn can be
14443  * NULL.
14444  * Note that due to the current zsd implementation, when the create
14445  * function is called the zone isn't fully present, thus functions
14446  * like zone_find_by_* will fail, hence the create function can not
14447  * use many zones kernel functions including zcmn_err().
14448  */
14449 extern void netstack_register(int,
14450     void *(*)(netstackid_t, netstack_t *),
14451     void (*)(netstackid_t, void *),
14452     void (*)(netstackid_t, void *));
14453 extern void netstack_unregister(int);
14454 extern kstat_t *kstat_create_netstack(char *, int, char *, char *, uchar_t,
14455     uint_t, uchar_t, netstackid_t);
14456 extern void kstat_delete_netstack(kstat_t *, netstackid_t);
14457 
14458 /*
14459  * Simple support for walking all the netstacks.
14460  * The caller of netstack_next() needs to call netstack_rele() when
14461  * done with a netstack.
14462  */
14463 typedef int netstack_handle_t;
14464 
14465 extern void netstack_next_init(netstack_handle_t *);
14466 extern void netstack_next_fini(netstack_handle_t *);
14467 extern netstack_t *netstack_next(netstack_handle_t *);
14468 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
14469 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 1
14470 /*
14471  * CDDL HEADER START
14472  *
14473  * The contents of this file are subject to the terms of the
14474  * Common Development and Distribution License (the "License").
14475  * You may not use this file except in compliance with the License.
14476  *
14477  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14478  * or http://www.opensolaris.org/os/licensing.
14479  * See the License for the specific language governing permissions
14480  * and limitations under the License.
14481  *
14482  * When distributing Covered Code, include this CDDL HEADER in each
14483  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14484  * If applicable, add the following below this CDDL HEADER, with the
14485  * fields enclosed by brackets "[]" replaced with your own identifying
14486  * information: Portions Copyright [yyyy] [name of copyright owner]
14487  *
14488  * CDDL HEADER END
14489  */
14490 /*
14491  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
14492  *
14493  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
14494  * Use is subject to license terms.
14495  */
14496 
14497 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
14498 /*	  All Rights Reserved  	*/
14499 
14500 
14501 
14502 
14503 
14504 
14505 
14506 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
14507 /*
14508  * CDDL HEADER START
14509  *
14510  * The contents of this file are subject to the terms of the
14511  * Common Development and Distribution License (the "License").
14512  * You may not use this file except in compliance with the License.
14513  *
14514  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14515  * or http://www.opensolaris.org/os/licensing.
14516  * See the License for the specific language governing permissions
14517  * and limitations under the License.
14518  *
14519  * When distributing Covered Code, include this CDDL HEADER in each
14520  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14521  * If applicable, add the following below this CDDL HEADER, with the
14522  * fields enclosed by brackets "[]" replaced with your own identifying
14523  * information: Portions Copyright [yyyy] [name of copyright owner]
14524  *
14525  * CDDL HEADER END
14526  */
14527 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
14528 /*	  All Rights Reserved  	*/
14529 
14530 
14531 /*
14532  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
14533  * Use is subject to license terms.
14534  *
14535  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
14536  * Copyright 2016 Joyent, Inc.
14537  */
14538 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 2
14539 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
14540 /*
14541  * CDDL HEADER START
14542  *
14543  * The contents of this file are subject to the terms of the
14544  * Common Development and Distribution License (the "License").
14545  * You may not use this file except in compliance with the License.
14546  *
14547  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14548  * or http://www.opensolaris.org/os/licensing.
14549  * See the License for the specific language governing permissions
14550  * and limitations under the License.
14551  *
14552  * When distributing Covered Code, include this CDDL HEADER in each
14553  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14554  * If applicable, add the following below this CDDL HEADER, with the
14555  * fields enclosed by brackets "[]" replaced with your own identifying
14556  * information: Portions Copyright [yyyy] [name of copyright owner]
14557  *
14558  * CDDL HEADER END
14559  */
14560 /*
14561  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
14562  * Use is subject to license terms.
14563  */
14564 
14565 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
14566 /*	  All Rights Reserved  	*/
14567 
14568 /*
14569  * Portions of this source code were derived from Berkeley 4.3 BSD
14570  * under license from the Regents of the University of California.
14571  */
14572 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 2
14573 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
14574 /*			17-21	   reserved for obsolete interface */
14575 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
14576 /*
14577  * Functions reserved for A_FREEZE (may not be available on all platforms)
14578  * Note:  AD_COMPRESS, AD_CHECK and AD_FORCE are now obsolete
14579  *	The first two are succeeded by AD_SUSPEND_TO_DISK and
14580  *		AD_CHECK_SUSPEND_TO_DISK respectively.
14581  *	AD_FORCE should not be used by any new application
14582  *
14583  *	We maintain compatibility with the earlier interfaces:
14584  *	AD_COMPRESS and AD_CHECK, by preserving those values
14585  *	in the corresponding new interfaces
14586  */
14587 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
14588 /*
14589  * NOTE: the following defines comprise an Unstable interface.  Their semantics
14590  * may change or they may be removed completely in a later release
14591  */
14592 
14593 
14594 
14595 
14596 
14597 
14598 
14599 /*
14600  * Functions of A_CONFIG.  Unstable interface.
14601  */
14602 
14603 
14604 /*
14605  * When 'mdep' (the second argument to uadmin(2)) is initialized for A_REBOOT,
14606  * A_SHUTDOWN or A_DUMP, it represents the boot arguments string of at most
14607  * 256 characters.
14608  */
14609 
14610 
14611 
14612 /*
14613  * FMRI for boot-config service.
14614  */
14615 
14616 
14617 
14618 /*
14619  * Property group that contains all Fast Reboot configuration properties.
14620  */
14621 
14622 
14623 /*
14624  * Property group that contains all Fast Reboot blacklisting information.
14625  */
14626 
14627 
14628 /*
14629  * Non-persistent property group which contains all the properties that
14630  * will override settings in the BOOT_CONFIG_PG_PARAMS property group.
14631  */
14632 
14633 
14634 
14635 
14636 /*
14637  * Flag representations of fastboot configuration.
14638  */
14639 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
14640 extern int uadmin(int, int, uintptr_t);
14641 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
14642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ksynch.h" 1
14643 /*
14644  * CDDL HEADER START
14645  *
14646  * The contents of this file are subject to the terms of the
14647  * Common Development and Distribution License, Version 1.0 only
14648  * (the "License").  You may not use this file except in compliance
14649  * with the License.
14650  *
14651  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14652  * or http://www.opensolaris.org/os/licensing.
14653  * See the License for the specific language governing permissions
14654  * and limitations under the License.
14655  *
14656  * When distributing Covered Code, include this CDDL HEADER in each
14657  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14658  * If applicable, add the following below this CDDL HEADER, with the
14659  * fields enclosed by brackets "[]" replaced with your own identifying
14660  * information: Portions Copyright [yyyy] [name of copyright owner]
14661  *
14662  * CDDL HEADER END
14663  */
14664 /*
14665  *	Copyright (c) 1991, Sun Microsystems, Inc.
14666  */
14667 
14668 /*
14669  * DKI/DDI MT synchronization primitives.
14670  */
14671 
14672 
14673 
14674 
14675 #pragma ident "%Z%%M%	%I%	%E% SMI"
14676 
14677 /*
14678  * The presence of this file is specified by the DKI/DDI.
14679  */
14680 
14681 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
14682 /*
14683  * CDDL HEADER START
14684  *
14685  * The contents of this file are subject to the terms of the
14686  * Common Development and Distribution License, Version 1.0 only
14687  * (the "License").  You may not use this file except in compliance
14688  * with the License.
14689  *
14690  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14691  * or http://www.opensolaris.org/os/licensing.
14692  * See the License for the specific language governing permissions
14693  * and limitations under the License.
14694  *
14695  * When distributing Covered Code, include this CDDL HEADER in each
14696  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14697  * If applicable, add the following below this CDDL HEADER, with the
14698  * fields enclosed by brackets "[]" replaced with your own identifying
14699  * information: Portions Copyright [yyyy] [name of copyright owner]
14700  *
14701  * CDDL HEADER END
14702  */
14703 /*
14704  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
14705  * All rights reserved.
14706  */
14707 
14708 /*
14709  * t_lock.h:	Prototypes for disp_locks, plus include files
14710  *		that describe the interfaces to kernel synch.
14711  *		objects.
14712  */
14713 
14714 
14715 
14716 
14717 #pragma ident "%Z%%M%	%I%	%E% SMI"
14718 
14719 
14720 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
14721 /*
14722  * CDDL HEADER START
14723  *
14724  * The contents of this file are subject to the terms of the
14725  * Common Development and Distribution License (the "License").
14726  * You may not use this file except in compliance with the License.
14727  *
14728  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14729  * or http://www.opensolaris.org/os/licensing.
14730  * See the License for the specific language governing permissions
14731  * and limitations under the License.
14732  *
14733  * When distributing Covered Code, include this CDDL HEADER in each
14734  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14735  * If applicable, add the following below this CDDL HEADER, with the
14736  * fields enclosed by brackets "[]" replaced with your own identifying
14737  * information: Portions Copyright [yyyy] [name of copyright owner]
14738  *
14739  * CDDL HEADER END
14740  */
14741 /*
14742  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
14743  * Use is subject to license terms.
14744  * Copyright 2016 Joyent, Inc.
14745  */
14746 
14747 
14748 
14749 
14750 #pragma ident "%Z%%M%	%I%	%E% SMI"
14751 
14752 
14753 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
14754 /*
14755  * CDDL HEADER START
14756  *
14757  * The contents of this file are subject to the terms of the
14758  * Common Development and Distribution License (the "License").
14759  * You may not use this file except in compliance with the License.
14760  *
14761  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14762  * or http://www.opensolaris.org/os/licensing.
14763  * See the License for the specific language governing permissions
14764  * and limitations under the License.
14765  *
14766  * When distributing Covered Code, include this CDDL HEADER in each
14767  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14768  * If applicable, add the following below this CDDL HEADER, with the
14769  * fields enclosed by brackets "[]" replaced with your own identifying
14770  * information: Portions Copyright [yyyy] [name of copyright owner]
14771  *
14772  * CDDL HEADER END
14773  */
14774 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
14775 /*	  All Rights Reserved  	*/
14776 
14777 
14778 /*
14779  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
14780  * Use is subject to license terms.
14781  *
14782  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
14783  * Copyright 2016 Joyent, Inc.
14784  */
14785 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
14786 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
14787 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
14788 /*	  All Rights Reserved  	*/
14789 
14790 
14791 /*
14792  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
14793  * All rights reserved.  The Berkeley software License Agreement
14794  * specifies the terms and conditions for redistribution.
14795  */
14796 
14797 /*
14798  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
14799  *
14800  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
14801  * Use is subject to license terms.
14802  *
14803  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
14804  */
14805 
14806 /*
14807  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
14808  */
14809 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
14810 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
14811 typedef lock_t disp_lock_t; /* dispatcher lock type */
14812 
14813 /*
14814  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
14815  * an adaptive mutex, depending on what interrupt levels use it.
14816  */
14817 
14818 
14819 /*
14820  * Macro to control loops which spin on a lock and then check state
14821  * periodically.  Its passed an integer, and returns a boolean value
14822  * that if true indicates its a good time to get the scheduler lock and
14823  * check the state of the current owner of the lock.
14824  */
14825 
14826 
14827 /*
14828  * Externs for CLOCK_LOCK and clock resolution
14829  */
14830 extern volatile uint32_t hres_lock;
14831 extern hrtime_t hrtime_base;
14832 extern int clock_res;
14833 
14834 
14835 
14836 /*
14837  * The definitions of the symbolic interrupt levels:
14838  *
14839  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
14840  *
14841  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
14842  *                   highest level at which one may acquire adaptive locks)
14843  *                   Also the highest level at which one may be preempted.
14844  *
14845  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
14846  *                   operations.
14847  *
14848  * The constraints on the platform:
14849  *
14850  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
14851  *  - LOCK_LEVEL must be less than DISP_LEVEL
14852  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
14853  *
14854  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
14855  * changing this relationship is probably possible but not advised.
14856  *
14857  */
14858 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
14859 /*
14860  * The following mask is for the cpu_intr_actv bits corresponding to
14861  * high-level PILs. It should equal:
14862  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
14863  */
14864 
14865 
14866 /*
14867  * The semaphore code depends on being able to represent a lock plus
14868  * owner in a single 32-bit word.  (Mutexes used to have a similar
14869  * dependency, but no longer.)  Thus the owner must contain at most
14870  * 24 significant bits.  At present only threads and semaphores
14871  * must be aware of this vile constraint.  Different ISAs may handle this
14872  * differently depending on their capabilities (e.g. compare-and-swap)
14873  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
14874  */
14875 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
14876 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
14877 /*
14878  * CDDL HEADER START
14879  *
14880  * The contents of this file are subject to the terms of the
14881  * Common Development and Distribution License (the "License").
14882  * You may not use this file except in compliance with the License.
14883  *
14884  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14885  * or http://www.opensolaris.org/os/licensing.
14886  * See the License for the specific language governing permissions
14887  * and limitations under the License.
14888  *
14889  * When distributing Covered Code, include this CDDL HEADER in each
14890  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14891  * If applicable, add the following below this CDDL HEADER, with the
14892  * fields enclosed by brackets "[]" replaced with your own identifying
14893  * information: Portions Copyright [yyyy] [name of copyright owner]
14894  *
14895  * CDDL HEADER END
14896  */
14897 
14898 /*
14899  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
14900  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
14901  */
14902 
14903 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
14904 /*	  All Rights Reserved  	*/
14905 
14906 /*
14907  * University Copyright- Copyright (c) 1982, 1986, 1988
14908  * The Regents of the University of California
14909  * All Rights Reserved
14910  *
14911  * University Acknowledgment- Portions of this document are derived from
14912  * software developed by the University of California, Berkeley, and its
14913  * contributors.
14914  */
14915 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
14916 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
14917 /*
14918  * CDDL HEADER START
14919  *
14920  * The contents of this file are subject to the terms of the
14921  * Common Development and Distribution License (the "License").
14922  * You may not use this file except in compliance with the License.
14923  *
14924  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14925  * or http://www.opensolaris.org/os/licensing.
14926  * See the License for the specific language governing permissions
14927  * and limitations under the License.
14928  *
14929  * When distributing Covered Code, include this CDDL HEADER in each
14930  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14931  * If applicable, add the following below this CDDL HEADER, with the
14932  * fields enclosed by brackets "[]" replaced with your own identifying
14933  * information: Portions Copyright [yyyy] [name of copyright owner]
14934  *
14935  * CDDL HEADER END
14936  */
14937 /*
14938  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
14939  */
14940 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
14941 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
14942 /*
14943  * CDDL HEADER START
14944  *
14945  * The contents of this file are subject to the terms of the
14946  * Common Development and Distribution License (the "License").
14947  * You may not use this file except in compliance with the License.
14948  *
14949  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14950  * or http://www.opensolaris.org/os/licensing.
14951  * See the License for the specific language governing permissions
14952  * and limitations under the License.
14953  *
14954  * When distributing Covered Code, include this CDDL HEADER in each
14955  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14956  * If applicable, add the following below this CDDL HEADER, with the
14957  * fields enclosed by brackets "[]" replaced with your own identifying
14958  * information: Portions Copyright [yyyy] [name of copyright owner]
14959  *
14960  * CDDL HEADER END
14961  */
14962 /*
14963  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
14964  * Use is subject to license terms.
14965  */
14966 
14967 /*
14968  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
14969  */
14970 
14971 
14972 
14973 
14974 /*
14975  * Public interface to readers/writer locks.  See rwlock(9F) for details.
14976  */
14977 
14978 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
14979 /*
14980  * CDDL HEADER START
14981  *
14982  * The contents of this file are subject to the terms of the
14983  * Common Development and Distribution License (the "License").
14984  * You may not use this file except in compliance with the License.
14985  *
14986  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14987  * or http://www.opensolaris.org/os/licensing.
14988  * See the License for the specific language governing permissions
14989  * and limitations under the License.
14990  *
14991  * When distributing Covered Code, include this CDDL HEADER in each
14992  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14993  * If applicable, add the following below this CDDL HEADER, with the
14994  * fields enclosed by brackets "[]" replaced with your own identifying
14995  * information: Portions Copyright [yyyy] [name of copyright owner]
14996  *
14997  * CDDL HEADER END
14998  */
14999 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15000 /*	  All Rights Reserved  	*/
15001 
15002 
15003 /*
15004  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15005  * Use is subject to license terms.
15006  *
15007  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15008  * Copyright 2016 Joyent, Inc.
15009  */
15010 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
15011 
15012 
15013 
15014 
15015 
15016 
15017 
15018 typedef enum {
15019  RW_DRIVER = 2, /* driver (DDI) rwlock */
15020  RW_DEFAULT = 4 /* kernel default rwlock */
15021 } krw_type_t;
15022 
15023 typedef enum {
15024  RW_WRITER,
15025  RW_READER,
15026  RW_READER_STARVEWRITER
15027 } krw_t;
15028 
15029 typedef struct _krwlock {
15030  void *_opaque[1];
15031 } krwlock_t;
15032 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
15033 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
15034 /*
15035  * CDDL HEADER START
15036  *
15037  * The contents of this file are subject to the terms of the
15038  * Common Development and Distribution License, Version 1.0 only
15039  * (the "License").  You may not use this file except in compliance
15040  * with the License.
15041  *
15042  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15043  * or http://www.opensolaris.org/os/licensing.
15044  * See the License for the specific language governing permissions
15045  * and limitations under the License.
15046  *
15047  * When distributing Covered Code, include this CDDL HEADER in each
15048  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15049  * If applicable, add the following below this CDDL HEADER, with the
15050  * fields enclosed by brackets "[]" replaced with your own identifying
15051  * information: Portions Copyright [yyyy] [name of copyright owner]
15052  *
15053  * CDDL HEADER END
15054  */
15055 /*
15056  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
15057  * All rights reserved.
15058  */
15059 
15060 
15061 
15062 
15063 #pragma ident "%Z%%M%	%I%	%E% SMI"
15064 
15065 /*
15066  * Public interface to semaphores.  See semaphore(9F) for details.
15067  */
15068 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
15069 typedef enum {
15070  SEMA_DEFAULT,
15071  SEMA_DRIVER
15072 } ksema_type_t;
15073 
15074 typedef struct _ksema {
15075  void * _opaque[2]; /* 2 words on 4 byte alignment */
15076 } ksema_t;
15077 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
15078 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
15079 /*
15080  * CDDL HEADER START
15081  *
15082  * The contents of this file are subject to the terms of the
15083  * Common Development and Distribution License (the "License").
15084  * You may not use this file except in compliance with the License.
15085  *
15086  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15087  * or http://www.opensolaris.org/os/licensing.
15088  * See the License for the specific language governing permissions
15089  * and limitations under the License.
15090  *
15091  * When distributing Covered Code, include this CDDL HEADER in each
15092  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15093  * If applicable, add the following below this CDDL HEADER, with the
15094  * fields enclosed by brackets "[]" replaced with your own identifying
15095  * information: Portions Copyright [yyyy] [name of copyright owner]
15096  *
15097  * CDDL HEADER END
15098  */
15099 /*
15100  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15101  * Use is subject to license terms.
15102  */
15103 
15104 /*
15105  * Copyright (c) 2012 by Delphix. All rights reserved.
15106  */
15107 
15108 /*
15109  * condvar.h:
15110  *
15111  * definitions for thread synchronization primitives: condition variables
15112  * This is the public part of the interface to condition variables. The
15113  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
15114  */
15115 
15116 
15117 
15118 
15119 
15120 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
15121 /*
15122  * CDDL HEADER START
15123  *
15124  * The contents of this file are subject to the terms of the
15125  * Common Development and Distribution License (the "License").
15126  * You may not use this file except in compliance with the License.
15127  *
15128  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15129  * or http://www.opensolaris.org/os/licensing.
15130  * See the License for the specific language governing permissions
15131  * and limitations under the License.
15132  *
15133  * When distributing Covered Code, include this CDDL HEADER in each
15134  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15135  * If applicable, add the following below this CDDL HEADER, with the
15136  * fields enclosed by brackets "[]" replaced with your own identifying
15137  * information: Portions Copyright [yyyy] [name of copyright owner]
15138  *
15139  * CDDL HEADER END
15140  */
15141 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15142 /*	  All Rights Reserved  	*/
15143 
15144 
15145 /*
15146  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15147  * Use is subject to license terms.
15148  *
15149  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15150  * Copyright 2016 Joyent, Inc.
15151  */
15152 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
15153 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
15154 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15155 /*	  All Rights Reserved  	*/
15156 
15157 
15158 /*
15159  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
15160  * All rights reserved.  The Berkeley software License Agreement
15161  * specifies the terms and conditions for redistribution.
15162  */
15163 
15164 /*
15165  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
15166  *
15167  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15168  * Use is subject to license terms.
15169  *
15170  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15171  */
15172 
15173 /*
15174  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
15175  */
15176 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
15177 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
15178 /*
15179  * Condtion variables.
15180  */
15181 
15182 typedef struct _kcondvar {
15183  ushort_t _opaque;
15184 } kcondvar_t;
15185 
15186 typedef enum {
15187  CV_DEFAULT,
15188  CV_DRIVER
15189 } kcv_type_t;
15190 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
15191 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
15192 /*
15193  * Mutual exclusion locks described in common/sys/mutex.h.
15194  *
15195  * Semaphores described in common/sys/semaphore.h.
15196  *
15197  * Readers/Writer locks described in common/sys/rwlock.h.
15198  *
15199  * Condition variables described in common/sys/condvar.h
15200  */
15201 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ksynch.h" 2
15202 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
15203 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
15204 /*
15205  * CDDL HEADER START
15206  *
15207  * The contents of this file are subject to the terms of the
15208  * Common Development and Distribution License (the "License").
15209  * You may not use this file except in compliance with the License.
15210  *
15211  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15212  * or http://www.opensolaris.org/os/licensing.
15213  * See the License for the specific language governing permissions
15214  * and limitations under the License.
15215  *
15216  * When distributing Covered Code, include this CDDL HEADER in each
15217  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15218  * If applicable, add the following below this CDDL HEADER, with the
15219  * fields enclosed by brackets "[]" replaced with your own identifying
15220  * information: Portions Copyright [yyyy] [name of copyright owner]
15221  *
15222  * CDDL HEADER END
15223  */
15224 /*
15225  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15226  * Use is subject to license terms.
15227  */
15228 
15229 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
15230 /*	  All Rights Reserved	*/
15231 
15232 /*
15233  * Portions of this source code were derived from Berkeley 4.3 BSD
15234  * under license from the Regents of the University of California.
15235  */
15236 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
15237 typedef uint16_t sa_family_t;
15238 
15239 
15240 /*
15241  * Structure used by kernel to store most
15242  * addresses.
15243  */
15244 struct sockaddr {
15245  sa_family_t sa_family; /* address family */
15246  char sa_data[14]; /* up to 14 bytes of direct address */
15247 };
15248 
15249 
15250 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
15251 /*
15252  * CDDL HEADER START
15253  *
15254  * The contents of this file are subject to the terms of the
15255  * Common Development and Distribution License (the "License").
15256  * You may not use this file except in compliance with the License.
15257  *
15258  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15259  * or http://www.opensolaris.org/os/licensing.
15260  * See the License for the specific language governing permissions
15261  * and limitations under the License.
15262  *
15263  * When distributing Covered Code, include this CDDL HEADER in each
15264  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15265  * If applicable, add the following below this CDDL HEADER, with the
15266  * fields enclosed by brackets "[]" replaced with your own identifying
15267  * information: Portions Copyright [yyyy] [name of copyright owner]
15268  *
15269  * CDDL HEADER END
15270  */
15271 /*
15272  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
15273  */
15274 
15275 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
15276 /*	  All Rights Reserved  	*/
15277 
15278 /*
15279  * University Copyright- Copyright (c) 1982, 1986, 1988
15280  * The Regents of the University of California
15281  * All Rights Reserved
15282  *
15283  * University Acknowledgment- Portions of this document are derived from
15284  * software developed by the University of California, Berkeley, and its
15285  * contributors.
15286  */
15287 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
15288 /*
15289  * Definitions for UNIX IPC domain.
15290  */
15291 struct sockaddr_un {
15292  sa_family_t sun_family; /* AF_UNIX */
15293  char sun_path[108]; /* path name (gag) */
15294 };
15295 
15296 
15297 
15298 /*
15299  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
15300  * change.
15301  *
15302  * Also, include a strlen() prototype, and we have to protect it w.r.t.
15303  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
15304  */
15305 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
15306 extern size_t strlen(const char *);
15307 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
15308 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
15309 /*
15310  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
15311  * Use is subject to license terms.
15312  */
15313 /*
15314  * Copyright (c) 1990, 1993
15315  *	The Regents of the University of California.  All rights reserved.
15316  *
15317  * Redistribution and use in source and binary forms, with or without
15318  * modification, are permitted provided that the following conditions
15319  * are met:
15320  * 1. Redistributions of source code must retain the above copyright
15321  *    notice, this list of conditions and the following disclaimer.
15322  * 2. Redistributions in binary form must reproduce the above copyright
15323  *    notice, this list of conditions and the following disclaimer in the
15324  *    documentation and/or other materials provided with the distribution.
15325  * 3. All advertising materials mentioning features or use of this software
15326  *    must display the following acknowledgement:
15327  *	This product includes software developed by the University of
15328  *	California, Berkeley and its contributors.
15329  * 4. Neither the name of the University nor the names of its contributors
15330  *    may be used to endorse or promote products derived from this software
15331  *    without specific prior written permission.
15332  *
15333  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15334  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15335  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15336  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
15337  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15338  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15339  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15340  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15341  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15342  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15343  * SUCH DAMAGE.
15344  */
15345 
15346 
15347 
15348 
15349 #pragma ident "%Z%%M%	%I%	%E% SMI"
15350 /* from UCB 8.1 (Berkeley) 6/10/93 */
15351 
15352 
15353 
15354 
15355 
15356 /*
15357  * A Link-Level Sockaddr may specify the interface in one of two
15358  * ways: either by means of a system-provided index number (computed
15359  * anew and possibly differently on every reboot), or by a human-readable
15360  * string such as "il0" (for managerial convenience).
15361  *
15362  * Census taking actions, such as something akin to SIOCGCONF would return
15363  * both the index and the human name.
15364  *
15365  * High volume transactions (such as giving a link-level ``from'' address
15366  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
15367  * form, (which requires fewer copy operations and less space).
15368  *
15369  * The form and interpretation  of the link-level address is purely a matter
15370  * of convention between the device driver and its consumers; however, it is
15371  * expected that all drivers for an interface of a given if_type will agree.
15372  */
15373 
15374 /*
15375  * Structure of a Link-Level sockaddr:
15376  */
15377 struct sockaddr_dl {
15378  ushort_t sdl_family; /* AF_LINK */
15379  ushort_t sdl_index; /* if != 0, system given index for interface */
15380  uchar_t sdl_type; /* interface type */
15381  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
15382  uchar_t sdl_alen; /* link level address length */
15383  uchar_t sdl_slen; /* link layer selector length */
15384  char sdl_data[244]; /* contains both if name and ll address */
15385 };
15386 
15387 
15388 
15389 
15390 extern char *_link_ntoa(const unsigned char *, char *, int, int);
15391 extern unsigned char *_link_aton(const char *, int *);
15392 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
15393 
15394 
15395 
15396 /*
15397  * sockaddr_storage:
15398  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
15399  * structures. Has sufficient size and alignment for those sockaddrs.
15400  */
15401 
15402 /*
15403  * Desired maximum size, alignment size and related types.
15404  */
15405 
15406 
15407 /*
15408  * To represent desired sockaddr max alignment for platform, a
15409  * type is chosen which may depend on implementation platform architecture.
15410  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
15411  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
15412  * on platforms where it is possible to do so. (e.g not possible on ia32).
15413  * For all currently supported platforms by our implementation
15414  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
15415  * type "double" is suitable for that intent.
15416  *
15417  * Note: Type "double" is chosen over the more obvious integer type int64_t.
15418  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
15419  */
15420 typedef double sockaddr_maxalign_t;
15421 
15422 
15423 
15424 /*
15425  * Definitions used for sockaddr_storage structure paddings design.
15426  */
15427 
15428 
15429 
15430 
15431 struct sockaddr_storage {
15432  sa_family_t ss_family; /* Address family */
15433  /* Following fields are implementation specific */
15434  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
15435  sockaddr_maxalign_t _ss_align;
15436  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
15437 };
15438 
15439 
15440 /*
15441  * To be compatible with the Linux interfaces used, this structure is
15442  * placed in socket_impl.h so that an include for <sys/socket.h> will
15443  * pickup this structure. This structure is for use with PF_PACKET
15444  * sockets.
15445  */
15446 struct sockaddr_ll {
15447  uint16_t sll_family;
15448  uint16_t sll_protocol;
15449  int32_t sll_ifindex;
15450  uint16_t sll_hatype;
15451  uint8_t sll_pkttype;
15452  uint8_t sll_halen;
15453  uint8_t sll_addr[8];
15454 };
15455 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
15456 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
15457 /*
15458  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15459  * Use is subject to license terms.
15460  *
15461  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
15462  */
15463 /*
15464  * Copyright (c) 1982, 1986 Regents of the University of California.
15465  * All rights reserved.
15466  *
15467  * Redistribution and use in source and binary forms are permitted
15468  * provided that this notice is preserved and that due credit is given
15469  * to the University of California at Berkeley. The name of the University
15470  * may not be used to endorse or promote products derived from this
15471  * software without specific prior written permission. This software
15472  * is provided ``as is'' without express or implied warranty.
15473  */
15474 
15475 /*
15476  * Constants and structures defined by the internet system,
15477  * according to following documents
15478  *
15479  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
15480  *	http://www.iana.org/assignments/protocol-numbers
15481  *	http://www.iana.org/assignments/port-numbers
15482  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
15483  *
15484  */
15485 
15486 
15487 
15488 
15489 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
15490 /*
15491  * CDDL HEADER START
15492  *
15493  * The contents of this file are subject to the terms of the
15494  * Common Development and Distribution License (the "License").
15495  * You may not use this file except in compliance with the License.
15496  *
15497  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15498  * or http://www.opensolaris.org/os/licensing.
15499  * See the License for the specific language governing permissions
15500  * and limitations under the License.
15501  *
15502  * When distributing Covered Code, include this CDDL HEADER in each
15503  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15504  * If applicable, add the following below this CDDL HEADER, with the
15505  * fields enclosed by brackets "[]" replaced with your own identifying
15506  * information: Portions Copyright [yyyy] [name of copyright owner]
15507  *
15508  * CDDL HEADER END
15509  */
15510 
15511 /*
15512  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
15513  * Copyright 2016 Joyent, Inc.
15514  *
15515  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
15516  * Use is subject to license terms.
15517  */
15518 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
15519 
15520 
15521 
15522 
15523 
15524 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
15525 /*
15526  * CDDL HEADER START
15527  *
15528  * The contents of this file are subject to the terms of the
15529  * Common Development and Distribution License (the "License").
15530  * You may not use this file except in compliance with the License.
15531  *
15532  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15533  * or http://www.opensolaris.org/os/licensing.
15534  * See the License for the specific language governing permissions
15535  * and limitations under the License.
15536  *
15537  * When distributing Covered Code, include this CDDL HEADER in each
15538  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15539  * If applicable, add the following below this CDDL HEADER, with the
15540  * fields enclosed by brackets "[]" replaced with your own identifying
15541  * information: Portions Copyright [yyyy] [name of copyright owner]
15542  *
15543  * CDDL HEADER END
15544  */
15545 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15546 /*	  All Rights Reserved  	*/
15547 
15548 
15549 /*
15550  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15551  * Use is subject to license terms.
15552  *
15553  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15554  * Copyright 2016 Joyent, Inc.
15555  */
15556 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
15557 
15558 
15559 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
15560 /*
15561  * CDDL HEADER START
15562  *
15563  * The contents of this file are subject to the terms of the
15564  * Common Development and Distribution License (the "License").
15565  * You may not use this file except in compliance with the License.
15566  *
15567  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15568  * or http://www.opensolaris.org/os/licensing.
15569  * See the License for the specific language governing permissions
15570  * and limitations under the License.
15571  *
15572  * When distributing Covered Code, include this CDDL HEADER in each
15573  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15574  * If applicable, add the following below this CDDL HEADER, with the
15575  * fields enclosed by brackets "[]" replaced with your own identifying
15576  * information: Portions Copyright [yyyy] [name of copyright owner]
15577  *
15578  * CDDL HEADER END
15579  */
15580 /*
15581  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15582  * Use is subject to license terms.
15583  */
15584 
15585 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
15586 /*	  All Rights Reserved	*/
15587 
15588 /*
15589  * Portions of this source code were derived from Berkeley 4.3 BSD
15590  * under license from the Regents of the University of California.
15591  */
15592 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
15593 
15594 
15595 
15596 
15597 
15598 /*
15599  * The socklen definitions are reproduced here from sys/socket.h so as to
15600  * not introduce that namespace into existing users of netinet/in.h.
15601  */
15602 
15603 
15604 
15605 typedef uint32_t socklen_t;
15606 
15607 
15608 
15609 
15610 
15611 typedef void *Psocklen_t;
15612 
15613 
15614 
15615 
15616 
15617 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
15618 /*
15619  * CDDL HEADER START
15620  *
15621  * The contents of this file are subject to the terms of the
15622  * Common Development and Distribution License (the "License").
15623  * You may not use this file except in compliance with the License.
15624  *
15625  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15626  * or http://www.opensolaris.org/os/licensing.
15627  * See the License for the specific language governing permissions
15628  * and limitations under the License.
15629  *
15630  * When distributing Covered Code, include this CDDL HEADER in each
15631  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15632  * If applicable, add the following below this CDDL HEADER, with the
15633  * fields enclosed by brackets "[]" replaced with your own identifying
15634  * information: Portions Copyright [yyyy] [name of copyright owner]
15635  *
15636  * CDDL HEADER END
15637  */
15638 /*
15639  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15640  * Use is subject to license terms.
15641  */
15642 
15643 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15644 /*	  All Rights Reserved  	*/
15645 
15646 
15647 
15648 
15649 
15650 /*
15651  * For source compatibility
15652  */
15653 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
15654 /*
15655  * CDDL HEADER START
15656  *
15657  * The contents of this file are subject to the terms of the
15658  * Common Development and Distribution License (the "License").
15659  * You may not use this file except in compliance with the License.
15660  *
15661  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15662  * or http://www.opensolaris.org/os/licensing.
15663  * See the License for the specific language governing permissions
15664  * and limitations under the License.
15665  *
15666  *
15667  * When distributing Covered Code, include this CDDL HEADER in each
15668  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15669  * If applicable, add the following below this CDDL HEADER, with the
15670  * fields enclosed by brackets "[]" replaced with your own identifying
15671  * information: Portions Copyright [yyyy] [name of copyright owner]
15672  *
15673  * CDDL HEADER END
15674  */
15675 
15676 /*
15677  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
15678  * Use is subject to license terms.
15679  * Copyright 2016 Joyent, Inc.
15680  */
15681 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
15682 
15683 
15684 
15685 
15686 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
15687 /*
15688  * CDDL HEADER START
15689  *
15690  * The contents of this file are subject to the terms of the
15691  * Common Development and Distribution License, Version 1.0 only
15692  * (the "License").  You may not use this file except in compliance
15693  * with the License.
15694  *
15695  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15696  * or http://www.opensolaris.org/os/licensing.
15697  * See the License for the specific language governing permissions
15698  * and limitations under the License.
15699  *
15700  * When distributing Covered Code, include this CDDL HEADER in each
15701  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15702  * If applicable, add the following below this CDDL HEADER, with the
15703  * fields enclosed by brackets "[]" replaced with your own identifying
15704  * information: Portions Copyright [yyyy] [name of copyright owner]
15705  *
15706  * CDDL HEADER END
15707  */
15708 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15709 /*	  All Rights Reserved  	*/
15710 
15711 
15712 /*
15713  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
15714  *
15715  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
15716  * All rights reserved.
15717  */
15718 
15719 /*
15720  * Copyright 2015, Joyent, Inc.
15721  */
15722 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
15723 /*
15724  * Structure of file descriptor/event pairs supplied in
15725  * the poll arrays.
15726  */
15727 typedef struct pollfd {
15728  int fd; /* file desc to poll */
15729  short events; /* events of interest on fd */
15730  short revents; /* events that occurred on fd */
15731 } pollfd_t;
15732 
15733 typedef unsigned long nfds_t;
15734 
15735 /*
15736  * Testable select events
15737  */
15738 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
15739 /*
15740  * Non-testable poll events (may not be specified in events field,
15741  * but may be returned in revents field).
15742  */
15743 
15744 
15745 
15746 
15747 /*
15748  * These events will never be specified in revents, but may be specified in
15749  * events to control /dev/poll behavior.
15750  */
15751 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
15752 int poll(struct pollfd *, nfds_t, int);
15753 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
15754 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
15755 /*
15756  * CDDL HEADER START
15757  *
15758  * The contents of this file are subject to the terms of the
15759  * Common Development and Distribution License, Version 1.0 only
15760  * (the "License").  You may not use this file except in compliance
15761  * with the License.
15762  *
15763  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15764  * or http://www.opensolaris.org/os/licensing.
15765  * See the License for the specific language governing permissions
15766  * and limitations under the License.
15767  *
15768  * When distributing Covered Code, include this CDDL HEADER in each
15769  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15770  * If applicable, add the following below this CDDL HEADER, with the
15771  * fields enclosed by brackets "[]" replaced with your own identifying
15772  * information: Portions Copyright [yyyy] [name of copyright owner]
15773  *
15774  * CDDL HEADER END
15775  */
15776 /*
15777  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
15778  * All rights reserved.
15779  */
15780 
15781 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15782 /*	  All Rights Reserved  	*/
15783 
15784 
15785 
15786 
15787 
15788 #pragma ident "%Z%%M%	%I%	%E% SMI"
15789 
15790 
15791 
15792 
15793 
15794 /*
15795  * This file contains all machine-dependent declarations
15796  * in STREAMS.
15797  */
15798 
15799 /*
15800  * Copy data from one data buffer to another.
15801  * The addresses must be word aligned - if not, use bcopy!
15802  */
15803 
15804 
15805 /*
15806  * save the address of the calling function on the 3b2 to
15807  * enable tracking of who is allocating message blocks
15808  */
15809 
15810 
15811 /*
15812  * macro to check pointer alignment
15813  * (true if alignment is sufficient for worst case)
15814  */
15815 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
15816 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
15817 /*
15818  * CDDL HEADER START
15819  *
15820  * The contents of this file are subject to the terms of the
15821  * Common Development and Distribution License (the "License").
15822  * You may not use this file except in compliance with the License.
15823  *
15824  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15825  * or http://www.opensolaris.org/os/licensing.
15826  * See the License for the specific language governing permissions
15827  * and limitations under the License.
15828  *
15829  * When distributing Covered Code, include this CDDL HEADER in each
15830  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15831  * If applicable, add the following below this CDDL HEADER, with the
15832  * fields enclosed by brackets "[]" replaced with your own identifying
15833  * information: Portions Copyright [yyyy] [name of copyright owner]
15834  *
15835  * CDDL HEADER END
15836  */
15837 /*
15838  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15839  * Use is subject to license terms.
15840  */
15841 
15842 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
15843 /*	  All Rights Reserved  	*/
15844 
15845 /*
15846  * Portions of this source code were derived from Berkeley 4.3 BSD
15847  * under license from the Regents of the University of California.
15848  */
15849 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
15850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
15851 /*
15852  * CDDL HEADER START
15853  *
15854  * The contents of this file are subject to the terms of the
15855  * Common Development and Distribution License, Version 1.0 only
15856  * (the "License").  You may not use this file except in compliance
15857  * with the License.
15858  *
15859  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15860  * or http://www.opensolaris.org/os/licensing.
15861  * See the License for the specific language governing permissions
15862  * and limitations under the License.
15863  *
15864  * When distributing Covered Code, include this CDDL HEADER in each
15865  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15866  * If applicable, add the following below this CDDL HEADER, with the
15867  * fields enclosed by brackets "[]" replaced with your own identifying
15868  * information: Portions Copyright [yyyy] [name of copyright owner]
15869  *
15870  * CDDL HEADER END
15871  */
15872 /*
15873  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
15874  * All rights reserved.
15875  */
15876 
15877 /*
15878  * t_lock.h:	Prototypes for disp_locks, plus include files
15879  *		that describe the interfaces to kernel synch.
15880  *		objects.
15881  */
15882 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
15883 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
15884 /*
15885  * CDDL HEADER START
15886  *
15887  * The contents of this file are subject to the terms of the
15888  * Common Development and Distribution License, Version 1.0 only
15889  * (the "License").  You may not use this file except in compliance
15890  * with the License.
15891  *
15892  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15893  * or http://www.opensolaris.org/os/licensing.
15894  * See the License for the specific language governing permissions
15895  * and limitations under the License.
15896  *
15897  * When distributing Covered Code, include this CDDL HEADER in each
15898  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15899  * If applicable, add the following below this CDDL HEADER, with the
15900  * fields enclosed by brackets "[]" replaced with your own identifying
15901  * information: Portions Copyright [yyyy] [name of copyright owner]
15902  *
15903  * CDDL HEADER END
15904  */
15905 /*
15906  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
15907  * Use is subject to license terms.
15908  */
15909 
15910 
15911 
15912 
15913 #pragma ident "%Z%%M%	%I%	%E% SMI"
15914 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
15915 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
15916 /*
15917  * CDDL HEADER START
15918  *
15919  * The contents of this file are subject to the terms of the
15920  * Common Development and Distribution License (the "License").
15921  * You may not use this file except in compliance with the License.
15922  *
15923  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15924  * or http://www.opensolaris.org/os/licensing.
15925  * See the License for the specific language governing permissions
15926  * and limitations under the License.
15927  *
15928  *
15929  * When distributing Covered Code, include this CDDL HEADER in each
15930  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15931  * If applicable, add the following below this CDDL HEADER, with the
15932  * fields enclosed by brackets "[]" replaced with your own identifying
15933  * information: Portions Copyright [yyyy] [name of copyright owner]
15934  *
15935  * CDDL HEADER END
15936  */
15937 
15938 /*
15939  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
15940  * Use is subject to license terms.
15941  * Copyright 2016 Joyent, Inc.
15942  */
15943 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
15944 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
15945 /*
15946  * XXX	Ick.  This type needs to be visible outside the above guard because
15947  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
15948  * If we can make proc internals less visible, (which we obviously should)
15949  * then this can be invisible too.
15950  */
15951 typedef unsigned int model_t;
15952 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
15953 
15954 
15955 
15956 
15957 
15958 /*
15959  * Data queue.
15960  *
15961  * NOTE: The *only* public fields are documented in queue(9S).
15962  *       Everything else is implementation-private.
15963  *
15964  * The locking rules for the queue_t structure are extremely subtle and vary
15965  * widely depending on the field in question.  As such, each field is
15966  * annotated according to the following legend:
15967  *
15968  *   Q9S: The field is documented in queue(9S) and may be accessed without
15969  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
15970  *        However, no fields can be directly modified unless q_lock is held
15971  *        (which is not possible in a DDI compliant STREAMS module), with the
15972  *        following exceptions:
15973  *
15974  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
15975  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
15976  *		    locking rules on it.
15977  *         - q_qinfo: can be modified before qprocson().
15978  *
15979  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
15980  *		    rules of the STREAMS module.  The STREAMS framework never
15981  *		    modifies these fields, and is tolerant of temporarily
15982  *		    stale field values.
15983  *
15984  *	  In general, the STREAMS framework employs one of the following
15985  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
15986  *
15987  *	   - The field is only modified by the framework when the stream is
15988  *	     locked with strlock() (q_next).
15989  *
15990  *	   - The field is modified by the framework, but the modifies are
15991  *	     atomic, and temporarily stale values are harmless (q_count,
15992  *	     q_first, q_last).
15993  *
15994  *	   - The field is modified by the framework, but the field's visible
15995  *	     values are either constant or directly under the control
15996  *	     of the STREAMS module itself (q_flag).
15997  *
15998  *   QLK: The field must be accessed or modified under q_lock, except when
15999  *        the stream has been locked with strlock().  If multiple q_locks must
16000  *        be acquired, q_locks at higher addresses must be taken first.
16001  *
16002  *   STR: The field can be accessed without a lock, but must be modified under
16003  *	  strlock().
16004  *
16005  *   SQLK: The field must be accessed or modified under SQLOCK().
16006  *
16007  *   NOLK: The field can be accessed without a lock, but can only be modified
16008  *	   when the queue_t is not known to any other threads.
16009  *
16010  *   SVLK: The field must be accessed or modified under the service_queue lock.
16011  *         Note that service_lock must be taken after any needed q_locks,
16012  *	   and that no other lock should be taken while service_lock is held.
16013  *
16014  * In addition, it is always acceptable to modify a field that is not yet
16015  * known to any other threads -- and other special case exceptions exist in
16016  * the code.  Also, q_lock is used with q_wait to implement a stream head
16017  * monitor for reads and writes.
16018  */
16019 typedef struct queue {
16020  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
16021  struct msgb *q_first; /* Q9S: first message in Q	*/
16022  struct msgb *q_last; /* Q9S: last message in Q	*/
16023  struct queue *q_next; /* Q9S: next Q in stream	*/
16024  struct queue *q_link; /* SVLK: next Q for scheduling	*/
16025  void *q_ptr; /* Q9S: module-specific data	*/
16026  size_t q_count; /* Q9S: number of bytes on Q	*/
16027  uint_t q_flag; /* Q9S: Q state			*/
16028  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
16029  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
16030  size_t q_hiwat; /* Q9S: Q high water mark	*/
16031  size_t q_lowat; /* Q9S: Q low water mark	*/
16032  struct qband *q_bandp; /* QLK: band flow information	*/
16033  kmutex_t q_lock; /* NOLK: structure lock		*/
16034  struct stdata *q_stream; /* NOLK: stream backpointer	*/
16035  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
16036  unsigned char q_nband; /* QLK: number of bands		*/
16037  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
16038  struct queue *q_nfsrv; /* STR: next Q with svc routine */
16039  ushort_t q_draining; /* QLK: Q is draining		*/
16040  short q_struiot; /* QLK: sync streams Q UIO mode	*/
16041  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
16042  size_t q_mblkcnt; /* QLK: mblk count		*/
16043  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
16044  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
16045  pri_t q_spri; /* QLK: Q scheduling priority	*/
16046 
16047  /*
16048 	 * Syncq scheduling
16049 	 */
16050  struct msgb *q_sqhead; /* QLK: first syncq message	*/
16051  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
16052  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
16053  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
16054  uint_t q_sqflags; /* SQLK: syncq flags		*/
16055  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
16056 
16057  /*
16058 	 * NOLK: Reference to the queue's module's implementation
16059 	 * structure. This will be NULL for queues associated with drivers.
16060 	 */
16061  struct fmodsw_impl *q_fp;
16062 } queue_t;
16063 
16064 /*
16065  * Queue flags; unused flags not documented in queue(9S) can be recycled.
16066  */
16067 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16068 /*	UNUSED		0x00000200	   was QHLIST			*/
16069 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
16070 
16071 
16072 
16073 
16074 
16075 
16076      /* all MT type flags		*/
16077 
16078 
16079 
16080 
16081 
16082 
16083 /*	UNUSED		0x00400000	   was QHOT			*/
16084 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
16085 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
16086 
16087 
16088 
16089 
16090      /* direct interface to/from sockfs */
16091 
16092 /* queue sqflags (protected by SQLOCK). */
16093 
16094 
16095      /* This is also noted by the	*/
16096      /* q_draining field, but this one is */
16097      /* protected by SQLOCK */
16098 
16099 /*
16100  * Structure that describes the separate information
16101  * for each priority band in the queue.
16102  */
16103 typedef struct qband {
16104  struct qband *qb_next; /* next band's info */
16105  size_t qb_count; /* number of bytes in band */
16106  struct msgb *qb_first; /* beginning of band's data */
16107  struct msgb *qb_last; /* end of band's data */
16108  size_t qb_hiwat; /* high water mark for band */
16109  size_t qb_lowat; /* low water mark for band */
16110  uint_t qb_flag; /* see below */
16111  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
16112 } qband_t;
16113 
16114 /*
16115  * qband flags
16116  */
16117 
16118 
16119 
16120 
16121 /*
16122  * Maximum number of bands.
16123  */
16124 
16125 
16126 /*
16127  * Fields that can be manipulated through strqset() and strqget().
16128  */
16129 typedef enum qfields {
16130  QHIWAT = 0, /* q_hiwat or qb_hiwat */
16131  QLOWAT = 1, /* q_lowat or qb_lowat */
16132  QMAXPSZ = 2, /* q_maxpsz */
16133  QMINPSZ = 3, /* q_minpsz */
16134  QCOUNT = 4, /* q_count or qb_count */
16135  QFIRST = 5, /* q_first or qb_first */
16136  QLAST = 6, /* q_last or qb_last */
16137  QFLAG = 7, /* q_flag or qb_flag */
16138  QSTRUIOT = 8, /* q_struiot */
16139  QBAD = 9
16140 } qfields_t;
16141 
16142 /*
16143  * Module information structure
16144  */
16145 struct module_info {
16146  ushort_t mi_idnum; /* module id number */
16147  char *mi_idname; /* module name */
16148  ssize_t mi_minpsz; /* min packet size accepted */
16149  ssize_t mi_maxpsz; /* max packet size accepted */
16150  size_t mi_hiwat; /* hi-water mark */
16151  size_t mi_lowat; /* lo-water mark */
16152 };
16153 
16154 /*
16155  * queue information structure (with Synchronous STREAMS extensions)
16156  */
16157 struct qinit {
16158  int (*qi_putp)(); /* put procedure */
16159  int (*qi_srvp)(); /* service procedure */
16160  int (*qi_qopen)(); /* called on startup */
16161  int (*qi_qclose)(); /* called on finish */
16162  int (*qi_qadmin)(); /* for future use */
16163  struct module_info *qi_minfo; /* module information structure */
16164  struct module_stat *qi_mstat; /* module statistics structure */
16165  int (*qi_rwp)(); /* r/w procedure */
16166  int (*qi_infop)(); /* information procedure */
16167  int qi_struiot; /* stream uio type for struio() */
16168 };
16169 
16170 /*
16171  * Values for qi_struiot and q_struiot:
16172  */
16173 
16174 
16175 
16176 
16177 /*
16178  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
16179  */
16180 struct streamtab {
16181  struct qinit *st_rdinit;
16182  struct qinit *st_wrinit;
16183  struct qinit *st_muxrinit;
16184  struct qinit *st_muxwinit;
16185 };
16186 
16187 /*
16188  * Structure sent to mux drivers to indicate a link.
16189  */
16190 struct linkblk {
16191  queue_t *l_qtop; /* lowest level write queue of upper stream */
16192     /* (set to NULL for persistent links) */
16193  queue_t *l_qbot; /* highest level write queue of lower stream */
16194  int l_index; /* index for lower stream. */
16195 };
16196 
16197 /*
16198  * Esballoc data buffer freeing routine
16199  */
16200 typedef struct free_rtn {
16201  void (*free_func)();
16202  caddr_t free_arg;
16203 } frtn_t;
16204 
16205 /*
16206  * Data block descriptor
16207  *
16208  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
16209  * as described in datab(9S).  Everything else is implementation-private.
16210  */
16211 
16212 
16213 
16214 typedef struct datab {
16215  frtn_t *db_frtnp;
16216  unsigned char *db_base;
16217  unsigned char *db_lim;
16218  unsigned char db_ref;
16219  unsigned char db_type;
16220  unsigned char db_flags;
16221  unsigned char db_struioflag;
16222  pid_t db_cpid; /* cached pid, needs verification */
16223  void *db_cache; /* kmem cache descriptor */
16224  struct msgb *db_mblk;
16225  void (*db_free)(struct msgb *, struct datab *);
16226  void (*db_lastfree)(struct msgb *, struct datab *);
16227  intptr_t db_cksumstart;
16228  intptr_t db_cksumend;
16229  intptr_t db_cksumstuff;
16230  union {
16231   double enforce_alignment;
16232   unsigned char data[8];
16233   struct {
16234    union {
16235     uint32_t u32;
16236     uint16_t u16;
16237    } cksum_val; /* used to store calculated cksum */
16238    uint16_t flags;
16239    uint16_t pad;
16240   } cksum;
16241   /*
16242 		 * Union used for future extensions (pointer to data ?).
16243 		 */
16244  } db_struioun;
16245  struct fthdr *db_fthdr;
16246  cred_t *db_credp; /* credential */
16247 } dblk_t;
16248 
16249 
16250 
16251 
16252 /*
16253  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
16254  */
16255 
16256 
16257 
16258 /*
16259  * Used by GLDv2 to store the TCI information.
16260  */
16261 
16262 
16263 /*
16264  * Message block descriptor
16265  */
16266 typedef struct msgb {
16267  struct msgb *b_next;
16268  struct msgb *b_prev;
16269  struct msgb *b_cont;
16270  unsigned char *b_rptr;
16271  unsigned char *b_wptr;
16272  struct datab *b_datap;
16273  unsigned char b_band;
16274  unsigned char b_tag;
16275  unsigned short b_flag;
16276  queue_t *b_queue; /* for sync queues */
16277 } mblk_t;
16278 
16279 /*
16280  * bcache descriptor
16281  */
16282 typedef struct bcache {
16283  kmutex_t mutex;
16284  struct kmem_cache *buffer_cache;
16285  struct kmem_cache *dblk_cache;
16286  int alloc;
16287  int destroy;
16288  size_t size;
16289  uint_t align;
16290 } bcache_t;
16291 
16292 /*
16293  * db_flags values (all implementation private!)
16294  */
16295 
16296 
16297 
16298 
16299 /*
16300  * db_struioflag values:
16301  */
16302 
16303 
16304 
16305 
16306 
16307 
16308 /*
16309  * Message flags.  These are interpreted by the stream head.
16310  */
16311 
16312 
16313     /* write side of stream */
16314 
16315 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
16316 
16317 
16318 
16319 
16320 /*
16321  * Streams message types.
16322  */
16323 
16324 /*
16325  * Data and protocol messages (regular and priority)
16326  */
16327 
16328 
16329 
16330 
16331 /*
16332  * Control messages (regular and priority)
16333  */
16334 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16335 /*
16336  * Control messages (high priority; go to head of queue)
16337  */
16338 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16339 /*
16340  * Queue message class definitions.
16341  */
16342 
16343 
16344 
16345 /*
16346  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
16347  */
16348 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16349 struct iocblk {
16350  int ioc_cmd; /* ioctl command type */
16351  cred_t *ioc_cr; /* full credentials */
16352  uint_t ioc_id; /* ioctl id */
16353  size_t ioc_count; /* count of bytes in data field */
16354  int ioc_error; /* error code */
16355  int ioc_rval; /* return value  */
16356  int ioc_fill1;
16357  uint_t ioc_flag; /* see below */
16358  int ioc_filler[2]; /* reserved for future use */
16359 };
16360 
16361 
16362 typedef struct iocblk *IOCP;
16363 
16364 /* {ioc,cp}_flags values */
16365 
16366 
16367 
16368 
16369 
16370 
16371 
16372 /*
16373  *	Is the ioctl data formatted for our native model?
16374  */
16375 
16376 
16377 
16378 /*
16379  * structure for the M_COPYIN and M_COPYOUT message types.
16380  */
16381 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16382 struct copyreq {
16383  int cq_cmd; /* ioctl command (from ioc_cmd) */
16384  cred_t *cq_cr; /* full credentials */
16385  uint_t cq_id; /* ioctl id (from ioc_id) */
16386  caddr_t cq_addr; /* address to copy data to/from */
16387  size_t cq_size; /* number of bytes to copy */
16388  uint_t cq_flag; /* must be zero */
16389  mblk_t *cq_private; /* private state information */
16390  int cq_filler[4]; /* reserved for future use */
16391 };
16392 
16393 
16394 /*
16395  * structure for the M_IOCDATA message type.
16396  */
16397 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16398 struct copyresp {
16399  int cp_cmd; /* ioctl command (from ioc_cmd) */
16400  cred_t *cp_cr; /* full credentials */
16401  uint_t cp_id; /* ioctl id (from ioc_id) */
16402  caddr_t cp_rval; /* status of request: 0 -> success */
16403      /* 		non-zero -> failure */
16404  size_t cp_pad1;
16405  uint_t cp_pad2;
16406  mblk_t *cp_private; /* private state information */
16407  uint_t cp_flag; /* datamodel IOC_ flags; see above */
16408  int cp_filler[3];
16409 };
16410 
16411 
16412 /*
16413  * Since these structures are all intended to travel in the same message
16414  * at different stages of a STREAMS ioctl, this union is used to determine
16415  * the message size in strdoioctl().
16416  */
16417 union ioctypes {
16418  struct iocblk iocblk;
16419  struct copyreq copyreq;
16420  struct copyresp copyresp;
16421 };
16422 
16423 /*
16424  * Options structure for M_SETOPTS message.  This is sent upstream
16425  * by a module or driver to set stream head options.
16426  */
16427 struct stroptions {
16428  uint_t so_flags; /* options to set */
16429  short so_readopt; /* read option */
16430  ushort_t so_wroff; /* write offset */
16431  ssize_t so_minpsz; /* minimum read packet size */
16432  ssize_t so_maxpsz; /* maximum read packet size */
16433  size_t so_hiwat; /* read queue high water mark */
16434  size_t so_lowat; /* read queue low water mark */
16435  unsigned char so_band; /* band for water marks */
16436  ushort_t so_erropt; /* error option */
16437  ssize_t so_maxblk; /* maximum message block size */
16438  ushort_t so_copyopt; /* copy options (see stropts.h) */
16439  ushort_t so_tail; /* space available at the end */
16440 };
16441 
16442 /* flags for stream options set message */
16443 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
16444 /*
16445  * Miscellaneous parameters and flags.
16446  */
16447 
16448 /*
16449  * Values for stream flag in open to indicate module open, clone open,
16450  * and the return value for failure.
16451  */
16452 
16453 
16454 
16455 
16456 /*
16457  * Priority definitions for block allocation.
16458  */
16459 
16460 
16461 
16462 
16463 /*
16464  * Value for packet size that denotes infinity
16465  */
16466 
16467 
16468 /*
16469  * Flags for flushq()
16470  */
16471 
16472 
16473 
16474 /*
16475  * Flag for transparent ioctls
16476  */
16477 
16478 
16479 /*
16480  * Stream head default high/low water marks
16481  */
16482 
16483 
16484 
16485 /*
16486  * qwriter perimeter types
16487  */
16488 
16489 
16490 
16491 /*
16492  * Definitions of Streams macros and function interfaces.
16493  */
16494 
16495 /*
16496  * canenable - check if queue can be enabled by putq().
16497  */
16498 
16499 
16500 /*
16501  * Test if data block type is one of the data messages (i.e. not a control
16502  * message).
16503  */
16504 
16505 
16506 
16507 
16508 
16509 
16510 
16511 /*
16512  * Extract queue class of message block.
16513  */
16514 
16515 
16516 /*
16517  * Align address on next lower word boundary.
16518  */
16519 
16520 
16521 /*
16522  * Find the max size of data block.
16523  */
16524 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
16525 
16526 /*
16527  * Symbols such as htonl() are required to be exposed through this file,
16528  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
16529  */
16530 
16531 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
16532 /*
16533  * CDDL HEADER START
16534  *
16535  * The contents of this file are subject to the terms of the
16536  * Common Development and Distribution License (the "License").
16537  * You may not use this file except in compliance with the License.
16538  *
16539  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16540  * or http://www.opensolaris.org/os/licensing.
16541  * See the License for the specific language governing permissions
16542  * and limitations under the License.
16543  *
16544  * When distributing Covered Code, include this CDDL HEADER in each
16545  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16546  * If applicable, add the following below this CDDL HEADER, with the
16547  * fields enclosed by brackets "[]" replaced with your own identifying
16548  * information: Portions Copyright [yyyy] [name of copyright owner]
16549  *
16550  * CDDL HEADER END
16551  */
16552 
16553 /*
16554  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
16555  * Use is subject to license terms.
16556  */
16557 
16558 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
16559 /*	  All Rights Reserved  	*/
16560 
16561 /*
16562  * University Copyright- Copyright (c) 1982, 1986, 1988
16563  * The Regents of the University of California
16564  * All Rights Reserved
16565  *
16566  * University Acknowledgment- Portions of this document are derived from
16567  * software developed by the University of California, Berkeley, and its
16568  * contributors.
16569  */
16570 
16571 
16572 
16573 
16574 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
16575 /*
16576  * CDDL HEADER START
16577  *
16578  * The contents of this file are subject to the terms of the
16579  * Common Development and Distribution License (the "License").
16580  * You may not use this file except in compliance with the License.
16581  *
16582  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16583  * or http://www.opensolaris.org/os/licensing.
16584  * See the License for the specific language governing permissions
16585  * and limitations under the License.
16586  *
16587  *
16588  * When distributing Covered Code, include this CDDL HEADER in each
16589  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16590  * If applicable, add the following below this CDDL HEADER, with the
16591  * fields enclosed by brackets "[]" replaced with your own identifying
16592  * information: Portions Copyright [yyyy] [name of copyright owner]
16593  *
16594  * CDDL HEADER END
16595  */
16596 
16597 /*
16598  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
16599  * Use is subject to license terms.
16600  * Copyright 2016 Joyent, Inc.
16601  */
16602 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
16603 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
16604 /*
16605  * CDDL HEADER START
16606  *
16607  * The contents of this file are subject to the terms of the
16608  * Common Development and Distribution License, Version 1.0 only
16609  * (the "License").  You may not use this file except in compliance
16610  * with the License.
16611  *
16612  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16613  * or http://www.opensolaris.org/os/licensing.
16614  * See the License for the specific language governing permissions
16615  * and limitations under the License.
16616  *
16617  * When distributing Covered Code, include this CDDL HEADER in each
16618  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16619  * If applicable, add the following below this CDDL HEADER, with the
16620  * fields enclosed by brackets "[]" replaced with your own identifying
16621  * information: Portions Copyright [yyyy] [name of copyright owner]
16622  *
16623  * CDDL HEADER END
16624  */
16625 /*
16626  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
16627  *
16628  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
16629  * Use is subject to license terms.
16630  */
16631 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
16632 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
16633 /*
16634  * macros for conversion between host and (internet) network byte order
16635  */
16636 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
16637 typedef uint16_t in_port_t;
16638 
16639 
16640 
16641 
16642 typedef uint32_t in_addr_t;
16643 
16644 
16645 
16646 extern uint32_t htonl(uint32_t);
16647 extern uint16_t htons(uint16_t);
16648 extern uint32_t ntohl(uint32_t);
16649 extern uint16_t ntohs(uint16_t);
16650 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
16651 extern uint64_t htonll(uint64_t);
16652 extern uint64_t ntohll(uint64_t);
16653 
16654 
16655 
16656 
16657 
16658 
16659 /*
16660  * Macros to reverse byte order
16661  */
16662 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
16663 /*
16664  * Macros to convert from a specific byte order to/from native byte order
16665  */
16666 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
16667 /*
16668  * Macros to read unaligned values from a specific byte order to
16669  * native byte order
16670  */
16671 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
16672 /*
16673  * Macros to write unaligned values from native byte order to a specific byte
16674  * order.
16675  */
16676 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
16677 
16678 
16679 
16680 
16681 
16682 
16683 
16684 /*
16685  * Note: IPv4 address data structures usage conventions.
16686  * The "in_addr_t" type below (required by Unix standards)
16687  * is NOT a typedef of "struct in_addr" and violates the usual
16688  * conventions where "struct <name>" and <name>_t are corresponding
16689  * typedefs.
16690  * To minimize confusion, kernel data structures/usage prefers use
16691  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
16692  * The user level APIs continue to follow the historic popular
16693  * practice of using "struct in_addr".
16694  */
16695 
16696 
16697 
16698 
16699 
16700 
16701 
16702 typedef uint32_t ipaddr_t;
16703 
16704 
16705 
16706 
16707 struct in6_addr {
16708  union {
16709   /*
16710 		 * Note: Static initalizers of "union" type assume
16711 		 * the constant on the RHS is the type of the first member
16712 		 * of union.
16713 		 * To make static initializers (and efficient usage) work,
16714 		 * the order of members exposed to user and kernel view of
16715 		 * this data structure is different.
16716 		 * User environment sees specified uint8_t type as first
16717 		 * member whereas kernel sees most efficient type as
16718 		 * first member.
16719 		 */
16720 
16721 
16722 
16723 
16724   uint8_t _S6_u8[16]; /* IPv6 address */
16725   uint32_t _S6_u32[4]; /* IPv6 address */
16726 
16727   uint32_t __S6_align; /* Align on 32 bit boundary */
16728  } _S6_un;
16729 };
16730 
16731 
16732 
16733 
16734 
16735 
16736 
16737 typedef struct in6_addr in6_addr_t;
16738 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16739 /*
16740  * Protocols
16741  *
16742  * Some of these constant names are copied for the DTrace IP provider in
16743  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
16744  * in sync.
16745  */
16746 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16747       /* Transmission Protocol */
16748 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16749 /*
16750  * Port/socket numbers: network standard functions
16751  *
16752  * Entries should exist here for each port number compiled into an ON
16753  * component, such as snoop.
16754  */
16755 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16756 /*
16757  * Port/socket numbers: host specific functions
16758  */
16759 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16760 /*
16761  * Internet Key Exchange (IKE) ports
16762  */
16763 
16764 
16765 
16766 /*
16767  * UNIX TCP sockets
16768  */
16769 
16770 
16771 
16772 
16773 
16774 
16775 /*
16776  * UNIX UDP sockets
16777  */
16778 
16779 
16780 
16781 
16782 
16783 
16784 
16785 /*
16786  * DHCPv6 UDP ports
16787  */
16788 
16789 
16790 
16791 
16792 
16793 /*
16794  * Ports < IPPORT_RESERVED are reserved for
16795  * privileged processes (e.g. root).
16796  * Ports > IPPORT_USERRESERVED are reserved
16797  * for servers, not necessarily privileged.
16798  */
16799 
16800 
16801 
16802 /*
16803  * Link numbers
16804  */
16805 
16806 
16807 
16808 
16809 /*
16810  * IPv4 Internet address
16811  *	This definition contains obsolete fields for compatibility
16812  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
16813  *	divisions into fixed fields misleading at best.  New code
16814  *	should use only the s_addr field.
16815  */
16816 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16817 struct in_addr {
16818  union {
16819   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
16820   struct { uint16_t s_w1, s_w2; } S_un_w;
16821 
16822   uint32_t S_addr;
16823 
16824 
16825 
16826  } S_un;
16827 
16828 
16829 
16830 
16831 
16832 
16833 };
16834 
16835 /*
16836  * Definitions of bits in internet address integers.
16837  * On subnets, the decomposition of addresses to host and net parts
16838  * is done according to subnet mask, not the masks here.
16839  *
16840  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
16841  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
16842  * obsolete". IN_MULTICAST macro should be used to test if a address
16843  * is a multicast address.
16844  */
16845 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16846 /*
16847  * We have removed CLASS E checks from the kernel
16848  * But we preserve these defines for userland in order
16849  * to avoid compile  breakage of some 3rd party piece of software
16850  */
16851 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16852 /* Scoped IPv4 prefixes (in host byte-order) */
16853 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16854 /* RFC 3927 IPv4 link local address (i in host byte-order) */
16855 
16856 
16857 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
16858 
16859 
16860 
16861 
16862 
16863 
16864 /*
16865  * Define a macro to stuff the loopback address into an Internet address
16866  */
16867 
16868 
16869 
16870 
16871 
16872 
16873 /*
16874  * IPv4 Socket address.
16875  */
16876 struct sockaddr_in {
16877  sa_family_t sin_family;
16878  in_port_t sin_port;
16879  struct in_addr sin_addr;
16880 
16881  char sin_zero[8];
16882 
16883 
16884 
16885 };
16886 
16887 
16888 /*
16889  * IPv6 socket address.
16890  */
16891 struct sockaddr_in6 {
16892  sa_family_t sin6_family;
16893  in_port_t sin6_port;
16894  uint32_t sin6_flowinfo;
16895  struct in6_addr sin6_addr;
16896  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
16897  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
16898 };
16899 
16900 /*
16901  * Macros for accessing the traffic class and flow label fields from
16902  * sin6_flowinfo.
16903  * These are designed to be applied to a 32-bit value.
16904  */
16905 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16906 /* masks */
16907 
16908 
16909 
16910 
16911 
16912 /*
16913  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
16914  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
16915  * only. They need to be different for User/Kernel versions because union
16916  * component data structure is defined differently (it is identical at
16917  * binary representation level).
16918  *
16919  * const struct in6_addr IN6ADDR_ANY_INIT;
16920  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
16921  */
16922 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16923 /*
16924  * RFC 2553 specifies the following macros. Their type is defined
16925  * as "int" in the RFC but they only have boolean significance
16926  * (zero or non-zero). For the purposes of our comment notation,
16927  * we assume a hypothetical type "bool" defined as follows to
16928  * write the prototypes assumed for macros in our comments better.
16929  *
16930  * typedef int bool;
16931  */
16932 
16933 /*
16934  * IN6 macros used to test for special IPv6 addresses
16935  * (Mostly from spec)
16936  *
16937  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
16938  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
16939  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
16940  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
16941  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
16942  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
16943  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
16944  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
16945  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
16946  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
16947  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
16948  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
16949  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
16950  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
16951  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
16952  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
16953  *	     const struct in6_addr *);			    -- Not from RFC2553
16954  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
16955  */
16956 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16957 /*
16958  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
16959  * Note: This macro is currently NOT defined in RFC2553 specification
16960  * and not a standard macro that portable applications should use.
16961  */
16962 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16963 /* Exclude loopback and unspecified address */
16964 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16965 /*
16966  * Note:
16967  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
16968  * specification and not a standard macro that portable applications
16969  * should use.
16970  */
16971 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16972 /*
16973  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
16974  * RFC, and shouldn't be used by portable applications.  It is used to see
16975  * if an address is a solicited-node multicast address, which is prefixed
16976  * with ff02:0:0:0:0:1:ff00::/104.
16977  */
16978 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16979 /*
16980  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
16981  * 6to4 addresses have the same /48 prefix, and, hence, are from the
16982  * same 6to4 site.
16983  */
16984 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
16985 /*
16986  * IN6_IS_ADDR_LINKSCOPE
16987  * Identifies an address as being either link-local, link-local multicast or
16988  * node-local multicast.  All types of addresses are considered to be unique
16989  * within the scope of a given link.
16990  */
16991 
16992 
16993 
16994 
16995 /*
16996  * Useful utility macros for operations with IPv6 addresses
16997  * Note: These macros are NOT defined in the RFC2553 or any other
16998  * standard specification and are not standard macros that portable
16999  * applications should use.
17000  */
17001 
17002 /*
17003  * IN6_V4MAPPED_TO_INADDR
17004  * IN6_V4MAPPED_TO_IPADDR
17005  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
17006  *	Note: These macros are NOT defined in RFC2553 or any other standard
17007  *	specification and are not macros that portable applications should
17008  *	use.
17009  *
17010  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
17011  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
17012  *
17013  */
17014 
17015 
17016 
17017 
17018 
17019 /*
17020  * IN6_INADDR_TO_V4MAPPED
17021  * IN6_IPADDR_TO_V4MAPPED
17022  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
17023  *	address.
17024  *	Note: These macros are NOT defined in RFC2553 or any other standard
17025  *	specification and are not macros that portable applications should
17026  *	use.
17027  *
17028  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
17029  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
17030  *
17031  */
17032 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17033 /*
17034  * IN6_6TO4_TO_V4ADDR
17035  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
17036  *      address.
17037  *	Note: This macro is NOT defined in RFC2553 or any other standard
17038  *	specification and is not a macro that portable applications should
17039  *	use.
17040  *	Note: we don't use the IPADDR form of the macro because we need
17041  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
17042  *	32-bit aligned.
17043  *
17044  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
17045  *
17046  */
17047 
17048 
17049 
17050 
17051 
17052 
17053 /*
17054  * IN6_V4ADDR_TO_6TO4
17055  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
17056  *	will be created from the IPv4 Address.
17057  *	Note:  This method for creating 6to4 addresses is not standardized
17058  *	outside of Solaris.  The newly created 6to4 address will be of the form
17059  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
17060  *	HOSTID will equal 1.
17061  *
17062  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
17063  *
17064  */
17065 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17066 /*
17067  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
17068  *	 Compares if IPv6 addresses are equal.
17069  * Note: Compares in order of high likelyhood of a miss so we minimize
17070  * compares. (Current heuristic order, compare in reverse order of
17071  * uint32_t units)
17072  *
17073  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
17074  *			    const struct in6_addr *);
17075  */
17076 
17077 
17078 
17079 
17080 
17081 
17082 /*
17083  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
17084  *	Compares if prefixed parts of IPv6 addresses are equal.
17085  *
17086  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
17087  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
17088  *				       const struct in6_addr *,
17089  *				       int);
17090  */
17091 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17092 /*
17093  * Options for use with [gs]etsockopt at the IP level.
17094  *
17095  * Note: Some of the IP_ namespace has conflict with and
17096  * and is exposed through <xti.h>. (It also requires exposing
17097  * options not implemented). The options with potential
17098  * for conflicts use #ifndef guards.
17099  */
17100 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17101 /*
17102  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
17103  * is used to differentiate b/w the two.
17104  */
17105 
17106 
17107 
17108 
17109 
17110 /*
17111  * Different preferences that can be requested from IPSEC protocols.
17112  */
17113 
17114 
17115 
17116 
17117 /*
17118  * This can be used with the setsockopt() call to set per socket security
17119  * options. When the application uses per-socket API, we will reflect
17120  * the request on both outbound and inbound packets.
17121  */
17122 
17123 typedef struct ipsec_req {
17124  uint_t ipsr_ah_req; /* AH request */
17125  uint_t ipsr_esp_req; /* ESP request */
17126  uint_t ipsr_self_encap_req; /* Self-Encap request */
17127  uint8_t ipsr_auth_alg; /* Auth algs for AH */
17128  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
17129  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
17130 } ipsec_req_t;
17131 
17132 /*
17133  * MCAST_* options are protocol-independent.  The actual definitions
17134  * are with the v6 options below; this comment is here to note the
17135  * namespace usage.
17136  *
17137  * #define	MCAST_JOIN_GROUP	0x29
17138  * #define	MCAST_LEAVE_GROUP	0x2a
17139  * #define	MCAST_BLOCK_SOURCE	0x2b
17140  * #define	MCAST_UNBLOCK_SOURCE	0x2c
17141  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
17142  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
17143  */
17144 
17145 
17146 /*
17147  * SunOS private (potentially not portable) IP_ option names
17148  */
17149 
17150 
17151 
17152 /* can be reused		0x44 */
17153 
17154 
17155 /*
17156  * Option values and names (when !_XPG5) shared with <xti_inet.h>
17157  */
17158 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17159 /*
17160  * The following option values are reserved by <xti_inet.h>
17161  *
17162  * T_IP_OPTIONS	0x107	 -  IP per-packet options
17163  * T_IP_TOS	0x108	 -  IP per packet type of service
17164  */
17165 
17166 /*
17167  * Default value constants for multicast attributes controlled by
17168  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
17169  */
17170 
17171 
17172 
17173 
17174 /*
17175  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
17176  */
17177 struct ip_mreq {
17178  struct in_addr imr_multiaddr; /* IP multicast address of group */
17179  struct in_addr imr_interface; /* local IP address of interface */
17180 };
17181 
17182 /*
17183  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
17184  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
17185  */
17186 struct ip_mreq_source {
17187  struct in_addr imr_multiaddr; /* IP address of group */
17188  struct in_addr imr_sourceaddr; /* IP address of source */
17189  struct in_addr imr_interface; /* IP address of interface */
17190 };
17191 
17192 /*
17193  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
17194  * IPv6 addresses.
17195  */
17196 struct ipv6_mreq {
17197  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
17198  unsigned int ipv6mr_interface; /* interface index */
17199 };
17200 
17201 /*
17202  * Use #pragma pack() construct to force 32-bit alignment on amd64.
17203  * This is needed to keep the structure size and offsets consistent
17204  * between a 32-bit app and the 64-bit amd64 kernel in structures
17205  * where 64-bit alignment would create gaps (in this case, structures
17206  * which have a uint32_t followed by a struct sockaddr_storage).
17207  */
17208 
17209 
17210 
17211 
17212 /*
17213  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
17214  */
17215 struct group_req {
17216  uint32_t gr_interface; /* interface index */
17217  struct sockaddr_storage gr_group; /* group address */
17218 };
17219 
17220 /*
17221  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
17222  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
17223  */
17224 struct group_source_req {
17225  uint32_t gsr_interface; /* interface index */
17226  struct sockaddr_storage gsr_group; /* group address */
17227  struct sockaddr_storage gsr_source; /* source address */
17228 };
17229 
17230 /*
17231  * Argument for SIOC[GS]MSFILTER ioctls
17232  */
17233 struct group_filter {
17234  uint32_t gf_interface; /* interface index */
17235  struct sockaddr_storage gf_group; /* multicast address */
17236  uint32_t gf_fmode; /* filter mode */
17237  uint32_t gf_numsrc; /* number of sources */
17238  struct sockaddr_storage gf_slist[1]; /* source address */
17239 };
17240 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17241 /*
17242  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
17243  */
17244 struct ip_msfilter {
17245  struct in_addr imsf_multiaddr; /* IP multicast address of group */
17246  struct in_addr imsf_interface; /* local IP address of interface */
17247  uint32_t imsf_fmode; /* filter mode */
17248  uint32_t imsf_numsrc; /* number of sources in src_list */
17249  struct in_addr imsf_slist[1]; /* start of source list */
17250 };
17251 
17252 
17253 
17254 
17255 
17256 /*
17257  * Multicast source filter manipulation functions in libsocket;
17258  * defined in RFC 3678.
17259  */
17260 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
17261    uint_t, struct sockaddr_storage *);
17262 
17263 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
17264    uint_t *, struct sockaddr_storage *);
17265 
17266 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
17267    uint32_t, struct in_addr *);
17268 
17269 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
17270    uint32_t *, struct in_addr *);
17271 
17272 /*
17273  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
17274  */
17275 
17276 
17277 
17278 /*
17279  * Argument struct for IP_PKTINFO option
17280  */
17281 typedef struct in_pktinfo {
17282  unsigned int ipi_ifindex; /* send/recv interface index */
17283  struct in_addr ipi_spec_dst; /* matched source address */
17284  struct in_addr ipi_addr; /* src/dst address in IP hdr */
17285 } in_pktinfo_t;
17286 
17287 /*
17288  * Argument struct for IPV6_PKTINFO option
17289  */
17290 struct in6_pktinfo {
17291  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
17292  unsigned int ipi6_ifindex; /* send/recv interface index */
17293 };
17294 
17295 /*
17296  * Argument struct for IPV6_MTUINFO option
17297  */
17298 struct ip6_mtuinfo {
17299  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
17300  uint32_t ip6m_mtu; /* path MTU in host byte order */
17301 };
17302 
17303 /*
17304  * IPv6 routing header types
17305  */
17306 
17307 
17308 extern socklen_t inet6_rth_space(int type, int segments);
17309 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
17310 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
17311 extern int inet6_rth_reverse(const void *in, void *out);
17312 extern int inet6_rth_segments(const void *bp);
17313 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
17314 
17315 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
17316 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
17317  uint8_t type, socklen_t len, uint_t align, void **databufp);
17318 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
17319 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
17320  socklen_t vallen);
17321 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
17322  uint8_t *typep, socklen_t *lenp, void **databufp);
17323 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
17324  uint8_t type, socklen_t *lenp, void **databufp);
17325 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
17326  socklen_t vallen);
17327 
17328 
17329 /*
17330  * Argument structure for IP_ADD_PROXY_ADDR.
17331  * Note that this is an unstable, experimental interface. It may change
17332  * later. Don't use it unless you know what it is.
17333  */
17334 typedef struct {
17335  struct in_addr in_prefix_addr;
17336  unsigned int in_prefix_len;
17337 } in_prefix_t;
17338 
17339 
17340 
17341 /*
17342  * IPv6 options
17343  */
17344 
17345      /* packets. */
17346      /* argument type: uint_t */
17347 
17348      /* multicast packets. */
17349      /* argument type: struct in6_addr */
17350 
17351      /* multicast packets. */
17352      /* argument type: uint_t */
17353 
17354      /* multicast packets on same socket. */
17355      /* argument type: uint_t */
17356 
17357      /* argument type: struct ipv6_mreq */
17358 
17359      /* argument type: struct ipv6_mreq */
17360 
17361 /*
17362  * Other XPG6 constants.
17363  */
17364 
17365      /* decimal notation. */
17366 
17367      /* standard colon-hex notation. */
17368 
17369 
17370 
17371 
17372 
17373 /*
17374  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
17375  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
17376  * and IPV6_LEAVE_GROUP respectively.
17377  */
17378 
17379      /* argument type: struct ipv6_mreq */
17380 
17381      /* argument type: struct ipv6_mreq */
17382 
17383 
17384      /* arg type: "struct in6_pktingo" - */
17385 
17386 
17387 
17388 
17389      /* the routing header */
17390 
17391 
17392      /* the routing header */
17393 
17394 
17395 
17396 
17397 /*
17398  * This options exists for backwards compatability and should no longer be
17399  * used.  Use IPV6_RECVDSTOPTS instead.
17400  */
17401 
17402 
17403 
17404 
17405 /*
17406  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
17407  * the receipt of both headers.
17408  */
17409 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17410 /*
17411  * enable/disable receipt of both both IPV6_DSTOPTS headers.
17412  */
17413 
17414 
17415 /*
17416  * protocol-independent multicast membership options.
17417  */
17418 
17419 
17420 
17421 
17422 
17423 
17424 
17425 /* 32Bit field for IPV6_SRC_PREFERENCES */
17426 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
17427 /*
17428  * SunOS private (potentially not portable) IPV6_ option names
17429  */
17430 
17431 
17432      /* unspecified (all zeros) */
17433 
17434 /*
17435  * Miscellaneous IPv6 constants.
17436  */
17437 
17438 
17439 
17440 
17441 /*
17442  * Extern declarations for pre-defined global const variables
17443  */
17444 
17445 
17446 
17447 extern const struct in6_addr in6addr_any;
17448 extern const struct in6_addr in6addr_loopback;
17449 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
17450 
17451 
17452 
17453 
17454 
17455 /*
17456  * NOTE
17457  *
17458  * The contents of this file are private to the implementation of
17459  * Solaris and are subject to change at any time without notice.
17460  * Applications and drivers using these interfaces may fail to
17461  * run on future releases.
17462  */
17463 
17464 /* Available both in kernel and for user space */
17465 
17466 /* zone id restrictions and special ids */
17467 
17468 
17469 
17470 
17471 
17472 
17473 /*
17474  * Special zoneid_t token to refer to all zones.
17475  */
17476 
17477 
17478 /* system call subcodes */
17479 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
17480 /* zone attributes */
17481 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
17482 /* Start of the brand-specific attribute namespace */
17483 # 129 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
17484 /*
17485  * Exit values that may be returned by scripts or programs invoked by various
17486  * zone commands.
17487  *
17488  * These are defined as:
17489  *
17490  *	ZONE_SUBPROC_OK
17491  *	===============
17492  *	The subprocess completed successfully.
17493  *
17494  *	ZONE_SUBPROC_USAGE
17495  *	==================
17496  *	The subprocess failed with a usage message, or a usage message should
17497  *	be output in its behalf.
17498  *
17499  *	ZONE_SUBPROC_NOTCOMPLETE
17500  *	========================
17501  *	The subprocess did not complete, but the actions performed by the
17502  *	subprocess require no recovery actions by the user.
17503  *
17504  *	For example, if the subprocess were called by "zoneadm install," the
17505  *	installation of the zone did not succeed but the user need not perform
17506  *	a "zoneadm uninstall" before attempting another install.
17507  *
17508  *	ZONE_SUBPROC_FATAL
17509  *	==================
17510  *	The subprocess failed in a fatal manner, usually one that will require
17511  *	some type of recovery action by the user.
17512  *
17513  *	For example, if the subprocess were called by "zoneadm install," the
17514  *	installation of the zone did not succeed and the user will need to
17515  *	perform a "zoneadm uninstall" before another install attempt is
17516  *	possible.
17517  *
17518  *	The non-success exit values are large to avoid accidental collision
17519  *	with values used internally by some commands (e.g. "Z_ERR" and
17520  *	"Z_USAGE" as used by zoneadm.)
17521  */
17522 # 189 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
17523 typedef struct {
17524  const char *zone_name;
17525  const char *zone_root;
17526  const struct priv_set *zone_privs;
17527  size_t zone_privssz;
17528  const char *rctlbuf;
17529  size_t rctlbufsz;
17530  int *extended_error;
17531  const char *zfsbuf;
17532  size_t zfsbufsz;
17533  int match; /* match level */
17534  uint32_t doi; /* DOI for label */
17535  const bslabel_t *label; /* label associated with zone */
17536  int flags;
17537 } zone_def;
17538 
17539 /* extended error information */
17540 
17541 
17542 
17543 
17544 
17545 /*
17546  * zone_status values
17547  *
17548  * You must modify zone_status_names in mdb(1M)'s genunix module
17549  * (genunix/zone.c) when you modify this enum.
17550  */
17551 typedef enum {
17552  ZONE_IS_UNINITIALIZED = 0,
17553  ZONE_IS_INITIALIZED,
17554  ZONE_IS_READY,
17555  ZONE_IS_BOOTING,
17556  ZONE_IS_RUNNING,
17557  ZONE_IS_SHUTTING_DOWN,
17558  ZONE_IS_EMPTY,
17559  ZONE_IS_DOWN,
17560  ZONE_IS_DYING,
17561  ZONE_IS_DEAD
17562 } zone_status_t;
17563 
17564 
17565 
17566 /*
17567  * Valid commands which may be issued by zoneadm to zoneadmd.  The kernel also
17568  * communicates with zoneadmd, but only uses Z_REBOOT and Z_HALT.
17569  */
17570 typedef enum zone_cmd {
17571  Z_READY, Z_BOOT, Z_FORCEBOOT, Z_REBOOT, Z_HALT, Z_NOTE_UNINSTALLING,
17572  Z_MOUNT, Z_FORCEMOUNT, Z_UNMOUNT, Z_SHUTDOWN
17573 } zone_cmd_t;
17574 
17575 /*
17576  * The structure of a request to zoneadmd.
17577  */
17578 typedef struct zone_cmd_arg {
17579  uint64_t uniqid; /* unique "generation number" */
17580  zone_cmd_t cmd; /* requested action */
17581  uint32_t _pad; /* need consistent 32/64 bit alignmt */
17582  char locale[1024]; /* locale in which to render messages */
17583  char bootbuf[256]; /* arguments passed to zone_boot() */
17584 } zone_cmd_arg_t;
17585 
17586 /*
17587  * Structure of zoneadmd's response to a request.  A NULL return value means
17588  * the caller should attempt to restart zoneadmd and retry.
17589  */
17590 typedef struct zone_cmd_rval {
17591  int rval; /* return value of request */
17592  char errbuf[1]; /* variable-sized buffer containing error messages */
17593 } zone_cmd_rval_t;
17594 
17595 /*
17596  * The zone support infrastructure uses the zone name as a component
17597  * of unix domain (AF_UNIX) sockets, which are limited to 108 characters
17598  * in length, so ZONENAME_MAX is limited by that.
17599  */
17600 
17601 
17602 
17603 
17604 /*
17605  * Extended Regular expression (see regex(5)) which matches all valid zone
17606  * names.
17607  */
17608 
17609 
17610 /*
17611  * Where the zones support infrastructure places temporary files.
17612  */
17613 
17614 
17615 /*
17616  * The path to the door used by clients to communicate with zoneadmd.
17617  */
17618 
17619 
17620 
17621 /* zone_flags */
17622 /*
17623  * Threads that read or write the following flag must hold zone_lock.
17624  */
17625 
17626 
17627 /*
17628  * The following threads are set when the zone is created and never changed.
17629  * Threads that test for these flags don't have to hold zone_lock.
17630  */
17631 
17632 
17633 
17634 
17635 
17636 /* zone_create flags */
17637 
17638 
17639 /* zone network properties */
17640 
17641 
17642 
17643 
17644 
17645 
17646 typedef struct zone_net_data {
17647  int zn_type;
17648  int zn_len;
17649  datalink_id_t zn_linkid;
17650  uint8_t zn_val[1];
17651 } zone_net_data_t;
17652 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
17653 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 1
17654 /*
17655  * CDDL HEADER START
17656  *
17657  * The contents of this file are subject to the terms of the
17658  * Common Development and Distribution License (the "License").
17659  * You may not use this file except in compliance with the License.
17660  *
17661  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17662  * or http://www.opensolaris.org/os/licensing.
17663  * See the License for the specific language governing permissions
17664  * and limitations under the License.
17665  *
17666  * When distributing Covered Code, include this CDDL HEADER in each
17667  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17668  * If applicable, add the following below this CDDL HEADER, with the
17669  * fields enclosed by brackets "[]" replaced with your own identifying
17670  * information: Portions Copyright [yyyy] [name of copyright owner]
17671  *
17672  * CDDL HEADER END
17673  */
17674 /*
17675  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
17676  *
17677  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
17678  */
17679 
17680 
17681 
17682 
17683 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17684 /*
17685  * CDDL HEADER START
17686  *
17687  * The contents of this file are subject to the terms of the
17688  * Common Development and Distribution License (the "License").
17689  * You may not use this file except in compliance with the License.
17690  *
17691  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17692  * or http://www.opensolaris.org/os/licensing.
17693  * See the License for the specific language governing permissions
17694  * and limitations under the License.
17695  *
17696  * When distributing Covered Code, include this CDDL HEADER in each
17697  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17698  * If applicable, add the following below this CDDL HEADER, with the
17699  * fields enclosed by brackets "[]" replaced with your own identifying
17700  * information: Portions Copyright [yyyy] [name of copyright owner]
17701  *
17702  * CDDL HEADER END
17703  */
17704 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17705 /*	  All Rights Reserved  	*/
17706 
17707 
17708 /*
17709  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17710  * Use is subject to license terms.
17711  *
17712  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17713  * Copyright 2016 Joyent, Inc.
17714  */
17715 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
17716 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
17717 /*
17718  * CDDL HEADER START
17719  *
17720  * The contents of this file are subject to the terms of the
17721  * Common Development and Distribution License (the "License").
17722  * You may not use this file except in compliance with the License.
17723  *
17724  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17725  * or http://www.opensolaris.org/os/licensing.
17726  * See the License for the specific language governing permissions
17727  * and limitations under the License.
17728  *
17729  * When distributing Covered Code, include this CDDL HEADER in each
17730  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17731  * If applicable, add the following below this CDDL HEADER, with the
17732  * fields enclosed by brackets "[]" replaced with your own identifying
17733  * information: Portions Copyright [yyyy] [name of copyright owner]
17734  *
17735  * CDDL HEADER END
17736  */
17737 /*
17738  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17739  * Use is subject to license terms.
17740  */
17741 
17742 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
17743 /*	  All Rights Reserved  	*/
17744 
17745 /*
17746  * Portions of this source code were derived from Berkeley 4.3 BSD
17747  * under license from the Regents of the University of California.
17748  */
17749 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
17750 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv_names.h" 1
17751 /*
17752  * CDDL HEADER START
17753  *
17754  * The contents of this file are subject to the terms of the
17755  * Common Development and Distribution License (the "License").
17756  * You may not use this file except in compliance with the License.
17757  *
17758  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17759  * or http://www.opensolaris.org/os/licensing.
17760  * See the License for the specific language governing permissions
17761  * and limitations under the License.
17762  *
17763  * When distributing Covered Code, include this CDDL HEADER in each
17764  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17765  * If applicable, add the following below this CDDL HEADER, with the
17766  * fields enclosed by brackets "[]" replaced with your own identifying
17767  * information: Portions Copyright [yyyy] [name of copyright owner]
17768  *
17769  * CDDL HEADER END
17770  */
17771 /*
17772  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
17773  * Copyright 2015, Joyent, Inc. All rights reserved.
17774  *
17775  * Privilege constant definitions.  Privileges and privilege sets
17776  * are only known by name and should be mapped at runtime.
17777  *
17778  * THIS FILE WAS GENERATED; DO NOT EDIT
17779  */
17780 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv_names.h"
17781 /*
17782  * Privilege names
17783  */
17784 /*
17785  * Allows a process to request critical events without limitation.
17786  * Allows a process to request reliable delivery of all events on
17787  * any event queue.
17788  */
17789 
17790 
17791 /*
17792  * Allows a process to set the service FMRI value of a process
17793  * contract template.
17794  */
17795 
17796 
17797 /*
17798  * Allows a process to observe contract events generated by
17799  * contracts created and owned by users other than the process's
17800  * effective user ID.
17801  * Allows a process to open contract event endpoints belonging to
17802  * contracts created and owned by users other than the process's
17803  * effective user ID.
17804  */
17805 
17806 
17807 /*
17808  * Allow a process to access per-CPU hardware performance counters.
17809  */
17810 
17811 
17812 /*
17813  * Allows DTrace kernel-level tracing.
17814  */
17815 
17816 
17817 /*
17818  * Allows DTrace process-level tracing.
17819  * Allows process-level tracing probes to be placed and enabled in
17820  * processes to which the user has permissions.
17821  */
17822 
17823 
17824 /*
17825  * Allows DTrace user-level tracing.
17826  * Allows use of the syscall and profile DTrace providers to
17827  * examine processes to which the user has permissions.
17828  */
17829 
17830 
17831 /*
17832  * Allows a process to change a file's owner user ID.
17833  * Allows a process to change a file's group ID to one other than
17834  * the process' effective group ID or one of the process'
17835  * supplemental group IDs.
17836  */
17837 
17838 
17839 /*
17840  * Allows a process to give away its files; a process with this
17841  * privilege will run as if {_POSIX_CHOWN_RESTRICTED} is not
17842  * in effect.
17843  */
17844 
17845 
17846 /*
17847  * Allows a process to execute an executable file whose permission
17848  * bits or ACL do not allow the process execute permission.
17849  */
17850 
17851 
17852 /*
17853  * Allows a process to read a file or directory whose permission
17854  * bits or ACL do not allow the process read permission.
17855  */
17856 
17857 
17858 /*
17859  * Allows a process to search a directory whose permission bits or
17860  * ACL do not allow the process search permission.
17861  */
17862 
17863 
17864 /*
17865  * Allows a process to write a file or directory whose permission
17866  * bits or ACL do not allow the process write permission.
17867  * In order to write files owned by uid 0 in the absence of an
17868  * effective uid of 0 ALL privileges are required.
17869  */
17870 
17871 
17872 /*
17873  * Allows a process to set the sensitivity label of a file or
17874  * directory to a sensitivity label that does not dominate the
17875  * existing sensitivity label.
17876  * This privilege is interpreted only if the system is configured
17877  * with Trusted Extensions.
17878  */
17879 
17880 
17881 /*
17882  * Allows a process to set immutable, nounlink or appendonly
17883  * file attributes.
17884  */
17885 
17886 
17887 /*
17888  * Allows a process to create hardlinks to files owned by a uid
17889  * different from the process' effective uid.
17890  */
17891 
17892 
17893 /*
17894  * Allows a process which is not the owner of a file or directory
17895  * to perform the following operations that are normally permitted
17896  * only for the file owner: modify that file's access and
17897  * modification times; remove or rename a file or directory whose
17898  * parent directory has the ``save text image after execution''
17899  * (sticky) bit set; mount a ``namefs'' upon a file; modify
17900  * permission bits or ACL except for the set-uid and set-gid
17901  * bits.
17902  */
17903 
17904 
17905 /*
17906  * Allows a process to read objects in the filesystem.
17907  */
17908 
17909 
17910 /*
17911  * Allows a process to change the ownership of a file or write to
17912  * a file without the set-user-ID and set-group-ID bits being
17913  * cleared.
17914  * Allows a process to set the set-group-ID bit on a file or
17915  * directory whose group is not the process' effective group or
17916  * one of the process' supplemental groups.
17917  * Allows a process to set the set-user-ID bit on a file with
17918  * different ownership in the presence of PRIV_FILE_OWNER.
17919  * Additional restrictions apply when creating or modifying a
17920  * set-uid 0 file.
17921  */
17922 
17923 
17924 /*
17925  * Allows a process to set the sensitivity label of a file or
17926  * directory to a sensitivity label that dominates the existing
17927  * sensitivity label.
17928  * This privilege is interpreted only if the system is configured
17929  * with Trusted Extensions.
17930  */
17931 
17932 
17933 /*
17934  * Allows a process to modify objects in the filesystem.
17935  */
17936 
17937 
17938 /*
17939  * Allows a process to make privileged ioctls to graphics devices.
17940  * Typically only xserver process needs to have this privilege.
17941  * A process with this privilege is also allowed to perform
17942  * privileged graphics device mappings.
17943  */
17944 
17945 
17946 /*
17947  * Allows a process to perform privileged mappings through a
17948  * graphics device.
17949  */
17950 
17951 
17952 /*
17953  * Allows a process to read a System V IPC
17954  * Message Queue, Semaphore Set, or Shared Memory Segment whose
17955  * permission bits do not allow the process read permission.
17956  * Allows a process to read remote shared memory whose
17957  * permission bits do not allow the process read permission.
17958  */
17959 
17960 
17961 /*
17962  * Allows a process to write a System V IPC
17963  * Message Queue, Semaphore Set, or Shared Memory Segment whose
17964  * permission bits do not allow the process write permission.
17965  * Allows a process to read remote shared memory whose
17966  * permission bits do not allow the process write permission.
17967  * Additional restrictions apply if the owner of the object has uid 0
17968  * and the effective uid of the current process is not 0.
17969  */
17970 
17971 
17972 /*
17973  * Allows a process which is not the owner of a System
17974  * V IPC Message Queue, Semaphore Set, or Shared Memory Segment to
17975  * remove, change ownership of, or change permission bits of the
17976  * Message Queue, Semaphore Set, or Shared Memory Segment.
17977  * Additional restrictions apply if the owner of the object has uid 0
17978  * and the effective uid of the current process is not 0.
17979  */
17980 
17981 
17982 /*
17983  * Allows a process to open a TCP, UDP, SDP or SCTP network endpoint.
17984  */
17985 
17986 
17987 /*
17988  * Allow a process to bind to a port that is configured as a
17989  * multi-level port(MLP) for the process's zone. This privilege
17990  * applies to both shared address and zone-specific address MLPs.
17991  * See tnzonecfg(4) from the Trusted Extensions manual pages for
17992  * information on configuring MLP ports.
17993  * This privilege is interpreted only if the system is configured
17994  * with Trusted Extensions.
17995  */
17996 
17997 
17998 /*
17999  * Allows a process to send and receive ICMP packets.
18000  */
18001 
18002 
18003 /*
18004  * Allows a process to set NET_MAC_AWARE process flag by using
18005  * setpflags(2). This privilege also allows a process to set
18006  * SO_MAC_EXEMPT socket option by using setsockopt(3SOCKET).
18007  * The NET_MAC_AWARE process flag and the SO_MAC_EXEMPT socket
18008  * option both allow a local process to communicate with an
18009  * unlabeled peer if the local process' label dominates the
18010  * peer's default label, or if the local process runs in the
18011  * global zone.
18012  * This privilege is interpreted only if the system is configured
18013  * with Trusted Extensions.
18014  */
18015 
18016 
18017 /*
18018  * Allows a process to set SO_MAC_IMPLICIT option by using
18019  * setsockopt(3SOCKET).  This allows a privileged process to
18020  * transmit implicitly-labeled packets to a peer.
18021  * This privilege is interpreted only if the system is configured
18022  * with Trusted Extensions.
18023  */
18024 
18025 
18026 /*
18027  * Allows a process to access /dev/lo0 and the devices in /dev/ipnet/
18028  * while not requiring them to need PRIV_NET_RAWACCESS.
18029  */
18030 
18031 
18032 /*
18033  * Allows a process to bind to a privileged port
18034  * number. The privilege port numbers are 1-1023 (the traditional
18035  * UNIX privileged ports) as well as those ports marked as
18036  * "udp/tcp_extra_priv_ports" with the exception of the ports
18037  * reserved for use by NFS.
18038  */
18039 
18040 
18041 /*
18042  * Allows a process to have direct access to the network layer.
18043  */
18044 
18045 
18046 /*
18047  * Allows a process to generate audit records.
18048  * Allows a process to get its own audit pre-selection information.
18049  */
18050 
18051 
18052 /*
18053  * Allows a process to change its root directory.
18054  */
18055 
18056 
18057 /*
18058  * Allows a process to use high resolution timers.
18059  */
18060 
18061 
18062 /*
18063  * Allows a process to call execve().
18064  */
18065 
18066 
18067 /*
18068  * Allows a process to call fork1()/forkall()/vfork()
18069  */
18070 
18071 
18072 /*
18073  * Allows a process to examine the status of processes other
18074  * than those it can send signals to.  Processes which cannot
18075  * be examined cannot be seen in /proc and appear not to exist.
18076  */
18077 
18078 
18079 /*
18080  * Allows a process to lock pages in physical memory.
18081  */
18082 
18083 
18084 /*
18085  * Allows a process to access physical memory information.
18086  */
18087 
18088 
18089 /*
18090  * Allows a process to send signals to other processes, inspect
18091  * and modify process state to other processes regardless of
18092  * ownership.  When modifying another process, additional
18093  * restrictions apply:  the effective privilege set of the
18094  * attaching process must be a superset of the target process'
18095  * effective, permitted and inheritable sets; the limit set must
18096  * be a superset of the target's limit set; if the target process
18097  * has any uid set to 0 all privilege must be asserted unless the
18098  * effective uid is 0.
18099  * Allows a process to bind arbitrary processes to CPUs.
18100  */
18101 
18102 
18103 /*
18104  * Allows a process to elevate its priority above its current level.
18105  */
18106 
18107 
18108 /*
18109  * Allows all that PRIV_PROC_PRIOUP allows.
18110  * Allows a process to change its scheduling class to any scheduling class,
18111  * including the RT class.
18112  */
18113 
18114 
18115 /*
18116  * Allows a process to send signals or trace processes outside its
18117  * session.
18118  */
18119 
18120 
18121 /*
18122  * Allows a process to set its uids at will.
18123  * Assuming uid 0 requires all privileges to be asserted.
18124  */
18125 
18126 
18127 /*
18128  * Allows a process to assign a new task ID to the calling process.
18129  */
18130 
18131 
18132 /*
18133  * Allows a process to trace or send signals to processes in
18134  * other zones.
18135  */
18136 
18137 
18138 /*
18139  * Allows a process to enable and disable and manage accounting through
18140  * acct(2), getacct(2), putacct(2) and wracct(2).
18141  */
18142 
18143 
18144 /*
18145  * Allows a process to perform system administration tasks such
18146  * as setting node and domain name and specifying nscd and coreadm
18147  * settings.
18148  */
18149 
18150 
18151 /*
18152  * Allows a process to start the (kernel) audit daemon.
18153  * Allows a process to view and set audit state (audit user ID,
18154  * audit terminal ID, audit sessions ID, audit pre-selection mask).
18155  * Allows a process to turn off and on auditing.
18156  * Allows a process to configure the audit parameters (cache and
18157  * queue sizes, event to class mappings, policy options).
18158  */
18159 
18160 
18161 /*
18162  * Allows a process to perform various system configuration tasks.
18163  * Allows a process to add and remove swap devices; when adding a swap
18164  * device, a process must also have sufficient privileges to read from
18165  * and write to the swap device.
18166  */
18167 
18168 
18169 /*
18170  * Allows a process to successfully call a kernel module that
18171  * calls the kernel drv_priv(9F) function to check for allowed
18172  * access.
18173  * Allows a process to open the real console device directly.
18174  * Allows a process to open devices that have been exclusively opened.
18175  */
18176 
18177 
18178 /*
18179  * Allows a process to increase the size of a System V IPC Message
18180  * Queue buffer.
18181  */
18182 
18183 
18184 /*
18185  * Allows a process to unlink and link directories.
18186  */
18187 
18188 
18189 /*
18190  * Allows filesystem specific administrative procedures, such as
18191  * filesystem configuration ioctls, quota calls and creation/deletion
18192  * of snapshots.
18193  * Allows a process to mount and unmount filesystems which would
18194  * otherwise be restricted (i.e., most filesystems except
18195  * namefs).
18196  * A process performing a mount operation needs to have
18197  * appropriate access to the device being mounted (read-write for
18198  * "rw" mounts, read for "ro" mounts).
18199  * A process performing any of the aforementioned
18200  * filesystem operations needs to have read/write/owner
18201  * access to the mount point.
18202  * Only regular files and directories can serve as mount points
18203  * for processes which do not have all zone privileges asserted.
18204  * Unless a process has all zone privileges, the mount(2)
18205  * system call will force the "nosuid" and "restrict" options, the
18206  * latter only for autofs mountpoints.
18207  * Regardless of privileges, a process running in a non-global zone may
18208  * only control mounts performed from within said zone.
18209  * Outside the global zone, the "nodevices" option is always forced.
18210  */
18211 
18212 
18213 /*
18214  * Allows a process to configure IP tunnel links.
18215  */
18216 
18217 
18218 /*
18219  * Allows a process to configure all classes of datalinks, including
18220  * configuration allowed by PRIV_SYS_IPTUN_CONFIG.
18221  */
18222 
18223 
18224 /*
18225  * Allows a process to configure a system's IP interfaces and routes.
18226  * Allows a process to configure network parameters using ndd.
18227  * Allows a process access to otherwise restricted information using ndd.
18228  * Allows a process to configure IPsec.
18229  * Allows a process to pop anchored STREAMs modules with matching zoneid.
18230  */
18231 
18232 
18233 /*
18234  * Allows all that PRIV_SYS_IP_CONFIG, PRIV_SYS_DL_CONFIG, and
18235  * PRIV_SYS_PPP_CONFIG allow.
18236  * Allows a process to push the rpcmod STREAMs module.
18237  * Allows a process to INSERT/REMOVE STREAMs modules on locations other
18238  * than the top of the module stack.
18239  */
18240 
18241 
18242 /*
18243  * Allows a process to perform Sun private NFS specific system calls.
18244  * Allows a process to bind to ports reserved by NFS: ports 2049 (nfs)
18245  * and port 4045 (lockd).
18246  */
18247 
18248 
18249 /*
18250  * Allows a process to create and destroy PPP (sppp) interfaces.
18251  * Allows a process to configure PPP tunnels (sppptun).
18252  */
18253 
18254 
18255 /*
18256  * Allows a process to bind processes to processor sets.
18257  */
18258 
18259 
18260 /*
18261  * Allows all that PRIV_SYS_RES_BIND allows.
18262  * Allows a process to create and delete processor sets, assign
18263  * CPUs to processor sets and override the PSET_NOESCAPE property.
18264  * Allows a process to change the operational status of CPUs in
18265  * the system using p_online(2).
18266  * Allows a process to configure resource pools and to bind
18267  * processes to pools
18268  */
18269 
18270 
18271 /*
18272  * Allows a process to modify the resource limits specified
18273  * by setrlimit(2) and setrctl(2) without restriction.
18274  * Allows a process to exceed the per-user maximum number of
18275  * processes.
18276  * Allows a process to extend or create files on a filesystem that
18277  * has less than minfree space in reserve.
18278  */
18279 
18280 
18281 /*
18282  * Allows a process to access the Sun private SMB kernel module.
18283  * Allows a process to bind to ports reserved by NetBIOS and SMB:
18284  * ports 137 (NBNS), 138 (NetBIOS Datagram Service), 139 (NetBIOS
18285  * Session Service and SMB-over-NBT) and 445 (SMB-over-TCP).
18286  */
18287 
18288 
18289 /*
18290  * Allows a process to successfully call a third party loadable module
18291  * that calls the kernel suser() function to check for allowed access.
18292  * This privilege exists only for third party loadable module
18293  * compatibility and is not used by Solaris proper.
18294  */
18295 
18296 
18297 /*
18298  * Allows a process to manipulate system time using any of the
18299  * appropriate system calls: stime, adjtime, ntp_adjtime and
18300  * the IA specific RTC calls.
18301  */
18302 
18303 
18304 /*
18305  * Allows a process to translate labels that are not dominated
18306  * by the process' sensitivity label to and from an external
18307  * string form.
18308  * This privilege is interpreted only if the system is configured
18309  * with Trusted Extensions.
18310  */
18311 
18312 
18313 /*
18314  * Allows a process to manage virtualized environments such as
18315  * xVM(5).
18316  */
18317 
18318 
18319 /*
18320  * Allows a process to override colormap restrictions.
18321  * Allows a process to install or remove colormaps.
18322  * Allows a process to retrieve colormap cell entries allocated
18323  * by other processes.
18324  * This privilege is interpreted only if the system is configured
18325  * with Trusted Extensions.
18326  */
18327 
18328 
18329 /*
18330  * Allows a process to configure or destroy resources that are
18331  * permanently retained by the X server.
18332  * Allows a process to use SetScreenSaver to set the screen
18333  * saver timeout value.
18334  * Allows a process to use ChangeHosts to modify the display
18335  * access control list.
18336  * Allows a process to use GrabServer.
18337  * Allows a process to use the SetCloseDownMode request which
18338  * may retain window, pixmap, colormap, property, cursor, font,
18339  * or graphic context resources.
18340  * This privilege is interpreted only if the system is configured
18341  * with Trusted Extensions.
18342  */
18343 
18344 
18345 /*
18346  * Allows a process to read from a window resource that it does
18347  * not own (has a different user ID).
18348  * This privilege is interpreted only if the system is configured
18349  * with Trusted Extensions.
18350  */
18351 
18352 
18353 /*
18354  * Allows a process to write to or create a window resource that
18355  * it does not own (has a different user ID). A newly created
18356  * window property is created with the window's user ID.
18357  * This privilege is interpreted only if the system is configured
18358  * with Trusted Extensions.
18359  */
18360 
18361 
18362 /*
18363  * Allows a process to perform operations on window input devices.
18364  * Allows a process to get and set keyboard and pointer controls.
18365  * Allows a process to modify pointer button and key mappings.
18366  * This privilege is interpreted only if the system is configured
18367  * with Trusted Extensions.
18368  */
18369 
18370 
18371 /*
18372  * Allows a process to use the direct graphics access (DGA) X protocol
18373  * extensions. Direct process access to the frame buffer is still
18374  * required. Thus the process must have MAC and DAC privileges that
18375  * allow access to the frame buffer, or the frame buffer must be
18376  * allocated to the process.
18377  * This privilege is interpreted only if the system is configured
18378  * with Trusted Extensions.
18379  */
18380 
18381 
18382 /*
18383  * Allows a process to set the sensitivity label of a window resource
18384  * to a sensitivity label that does not dominate the existing
18385  * sensitivity label.
18386  * This privilege is interpreted only if the system is configured
18387  * with Trusted Extensions.
18388  */
18389 
18390 
18391 /*
18392  * Allows a process to set a font path.
18393  * This privilege is interpreted only if the system is configured
18394  * with Trusted Extensions.
18395  */
18396 
18397 
18398 /*
18399  * Allows a process to read from a window resource whose sensitivity
18400  * label is not equal to the process sensitivity label.
18401  * This privilege is interpreted only if the system is configured
18402  * with Trusted Extensions.
18403  */
18404 
18405 
18406 /*
18407  * Allows a process to create a window resource whose sensitivity
18408  * label is not equal to the process sensitivity label.
18409  * A newly created window property is created with the window's
18410  * sensitivity label.
18411  * This privilege is interpreted only if the system is configured
18412  * with Trusted Extensions.
18413  */
18414 
18415 
18416 /*
18417  * Allows a process to request inter-window data moves without the
18418  * intervention of the selection confirmer.
18419  * This privilege is interpreted only if the system is configured
18420  * with Trusted Extensions.
18421  */
18422 
18423 
18424 /*
18425  * Allows a process to set the sensitivity label of a window
18426  * resource to a sensitivity label that dominates the existing
18427  * sensitivity label.
18428  * This privilege is interpreted only if the system is configured
18429  * with Trusted Extensions.
18430  */
18431 
18432 
18433 /*
18434  * Allows a process access to the xVM(5) control devices for
18435  * managing guest domains and the hypervisor. This privilege is
18436  * used only if booted into xVM on x86 platforms.
18437  */
18438 
18439 
18440 
18441 /*
18442  * Privilege set names
18443  */
18444 /*
18445  * Set of privileges currently in effect.
18446  */
18447 
18448 
18449 /*
18450  * Set of privileges that comes into effect on exec.
18451  */
18452 
18453 
18454 /*
18455  * Set of privileges that can be put into the effective set without
18456  * restriction.
18457  */
18458 
18459 
18460 /*
18461  * Set of privileges that determines the absolute upper bound of
18462  * privileges this process and its off-spring can obtain.
18463  */
18464 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
18465 
18466 
18467 
18468 
18469 
18470 typedef uint32_t priv_chunk_t;
18471 typedef struct priv_set priv_set_t;
18472 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
18473 /*
18474  * Userland type definitions.
18475  */
18476 
18477 typedef const char *priv_ptype_t;
18478 typedef const char *priv_t;
18479 
18480 
18481 
18482 /*
18483  * priv_op_t indicates a privilege operation type
18484  */
18485 typedef enum priv_op {
18486  PRIV_ON,
18487  PRIV_OFF,
18488  PRIV_SET
18489 } priv_op_t;
18490 
18491 /*
18492  * Privilege system call subcodes.
18493  */
18494 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
18495 /*
18496  * Maximum length of a user defined privilege name.
18497  */
18498 
18499 
18500 /*
18501  * Privilege interface functions for those parts of the kernel that
18502  * know nothing of the privilege internals.
18503  *
18504  * A privilege implementation can have a varying number of sets; sets
18505  * consist of a number of priv_chunk_t's and the size is expressed as such.
18506  * The privileges can be represented as
18507  *
18508  *		priv_chunk_t privs[info.priv_nsets][info.priv_setsize]
18509  *		... priv_infosize of extra information ...
18510  *
18511  * Extra data contained in the privilege information consists of chunks
18512  * of data with specified size and type all headed by a priv_info_t header
18513  * which defines both the type of information as well as the size of the
18514  * information.  ((char*)&info)+info->priv_info_size should be rounded up
18515  * to point to the next piece of information.
18516  */
18517 
18518 typedef struct priv_impl_info {
18519  uint32_t priv_headersize; /* sizeof (priv_impl_info) */
18520  uint32_t priv_flags; /* additional flags */
18521  uint32_t priv_nsets; /* number of priv sets */
18522  uint32_t priv_setsize; /* size in priv_chunk_t */
18523  uint32_t priv_max; /* highest actual valid priv */
18524  uint32_t priv_infosize; /* Per proc. additional info */
18525  uint32_t priv_globalinfosize; /* Per system info */
18526 } priv_impl_info_t;
18527 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
18528 /*
18529  * Per credential flags.
18530  */
18531 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
18532 /* user-settable flags: */
18533 
18534 
18535 
18536 /*
18537  * Header of the privilege info data structure; multiple structures can
18538  * follow the privilege sets and priv_impl_info structures.
18539  */
18540 typedef struct priv_info {
18541  uint32_t priv_info_type;
18542  uint32_t priv_info_size;
18543 } priv_info_t;
18544 
18545 typedef struct priv_info_uint {
18546  priv_info_t info;
18547  uint_t val;
18548 } priv_info_uint_t;
18549 
18550 /*
18551  * Global privilege set information item; the actual size of the array is
18552  * {priv_setsize}.
18553  */
18554 typedef struct priv_info_set {
18555  priv_info_t info;
18556  priv_chunk_t set[1];
18557 } priv_info_set_t;
18558 
18559 /*
18560  * names[1] is a place holder which can contain multiple NUL terminated,
18561  * non-empty strings.
18562  */
18563 
18564 typedef struct priv_info_names {
18565  priv_info_t info;
18566  int cnt; /* number of strings */
18567  char names[1]; /* "string1\0string2\0 ..stringN\0" */
18568 } priv_info_names_t;
18569 
18570 /*
18571  * Privilege information types.
18572  */
18573 
18574 
18575 
18576 
18577 
18578 /*
18579  * Special "privileges" used to indicate special conditions in privilege
18580  * debugging/tracing code.
18581  */
18582 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
18583 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 1
18584 /*
18585  * CDDL HEADER START
18586  *
18587  * The contents of this file are subject to the terms of the
18588  * Common Development and Distribution License (the "License").
18589  * You may not use this file except in compliance with the License.
18590  *
18591  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18592  * or http://www.opensolaris.org/os/licensing.
18593  * See the License for the specific language governing permissions
18594  * and limitations under the License.
18595  *
18596  * When distributing Covered Code, include this CDDL HEADER in each
18597  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18598  * If applicable, add the following below this CDDL HEADER, with the
18599  * fields enclosed by brackets "[]" replaced with your own identifying
18600  * information: Portions Copyright [yyyy] [name of copyright owner]
18601  *
18602  * CDDL HEADER END
18603  */
18604 /*
18605  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18606  * Use is subject to license terms.
18607  */
18608 
18609 
18610 
18611 
18612 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
18613 /*
18614  * CDDL HEADER START
18615  *
18616  * The contents of this file are subject to the terms of the
18617  * Common Development and Distribution License (the "License").
18618  * You may not use this file except in compliance with the License.
18619  *
18620  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18621  * or http://www.opensolaris.org/os/licensing.
18622  * See the License for the specific language governing permissions
18623  * and limitations under the License.
18624  *
18625  * When distributing Covered Code, include this CDDL HEADER in each
18626  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18627  * If applicable, add the following below this CDDL HEADER, with the
18628  * fields enclosed by brackets "[]" replaced with your own identifying
18629  * information: Portions Copyright [yyyy] [name of copyright owner]
18630  *
18631  * CDDL HEADER END
18632  */
18633 /*
18634  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
18635  * Use is subject to license terms.
18636  * Copyright 2015 Nexenta Systems, Inc.
18637  */
18638 
18639 
18640 
18641 
18642 #pragma ident "%Z%%M%	%I%	%E% SMI"
18643 
18644 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
18645 /*
18646  * CDDL HEADER START
18647  *
18648  * The contents of this file are subject to the terms of the
18649  * Common Development and Distribution License, Version 1.0 only
18650  * (the "License").  You may not use this file except in compliance
18651  * with the License.
18652  *
18653  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18654  * or http://www.opensolaris.org/os/licensing.
18655  * See the License for the specific language governing permissions
18656  * and limitations under the License.
18657  *
18658  * When distributing Covered Code, include this CDDL HEADER in each
18659  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18660  * If applicable, add the following below this CDDL HEADER, with the
18661  * fields enclosed by brackets "[]" replaced with your own identifying
18662  * information: Portions Copyright [yyyy] [name of copyright owner]
18663  *
18664  * CDDL HEADER END
18665  */
18666 /*
18667  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
18668  *
18669  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
18670  * Use is subject to license terms.
18671  */
18672 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
18673 
18674 
18675 
18676 
18677 
18678 /*
18679  * Interoperability types for programs. Used for:
18680  *
18681  * Crossing between 32-bit and 64-bit domains.
18682  *
18683  * On disk data formats such as filesystem meta data
18684  * and disk label.
18685  *
18686  * Note: Applications should never include this
18687  *       header file.
18688  */
18689 typedef uint32_t caddr32_t;
18690 typedef int32_t daddr32_t;
18691 typedef int32_t off32_t;
18692 typedef uint32_t ino32_t;
18693 typedef int32_t blkcnt32_t;
18694 typedef uint32_t fsblkcnt32_t;
18695 typedef uint32_t fsfilcnt32_t;
18696 typedef int32_t id32_t;
18697 typedef uint32_t major32_t;
18698 typedef uint32_t minor32_t;
18699 typedef int32_t key32_t;
18700 typedef uint32_t mode32_t;
18701 typedef uint32_t uid32_t;
18702 typedef uint32_t gid32_t;
18703 typedef uint32_t nlink32_t;
18704 typedef uint32_t dev32_t;
18705 typedef int32_t pid32_t;
18706 typedef uint32_t size32_t;
18707 typedef int32_t ssize32_t;
18708 typedef int32_t time32_t;
18709 typedef int32_t clock32_t;
18710 typedef uint32_t uintptr32_t;
18711 typedef int32_t intptr32_t;
18712 
18713 struct timeval32 {
18714  time32_t tv_sec; /* seconds */
18715  int32_t tv_usec; /* and microseconds */
18716 };
18717 
18718 typedef struct timespec32 {
18719  time32_t tv_sec; /* seconds */
18720  int32_t tv_nsec; /* and nanoseconds */
18721 } timespec32_t;
18722 
18723 typedef struct timespec32 timestruc32_t;
18724 
18725 typedef struct itimerspec32 {
18726  struct timespec32 it_interval;
18727  struct timespec32 it_value;
18728 } itimerspec32_t;
18729 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
18730 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 1
18731 /*
18732  * CDDL HEADER START
18733  *
18734  * The contents of this file are subject to the terms of the
18735  * Common Development and Distribution License (the "License").
18736  * You may not use this file except in compliance with the License.
18737  *
18738  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18739  * or http://www.opensolaris.org/os/licensing.
18740  * See the License for the specific language governing permissions
18741  * and limitations under the License.
18742  *
18743  * When distributing Covered Code, include this CDDL HEADER in each
18744  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18745  * If applicable, add the following below this CDDL HEADER, with the
18746  * fields enclosed by brackets "[]" replaced with your own identifying
18747  * information: Portions Copyright [yyyy] [name of copyright owner]
18748  *
18749  * CDDL HEADER END
18750  */
18751 /*
18752  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18753  * Use is subject to license terms.
18754  */
18755 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
18756 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 1
18757 /*
18758  * CDDL HEADER START
18759  *
18760  * The contents of this file are subject to the terms of the
18761  * Common Development and Distribution License (the "License").
18762  * You may not use this file except in compliance with the License.
18763  *
18764  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18765  * or http://www.opensolaris.org/os/licensing.
18766  * See the License for the specific language governing permissions
18767  * and limitations under the License.
18768  *
18769  * When distributing Covered Code, include this CDDL HEADER in each
18770  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18771  * If applicable, add the following below this CDDL HEADER, with the
18772  * fields enclosed by brackets "[]" replaced with your own identifying
18773  * information: Portions Copyright [yyyy] [name of copyright owner]
18774  *
18775  * CDDL HEADER END
18776  */
18777 /*
18778  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
18779  *
18780  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
18781  * Use is subject to license terms.
18782  */
18783 
18784 
18785 
18786 
18787 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 1
18788 /*
18789  * CDDL HEADER START
18790  *
18791  * The contents of this file are subject to the terms of the
18792  * Common Development and Distribution License (the "License").
18793  * You may not use this file except in compliance with the License.
18794  *
18795  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18796  * or http://www.opensolaris.org/os/licensing.
18797  * See the License for the specific language governing permissions
18798  * and limitations under the License.
18799  *
18800  * When distributing Covered Code, include this CDDL HEADER in each
18801  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18802  * If applicable, add the following below this CDDL HEADER, with the
18803  * fields enclosed by brackets "[]" replaced with your own identifying
18804  * information: Portions Copyright [yyyy] [name of copyright owner]
18805  *
18806  * CDDL HEADER END
18807  */
18808 /*
18809  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
18810  *
18811  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
18812  */
18813 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 2
18814 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h"
18815 /*
18816  * library functions prototype.
18817  */
18818 
18819 extern int setppriv(priv_op_t, priv_ptype_t, const priv_set_t *);
18820 extern int getppriv(priv_ptype_t, priv_set_t *);
18821 extern int setpflags(uint_t, uint_t);
18822 extern uint_t getpflags(uint_t);
18823 extern const priv_impl_info_t *getprivimplinfo(void);
18824 
18825 extern int priv_set(priv_op_t, priv_ptype_t, ...);
18826 extern boolean_t priv_ineffect(const char *);
18827 extern priv_set_t *priv_str_to_set(const char *, const char *, const char **);
18828 extern char *priv_set_to_str(const priv_set_t *, char, int);
18829 
18830 extern int priv_getbyname(const char *);
18831 extern const char *priv_getbynum(int);
18832 extern int priv_getsetbyname(const char *);
18833 extern const char *priv_getsetbynum(int);
18834 extern char *priv_gettext(const char *);
18835 
18836 extern priv_set_t *priv_allocset(void);
18837 extern void priv_freeset(priv_set_t *);
18838 
18839 extern void priv_emptyset(priv_set_t *);
18840 extern void priv_basicset(priv_set_t *);
18841 extern void priv_fillset(priv_set_t *);
18842 extern boolean_t priv_isemptyset(const priv_set_t *);
18843 extern boolean_t priv_isfullset(const priv_set_t *);
18844 extern boolean_t priv_isequalset(const priv_set_t *, const priv_set_t *);
18845 extern boolean_t priv_issubset(const priv_set_t *, const priv_set_t *);
18846 extern void priv_intersect(const priv_set_t *, priv_set_t *);
18847 extern void priv_union(const priv_set_t *, priv_set_t *);
18848 extern void priv_inverse(priv_set_t *);
18849 extern int priv_addset(priv_set_t *, const char *);
18850 extern void priv_copyset(const priv_set_t *, priv_set_t *);
18851 extern int priv_delset(priv_set_t *, const char *);
18852 extern boolean_t priv_ismember(const priv_set_t *, const char *);
18853 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
18854 
18855 
18856 
18857 
18858 
18859 /* Procedural Interface Structure Definitions */
18860 
18861 struct label_info { /* structure returned by label_info */
18862  short ilabel_len; /* max Information Label length */
18863  short slabel_len; /* max Sensitivity Label length */
18864  short clabel_len; /* max CMW Label length */
18865  short clear_len; /* max Clearance Label length */
18866  short vers_len; /* version string length */
18867  short header_len; /* max len of banner page header */
18868  short protect_as_len; /* max len of banner page protect as */
18869  short caveats_len; /* max len of banner page caveats */
18870  short channels_len; /* max len of banner page channels */
18871 };
18872 
18873 typedef struct label_set_identifier { /* valid label set identifier */
18874  int type; /* type of the set */
18875  char *name; /* name of the set if needed */
18876 } set_id;
18877 
18878 struct name_fields { /* names for label builder fields */
18879  char *class_name; /* Classifications field name */
18880  char *comps_name; /* Compartments field name */
18881  char *marks_name; /* Markings field name */
18882 };
18883 
18884 /* Label Set Identifier Types */
18885 
18886 /*
18887  * The accreditation ranges as specified in the label encodings file.
18888  * The name parameter is ignored.
18889  *
18890  * System Accreditation Range is all valid labels plus Admin High and Low.
18891  *
18892  * User Accreditation Range is valid user labels as defined in the
18893  *	ACCREDITATION RANGE: section of the label encodings file.
18894  */
18895 
18896 
18897 
18898 
18899 
18900 /* System Call Interface Definitions */
18901 
18902 extern int getlabel(const char *, m_label_t *);
18903 extern int fgetlabel(int, m_label_t *);
18904 
18905 extern int getplabel(m_label_t *);
18906 extern int setflabel(const char *, m_label_t *);
18907 extern char *getpathbylabel(const char *, char *, size_t,
18908     const m_label_t *sl);
18909 extern m_label_t *getzonelabelbyid(zoneid_t);
18910 extern m_label_t *getzonelabelbyname(const char *);
18911 extern zoneid_t getzoneidbylabel(const m_label_t *);
18912 extern char *getzonenamebylabel(const m_label_t *);
18913 extern char *getzonerootbyid(zoneid_t);
18914 extern char *getzonerootbyname(const char *);
18915 extern char *getzonerootbylabel(const m_label_t *);
18916 extern m_label_t *getlabelbypath(const char *);
18917 
18918 
18919 /* Flag word values */
18920 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h"
18921       /* implies NEW_LABEL */
18922 
18923 
18924 
18925 
18926 /* Procedure Interface Definitions available to user */
18927 
18928 /* APIs shared with the kernel are in <sys/tsol/label.h */
18929 
18930 extern m_label_t *blabel_alloc(void);
18931 extern void blabel_free(m_label_t *);
18932 extern size32_t blabel_size(void);
18933 extern char *bsltoh(const m_label_t *);
18934 extern char *bcleartoh(const m_label_t *);
18935 
18936 extern char *bsltoh_r(const m_label_t *, char *);
18937 extern char *bcleartoh_r(const m_label_t *, char *);
18938 extern char *h_alloc(uint8_t);
18939 extern void h_free(char *);
18940 
18941 extern int htobsl(const char *, m_label_t *);
18942 extern int htobclear(const char *, m_label_t *);
18943 
18944 extern m_range_t *getuserrange(const char *);
18945 extern m_range_t *getdevicerange(const char *);
18946 
18947 extern int set_effective_priv(priv_op_t, int, ...);
18948 extern int set_inheritable_priv(priv_op_t, int, ...);
18949 extern int set_permitted_priv(priv_op_t, int, ...);
18950 extern int is_system_labeled(void);
18951 
18952 /* Procedures needed for multi-level printing */
18953 
18954 extern int tsol_check_admin_auth(uid_t uid);
18955 
18956 /* APIs implemented via labeld */
18957 
18958 extern int blinset(const m_label_t *, const set_id *);
18959 extern int labelinfo(struct label_info *);
18960 extern ssize_t labelvers(char **, size_t);
18961 extern char *bltocolor(const m_label_t *);
18962 extern char *bltocolor_r(const m_label_t *, size_t, char *);
18963 
18964 extern ssize_t bsltos(const m_label_t *, char **, size_t, int);
18965 extern ssize_t bcleartos(const m_label_t *, char **, size_t, int);
18966 
18967 
18968 extern char *sbsltos(const m_label_t *, size_t);
18969 extern char *sbcleartos(const m_label_t *, size_t);
18970 
18971 
18972 extern int stobsl(const char *, m_label_t *, int, int *);
18973 extern int stobclear(const char *, m_label_t *, int, int *);
18974 extern int bslvalid(const m_label_t *);
18975 extern int bclearvalid(const m_label_t *);
18976 
18977 /* DIA label conversion and parsing */
18978 
18979 /* Conversion types */
18980 
18981 typedef enum _m_label_str {
18982  M_LABEL = 1, /* process or user clearance */
18983  M_INTERNAL = 2, /* internal form for use in public databases */
18984  M_COLOR = 3, /* process label color */
18985  PRINTER_TOP_BOTTOM = 4, /* DIA banner page top/bottom */
18986  PRINTER_LABEL = 5, /* DIA banner page label */
18987  PRINTER_CAVEATS = 6, /* DIA banner page caveats */
18988  PRINTER_CHANNELS = 7 /* DIA banner page handling channels */
18989 } m_label_str_t;
18990 
18991 /* Flags for conversion, not all flags apply to all types */
18992 
18993 
18994 
18995 
18996 extern int label_to_str(const m_label_t *, char **, const m_label_str_t,
18997     uint_t);
18998 extern int l_to_str_internal(const m_label_t *, char **);
18999 
19000 /* Parsing types */
19001 typedef enum _m_label_type {
19002  MAC_LABEL = 1, /* process or object label */
19003  USER_CLEAR = 2 /* user's clearance (LUB) */
19004 } m_label_type_t;
19005 
19006 /* Flags for parsing */
19007 
19008 
19009 
19010 
19011 
19012 
19013 /* EINVAL sub codes */
19014 
19015 
19016 
19017  /* bad requested label type, bad previous label type */
19018 
19019 
19020 extern int str_to_label(const char *, m_label_t **, const m_label_type_t,
19021     uint_t, int *);
19022 extern int hexstr_to_label(const char *, m_label_t *);
19023 
19024 extern m_label_t *m_label_alloc(const m_label_type_t);
19025 
19026 extern int m_label_dup(m_label_t **, const m_label_t *);
19027 
19028 extern void m_label_free(m_label_t *);
19029 
19030 /* Contract Private interfaces with the label builder GUIs */
19031 
19032 extern int bslcvtfull(const m_label_t *, const m_range_t *, int,
19033     char **, char **[], char **[], char *[], int *, int *);
19034 extern int bslcvt(const m_label_t *, int, char **, char *[]);
19035 extern int bclearcvtfull(const m_label_t *, const m_range_t *, int,
19036     char **, char **[], char **[], char *[], int *, int *);
19037 extern int bclearcvt(const m_label_t *, int, char **, char *[]);
19038 
19039 extern int labelfields(struct name_fields *);
19040 extern int userdefs(m_label_t *, m_label_t *);
19041 extern int zonecopy(m_label_t *, char *, char *, char *, int);
19042 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
19043 
19044 
19045 
19046 
19047 
19048 /*
19049  * Functions for mapping between id and name for active zones.
19050  */
19051 extern zoneid_t getzoneid(void);
19052 extern zoneid_t getzoneidbyname(const char *);
19053 extern ssize_t getzonenamebyid(zoneid_t, char *, size_t);
19054 
19055 /*
19056  * NOTE
19057  *
19058  * The remaining contents of this file are private to the implementation
19059  * of Solaris and are subject to change at any time without notice,
19060  * Applications using these interfaces may fail to run on future releases.
19061  */
19062 
19063 extern int zonept(int, zoneid_t);
19064 extern int zone_get_id(const char *, zoneid_t *);
19065 
19066 /* System call API */
19067 extern zoneid_t zone_create(const char *, const char *,
19068     const struct priv_set *, const char *, size_t, const char *, size_t, int *,
19069     int, int, const bslabel_t *, int);
19070 extern int zone_boot(zoneid_t);
19071 extern int zone_destroy(zoneid_t);
19072 extern ssize_t zone_getattr(zoneid_t, int, void *, size_t);
19073 extern int zone_setattr(zoneid_t, int, void *, size_t);
19074 extern int zone_enter(zoneid_t);
19075 extern int zone_list(zoneid_t *, uint_t *);
19076 extern int zone_shutdown(zoneid_t);
19077 extern int zone_version(int *);
19078 extern int zone_add_datalink(zoneid_t, datalink_id_t);
19079 extern int zone_remove_datalink(zoneid_t, datalink_id_t);
19080 extern int zone_check_datalink(zoneid_t *, datalink_id_t);
19081 extern int zone_list_datalink(zoneid_t, int *, datalink_id_t *);
19082 # 67 "lock.c" 2
19083 
19084 /* local includes */
19085 
19086 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
19087 /*
19088  * CDDL HEADER START
19089  *
19090  * The contents of this file are subject to the terms of the
19091  * Common Development and Distribution License (the "License").
19092  * You may not use this file except in compliance with the License.
19093  *
19094  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19095  * or http://www.opensolaris.org/os/licensing.
19096  * See the License for the specific language governing permissions
19097  * and limitations under the License.
19098  *
19099  * When distributing Covered Code, include this CDDL HEADER in each
19100  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19101  * If applicable, add the following below this CDDL HEADER, with the
19102  * fields enclosed by brackets "[]" replaced with your own identifying
19103  * information: Portions Copyright [yyyy] [name of copyright owner]
19104  *
19105  * CDDL HEADER END
19106  */
19107 
19108 /*
19109  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
19110  */
19111 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
19112 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
19113 /*
19114  * CDDL HEADER START
19115  *
19116  * The contents of this file are subject to the terms of the
19117  * Common Development and Distribution License (the "License").
19118  * You may not use this file except in compliance with the License.
19119  *
19120  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19121  * or http://www.opensolaris.org/os/licensing.
19122  * See the License for the specific language governing permissions
19123  * and limitations under the License.
19124  *
19125  * When distributing Covered Code, include this CDDL HEADER in each
19126  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19127  * If applicable, add the following below this CDDL HEADER, with the
19128  * fields enclosed by brackets "[]" replaced with your own identifying
19129  * information: Portions Copyright [yyyy] [name of copyright owner]
19130  *
19131  * CDDL HEADER END
19132  */
19133 
19134 /*
19135  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19136  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
19137  */
19138 
19139 /*	Copyright (c) 1988 AT&T	*/
19140 /*	  All Rights Reserved  	*/
19141 
19142 /*
19143  * User-visible pieces of the ANSI C standard I/O package.
19144  */
19145 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
19146 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
19147 /*
19148  * CDDL HEADER START
19149  *
19150  * The contents of this file are subject to the terms of the
19151  * Common Development and Distribution License (the "License").
19152  * You may not use this file except in compliance with the License.
19153  *
19154  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19155  * or http://www.opensolaris.org/os/licensing.
19156  * See the License for the specific language governing permissions
19157  * and limitations under the License.
19158  *
19159  * When distributing Covered Code, include this CDDL HEADER in each
19160  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19161  * If applicable, add the following below this CDDL HEADER, with the
19162  * fields enclosed by brackets "[]" replaced with your own identifying
19163  * information: Portions Copyright [yyyy] [name of copyright owner]
19164  *
19165  * CDDL HEADER END
19166  */
19167 
19168 /*
19169  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19170  *
19171  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
19172  * Use is subject to license terms.
19173  */
19174 
19175 /*	Copyright (c) 1988 AT&T	*/
19176 /*	  All Rights Reserved  	*/
19177 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
19178 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
19179 /*
19180  * CDDL HEADER START
19181  *
19182  * The contents of this file are subject to the terms of the
19183  * Common Development and Distribution License (the "License").
19184  * You may not use this file except in compliance with the License.
19185  *
19186  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19187  * or http://www.opensolaris.org/os/licensing.
19188  * See the License for the specific language governing permissions
19189  * and limitations under the License.
19190  *
19191  * When distributing Covered Code, include this CDDL HEADER in each
19192  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19193  * If applicable, add the following below this CDDL HEADER, with the
19194  * fields enclosed by brackets "[]" replaced with your own identifying
19195  * information: Portions Copyright [yyyy] [name of copyright owner]
19196  *
19197  * CDDL HEADER END
19198  */
19199 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19200 /*	  All Rights Reserved  	*/
19201 
19202 
19203 /*
19204  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19205  * Use is subject to license terms.
19206  *
19207  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
19208  * Copyright 2016 Joyent, Inc.
19209  */
19210 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
19211 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
19212 /*
19213  * CDDL HEADER START
19214  *
19215  * The contents of this file are subject to the terms of the
19216  * Common Development and Distribution License (the "License").
19217  * You may not use this file except in compliance with the License.
19218  *
19219  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19220  * or http://www.opensolaris.org/os/licensing.
19221  * See the License for the specific language governing permissions
19222  * and limitations under the License.
19223  *
19224  * When distributing Covered Code, include this CDDL HEADER in each
19225  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19226  * If applicable, add the following below this CDDL HEADER, with the
19227  * fields enclosed by brackets "[]" replaced with your own identifying
19228  * information: Portions Copyright [yyyy] [name of copyright owner]
19229  *
19230  * CDDL HEADER END
19231  */
19232 
19233 /*
19234  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19235  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
19236  */
19237 
19238 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
19239 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
19240 /*	All Rights Reserved	*/
19241 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
19242 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
19243 /*
19244  * CDDL HEADER START
19245  *
19246  * The contents of this file are subject to the terms of the
19247  * Common Development and Distribution License (the "License").
19248  * You may not use this file except in compliance with the License.
19249  *
19250  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19251  * or http://www.opensolaris.org/os/licensing.
19252  * See the License for the specific language governing permissions
19253  * and limitations under the License.
19254  *
19255  * When distributing Covered Code, include this CDDL HEADER in each
19256  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19257  * If applicable, add the following below this CDDL HEADER, with the
19258  * fields enclosed by brackets "[]" replaced with your own identifying
19259  * information: Portions Copyright [yyyy] [name of copyright owner]
19260  *
19261  * CDDL HEADER END
19262  */
19263 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19264 /*	  All Rights Reserved  	*/
19265 
19266 /*
19267  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
19268  * Use is subject to license terms.
19269  */
19270 
19271 
19272 
19273 
19274 #pragma ident "%Z%%M%	%I%	%E% SMI"
19275 
19276 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
19277 /*
19278  * CDDL HEADER START
19279  *
19280  * The contents of this file are subject to the terms of the
19281  * Common Development and Distribution License (the "License").
19282  * You may not use this file except in compliance with the License.
19283  *
19284  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19285  * or http://www.opensolaris.org/os/licensing.
19286  * See the License for the specific language governing permissions
19287  * and limitations under the License.
19288  *
19289  * When distributing Covered Code, include this CDDL HEADER in each
19290  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19291  * If applicable, add the following below this CDDL HEADER, with the
19292  * fields enclosed by brackets "[]" replaced with your own identifying
19293  * information: Portions Copyright [yyyy] [name of copyright owner]
19294  *
19295  * CDDL HEADER END
19296  */
19297 /*	Copyright (c) 1988 AT&T	*/
19298 /*	  All Rights Reserved  	*/
19299 
19300 
19301 /*
19302  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19303  *
19304  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
19305  * Use is subject to license terms.
19306  */
19307 /*
19308  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
19309  * Copyright 2016 Joyent, Inc.
19310  */
19311 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
19312 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
19313 extern char *errstr;
19314 
19315 struct ainfo {
19316  char *local;
19317  mode_t mode;
19318  char owner[64 +1];
19319  char group[64 +1];
19320  major_t major;
19321  minor_t minor;
19322 };
19323 
19324 struct cinfo {
19325  long cksum;
19326  fsblkcnt_t size;
19327  time_t modtime;
19328 };
19329 
19330 struct pinfo {
19331  char status;
19332  char pkg[64 +1];
19333  char editflag;
19334  char aclass[64 +1];
19335  struct pinfo
19336   *next;
19337 };
19338 
19339 struct cfent {
19340  short volno;
19341  char ftype;
19342  char pkg_class[64 +1];
19343  int pkg_class_idx;
19344  char *path;
19345  struct ainfo ainfo;
19346  struct cinfo cinfo;
19347  short npkgs;
19348  struct pinfo
19349   *pinfo;
19350 };
19351 
19352 /* averify() & cverify() error codes */
19353 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
19354 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
19355 /*
19356  * CDDL HEADER START
19357  *
19358  * The contents of this file are subject to the terms of the
19359  * Common Development and Distribution License, Version 1.0 only
19360  * (the "License").  You may not use this file except in compliance
19361  * with the License.
19362  *
19363  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19364  * or http://www.opensolaris.org/os/licensing.
19365  * See the License for the specific language governing permissions
19366  * and limitations under the License.
19367  *
19368  * When distributing Covered Code, include this CDDL HEADER in each
19369  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19370  * If applicable, add the following below this CDDL HEADER, with the
19371  * fields enclosed by brackets "[]" replaced with your own identifying
19372  * information: Portions Copyright [yyyy] [name of copyright owner]
19373  *
19374  * CDDL HEADER END
19375  */
19376 /*
19377  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19378  */
19379 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19380 /*	  All Rights Reserved  	*/
19381 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
19382 struct pkginfo {
19383  char *pkginst;
19384  char *name;
19385  char *arch;
19386  char *version;
19387  char *vendor;
19388  char *basedir;
19389  char *catg;
19390  char status;
19391 };
19392 
19393 extern char *pkgdir;
19394 
19395 extern char *pkgparam(char *, char *);
19396 extern int pkginfo(struct pkginfo *, char *, ...),
19397   pkgnmchk(char *, char *, int);
19398 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
19399 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
19400 /*
19401  * CDDL HEADER START
19402  *
19403  * The contents of this file are subject to the terms of the
19404  * Common Development and Distribution License (the "License").
19405  * You may not use this file except in compliance with the License.
19406  *
19407  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19408  * or http://www.opensolaris.org/os/licensing.
19409  * See the License for the specific language governing permissions
19410  * and limitations under the License.
19411  *
19412  * When distributing Covered Code, include this CDDL HEADER in each
19413  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19414  * If applicable, add the following below this CDDL HEADER, with the
19415  * fields enclosed by brackets "[]" replaced with your own identifying
19416  * information: Portions Copyright [yyyy] [name of copyright owner]
19417  *
19418  * CDDL HEADER END
19419  */
19420 
19421 /*
19422  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19423  * Use is subject to license terms.
19424  */
19425 
19426 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
19427 /* All Rights Reserved */
19428 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
19429 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
19430 /*
19431  * CDDL HEADER START
19432  *
19433  * The contents of this file are subject to the terms of the
19434  * Common Development and Distribution License (the "License").
19435  * You may not use this file except in compliance with the License.
19436  *
19437  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19438  * or http://www.opensolaris.org/os/licensing.
19439  * See the License for the specific language governing permissions
19440  * and limitations under the License.
19441  *
19442  * When distributing Covered Code, include this CDDL HEADER in each
19443  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19444  * If applicable, add the following below this CDDL HEADER, with the
19445  * fields enclosed by brackets "[]" replaced with your own identifying
19446  * information: Portions Copyright [yyyy] [name of copyright owner]
19447  *
19448  * CDDL HEADER END
19449  */
19450 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19451 /*	  All Rights Reserved  	*/
19452 
19453 
19454 /*
19455  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19456  * Use is subject to license terms.
19457  *
19458  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
19459  * Copyright 2016 Joyent, Inc.
19460  */
19461 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
19462 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
19463 /*
19464  * CDDL HEADER START
19465  *
19466  * The contents of this file are subject to the terms of the
19467  * Common Development and Distribution License (the "License").
19468  * You may not use this file except in compliance with the License.
19469  *
19470  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19471  * or http://www.opensolaris.org/os/licensing.
19472  * See the License for the specific language governing permissions
19473  * and limitations under the License.
19474  *
19475  * When distributing Covered Code, include this CDDL HEADER in each
19476  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19477  * If applicable, add the following below this CDDL HEADER, with the
19478  * fields enclosed by brackets "[]" replaced with your own identifying
19479  * information: Portions Copyright [yyyy] [name of copyright owner]
19480  *
19481  * CDDL HEADER END
19482  */
19483 
19484 /*
19485  * Copyright (c) 2013 Gary Mills
19486  *
19487  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
19488  * Use is subject to license terms.
19489  */
19490 
19491 /*	Copyright (c) 1988 AT&T	*/
19492 /*	  All Rights Reserved  	*/
19493 
19494 
19495 
19496 
19497 
19498 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
19499 /*
19500  * CDDL HEADER START
19501  *
19502  * The contents of this file are subject to the terms of the
19503  * Common Development and Distribution License (the "License").
19504  * You may not use this file except in compliance with the License.
19505  *
19506  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19507  * or http://www.opensolaris.org/os/licensing.
19508  * See the License for the specific language governing permissions
19509  * and limitations under the License.
19510  *
19511  * When distributing Covered Code, include this CDDL HEADER in each
19512  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19513  * If applicable, add the following below this CDDL HEADER, with the
19514  * fields enclosed by brackets "[]" replaced with your own identifying
19515  * information: Portions Copyright [yyyy] [name of copyright owner]
19516  *
19517  * CDDL HEADER END
19518  */
19519 
19520 /*
19521  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
19522  * Copyright 2016 Joyent, Inc.
19523  *
19524  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
19525  * Use is subject to license terms.
19526  */
19527 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
19528 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
19529 /*
19530  * CDDL HEADER START
19531  *
19532  * The contents of this file are subject to the terms of the
19533  * Common Development and Distribution License (the "License").
19534  * You may not use this file except in compliance with the License.
19535  *
19536  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19537  * or http://www.opensolaris.org/os/licensing.
19538  * See the License for the specific language governing permissions
19539  * and limitations under the License.
19540  *
19541  *
19542  * When distributing Covered Code, include this CDDL HEADER in each
19543  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19544  * If applicable, add the following below this CDDL HEADER, with the
19545  * fields enclosed by brackets "[]" replaced with your own identifying
19546  * information: Portions Copyright [yyyy] [name of copyright owner]
19547  *
19548  * CDDL HEADER END
19549  */
19550 
19551 /*
19552  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
19553  * Use is subject to license terms.
19554  * Copyright 2016 Joyent, Inc.
19555  */
19556 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
19557 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
19558 /*
19559  * CDDL HEADER START
19560  *
19561  * The contents of this file are subject to the terms of the
19562  * Common Development and Distribution License, Version 1.0 only
19563  * (the "License").  You may not use this file except in compliance
19564  * with the License.
19565  *
19566  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19567  * or http://www.opensolaris.org/os/licensing.
19568  * See the License for the specific language governing permissions
19569  * and limitations under the License.
19570  *
19571  * When distributing Covered Code, include this CDDL HEADER in each
19572  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19573  * If applicable, add the following below this CDDL HEADER, with the
19574  * fields enclosed by brackets "[]" replaced with your own identifying
19575  * information: Portions Copyright [yyyy] [name of copyright owner]
19576  *
19577  * CDDL HEADER END
19578  */
19579 /*
19580  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
19581  * Use is subject to license terms.
19582  */
19583 
19584 /*	Copyright (c) 1988 AT&T	*/
19585 /*	  All Rights Reserved  	*/
19586 
19587 
19588 /*
19589  * An application should not include this header directly.  Instead it
19590  * should be included only through the inclusion of other Sun headers.
19591  *
19592  * The contents of this header is limited to identifiers specified in the
19593  * C Standard.  Any new identifiers specified in future amendments to the
19594  * C Standard must be placed in this header.  If these new identifiers
19595  * are required to also be in the C++ Standard "std" namespace, then for
19596  * anything other than macro definitions, corresponding "using" directives
19597  * must also be added to <limits.h>.
19598  */
19599 
19600 
19601 
19602 
19603 #pragma ident "%Z%%M%	%I%	%E% SMI"
19604 
19605 
19606 
19607 
19608 
19609 /*
19610  * Sizes of integral types
19611  */
19612 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
19613      /* min value of a "long int" */
19614 
19615 
19616 
19617 
19618 
19619      /* min value of a long long */
19620 
19621      /* max value of a long long */
19622 
19623      /* max value of "unsigned long long */
19624 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
19625 
19626 /*
19627  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
19628  * committee's working draft for the revision of the current ISO C standard,
19629  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
19630  * required by any standard but constitute a useful, general purpose set
19631  * of type definitions and limits which is namespace clean with respect to
19632  * all standards.
19633  */
19634 
19635 
19636 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
19637 /*
19638  * CDDL HEADER START
19639  *
19640  * The contents of this file are subject to the terms of the
19641  * Common Development and Distribution License, Version 1.0 only
19642  * (the "License").  You may not use this file except in compliance
19643  * with the License.
19644  *
19645  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19646  * or http://www.opensolaris.org/os/licensing.
19647  * See the License for the specific language governing permissions
19648  * and limitations under the License.
19649  *
19650  * When distributing Covered Code, include this CDDL HEADER in each
19651  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19652  * If applicable, add the following below this CDDL HEADER, with the
19653  * fields enclosed by brackets "[]" replaced with your own identifying
19654  * information: Portions Copyright [yyyy] [name of copyright owner]
19655  *
19656  * CDDL HEADER END
19657  */
19658 /*
19659  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19660  *
19661  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
19662  * Use is subject to license terms.
19663  */
19664 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
19665 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19666 /*
19667  * ARG_MAX is calculated as follows:
19668  * NCARGS - space for other stuff on initial stack
19669  * like aux vectors, saved registers, etc..
19670  */
19671 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19672 /*
19673  * POSIX conformant definitions - An implementation may define
19674  * other symbols which reflect the actual implementation. Alternate
19675  * definitions may not be as restrictive as the POSIX definitions.
19676  */
19677 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19678 /* POSIX.1c conformant */
19679 
19680 
19681 
19682 
19683 
19684 /* UNIX 03 conformant */
19685 
19686 
19687 
19688 
19689 
19690 /*
19691  * POSIX.2 and XPG4-XSH4 conformant definitions
19692  */
19693 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19694 /* UNIX 03 conformant */
19695 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19696 /*
19697  * For dual definitions for PASS_MAX and sysconf.c
19698  */
19699 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19700     /* NLS printf() and scanf() */
19701 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19702 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
19703 
19704 
19705 
19706        /* of a double */
19707 
19708 
19709        /* of a "float" */
19710 
19711 
19712 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
19713 
19714 
19715        /* of a double */
19716 
19717        /* of a float */
19718 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19719 /*
19720  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
19721  * related text states:
19722  *
19723  * A definition of one of the values from Table 2-5 shall be omitted from the
19724  * <limits.h> on specific implementations where the corresponding value is
19725  * equal to or greater than the stated minimum, but where the value can vary
19726  * depending on the file to which it is applied. The actual value supported for
19727  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
19728  *
19729  * This is clear that any machine supporting multiple file system types
19730  * and/or a network can not include this define, regardless of protection
19731  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
19732  *
19733  * #define	NAME_MAX	14
19734  */
19735 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19736     /* Increased for illumos */
19737 # 308 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19738 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
19739 /*
19740  * CDDL HEADER START
19741  *
19742  * The contents of this file are subject to the terms of the
19743  * Common Development and Distribution License (the "License").
19744  * You may not use this file except in compliance with the License.
19745  *
19746  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19747  * or http://www.opensolaris.org/os/licensing.
19748  * See the License for the specific language governing permissions
19749  * and limitations under the License.
19750  *
19751  * When distributing Covered Code, include this CDDL HEADER in each
19752  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19753  * If applicable, add the following below this CDDL HEADER, with the
19754  * fields enclosed by brackets "[]" replaced with your own identifying
19755  * information: Portions Copyright [yyyy] [name of copyright owner]
19756  *
19757  * CDDL HEADER END
19758  */
19759 
19760 /*
19761  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
19762  *	  All Rights Reserved
19763  *
19764  */
19765 
19766 /*
19767  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19768  * Use is subject to license terms.
19769  */
19770 
19771 /*
19772  * WARNING: This is an implementation-specific header,
19773  * its contents are not guaranteed. Applications
19774  * should include <unistd.h> and not this header.
19775  */
19776 # 309 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
19777 # 319 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
19778 extern long _sysconf(int); /* System Private interface to sysconf() */
19779 
19780 
19781 /* Added for UNIX98 conformance */
19782 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
19783 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
19784 /*
19785  * CDDL HEADER START
19786  *
19787  * The contents of this file are subject to the terms of the
19788  * Common Development and Distribution License (the "License").
19789  * You may not use this file except in compliance with the License.
19790  *
19791  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19792  * or http://www.opensolaris.org/os/licensing.
19793  * See the License for the specific language governing permissions
19794  * and limitations under the License.
19795  *
19796  * When distributing Covered Code, include this CDDL HEADER in each
19797  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19798  * If applicable, add the following below this CDDL HEADER, with the
19799  * fields enclosed by brackets "[]" replaced with your own identifying
19800  * information: Portions Copyright [yyyy] [name of copyright owner]
19801  *
19802  * CDDL HEADER END
19803  */
19804 
19805 /*
19806  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19807  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
19808  */
19809 
19810 /*	Copyright (c) 1988 AT&T	*/
19811 /*	  All Rights Reserved  	*/
19812 
19813 /*
19814  * User-visible pieces of the ANSI C standard I/O package.
19815  */
19816 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
19817 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
19818 /*
19819  * CDDL HEADER START
19820  *
19821  * The contents of this file are subject to the terms of the
19822  * Common Development and Distribution License, Version 1.0 only
19823  * (the "License").  You may not use this file except in compliance
19824  * with the License.
19825  *
19826  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19827  * or http://www.opensolaris.org/os/licensing.
19828  * See the License for the specific language governing permissions
19829  * and limitations under the License.
19830  *
19831  * When distributing Covered Code, include this CDDL HEADER in each
19832  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19833  * If applicable, add the following below this CDDL HEADER, with the
19834  * fields enclosed by brackets "[]" replaced with your own identifying
19835  * information: Portions Copyright [yyyy] [name of copyright owner]
19836  *
19837  * CDDL HEADER END
19838  */
19839 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19840 /*	  All Rights Reserved  	*/
19841 
19842 
19843 
19844 
19845 
19846 #pragma ident "%Z%%M%	%I%	%E% SMI"
19847 
19848 
19849 
19850 
19851 
19852 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
19853 /*
19854  * CDDL HEADER START
19855  *
19856  * The contents of this file are subject to the terms of the
19857  * Common Development and Distribution License (the "License").
19858  * You may not use this file except in compliance with the License.
19859  *
19860  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19861  * or http://www.opensolaris.org/os/licensing.
19862  * See the License for the specific language governing permissions
19863  * and limitations under the License.
19864  *
19865  * When distributing Covered Code, include this CDDL HEADER in each
19866  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19867  * If applicable, add the following below this CDDL HEADER, with the
19868  * fields enclosed by brackets "[]" replaced with your own identifying
19869  * information: Portions Copyright [yyyy] [name of copyright owner]
19870  *
19871  * CDDL HEADER END
19872  */
19873 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19874 /*	  All Rights Reserved  	*/
19875 
19876 
19877 /*
19878  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19879  * Use is subject to license terms.
19880  *
19881  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
19882  * Copyright 2016 Joyent, Inc.
19883  */
19884 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
19885 
19886 struct pkgdev {
19887  int rdonly;
19888  int mntflg;
19889  longlong_t capacity; /* number of 512-blocks on device */
19890  char *name;
19891  char *dirname;
19892  char *pathname;
19893  char *mount;
19894  char *fstyp;
19895  char *cdevice;
19896  char *bdevice;
19897  char *norewind;
19898 };
19899 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
19900 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
19901 /*
19902  * CDDL HEADER START
19903  *
19904  * The contents of this file are subject to the terms of the
19905  * Common Development and Distribution License (the "License").
19906  * You may not use this file except in compliance with the License.
19907  *
19908  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19909  * or http://www.opensolaris.org/os/licensing.
19910  * See the License for the specific language governing permissions
19911  * and limitations under the License.
19912  *
19913  * When distributing Covered Code, include this CDDL HEADER in each
19914  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19915  * If applicable, add the following below this CDDL HEADER, with the
19916  * fields enclosed by brackets "[]" replaced with your own identifying
19917  * information: Portions Copyright [yyyy] [name of copyright owner]
19918  *
19919  * CDDL HEADER END
19920  */
19921 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19922 /*	  All Rights Reserved  	*/
19923 
19924 /*
19925  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
19926  * Use is subject to license terms.
19927  */
19928 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
19929 # 1 "/usr/include/openssl/bio.h" 1 3 4
19930 /* crypto/bio/bio.h */
19931 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19932  * All rights reserved.
19933  *
19934  * This package is an SSL implementation written
19935  * by Eric Young (eay@cryptsoft.com).
19936  * The implementation was written so as to conform with Netscapes SSL.
19937  *
19938  * This library is free for commercial and non-commercial use as long as
19939  * the following conditions are aheared to.  The following conditions
19940  * apply to all code found in this distribution, be it the RC4, RSA,
19941  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19942  * included with this distribution is covered by the same copyright terms
19943  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19944  *
19945  * Copyright remains Eric Young's, and as such any Copyright notices in
19946  * the code are not to be removed.
19947  * If this package is used in a product, Eric Young should be given attribution
19948  * as the author of the parts of the library used.
19949  * This can be in the form of a textual message at program startup or
19950  * in documentation (online or textual) provided with the package.
19951  *
19952  * Redistribution and use in source and binary forms, with or without
19953  * modification, are permitted provided that the following conditions
19954  * are met:
19955  * 1. Redistributions of source code must retain the copyright
19956  *    notice, this list of conditions and the following disclaimer.
19957  * 2. Redistributions in binary form must reproduce the above copyright
19958  *    notice, this list of conditions and the following disclaimer in the
19959  *    documentation and/or other materials provided with the distribution.
19960  * 3. All advertising materials mentioning features or use of this software
19961  *    must display the following acknowledgement:
19962  *    "This product includes cryptographic software written by
19963  *     Eric Young (eay@cryptsoft.com)"
19964  *    The word 'cryptographic' can be left out if the rouines from the library
19965  *    being used are not cryptographic related :-).
19966  * 4. If you include any Windows specific code (or a derivative thereof) from
19967  *    the apps directory (application code) you must include an acknowledgement:
19968  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19969  *
19970  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19971  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19972  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19973  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19974  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19975  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19976  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19977  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19978  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19979  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19980  * SUCH DAMAGE.
19981  *
19982  * The licence and distribution terms for any publically available version or
19983  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19984  * copied and put under another distribution licence
19985  * [including the GNU Public Licence.]
19986  */
19987 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
19988 # 1 "/usr/include/openssl/x509.h" 1 3 4
19989 /* crypto/x509/x509.h */
19990 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19991  * All rights reserved.
19992  *
19993  * This package is an SSL implementation written
19994  * by Eric Young (eay@cryptsoft.com).
19995  * The implementation was written so as to conform with Netscapes SSL.
19996  *
19997  * This library is free for commercial and non-commercial use as long as
19998  * the following conditions are aheared to.  The following conditions
19999  * apply to all code found in this distribution, be it the RC4, RSA,
20000  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20001  * included with this distribution is covered by the same copyright terms
20002  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20003  *
20004  * Copyright remains Eric Young's, and as such any Copyright notices in
20005  * the code are not to be removed.
20006  * If this package is used in a product, Eric Young should be given attribution
20007  * as the author of the parts of the library used.
20008  * This can be in the form of a textual message at program startup or
20009  * in documentation (online or textual) provided with the package.
20010  *
20011  * Redistribution and use in source and binary forms, with or without
20012  * modification, are permitted provided that the following conditions
20013  * are met:
20014  * 1. Redistributions of source code must retain the copyright
20015  *    notice, this list of conditions and the following disclaimer.
20016  * 2. Redistributions in binary form must reproduce the above copyright
20017  *    notice, this list of conditions and the following disclaimer in the
20018  *    documentation and/or other materials provided with the distribution.
20019  * 3. All advertising materials mentioning features or use of this software
20020  *    must display the following acknowledgement:
20021  *    "This product includes cryptographic software written by
20022  *     Eric Young (eay@cryptsoft.com)"
20023  *    The word 'cryptographic' can be left out if the rouines from the library
20024  *    being used are not cryptographic related :-).
20025  * 4. If you include any Windows specific code (or a derivative thereof) from
20026  *    the apps directory (application code) you must include an acknowledgement:
20027  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20028  *
20029  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20030  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20031  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20032  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20033  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20034  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20035  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20036  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20037  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20038  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20039  * SUCH DAMAGE.
20040  *
20041  * The licence and distribution terms for any publically available version or
20042  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20043  * copied and put under another distribution licence
20044  * [including the GNU Public Licence.]
20045  */
20046 /* ====================================================================
20047  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20048  * ECDH support in OpenSSL originally developed by
20049  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
20050  */
20051 
20052 
20053 
20054 
20055 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
20056 /* e_os2.h */
20057 /* ====================================================================
20058  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
20059  *
20060  * Redistribution and use in source and binary forms, with or without
20061  * modification, are permitted provided that the following conditions
20062  * are met:
20063  *
20064  * 1. Redistributions of source code must retain the above copyright
20065  *    notice, this list of conditions and the following disclaimer.
20066  *
20067  * 2. Redistributions in binary form must reproduce the above copyright
20068  *    notice, this list of conditions and the following disclaimer in
20069  *    the documentation and/or other materials provided with the
20070  *    distribution.
20071  *
20072  * 3. All advertising materials mentioning features or use of this
20073  *    software must display the following acknowledgment:
20074  *    "This product includes software developed by the OpenSSL Project
20075  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20076  *
20077  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20078  *    endorse or promote products derived from this software without
20079  *    prior written permission. For written permission, please contact
20080  *    openssl-core@openssl.org.
20081  *
20082  * 5. Products derived from this software may not be called "OpenSSL"
20083  *    nor may "OpenSSL" appear in their names without prior written
20084  *    permission of the OpenSSL Project.
20085  *
20086  * 6. Redistributions of any form whatsoever must retain the following
20087  *    acknowledgment:
20088  *    "This product includes software developed by the OpenSSL Project
20089  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20090  *
20091  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20092  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20093  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20094  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20095  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20096  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20097  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20098  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20099  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20100  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20101  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20102  * OF THE POSSIBILITY OF SUCH DAMAGE.
20103  * ====================================================================
20104  *
20105  * This product includes cryptographic software written by Eric Young
20106  * (eay@cryptsoft.com).  This product includes software written by Tim
20107  * Hudson (tjh@cryptsoft.com).
20108  *
20109  */
20110 
20111 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20112 /* opensslconf.h */
20113 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20114 
20115 
20116 
20117 
20118 /* OpenSSL was configured with the following options: */
20119 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20120 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20121    asks for it.  This is a transient feature that is provided for those
20122    who haven't had the time to do the appropriate changes in their
20123    applications.  */
20124 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20125 /* crypto/opensslconf.h.in */
20126 
20127 /* Generate 80386 code? */
20128 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
20129 # 68 "/usr/include/openssl/x509.h" 2 3 4
20130 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
20131 /* ====================================================================
20132  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
20133  *
20134  * Redistribution and use in source and binary forms, with or without
20135  * modification, are permitted provided that the following conditions
20136  * are met:
20137  *
20138  * 1. Redistributions of source code must retain the above copyright
20139  *    notice, this list of conditions and the following disclaimer.
20140  *
20141  * 2. Redistributions in binary form must reproduce the above copyright
20142  *    notice, this list of conditions and the following disclaimer in
20143  *    the documentation and/or other materials provided with the
20144  *    distribution.
20145  *
20146  * 3. All advertising materials mentioning features or use of this
20147  *    software must display the following acknowledgment:
20148  *    "This product includes software developed by the OpenSSL Project
20149  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20150  *
20151  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20152  *    endorse or promote products derived from this software without
20153  *    prior written permission. For written permission, please contact
20154  *    openssl-core@openssl.org.
20155  *
20156  * 5. Products derived from this software may not be called "OpenSSL"
20157  *    nor may "OpenSSL" appear in their names without prior written
20158  *    permission of the OpenSSL Project.
20159  *
20160  * 6. Redistributions of any form whatsoever must retain the following
20161  *    acknowledgment:
20162  *    "This product includes software developed by the OpenSSL Project
20163  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20164  *
20165  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20166  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20167  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20168  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20169  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20170  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20171  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20172  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20173  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20174  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20175  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20176  * OF THE POSSIBILITY OF SUCH DAMAGE.
20177  * ====================================================================
20178  *
20179  * This product includes cryptographic software written by Eric Young
20180  * (eay@cryptsoft.com).  This product includes software written by Tim
20181  * Hudson (tjh@cryptsoft.com).
20182  *
20183  */
20184 # 69 "/usr/include/openssl/x509.h" 2 3 4
20185 
20186 # 1 "/usr/include/openssl/buffer.h" 1 3 4
20187 /* crypto/buffer/buffer.h */
20188 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20189  * All rights reserved.
20190  *
20191  * This package is an SSL implementation written
20192  * by Eric Young (eay@cryptsoft.com).
20193  * The implementation was written so as to conform with Netscapes SSL.
20194  *
20195  * This library is free for commercial and non-commercial use as long as
20196  * the following conditions are aheared to.  The following conditions
20197  * apply to all code found in this distribution, be it the RC4, RSA,
20198  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20199  * included with this distribution is covered by the same copyright terms
20200  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20201  *
20202  * Copyright remains Eric Young's, and as such any Copyright notices in
20203  * the code are not to be removed.
20204  * If this package is used in a product, Eric Young should be given attribution
20205  * as the author of the parts of the library used.
20206  * This can be in the form of a textual message at program startup or
20207  * in documentation (online or textual) provided with the package.
20208  *
20209  * Redistribution and use in source and binary forms, with or without
20210  * modification, are permitted provided that the following conditions
20211  * are met:
20212  * 1. Redistributions of source code must retain the copyright
20213  *    notice, this list of conditions and the following disclaimer.
20214  * 2. Redistributions in binary form must reproduce the above copyright
20215  *    notice, this list of conditions and the following disclaimer in the
20216  *    documentation and/or other materials provided with the distribution.
20217  * 3. All advertising materials mentioning features or use of this software
20218  *    must display the following acknowledgement:
20219  *    "This product includes cryptographic software written by
20220  *     Eric Young (eay@cryptsoft.com)"
20221  *    The word 'cryptographic' can be left out if the rouines from the library
20222  *    being used are not cryptographic related :-).
20223  * 4. If you include any Windows specific code (or a derivative thereof) from
20224  *    the apps directory (application code) you must include an acknowledgement:
20225  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20226  *
20227  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20228  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20229  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20230  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20231  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20232  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20233  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20234  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20235  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20236  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20237  * SUCH DAMAGE.
20238  *
20239  * The licence and distribution terms for any publically available version or
20240  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20241  * copied and put under another distribution licence
20242  * [including the GNU Public Licence.]
20243  */
20244 
20245 
20246 
20247 
20248 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
20249 /* ====================================================================
20250  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
20251  *
20252  * Redistribution and use in source and binary forms, with or without
20253  * modification, are permitted provided that the following conditions
20254  * are met:
20255  *
20256  * 1. Redistributions of source code must retain the above copyright
20257  *    notice, this list of conditions and the following disclaimer.
20258  *
20259  * 2. Redistributions in binary form must reproduce the above copyright
20260  *    notice, this list of conditions and the following disclaimer in
20261  *    the documentation and/or other materials provided with the
20262  *    distribution.
20263  *
20264  * 3. All advertising materials mentioning features or use of this
20265  *    software must display the following acknowledgment:
20266  *    "This product includes software developed by the OpenSSL Project
20267  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20268  *
20269  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20270  *    endorse or promote products derived from this software without
20271  *    prior written permission. For written permission, please contact
20272  *    openssl-core@openssl.org.
20273  *
20274  * 5. Products derived from this software may not be called "OpenSSL"
20275  *    nor may "OpenSSL" appear in their names without prior written
20276  *    permission of the OpenSSL Project.
20277  *
20278  * 6. Redistributions of any form whatsoever must retain the following
20279  *    acknowledgment:
20280  *    "This product includes software developed by the OpenSSL Project
20281  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20282  *
20283  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20284  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20285  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20286  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20287  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20288  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20289  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20290  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20291  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20292  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20293  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20294  * OF THE POSSIBILITY OF SUCH DAMAGE.
20295  * ====================================================================
20296  *
20297  * This product includes cryptographic software written by Eric Young
20298  * (eay@cryptsoft.com).  This product includes software written by Tim
20299  * Hudson (tjh@cryptsoft.com).
20300  *
20301  */
20302 # 63 "/usr/include/openssl/buffer.h" 2 3 4
20303 
20304 
20305 
20306 
20307 
20308 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
20309 /*
20310  * CDDL HEADER START
20311  *
20312  * The contents of this file are subject to the terms of the
20313  * Common Development and Distribution License, Version 1.0 only
20314  * (the "License").  You may not use this file except in compliance
20315  * with the License.
20316  *
20317  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20318  * or http://www.opensolaris.org/os/licensing.
20319  * See the License for the specific language governing permissions
20320  * and limitations under the License.
20321  *
20322  * When distributing Covered Code, include this CDDL HEADER in each
20323  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20324  * If applicable, add the following below this CDDL HEADER, with the
20325  * fields enclosed by brackets "[]" replaced with your own identifying
20326  * information: Portions Copyright [yyyy] [name of copyright owner]
20327  *
20328  * CDDL HEADER END
20329  */
20330 /*	Copyright (c) 1988 AT&T	*/
20331 /*	  All Rights Reserved  	*/
20332 
20333 
20334 /*
20335  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
20336  * Use is subject to license terms.
20337  */
20338 
20339 
20340 
20341 
20342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
20343 /*
20344  * CDDL HEADER START
20345  *
20346  * The contents of this file are subject to the terms of the
20347  * Common Development and Distribution License (the "License").
20348  * You may not use this file except in compliance with the License.
20349  *
20350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20351  * or http://www.opensolaris.org/os/licensing.
20352  * See the License for the specific language governing permissions
20353  * and limitations under the License.
20354  *
20355  *
20356  * When distributing Covered Code, include this CDDL HEADER in each
20357  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20358  * If applicable, add the following below this CDDL HEADER, with the
20359  * fields enclosed by brackets "[]" replaced with your own identifying
20360  * information: Portions Copyright [yyyy] [name of copyright owner]
20361  *
20362  * CDDL HEADER END
20363  */
20364 
20365 /*
20366  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
20367  * Use is subject to license terms.
20368  * Copyright 2016 Joyent, Inc.
20369  */
20370 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
20371 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
20372 /*
20373  * CDDL HEADER START
20374  *
20375  * The contents of this file are subject to the terms of the
20376  * Common Development and Distribution License, Version 1.0 only
20377  * (the "License").  You may not use this file except in compliance
20378  * with the License.
20379  *
20380  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20381  * or http://www.opensolaris.org/os/licensing.
20382  * See the License for the specific language governing permissions
20383  * and limitations under the License.
20384  *
20385  * When distributing Covered Code, include this CDDL HEADER in each
20386  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20387  * If applicable, add the following below this CDDL HEADER, with the
20388  * fields enclosed by brackets "[]" replaced with your own identifying
20389  * information: Portions Copyright [yyyy] [name of copyright owner]
20390  *
20391  * CDDL HEADER END
20392  */
20393 /*	Copyright (c) 1988 AT&T	*/
20394 /*	  All Rights Reserved  	*/
20395 
20396 
20397 /*
20398  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
20399  * Use is subject to license terms.
20400  */
20401 
20402 /*
20403  * Copyright 2014 PALO, Richard.
20404  * Copyright 2016 Joyent, Inc.
20405  */
20406 
20407 /*
20408  * An application should not include this header directly.  Instead it
20409  * should be included only through the inclusion of other Sun headers.
20410  *
20411  * The contents of this header is limited to identifiers specified in the
20412  * C Standard.  Any new identifiers specified in future amendments to the
20413  * C Standard must be placed in this header.  If these new identifiers
20414  * are required to also be in the C++ Standard "std" namespace, then for
20415  * anything other than macro definitions, corresponding "using" directives
20416  * must also be added to <stddef.h.h>.
20417  */
20418 
20419 
20420 
20421 
20422 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
20423 /*
20424  * CDDL HEADER START
20425  *
20426  * The contents of this file are subject to the terms of the
20427  * Common Development and Distribution License (the "License").
20428  * You may not use this file except in compliance with the License.
20429  *
20430  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20431  * or http://www.opensolaris.org/os/licensing.
20432  * See the License for the specific language governing permissions
20433  * and limitations under the License.
20434  *
20435  *
20436  * When distributing Covered Code, include this CDDL HEADER in each
20437  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20438  * If applicable, add the following below this CDDL HEADER, with the
20439  * fields enclosed by brackets "[]" replaced with your own identifying
20440  * information: Portions Copyright [yyyy] [name of copyright owner]
20441  *
20442  * CDDL HEADER END
20443  */
20444 
20445 /*
20446  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
20447  * Use is subject to license terms.
20448  * Copyright 2016 Joyent, Inc.
20449  */
20450 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
20451 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
20452 /*
20453  * CDDL HEADER START
20454  *
20455  * The contents of this file are subject to the terms of the
20456  * Common Development and Distribution License (the "License").
20457  * You may not use this file except in compliance with the License.
20458  *
20459  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20460  * or http://www.opensolaris.org/os/licensing.
20461  * See the License for the specific language governing permissions
20462  * and limitations under the License.
20463  *
20464  * When distributing Covered Code, include this CDDL HEADER in each
20465  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20466  * If applicable, add the following below this CDDL HEADER, with the
20467  * fields enclosed by brackets "[]" replaced with your own identifying
20468  * information: Portions Copyright [yyyy] [name of copyright owner]
20469  *
20470  * CDDL HEADER END
20471  */
20472 
20473 /*
20474  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
20475  * Copyright 2016 Joyent, Inc.
20476  *
20477  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
20478  * Use is subject to license terms.
20479  */
20480 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
20481 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
20482 /*
20483  * This file and its contents are supplied under the terms of the
20484  * Common Development and Distribution License ("CDDL"), version 1.0.
20485  * You may only use this file in accordance with the terms of version
20486  * 1.0 of the CDDL.
20487  *
20488  * A full copy of the text of the CDDL should have accompanied this
20489  * source.  A copy of the CDDL is also available via the Internet at
20490  * http://www.illumos.org/license/CDDL.
20491  */
20492 
20493 /*
20494  * Copyright 2014-2016 PALO, Richard.
20495  */
20496 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
20497 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
20498 typedef long max_align_t;
20499 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
20500 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
20501 /*
20502  * This file and its contents are supplied under the terms of the
20503  * Common Development and Distribution License ("CDDL"), version 1.0.
20504  * You may only use this file in accordance with the terms of version
20505  * 1.0 of the CDDL.
20506  *
20507  * A full copy of the text of the CDDL should have accompanied this
20508  * source.  A copy of the CDDL is also available via the Internet at
20509  * http://www.illumos.org/license/CDDL.
20510  */
20511 
20512 /*
20513  * Copyright 2017 Toomas Soome <tsoome@me.com>
20514  */
20515 
20516 
20517 
20518 
20519 /*
20520  * Commonly used macros and definitions.
20521  */
20522 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
20523 /*
20524  * We must not expose container_of() to userland, but we want it
20525  * to be available for early boot and for the kernel.
20526  */
20527 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
20528 
20529 /*
20530  * Allow global visibility for symbols defined in
20531  * C++ "std" namespace in <iso/stddef_iso.h>.
20532  */
20533 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
20534 /*
20535  * wchar_t is a built-in type in standard C++ and as such is not
20536  * defined here when using standard C++. However, the GNU compiler
20537  * fixincludes utility nonetheless creates its own version of this
20538  * header for use by gcc and g++. In that version it adds a redundant
20539  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
20540  * header we need to include the following magic comment:
20541  *
20542  * we must use the C++ compiler's type
20543  *
20544  * The above comment should not be removed or changed until GNU
20545  * gcc/fixinc/inclhack.def is updated to bypass this header.
20546  */
20547 # 69 "/usr/include/openssl/buffer.h" 2 3 4
20548 
20549 
20550 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
20551 /*
20552  * CDDL HEADER START
20553  *
20554  * The contents of this file are subject to the terms of the
20555  * Common Development and Distribution License (the "License").
20556  * You may not use this file except in compliance with the License.
20557  *
20558  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20559  * or http://www.opensolaris.org/os/licensing.
20560  * See the License for the specific language governing permissions
20561  * and limitations under the License.
20562  *
20563  * When distributing Covered Code, include this CDDL HEADER in each
20564  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20565  * If applicable, add the following below this CDDL HEADER, with the
20566  * fields enclosed by brackets "[]" replaced with your own identifying
20567  * information: Portions Copyright [yyyy] [name of copyright owner]
20568  *
20569  * CDDL HEADER END
20570  */
20571 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20572 /*	  All Rights Reserved  	*/
20573 
20574 
20575 /*
20576  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20577  * Use is subject to license terms.
20578  *
20579  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20580  * Copyright 2016 Joyent, Inc.
20581  */
20582 # 72 "/usr/include/openssl/buffer.h" 2 3 4
20583 
20584 
20585 /* Already declared in ossl_typ.h */
20586 /* typedef struct buf_mem_st BUF_MEM; */
20587 
20588 struct buf_mem_st {
20589     size_t length; /* current number of bytes */
20590     char *data;
20591     size_t max; /* size of buffer */
20592 };
20593 
20594 BUF_MEM *BUF_MEM_new(void);
20595 void BUF_MEM_free(BUF_MEM *a);
20596 int BUF_MEM_grow(BUF_MEM *str, size_t len);
20597 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
20598 size_t BUF_strnlen(const char *str, size_t maxlen);
20599 char *BUF_strdup(const char *str);
20600 
20601 /*
20602  * Like strndup, but in addition, explicitly guarantees to never read past the
20603  * first |siz| bytes of |str|.
20604  */
20605 char *BUF_strndup(const char *str, size_t siz);
20606 
20607 void *BUF_memdup(const void *data, size_t siz);
20608 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
20609 
20610 /* safe string functions */
20611 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
20612 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
20613 
20614 /* BEGIN ERROR CODES */
20615 /*
20616  * The following lines are auto generated by the script mkerr.pl. Any changes
20617  * made after this point may be overwritten when the script is next run.
20618  */
20619 void ERR_load_BUF_strings(void);
20620 
20621 /* Error codes for the BUF functions. */
20622 
20623 /* Function codes. */
20624 
20625 
20626 
20627 
20628 
20629 
20630 
20631 /* Reason codes. */
20632 # 71 "/usr/include/openssl/x509.h" 2 3 4
20633 
20634 
20635 # 1 "/usr/include/openssl/evp.h" 1 3 4
20636 /* crypto/evp/evp.h */
20637 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20638  * All rights reserved.
20639  *
20640  * This package is an SSL implementation written
20641  * by Eric Young (eay@cryptsoft.com).
20642  * The implementation was written so as to conform with Netscapes SSL.
20643  *
20644  * This library is free for commercial and non-commercial use as long as
20645  * the following conditions are aheared to.  The following conditions
20646  * apply to all code found in this distribution, be it the RC4, RSA,
20647  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20648  * included with this distribution is covered by the same copyright terms
20649  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20650  *
20651  * Copyright remains Eric Young's, and as such any Copyright notices in
20652  * the code are not to be removed.
20653  * If this package is used in a product, Eric Young should be given attribution
20654  * as the author of the parts of the library used.
20655  * This can be in the form of a textual message at program startup or
20656  * in documentation (online or textual) provided with the package.
20657  *
20658  * Redistribution and use in source and binary forms, with or without
20659  * modification, are permitted provided that the following conditions
20660  * are met:
20661  * 1. Redistributions of source code must retain the copyright
20662  *    notice, this list of conditions and the following disclaimer.
20663  * 2. Redistributions in binary form must reproduce the above copyright
20664  *    notice, this list of conditions and the following disclaimer in the
20665  *    documentation and/or other materials provided with the distribution.
20666  * 3. All advertising materials mentioning features or use of this software
20667  *    must display the following acknowledgement:
20668  *    "This product includes cryptographic software written by
20669  *     Eric Young (eay@cryptsoft.com)"
20670  *    The word 'cryptographic' can be left out if the rouines from the library
20671  *    being used are not cryptographic related :-).
20672  * 4. If you include any Windows specific code (or a derivative thereof) from
20673  *    the apps directory (application code) you must include an acknowledgement:
20674  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20675  *
20676  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20677  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20678  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20679  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20680  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20681  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20682  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20683  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20684  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20685  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20686  * SUCH DAMAGE.
20687  *
20688  * The licence and distribution terms for any publically available version or
20689  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20690  * copied and put under another distribution licence
20691  * [including the GNU Public Licence.]
20692  */
20693 # 66 "/usr/include/openssl/evp.h" 3 4
20694 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20695 /* opensslconf.h */
20696 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20697 
20698 
20699 
20700 
20701 /* OpenSSL was configured with the following options: */
20702 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20703 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20704    asks for it.  This is a transient feature that is provided for those
20705    who haven't had the time to do the appropriate changes in their
20706    applications.  */
20707 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20708 /* crypto/opensslconf.h.in */
20709 
20710 /* Generate 80386 code? */
20711 # 67 "/usr/include/openssl/evp.h" 2 3 4
20712 
20713 
20714 
20715 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
20716 /* ====================================================================
20717  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
20718  *
20719  * Redistribution and use in source and binary forms, with or without
20720  * modification, are permitted provided that the following conditions
20721  * are met:
20722  *
20723  * 1. Redistributions of source code must retain the above copyright
20724  *    notice, this list of conditions and the following disclaimer.
20725  *
20726  * 2. Redistributions in binary form must reproduce the above copyright
20727  *    notice, this list of conditions and the following disclaimer in
20728  *    the documentation and/or other materials provided with the
20729  *    distribution.
20730  *
20731  * 3. All advertising materials mentioning features or use of this
20732  *    software must display the following acknowledgment:
20733  *    "This product includes software developed by the OpenSSL Project
20734  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20735  *
20736  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20737  *    endorse or promote products derived from this software without
20738  *    prior written permission. For written permission, please contact
20739  *    openssl-core@openssl.org.
20740  *
20741  * 5. Products derived from this software may not be called "OpenSSL"
20742  *    nor may "OpenSSL" appear in their names without prior written
20743  *    permission of the OpenSSL Project.
20744  *
20745  * 6. Redistributions of any form whatsoever must retain the following
20746  *    acknowledgment:
20747  *    "This product includes software developed by the OpenSSL Project
20748  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20749  *
20750  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20751  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20752  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20753  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20754  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20755  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20756  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20757  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20758  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20759  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20760  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20761  * OF THE POSSIBILITY OF SUCH DAMAGE.
20762  * ====================================================================
20763  *
20764  * This product includes cryptographic software written by Eric Young
20765  * (eay@cryptsoft.com).  This product includes software written by Tim
20766  * Hudson (tjh@cryptsoft.com).
20767  *
20768  */
20769 # 71 "/usr/include/openssl/evp.h" 2 3 4
20770 
20771 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
20772 /* ====================================================================
20773  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
20774  *
20775  * Redistribution and use in source and binary forms, with or without
20776  * modification, are permitted provided that the following conditions
20777  * are met:
20778  *
20779  * 1. Redistributions of source code must retain the above copyright
20780  *    notice, this list of conditions and the following disclaimer.
20781  *
20782  * 2. Redistributions in binary form must reproduce the above copyright
20783  *    notice, this list of conditions and the following disclaimer in
20784  *    the documentation and/or other materials provided with the
20785  *    distribution.
20786  *
20787  * 3. All advertising materials mentioning features or use of this
20788  *    software must display the following acknowledgment:
20789  *    "This product includes software developed by the OpenSSL Project
20790  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20791  *
20792  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20793  *    endorse or promote products derived from this software without
20794  *    prior written permission. For written permission, please contact
20795  *    openssl-core@openssl.org.
20796  *
20797  * 5. Products derived from this software may not be called "OpenSSL"
20798  *    nor may "OpenSSL" appear in their names without prior written
20799  *    permission of the OpenSSL Project.
20800  *
20801  * 6. Redistributions of any form whatsoever must retain the following
20802  *    acknowledgment:
20803  *    "This product includes software developed by the OpenSSL Project
20804  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20805  *
20806  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20807  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20808  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20809  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20810  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20811  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20812  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20813  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20814  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20815  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20816  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20817  * OF THE POSSIBILITY OF SUCH DAMAGE.
20818  * ====================================================================
20819  *
20820  * This product includes cryptographic software written by Eric Young
20821  * (eay@cryptsoft.com).  This product includes software written by Tim
20822  * Hudson (tjh@cryptsoft.com).
20823  *
20824  */
20825 # 73 "/usr/include/openssl/evp.h" 2 3 4
20826 
20827 
20828 # 1 "/usr/include/openssl/bio.h" 1 3 4
20829 /* crypto/bio/bio.h */
20830 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20831  * All rights reserved.
20832  *
20833  * This package is an SSL implementation written
20834  * by Eric Young (eay@cryptsoft.com).
20835  * The implementation was written so as to conform with Netscapes SSL.
20836  *
20837  * This library is free for commercial and non-commercial use as long as
20838  * the following conditions are aheared to.  The following conditions
20839  * apply to all code found in this distribution, be it the RC4, RSA,
20840  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20841  * included with this distribution is covered by the same copyright terms
20842  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20843  *
20844  * Copyright remains Eric Young's, and as such any Copyright notices in
20845  * the code are not to be removed.
20846  * If this package is used in a product, Eric Young should be given attribution
20847  * as the author of the parts of the library used.
20848  * This can be in the form of a textual message at program startup or
20849  * in documentation (online or textual) provided with the package.
20850  *
20851  * Redistribution and use in source and binary forms, with or without
20852  * modification, are permitted provided that the following conditions
20853  * are met:
20854  * 1. Redistributions of source code must retain the copyright
20855  *    notice, this list of conditions and the following disclaimer.
20856  * 2. Redistributions in binary form must reproduce the above copyright
20857  *    notice, this list of conditions and the following disclaimer in the
20858  *    documentation and/or other materials provided with the distribution.
20859  * 3. All advertising materials mentioning features or use of this software
20860  *    must display the following acknowledgement:
20861  *    "This product includes cryptographic software written by
20862  *     Eric Young (eay@cryptsoft.com)"
20863  *    The word 'cryptographic' can be left out if the rouines from the library
20864  *    being used are not cryptographic related :-).
20865  * 4. If you include any Windows specific code (or a derivative thereof) from
20866  *    the apps directory (application code) you must include an acknowledgement:
20867  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20868  *
20869  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20870  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20871  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20872  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20873  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20874  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20875  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20876  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20877  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20878  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20879  * SUCH DAMAGE.
20880  *
20881  * The licence and distribution terms for any publically available version or
20882  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20883  * copied and put under another distribution licence
20884  * [including the GNU Public Licence.]
20885  */
20886 # 76 "/usr/include/openssl/evp.h" 2 3 4
20887 
20888 
20889 /*-
20890 #define EVP_RC2_KEY_SIZE                16
20891 #define EVP_RC4_KEY_SIZE                16
20892 #define EVP_BLOWFISH_KEY_SIZE           16
20893 #define EVP_CAST5_KEY_SIZE              16
20894 #define EVP_RC5_32_12_16_KEY_SIZE       16
20895 */
20896 
20897 
20898 
20899 
20900 
20901 
20902 /* Default PKCS#5 iteration count */
20903 
20904 
20905 # 1 "/usr/include/openssl/objects.h" 1 3 4
20906 /* crypto/objects/objects.h */
20907 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20908  * All rights reserved.
20909  *
20910  * This package is an SSL implementation written
20911  * by Eric Young (eay@cryptsoft.com).
20912  * The implementation was written so as to conform with Netscapes SSL.
20913  *
20914  * This library is free for commercial and non-commercial use as long as
20915  * the following conditions are aheared to.  The following conditions
20916  * apply to all code found in this distribution, be it the RC4, RSA,
20917  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20918  * included with this distribution is covered by the same copyright terms
20919  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20920  *
20921  * Copyright remains Eric Young's, and as such any Copyright notices in
20922  * the code are not to be removed.
20923  * If this package is used in a product, Eric Young should be given attribution
20924  * as the author of the parts of the library used.
20925  * This can be in the form of a textual message at program startup or
20926  * in documentation (online or textual) provided with the package.
20927  *
20928  * Redistribution and use in source and binary forms, with or without
20929  * modification, are permitted provided that the following conditions
20930  * are met:
20931  * 1. Redistributions of source code must retain the copyright
20932  *    notice, this list of conditions and the following disclaimer.
20933  * 2. Redistributions in binary form must reproduce the above copyright
20934  *    notice, this list of conditions and the following disclaimer in the
20935  *    documentation and/or other materials provided with the distribution.
20936  * 3. All advertising materials mentioning features or use of this software
20937  *    must display the following acknowledgement:
20938  *    "This product includes cryptographic software written by
20939  *     Eric Young (eay@cryptsoft.com)"
20940  *    The word 'cryptographic' can be left out if the rouines from the library
20941  *    being used are not cryptographic related :-).
20942  * 4. If you include any Windows specific code (or a derivative thereof) from
20943  *    the apps directory (application code) you must include an acknowledgement:
20944  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20945  *
20946  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20947  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20948  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20949  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20950  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20951  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20952  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20953  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20954  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20955  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20956  * SUCH DAMAGE.
20957  *
20958  * The licence and distribution terms for any publically available version or
20959  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20960  * copied and put under another distribution licence
20961  * [including the GNU Public Licence.]
20962  */
20963 
20964 
20965 
20966 
20967 
20968 
20969 
20970 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
20971 /* crypto/objects/obj_mac.h */
20972 
20973 /*
20974  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
20975  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
20976  */
20977 
20978 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
20979  * All rights reserved.
20980  *
20981  * This package is an SSL implementation written
20982  * by Eric Young (eay@cryptsoft.com).
20983  * The implementation was written so as to conform with Netscapes SSL.
20984  *
20985  * This library is free for commercial and non-commercial use as long as
20986  * the following conditions are aheared to.  The following conditions
20987  * apply to all code found in this distribution, be it the RC4, RSA,
20988  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20989  * included with this distribution is covered by the same copyright terms
20990  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20991  *
20992  * Copyright remains Eric Young's, and as such any Copyright notices in
20993  * the code are not to be removed.
20994  * If this package is used in a product, Eric Young should be given attribution
20995  * as the author of the parts of the library used.
20996  * This can be in the form of a textual message at program startup or
20997  * in documentation (online or textual) provided with the package.
20998  *
20999  * Redistribution and use in source and binary forms, with or without
21000  * modification, are permitted provided that the following conditions
21001  * are met:
21002  * 1. Redistributions of source code must retain the copyright
21003  *    notice, this list of conditions and the following disclaimer.
21004  * 2. Redistributions in binary form must reproduce the above copyright
21005  *    notice, this list of conditions and the following disclaimer in the
21006  *    documentation and/or other materials provided with the distribution.
21007  * 3. All advertising materials mentioning features or use of this software
21008  *    must display the following acknowledgement:
21009  *    "This product includes cryptographic software written by
21010  *     Eric Young (eay@cryptsoft.com)"
21011  *    The word 'cryptographic' can be left out if the rouines from the library
21012  *    being used are not cryptographic related :-).
21013  * 4. If you include any Windows specific code (or a derivative thereof) from
21014  *    the apps directory (application code) you must include an acknowledgement:
21015  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21016  *
21017  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21027  * SUCH DAMAGE.
21028  *
21029  * The licence and distribution terms for any publically available version or
21030  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21031  * copied and put under another distribution licence
21032  * [including the GNU Public Licence.]
21033  */
21034 # 66 "/usr/include/openssl/objects.h" 2 3 4
21035 # 964 "/usr/include/openssl/objects.h" 3 4
21036 # 1 "/usr/include/openssl/bio.h" 1 3 4
21037 /* crypto/bio/bio.h */
21038 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21039  * All rights reserved.
21040  *
21041  * This package is an SSL implementation written
21042  * by Eric Young (eay@cryptsoft.com).
21043  * The implementation was written so as to conform with Netscapes SSL.
21044  *
21045  * This library is free for commercial and non-commercial use as long as
21046  * the following conditions are aheared to.  The following conditions
21047  * apply to all code found in this distribution, be it the RC4, RSA,
21048  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21049  * included with this distribution is covered by the same copyright terms
21050  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21051  *
21052  * Copyright remains Eric Young's, and as such any Copyright notices in
21053  * the code are not to be removed.
21054  * If this package is used in a product, Eric Young should be given attribution
21055  * as the author of the parts of the library used.
21056  * This can be in the form of a textual message at program startup or
21057  * in documentation (online or textual) provided with the package.
21058  *
21059  * Redistribution and use in source and binary forms, with or without
21060  * modification, are permitted provided that the following conditions
21061  * are met:
21062  * 1. Redistributions of source code must retain the copyright
21063  *    notice, this list of conditions and the following disclaimer.
21064  * 2. Redistributions in binary form must reproduce the above copyright
21065  *    notice, this list of conditions and the following disclaimer in the
21066  *    documentation and/or other materials provided with the distribution.
21067  * 3. All advertising materials mentioning features or use of this software
21068  *    must display the following acknowledgement:
21069  *    "This product includes cryptographic software written by
21070  *     Eric Young (eay@cryptsoft.com)"
21071  *    The word 'cryptographic' can be left out if the rouines from the library
21072  *    being used are not cryptographic related :-).
21073  * 4. If you include any Windows specific code (or a derivative thereof) from
21074  *    the apps directory (application code) you must include an acknowledgement:
21075  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21076  *
21077  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21078  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21079  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21080  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21081  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21082  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21083  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21084  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21085  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21086  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21087  * SUCH DAMAGE.
21088  *
21089  * The licence and distribution terms for any publically available version or
21090  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21091  * copied and put under another distribution licence
21092  * [including the GNU Public Licence.]
21093  */
21094 # 965 "/usr/include/openssl/objects.h" 2 3 4
21095 # 1 "/usr/include/openssl/asn1.h" 1 3 4
21096 /* crypto/asn1/asn1.h */
21097 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21098  * All rights reserved.
21099  *
21100  * This package is an SSL implementation written
21101  * by Eric Young (eay@cryptsoft.com).
21102  * The implementation was written so as to conform with Netscapes SSL.
21103  *
21104  * This library is free for commercial and non-commercial use as long as
21105  * the following conditions are aheared to.  The following conditions
21106  * apply to all code found in this distribution, be it the RC4, RSA,
21107  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21108  * included with this distribution is covered by the same copyright terms
21109  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21110  *
21111  * Copyright remains Eric Young's, and as such any Copyright notices in
21112  * the code are not to be removed.
21113  * If this package is used in a product, Eric Young should be given attribution
21114  * as the author of the parts of the library used.
21115  * This can be in the form of a textual message at program startup or
21116  * in documentation (online or textual) provided with the package.
21117  *
21118  * Redistribution and use in source and binary forms, with or without
21119  * modification, are permitted provided that the following conditions
21120  * are met:
21121  * 1. Redistributions of source code must retain the copyright
21122  *    notice, this list of conditions and the following disclaimer.
21123  * 2. Redistributions in binary form must reproduce the above copyright
21124  *    notice, this list of conditions and the following disclaimer in the
21125  *    documentation and/or other materials provided with the distribution.
21126  * 3. All advertising materials mentioning features or use of this software
21127  *    must display the following acknowledgement:
21128  *    "This product includes cryptographic software written by
21129  *     Eric Young (eay@cryptsoft.com)"
21130  *    The word 'cryptographic' can be left out if the rouines from the library
21131  *    being used are not cryptographic related :-).
21132  * 4. If you include any Windows specific code (or a derivative thereof) from
21133  *    the apps directory (application code) you must include an acknowledgement:
21134  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21135  *
21136  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21137  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21138  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21139  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21140  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21141  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21142  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21143  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21144  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21145  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21146  * SUCH DAMAGE.
21147  *
21148  * The licence and distribution terms for any publically available version or
21149  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21150  * copied and put under another distribution licence
21151  * [including the GNU Public Licence.]
21152  */
21153 
21154 
21155 
21156 
21157 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
21158 /*
21159  * CDDL HEADER START
21160  *
21161  * The contents of this file are subject to the terms of the
21162  * Common Development and Distribution License (the "License").
21163  * You may not use this file except in compliance with the License.
21164  *
21165  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21166  * or http://www.opensolaris.org/os/licensing.
21167  * See the License for the specific language governing permissions
21168  * and limitations under the License.
21169  *
21170  * When distributing Covered Code, include this CDDL HEADER in each
21171  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21172  * If applicable, add the following below this CDDL HEADER, with the
21173  * fields enclosed by brackets "[]" replaced with your own identifying
21174  * information: Portions Copyright [yyyy] [name of copyright owner]
21175  *
21176  * CDDL HEADER END
21177  */
21178 /*	Copyright (c) 1988 AT&T	*/
21179 /*	  All Rights Reserved  	*/
21180 
21181 
21182 /*
21183  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21184  *
21185  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
21186  * Use is subject to license terms.
21187  */
21188 /*
21189  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
21190  * Copyright 2016 Joyent, Inc.
21191  */
21192 # 63 "/usr/include/openssl/asn1.h" 2 3 4
21193 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21194 /* e_os2.h */
21195 /* ====================================================================
21196  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21197  *
21198  * Redistribution and use in source and binary forms, with or without
21199  * modification, are permitted provided that the following conditions
21200  * are met:
21201  *
21202  * 1. Redistributions of source code must retain the above copyright
21203  *    notice, this list of conditions and the following disclaimer.
21204  *
21205  * 2. Redistributions in binary form must reproduce the above copyright
21206  *    notice, this list of conditions and the following disclaimer in
21207  *    the documentation and/or other materials provided with the
21208  *    distribution.
21209  *
21210  * 3. All advertising materials mentioning features or use of this
21211  *    software must display the following acknowledgment:
21212  *    "This product includes software developed by the OpenSSL Project
21213  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21214  *
21215  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21216  *    endorse or promote products derived from this software without
21217  *    prior written permission. For written permission, please contact
21218  *    openssl-core@openssl.org.
21219  *
21220  * 5. Products derived from this software may not be called "OpenSSL"
21221  *    nor may "OpenSSL" appear in their names without prior written
21222  *    permission of the OpenSSL Project.
21223  *
21224  * 6. Redistributions of any form whatsoever must retain the following
21225  *    acknowledgment:
21226  *    "This product includes software developed by the OpenSSL Project
21227  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21228  *
21229  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21230  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21231  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21232  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21233  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21234  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21235  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21236  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21237  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21238  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21239  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21240  * OF THE POSSIBILITY OF SUCH DAMAGE.
21241  * ====================================================================
21242  *
21243  * This product includes cryptographic software written by Eric Young
21244  * (eay@cryptsoft.com).  This product includes software written by Tim
21245  * Hudson (tjh@cryptsoft.com).
21246  *
21247  */
21248 
21249 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21250 /* opensslconf.h */
21251 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21252 
21253 
21254 
21255 
21256 /* OpenSSL was configured with the following options: */
21257 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21258 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21259    asks for it.  This is a transient feature that is provided for those
21260    who haven't had the time to do the appropriate changes in their
21261    applications.  */
21262 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21263 /* crypto/opensslconf.h.in */
21264 
21265 /* Generate 80386 code? */
21266 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21267 # 64 "/usr/include/openssl/asn1.h" 2 3 4
21268 
21269 # 1 "/usr/include/openssl/bio.h" 1 3 4
21270 /* crypto/bio/bio.h */
21271 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21272  * All rights reserved.
21273  *
21274  * This package is an SSL implementation written
21275  * by Eric Young (eay@cryptsoft.com).
21276  * The implementation was written so as to conform with Netscapes SSL.
21277  *
21278  * This library is free for commercial and non-commercial use as long as
21279  * the following conditions are aheared to.  The following conditions
21280  * apply to all code found in this distribution, be it the RC4, RSA,
21281  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21282  * included with this distribution is covered by the same copyright terms
21283  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21284  *
21285  * Copyright remains Eric Young's, and as such any Copyright notices in
21286  * the code are not to be removed.
21287  * If this package is used in a product, Eric Young should be given attribution
21288  * as the author of the parts of the library used.
21289  * This can be in the form of a textual message at program startup or
21290  * in documentation (online or textual) provided with the package.
21291  *
21292  * Redistribution and use in source and binary forms, with or without
21293  * modification, are permitted provided that the following conditions
21294  * are met:
21295  * 1. Redistributions of source code must retain the copyright
21296  *    notice, this list of conditions and the following disclaimer.
21297  * 2. Redistributions in binary form must reproduce the above copyright
21298  *    notice, this list of conditions and the following disclaimer in the
21299  *    documentation and/or other materials provided with the distribution.
21300  * 3. All advertising materials mentioning features or use of this software
21301  *    must display the following acknowledgement:
21302  *    "This product includes cryptographic software written by
21303  *     Eric Young (eay@cryptsoft.com)"
21304  *    The word 'cryptographic' can be left out if the rouines from the library
21305  *    being used are not cryptographic related :-).
21306  * 4. If you include any Windows specific code (or a derivative thereof) from
21307  *    the apps directory (application code) you must include an acknowledgement:
21308  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21309  *
21310  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21311  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21312  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21313  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21314  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21315  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21316  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21317  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21318  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21319  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21320  * SUCH DAMAGE.
21321  *
21322  * The licence and distribution terms for any publically available version or
21323  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21324  * copied and put under another distribution licence
21325  * [including the GNU Public Licence.]
21326  */
21327 # 66 "/usr/include/openssl/asn1.h" 2 3 4
21328 
21329 # 1 "/usr/include/openssl/stack.h" 1 3 4
21330 /* crypto/stack/stack.h */
21331 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21332  * All rights reserved.
21333  *
21334  * This package is an SSL implementation written
21335  * by Eric Young (eay@cryptsoft.com).
21336  * The implementation was written so as to conform with Netscapes SSL.
21337  *
21338  * This library is free for commercial and non-commercial use as long as
21339  * the following conditions are aheared to.  The following conditions
21340  * apply to all code found in this distribution, be it the RC4, RSA,
21341  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21342  * included with this distribution is covered by the same copyright terms
21343  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21344  *
21345  * Copyright remains Eric Young's, and as such any Copyright notices in
21346  * the code are not to be removed.
21347  * If this package is used in a product, Eric Young should be given attribution
21348  * as the author of the parts of the library used.
21349  * This can be in the form of a textual message at program startup or
21350  * in documentation (online or textual) provided with the package.
21351  *
21352  * Redistribution and use in source and binary forms, with or without
21353  * modification, are permitted provided that the following conditions
21354  * are met:
21355  * 1. Redistributions of source code must retain the copyright
21356  *    notice, this list of conditions and the following disclaimer.
21357  * 2. Redistributions in binary form must reproduce the above copyright
21358  *    notice, this list of conditions and the following disclaimer in the
21359  *    documentation and/or other materials provided with the distribution.
21360  * 3. All advertising materials mentioning features or use of this software
21361  *    must display the following acknowledgement:
21362  *    "This product includes cryptographic software written by
21363  *     Eric Young (eay@cryptsoft.com)"
21364  *    The word 'cryptographic' can be left out if the rouines from the library
21365  *    being used are not cryptographic related :-).
21366  * 4. If you include any Windows specific code (or a derivative thereof) from
21367  *    the apps directory (application code) you must include an acknowledgement:
21368  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21369  *
21370  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21371  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21372  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21373  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21374  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21375  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21376  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21377  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21378  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21379  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21380  * SUCH DAMAGE.
21381  *
21382  * The licence and distribution terms for any publically available version or
21383  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21384  * copied and put under another distribution licence
21385  * [including the GNU Public Licence.]
21386  */
21387 # 68 "/usr/include/openssl/asn1.h" 2 3 4
21388 # 1 "/usr/include/openssl/safestack.h" 1 3 4
21389 /* ====================================================================
21390  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
21391  *
21392  * Redistribution and use in source and binary forms, with or without
21393  * modification, are permitted provided that the following conditions
21394  * are met:
21395  *
21396  * 1. Redistributions of source code must retain the above copyright
21397  *    notice, this list of conditions and the following disclaimer.
21398  *
21399  * 2. Redistributions in binary form must reproduce the above copyright
21400  *    notice, this list of conditions and the following disclaimer in
21401  *    the documentation and/or other materials provided with the
21402  *    distribution.
21403  *
21404  * 3. All advertising materials mentioning features or use of this
21405  *    software must display the following acknowledgment:
21406  *    "This product includes software developed by the OpenSSL Project
21407  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21408  *
21409  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21410  *    endorse or promote products derived from this software without
21411  *    prior written permission. For written permission, please contact
21412  *    openssl-core@openssl.org.
21413  *
21414  * 5. Products derived from this software may not be called "OpenSSL"
21415  *    nor may "OpenSSL" appear in their names without prior written
21416  *    permission of the OpenSSL Project.
21417  *
21418  * 6. Redistributions of any form whatsoever must retain the following
21419  *    acknowledgment:
21420  *    "This product includes software developed by the OpenSSL Project
21421  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21422  *
21423  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21424  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21425  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21426  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21427  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21428  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21429  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21430  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21431  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21432  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21433  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21434  * OF THE POSSIBILITY OF SUCH DAMAGE.
21435  * ====================================================================
21436  *
21437  * This product includes cryptographic software written by Eric Young
21438  * (eay@cryptsoft.com).  This product includes software written by Tim
21439  * Hudson (tjh@cryptsoft.com).
21440  *
21441  */
21442 # 69 "/usr/include/openssl/asn1.h" 2 3 4
21443 
21444 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
21445 /* ====================================================================
21446  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
21447  *
21448  * Redistribution and use in source and binary forms, with or without
21449  * modification, are permitted provided that the following conditions
21450  * are met:
21451  *
21452  * 1. Redistributions of source code must retain the above copyright
21453  *    notice, this list of conditions and the following disclaimer.
21454  *
21455  * 2. Redistributions in binary form must reproduce the above copyright
21456  *    notice, this list of conditions and the following disclaimer in
21457  *    the documentation and/or other materials provided with the
21458  *    distribution.
21459  *
21460  * 3. All advertising materials mentioning features or use of this
21461  *    software must display the following acknowledgment:
21462  *    "This product includes software developed by the OpenSSL Project
21463  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21464  *
21465  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21466  *    endorse or promote products derived from this software without
21467  *    prior written permission. For written permission, please contact
21468  *    openssl-core@openssl.org.
21469  *
21470  * 5. Products derived from this software may not be called "OpenSSL"
21471  *    nor may "OpenSSL" appear in their names without prior written
21472  *    permission of the OpenSSL Project.
21473  *
21474  * 6. Redistributions of any form whatsoever must retain the following
21475  *    acknowledgment:
21476  *    "This product includes software developed by the OpenSSL Project
21477  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21478  *
21479  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21480  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21481  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21482  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21483  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21484  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21485  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21486  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21487  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21488  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21489  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21490  * OF THE POSSIBILITY OF SUCH DAMAGE.
21491  * ====================================================================
21492  *
21493  * This product includes cryptographic software written by Eric Young
21494  * (eay@cryptsoft.com).  This product includes software written by Tim
21495  * Hudson (tjh@cryptsoft.com).
21496  *
21497  */
21498 # 71 "/usr/include/openssl/asn1.h" 2 3 4
21499 
21500 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21501 /* ====================================================================
21502  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21503  *
21504  * Redistribution and use in source and binary forms, with or without
21505  * modification, are permitted provided that the following conditions
21506  * are met:
21507  *
21508  * 1. Redistributions of source code must retain the above copyright
21509  *    notice, this list of conditions and the following disclaimer.
21510  *
21511  * 2. Redistributions in binary form must reproduce the above copyright
21512  *    notice, this list of conditions and the following disclaimer in
21513  *    the documentation and/or other materials provided with the
21514  *    distribution.
21515  *
21516  * 3. All advertising materials mentioning features or use of this
21517  *    software must display the following acknowledgment:
21518  *    "This product includes software developed by the OpenSSL Project
21519  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21520  *
21521  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21522  *    endorse or promote products derived from this software without
21523  *    prior written permission. For written permission, please contact
21524  *    openssl-core@openssl.org.
21525  *
21526  * 5. Products derived from this software may not be called "OpenSSL"
21527  *    nor may "OpenSSL" appear in their names without prior written
21528  *    permission of the OpenSSL Project.
21529  *
21530  * 6. Redistributions of any form whatsoever must retain the following
21531  *    acknowledgment:
21532  *    "This product includes software developed by the OpenSSL Project
21533  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21534  *
21535  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21536  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21537  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21538  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21539  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21540  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21541  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21542  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21543  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21544  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21545  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21546  * OF THE POSSIBILITY OF SUCH DAMAGE.
21547  * ====================================================================
21548  *
21549  * This product includes cryptographic software written by Eric Young
21550  * (eay@cryptsoft.com).  This product includes software written by Tim
21551  * Hudson (tjh@cryptsoft.com).
21552  *
21553  */
21554 # 73 "/usr/include/openssl/asn1.h" 2 3 4
21555 
21556 # 1 "/usr/include/openssl/bn.h" 1 3 4
21557 /* crypto/bn/bn.h */
21558 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
21559  * All rights reserved.
21560  *
21561  * This package is an SSL implementation written
21562  * by Eric Young (eay@cryptsoft.com).
21563  * The implementation was written so as to conform with Netscapes SSL.
21564  *
21565  * This library is free for commercial and non-commercial use as long as
21566  * the following conditions are aheared to.  The following conditions
21567  * apply to all code found in this distribution, be it the RC4, RSA,
21568  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21569  * included with this distribution is covered by the same copyright terms
21570  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21571  *
21572  * Copyright remains Eric Young's, and as such any Copyright notices in
21573  * the code are not to be removed.
21574  * If this package is used in a product, Eric Young should be given attribution
21575  * as the author of the parts of the library used.
21576  * This can be in the form of a textual message at program startup or
21577  * in documentation (online or textual) provided with the package.
21578  *
21579  * Redistribution and use in source and binary forms, with or without
21580  * modification, are permitted provided that the following conditions
21581  * are met:
21582  * 1. Redistributions of source code must retain the copyright
21583  *    notice, this list of conditions and the following disclaimer.
21584  * 2. Redistributions in binary form must reproduce the above copyright
21585  *    notice, this list of conditions and the following disclaimer in the
21586  *    documentation and/or other materials provided with the distribution.
21587  * 3. All advertising materials mentioning features or use of this software
21588  *    must display the following acknowledgement:
21589  *    "This product includes cryptographic software written by
21590  *     Eric Young (eay@cryptsoft.com)"
21591  *    The word 'cryptographic' can be left out if the rouines from the library
21592  *    being used are not cryptographic related :-).
21593  * 4. If you include any Windows specific code (or a derivative thereof) from
21594  *    the apps directory (application code) you must include an acknowledgement:
21595  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21596  *
21597  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21598  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21599  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21600  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21601  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21602  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21603  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21604  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21605  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21606  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21607  * SUCH DAMAGE.
21608  *
21609  * The licence and distribution terms for any publically available version or
21610  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21611  * copied and put under another distribution licence
21612  * [including the GNU Public Licence.]
21613  */
21614 /* ====================================================================
21615  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
21616  *
21617  * Redistribution and use in source and binary forms, with or without
21618  * modification, are permitted provided that the following conditions
21619  * are met:
21620  *
21621  * 1. Redistributions of source code must retain the above copyright
21622  *    notice, this list of conditions and the following disclaimer.
21623  *
21624  * 2. Redistributions in binary form must reproduce the above copyright
21625  *    notice, this list of conditions and the following disclaimer in
21626  *    the documentation and/or other materials provided with the
21627  *    distribution.
21628  *
21629  * 3. All advertising materials mentioning features or use of this
21630  *    software must display the following acknowledgment:
21631  *    "This product includes software developed by the OpenSSL Project
21632  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21633  *
21634  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21635  *    endorse or promote products derived from this software without
21636  *    prior written permission. For written permission, please contact
21637  *    openssl-core@openssl.org.
21638  *
21639  * 5. Products derived from this software may not be called "OpenSSL"
21640  *    nor may "OpenSSL" appear in their names without prior written
21641  *    permission of the OpenSSL Project.
21642  *
21643  * 6. Redistributions of any form whatsoever must retain the following
21644  *    acknowledgment:
21645  *    "This product includes software developed by the OpenSSL Project
21646  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21647  *
21648  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21649  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21650  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21651  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21652  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21653  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21654  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21655  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21656  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21657  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21658  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21659  * OF THE POSSIBILITY OF SUCH DAMAGE.
21660  * ====================================================================
21661  *
21662  * This product includes cryptographic software written by Eric Young
21663  * (eay@cryptsoft.com).  This product includes software written by Tim
21664  * Hudson (tjh@cryptsoft.com).
21665  *
21666  */
21667 /* ====================================================================
21668  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21669  *
21670  * Portions of the attached software ("Contribution") are developed by
21671  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
21672  *
21673  * The Contribution is licensed pursuant to the Eric Young open source
21674  * license provided above.
21675  *
21676  * The binary polynomial arithmetic software is originally written by
21677  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
21678  *
21679  */
21680 
21681 
21682 
21683 
21684 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
21685 /*
21686  * CDDL HEADER START
21687  *
21688  * The contents of this file are subject to the terms of the
21689  * Common Development and Distribution License (the "License").
21690  * You may not use this file except in compliance with the License.
21691  *
21692  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21693  * or http://www.opensolaris.org/os/licensing.
21694  * See the License for the specific language governing permissions
21695  * and limitations under the License.
21696  *
21697  * When distributing Covered Code, include this CDDL HEADER in each
21698  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21699  * If applicable, add the following below this CDDL HEADER, with the
21700  * fields enclosed by brackets "[]" replaced with your own identifying
21701  * information: Portions Copyright [yyyy] [name of copyright owner]
21702  *
21703  * CDDL HEADER END
21704  */
21705 
21706 /*
21707  * Copyright (c) 2013 Gary Mills
21708  *
21709  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
21710  * Use is subject to license terms.
21711  */
21712 
21713 /*	Copyright (c) 1988 AT&T	*/
21714 /*	  All Rights Reserved  	*/
21715 # 129 "/usr/include/openssl/bn.h" 2 3 4
21716 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21717 /* e_os2.h */
21718 /* ====================================================================
21719  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21720  *
21721  * Redistribution and use in source and binary forms, with or without
21722  * modification, are permitted provided that the following conditions
21723  * are met:
21724  *
21725  * 1. Redistributions of source code must retain the above copyright
21726  *    notice, this list of conditions and the following disclaimer.
21727  *
21728  * 2. Redistributions in binary form must reproduce the above copyright
21729  *    notice, this list of conditions and the following disclaimer in
21730  *    the documentation and/or other materials provided with the
21731  *    distribution.
21732  *
21733  * 3. All advertising materials mentioning features or use of this
21734  *    software must display the following acknowledgment:
21735  *    "This product includes software developed by the OpenSSL Project
21736  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21737  *
21738  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21739  *    endorse or promote products derived from this software without
21740  *    prior written permission. For written permission, please contact
21741  *    openssl-core@openssl.org.
21742  *
21743  * 5. Products derived from this software may not be called "OpenSSL"
21744  *    nor may "OpenSSL" appear in their names without prior written
21745  *    permission of the OpenSSL Project.
21746  *
21747  * 6. Redistributions of any form whatsoever must retain the following
21748  *    acknowledgment:
21749  *    "This product includes software developed by the OpenSSL Project
21750  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21751  *
21752  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21753  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21754  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21755  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21756  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21757  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21758  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21759  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21760  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21761  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21762  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21763  * OF THE POSSIBILITY OF SUCH DAMAGE.
21764  * ====================================================================
21765  *
21766  * This product includes cryptographic software written by Eric Young
21767  * (eay@cryptsoft.com).  This product includes software written by Tim
21768  * Hudson (tjh@cryptsoft.com).
21769  *
21770  */
21771 
21772 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21773 /* opensslconf.h */
21774 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21775 
21776 
21777 
21778 
21779 /* OpenSSL was configured with the following options: */
21780 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21781 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21782    asks for it.  This is a transient feature that is provided for those
21783    who haven't had the time to do the appropriate changes in their
21784    applications.  */
21785 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21786 /* crypto/opensslconf.h.in */
21787 
21788 /* Generate 80386 code? */
21789 # 272 "/usr/include/openssl/opensslconf.h" 3 4
21790 /*
21791  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
21792  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
21793  */
21794 
21795 
21796 
21797 
21798 
21799 
21800 /* Should we define BN_DIV2W here? */
21801 
21802 /* Only one for the following should be defined */
21803 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21804 # 130 "/usr/include/openssl/bn.h" 2 3 4
21805 
21806 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
21807 /*
21808  * CDDL HEADER START
21809  *
21810  * The contents of this file are subject to the terms of the
21811  * Common Development and Distribution License (the "License").
21812  * You may not use this file except in compliance with the License.
21813  *
21814  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21815  * or http://www.opensolaris.org/os/licensing.
21816  * See the License for the specific language governing permissions
21817  * and limitations under the License.
21818  *
21819  * When distributing Covered Code, include this CDDL HEADER in each
21820  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21821  * If applicable, add the following below this CDDL HEADER, with the
21822  * fields enclosed by brackets "[]" replaced with your own identifying
21823  * information: Portions Copyright [yyyy] [name of copyright owner]
21824  *
21825  * CDDL HEADER END
21826  */
21827 
21828 /*
21829  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21830  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
21831  */
21832 
21833 /*	Copyright (c) 1988 AT&T	*/
21834 /*	  All Rights Reserved  	*/
21835 
21836 /*
21837  * User-visible pieces of the ANSI C standard I/O package.
21838  */
21839 # 132 "/usr/include/openssl/bn.h" 2 3 4
21840 
21841 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21842 /* ====================================================================
21843  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21844  *
21845  * Redistribution and use in source and binary forms, with or without
21846  * modification, are permitted provided that the following conditions
21847  * are met:
21848  *
21849  * 1. Redistributions of source code must retain the above copyright
21850  *    notice, this list of conditions and the following disclaimer.
21851  *
21852  * 2. Redistributions in binary form must reproduce the above copyright
21853  *    notice, this list of conditions and the following disclaimer in
21854  *    the documentation and/or other materials provided with the
21855  *    distribution.
21856  *
21857  * 3. All advertising materials mentioning features or use of this
21858  *    software must display the following acknowledgment:
21859  *    "This product includes software developed by the OpenSSL Project
21860  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21861  *
21862  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21863  *    endorse or promote products derived from this software without
21864  *    prior written permission. For written permission, please contact
21865  *    openssl-core@openssl.org.
21866  *
21867  * 5. Products derived from this software may not be called "OpenSSL"
21868  *    nor may "OpenSSL" appear in their names without prior written
21869  *    permission of the OpenSSL Project.
21870  *
21871  * 6. Redistributions of any form whatsoever must retain the following
21872  *    acknowledgment:
21873  *    "This product includes software developed by the OpenSSL Project
21874  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21875  *
21876  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21877  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21878  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21879  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21880  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21881  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21882  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21883  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21884  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21885  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21886  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21887  * OF THE POSSIBILITY OF SUCH DAMAGE.
21888  * ====================================================================
21889  *
21890  * This product includes cryptographic software written by Eric Young
21891  * (eay@cryptsoft.com).  This product includes software written by Tim
21892  * Hudson (tjh@cryptsoft.com).
21893  *
21894  */
21895 # 134 "/usr/include/openssl/bn.h" 2 3 4
21896 # 1 "/usr/include/openssl/crypto.h" 1 3 4
21897 /* crypto/crypto.h */
21898 /* ====================================================================
21899  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
21900  *
21901  * Redistribution and use in source and binary forms, with or without
21902  * modification, are permitted provided that the following conditions
21903  * are met:
21904  *
21905  * 1. Redistributions of source code must retain the above copyright
21906  *    notice, this list of conditions and the following disclaimer.
21907  *
21908  * 2. Redistributions in binary form must reproduce the above copyright
21909  *    notice, this list of conditions and the following disclaimer in
21910  *    the documentation and/or other materials provided with the
21911  *    distribution.
21912  *
21913  * 3. All advertising materials mentioning features or use of this
21914  *    software must display the following acknowledgment:
21915  *    "This product includes software developed by the OpenSSL Project
21916  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21917  *
21918  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21919  *    endorse or promote products derived from this software without
21920  *    prior written permission. For written permission, please contact
21921  *    openssl-core@openssl.org.
21922  *
21923  * 5. Products derived from this software may not be called "OpenSSL"
21924  *    nor may "OpenSSL" appear in their names without prior written
21925  *    permission of the OpenSSL Project.
21926  *
21927  * 6. Redistributions of any form whatsoever must retain the following
21928  *    acknowledgment:
21929  *    "This product includes software developed by the OpenSSL Project
21930  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21931  *
21932  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21933  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21934  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21935  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21936  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21937  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21938  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21939  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21940  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21941  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21942  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21943  * OF THE POSSIBILITY OF SUCH DAMAGE.
21944  * ====================================================================
21945  *
21946  * This product includes cryptographic software written by Eric Young
21947  * (eay@cryptsoft.com).  This product includes software written by Tim
21948  * Hudson (tjh@cryptsoft.com).
21949  *
21950  */
21951 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21952  * All rights reserved.
21953  *
21954  * This package is an SSL implementation written
21955  * by Eric Young (eay@cryptsoft.com).
21956  * The implementation was written so as to conform with Netscapes SSL.
21957  *
21958  * This library is free for commercial and non-commercial use as long as
21959  * the following conditions are aheared to.  The following conditions
21960  * apply to all code found in this distribution, be it the RC4, RSA,
21961  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21962  * included with this distribution is covered by the same copyright terms
21963  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21964  *
21965  * Copyright remains Eric Young's, and as such any Copyright notices in
21966  * the code are not to be removed.
21967  * If this package is used in a product, Eric Young should be given attribution
21968  * as the author of the parts of the library used.
21969  * This can be in the form of a textual message at program startup or
21970  * in documentation (online or textual) provided with the package.
21971  *
21972  * Redistribution and use in source and binary forms, with or without
21973  * modification, are permitted provided that the following conditions
21974  * are met:
21975  * 1. Redistributions of source code must retain the copyright
21976  *    notice, this list of conditions and the following disclaimer.
21977  * 2. Redistributions in binary form must reproduce the above copyright
21978  *    notice, this list of conditions and the following disclaimer in the
21979  *    documentation and/or other materials provided with the distribution.
21980  * 3. All advertising materials mentioning features or use of this software
21981  *    must display the following acknowledgement:
21982  *    "This product includes cryptographic software written by
21983  *     Eric Young (eay@cryptsoft.com)"
21984  *    The word 'cryptographic' can be left out if the rouines from the library
21985  *    being used are not cryptographic related :-).
21986  * 4. If you include any Windows specific code (or a derivative thereof) from
21987  *    the apps directory (application code) you must include an acknowledgement:
21988  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21989  *
21990  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21991  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21992  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21993  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21994  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21995  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21996  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21997  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21998  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21999  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22000  * SUCH DAMAGE.
22001  *
22002  * The licence and distribution terms for any publically available version or
22003  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22004  * copied and put under another distribution licence
22005  * [including the GNU Public Licence.]
22006  */
22007 /* ====================================================================
22008  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
22009  * ECDH support in OpenSSL originally developed by
22010  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
22011  */
22012 # 135 "/usr/include/openssl/bn.h" 2 3 4
22013 
22014 
22015 
22016 
22017 
22018 /*
22019  * These preprocessor symbols control various aspects of the bignum headers
22020  * and library code. They're not defined by any "normal" configuration, as
22021  * they are intended for development and testing purposes. NB: defining all
22022  * three can be useful for debugging application code as well as openssl
22023  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
22024  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
22025  * mismanagement of bignum internals. You must also define BN_DEBUG.
22026  */
22027 /* #define BN_DEBUG */
22028 /* #define BN_DEBUG_RAND */
22029 
22030 
22031 
22032 
22033 
22034 
22035 
22036 /*
22037  * This next option uses the C libraries (2 word)/(1 word) function. If it is
22038  * not defined, I use my C version (which is slower). The reason for this
22039  * flag is that when the particular C compiler library routine is used, and
22040  * the library is linked with a different compiler, the library is missing.
22041  * This mostly happens when the library is built with gcc and then linked
22042  * using normal cc.  This would be a common occurrence because gcc normally
22043  * produces code that is 2 times faster than system compilers for the big
22044  * number stuff. For machines with only one compiler (or shared libraries),
22045  * this should be on.  Again this in only really a problem on machines using
22046  * "long long's", are 32bit, and are not using my assembler code.
22047  */
22048 
22049 
22050 
22051 
22052 
22053 
22054 
22055 /*
22056  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
22057  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
22058  */
22059 # 203 "/usr/include/openssl/bn.h" 3 4
22060 /*
22061  * This is where the long long data type is 64 bits, but long is 32. For
22062  * machines where there are 64bit registers, this is the mode to use. IRIX,
22063  * on R4000 and above should use this mode, along with the relevant assembler
22064  * code :-).  Do NOT define BN_LLONG.
22065  */
22066 # 265 "/usr/include/openssl/bn.h" 3 4
22067 /*
22068  * avoid leaking exponent information through timing,
22069  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
22070  * BN_div() will call BN_div_no_branch,
22071  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
22072  */
22073 # 284 "/usr/include/openssl/bn.h" 3 4
22074                                        /* used for debuging */
22075 
22076 
22077 
22078 
22079 /*
22080  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
22081  * two BIGNUMs cannot not be used in parallel!)
22082  */
22083 # 302 "/usr/include/openssl/bn.h" 3 4
22084 /* Already declared in ossl_typ.h */
22085 # 313 "/usr/include/openssl/bn.h" 3 4
22086 struct bignum_st {
22087     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
22088                                  * chunks. */
22089     int top; /* Index of last used d +1. */
22090     /* The next are internal book keeping for bn_expand. */
22091     int dmax; /* Size of the d array. */
22092     int neg; /* one if the number is negative */
22093     int flags;
22094 };
22095 
22096 /* Used for montgomery multiplication */
22097 struct bn_mont_ctx_st {
22098     int ri; /* number of bits in R */
22099     BIGNUM RR; /* used to convert to montgomery form */
22100     BIGNUM N; /* The modulus */
22101     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
22102                                  * stored for bignum algorithm) */
22103     unsigned int n0[2]; /* least significant word(s) of Ni; (type
22104                                  * changed with 0.9.9, was "BN_ULONG n0;"
22105                                  * before) */
22106     int flags;
22107 };
22108 
22109 /*
22110  * Used for reciprocal division/mod functions It cannot be shared between
22111  * threads
22112  */
22113 struct bn_recp_ctx_st {
22114     BIGNUM N; /* the divisor */
22115     BIGNUM Nr; /* the reciprocal */
22116     int num_bits;
22117     int shift;
22118     int flags;
22119 };
22120 
22121 /* Used for slow "generation" functions. */
22122 struct bn_gencb_st {
22123     unsigned int ver; /* To handle binary (in)compatibility */
22124     void *arg; /* callback-specific data */
22125     union {
22126         /* if(ver==1) - handles old style callbacks */
22127         void (*cb_1) (int, int, void *);
22128         /* if(ver==2) - new callback style */
22129         int (*cb_2) (int, int, BN_GENCB *);
22130     } cb;
22131 };
22132 /* Wrapper function to make using BN_GENCB easier,  */
22133 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
22134 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
22135 
22136 
22137 
22138 
22139 
22140 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
22141 # 377 "/usr/include/openssl/bn.h" 3 4
22142 /*
22143  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
22144  * that will be done for checking that a random number is probably prime. The
22145  * error rate for accepting a composite number as prime depends on the size of
22146  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
22147  * and so the level is what you would expect for a key of double the size of the
22148  * prime.
22149  *
22150  * This table is generated using the algorithm of FIPS PUB 186-4
22151  * Digital Signature Standard (DSS), section F.1, page 117.
22152  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
22153  *
22154  * The following magma script was used to generate the output:
22155  * securitybits:=125;
22156  * k:=1024;
22157  * for t:=1 to 65 do
22158  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
22159  *     S:=0;
22160  *     // Sum over m
22161  *     for m:=3 to M do
22162  *       s:=0;
22163  *       // Sum over j
22164  *       for j:=2 to m do
22165  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
22166  *       end for;
22167  *       S+:=2^(m-(m-1)*t)*s;
22168  *     end for;
22169  *     A:=2^(k-2-M*t);
22170  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
22171  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
22172  *     seclevel:=Floor(-Log(2,pkt));
22173  *     if seclevel ge securitybits then
22174  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
22175  *       break;
22176  *     end if;
22177  *   end for;
22178  *   if seclevel ge securitybits then break; end if;
22179  * end for;
22180  *
22181  * It can be run online at:
22182  * http://magma.maths.usyd.edu.au/calc
22183  *
22184  * And will output:
22185  * k:  1024, security: 129 bits  (t: 6, M: 23)
22186  *
22187  * k is the number of bits of the prime, securitybits is the level we want to
22188  * reach.
22189  *
22190  * prime length | RSA key size | # MR tests | security level
22191  * -------------+--------------|------------+---------------
22192  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
22193  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
22194  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
22195  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
22196  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
22197  *  (b) >=  476 |     >=   952 |          5 |         80 bit
22198  *  (b) >=  400 |     >=   800 |          6 |         80 bit
22199  *  (b) >=  347 |     >=   694 |          7 |         80 bit
22200  *  (b) >=  308 |     >=   616 |          8 |         80 bit
22201  *  (b) >=   55 |     >=   110 |         27 |         64 bit
22202  *  (b) >=    6 |     >=    12 |         34 |         64 bit
22203  */
22204 # 451 "/usr/include/openssl/bn.h" 3 4
22205 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
22206 # 472 "/usr/include/openssl/bn.h" 3 4
22207 const BIGNUM *BN_value_one(void);
22208 char *BN_options(void);
22209 BN_CTX *BN_CTX_new(void);
22210 
22211 void BN_CTX_init(BN_CTX *c);
22212 
22213 void BN_CTX_free(BN_CTX *c);
22214 void BN_CTX_start(BN_CTX *ctx);
22215 BIGNUM *BN_CTX_get(BN_CTX *ctx);
22216 void BN_CTX_end(BN_CTX *ctx);
22217 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
22218 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
22219 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
22220 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
22221 int BN_num_bits(const BIGNUM *a);
22222 int BN_num_bits_word(unsigned int);
22223 BIGNUM *BN_new(void);
22224 void BN_init(BIGNUM *);
22225 void BN_clear_free(BIGNUM *a);
22226 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
22227 void BN_swap(BIGNUM *a, BIGNUM *b);
22228 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
22229 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
22230 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
22231 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
22232 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
22233 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
22234 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
22235 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
22236 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
22237 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
22238 /** BN_set_negative sets sign of a BIGNUM
22239  * \param  b  pointer to the BIGNUM object
22240  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
22241  */
22242 void BN_set_negative(BIGNUM *b, int n);
22243 /** BN_is_negative returns 1 if the BIGNUM is negative
22244  * \param  a  pointer to the BIGNUM object
22245  * \return 1 if a < 0 and 0 otherwise
22246  */
22247 
22248 
22249 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
22250            BN_CTX *ctx);
22251 
22252 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
22253 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
22254                BN_CTX *ctx);
22255 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22256                      const BIGNUM *m);
22257 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
22258                BN_CTX *ctx);
22259 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22260                      const BIGNUM *m);
22261 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
22262                BN_CTX *ctx);
22263 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
22264 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
22265 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
22266 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
22267                   BN_CTX *ctx);
22268 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
22269 
22270 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
22271 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
22272 int BN_mul_word(BIGNUM *a, unsigned int w);
22273 int BN_add_word(BIGNUM *a, unsigned int w);
22274 int BN_sub_word(BIGNUM *a, unsigned int w);
22275 int BN_set_word(BIGNUM *a, unsigned int w);
22276 unsigned int BN_get_word(const BIGNUM *a);
22277 
22278 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
22279 void BN_free(BIGNUM *a);
22280 int BN_is_bit_set(const BIGNUM *a, int n);
22281 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
22282 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
22283 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22284 
22285 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
22286                const BIGNUM *m, BN_CTX *ctx);
22287 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
22288                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
22289 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
22290                               const BIGNUM *m, BN_CTX *ctx,
22291                               BN_MONT_CTX *in_mont);
22292 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
22293                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
22294 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
22295                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
22296                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
22297 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
22298                       const BIGNUM *m, BN_CTX *ctx);
22299 
22300 int BN_mask_bits(BIGNUM *a, int n);
22301 
22302 int BN_print_fp(FILE *fp, const BIGNUM *a);
22303 
22304 
22305 int BN_print(BIO *fp, const BIGNUM *a);
22306 
22307 
22308 
22309 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
22310 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
22311 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
22312 void BN_clear(BIGNUM *a);
22313 BIGNUM *BN_dup(const BIGNUM *a);
22314 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
22315 int BN_set_bit(BIGNUM *a, int n);
22316 int BN_clear_bit(BIGNUM *a, int n);
22317 char *BN_bn2hex(const BIGNUM *a);
22318 char *BN_bn2dec(const BIGNUM *a);
22319 int BN_hex2bn(BIGNUM **a, const char *str);
22320 int BN_dec2bn(BIGNUM **a, const char *str);
22321 int BN_asc2bn(BIGNUM **a, const char *str);
22322 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
22323 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
22324                                                                   * -2 for
22325                                                                   * error */
22326 BIGNUM *BN_mod_inverse(BIGNUM *ret,
22327                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
22328 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
22329                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
22330 
22331 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
22332 
22333 /* Deprecated versions */
22334 
22335 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
22336                           const BIGNUM *add, const BIGNUM *rem,
22337                           void (*callback) (int, int, void *), void *cb_arg);
22338 int BN_is_prime(const BIGNUM *p, int nchecks,
22339                 void (*callback) (int, int, void *),
22340                 BN_CTX *ctx, void *cb_arg);
22341 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
22342                          void (*callback) (int, int, void *), BN_CTX *ctx,
22343                          void *cb_arg, int do_trial_division);
22344 
22345 
22346 /* Newer versions */
22347 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
22348                          const BIGNUM *rem, BN_GENCB *cb);
22349 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
22350 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
22351                             int do_trial_division, BN_GENCB *cb);
22352 
22353 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
22354 
22355 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
22356                             const BIGNUM *Xp, const BIGNUM *Xp1,
22357                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
22358                             BN_GENCB *cb);
22359 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
22360                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
22361                               BN_CTX *ctx, BN_GENCB *cb);
22362 
22363 BN_MONT_CTX *BN_MONT_CTX_new(void);
22364 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
22365 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22366                           BN_MONT_CTX *mont, BN_CTX *ctx);
22367 
22368 
22369 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
22370                        BN_MONT_CTX *mont, BN_CTX *ctx);
22371 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
22372 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
22373 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
22374 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
22375                                     const BIGNUM *mod, BN_CTX *ctx);
22376 
22377 /* BN_BLINDING flags */
22378 
22379 
22380 
22381 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
22382 void BN_BLINDING_free(BN_BLINDING *b);
22383 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
22384 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
22385 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
22386 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
22387 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
22388                           BN_CTX *);
22389 
22390 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
22391 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
22392 
22393 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
22394 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
22395 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
22396 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
22397                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
22398                                       int (*bn_mod_exp) (BIGNUM *r,
22399                                                          const BIGNUM *a,
22400                                                          const BIGNUM *p,
22401                                                          const BIGNUM *m,
22402                                                          BN_CTX *ctx,
22403                                                          BN_MONT_CTX *m_ctx),
22404                                       BN_MONT_CTX *m_ctx);
22405 
22406 
22407 void BN_set_params(int mul, int high, int low, int mont);
22408 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
22409 
22410 
22411 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
22412 BN_RECP_CTX *BN_RECP_CTX_new(void);
22413 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
22414 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
22415 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
22416                           BN_RECP_CTX *recp, BN_CTX *ctx);
22417 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
22418                     const BIGNUM *m, BN_CTX *ctx);
22419 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
22420                 BN_RECP_CTX *recp, BN_CTX *ctx);
22421 
22422 
22423 
22424 /*
22425  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
22426  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
22427  * ignored. Note that input arguments are not const so that their bit arrays
22428  * can be expanded to the appropriate size if needed.
22429  */
22430 
22431 /*
22432  * r = a + b
22433  */
22434 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
22435 
22436 /*
22437  * r=a mod p
22438  */
22439 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
22440 /* r = (a * b) mod p */
22441 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22442                     const BIGNUM *p, BN_CTX *ctx);
22443 /* r = (a * a) mod p */
22444 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22445 /* r = (1 / b) mod p */
22446 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
22447 /* r = (a / b) mod p */
22448 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22449                     const BIGNUM *p, BN_CTX *ctx);
22450 /* r = (a ^ b) mod p */
22451 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22452                     const BIGNUM *p, BN_CTX *ctx);
22453 /* r = sqrt(a) mod p */
22454 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
22455                      BN_CTX *ctx);
22456 /* r^2 + r = a mod p */
22457 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
22458                            BN_CTX *ctx);
22459 
22460 /*-
22461  * Some functions allow for representation of the irreducible polynomials
22462  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
22463  *     t^p[0] + t^p[1] + ... + t^p[k]
22464  * where m = p[0] > p[1] > ... > p[k] = 0.
22465  */
22466 /* r = a mod p */
22467 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
22468 /* r = (a * b) mod p */
22469 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22470                         const int p[], BN_CTX *ctx);
22471 /* r = (a * a) mod p */
22472 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
22473                         BN_CTX *ctx);
22474 /* r = (1 / b) mod p */
22475 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
22476                         BN_CTX *ctx);
22477 /* r = (a / b) mod p */
22478 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22479                         const int p[], BN_CTX *ctx);
22480 /* r = (a ^ b) mod p */
22481 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
22482                         const int p[], BN_CTX *ctx);
22483 /* r = sqrt(a) mod p */
22484 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
22485                          const int p[], BN_CTX *ctx);
22486 /* r^2 + r = a mod p */
22487 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
22488                                const int p[], BN_CTX *ctx);
22489 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
22490 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
22491 
22492 
22493 
22494 /*
22495  * faster mod functions for the 'NIST primes' 0 <= a < p^2
22496  */
22497 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22498 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22499 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22500 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22501 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
22502 
22503 const BIGNUM *BN_get0_nist_prime_192(void);
22504 const BIGNUM *BN_get0_nist_prime_224(void);
22505 const BIGNUM *BN_get0_nist_prime_256(void);
22506 const BIGNUM *BN_get0_nist_prime_384(void);
22507 const BIGNUM *BN_get0_nist_prime_521(void);
22508 
22509 /* library internal functions */
22510 # 788 "/usr/include/openssl/bn.h" 3 4
22511 BIGNUM *bn_expand2(BIGNUM *a, int words);
22512 
22513 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
22514 
22515 
22516 /*-
22517  * Bignum consistency macros
22518  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
22519  * bignum data after direct manipulations on the data. There is also an
22520  * "internal" macro, bn_check_top(), for verifying that there are no leading
22521  * zeroes. Unfortunately, some auditing is required due to the fact that
22522  * bn_fix_top() has become an overabused duct-tape because bignum data is
22523  * occasionally passed around in an inconsistent state. So the following
22524  * changes have been made to sort this out;
22525  * - bn_fix_top()s implementation has been moved to bn_correct_top()
22526  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
22527  *   bn_check_top() is as before.
22528  * - if BN_DEBUG *is* defined;
22529  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
22530  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
22531  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
22532  * The idea is to have debug builds flag up inconsistent bignums when they
22533  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
22534  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
22535  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
22536  * was not appropriate, we convert it permanently to bn_check_top() and track
22537  * down the cause of the bug. Eventually, no internal code should be using the
22538  * bn_fix_top() macro. External applications and libraries should try this with
22539  * their own code too, both in terms of building against the openssl headers
22540  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
22541  * defined. This not only improves external code, it provides more test
22542  * coverage for openssl's own code.
22543  */
22544 # 914 "/usr/include/openssl/bn.h" 3 4
22545 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
22546                           unsigned int w);
22547 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
22548 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
22549 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
22550 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
22551                       int num);
22552 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
22553                       int num);
22554 
22555 /* Primes from RFC 2409 */
22556 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
22557 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
22558 
22559 /* Primes from RFC 3526 */
22560 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
22561 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
22562 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
22563 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
22564 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
22565 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
22566 
22567 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
22568 
22569 /* BEGIN ERROR CODES */
22570 /*
22571  * The following lines are auto generated by the script mkerr.pl. Any changes
22572  * made after this point may be overwritten when the script is next run.
22573  */
22574 void ERR_load_BN_strings(void);
22575 
22576 /* Error codes for the BN functions. */
22577 
22578 /* Function codes. */
22579 # 991 "/usr/include/openssl/bn.h" 3 4
22580 /* Reason codes. */
22581 # 75 "/usr/include/openssl/asn1.h" 2 3 4
22582 # 132 "/usr/include/openssl/asn1.h" 3 4
22583 /* For use with d2i_ASN1_type_bytes() */
22584 # 152 "/usr/include/openssl/asn1.h" 3 4
22585 /* For use with ASN1_mbstring_copy() */
22586 # 161 "/usr/include/openssl/asn1.h" 3 4
22587     struct X509_algor_st;
22588 struct stack_st_X509_ALGOR { _STACK stack; };
22589 
22590 
22591 
22592 
22593 /*
22594  * We MUST make sure that, except for constness, asn1_ctx_st and
22595  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
22596  * parsing macros are gone, we can throw this away as well...
22597  */
22598 typedef struct asn1_ctx_st {
22599     unsigned char *p; /* work char pointer */
22600     int eos; /* end of sequence read for indefinite
22601                                  * encoding */
22602     int error; /* error code to use when returning an error */
22603     int inf; /* constructed if 0x20, indefinite is 0x21 */
22604     int tag; /* tag from last 'get object' */
22605     int xclass; /* class from last 'get object' */
22606     long slen; /* length of last 'get object' */
22607     unsigned char *max; /* largest value of p allowed */
22608     unsigned char *q; /* temporary variable */
22609     unsigned char **pp; /* variable */
22610     int line; /* used in error processing */
22611 } ASN1_CTX;
22612 
22613 typedef struct asn1_const_ctx_st {
22614     const unsigned char *p; /* work char pointer */
22615     int eos; /* end of sequence read for indefinite
22616                                  * encoding */
22617     int error; /* error code to use when returning an error */
22618     int inf; /* constructed if 0x20, indefinite is 0x21 */
22619     int tag; /* tag from last 'get object' */
22620     int xclass; /* class from last 'get object' */
22621     long slen; /* length of last 'get object' */
22622     const unsigned char *max; /* largest value of p allowed */
22623     const unsigned char *q; /* temporary variable */
22624     const unsigned char **pp; /* variable */
22625     int line; /* used in error processing */
22626 } ASN1_const_CTX;
22627 
22628 /*
22629  * These are used internally in the ASN1_OBJECT to keep track of whether the
22630  * names and data need to be free()ed
22631  */
22632 
22633 
22634 
22635 
22636 struct asn1_object_st {
22637     const char *sn, *ln;
22638     int nid;
22639     int length;
22640     const unsigned char *data; /* data remains const after init */
22641     int flags; /* Should we free this one */
22642 };
22643 
22644 
22645 /*
22646  * This indicates that the ASN1_STRING is not a real value but just a place
22647  * holder for the location where indefinite length constructed data should be
22648  * inserted in the memory buffer
22649  */
22650 
22651 
22652 /*
22653  * This flag is used by the CMS code to indicate that a string is not
22654  * complete and is a place holder for content when it had all been accessed.
22655  * The flag will be reset when content has been written to it.
22656  */
22657 
22658 
22659 /*
22660  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
22661  * type.
22662  */
22663 
22664 /* This is the base type that holds just about everything :-) */
22665 struct asn1_string_st {
22666     int length;
22667     int type;
22668     unsigned char *data;
22669     /*
22670      * The value of the following field depends on the type being held.  It
22671      * is mostly being used for BIT_STRING so if the input data has a
22672      * non-zero 'unused bits' value, it will be handled correctly
22673      */
22674     long flags;
22675 };
22676 
22677 /*
22678  * ASN1_ENCODING structure: this is used to save the received encoding of an
22679  * ASN1 type. This is useful to get round problems with invalid encodings
22680  * which can break signatures.
22681  */
22682 
22683 typedef struct ASN1_ENCODING_st {
22684     unsigned char *enc; /* DER encoding */
22685     long len; /* Length of encoding */
22686     int modified; /* set to 1 if 'enc' is invalid */
22687 } ASN1_ENCODING;
22688 
22689 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
22690 # 272 "/usr/include/openssl/asn1.h" 3 4
22691 typedef struct asn1_string_table_st {
22692     int nid;
22693     long minsize;
22694     long maxsize;
22695     unsigned long mask;
22696     unsigned long flags;
22697 } ASN1_STRING_TABLE;
22698 
22699 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
22700 
22701 /* size limits: this stuff is taken straight from RFC2459 */
22702 # 293 "/usr/include/openssl/asn1.h" 3 4
22703 /*
22704  * Declarations for template structures: for full definitions see asn1t.h
22705  */
22706 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
22707 typedef struct ASN1_TLC_st ASN1_TLC;
22708 /* This is just an opaque pointer */
22709 typedef struct ASN1_VALUE_st ASN1_VALUE;
22710 
22711 /* Declare ASN1 functions: the implement macro in in asn1t.h */
22712 # 363 "/usr/include/openssl/asn1.h" 3 4
22713 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
22714 
22715 /*-
22716  * The following macros and typedefs allow an ASN1_ITEM
22717  * to be embedded in a structure and referenced. Since
22718  * the ASN1_ITEM pointers need to be globally accessible
22719  * (possibly from shared libraries) they may exist in
22720  * different forms. On platforms that support it the
22721  * ASN1_ITEM structure itself will be globally exported.
22722  * Other platforms will export a function that returns
22723  * an ASN1_ITEM pointer.
22724  *
22725  * To handle both cases transparently the macros below
22726  * should be used instead of hard coding an ASN1_ITEM
22727  * pointer in a structure.
22728  *
22729  * The structure will look like this:
22730  *
22731  * typedef struct SOMETHING_st {
22732  *      ...
22733  *      ASN1_ITEM_EXP *iptr;
22734  *      ...
22735  * } SOMETHING;
22736  *
22737  * It would be initialised as e.g.:
22738  *
22739  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
22740  *
22741  * and the actual pointer extracted with:
22742  *
22743  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
22744  *
22745  * Finally an ASN1_ITEM pointer can be extracted from an
22746  * appropriate reference with: ASN1_ITEM_rptr(X509). This
22747  * would be used when a function takes an ASN1_ITEM * argument.
22748  *
22749  */
22750 
22751 
22752 
22753 /* ASN1_ITEM pointer exported type */
22754 typedef const ASN1_ITEM ASN1_ITEM_EXP;
22755 
22756 /* Macro to obtain ASN1_ITEM pointer from exported type */
22757 
22758 
22759 /* Macro to include ASN1_ITEM pointer from base type */
22760 # 440 "/usr/include/openssl/asn1.h" 3 4
22761 /* Parameters used by ASN1_STRING_print_ex() */
22762 
22763 /*
22764  * These determine which characters to escape: RFC2253 special characters,
22765  * control characters and MSB set characters
22766  */
22767 
22768 
22769 
22770 
22771 
22772 /*
22773  * This flag determines how we do escaping: normally RC2253 backslash only,
22774  * set this to use backslash and quote.
22775  */
22776 
22777 
22778 
22779 /* These three flags are internal use only. */
22780 
22781 /* Character is a valid PrintableString character */
22782 
22783 /* Character needs escaping if it is the first character */
22784 
22785 /* Character needs escaping if it is the last character */
22786 
22787 
22788 /*
22789  * NB the internal flags are safely reused below by flags handled at the top
22790  * level.
22791  */
22792 
22793 /*
22794  * If this is set we convert all character strings to UTF8 first
22795  */
22796 
22797 
22798 
22799 /*
22800  * If this is set we don't attempt to interpret content: just assume all
22801  * strings are 1 byte per character. This will produce some pretty odd
22802  * looking output!
22803  */
22804 
22805 
22806 
22807 /* If this is set we include the string type in the output */
22808 
22809 
22810 /*
22811  * This determines which strings to display and which to 'dump' (hex dump of
22812  * content octets or DER encoding). We can only dump non character strings or
22813  * everything. If we don't dump 'unknown' they are interpreted as character
22814  * strings with 1 octet per character and are subject to the usual escaping
22815  * options.
22816  */
22817 
22818 
22819 
22820 
22821 /*
22822  * These determine what 'dumping' does, we can dump the content octets or the
22823  * DER encoding: both use the RFC2253 #XXXXX notation.
22824  */
22825 
22826 
22827 
22828 /*
22829  * All the string flags consistent with RFC2253, escaping control characters
22830  * isn't essential in RFC2253 but it is advisable anyway.
22831  */
22832 # 519 "/usr/include/openssl/asn1.h" 3 4
22833 struct stack_st_ASN1_INTEGER { _STACK stack; };
22834 
22835 
22836 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
22837 
22838 typedef struct asn1_type_st {
22839     int type;
22840     union {
22841         char *ptr;
22842         ASN1_BOOLEAN boolean;
22843         ASN1_STRING *asn1_string;
22844         ASN1_OBJECT *object;
22845         ASN1_INTEGER *integer;
22846         ASN1_ENUMERATED *enumerated;
22847         ASN1_BIT_STRING *bit_string;
22848         ASN1_OCTET_STRING *octet_string;
22849         ASN1_PRINTABLESTRING *printablestring;
22850         ASN1_T61STRING *t61string;
22851         ASN1_IA5STRING *ia5string;
22852         ASN1_GENERALSTRING *generalstring;
22853         ASN1_BMPSTRING *bmpstring;
22854         ASN1_UNIVERSALSTRING *universalstring;
22855         ASN1_UTCTIME *utctime;
22856         ASN1_GENERALIZEDTIME *generalizedtime;
22857         ASN1_VISIBLESTRING *visiblestring;
22858         ASN1_UTF8STRING *utf8string;
22859         /*
22860          * set and sequence are left complete and still contain the set or
22861          * sequence bytes
22862          */
22863         ASN1_STRING *set;
22864         ASN1_STRING *sequence;
22865         ASN1_VALUE *asn1_value;
22866     } value;
22867 } ASN1_TYPE;
22868 
22869 struct stack_st_ASN1_TYPE { _STACK stack; };
22870 
22871 
22872 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
22873 
22874 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;
22875 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;
22876 
22877 typedef struct NETSCAPE_X509_st {
22878     ASN1_OCTET_STRING *header;
22879     X509 *cert;
22880 } NETSCAPE_X509;
22881 
22882 /* This is used to contain a list of bit names */
22883 typedef struct BIT_STRING_BITNAME_st {
22884     int bitnum;
22885     const char *lname;
22886     const char *sname;
22887 } BIT_STRING_BITNAME;
22888 
22889 
22890 
22891 
22892 
22893 
22894 /* Macros for string operations */
22895 # 772 "/usr/include/openssl/asn1.h" 3 4
22896   /* for the is_set parameter to i2d_ASN1_SET */
22897 
22898 
22899 
22900 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;
22901 
22902 int ASN1_TYPE_get(ASN1_TYPE *a);
22903 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
22904 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
22905 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
22906 
22907 ASN1_OBJECT *ASN1_OBJECT_new(void);
22908 void ASN1_OBJECT_free(ASN1_OBJECT *a);
22909 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
22910 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
22911                              long length);
22912 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
22913                              long length);
22914 
22915 extern const ASN1_ITEM ASN1_OBJECT_it;
22916 
22917 struct stack_st_ASN1_OBJECT { _STACK stack; };
22918 
22919 
22920 ASN1_STRING *ASN1_STRING_new(void);
22921 void ASN1_STRING_free(ASN1_STRING *a);
22922 void ASN1_STRING_clear_free(ASN1_STRING *a);
22923 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
22924 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
22925 ASN1_STRING *ASN1_STRING_type_new(int type);
22926 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
22927   /*
22928    * Since this is used to store all sorts of things, via macros, for now,
22929    * make its data void *
22930    */
22931 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
22932 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
22933 int ASN1_STRING_length(const ASN1_STRING *x);
22934 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
22935 int ASN1_STRING_type(ASN1_STRING *x);
22936 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
22937 
22938 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;
22939 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
22940 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
22941                                      const unsigned char **pp, long length);
22942 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
22943 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
22944 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
22945 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
22946                           unsigned char *flags, int flags_len);
22947 
22948 
22949 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
22950                                BIT_STRING_BITNAME *tbl, int indent);
22951 
22952 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
22953 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
22954                             BIT_STRING_BITNAME *tbl);
22955 
22956 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
22957 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
22958 
22959 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;
22960 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
22961 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
22962                                long length);
22963 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
22964                                 long length);
22965 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
22966 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
22967 
22968 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;
22969 
22970 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
22971 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
22972 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
22973                                int offset_day, long offset_sec);
22974 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
22975 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
22976 
22977 
22978 
22979 
22980 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
22981 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
22982                                                time_t t);
22983 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
22984                                                time_t t, int offset_day,
22985                                                long offset_sec);
22986 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
22987 int ASN1_TIME_diff(int *pday, int *psec,
22988                    const ASN1_TIME *from, const ASN1_TIME *to);
22989 
22990 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;
22991 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
22992 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
22993                           const ASN1_OCTET_STRING *b);
22994 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
22995                           int len);
22996 
22997 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;
22998 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;
22999 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;
23000 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;
23001 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;
23002 
23003 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
23004 int UTF8_putc(unsigned char *str, int len, unsigned long value);
23005 
23006 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;
23007 
23008 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;
23009 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;
23010 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;
23011 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;
23012 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;
23013 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;
23014 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;
23015 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;
23016 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;
23017 
23018 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
23019 
23020 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
23021 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
23022                          int offset_day, long offset_sec);
23023 int ASN1_TIME_check(ASN1_TIME *t);
23024 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
23025                                                    **out);
23026 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
23027 
23028 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
23029                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
23030 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
23031                                       const unsigned char **pp,
23032                                       long length, d2i_of_void *d2i,
23033                                       void (*free_func) (OPENSSL_BLOCK),
23034                                       int ex_tag, int ex_class);
23035 
23036 
23037 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
23038 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
23039 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
23040 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
23041 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
23042 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
23043 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
23044 
23045 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
23046 
23047 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
23048 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
23049                                 const char *sn, const char *ln);
23050 
23051 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
23052 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
23053 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
23054 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
23055 
23056 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
23057 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
23058 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
23059 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
23060 
23061 /* General */
23062 /* given a string, return the correct type, max is the maximum length */
23063 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
23064 
23065 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
23066 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
23067                             long length, int Ptag, int Pclass);
23068 unsigned long ASN1_tag2bit(int tag);
23069 /* type is one or more of the B_ASN1_ values. */
23070 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
23071                                  long length, int type);
23072 
23073 /* PARSING */
23074 int asn1_Finish(ASN1_CTX *c);
23075 int asn1_const_Finish(ASN1_const_CTX *c);
23076 
23077 /* SPECIALS */
23078 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
23079                     int *pclass, long omax);
23080 int ASN1_check_infinite_end(unsigned char **p, long len);
23081 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
23082 void ASN1_put_object(unsigned char **pp, int constructed, int length,
23083                      int tag, int xclass);
23084 int ASN1_put_eoc(unsigned char **pp);
23085 int ASN1_object_size(int constructed, int length, int tag);
23086 
23087 /* Used to implement other functions */
23088 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
23089 # 976 "/usr/include/openssl/asn1.h" 3 4
23090 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
23091 
23092 /* ASN1 alloc/free macros for when a type is only used internally */
23093 
23094 
23095 
23096 
23097 
23098 
23099 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
23100 
23101 
23102 
23103 
23104 
23105 
23106 
23107 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
23108 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
23109 # 1006 "/usr/include/openssl/asn1.h" 3 4
23110 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
23111 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
23112 
23113 
23114 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
23115 
23116 
23117 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
23118 
23119 
23120 
23121 
23122 
23123 
23124 
23125 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
23126 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
23127 # 1034 "/usr/include/openssl/asn1.h" 3 4
23128 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
23129 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
23130 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
23131 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
23132 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
23133 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
23134 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
23135                   unsigned char *buf, int off);
23136 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
23137 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
23138                     int dump);
23139 
23140 const char *ASN1_tag2str(int tag);
23141 
23142 /* Used to load and write netscape format cert */
23143 
23144 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;
23145 
23146 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
23147 
23148 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
23149 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
23150 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
23151                                   unsigned char *data, int len);
23152 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
23153                                   unsigned char *data, int max_len);
23154 
23155 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
23156                                          d2i_of_void *d2i,
23157                                          void (*free_func) (OPENSSL_BLOCK));
23158 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
23159                              unsigned char **buf, int *len);
23160 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
23161 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
23162 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
23163                               ASN1_OCTET_STRING **oct);
23164 
23165 
23166 
23167 
23168 
23169 
23170 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
23171                             ASN1_OCTET_STRING **oct);
23172 
23173 void ASN1_STRING_set_default_mask(unsigned long mask);
23174 int ASN1_STRING_set_default_mask_asc(const char *p);
23175 unsigned long ASN1_STRING_get_default_mask(void);
23176 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
23177                        int inform, unsigned long mask);
23178 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
23179                         int inform, unsigned long mask,
23180                         long minsize, long maxsize);
23181 
23182 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
23183                                     const unsigned char *in, int inlen,
23184                                     int inform, int nid);
23185 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
23186 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
23187 void ASN1_STRING_TABLE_cleanup(void);
23188 
23189 /* ASN1 template functions */
23190 
23191 /* Old API compatible functions */
23192 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
23193 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
23194 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
23195                           long len, const ASN1_ITEM *it);
23196 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
23197 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
23198                        const ASN1_ITEM *it);
23199 
23200 void ASN1_add_oid_module(void);
23201 
23202 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
23203 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
23204 
23205 /* ASN1 Print flags */
23206 
23207 /* Indicate missing OPTIONAL fields */
23208 
23209 /* Mark start and end of SEQUENCE */
23210 
23211 /* Mark start and end of SEQUENCE/SET OF */
23212 
23213 /* Show the ASN1 type of primitives */
23214 
23215 /* Don't show ASN1 type of ANY */
23216 
23217 /* Don't show ASN1 type of MSTRINGs */
23218 
23219 /* Don't show field names in SEQUENCE */
23220 
23221 /* Show structure names of each SEQUENCE field */
23222 
23223 /* Don't show structure name even at top level */
23224 
23225 
23226 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
23227                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
23228 ASN1_PCTX *ASN1_PCTX_new(void);
23229 void ASN1_PCTX_free(ASN1_PCTX *p);
23230 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
23231 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
23232 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
23233 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
23234 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
23235 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
23236 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
23237 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
23238 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
23239 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
23240 
23241 BIO_METHOD *BIO_f_asn1(void);
23242 
23243 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
23244 
23245 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
23246                         const ASN1_ITEM *it);
23247 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
23248                               const char *hdr, const ASN1_ITEM *it);
23249 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
23250                      int ctype_nid, int econt_nid,
23251                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
23252 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
23253 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
23254 int SMIME_text(BIO *in, BIO *out);
23255 
23256 /* BEGIN ERROR CODES */
23257 /*
23258  * The following lines are auto generated by the script mkerr.pl. Any changes
23259  * made after this point may be overwritten when the script is next run.
23260  */
23261 
23262 void ERR_load_ASN1_strings(void);
23263 
23264 /* Error codes for the ASN1 functions. */
23265 
23266 /* Function codes. */
23267 # 1298 "/usr/include/openssl/asn1.h" 3 4
23268 /* Reason codes. */
23269 # 966 "/usr/include/openssl/objects.h" 2 3 4
23270 # 984 "/usr/include/openssl/objects.h" 3 4
23271 typedef struct obj_name_st {
23272     int type;
23273     int alias;
23274     const char *name;
23275     const char *data;
23276 } OBJ_NAME;
23277 
23278 
23279 
23280 int OBJ_NAME_init(void);
23281 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
23282                        int (*cmp_func) (const char *, const char *),
23283                        void (*free_func) (const char *, int, const char *));
23284 const char *OBJ_NAME_get(const char *name, int type);
23285 int OBJ_NAME_add(const char *name, int type, const char *data);
23286 int OBJ_NAME_remove(const char *name, int type);
23287 void OBJ_NAME_cleanup(int type); /* -1 for everything */
23288 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
23289                      void *arg);
23290 void OBJ_NAME_do_all_sorted(int type,
23291                             void (*fn) (const OBJ_NAME *, void *arg),
23292                             void *arg);
23293 
23294 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
23295 ASN1_OBJECT *OBJ_nid2obj(int n);
23296 const char *OBJ_nid2ln(int n);
23297 const char *OBJ_nid2sn(int n);
23298 int OBJ_obj2nid(const ASN1_OBJECT *o);
23299 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
23300 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
23301 int OBJ_txt2nid(const char *s);
23302 int OBJ_ln2nid(const char *s);
23303 int OBJ_sn2nid(const char *s);
23304 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
23305 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
23306                          int (*cmp) (const void *, const void *));
23307 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
23308                             int size,
23309                             int (*cmp) (const void *, const void *),
23310                             int flags);
23311 # 1035 "/usr/include/openssl/objects.h" 3 4
23312 /*-
23313  * Unsolved problem: if a type is actually a pointer type, like
23314  * nid_triple is, then its impossible to get a const where you need
23315  * it. Consider:
23316  *
23317  * typedef int nid_triple[3];
23318  * const void *a_;
23319  * const nid_triple const *a = a_;
23320  *
23321  * The assignement discards a const because what you really want is:
23322  *
23323  * const int const * const *a = a_;
23324  *
23325  * But if you do that, you lose the fact that a is an array of 3 ints,
23326  * which breaks comparison functions.
23327  *
23328  * Thus we end up having to cast, sadly, or unpack the
23329  * declarations. Or, as I finally did in this case, delcare nid_triple
23330  * to be a struct, which it should have been in the first place.
23331  *
23332  * Ben, August 2008.
23333  *
23334  * Also, strictly speaking not all types need be const, but handling
23335  * the non-constness means a lot of complication, and in practice
23336  * comparison routines do always not touch their arguments.
23337  */
23338 # 1104 "/usr/include/openssl/objects.h" 3 4
23339 int OBJ_new_nid(int num);
23340 int OBJ_add_object(const ASN1_OBJECT *obj);
23341 int OBJ_create(const char *oid, const char *sn, const char *ln);
23342 void OBJ_cleanup(void);
23343 int OBJ_create_objects(BIO *in);
23344 
23345 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
23346 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
23347 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
23348 void OBJ_sigid_free(void);
23349 
23350 extern int obj_cleanup_defer;
23351 void check_defer(int nid);
23352 
23353 /* BEGIN ERROR CODES */
23354 /*
23355  * The following lines are auto generated by the script mkerr.pl. Any changes
23356  * made after this point may be overwritten when the script is next run.
23357  */
23358 void ERR_load_OBJ_strings(void);
23359 
23360 /* Error codes for the OBJ functions. */
23361 
23362 /* Function codes. */
23363 # 1136 "/usr/include/openssl/objects.h" 3 4
23364 /* Reason codes. */
23365 # 95 "/usr/include/openssl/evp.h" 2 3 4
23366 # 125 "/usr/include/openssl/evp.h" 3 4
23367 /*
23368  * Type needs to be a bit field Sub-type needs to be for variations on the
23369  * method, as in, can it do arbitrary encryption....
23370  */
23371 struct evp_pkey_st {
23372     int type;
23373     int save_type;
23374     int references;
23375     const EVP_PKEY_ASN1_METHOD *ameth;
23376     ENGINE *engine;
23377     union {
23378         char *ptr;
23379 
23380         struct rsa_st *rsa; /* RSA */
23381 
23382 
23383         struct dsa_st *dsa; /* DSA */
23384 
23385 
23386         struct dh_st *dh; /* DH */
23387 
23388 
23389         struct ec_key_st *ec; /* ECC */
23390 
23391     } pkey;
23392     int save_parameters;
23393     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
23394 } /* EVP_PKEY */ ;
23395 
23396 
23397 
23398 
23399 
23400 
23401 
23402 struct env_md_st {
23403     int type;
23404     int pkey_type;
23405     int md_size;
23406     unsigned long flags;
23407     int (*init) (EVP_MD_CTX *ctx);
23408     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
23409     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
23410     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
23411     int (*cleanup) (EVP_MD_CTX *ctx);
23412     /* FIXME: prototype these some day */
23413     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
23414                  unsigned char *sigret, unsigned int *siglen, void *key);
23415     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
23416                    const unsigned char *sigbuf, unsigned int siglen,
23417                    void *key);
23418     int required_pkey_type[5]; /* EVP_PKEY_xxx */
23419     int block_size;
23420     int ctx_size; /* how big does the ctx->md_data need to be */
23421     /* control function */
23422     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
23423 } /* EVP_MD */ ;
23424 
23425 typedef int evp_sign_method(int type, const unsigned char *m,
23426                             unsigned int m_length, unsigned char *sigret,
23427                             unsigned int *siglen, void *key);
23428 typedef int evp_verify_method(int type, const unsigned char *m,
23429                               unsigned int m_length,
23430                               const unsigned char *sigbuf,
23431                               unsigned int siglen, void *key);
23432 
23433 /* digest can only handle a single block */
23434 
23435 
23436 /*
23437  * digest is a "clone" digest used
23438  * which is a copy of an existing
23439  * one for a specific public key type.
23440  * EVP_dss1() etc
23441  */
23442 
23443 
23444 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
23445 
23446 
23447 
23448 /* DigestAlgorithmIdentifier flags... */
23449 
23450 
23451 
23452 /* NULL or absent parameter accepted. Use NULL */
23453 
23454 
23455 
23456 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
23457 
23458 
23459 
23460 /* Custom handling via ctrl */
23461 
23462 
23463 
23464 /* Note if suitable for use in FIPS mode */
23465 
23466 
23467 /* Digest ctrls */
23468 
23469 
23470 
23471 
23472 /* Minimum Algorithm specific ctrl value */
23473 # 268 "/usr/include/openssl/evp.h" 3 4
23474 struct env_md_ctx_st {
23475     const EVP_MD *digest;
23476     ENGINE *engine; /* functional reference if 'digest' is
23477                                  * ENGINE-provided */
23478     unsigned long flags;
23479     void *md_data;
23480     /* Public key context for sign/verify */
23481     EVP_PKEY_CTX *pctx;
23482     /* Update function: usually copied from EVP_MD */
23483     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
23484 } /* EVP_MD_CTX */ ;
23485 
23486 /* values for EVP_MD_CTX flags */
23487 
23488 
23489 
23490 
23491 
23492 
23493 
23494 /*
23495  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
23496  * don't accidentally reuse the values for other purposes.
23497  */
23498 
23499 
23500 
23501 
23502 /*
23503  * The following PAD options are also currently ignored in 1.0.0, digest
23504  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
23505  * instead.
23506  */
23507 
23508 
23509 
23510 
23511 
23512 
23513 
23514 struct evp_cipher_st {
23515     int nid;
23516     int block_size;
23517     /* Default value for variable length ciphers */
23518     int key_len;
23519     int iv_len;
23520     /* Various flags */
23521     unsigned long flags;
23522     /* init key */
23523     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
23524                  const unsigned char *iv, int enc);
23525     /* encrypt/decrypt data */
23526     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
23527                       const unsigned char *in, size_t inl);
23528     /* cleanup ctx */
23529     int (*cleanup) (EVP_CIPHER_CTX *);
23530     /* how big ctx->cipher_data needs to be */
23531     int ctx_size;
23532     /* Populate a ASN1_TYPE with parameters */
23533     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
23534     /* Get parameters from a ASN1_TYPE */
23535     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
23536     /* Miscellaneous operations */
23537     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
23538     /* Application data */
23539     void *app_data;
23540 } /* EVP_CIPHER */ ;
23541 
23542 /* Values for cipher flags */
23543 
23544 /* Modes for ciphers */
23545 # 351 "/usr/include/openssl/evp.h" 3 4
23546 /* Set if variable length cipher */
23547 
23548 /* Set if the iv handling should be done by the cipher itself */
23549 
23550 /* Set if the cipher's init() function should be called if key is NULL */
23551 
23552 /* Call ctrl() to init cipher parameters */
23553 
23554 /* Don't use standard key length function */
23555 
23556 /* Don't use standard block padding */
23557 
23558 /* cipher handles random key generation */
23559 
23560 /* cipher has its own additional copying logic */
23561 
23562 /* Allow use default ASN1 get/set iv */
23563 
23564 /* Buffer length in bits not bytes: CFB1 mode only */
23565 
23566 /* Note if suitable for use in FIPS mode */
23567 
23568 /* Allow non FIPS cipher in FIPS mode */
23569 
23570 /*
23571  * Cipher handles any and all padding logic as well as finalisation.
23572  */
23573 
23574 
23575 
23576 
23577 /*
23578  * Cipher context flag to indicate we can handle wrap mode: if allowed in
23579  * older applications it could overflow buffers.
23580  */
23581 
23582 
23583 
23584 /* ctrl() values */
23585 # 410 "/usr/include/openssl/evp.h" 3 4
23586 /*
23587  * AEAD cipher deduces payload length and returns number of bytes required to
23588  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
23589  * appends/verifies MAC.
23590  */
23591 
23592 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
23593 
23594 /* Set the GCM invocation field, decrypt only */
23595 
23596 
23597 
23598 
23599 
23600 
23601 
23602 /* RFC 5246 defines additional data to be 13 bytes in length */
23603 
23604 
23605 typedef struct {
23606     unsigned char *out;
23607     const unsigned char *inp;
23608     size_t len;
23609     unsigned int interleave;
23610 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
23611 
23612 /* GCM TLS constants */
23613 /* Length of fixed part of IV derived from PRF */
23614 
23615 /* Length of explicit part of IV part of TLS records */
23616 
23617 /* Length of tag for TLS */
23618 
23619 
23620 typedef struct evp_cipher_info_st {
23621     const EVP_CIPHER *cipher;
23622     unsigned char iv[16];
23623 } EVP_CIPHER_INFO;
23624 
23625 struct evp_cipher_ctx_st {
23626     const EVP_CIPHER *cipher;
23627     ENGINE *engine; /* functional reference if 'cipher' is
23628                                  * ENGINE-provided */
23629     int encrypt; /* encrypt or decrypt */
23630     int buf_len; /* number we have left */
23631     unsigned char oiv[16]; /* original iv */
23632     unsigned char iv[16]; /* working iv */
23633     unsigned char buf[32]; /* saved partial block */
23634     int num; /* used by cfb/ofb/ctr mode */
23635     void *app_data; /* application stuff */
23636     int key_len; /* May change for variable length cipher */
23637     unsigned long flags; /* Various flags */
23638     void *cipher_data; /* per EVP data */
23639     int final_used;
23640     int block_mask;
23641     unsigned char final[32]; /* possible final block */
23642 } /* EVP_CIPHER_CTX */ ;
23643 
23644 typedef struct evp_Encode_Ctx_st {
23645     /* number saved in a partial encode/decode */
23646     int num;
23647     /*
23648      * The length is either the output line length (in input bytes) or the
23649      * shortest input line length that is ok.  Once decoding begins, the
23650      * length is adjusted up each time a longer line is decoded
23651      */
23652     int length;
23653     /* data to encode */
23654     unsigned char enc_data[80];
23655     /* number read on current line */
23656     int line_num;
23657     int expect_nl;
23658 } EVP_ENCODE_CTX;
23659 
23660 /* Password based encryption function */
23661 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
23662                               int passlen, ASN1_TYPE *param,
23663                               const EVP_CIPHER *cipher, const EVP_MD *md,
23664                               int en_de);
23665 # 510 "/usr/include/openssl/evp.h" 3 4
23666 /* Add some extra combinations */
23667 
23668 
23669 
23670 
23671 
23672 int EVP_MD_type(const EVP_MD *md);
23673 
23674 
23675 int EVP_MD_pkey_type(const EVP_MD *md);
23676 int EVP_MD_size(const EVP_MD *md);
23677 int EVP_MD_block_size(const EVP_MD *md);
23678 unsigned long EVP_MD_flags(const EVP_MD *md);
23679 
23680 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
23681 
23682 
23683 
23684 
23685 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
23686 
23687 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
23688 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
23689 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
23690 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
23691 
23692 
23693 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
23694 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
23695 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
23696 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
23697 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
23698 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
23699 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
23700 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
23701 
23702 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
23703 # 574 "/usr/include/openssl/evp.h" 3 4
23704 int EVP_Cipher(EVP_CIPHER_CTX *c,
23705                unsigned char *out, const unsigned char *in, unsigned int inl);
23706 # 586 "/usr/include/openssl/evp.h" 3 4
23707 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
23708 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
23709 EVP_MD_CTX *EVP_MD_CTX_create(void);
23710 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
23711 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
23712 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
23713 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
23714 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
23715 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
23716 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
23717 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
23718 int EVP_Digest(const void *data, size_t count,
23719                unsigned char *md, unsigned int *size, const EVP_MD *type,
23720                ENGINE *impl);
23721 
23722 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
23723 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
23724 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
23725 
23726 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
23727 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
23728                            const char *prompt, int verify);
23729 void EVP_set_pw_prompt(const char *prompt);
23730 char *EVP_get_pw_prompt(void);
23731 
23732 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
23733                    const unsigned char *salt, const unsigned char *data,
23734                    int datal, int count, unsigned char *key,
23735                    unsigned char *iv);
23736 
23737 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
23738 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
23739 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
23740 
23741 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
23742                     const unsigned char *key, const unsigned char *iv);
23743 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
23744                        ENGINE *impl, const unsigned char *key,
23745                        const unsigned char *iv);
23746 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
23747                       const unsigned char *in, int inl);
23748 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
23749 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
23750 
23751 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
23752                     const unsigned char *key, const unsigned char *iv);
23753 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
23754                        ENGINE *impl, const unsigned char *key,
23755                        const unsigned char *iv);
23756 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
23757                       const unsigned char *in, int inl);
23758 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
23759 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
23760 
23761 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
23762                    const unsigned char *key, const unsigned char *iv,
23763                    int enc);
23764 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
23765                       ENGINE *impl, const unsigned char *key,
23766                       const unsigned char *iv, int enc);
23767 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
23768                      const unsigned char *in, int inl);
23769 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
23770 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
23771 
23772 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
23773                   EVP_PKEY *pkey);
23774 
23775 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
23776                     unsigned int siglen, EVP_PKEY *pkey);
23777 
23778 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
23779                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
23780 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
23781                         unsigned char *sigret, size_t *siglen);
23782 
23783 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
23784                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
23785 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
23786                           const unsigned char *sig, size_t siglen);
23787 
23788 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
23789                  const unsigned char *ek, int ekl, const unsigned char *iv,
23790                  EVP_PKEY *priv);
23791 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
23792 
23793 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
23794                  unsigned char **ek, int *ekl, unsigned char *iv,
23795                  EVP_PKEY **pubk, int npubk);
23796 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
23797 
23798 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
23799 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
23800                       const unsigned char *in, int inl);
23801 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
23802 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
23803 
23804 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
23805 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
23806                      const unsigned char *in, int inl);
23807 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
23808                     char *out, int *outl);
23809 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
23810 
23811 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
23812 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
23813 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
23814 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
23815 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
23816 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
23817 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
23818 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
23819 
23820 
23821 BIO_METHOD *BIO_f_md(void);
23822 BIO_METHOD *BIO_f_base64(void);
23823 BIO_METHOD *BIO_f_cipher(void);
23824 BIO_METHOD *BIO_f_reliable(void);
23825 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
23826                     const unsigned char *i, int enc);
23827 
23828 
23829 const EVP_MD *EVP_md_null(void);
23830 
23831 const EVP_MD *EVP_md2(void);
23832 
23833 
23834 const EVP_MD *EVP_md4(void);
23835 
23836 
23837 const EVP_MD *EVP_md5(void);
23838 
23839 
23840 const EVP_MD *EVP_sha(void);
23841 const EVP_MD *EVP_sha1(void);
23842 const EVP_MD *EVP_dss(void);
23843 const EVP_MD *EVP_dss1(void);
23844 const EVP_MD *EVP_ecdsa(void);
23845 
23846 
23847 const EVP_MD *EVP_sha224(void);
23848 const EVP_MD *EVP_sha256(void);
23849 
23850 
23851 const EVP_MD *EVP_sha384(void);
23852 const EVP_MD *EVP_sha512(void);
23853 
23854 
23855 
23856 
23857 
23858 const EVP_MD *EVP_ripemd160(void);
23859 
23860 
23861 
23862 
23863 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
23864 
23865 const EVP_CIPHER *EVP_des_ecb(void);
23866 const EVP_CIPHER *EVP_des_ede(void);
23867 const EVP_CIPHER *EVP_des_ede3(void);
23868 const EVP_CIPHER *EVP_des_ede_ecb(void);
23869 const EVP_CIPHER *EVP_des_ede3_ecb(void);
23870 const EVP_CIPHER *EVP_des_cfb64(void);
23871 
23872 const EVP_CIPHER *EVP_des_cfb1(void);
23873 const EVP_CIPHER *EVP_des_cfb8(void);
23874 const EVP_CIPHER *EVP_des_ede_cfb64(void);
23875 
23876 
23877 
23878 
23879 
23880 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
23881 
23882 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
23883 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
23884 const EVP_CIPHER *EVP_des_ofb(void);
23885 const EVP_CIPHER *EVP_des_ede_ofb(void);
23886 const EVP_CIPHER *EVP_des_ede3_ofb(void);
23887 const EVP_CIPHER *EVP_des_cbc(void);
23888 const EVP_CIPHER *EVP_des_ede_cbc(void);
23889 const EVP_CIPHER *EVP_des_ede3_cbc(void);
23890 const EVP_CIPHER *EVP_desx_cbc(void);
23891 const EVP_CIPHER *EVP_des_ede3_wrap(void);
23892 /*
23893  * This should now be supported through the dev_crypto ENGINE. But also, why
23894  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
23895  * branch?
23896  */
23897 # 785 "/usr/include/openssl/evp.h" 3 4
23898 const EVP_CIPHER *EVP_rc4(void);
23899 const EVP_CIPHER *EVP_rc4_40(void);
23900 
23901 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
23902 # 799 "/usr/include/openssl/evp.h" 3 4
23903 const EVP_CIPHER *EVP_rc2_ecb(void);
23904 const EVP_CIPHER *EVP_rc2_cbc(void);
23905 const EVP_CIPHER *EVP_rc2_40_cbc(void);
23906 const EVP_CIPHER *EVP_rc2_64_cbc(void);
23907 const EVP_CIPHER *EVP_rc2_cfb64(void);
23908 
23909 const EVP_CIPHER *EVP_rc2_ofb(void);
23910 
23911 
23912 const EVP_CIPHER *EVP_bf_ecb(void);
23913 const EVP_CIPHER *EVP_bf_cbc(void);
23914 const EVP_CIPHER *EVP_bf_cfb64(void);
23915 
23916 const EVP_CIPHER *EVP_bf_ofb(void);
23917 
23918 
23919 const EVP_CIPHER *EVP_cast5_ecb(void);
23920 const EVP_CIPHER *EVP_cast5_cbc(void);
23921 const EVP_CIPHER *EVP_cast5_cfb64(void);
23922 
23923 const EVP_CIPHER *EVP_cast5_ofb(void);
23924 # 829 "/usr/include/openssl/evp.h" 3 4
23925 const EVP_CIPHER *EVP_aes_128_ecb(void);
23926 const EVP_CIPHER *EVP_aes_128_cbc(void);
23927 const EVP_CIPHER *EVP_aes_128_cfb1(void);
23928 const EVP_CIPHER *EVP_aes_128_cfb8(void);
23929 const EVP_CIPHER *EVP_aes_128_cfb128(void);
23930 
23931 const EVP_CIPHER *EVP_aes_128_ofb(void);
23932 const EVP_CIPHER *EVP_aes_128_ctr(void);
23933 const EVP_CIPHER *EVP_aes_128_ccm(void);
23934 const EVP_CIPHER *EVP_aes_128_gcm(void);
23935 const EVP_CIPHER *EVP_aes_128_xts(void);
23936 const EVP_CIPHER *EVP_aes_128_wrap(void);
23937 const EVP_CIPHER *EVP_aes_192_ecb(void);
23938 const EVP_CIPHER *EVP_aes_192_cbc(void);
23939 const EVP_CIPHER *EVP_aes_192_cfb1(void);
23940 const EVP_CIPHER *EVP_aes_192_cfb8(void);
23941 const EVP_CIPHER *EVP_aes_192_cfb128(void);
23942 
23943 const EVP_CIPHER *EVP_aes_192_ofb(void);
23944 const EVP_CIPHER *EVP_aes_192_ctr(void);
23945 const EVP_CIPHER *EVP_aes_192_ccm(void);
23946 const EVP_CIPHER *EVP_aes_192_gcm(void);
23947 const EVP_CIPHER *EVP_aes_192_wrap(void);
23948 const EVP_CIPHER *EVP_aes_256_ecb(void);
23949 const EVP_CIPHER *EVP_aes_256_cbc(void);
23950 const EVP_CIPHER *EVP_aes_256_cfb1(void);
23951 const EVP_CIPHER *EVP_aes_256_cfb8(void);
23952 const EVP_CIPHER *EVP_aes_256_cfb128(void);
23953 
23954 const EVP_CIPHER *EVP_aes_256_ofb(void);
23955 const EVP_CIPHER *EVP_aes_256_ctr(void);
23956 const EVP_CIPHER *EVP_aes_256_ccm(void);
23957 const EVP_CIPHER *EVP_aes_256_gcm(void);
23958 const EVP_CIPHER *EVP_aes_256_xts(void);
23959 const EVP_CIPHER *EVP_aes_256_wrap(void);
23960 
23961 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
23962 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
23963 
23964 
23965 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
23966 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
23967 
23968 
23969 
23970 const EVP_CIPHER *EVP_camellia_128_ecb(void);
23971 const EVP_CIPHER *EVP_camellia_128_cbc(void);
23972 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
23973 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
23974 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
23975 
23976 const EVP_CIPHER *EVP_camellia_128_ofb(void);
23977 const EVP_CIPHER *EVP_camellia_192_ecb(void);
23978 const EVP_CIPHER *EVP_camellia_192_cbc(void);
23979 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
23980 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
23981 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
23982 
23983 const EVP_CIPHER *EVP_camellia_192_ofb(void);
23984 const EVP_CIPHER *EVP_camellia_256_ecb(void);
23985 const EVP_CIPHER *EVP_camellia_256_cbc(void);
23986 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
23987 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
23988 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
23989 
23990 const EVP_CIPHER *EVP_camellia_256_ofb(void);
23991 # 905 "/usr/include/openssl/evp.h" 3 4
23992 void OPENSSL_add_all_algorithms_noconf(void);
23993 void OPENSSL_add_all_algorithms_conf(void);
23994 # 916 "/usr/include/openssl/evp.h" 3 4
23995 void OpenSSL_add_all_ciphers(void);
23996 void OpenSSL_add_all_digests(void);
23997 
23998 
23999 
24000 
24001 int EVP_add_cipher(const EVP_CIPHER *cipher);
24002 int EVP_add_digest(const EVP_MD *digest);
24003 
24004 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
24005 const EVP_MD *EVP_get_digestbyname(const char *name);
24006 void EVP_cleanup(void);
24007 
24008 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
24009                                    const char *from, const char *to, void *x),
24010                        void *arg);
24011 void EVP_CIPHER_do_all_sorted(void (*fn)
24012                                (const EVP_CIPHER *ciph, const char *from,
24013                                 const char *to, void *x), void *arg);
24014 
24015 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
24016                                const char *from, const char *to, void *x),
24017                    void *arg);
24018 void EVP_MD_do_all_sorted(void (*fn)
24019                            (const EVP_MD *ciph, const char *from,
24020                             const char *to, void *x), void *arg);
24021 
24022 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
24023                          const unsigned char *enc_key, int enc_key_len,
24024                          EVP_PKEY *private_key);
24025 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
24026                          const unsigned char *key, int key_len,
24027                          EVP_PKEY *pub_key);
24028 int EVP_PKEY_type(int type);
24029 int EVP_PKEY_id(const EVP_PKEY *pkey);
24030 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
24031 int EVP_PKEY_bits(EVP_PKEY *pkey);
24032 int EVP_PKEY_size(EVP_PKEY *pkey);
24033 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
24034 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
24035 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
24036 void *EVP_PKEY_get0(EVP_PKEY *pkey);
24037 
24038 
24039 struct rsa_st;
24040 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
24041 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
24042 
24043 
24044 struct dsa_st;
24045 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
24046 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
24047 
24048 
24049 struct dh_st;
24050 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
24051 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
24052 
24053 
24054 struct ec_key_st;
24055 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
24056 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
24057 
24058 
24059 EVP_PKEY *EVP_PKEY_new(void);
24060 void EVP_PKEY_free(EVP_PKEY *pkey);
24061 
24062 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
24063                         long length);
24064 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
24065 
24066 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
24067                          long length);
24068 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
24069                              long length);
24070 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
24071 
24072 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
24073 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
24074 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
24075 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
24076 
24077 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
24078 
24079 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
24080                           int indent, ASN1_PCTX *pctx);
24081 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
24082                            int indent, ASN1_PCTX *pctx);
24083 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
24084                           int indent, ASN1_PCTX *pctx);
24085 
24086 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
24087 
24088 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
24089 
24090 /* calls methods */
24091 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
24092 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
24093 
24094 /* These are used by EVP_CIPHER methods */
24095 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
24096 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
24097 
24098 /* PKCS5 password based encryption */
24099 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
24100                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
24101                        const EVP_MD *md, int en_de);
24102 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
24103                            const unsigned char *salt, int saltlen, int iter,
24104                            int keylen, unsigned char *out);
24105 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
24106                       const unsigned char *salt, int saltlen, int iter,
24107                       const EVP_MD *digest, int keylen, unsigned char *out);
24108 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
24109                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
24110                           const EVP_MD *md, int en_de);
24111 
24112 void PKCS5_PBE_add(void);
24113 
24114 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
24115                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
24116 
24117 /* PBE type */
24118 
24119 /* Can appear as the outermost AlgorithmIdentifier */
24120 
24121 /* Is an PRF type OID */
24122 
24123 
24124 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
24125                          int md_nid, EVP_PBE_KEYGEN *keygen);
24126 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
24127                     EVP_PBE_KEYGEN *keygen);
24128 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
24129                  EVP_PBE_KEYGEN **pkeygen);
24130 void EVP_PBE_cleanup(void);
24131 # 1064 "/usr/include/openssl/evp.h" 3 4
24132 int EVP_PKEY_asn1_get_count(void);
24133 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
24134 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
24135 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
24136                                                    const char *str, int len);
24137 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
24138 int EVP_PKEY_asn1_add_alias(int to, int from);
24139 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
24140                             int *ppkey_flags, const char **pinfo,
24141                             const char **ppem_str,
24142                             const EVP_PKEY_ASN1_METHOD *ameth);
24143 
24144 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
24145 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
24146                                         const char *pem_str,
24147                                         const char *info);
24148 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
24149                         const EVP_PKEY_ASN1_METHOD *src);
24150 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
24151 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
24152                               int (*pub_decode) (EVP_PKEY *pk,
24153                                                  X509_PUBKEY *pub),
24154                               int (*pub_encode) (X509_PUBKEY *pub,
24155                                                  const EVP_PKEY *pk),
24156                               int (*pub_cmp) (const EVP_PKEY *a,
24157                                               const EVP_PKEY *b),
24158                               int (*pub_print) (BIO *out,
24159                                                 const EVP_PKEY *pkey,
24160                                                 int indent, ASN1_PCTX *pctx),
24161                               int (*pkey_size) (const EVP_PKEY *pk),
24162                               int (*pkey_bits) (const EVP_PKEY *pk));
24163 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
24164                                int (*priv_decode) (EVP_PKEY *pk,
24165                                                    PKCS8_PRIV_KEY_INFO
24166                                                    *p8inf),
24167                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
24168                                                    const EVP_PKEY *pk),
24169                                int (*priv_print) (BIO *out,
24170                                                   const EVP_PKEY *pkey,
24171                                                   int indent,
24172                                                   ASN1_PCTX *pctx));
24173 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
24174                              int (*param_decode) (EVP_PKEY *pkey,
24175                                                   const unsigned char **pder,
24176                                                   int derlen),
24177                              int (*param_encode) (const EVP_PKEY *pkey,
24178                                                   unsigned char **pder),
24179                              int (*param_missing) (const EVP_PKEY *pk),
24180                              int (*param_copy) (EVP_PKEY *to,
24181                                                 const EVP_PKEY *from),
24182                              int (*param_cmp) (const EVP_PKEY *a,
24183                                                const EVP_PKEY *b),
24184                              int (*param_print) (BIO *out,
24185                                                  const EVP_PKEY *pkey,
24186                                                  int indent,
24187                                                  ASN1_PCTX *pctx));
24188 
24189 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
24190                             void (*pkey_free) (EVP_PKEY *pkey));
24191 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
24192                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
24193                                               long arg1, void *arg2));
24194 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
24195                             int (*item_verify) (EVP_MD_CTX *ctx,
24196                                                 const ASN1_ITEM *it,
24197                                                 void *asn,
24198                                                 X509_ALGOR *a,
24199                                                 ASN1_BIT_STRING *sig,
24200                                                 EVP_PKEY *pkey),
24201                             int (*item_sign) (EVP_MD_CTX *ctx,
24202                                               const ASN1_ITEM *it,
24203                                               void *asn,
24204                                               X509_ALGOR *alg1,
24205                                               X509_ALGOR *alg2,
24206                                               ASN1_BIT_STRING *sig));
24207 # 1185 "/usr/include/openssl/evp.h" 3 4
24208 /* Used by GOST key encryption in TLS */
24209 # 1199 "/usr/include/openssl/evp.h" 3 4
24210 /*
24211  * Method handles all operations: don't assume any digest related defaults.
24212  */
24213 
24214 
24215 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
24216 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
24217 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
24218                              const EVP_PKEY_METHOD *meth);
24219 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
24220 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
24221 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
24222 
24223 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
24224 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
24225 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
24226 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
24227 
24228 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
24229                       int cmd, int p1, void *p2);
24230 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
24231                           const char *value);
24232 
24233 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
24234 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
24235 
24236 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
24237                                const unsigned char *key, int keylen);
24238 
24239 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
24240 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
24241 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
24242 
24243 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
24244 
24245 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
24246 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
24247 
24248 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
24249 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
24250                   unsigned char *sig, size_t *siglen,
24251                   const unsigned char *tbs, size_t tbslen);
24252 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
24253 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
24254                     const unsigned char *sig, size_t siglen,
24255                     const unsigned char *tbs, size_t tbslen);
24256 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
24257 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
24258                             unsigned char *rout, size_t *routlen,
24259                             const unsigned char *sig, size_t siglen);
24260 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
24261 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
24262                      unsigned char *out, size_t *outlen,
24263                      const unsigned char *in, size_t inlen);
24264 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
24265 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
24266                      unsigned char *out, size_t *outlen,
24267                      const unsigned char *in, size_t inlen);
24268 
24269 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
24270 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
24271 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
24272 
24273 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
24274 
24275 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
24276 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
24277 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
24278 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
24279 
24280 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
24281 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
24282 
24283 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
24284 
24285 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
24286                             int (*init) (EVP_PKEY_CTX *ctx));
24287 
24288 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
24289                             int (*copy) (EVP_PKEY_CTX *dst,
24290                                          EVP_PKEY_CTX *src));
24291 
24292 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
24293                                void (*cleanup) (EVP_PKEY_CTX *ctx));
24294 
24295 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
24296                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
24297                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
24298                                                  EVP_PKEY *pkey));
24299 
24300 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
24301                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
24302                               int (*keygen) (EVP_PKEY_CTX *ctx,
24303                                              EVP_PKEY *pkey));
24304 
24305 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
24306                             int (*sign_init) (EVP_PKEY_CTX *ctx),
24307                             int (*sign) (EVP_PKEY_CTX *ctx,
24308                                          unsigned char *sig, size_t *siglen,
24309                                          const unsigned char *tbs,
24310                                          size_t tbslen));
24311 
24312 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
24313                               int (*verify_init) (EVP_PKEY_CTX *ctx),
24314                               int (*verify) (EVP_PKEY_CTX *ctx,
24315                                              const unsigned char *sig,
24316                                              size_t siglen,
24317                                              const unsigned char *tbs,
24318                                              size_t tbslen));
24319 
24320 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
24321                                       int (*verify_recover_init) (EVP_PKEY_CTX
24322                                                                   *ctx),
24323                                       int (*verify_recover) (EVP_PKEY_CTX
24324                                                              *ctx,
24325                                                              unsigned char
24326                                                              *sig,
24327                                                              size_t *siglen,
24328                                                              const unsigned
24329                                                              char *tbs,
24330                                                              size_t tbslen));
24331 
24332 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
24333                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
24334                                                     EVP_MD_CTX *mctx),
24335                                int (*signctx) (EVP_PKEY_CTX *ctx,
24336                                                unsigned char *sig,
24337                                                size_t *siglen,
24338                                                EVP_MD_CTX *mctx));
24339 
24340 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
24341                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
24342                                                         EVP_MD_CTX *mctx),
24343                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
24344                                                    const unsigned char *sig,
24345                                                    int siglen,
24346                                                    EVP_MD_CTX *mctx));
24347 
24348 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
24349                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
24350                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
24351                                                  unsigned char *out,
24352                                                  size_t *outlen,
24353                                                  const unsigned char *in,
24354                                                  size_t inlen));
24355 
24356 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
24357                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
24358                                int (*decrypt) (EVP_PKEY_CTX *ctx,
24359                                                unsigned char *out,
24360                                                size_t *outlen,
24361                                                const unsigned char *in,
24362                                                size_t inlen));
24363 
24364 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
24365                               int (*derive_init) (EVP_PKEY_CTX *ctx),
24366                               int (*derive) (EVP_PKEY_CTX *ctx,
24367                                              unsigned char *key,
24368                                              size_t *keylen));
24369 
24370 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
24371                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
24372                                          void *p2),
24373                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
24374                                              const char *type,
24375                                              const char *value));
24376 
24377 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
24378                             int (**pinit) (EVP_PKEY_CTX *ctx));
24379 
24380 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
24381                             int (**pcopy) (EVP_PKEY_CTX *dst,
24382                                            EVP_PKEY_CTX *src));
24383 
24384 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
24385                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
24386 
24387 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
24388                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
24389                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
24390                                                    EVP_PKEY *pkey));
24391 
24392 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
24393                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
24394                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
24395                                                EVP_PKEY *pkey));
24396 
24397 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
24398                             int (**psign_init) (EVP_PKEY_CTX *ctx),
24399                             int (**psign) (EVP_PKEY_CTX *ctx,
24400                                            unsigned char *sig, size_t *siglen,
24401                                            const unsigned char *tbs,
24402                                            size_t tbslen));
24403 
24404 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
24405                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
24406                               int (**pverify) (EVP_PKEY_CTX *ctx,
24407                                                const unsigned char *sig,
24408                                                size_t siglen,
24409                                                const unsigned char *tbs,
24410                                                size_t tbslen));
24411 
24412 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
24413                                       int (**pverify_recover_init) (EVP_PKEY_CTX
24414                                                                     *ctx),
24415                                       int (**pverify_recover) (EVP_PKEY_CTX
24416                                                                *ctx,
24417                                                                unsigned char
24418                                                                *sig,
24419                                                                size_t *siglen,
24420                                                                const unsigned
24421                                                                char *tbs,
24422                                                                size_t tbslen));
24423 
24424 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
24425                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
24426                                                       EVP_MD_CTX *mctx),
24427                                int (**psignctx) (EVP_PKEY_CTX *ctx,
24428                                                  unsigned char *sig,
24429                                                  size_t *siglen,
24430                                                  EVP_MD_CTX *mctx));
24431 
24432 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
24433                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
24434                                                           EVP_MD_CTX *mctx),
24435                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
24436                                                      const unsigned char *sig,
24437                                                      int siglen,
24438                                                      EVP_MD_CTX *mctx));
24439 
24440 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
24441                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
24442                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
24443                                                    unsigned char *out,
24444                                                    size_t *outlen,
24445                                                    const unsigned char *in,
24446                                                    size_t inlen));
24447 
24448 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
24449                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
24450                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
24451                                                  unsigned char *out,
24452                                                  size_t *outlen,
24453                                                  const unsigned char *in,
24454                                                  size_t inlen));
24455 
24456 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
24457                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
24458                               int (**pderive) (EVP_PKEY_CTX *ctx,
24459                                                unsigned char *key,
24460                                                size_t *keylen));
24461 
24462 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
24463                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
24464                                            void *p2),
24465                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
24466                                                const char *type,
24467                                                const char *value));
24468 
24469 void EVP_add_alg_module(void);
24470 
24471 /* BEGIN ERROR CODES */
24472 /*
24473  * The following lines are auto generated by the script mkerr.pl. Any changes
24474  * made after this point may be overwritten when the script is next run.
24475  */
24476 
24477 void ERR_load_EVP_strings(void);
24478 
24479 /* Error codes for the EVP functions. */
24480 
24481 /* Function codes. */
24482 # 1554 "/usr/include/openssl/evp.h" 3 4
24483 /* Reason codes. */
24484 # 74 "/usr/include/openssl/x509.h" 2 3 4
24485 
24486 
24487 # 1 "/usr/include/openssl/bio.h" 1 3 4
24488 /* crypto/bio/bio.h */
24489 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24490  * All rights reserved.
24491  *
24492  * This package is an SSL implementation written
24493  * by Eric Young (eay@cryptsoft.com).
24494  * The implementation was written so as to conform with Netscapes SSL.
24495  *
24496  * This library is free for commercial and non-commercial use as long as
24497  * the following conditions are aheared to.  The following conditions
24498  * apply to all code found in this distribution, be it the RC4, RSA,
24499  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24500  * included with this distribution is covered by the same copyright terms
24501  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24502  *
24503  * Copyright remains Eric Young's, and as such any Copyright notices in
24504  * the code are not to be removed.
24505  * If this package is used in a product, Eric Young should be given attribution
24506  * as the author of the parts of the library used.
24507  * This can be in the form of a textual message at program startup or
24508  * in documentation (online or textual) provided with the package.
24509  *
24510  * Redistribution and use in source and binary forms, with or without
24511  * modification, are permitted provided that the following conditions
24512  * are met:
24513  * 1. Redistributions of source code must retain the copyright
24514  *    notice, this list of conditions and the following disclaimer.
24515  * 2. Redistributions in binary form must reproduce the above copyright
24516  *    notice, this list of conditions and the following disclaimer in the
24517  *    documentation and/or other materials provided with the distribution.
24518  * 3. All advertising materials mentioning features or use of this software
24519  *    must display the following acknowledgement:
24520  *    "This product includes cryptographic software written by
24521  *     Eric Young (eay@cryptsoft.com)"
24522  *    The word 'cryptographic' can be left out if the rouines from the library
24523  *    being used are not cryptographic related :-).
24524  * 4. If you include any Windows specific code (or a derivative thereof) from
24525  *    the apps directory (application code) you must include an acknowledgement:
24526  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24527  *
24528  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24529  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24530  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24531  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24532  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24533  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24534  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24535  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24536  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24537  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24538  * SUCH DAMAGE.
24539  *
24540  * The licence and distribution terms for any publically available version or
24541  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24542  * copied and put under another distribution licence
24543  * [including the GNU Public Licence.]
24544  */
24545 # 77 "/usr/include/openssl/x509.h" 2 3 4
24546 
24547 # 1 "/usr/include/openssl/stack.h" 1 3 4
24548 /* crypto/stack/stack.h */
24549 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24550  * All rights reserved.
24551  *
24552  * This package is an SSL implementation written
24553  * by Eric Young (eay@cryptsoft.com).
24554  * The implementation was written so as to conform with Netscapes SSL.
24555  *
24556  * This library is free for commercial and non-commercial use as long as
24557  * the following conditions are aheared to.  The following conditions
24558  * apply to all code found in this distribution, be it the RC4, RSA,
24559  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24560  * included with this distribution is covered by the same copyright terms
24561  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24562  *
24563  * Copyright remains Eric Young's, and as such any Copyright notices in
24564  * the code are not to be removed.
24565  * If this package is used in a product, Eric Young should be given attribution
24566  * as the author of the parts of the library used.
24567  * This can be in the form of a textual message at program startup or
24568  * in documentation (online or textual) provided with the package.
24569  *
24570  * Redistribution and use in source and binary forms, with or without
24571  * modification, are permitted provided that the following conditions
24572  * are met:
24573  * 1. Redistributions of source code must retain the copyright
24574  *    notice, this list of conditions and the following disclaimer.
24575  * 2. Redistributions in binary form must reproduce the above copyright
24576  *    notice, this list of conditions and the following disclaimer in the
24577  *    documentation and/or other materials provided with the distribution.
24578  * 3. All advertising materials mentioning features or use of this software
24579  *    must display the following acknowledgement:
24580  *    "This product includes cryptographic software written by
24581  *     Eric Young (eay@cryptsoft.com)"
24582  *    The word 'cryptographic' can be left out if the rouines from the library
24583  *    being used are not cryptographic related :-).
24584  * 4. If you include any Windows specific code (or a derivative thereof) from
24585  *    the apps directory (application code) you must include an acknowledgement:
24586  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24587  *
24588  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24589  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24590  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24591  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24592  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24593  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24594  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24595  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24596  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24597  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24598  * SUCH DAMAGE.
24599  *
24600  * The licence and distribution terms for any publically available version or
24601  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24602  * copied and put under another distribution licence
24603  * [including the GNU Public Licence.]
24604  */
24605 # 79 "/usr/include/openssl/x509.h" 2 3 4
24606 # 1 "/usr/include/openssl/asn1.h" 1 3 4
24607 /* crypto/asn1/asn1.h */
24608 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24609  * All rights reserved.
24610  *
24611  * This package is an SSL implementation written
24612  * by Eric Young (eay@cryptsoft.com).
24613  * The implementation was written so as to conform with Netscapes SSL.
24614  *
24615  * This library is free for commercial and non-commercial use as long as
24616  * the following conditions are aheared to.  The following conditions
24617  * apply to all code found in this distribution, be it the RC4, RSA,
24618  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24619  * included with this distribution is covered by the same copyright terms
24620  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24621  *
24622  * Copyright remains Eric Young's, and as such any Copyright notices in
24623  * the code are not to be removed.
24624  * If this package is used in a product, Eric Young should be given attribution
24625  * as the author of the parts of the library used.
24626  * This can be in the form of a textual message at program startup or
24627  * in documentation (online or textual) provided with the package.
24628  *
24629  * Redistribution and use in source and binary forms, with or without
24630  * modification, are permitted provided that the following conditions
24631  * are met:
24632  * 1. Redistributions of source code must retain the copyright
24633  *    notice, this list of conditions and the following disclaimer.
24634  * 2. Redistributions in binary form must reproduce the above copyright
24635  *    notice, this list of conditions and the following disclaimer in the
24636  *    documentation and/or other materials provided with the distribution.
24637  * 3. All advertising materials mentioning features or use of this software
24638  *    must display the following acknowledgement:
24639  *    "This product includes cryptographic software written by
24640  *     Eric Young (eay@cryptsoft.com)"
24641  *    The word 'cryptographic' can be left out if the rouines from the library
24642  *    being used are not cryptographic related :-).
24643  * 4. If you include any Windows specific code (or a derivative thereof) from
24644  *    the apps directory (application code) you must include an acknowledgement:
24645  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24646  *
24647  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24648  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24649  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24650  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24651  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24652  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24653  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24654  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24655  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24656  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24657  * SUCH DAMAGE.
24658  *
24659  * The licence and distribution terms for any publically available version or
24660  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24661  * copied and put under another distribution licence
24662  * [including the GNU Public Licence.]
24663  */
24664 # 80 "/usr/include/openssl/x509.h" 2 3 4
24665 # 1 "/usr/include/openssl/safestack.h" 1 3 4
24666 /* ====================================================================
24667  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
24668  *
24669  * Redistribution and use in source and binary forms, with or without
24670  * modification, are permitted provided that the following conditions
24671  * are met:
24672  *
24673  * 1. Redistributions of source code must retain the above copyright
24674  *    notice, this list of conditions and the following disclaimer.
24675  *
24676  * 2. Redistributions in binary form must reproduce the above copyright
24677  *    notice, this list of conditions and the following disclaimer in
24678  *    the documentation and/or other materials provided with the
24679  *    distribution.
24680  *
24681  * 3. All advertising materials mentioning features or use of this
24682  *    software must display the following acknowledgment:
24683  *    "This product includes software developed by the OpenSSL Project
24684  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24685  *
24686  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24687  *    endorse or promote products derived from this software without
24688  *    prior written permission. For written permission, please contact
24689  *    openssl-core@openssl.org.
24690  *
24691  * 5. Products derived from this software may not be called "OpenSSL"
24692  *    nor may "OpenSSL" appear in their names without prior written
24693  *    permission of the OpenSSL Project.
24694  *
24695  * 6. Redistributions of any form whatsoever must retain the following
24696  *    acknowledgment:
24697  *    "This product includes software developed by the OpenSSL Project
24698  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24699  *
24700  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24701  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24702  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24703  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24704  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24705  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24706  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24707  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24708  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24709  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24710  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24711  * OF THE POSSIBILITY OF SUCH DAMAGE.
24712  * ====================================================================
24713  *
24714  * This product includes cryptographic software written by Eric Young
24715  * (eay@cryptsoft.com).  This product includes software written by Tim
24716  * Hudson (tjh@cryptsoft.com).
24717  *
24718  */
24719 # 81 "/usr/include/openssl/x509.h" 2 3 4
24720 
24721 
24722 # 1 "/usr/include/openssl/ec.h" 1 3 4
24723 /* crypto/ec/ec.h */
24724 /*
24725  * Originally written by Bodo Moeller for the OpenSSL project.
24726  */
24727 /**
24728  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
24729  * \author Originally written by Bodo Moeller for the OpenSSL project
24730  */
24731 /* ====================================================================
24732  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
24733  *
24734  * Redistribution and use in source and binary forms, with or without
24735  * modification, are permitted provided that the following conditions
24736  * are met:
24737  *
24738  * 1. Redistributions of source code must retain the above copyright
24739  *    notice, this list of conditions and the following disclaimer.
24740  *
24741  * 2. Redistributions in binary form must reproduce the above copyright
24742  *    notice, this list of conditions and the following disclaimer in
24743  *    the documentation and/or other materials provided with the
24744  *    distribution.
24745  *
24746  * 3. All advertising materials mentioning features or use of this
24747  *    software must display the following acknowledgment:
24748  *    "This product includes software developed by the OpenSSL Project
24749  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24750  *
24751  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24752  *    endorse or promote products derived from this software without
24753  *    prior written permission. For written permission, please contact
24754  *    openssl-core@openssl.org.
24755  *
24756  * 5. Products derived from this software may not be called "OpenSSL"
24757  *    nor may "OpenSSL" appear in their names without prior written
24758  *    permission of the OpenSSL Project.
24759  *
24760  * 6. Redistributions of any form whatsoever must retain the following
24761  *    acknowledgment:
24762  *    "This product includes software developed by the OpenSSL Project
24763  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24764  *
24765  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24766  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24767  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24768  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24769  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24770  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24771  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24772  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24773  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24774  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24775  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24776  * OF THE POSSIBILITY OF SUCH DAMAGE.
24777  * ====================================================================
24778  *
24779  * This product includes cryptographic software written by Eric Young
24780  * (eay@cryptsoft.com).  This product includes software written by Tim
24781  * Hudson (tjh@cryptsoft.com).
24782  *
24783  */
24784 /* ====================================================================
24785  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
24786  *
24787  * Portions of the attached software ("Contribution") are developed by
24788  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
24789  *
24790  * The Contribution is licensed pursuant to the OpenSSL open source
24791  * license provided above.
24792  *
24793  * The elliptic curve binary polynomial software is originally written by
24794  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
24795  *
24796  */
24797 
24798 
24799 
24800 
24801 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
24802 /* opensslconf.h */
24803 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
24804 
24805 
24806 
24807 
24808 /* OpenSSL was configured with the following options: */
24809 # 108 "/usr/include/openssl/opensslconf.h" 3 4
24810 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
24811    asks for it.  This is a transient feature that is provided for those
24812    who haven't had the time to do the appropriate changes in their
24813    applications.  */
24814 # 204 "/usr/include/openssl/opensslconf.h" 3 4
24815 /* crypto/opensslconf.h.in */
24816 
24817 /* Generate 80386 code? */
24818 # 80 "/usr/include/openssl/ec.h" 2 3 4
24819 
24820 
24821 
24822 
24823 
24824 # 1 "/usr/include/openssl/asn1.h" 1 3 4
24825 /* crypto/asn1/asn1.h */
24826 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24827  * All rights reserved.
24828  *
24829  * This package is an SSL implementation written
24830  * by Eric Young (eay@cryptsoft.com).
24831  * The implementation was written so as to conform with Netscapes SSL.
24832  *
24833  * This library is free for commercial and non-commercial use as long as
24834  * the following conditions are aheared to.  The following conditions
24835  * apply to all code found in this distribution, be it the RC4, RSA,
24836  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24837  * included with this distribution is covered by the same copyright terms
24838  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24839  *
24840  * Copyright remains Eric Young's, and as such any Copyright notices in
24841  * the code are not to be removed.
24842  * If this package is used in a product, Eric Young should be given attribution
24843  * as the author of the parts of the library used.
24844  * This can be in the form of a textual message at program startup or
24845  * in documentation (online or textual) provided with the package.
24846  *
24847  * Redistribution and use in source and binary forms, with or without
24848  * modification, are permitted provided that the following conditions
24849  * are met:
24850  * 1. Redistributions of source code must retain the copyright
24851  *    notice, this list of conditions and the following disclaimer.
24852  * 2. Redistributions in binary form must reproduce the above copyright
24853  *    notice, this list of conditions and the following disclaimer in the
24854  *    documentation and/or other materials provided with the distribution.
24855  * 3. All advertising materials mentioning features or use of this software
24856  *    must display the following acknowledgement:
24857  *    "This product includes cryptographic software written by
24858  *     Eric Young (eay@cryptsoft.com)"
24859  *    The word 'cryptographic' can be left out if the rouines from the library
24860  *    being used are not cryptographic related :-).
24861  * 4. If you include any Windows specific code (or a derivative thereof) from
24862  *    the apps directory (application code) you must include an acknowledgement:
24863  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24864  *
24865  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24866  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24867  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24868  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24869  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24870  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24871  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24872  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24873  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24874  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24875  * SUCH DAMAGE.
24876  *
24877  * The licence and distribution terms for any publically available version or
24878  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24879  * copied and put under another distribution licence
24880  * [including the GNU Public Licence.]
24881  */
24882 # 86 "/usr/include/openssl/ec.h" 2 3 4
24883 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
24884 /* ====================================================================
24885  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
24886  *
24887  * Redistribution and use in source and binary forms, with or without
24888  * modification, are permitted provided that the following conditions
24889  * are met:
24890  *
24891  * 1. Redistributions of source code must retain the above copyright
24892  *    notice, this list of conditions and the following disclaimer.
24893  *
24894  * 2. Redistributions in binary form must reproduce the above copyright
24895  *    notice, this list of conditions and the following disclaimer in
24896  *    the documentation and/or other materials provided with the
24897  *    distribution.
24898  *
24899  * 3. All advertising materials mentioning features or use of this
24900  *    software must display the following acknowledgment:
24901  *    "This product includes software developed by the OpenSSL Project
24902  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24903  *
24904  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24905  *    endorse or promote products derived from this software without
24906  *    prior written permission. For written permission, please contact
24907  *    openssl-core@openssl.org.
24908  *
24909  * 5. Products derived from this software may not be called "OpenSSL"
24910  *    nor may "OpenSSL" appear in their names without prior written
24911  *    permission of the OpenSSL Project.
24912  *
24913  * 6. Redistributions of any form whatsoever must retain the following
24914  *    acknowledgment:
24915  *    "This product includes software developed by the OpenSSL Project
24916  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24917  *
24918  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24919  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24920  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24921  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24922  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24923  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24924  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24925  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24926  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24927  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24928  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24929  * OF THE POSSIBILITY OF SUCH DAMAGE.
24930  * ====================================================================
24931  *
24932  * This product includes cryptographic software written by Eric Young
24933  * (eay@cryptsoft.com).  This product includes software written by Tim
24934  * Hudson (tjh@cryptsoft.com).
24935  *
24936  */
24937 # 87 "/usr/include/openssl/ec.h" 2 3 4
24938 
24939 # 1 "/usr/include/openssl/bn.h" 1 3 4
24940 /* crypto/bn/bn.h */
24941 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
24942  * All rights reserved.
24943  *
24944  * This package is an SSL implementation written
24945  * by Eric Young (eay@cryptsoft.com).
24946  * The implementation was written so as to conform with Netscapes SSL.
24947  *
24948  * This library is free for commercial and non-commercial use as long as
24949  * the following conditions are aheared to.  The following conditions
24950  * apply to all code found in this distribution, be it the RC4, RSA,
24951  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24952  * included with this distribution is covered by the same copyright terms
24953  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24954  *
24955  * Copyright remains Eric Young's, and as such any Copyright notices in
24956  * the code are not to be removed.
24957  * If this package is used in a product, Eric Young should be given attribution
24958  * as the author of the parts of the library used.
24959  * This can be in the form of a textual message at program startup or
24960  * in documentation (online or textual) provided with the package.
24961  *
24962  * Redistribution and use in source and binary forms, with or without
24963  * modification, are permitted provided that the following conditions
24964  * are met:
24965  * 1. Redistributions of source code must retain the copyright
24966  *    notice, this list of conditions and the following disclaimer.
24967  * 2. Redistributions in binary form must reproduce the above copyright
24968  *    notice, this list of conditions and the following disclaimer in the
24969  *    documentation and/or other materials provided with the distribution.
24970  * 3. All advertising materials mentioning features or use of this software
24971  *    must display the following acknowledgement:
24972  *    "This product includes cryptographic software written by
24973  *     Eric Young (eay@cryptsoft.com)"
24974  *    The word 'cryptographic' can be left out if the rouines from the library
24975  *    being used are not cryptographic related :-).
24976  * 4. If you include any Windows specific code (or a derivative thereof) from
24977  *    the apps directory (application code) you must include an acknowledgement:
24978  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24979  *
24980  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24981  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24982  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24983  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24984  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24985  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24986  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24987  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24988  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24989  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24990  * SUCH DAMAGE.
24991  *
24992  * The licence and distribution terms for any publically available version or
24993  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24994  * copied and put under another distribution licence
24995  * [including the GNU Public Licence.]
24996  */
24997 /* ====================================================================
24998  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
24999  *
25000  * Redistribution and use in source and binary forms, with or without
25001  * modification, are permitted provided that the following conditions
25002  * are met:
25003  *
25004  * 1. Redistributions of source code must retain the above copyright
25005  *    notice, this list of conditions and the following disclaimer.
25006  *
25007  * 2. Redistributions in binary form must reproduce the above copyright
25008  *    notice, this list of conditions and the following disclaimer in
25009  *    the documentation and/or other materials provided with the
25010  *    distribution.
25011  *
25012  * 3. All advertising materials mentioning features or use of this
25013  *    software must display the following acknowledgment:
25014  *    "This product includes software developed by the OpenSSL Project
25015  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
25016  *
25017  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25018  *    endorse or promote products derived from this software without
25019  *    prior written permission. For written permission, please contact
25020  *    openssl-core@openssl.org.
25021  *
25022  * 5. Products derived from this software may not be called "OpenSSL"
25023  *    nor may "OpenSSL" appear in their names without prior written
25024  *    permission of the OpenSSL Project.
25025  *
25026  * 6. Redistributions of any form whatsoever must retain the following
25027  *    acknowledgment:
25028  *    "This product includes software developed by the OpenSSL Project
25029  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
25030  *
25031  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
25032  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25033  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25034  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
25035  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25036  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25037  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25038  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25039  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25040  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25041  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25042  * OF THE POSSIBILITY OF SUCH DAMAGE.
25043  * ====================================================================
25044  *
25045  * This product includes cryptographic software written by Eric Young
25046  * (eay@cryptsoft.com).  This product includes software written by Tim
25047  * Hudson (tjh@cryptsoft.com).
25048  *
25049  */
25050 /* ====================================================================
25051  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
25052  *
25053  * Portions of the attached software ("Contribution") are developed by
25054  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
25055  *
25056  * The Contribution is licensed pursuant to the Eric Young open source
25057  * license provided above.
25058  *
25059  * The binary polynomial arithmetic software is originally written by
25060  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
25061  *
25062  */
25063 # 89 "/usr/include/openssl/ec.h" 2 3 4
25064 # 103 "/usr/include/openssl/ec.h" 3 4
25065 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
25066  *  for the encoding of a elliptic curve point (x,y) */
25067 typedef enum {
25068         /** the point is encoded as z||x, where the octet z specifies
25069          *  which solution of the quadratic equation y is  */
25070     POINT_CONVERSION_COMPRESSED = 2,
25071         /** the point is encoded as z||x||y, where z is the octet 0x04  */
25072     POINT_CONVERSION_UNCOMPRESSED = 4,
25073         /** the point is encoded as z||x||y, where the octet z specifies
25074          *  which solution of the quadratic equation y is  */
25075     POINT_CONVERSION_HYBRID = 6
25076 } point_conversion_form_t;
25077 
25078 typedef struct ec_method_st EC_METHOD;
25079 
25080 typedef struct ec_group_st
25081     /*-
25082      EC_METHOD *meth;
25083      -- field definition
25084      -- curve coefficients
25085      -- optional generator with associated information (order, cofactor)
25086      -- optional extra data (precomputed table for fast computation of multiples of generator)
25087      -- ASN1 stuff
25088     */
25089     EC_GROUP;
25090 
25091 typedef struct ec_point_st EC_POINT;
25092 
25093 /********************************************************************/
25094 /*               EC_METHODs for curves over GF(p)                   */
25095 /********************************************************************/
25096 
25097 /** Returns the basic GFp ec methods which provides the basis for the
25098  *  optimized methods.
25099  *  \return  EC_METHOD object
25100  */
25101 const EC_METHOD *EC_GFp_simple_method(void);
25102 
25103 /** Returns GFp methods using montgomery multiplication.
25104  *  \return  EC_METHOD object
25105  */
25106 const EC_METHOD *EC_GFp_mont_method(void);
25107 
25108 /** Returns GFp methods using optimized methods for NIST recommended curves
25109  *  \return  EC_METHOD object
25110  */
25111 const EC_METHOD *EC_GFp_nist_method(void);
25112 # 169 "/usr/include/openssl/ec.h" 3 4
25113 /********************************************************************/
25114 /*           EC_METHOD for curves over GF(2^m)                      */
25115 /********************************************************************/
25116 
25117 /** Returns the basic GF2m ec method
25118  *  \return  EC_METHOD object
25119  */
25120 const EC_METHOD *EC_GF2m_simple_method(void);
25121 
25122 
25123 
25124 /********************************************************************/
25125 /*                   EC_GROUP functions                             */
25126 /********************************************************************/
25127 
25128 /** Creates a new EC_GROUP object
25129  *  \param   meth  EC_METHOD to use
25130  *  \return  newly created EC_GROUP object or NULL in case of an error.
25131  */
25132 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
25133 
25134 /** Frees a EC_GROUP object
25135  *  \param  group  EC_GROUP object to be freed.
25136  */
25137 void EC_GROUP_free(EC_GROUP *group);
25138 
25139 /** Clears and frees a EC_GROUP object
25140  *  \param  group  EC_GROUP object to be cleared and freed.
25141  */
25142 void EC_GROUP_clear_free(EC_GROUP *group);
25143 
25144 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
25145  *  \param  dst  destination EC_GROUP object
25146  *  \param  src  source EC_GROUP object
25147  *  \return 1 on success and 0 if an error occurred.
25148  */
25149 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
25150 
25151 /** Creates a new EC_GROUP object and copies the copies the content
25152  *  form src to the newly created EC_KEY object
25153  *  \param  src  source EC_GROUP object
25154  *  \return newly created EC_GROUP object or NULL in case of an error.
25155  */
25156 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
25157 
25158 /** Returns the EC_METHOD of the EC_GROUP object.
25159  *  \param  group  EC_GROUP object
25160  *  \return EC_METHOD used in this EC_GROUP object.
25161  */
25162 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
25163 
25164 /** Returns the field type of the EC_METHOD.
25165  *  \param  meth  EC_METHOD object
25166  *  \return NID of the underlying field type OID.
25167  */
25168 int EC_METHOD_get_field_type(const EC_METHOD *meth);
25169 
25170 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
25171  *  \param  group      EC_GROUP object
25172  *  \param  generator  EC_POINT object with the generator.
25173  *  \param  order      the order of the group generated by the generator.
25174  *  \param  cofactor   the index of the sub-group generated by the generator
25175  *                     in the group of all points on the elliptic curve.
25176  *  \return 1 on success and 0 if an error occured
25177  */
25178 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
25179                            const BIGNUM *order, const BIGNUM *cofactor);
25180 
25181 /** Returns the generator of a EC_GROUP object.
25182  *  \param  group  EC_GROUP object
25183  *  \return the currently used generator (possibly NULL).
25184  */
25185 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
25186 
25187 /** Returns the montgomery data for order(Generator)
25188  *  \param  group  EC_GROUP object
25189  *  \return the currently used generator (possibly NULL).
25190 */
25191 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
25192 
25193 /** Gets the order of a EC_GROUP
25194  *  \param  group  EC_GROUP object
25195  *  \param  order  BIGNUM to which the order is copied
25196  *  \param  ctx    BN_CTX object (optional)
25197  *  \return 1 on success and 0 if an error occured
25198  */
25199 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
25200 
25201 /** Gets the cofactor of a EC_GROUP
25202  *  \param  group     EC_GROUP object
25203  *  \param  cofactor  BIGNUM to which the cofactor is copied
25204  *  \param  ctx       BN_CTX object (optional)
25205  *  \return 1 on success and 0 if an error occured
25206  */
25207 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
25208                           BN_CTX *ctx);
25209 
25210 /** Sets the name of a EC_GROUP object
25211  *  \param  group  EC_GROUP object
25212  *  \param  nid    NID of the curve name OID
25213  */
25214 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
25215 
25216 /** Returns the curve name of a EC_GROUP object
25217  *  \param  group  EC_GROUP object
25218  *  \return NID of the curve name OID or 0 if not set.
25219  */
25220 int EC_GROUP_get_curve_name(const EC_GROUP *group);
25221 
25222 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
25223 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
25224 
25225 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
25226                                         point_conversion_form_t form);
25227 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
25228 
25229 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
25230 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
25231 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
25232 
25233 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
25234  *  \param  group  EC_GROUP object
25235  *  \param  p      BIGNUM with the prime number
25236  *  \param  a      BIGNUM with parameter a of the equation
25237  *  \param  b      BIGNUM with parameter b of the equation
25238  *  \param  ctx    BN_CTX object (optional)
25239  *  \return 1 on success and 0 if an error occured
25240  */
25241 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
25242                            const BIGNUM *b, BN_CTX *ctx);
25243 
25244 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
25245  *  \param  group  EC_GROUP object
25246  *  \param  p      BIGNUM for the prime number
25247  *  \param  a      BIGNUM for parameter a of the equation
25248  *  \param  b      BIGNUM for parameter b of the equation
25249  *  \param  ctx    BN_CTX object (optional)
25250  *  \return 1 on success and 0 if an error occured
25251  */
25252 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
25253                            BIGNUM *b, BN_CTX *ctx);
25254 
25255 
25256 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
25257  *  \param  group  EC_GROUP object
25258  *  \param  p      BIGNUM with the polynomial defining the underlying field
25259  *  \param  a      BIGNUM with parameter a of the equation
25260  *  \param  b      BIGNUM with parameter b of the equation
25261  *  \param  ctx    BN_CTX object (optional)
25262  *  \return 1 on success and 0 if an error occured
25263  */
25264 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
25265                             const BIGNUM *b, BN_CTX *ctx);
25266 
25267 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
25268  *  \param  group  EC_GROUP object
25269  *  \param  p      BIGNUM for the polynomial defining the underlying field
25270  *  \param  a      BIGNUM for parameter a of the equation
25271  *  \param  b      BIGNUM for parameter b of the equation
25272  *  \param  ctx    BN_CTX object (optional)
25273  *  \return 1 on success and 0 if an error occured
25274  */
25275 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
25276                             BIGNUM *b, BN_CTX *ctx);
25277 
25278 /** Returns the number of bits needed to represent a field element
25279  *  \param  group  EC_GROUP object
25280  *  \return number of bits needed to represent a field element
25281  */
25282 int EC_GROUP_get_degree(const EC_GROUP *group);
25283 
25284 /** Checks whether the parameter in the EC_GROUP define a valid ec group
25285  *  \param  group  EC_GROUP object
25286  *  \param  ctx    BN_CTX object (optional)
25287  *  \return 1 if group is a valid ec group and 0 otherwise
25288  */
25289 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
25290 
25291 /** Checks whether the discriminant of the elliptic curve is zero or not
25292  *  \param  group  EC_GROUP object
25293  *  \param  ctx    BN_CTX object (optional)
25294  *  \return 1 if the discriminant is not zero and 0 otherwise
25295  */
25296 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
25297 
25298 /** Compares two EC_GROUP objects
25299  *  \param  a    first EC_GROUP object
25300  *  \param  b    second EC_GROUP object
25301  *  \param  ctx  BN_CTX object (optional)
25302  *  \return 0 if both groups are equal and 1 otherwise
25303  */
25304 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
25305 
25306 /*
25307  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
25308  * choosing an appropriate EC_METHOD
25309  */
25310 
25311 /** Creates a new EC_GROUP object with the specified parameters defined
25312  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
25313  *  \param  p    BIGNUM with the prime number
25314  *  \param  a    BIGNUM with the parameter a of the equation
25315  *  \param  b    BIGNUM with the parameter b of the equation
25316  *  \param  ctx  BN_CTX object (optional)
25317  *  \return newly created EC_GROUP object with the specified parameters
25318  */
25319 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
25320                                  const BIGNUM *b, BN_CTX *ctx);
25321 
25322 /** Creates a new EC_GROUP object with the specified parameters defined
25323  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
25324  *  \param  p    BIGNUM with the polynomial defining the underlying field
25325  *  \param  a    BIGNUM with the parameter a of the equation
25326  *  \param  b    BIGNUM with the parameter b of the equation
25327  *  \param  ctx  BN_CTX object (optional)
25328  *  \return newly created EC_GROUP object with the specified parameters
25329  */
25330 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
25331                                   const BIGNUM *b, BN_CTX *ctx);
25332 
25333 /** Creates a EC_GROUP object with a curve specified by a NID
25334  *  \param  nid  NID of the OID of the curve name
25335  *  \return newly created EC_GROUP object with specified curve or NULL
25336  *          if an error occurred
25337  */
25338 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
25339 
25340 /********************************************************************/
25341 /*               handling of internal curves                        */
25342 /********************************************************************/
25343 
25344 typedef struct {
25345     int nid;
25346     const char *comment;
25347 } EC_builtin_curve;
25348 
25349 /*
25350  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
25351  * available curves or zero if a error occurred. In case r ist not zero
25352  * nitems EC_builtin_curve structures are filled with the data of the first
25353  * nitems internal groups
25354  */
25355 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
25356 
25357 const char *EC_curve_nid2nist(int nid);
25358 int EC_curve_nist2nid(const char *name);
25359 
25360 /********************************************************************/
25361 /*                    EC_POINT functions                            */
25362 /********************************************************************/
25363 
25364 /** Creates a new EC_POINT object for the specified EC_GROUP
25365  *  \param  group  EC_GROUP the underlying EC_GROUP object
25366  *  \return newly created EC_POINT object or NULL if an error occurred
25367  */
25368 EC_POINT *EC_POINT_new(const EC_GROUP *group);
25369 
25370 /** Frees a EC_POINT object
25371  *  \param  point  EC_POINT object to be freed
25372  */
25373 void EC_POINT_free(EC_POINT *point);
25374 
25375 /** Clears and frees a EC_POINT object
25376  *  \param  point  EC_POINT object to be cleared and freed
25377  */
25378 void EC_POINT_clear_free(EC_POINT *point);
25379 
25380 /** Copies EC_POINT object
25381  *  \param  dst  destination EC_POINT object
25382  *  \param  src  source EC_POINT object
25383  *  \return 1 on success and 0 if an error occured
25384  */
25385 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
25386 
25387 /** Creates a new EC_POINT object and copies the content of the supplied
25388  *  EC_POINT
25389  *  \param  src    source EC_POINT object
25390  *  \param  group  underlying the EC_GROUP object
25391  *  \return newly created EC_POINT object or NULL if an error occurred
25392  */
25393 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
25394 
25395 /** Returns the EC_METHOD used in EC_POINT object
25396  *  \param  point  EC_POINT object
25397  *  \return the EC_METHOD used
25398  */
25399 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
25400 
25401 /** Sets a point to infinity (neutral element)
25402  *  \param  group  underlying EC_GROUP object
25403  *  \param  point  EC_POINT to set to infinity
25404  *  \return 1 on success and 0 if an error occured
25405  */
25406 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
25407 
25408 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
25409  *  \param  group  underlying EC_GROUP object
25410  *  \param  p      EC_POINT object
25411  *  \param  x      BIGNUM with the x-coordinate
25412  *  \param  y      BIGNUM with the y-coordinate
25413  *  \param  z      BIGNUM with the z-coordinate
25414  *  \param  ctx    BN_CTX object (optional)
25415  *  \return 1 on success and 0 if an error occured
25416  */
25417 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
25418                                              EC_POINT *p, const BIGNUM *x,
25419                                              const BIGNUM *y, const BIGNUM *z,
25420                                              BN_CTX *ctx);
25421 
25422 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
25423  *  \param  group  underlying EC_GROUP object
25424  *  \param  p      EC_POINT object
25425  *  \param  x      BIGNUM for the x-coordinate
25426  *  \param  y      BIGNUM for the y-coordinate
25427  *  \param  z      BIGNUM for the z-coordinate
25428  *  \param  ctx    BN_CTX object (optional)
25429  *  \return 1 on success and 0 if an error occured
25430  */
25431 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
25432                                              const EC_POINT *p, BIGNUM *x,
25433                                              BIGNUM *y, BIGNUM *z,
25434                                              BN_CTX *ctx);
25435 
25436 /** Sets the affine coordinates of a EC_POINT over GFp
25437  *  \param  group  underlying EC_GROUP object
25438  *  \param  p      EC_POINT object
25439  *  \param  x      BIGNUM with the x-coordinate
25440  *  \param  y      BIGNUM with the y-coordinate
25441  *  \param  ctx    BN_CTX object (optional)
25442  *  \return 1 on success and 0 if an error occured
25443  */
25444 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
25445                                         const BIGNUM *x, const BIGNUM *y,
25446                                         BN_CTX *ctx);
25447 
25448 /** Gets the affine coordinates of a EC_POINT over GFp
25449  *  \param  group  underlying EC_GROUP object
25450  *  \param  p      EC_POINT object
25451  *  \param  x      BIGNUM for the x-coordinate
25452  *  \param  y      BIGNUM for the y-coordinate
25453  *  \param  ctx    BN_CTX object (optional)
25454  *  \return 1 on success and 0 if an error occured
25455  */
25456 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
25457                                         const EC_POINT *p, BIGNUM *x,
25458                                         BIGNUM *y, BN_CTX *ctx);
25459 
25460 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
25461  *  \param  group  underlying EC_GROUP object
25462  *  \param  p      EC_POINT object
25463  *  \param  x      BIGNUM with x-coordinate
25464  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
25465  *  \param  ctx    BN_CTX object (optional)
25466  *  \return 1 on success and 0 if an error occured
25467  */
25468 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
25469                                             EC_POINT *p, const BIGNUM *x,
25470                                             int y_bit, BN_CTX *ctx);
25471 
25472 /** Sets the affine coordinates of a EC_POINT over GF2m
25473  *  \param  group  underlying EC_GROUP object
25474  *  \param  p      EC_POINT object
25475  *  \param  x      BIGNUM with the x-coordinate
25476  *  \param  y      BIGNUM with the y-coordinate
25477  *  \param  ctx    BN_CTX object (optional)
25478  *  \return 1 on success and 0 if an error occured
25479  */
25480 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
25481                                          const BIGNUM *x, const BIGNUM *y,
25482                                          BN_CTX *ctx);
25483 
25484 /** Gets the affine coordinates of a EC_POINT over GF2m
25485  *  \param  group  underlying EC_GROUP object
25486  *  \param  p      EC_POINT object
25487  *  \param  x      BIGNUM for the x-coordinate
25488  *  \param  y      BIGNUM for the y-coordinate
25489  *  \param  ctx    BN_CTX object (optional)
25490  *  \return 1 on success and 0 if an error occured
25491  */
25492 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
25493                                          const EC_POINT *p, BIGNUM *x,
25494                                          BIGNUM *y, BN_CTX *ctx);
25495 
25496 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
25497  *  \param  group  underlying EC_GROUP object
25498  *  \param  p      EC_POINT object
25499  *  \param  x      BIGNUM with x-coordinate
25500  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
25501  *  \param  ctx    BN_CTX object (optional)
25502  *  \return 1 on success and 0 if an error occured
25503  */
25504 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
25505                                              EC_POINT *p, const BIGNUM *x,
25506                                              int y_bit, BN_CTX *ctx);
25507 
25508 /** Encodes a EC_POINT object to a octet string
25509  *  \param  group  underlying EC_GROUP object
25510  *  \param  p      EC_POINT object
25511  *  \param  form   point conversion form
25512  *  \param  buf    memory buffer for the result. If NULL the function returns
25513  *                 required buffer size.
25514  *  \param  len    length of the memory buffer
25515  *  \param  ctx    BN_CTX object (optional)
25516  *  \return the length of the encoded octet string or 0 if an error occurred
25517  */
25518 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
25519                           point_conversion_form_t form,
25520                           unsigned char *buf, size_t len, BN_CTX *ctx);
25521 
25522 /** Decodes a EC_POINT from a octet string
25523  *  \param  group  underlying EC_GROUP object
25524  *  \param  p      EC_POINT object
25525  *  \param  buf    memory buffer with the encoded ec point
25526  *  \param  len    length of the encoded ec point
25527  *  \param  ctx    BN_CTX object (optional)
25528  *  \return 1 on success and 0 if an error occured
25529  */
25530 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
25531                        const unsigned char *buf, size_t len, BN_CTX *ctx);
25532 
25533 /* other interfaces to point2oct/oct2point: */
25534 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
25535                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
25536 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
25537                             EC_POINT *, BN_CTX *);
25538 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
25539                          point_conversion_form_t form, BN_CTX *);
25540 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
25541                              EC_POINT *, BN_CTX *);
25542 
25543 /********************************************************************/
25544 /*         functions for doing EC_POINT arithmetic                  */
25545 /********************************************************************/
25546 
25547 /** Computes the sum of two EC_POINT
25548  *  \param  group  underlying EC_GROUP object
25549  *  \param  r      EC_POINT object for the result (r = a + b)
25550  *  \param  a      EC_POINT object with the first summand
25551  *  \param  b      EC_POINT object with the second summand
25552  *  \param  ctx    BN_CTX object (optional)
25553  *  \return 1 on success and 0 if an error occured
25554  */
25555 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
25556                  const EC_POINT *b, BN_CTX *ctx);
25557 
25558 /** Computes the double of a EC_POINT
25559  *  \param  group  underlying EC_GROUP object
25560  *  \param  r      EC_POINT object for the result (r = 2 * a)
25561  *  \param  a      EC_POINT object
25562  *  \param  ctx    BN_CTX object (optional)
25563  *  \return 1 on success and 0 if an error occured
25564  */
25565 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
25566                  BN_CTX *ctx);
25567 
25568 /** Computes the inverse of a EC_POINT
25569  *  \param  group  underlying EC_GROUP object
25570  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
25571  *  \param  ctx    BN_CTX object (optional)
25572  *  \return 1 on success and 0 if an error occured
25573  */
25574 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
25575 
25576 /** Checks whether the point is the neutral element of the group
25577  *  \param  group  the underlying EC_GROUP object
25578  *  \param  p      EC_POINT object
25579  *  \return 1 if the point is the neutral element and 0 otherwise
25580  */
25581 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
25582 
25583 /** Checks whether the point is on the curve
25584  *  \param  group  underlying EC_GROUP object
25585  *  \param  point  EC_POINT object to check
25586  *  \param  ctx    BN_CTX object (optional)
25587  *  \return 1 if point if on the curve and 0 otherwise
25588  */
25589 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
25590                          BN_CTX *ctx);
25591 
25592 /** Compares two EC_POINTs
25593  *  \param  group  underlying EC_GROUP object
25594  *  \param  a      first EC_POINT object
25595  *  \param  b      second EC_POINT object
25596  *  \param  ctx    BN_CTX object (optional)
25597  *  \return 0 if both points are equal and a value != 0 otherwise
25598  */
25599 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
25600                  BN_CTX *ctx);
25601 
25602 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
25603 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
25604                           EC_POINT *points[], BN_CTX *ctx);
25605 
25606 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
25607  *  \param  group  underlying EC_GROUP object
25608  *  \param  r      EC_POINT object for the result
25609  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
25610  *  \param  num    number futher summands
25611  *  \param  p      array of size num of EC_POINT objects
25612  *  \param  m      array of size num of BIGNUM objects
25613  *  \param  ctx    BN_CTX object (optional)
25614  *  \return 1 on success and 0 if an error occured
25615  */
25616 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
25617                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
25618                   BN_CTX *ctx);
25619 
25620 /** Computes r = generator * n + q * m
25621  *  \param  group  underlying EC_GROUP object
25622  *  \param  r      EC_POINT object for the result
25623  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
25624  *  \param  q      EC_POINT object with the first factor of the second summand
25625  *  \param  m      BIGNUM with the second factor of the second summand
25626  *  \param  ctx    BN_CTX object (optional)
25627  *  \return 1 on success and 0 if an error occured
25628  */
25629 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
25630                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
25631 
25632 /** Stores multiples of generator for faster point multiplication
25633  *  \param  group  EC_GROUP object
25634  *  \param  ctx    BN_CTX object (optional)
25635  *  \return 1 on success and 0 if an error occured
25636  */
25637 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
25638 
25639 /** Reports whether a precomputation has been done
25640  *  \param  group  EC_GROUP object
25641  *  \return 1 if a pre-computation has been done and 0 otherwise
25642  */
25643 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
25644 
25645 /********************************************************************/
25646 /*                       ASN1 stuff                                 */
25647 /********************************************************************/
25648 
25649 /*
25650  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
25651  * represent the field elements
25652  */
25653 int EC_GROUP_get_basis_type(const EC_GROUP *);
25654 
25655 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
25656 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
25657                                    unsigned int *k2, unsigned int *k3);
25658 
25659 
25660 
25661 
25662 typedef struct ecpk_parameters_st ECPKPARAMETERS;
25663 
25664 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
25665 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
25666 # 731 "/usr/include/openssl/ec.h" 3 4
25667 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
25668 
25669 
25670 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
25671 
25672 
25673 /********************************************************************/
25674 /*                      EC_KEY functions                            */
25675 /********************************************************************/
25676 
25677 typedef struct ec_key_st EC_KEY;
25678 
25679 /* some values for the encoding_flag */
25680 
25681 
25682 
25683 /* some values for the flags field */
25684 
25685 
25686 
25687 /** Creates a new EC_KEY object.
25688  *  \return EC_KEY object or NULL if an error occurred.
25689  */
25690 EC_KEY *EC_KEY_new(void);
25691 
25692 int EC_KEY_get_flags(const EC_KEY *key);
25693 
25694 void EC_KEY_set_flags(EC_KEY *key, int flags);
25695 
25696 void EC_KEY_clear_flags(EC_KEY *key, int flags);
25697 
25698 /** Creates a new EC_KEY object using a named curve as underlying
25699  *  EC_GROUP object.
25700  *  \param  nid  NID of the named curve.
25701  *  \return EC_KEY object or NULL if an error occurred.
25702  */
25703 EC_KEY *EC_KEY_new_by_curve_name(int nid);
25704 
25705 /** Frees a EC_KEY object.
25706  *  \param  key  EC_KEY object to be freed.
25707  */
25708 void EC_KEY_free(EC_KEY *key);
25709 
25710 /** Copies a EC_KEY object.
25711  *  \param  dst  destination EC_KEY object
25712  *  \param  src  src EC_KEY object
25713  *  \return dst or NULL if an error occurred.
25714  */
25715 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
25716 
25717 /** Creates a new EC_KEY object and copies the content from src to it.
25718  *  \param  src  the source EC_KEY object
25719  *  \return newly created EC_KEY object or NULL if an error occurred.
25720  */
25721 EC_KEY *EC_KEY_dup(const EC_KEY *src);
25722 
25723 /** Increases the internal reference count of a EC_KEY object.
25724  *  \param  key  EC_KEY object
25725  *  \return 1 on success and 0 if an error occurred.
25726  */
25727 int EC_KEY_up_ref(EC_KEY *key);
25728 
25729 /** Returns the EC_GROUP object of a EC_KEY object
25730  *  \param  key  EC_KEY object
25731  *  \return the EC_GROUP object (possibly NULL).
25732  */
25733 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
25734 
25735 /** Sets the EC_GROUP of a EC_KEY object.
25736  *  \param  key    EC_KEY object
25737  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
25738  *                 object will use an own copy of the EC_GROUP).
25739  *  \return 1 on success and 0 if an error occurred.
25740  */
25741 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
25742 
25743 /** Returns the private key of a EC_KEY object.
25744  *  \param  key  EC_KEY object
25745  *  \return a BIGNUM with the private key (possibly NULL).
25746  */
25747 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
25748 
25749 /** Sets the private key of a EC_KEY object.
25750  *  \param  key  EC_KEY object
25751  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
25752  *               will use an own copy of the BIGNUM).
25753  *  \return 1 on success and 0 if an error occurred.
25754  */
25755 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
25756 
25757 /** Returns the public key of a EC_KEY object.
25758  *  \param  key  the EC_KEY object
25759  *  \return a EC_POINT object with the public key (possibly NULL)
25760  */
25761 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
25762 
25763 /** Sets the public key of a EC_KEY object.
25764  *  \param  key  EC_KEY object
25765  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
25766  *               will use an own copy of the EC_POINT object).
25767  *  \return 1 on success and 0 if an error occurred.
25768  */
25769 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
25770 
25771 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
25772 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
25773 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
25774 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
25775 /* functions to set/get method specific data  */
25776 void *EC_KEY_get_key_method_data(EC_KEY *key,
25777                                  void *(*dup_func) (void *),
25778                                  void (*free_func) (void *),
25779                                  void (*clear_free_func) (void *));
25780 /** Sets the key method data of an EC_KEY object, if none has yet been set.
25781  *  \param  key              EC_KEY object
25782  *  \param  data             opaque data to install.
25783  *  \param  dup_func         a function that duplicates |data|.
25784  *  \param  free_func        a function that frees |data|.
25785  *  \param  clear_free_func  a function that wipes and frees |data|.
25786  *  \return the previously set data pointer, or NULL if |data| was inserted.
25787  */
25788 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
25789                                     void *(*dup_func) (void *),
25790                                     void (*free_func) (void *),
25791                                     void (*clear_free_func) (void *));
25792 /* wrapper functions for the underlying EC_GROUP object */
25793 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
25794 
25795 /** Creates a table of pre-computed multiples of the generator to
25796  *  accelerate further EC_KEY operations.
25797  *  \param  key  EC_KEY object
25798  *  \param  ctx  BN_CTX object (optional)
25799  *  \return 1 on success and 0 if an error occurred.
25800  */
25801 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
25802 
25803 /** Creates a new ec private (and optional a new public) key.
25804  *  \param  key  EC_KEY object
25805  *  \return 1 on success and 0 if an error occurred.
25806  */
25807 int EC_KEY_generate_key(EC_KEY *key);
25808 
25809 /** Verifies that a private and/or public key is valid.
25810  *  \param  key  the EC_KEY object
25811  *  \return 1 on success and 0 otherwise.
25812  */
25813 int EC_KEY_check_key(const EC_KEY *key);
25814 
25815 /** Sets a public key from affine coordindates performing
25816  *  neccessary NIST PKV tests.
25817  *  \param  key  the EC_KEY object
25818  *  \param  x    public key x coordinate
25819  *  \param  y    public key y coordinate
25820  *  \return 1 on success and 0 otherwise.
25821  */
25822 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
25823                                              BIGNUM *y);
25824 
25825 /********************************************************************/
25826 /*        de- and encoding functions for SEC1 ECPrivateKey          */
25827 /********************************************************************/
25828 
25829 /** Decodes a private key from a memory buffer.
25830  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
25831  *  \param  in   pointer to memory with the DER encoded private key
25832  *  \param  len  length of the DER encoded private key
25833  *  \return the decoded private key or NULL if an error occurred.
25834  */
25835 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
25836 
25837 /** Encodes a private key object and stores the result in a buffer.
25838  *  \param  key  the EC_KEY object to encode
25839  *  \param  out  the buffer for the result (if NULL the function returns number
25840  *               of bytes needed).
25841  *  \return 1 on success and 0 if an error occurred.
25842  */
25843 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
25844 
25845 /********************************************************************/
25846 /*        de- and encoding functions for EC parameters              */
25847 /********************************************************************/
25848 
25849 /** Decodes ec parameter from a memory buffer.
25850  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
25851  *  \param  in   pointer to memory with the DER encoded ec parameters
25852  *  \param  len  length of the DER encoded ec parameters
25853  *  \return a EC_KEY object with the decoded parameters or NULL if an error
25854  *          occurred.
25855  */
25856 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
25857 
25858 /** Encodes ec parameter and stores the result in a buffer.
25859  *  \param  key  the EC_KEY object with ec paramters to encode
25860  *  \param  out  the buffer for the result (if NULL the function returns number
25861  *               of bytes needed).
25862  *  \return 1 on success and 0 if an error occurred.
25863  */
25864 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
25865 
25866 /********************************************************************/
25867 /*         de- and encoding functions for EC public key             */
25868 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
25869 /********************************************************************/
25870 
25871 /** Decodes a ec public key from a octet string.
25872  *  \param  key  a pointer to a EC_KEY object which should be used
25873  *  \param  in   memory buffer with the encoded public key
25874  *  \param  len  length of the encoded public key
25875  *  \return EC_KEY object with decoded public key or NULL if an error
25876  *          occurred.
25877  */
25878 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
25879 
25880 /** Encodes a ec public key in an octet string.
25881  *  \param  key  the EC_KEY object with the public key
25882  *  \param  out  the buffer for the result (if NULL the function returns number
25883  *               of bytes needed).
25884  *  \return 1 on success and 0 if an error occurred
25885  */
25886 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
25887 
25888 
25889 /** Prints out the ec parameters on human readable form.
25890  *  \param  bp   BIO object to which the information is printed
25891  *  \param  key  EC_KEY object
25892  *  \return 1 on success and 0 if an error occurred
25893  */
25894 int ECParameters_print(BIO *bp, const EC_KEY *key);
25895 
25896 /** Prints out the contents of a EC_KEY object
25897  *  \param  bp   BIO object to which the information is printed
25898  *  \param  key  EC_KEY object
25899  *  \param  off  line offset
25900  *  \return 1 on success and 0 if an error occurred
25901  */
25902 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
25903 
25904 
25905 
25906 /** Prints out the ec parameters on human readable form.
25907  *  \param  fp   file descriptor to which the information is printed
25908  *  \param  key  EC_KEY object
25909  *  \return 1 on success and 0 if an error occurred
25910  */
25911 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
25912 
25913 /** Prints out the contents of a EC_KEY object
25914  *  \param  fp   file descriptor to which the information is printed
25915  *  \param  key  EC_KEY object
25916  *  \param  off  line offset
25917  *  \return 1 on success and 0 if an error occurred
25918  */
25919 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
25920 # 1067 "/usr/include/openssl/ec.h" 3 4
25921 /* KDF types */
25922 
25923 
25924 
25925 /* BEGIN ERROR CODES */
25926 /*
25927  * The following lines are auto generated by the script mkerr.pl. Any changes
25928  * made after this point may be overwritten when the script is next run.
25929  */
25930 
25931 void ERR_load_EC_strings(void);
25932 
25933 /* Error codes for the EC functions. */
25934 
25935 /* Function codes. */
25936 # 1227 "/usr/include/openssl/ec.h" 3 4
25937 /* Reason codes. */
25938 # 84 "/usr/include/openssl/x509.h" 2 3 4
25939 
25940 
25941 
25942 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
25943 /* crypto/ecdsa/ecdsa.h */
25944 /**
25945  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
25946  * \author Written by Nils Larsch for the OpenSSL project
25947  */
25948 /* ====================================================================
25949  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
25950  *
25951  * Redistribution and use in source and binary forms, with or without
25952  * modification, are permitted provided that the following conditions
25953  * are met:
25954  *
25955  * 1. Redistributions of source code must retain the above copyright
25956  *    notice, this list of conditions and the following disclaimer.
25957  *
25958  * 2. Redistributions in binary form must reproduce the above copyright
25959  *    notice, this list of conditions and the following disclaimer in
25960  *    the documentation and/or other materials provided with the
25961  *    distribution.
25962  *
25963  * 3. All advertising materials mentioning features or use of this
25964  *    software must display the following acknowledgment:
25965  *    "This product includes software developed by the OpenSSL Project
25966  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
25967  *
25968  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25969  *    endorse or promote products derived from this software without
25970  *    prior written permission. For written permission, please contact
25971  *    licensing@OpenSSL.org.
25972  *
25973  * 5. Products derived from this software may not be called "OpenSSL"
25974  *    nor may "OpenSSL" appear in their names without prior written
25975  *    permission of the OpenSSL Project.
25976  *
25977  * 6. Redistributions of any form whatsoever must retain the following
25978  *    acknowledgment:
25979  *    "This product includes software developed by the OpenSSL Project
25980  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
25981  *
25982  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
25983  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25984  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25985  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
25986  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25987  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25988  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25989  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25990  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25991  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25992  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25993  * OF THE POSSIBILITY OF SUCH DAMAGE.
25994  * ====================================================================
25995  *
25996  * This product includes cryptographic software written by Eric Young
25997  * (eay@cryptsoft.com).  This product includes software written by Tim
25998  * Hudson (tjh@cryptsoft.com).
25999  *
26000  */
26001 
26002 
26003 
26004 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
26005 /* opensslconf.h */
26006 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
26007 
26008 
26009 
26010 
26011 /* OpenSSL was configured with the following options: */
26012 # 108 "/usr/include/openssl/opensslconf.h" 3 4
26013 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
26014    asks for it.  This is a transient feature that is provided for those
26015    who haven't had the time to do the appropriate changes in their
26016    applications.  */
26017 # 204 "/usr/include/openssl/opensslconf.h" 3 4
26018 /* crypto/opensslconf.h.in */
26019 
26020 /* Generate 80386 code? */
26021 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
26022 
26023 
26024 
26025 
26026 
26027 # 1 "/usr/include/openssl/ec.h" 1 3 4
26028 /* crypto/ec/ec.h */
26029 /*
26030  * Originally written by Bodo Moeller for the OpenSSL project.
26031  */
26032 /**
26033  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
26034  * \author Originally written by Bodo Moeller for the OpenSSL project
26035  */
26036 /* ====================================================================
26037  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
26038  *
26039  * Redistribution and use in source and binary forms, with or without
26040  * modification, are permitted provided that the following conditions
26041  * are met:
26042  *
26043  * 1. Redistributions of source code must retain the above copyright
26044  *    notice, this list of conditions and the following disclaimer.
26045  *
26046  * 2. Redistributions in binary form must reproduce the above copyright
26047  *    notice, this list of conditions and the following disclaimer in
26048  *    the documentation and/or other materials provided with the
26049  *    distribution.
26050  *
26051  * 3. All advertising materials mentioning features or use of this
26052  *    software must display the following acknowledgment:
26053  *    "This product includes software developed by the OpenSSL Project
26054  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26055  *
26056  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26057  *    endorse or promote products derived from this software without
26058  *    prior written permission. For written permission, please contact
26059  *    openssl-core@openssl.org.
26060  *
26061  * 5. Products derived from this software may not be called "OpenSSL"
26062  *    nor may "OpenSSL" appear in their names without prior written
26063  *    permission of the OpenSSL Project.
26064  *
26065  * 6. Redistributions of any form whatsoever must retain the following
26066  *    acknowledgment:
26067  *    "This product includes software developed by the OpenSSL Project
26068  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26069  *
26070  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26071  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26072  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26073  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26074  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26075  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26076  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26077  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26078  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26079  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26080  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26081  * OF THE POSSIBILITY OF SUCH DAMAGE.
26082  * ====================================================================
26083  *
26084  * This product includes cryptographic software written by Eric Young
26085  * (eay@cryptsoft.com).  This product includes software written by Tim
26086  * Hudson (tjh@cryptsoft.com).
26087  *
26088  */
26089 /* ====================================================================
26090  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26091  *
26092  * Portions of the attached software ("Contribution") are developed by
26093  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
26094  *
26095  * The Contribution is licensed pursuant to the OpenSSL open source
26096  * license provided above.
26097  *
26098  * The elliptic curve binary polynomial software is originally written by
26099  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
26100  *
26101  */
26102 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
26103 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
26104 /* ====================================================================
26105  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
26106  *
26107  * Redistribution and use in source and binary forms, with or without
26108  * modification, are permitted provided that the following conditions
26109  * are met:
26110  *
26111  * 1. Redistributions of source code must retain the above copyright
26112  *    notice, this list of conditions and the following disclaimer.
26113  *
26114  * 2. Redistributions in binary form must reproduce the above copyright
26115  *    notice, this list of conditions and the following disclaimer in
26116  *    the documentation and/or other materials provided with the
26117  *    distribution.
26118  *
26119  * 3. All advertising materials mentioning features or use of this
26120  *    software must display the following acknowledgment:
26121  *    "This product includes software developed by the OpenSSL Project
26122  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26123  *
26124  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26125  *    endorse or promote products derived from this software without
26126  *    prior written permission. For written permission, please contact
26127  *    openssl-core@openssl.org.
26128  *
26129  * 5. Products derived from this software may not be called "OpenSSL"
26130  *    nor may "OpenSSL" appear in their names without prior written
26131  *    permission of the OpenSSL Project.
26132  *
26133  * 6. Redistributions of any form whatsoever must retain the following
26134  *    acknowledgment:
26135  *    "This product includes software developed by the OpenSSL Project
26136  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26137  *
26138  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26139  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26140  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26141  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26142  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26143  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26144  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26145  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26146  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26147  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26148  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26149  * OF THE POSSIBILITY OF SUCH DAMAGE.
26150  * ====================================================================
26151  *
26152  * This product includes cryptographic software written by Eric Young
26153  * (eay@cryptsoft.com).  This product includes software written by Tim
26154  * Hudson (tjh@cryptsoft.com).
26155  *
26156  */
26157 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
26158 
26159 # 1 "/usr/include/openssl/bn.h" 1 3 4
26160 /* crypto/bn/bn.h */
26161 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
26162  * All rights reserved.
26163  *
26164  * This package is an SSL implementation written
26165  * by Eric Young (eay@cryptsoft.com).
26166  * The implementation was written so as to conform with Netscapes SSL.
26167  *
26168  * This library is free for commercial and non-commercial use as long as
26169  * the following conditions are aheared to.  The following conditions
26170  * apply to all code found in this distribution, be it the RC4, RSA,
26171  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26172  * included with this distribution is covered by the same copyright terms
26173  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26174  *
26175  * Copyright remains Eric Young's, and as such any Copyright notices in
26176  * the code are not to be removed.
26177  * If this package is used in a product, Eric Young should be given attribution
26178  * as the author of the parts of the library used.
26179  * This can be in the form of a textual message at program startup or
26180  * in documentation (online or textual) provided with the package.
26181  *
26182  * Redistribution and use in source and binary forms, with or without
26183  * modification, are permitted provided that the following conditions
26184  * are met:
26185  * 1. Redistributions of source code must retain the copyright
26186  *    notice, this list of conditions and the following disclaimer.
26187  * 2. Redistributions in binary form must reproduce the above copyright
26188  *    notice, this list of conditions and the following disclaimer in the
26189  *    documentation and/or other materials provided with the distribution.
26190  * 3. All advertising materials mentioning features or use of this software
26191  *    must display the following acknowledgement:
26192  *    "This product includes cryptographic software written by
26193  *     Eric Young (eay@cryptsoft.com)"
26194  *    The word 'cryptographic' can be left out if the rouines from the library
26195  *    being used are not cryptographic related :-).
26196  * 4. If you include any Windows specific code (or a derivative thereof) from
26197  *    the apps directory (application code) you must include an acknowledgement:
26198  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26199  *
26200  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26201  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26202  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26203  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26204  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26205  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26206  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26207  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26208  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26209  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26210  * SUCH DAMAGE.
26211  *
26212  * The licence and distribution terms for any publically available version or
26213  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26214  * copied and put under another distribution licence
26215  * [including the GNU Public Licence.]
26216  */
26217 /* ====================================================================
26218  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
26219  *
26220  * Redistribution and use in source and binary forms, with or without
26221  * modification, are permitted provided that the following conditions
26222  * are met:
26223  *
26224  * 1. Redistributions of source code must retain the above copyright
26225  *    notice, this list of conditions and the following disclaimer.
26226  *
26227  * 2. Redistributions in binary form must reproduce the above copyright
26228  *    notice, this list of conditions and the following disclaimer in
26229  *    the documentation and/or other materials provided with the
26230  *    distribution.
26231  *
26232  * 3. All advertising materials mentioning features or use of this
26233  *    software must display the following acknowledgment:
26234  *    "This product includes software developed by the OpenSSL Project
26235  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26236  *
26237  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26238  *    endorse or promote products derived from this software without
26239  *    prior written permission. For written permission, please contact
26240  *    openssl-core@openssl.org.
26241  *
26242  * 5. Products derived from this software may not be called "OpenSSL"
26243  *    nor may "OpenSSL" appear in their names without prior written
26244  *    permission of the OpenSSL Project.
26245  *
26246  * 6. Redistributions of any form whatsoever must retain the following
26247  *    acknowledgment:
26248  *    "This product includes software developed by the OpenSSL Project
26249  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26250  *
26251  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26252  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26253  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26254  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26255  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26256  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26257  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26258  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26259  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26260  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26261  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26262  * OF THE POSSIBILITY OF SUCH DAMAGE.
26263  * ====================================================================
26264  *
26265  * This product includes cryptographic software written by Eric Young
26266  * (eay@cryptsoft.com).  This product includes software written by Tim
26267  * Hudson (tjh@cryptsoft.com).
26268  *
26269  */
26270 /* ====================================================================
26271  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26272  *
26273  * Portions of the attached software ("Contribution") are developed by
26274  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
26275  *
26276  * The Contribution is licensed pursuant to the Eric Young open source
26277  * license provided above.
26278  *
26279  * The binary polynomial arithmetic software is originally written by
26280  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
26281  *
26282  */
26283 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
26284 
26285 
26286 
26287 
26288 
26289 
26290 typedef struct ECDSA_SIG_st {
26291     BIGNUM *r;
26292     BIGNUM *s;
26293 } ECDSA_SIG;
26294 
26295 /** Allocates and initialize a ECDSA_SIG structure
26296  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
26297  */
26298 ECDSA_SIG *ECDSA_SIG_new(void);
26299 
26300 /** frees a ECDSA_SIG structure
26301  *  \param  sig  pointer to the ECDSA_SIG structure
26302  */
26303 void ECDSA_SIG_free(ECDSA_SIG *sig);
26304 
26305 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
26306  *  (*pp += length of the DER encoded signature)).
26307  *  \param  sig  pointer to the ECDSA_SIG object
26308  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
26309  *  \return the length of the DER encoded ECDSA_SIG object or 0
26310  */
26311 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
26312 
26313 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
26314  *  (*pp += len)).
26315  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
26316  *  \param  pp   memory buffer with the DER encoded signature
26317  *  \param  len  length of the buffer
26318  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
26319  */
26320 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
26321 
26322 /** Computes the ECDSA signature of the given hash value using
26323  *  the supplied private key and returns the created signature.
26324  *  \param  dgst      pointer to the hash value
26325  *  \param  dgst_len  length of the hash value
26326  *  \param  eckey     EC_KEY object containing a private EC key
26327  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
26328  */
26329 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
26330                          EC_KEY *eckey);
26331 
26332 /** Computes ECDSA signature of a given hash value using the supplied
26333  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
26334  *  \param  dgst     pointer to the hash value to sign
26335  *  \param  dgstlen  length of the hash value
26336  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
26337  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
26338  *                   see ECDSA_sign_setup
26339  *  \param  eckey    EC_KEY object containing a private EC key
26340  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
26341  */
26342 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
26343                             const BIGNUM *kinv, const BIGNUM *rp,
26344                             EC_KEY *eckey);
26345 
26346 /** Verifies that the supplied signature is a valid ECDSA
26347  *  signature of the supplied hash value using the supplied public key.
26348  *  \param  dgst      pointer to the hash value
26349  *  \param  dgst_len  length of the hash value
26350  *  \param  sig       ECDSA_SIG structure
26351  *  \param  eckey     EC_KEY object containing a public EC key
26352  *  \return 1 if the signature is valid, 0 if the signature is invalid
26353  *          and -1 on error
26354  */
26355 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
26356                     const ECDSA_SIG *sig, EC_KEY *eckey);
26357 
26358 const ECDSA_METHOD *ECDSA_OpenSSL(void);
26359 
26360 /** Sets the default ECDSA method
26361  *  \param  meth  new default ECDSA_METHOD
26362  */
26363 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
26364 
26365 /** Returns the default ECDSA method
26366  *  \return pointer to ECDSA_METHOD structure containing the default method
26367  */
26368 const ECDSA_METHOD *ECDSA_get_default_method(void);
26369 
26370 /** Sets method to be used for the ECDSA operations
26371  *  \param  eckey  EC_KEY object
26372  *  \param  meth   new method
26373  *  \return 1 on success and 0 otherwise
26374  */
26375 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
26376 
26377 /** Returns the maximum length of the DER encoded signature
26378  *  \param  eckey  EC_KEY object
26379  *  \return numbers of bytes required for the DER encoded signature
26380  */
26381 int ECDSA_size(const EC_KEY *eckey);
26382 
26383 /** Precompute parts of the signing operation
26384  *  \param  eckey  EC_KEY object containing a private EC key
26385  *  \param  ctx    BN_CTX object (optional)
26386  *  \param  kinv   BIGNUM pointer for the inverse of k
26387  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
26388  *  \return 1 on success and 0 otherwise
26389  */
26390 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
26391 
26392 /** Computes ECDSA signature of a given hash value using the supplied
26393  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
26394  *  \param  type     this parameter is ignored
26395  *  \param  dgst     pointer to the hash value to sign
26396  *  \param  dgstlen  length of the hash value
26397  *  \param  sig      memory for the DER encoded created signature
26398  *  \param  siglen   pointer to the length of the returned signature
26399  *  \param  eckey    EC_KEY object containing a private EC key
26400  *  \return 1 on success and 0 otherwise
26401  */
26402 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
26403                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
26404 
26405 /** Computes ECDSA signature of a given hash value using the supplied
26406  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
26407  *  \param  type     this parameter is ignored
26408  *  \param  dgst     pointer to the hash value to sign
26409  *  \param  dgstlen  length of the hash value
26410  *  \param  sig      buffer to hold the DER encoded signature
26411  *  \param  siglen   pointer to the length of the returned signature
26412  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
26413  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
26414  *                   see ECDSA_sign_setup
26415  *  \param  eckey    EC_KEY object containing a private EC key
26416  *  \return 1 on success and 0 otherwise
26417  */
26418 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
26419                   unsigned char *sig, unsigned int *siglen,
26420                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
26421 
26422 /** Verifies that the given signature is valid ECDSA signature
26423  *  of the supplied hash value using the specified public key.
26424  *  \param  type     this parameter is ignored
26425  *  \param  dgst     pointer to the hash value
26426  *  \param  dgstlen  length of the hash value
26427  *  \param  sig      pointer to the DER encoded signature
26428  *  \param  siglen   length of the DER encoded signature
26429  *  \param  eckey    EC_KEY object containing a public EC key
26430  *  \return 1 if the signature is valid, 0 if the signature is invalid
26431  *          and -1 on error
26432  */
26433 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
26434                  const unsigned char *sig, int siglen, EC_KEY *eckey);
26435 
26436 /* the standard ex_data functions */
26437 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
26438                            *new_func, CRYPTO_EX_dup *dup_func,
26439                            CRYPTO_EX_free *free_func);
26440 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
26441 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
26442 
26443 /** Allocates and initialize a ECDSA_METHOD structure
26444  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
26445  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
26446  */
26447 
26448 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
26449 
26450 /** frees a ECDSA_METHOD structure
26451  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
26452  */
26453 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
26454 
26455 /**  Sets application specific data in the ECDSA_METHOD
26456  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
26457  *   \param  app application specific data to set
26458  */
26459 
26460 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
26461 
26462 /** Returns application specific data from a ECDSA_METHOD structure
26463  *  \param ecdsa_method pointer to ECDSA_METHOD structure
26464  *  \return pointer to application specific data.
26465  */
26466 
26467 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
26468 
26469 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
26470  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
26471  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
26472  */
26473 
26474 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
26475                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
26476                                                         *dgst, int dgst_len,
26477                                                         const BIGNUM *inv,
26478                                                         const BIGNUM *rp,
26479                                                         EC_KEY *eckey));
26480 
26481 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
26482  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
26483  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
26484  */
26485 
26486 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
26487                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
26488                                                           BN_CTX *ctx,
26489                                                           BIGNUM **kinv,
26490                                                           BIGNUM **r));
26491 
26492 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
26493  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
26494  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
26495  */
26496 
26497 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
26498                              int (*ecdsa_do_verify) (const unsigned char
26499                                                      *dgst, int dgst_len,
26500                                                      const ECDSA_SIG *sig,
26501                                                      EC_KEY *eckey));
26502 
26503 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
26504 
26505 /**  Set the flags field in the ECDSA_METHOD
26506  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
26507  *   \param  flags flags value to set
26508  */
26509 
26510 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
26511 
26512 /**  Set the name field in the ECDSA_METHOD
26513  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
26514  *   \param  name name to set
26515  */
26516 
26517 /* BEGIN ERROR CODES */
26518 /*
26519  * The following lines are auto generated by the script mkerr.pl. Any changes
26520  * made after this point may be overwritten when the script is next run.
26521  */
26522 void ERR_load_ECDSA_strings(void);
26523 
26524 /* Error codes for the ECDSA functions. */
26525 
26526 /* Function codes. */
26527 
26528 
26529 
26530 
26531 
26532 
26533 
26534 /* Reason codes. */
26535 # 88 "/usr/include/openssl/x509.h" 2 3 4
26536 
26537 
26538 
26539 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
26540 /* crypto/ecdh/ecdh.h */
26541 /* ====================================================================
26542  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26543  *
26544  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
26545  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
26546  * to the OpenSSL project.
26547  *
26548  * The ECC Code is licensed pursuant to the OpenSSL open source
26549  * license provided below.
26550  *
26551  * The ECDH software is originally written by Douglas Stebila of
26552  * Sun Microsystems Laboratories.
26553  *
26554  */
26555 /* ====================================================================
26556  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
26557  *
26558  * Redistribution and use in source and binary forms, with or without
26559  * modification, are permitted provided that the following conditions
26560  * are met:
26561  *
26562  * 1. Redistributions of source code must retain the above copyright
26563  *    notice, this list of conditions and the following disclaimer.
26564  *
26565  * 2. Redistributions in binary form must reproduce the above copyright
26566  *    notice, this list of conditions and the following disclaimer in
26567  *    the documentation and/or other materials provided with the
26568  *    distribution.
26569  *
26570  * 3. All advertising materials mentioning features or use of this
26571  *    software must display the following acknowledgment:
26572  *    "This product includes software developed by the OpenSSL Project
26573  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
26574  *
26575  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26576  *    endorse or promote products derived from this software without
26577  *    prior written permission. For written permission, please contact
26578  *    licensing@OpenSSL.org.
26579  *
26580  * 5. Products derived from this software may not be called "OpenSSL"
26581  *    nor may "OpenSSL" appear in their names without prior written
26582  *    permission of the OpenSSL Project.
26583  *
26584  * 6. Redistributions of any form whatsoever must retain the following
26585  *    acknowledgment:
26586  *    "This product includes software developed by the OpenSSL Project
26587  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
26588  *
26589  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26590  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26591  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26592  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26593  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26594  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26595  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26596  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26597  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26598  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26599  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26600  * OF THE POSSIBILITY OF SUCH DAMAGE.
26601  * ====================================================================
26602  *
26603  * This product includes cryptographic software written by Eric Young
26604  * (eay@cryptsoft.com).  This product includes software written by Tim
26605  * Hudson (tjh@cryptsoft.com).
26606  *
26607  */
26608 
26609 
26610 
26611 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
26612 /* opensslconf.h */
26613 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
26614 
26615 
26616 
26617 
26618 /* OpenSSL was configured with the following options: */
26619 # 108 "/usr/include/openssl/opensslconf.h" 3 4
26620 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
26621    asks for it.  This is a transient feature that is provided for those
26622    who haven't had the time to do the appropriate changes in their
26623    applications.  */
26624 # 204 "/usr/include/openssl/opensslconf.h" 3 4
26625 /* crypto/opensslconf.h.in */
26626 
26627 /* Generate 80386 code? */
26628 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
26629 
26630 
26631 
26632 
26633 
26634 # 1 "/usr/include/openssl/ec.h" 1 3 4
26635 /* crypto/ec/ec.h */
26636 /*
26637  * Originally written by Bodo Moeller for the OpenSSL project.
26638  */
26639 /**
26640  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
26641  * \author Originally written by Bodo Moeller for the OpenSSL project
26642  */
26643 /* ====================================================================
26644  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
26645  *
26646  * Redistribution and use in source and binary forms, with or without
26647  * modification, are permitted provided that the following conditions
26648  * are met:
26649  *
26650  * 1. Redistributions of source code must retain the above copyright
26651  *    notice, this list of conditions and the following disclaimer.
26652  *
26653  * 2. Redistributions in binary form must reproduce the above copyright
26654  *    notice, this list of conditions and the following disclaimer in
26655  *    the documentation and/or other materials provided with the
26656  *    distribution.
26657  *
26658  * 3. All advertising materials mentioning features or use of this
26659  *    software must display the following acknowledgment:
26660  *    "This product includes software developed by the OpenSSL Project
26661  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26662  *
26663  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26664  *    endorse or promote products derived from this software without
26665  *    prior written permission. For written permission, please contact
26666  *    openssl-core@openssl.org.
26667  *
26668  * 5. Products derived from this software may not be called "OpenSSL"
26669  *    nor may "OpenSSL" appear in their names without prior written
26670  *    permission of the OpenSSL Project.
26671  *
26672  * 6. Redistributions of any form whatsoever must retain the following
26673  *    acknowledgment:
26674  *    "This product includes software developed by the OpenSSL Project
26675  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26676  *
26677  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26678  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26679  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26680  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26681  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26682  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26683  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26684  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26685  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26686  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26687  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26688  * OF THE POSSIBILITY OF SUCH DAMAGE.
26689  * ====================================================================
26690  *
26691  * This product includes cryptographic software written by Eric Young
26692  * (eay@cryptsoft.com).  This product includes software written by Tim
26693  * Hudson (tjh@cryptsoft.com).
26694  *
26695  */
26696 /* ====================================================================
26697  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26698  *
26699  * Portions of the attached software ("Contribution") are developed by
26700  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
26701  *
26702  * The Contribution is licensed pursuant to the OpenSSL open source
26703  * license provided above.
26704  *
26705  * The elliptic curve binary polynomial software is originally written by
26706  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
26707  *
26708  */
26709 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
26710 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
26711 /* ====================================================================
26712  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
26713  *
26714  * Redistribution and use in source and binary forms, with or without
26715  * modification, are permitted provided that the following conditions
26716  * are met:
26717  *
26718  * 1. Redistributions of source code must retain the above copyright
26719  *    notice, this list of conditions and the following disclaimer.
26720  *
26721  * 2. Redistributions in binary form must reproduce the above copyright
26722  *    notice, this list of conditions and the following disclaimer in
26723  *    the documentation and/or other materials provided with the
26724  *    distribution.
26725  *
26726  * 3. All advertising materials mentioning features or use of this
26727  *    software must display the following acknowledgment:
26728  *    "This product includes software developed by the OpenSSL Project
26729  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26730  *
26731  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26732  *    endorse or promote products derived from this software without
26733  *    prior written permission. For written permission, please contact
26734  *    openssl-core@openssl.org.
26735  *
26736  * 5. Products derived from this software may not be called "OpenSSL"
26737  *    nor may "OpenSSL" appear in their names without prior written
26738  *    permission of the OpenSSL Project.
26739  *
26740  * 6. Redistributions of any form whatsoever must retain the following
26741  *    acknowledgment:
26742  *    "This product includes software developed by the OpenSSL Project
26743  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26744  *
26745  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26746  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26747  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26748  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26749  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26750  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26751  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26752  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26753  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26754  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26755  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26756  * OF THE POSSIBILITY OF SUCH DAMAGE.
26757  * ====================================================================
26758  *
26759  * This product includes cryptographic software written by Eric Young
26760  * (eay@cryptsoft.com).  This product includes software written by Tim
26761  * Hudson (tjh@cryptsoft.com).
26762  *
26763  */
26764 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
26765 
26766 # 1 "/usr/include/openssl/bn.h" 1 3 4
26767 /* crypto/bn/bn.h */
26768 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
26769  * All rights reserved.
26770  *
26771  * This package is an SSL implementation written
26772  * by Eric Young (eay@cryptsoft.com).
26773  * The implementation was written so as to conform with Netscapes SSL.
26774  *
26775  * This library is free for commercial and non-commercial use as long as
26776  * the following conditions are aheared to.  The following conditions
26777  * apply to all code found in this distribution, be it the RC4, RSA,
26778  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26779  * included with this distribution is covered by the same copyright terms
26780  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26781  *
26782  * Copyright remains Eric Young's, and as such any Copyright notices in
26783  * the code are not to be removed.
26784  * If this package is used in a product, Eric Young should be given attribution
26785  * as the author of the parts of the library used.
26786  * This can be in the form of a textual message at program startup or
26787  * in documentation (online or textual) provided with the package.
26788  *
26789  * Redistribution and use in source and binary forms, with or without
26790  * modification, are permitted provided that the following conditions
26791  * are met:
26792  * 1. Redistributions of source code must retain the copyright
26793  *    notice, this list of conditions and the following disclaimer.
26794  * 2. Redistributions in binary form must reproduce the above copyright
26795  *    notice, this list of conditions and the following disclaimer in the
26796  *    documentation and/or other materials provided with the distribution.
26797  * 3. All advertising materials mentioning features or use of this software
26798  *    must display the following acknowledgement:
26799  *    "This product includes cryptographic software written by
26800  *     Eric Young (eay@cryptsoft.com)"
26801  *    The word 'cryptographic' can be left out if the rouines from the library
26802  *    being used are not cryptographic related :-).
26803  * 4. If you include any Windows specific code (or a derivative thereof) from
26804  *    the apps directory (application code) you must include an acknowledgement:
26805  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26806  *
26807  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26808  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26809  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26810  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26811  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26812  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26813  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26814  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26815  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26816  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26817  * SUCH DAMAGE.
26818  *
26819  * The licence and distribution terms for any publically available version or
26820  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26821  * copied and put under another distribution licence
26822  * [including the GNU Public Licence.]
26823  */
26824 /* ====================================================================
26825  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
26826  *
26827  * Redistribution and use in source and binary forms, with or without
26828  * modification, are permitted provided that the following conditions
26829  * are met:
26830  *
26831  * 1. Redistributions of source code must retain the above copyright
26832  *    notice, this list of conditions and the following disclaimer.
26833  *
26834  * 2. Redistributions in binary form must reproduce the above copyright
26835  *    notice, this list of conditions and the following disclaimer in
26836  *    the documentation and/or other materials provided with the
26837  *    distribution.
26838  *
26839  * 3. All advertising materials mentioning features or use of this
26840  *    software must display the following acknowledgment:
26841  *    "This product includes software developed by the OpenSSL Project
26842  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26843  *
26844  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26845  *    endorse or promote products derived from this software without
26846  *    prior written permission. For written permission, please contact
26847  *    openssl-core@openssl.org.
26848  *
26849  * 5. Products derived from this software may not be called "OpenSSL"
26850  *    nor may "OpenSSL" appear in their names without prior written
26851  *    permission of the OpenSSL Project.
26852  *
26853  * 6. Redistributions of any form whatsoever must retain the following
26854  *    acknowledgment:
26855  *    "This product includes software developed by the OpenSSL Project
26856  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26857  *
26858  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26859  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26860  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26861  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26862  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26863  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26864  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26865  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26866  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26867  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26868  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26869  * OF THE POSSIBILITY OF SUCH DAMAGE.
26870  * ====================================================================
26871  *
26872  * This product includes cryptographic software written by Eric Young
26873  * (eay@cryptsoft.com).  This product includes software written by Tim
26874  * Hudson (tjh@cryptsoft.com).
26875  *
26876  */
26877 /* ====================================================================
26878  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26879  *
26880  * Portions of the attached software ("Contribution") are developed by
26881  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
26882  *
26883  * The Contribution is licensed pursuant to the Eric Young open source
26884  * license provided above.
26885  *
26886  * The binary polynomial arithmetic software is originally written by
26887  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
26888  *
26889  */
26890 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
26891 # 90 "/usr/include/openssl/ecdh.h" 3 4
26892 const ECDH_METHOD *ECDH_OpenSSL(void);
26893 
26894 void ECDH_set_default_method(const ECDH_METHOD *);
26895 const ECDH_METHOD *ECDH_get_default_method(void);
26896 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
26897 
26898 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
26899                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
26900                                                  void *out, size_t *outlen));
26901 
26902 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
26903                           *new_func, CRYPTO_EX_dup *dup_func,
26904                           CRYPTO_EX_free *free_func);
26905 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
26906 void *ECDH_get_ex_data(EC_KEY *d, int idx);
26907 
26908 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
26909                    const unsigned char *Z, size_t Zlen,
26910                    const unsigned char *sinfo, size_t sinfolen,
26911                    const EVP_MD *md);
26912 
26913 /* BEGIN ERROR CODES */
26914 /*
26915  * The following lines are auto generated by the script mkerr.pl. Any changes
26916  * made after this point may be overwritten when the script is next run.
26917  */
26918 void ERR_load_ECDH_strings(void);
26919 
26920 /* Error codes for the ECDH functions. */
26921 
26922 /* Function codes. */
26923 
26924 
26925 
26926 
26927 /* Reason codes. */
26928 # 92 "/usr/include/openssl/x509.h" 2 3 4
26929 
26930 
26931 
26932 
26933 # 1 "/usr/include/openssl/rsa.h" 1 3 4
26934 /* crypto/rsa/rsa.h */
26935 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26936  * All rights reserved.
26937  *
26938  * This package is an SSL implementation written
26939  * by Eric Young (eay@cryptsoft.com).
26940  * The implementation was written so as to conform with Netscapes SSL.
26941  *
26942  * This library is free for commercial and non-commercial use as long as
26943  * the following conditions are aheared to.  The following conditions
26944  * apply to all code found in this distribution, be it the RC4, RSA,
26945  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26946  * included with this distribution is covered by the same copyright terms
26947  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26948  *
26949  * Copyright remains Eric Young's, and as such any Copyright notices in
26950  * the code are not to be removed.
26951  * If this package is used in a product, Eric Young should be given attribution
26952  * as the author of the parts of the library used.
26953  * This can be in the form of a textual message at program startup or
26954  * in documentation (online or textual) provided with the package.
26955  *
26956  * Redistribution and use in source and binary forms, with or without
26957  * modification, are permitted provided that the following conditions
26958  * are met:
26959  * 1. Redistributions of source code must retain the copyright
26960  *    notice, this list of conditions and the following disclaimer.
26961  * 2. Redistributions in binary form must reproduce the above copyright
26962  *    notice, this list of conditions and the following disclaimer in the
26963  *    documentation and/or other materials provided with the distribution.
26964  * 3. All advertising materials mentioning features or use of this software
26965  *    must display the following acknowledgement:
26966  *    "This product includes cryptographic software written by
26967  *     Eric Young (eay@cryptsoft.com)"
26968  *    The word 'cryptographic' can be left out if the rouines from the library
26969  *    being used are not cryptographic related :-).
26970  * 4. If you include any Windows specific code (or a derivative thereof) from
26971  *    the apps directory (application code) you must include an acknowledgement:
26972  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26973  *
26974  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26975  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26976  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26977  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26978  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26979  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26980  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26981  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26982  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26983  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26984  * SUCH DAMAGE.
26985  *
26986  * The licence and distribution terms for any publically available version or
26987  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26988  * copied and put under another distribution licence
26989  * [including the GNU Public Licence.]
26990  */
26991 
26992 
26993 
26994 
26995 # 1 "/usr/include/openssl/asn1.h" 1 3 4
26996 /* crypto/asn1/asn1.h */
26997 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26998  * All rights reserved.
26999  *
27000  * This package is an SSL implementation written
27001  * by Eric Young (eay@cryptsoft.com).
27002  * The implementation was written so as to conform with Netscapes SSL.
27003  *
27004  * This library is free for commercial and non-commercial use as long as
27005  * the following conditions are aheared to.  The following conditions
27006  * apply to all code found in this distribution, be it the RC4, RSA,
27007  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27008  * included with this distribution is covered by the same copyright terms
27009  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27010  *
27011  * Copyright remains Eric Young's, and as such any Copyright notices in
27012  * the code are not to be removed.
27013  * If this package is used in a product, Eric Young should be given attribution
27014  * as the author of the parts of the library used.
27015  * This can be in the form of a textual message at program startup or
27016  * in documentation (online or textual) provided with the package.
27017  *
27018  * Redistribution and use in source and binary forms, with or without
27019  * modification, are permitted provided that the following conditions
27020  * are met:
27021  * 1. Redistributions of source code must retain the copyright
27022  *    notice, this list of conditions and the following disclaimer.
27023  * 2. Redistributions in binary form must reproduce the above copyright
27024  *    notice, this list of conditions and the following disclaimer in the
27025  *    documentation and/or other materials provided with the distribution.
27026  * 3. All advertising materials mentioning features or use of this software
27027  *    must display the following acknowledgement:
27028  *    "This product includes cryptographic software written by
27029  *     Eric Young (eay@cryptsoft.com)"
27030  *    The word 'cryptographic' can be left out if the rouines from the library
27031  *    being used are not cryptographic related :-).
27032  * 4. If you include any Windows specific code (or a derivative thereof) from
27033  *    the apps directory (application code) you must include an acknowledgement:
27034  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27035  *
27036  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27037  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27038  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27039  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27040  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27041  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27042  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27043  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27044  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27045  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27046  * SUCH DAMAGE.
27047  *
27048  * The licence and distribution terms for any publically available version or
27049  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27050  * copied and put under another distribution licence
27051  * [including the GNU Public Licence.]
27052  */
27053 # 63 "/usr/include/openssl/rsa.h" 2 3 4
27054 
27055 
27056 # 1 "/usr/include/openssl/bio.h" 1 3 4
27057 /* crypto/bio/bio.h */
27058 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27059  * All rights reserved.
27060  *
27061  * This package is an SSL implementation written
27062  * by Eric Young (eay@cryptsoft.com).
27063  * The implementation was written so as to conform with Netscapes SSL.
27064  *
27065  * This library is free for commercial and non-commercial use as long as
27066  * the following conditions are aheared to.  The following conditions
27067  * apply to all code found in this distribution, be it the RC4, RSA,
27068  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27069  * included with this distribution is covered by the same copyright terms
27070  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27071  *
27072  * Copyright remains Eric Young's, and as such any Copyright notices in
27073  * the code are not to be removed.
27074  * If this package is used in a product, Eric Young should be given attribution
27075  * as the author of the parts of the library used.
27076  * This can be in the form of a textual message at program startup or
27077  * in documentation (online or textual) provided with the package.
27078  *
27079  * Redistribution and use in source and binary forms, with or without
27080  * modification, are permitted provided that the following conditions
27081  * are met:
27082  * 1. Redistributions of source code must retain the copyright
27083  *    notice, this list of conditions and the following disclaimer.
27084  * 2. Redistributions in binary form must reproduce the above copyright
27085  *    notice, this list of conditions and the following disclaimer in the
27086  *    documentation and/or other materials provided with the distribution.
27087  * 3. All advertising materials mentioning features or use of this software
27088  *    must display the following acknowledgement:
27089  *    "This product includes cryptographic software written by
27090  *     Eric Young (eay@cryptsoft.com)"
27091  *    The word 'cryptographic' can be left out if the rouines from the library
27092  *    being used are not cryptographic related :-).
27093  * 4. If you include any Windows specific code (or a derivative thereof) from
27094  *    the apps directory (application code) you must include an acknowledgement:
27095  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27096  *
27097  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27098  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27099  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27100  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27101  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27102  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27103  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27104  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27105  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27106  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27107  * SUCH DAMAGE.
27108  *
27109  * The licence and distribution terms for any publically available version or
27110  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27111  * copied and put under another distribution licence
27112  * [including the GNU Public Licence.]
27113  */
27114 # 66 "/usr/include/openssl/rsa.h" 2 3 4
27115 
27116 # 1 "/usr/include/openssl/crypto.h" 1 3 4
27117 /* crypto/crypto.h */
27118 /* ====================================================================
27119  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
27120  *
27121  * Redistribution and use in source and binary forms, with or without
27122  * modification, are permitted provided that the following conditions
27123  * are met:
27124  *
27125  * 1. Redistributions of source code must retain the above copyright
27126  *    notice, this list of conditions and the following disclaimer.
27127  *
27128  * 2. Redistributions in binary form must reproduce the above copyright
27129  *    notice, this list of conditions and the following disclaimer in
27130  *    the documentation and/or other materials provided with the
27131  *    distribution.
27132  *
27133  * 3. All advertising materials mentioning features or use of this
27134  *    software must display the following acknowledgment:
27135  *    "This product includes software developed by the OpenSSL Project
27136  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
27137  *
27138  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27139  *    endorse or promote products derived from this software without
27140  *    prior written permission. For written permission, please contact
27141  *    openssl-core@openssl.org.
27142  *
27143  * 5. Products derived from this software may not be called "OpenSSL"
27144  *    nor may "OpenSSL" appear in their names without prior written
27145  *    permission of the OpenSSL Project.
27146  *
27147  * 6. Redistributions of any form whatsoever must retain the following
27148  *    acknowledgment:
27149  *    "This product includes software developed by the OpenSSL Project
27150  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
27151  *
27152  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
27153  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27154  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27155  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
27156  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27157  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27158  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27159  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27160  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27161  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27162  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27163  * OF THE POSSIBILITY OF SUCH DAMAGE.
27164  * ====================================================================
27165  *
27166  * This product includes cryptographic software written by Eric Young
27167  * (eay@cryptsoft.com).  This product includes software written by Tim
27168  * Hudson (tjh@cryptsoft.com).
27169  *
27170  */
27171 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27172  * All rights reserved.
27173  *
27174  * This package is an SSL implementation written
27175  * by Eric Young (eay@cryptsoft.com).
27176  * The implementation was written so as to conform with Netscapes SSL.
27177  *
27178  * This library is free for commercial and non-commercial use as long as
27179  * the following conditions are aheared to.  The following conditions
27180  * apply to all code found in this distribution, be it the RC4, RSA,
27181  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27182  * included with this distribution is covered by the same copyright terms
27183  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27184  *
27185  * Copyright remains Eric Young's, and as such any Copyright notices in
27186  * the code are not to be removed.
27187  * If this package is used in a product, Eric Young should be given attribution
27188  * as the author of the parts of the library used.
27189  * This can be in the form of a textual message at program startup or
27190  * in documentation (online or textual) provided with the package.
27191  *
27192  * Redistribution and use in source and binary forms, with or without
27193  * modification, are permitted provided that the following conditions
27194  * are met:
27195  * 1. Redistributions of source code must retain the copyright
27196  *    notice, this list of conditions and the following disclaimer.
27197  * 2. Redistributions in binary form must reproduce the above copyright
27198  *    notice, this list of conditions and the following disclaimer in the
27199  *    documentation and/or other materials provided with the distribution.
27200  * 3. All advertising materials mentioning features or use of this software
27201  *    must display the following acknowledgement:
27202  *    "This product includes cryptographic software written by
27203  *     Eric Young (eay@cryptsoft.com)"
27204  *    The word 'cryptographic' can be left out if the rouines from the library
27205  *    being used are not cryptographic related :-).
27206  * 4. If you include any Windows specific code (or a derivative thereof) from
27207  *    the apps directory (application code) you must include an acknowledgement:
27208  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27209  *
27210  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27211  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27212  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27213  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27214  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27215  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27216  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27217  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27218  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27219  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27220  * SUCH DAMAGE.
27221  *
27222  * The licence and distribution terms for any publically available version or
27223  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27224  * copied and put under another distribution licence
27225  * [including the GNU Public Licence.]
27226  */
27227 /* ====================================================================
27228  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
27229  * ECDH support in OpenSSL originally developed by
27230  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
27231  */
27232 # 68 "/usr/include/openssl/rsa.h" 2 3 4
27233 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
27234 /* ====================================================================
27235  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
27236  *
27237  * Redistribution and use in source and binary forms, with or without
27238  * modification, are permitted provided that the following conditions
27239  * are met:
27240  *
27241  * 1. Redistributions of source code must retain the above copyright
27242  *    notice, this list of conditions and the following disclaimer.
27243  *
27244  * 2. Redistributions in binary form must reproduce the above copyright
27245  *    notice, this list of conditions and the following disclaimer in
27246  *    the documentation and/or other materials provided with the
27247  *    distribution.
27248  *
27249  * 3. All advertising materials mentioning features or use of this
27250  *    software must display the following acknowledgment:
27251  *    "This product includes software developed by the OpenSSL Project
27252  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
27253  *
27254  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27255  *    endorse or promote products derived from this software without
27256  *    prior written permission. For written permission, please contact
27257  *    openssl-core@openssl.org.
27258  *
27259  * 5. Products derived from this software may not be called "OpenSSL"
27260  *    nor may "OpenSSL" appear in their names without prior written
27261  *    permission of the OpenSSL Project.
27262  *
27263  * 6. Redistributions of any form whatsoever must retain the following
27264  *    acknowledgment:
27265  *    "This product includes software developed by the OpenSSL Project
27266  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
27267  *
27268  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
27269  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27270  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27271  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
27272  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27273  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27274  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27275  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27276  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27277  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27278  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27279  * OF THE POSSIBILITY OF SUCH DAMAGE.
27280  * ====================================================================
27281  *
27282  * This product includes cryptographic software written by Eric Young
27283  * (eay@cryptsoft.com).  This product includes software written by Tim
27284  * Hudson (tjh@cryptsoft.com).
27285  *
27286  */
27287 # 69 "/usr/include/openssl/rsa.h" 2 3 4
27288 
27289 # 1 "/usr/include/openssl/bn.h" 1 3 4
27290 /* crypto/bn/bn.h */
27291 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
27292  * All rights reserved.
27293  *
27294  * This package is an SSL implementation written
27295  * by Eric Young (eay@cryptsoft.com).
27296  * The implementation was written so as to conform with Netscapes SSL.
27297  *
27298  * This library is free for commercial and non-commercial use as long as
27299  * the following conditions are aheared to.  The following conditions
27300  * apply to all code found in this distribution, be it the RC4, RSA,
27301  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27302  * included with this distribution is covered by the same copyright terms
27303  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27304  *
27305  * Copyright remains Eric Young's, and as such any Copyright notices in
27306  * the code are not to be removed.
27307  * If this package is used in a product, Eric Young should be given attribution
27308  * as the author of the parts of the library used.
27309  * This can be in the form of a textual message at program startup or
27310  * in documentation (online or textual) provided with the package.
27311  *
27312  * Redistribution and use in source and binary forms, with or without
27313  * modification, are permitted provided that the following conditions
27314  * are met:
27315  * 1. Redistributions of source code must retain the copyright
27316  *    notice, this list of conditions and the following disclaimer.
27317  * 2. Redistributions in binary form must reproduce the above copyright
27318  *    notice, this list of conditions and the following disclaimer in the
27319  *    documentation and/or other materials provided with the distribution.
27320  * 3. All advertising materials mentioning features or use of this software
27321  *    must display the following acknowledgement:
27322  *    "This product includes cryptographic software written by
27323  *     Eric Young (eay@cryptsoft.com)"
27324  *    The word 'cryptographic' can be left out if the rouines from the library
27325  *    being used are not cryptographic related :-).
27326  * 4. If you include any Windows specific code (or a derivative thereof) from
27327  *    the apps directory (application code) you must include an acknowledgement:
27328  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27329  *
27330  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27331  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27332  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27333  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27334  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27335  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27336  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27337  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27338  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27339  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27340  * SUCH DAMAGE.
27341  *
27342  * The licence and distribution terms for any publically available version or
27343  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27344  * copied and put under another distribution licence
27345  * [including the GNU Public Licence.]
27346  */
27347 /* ====================================================================
27348  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
27349  *
27350  * Redistribution and use in source and binary forms, with or without
27351  * modification, are permitted provided that the following conditions
27352  * are met:
27353  *
27354  * 1. Redistributions of source code must retain the above copyright
27355  *    notice, this list of conditions and the following disclaimer.
27356  *
27357  * 2. Redistributions in binary form must reproduce the above copyright
27358  *    notice, this list of conditions and the following disclaimer in
27359  *    the documentation and/or other materials provided with the
27360  *    distribution.
27361  *
27362  * 3. All advertising materials mentioning features or use of this
27363  *    software must display the following acknowledgment:
27364  *    "This product includes software developed by the OpenSSL Project
27365  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
27366  *
27367  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27368  *    endorse or promote products derived from this software without
27369  *    prior written permission. For written permission, please contact
27370  *    openssl-core@openssl.org.
27371  *
27372  * 5. Products derived from this software may not be called "OpenSSL"
27373  *    nor may "OpenSSL" appear in their names without prior written
27374  *    permission of the OpenSSL Project.
27375  *
27376  * 6. Redistributions of any form whatsoever must retain the following
27377  *    acknowledgment:
27378  *    "This product includes software developed by the OpenSSL Project
27379  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
27380  *
27381  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
27382  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27383  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27384  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
27385  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27386  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27387  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27388  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27389  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27390  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27391  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27392  * OF THE POSSIBILITY OF SUCH DAMAGE.
27393  * ====================================================================
27394  *
27395  * This product includes cryptographic software written by Eric Young
27396  * (eay@cryptsoft.com).  This product includes software written by Tim
27397  * Hudson (tjh@cryptsoft.com).
27398  *
27399  */
27400 /* ====================================================================
27401  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
27402  *
27403  * Portions of the attached software ("Contribution") are developed by
27404  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
27405  *
27406  * The Contribution is licensed pursuant to the Eric Young open source
27407  * license provided above.
27408  *
27409  * The binary polynomial arithmetic software is originally written by
27410  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
27411  *
27412  */
27413 # 71 "/usr/include/openssl/rsa.h" 2 3 4
27414 # 81 "/usr/include/openssl/rsa.h" 3 4
27415 /* Declared already in ossl_typ.h */
27416 /* typedef struct rsa_st RSA; */
27417 /* typedef struct rsa_meth_st RSA_METHOD; */
27418 
27419 struct rsa_meth_st {
27420     const char *name;
27421     int (*rsa_pub_enc) (int flen, const unsigned char *from,
27422                         unsigned char *to, RSA *rsa, int padding);
27423     int (*rsa_pub_dec) (int flen, const unsigned char *from,
27424                         unsigned char *to, RSA *rsa, int padding);
27425     int (*rsa_priv_enc) (int flen, const unsigned char *from,
27426                          unsigned char *to, RSA *rsa, int padding);
27427     int (*rsa_priv_dec) (int flen, const unsigned char *from,
27428                          unsigned char *to, RSA *rsa, int padding);
27429     /* Can be null */
27430     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
27431     /* Can be null */
27432     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
27433                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
27434     /* called at new */
27435     int (*init) (RSA *rsa);
27436     /* called at free */
27437     int (*finish) (RSA *rsa);
27438     /* RSA_METHOD_FLAG_* things */
27439     int flags;
27440     /* may be needed! */
27441     char *app_data;
27442     /*
27443      * New sign and verify functions: some libraries don't allow arbitrary
27444      * data to be signed/verified: this allows them to be used. Note: for
27445      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
27446      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
27447      * for backwards compatibility this functionality is only enabled if the
27448      * RSA_FLAG_SIGN_VER option is set in 'flags'.
27449      */
27450     int (*rsa_sign) (int type,
27451                      const unsigned char *m, unsigned int m_length,
27452                      unsigned char *sigret, unsigned int *siglen,
27453                      const RSA *rsa);
27454     int (*rsa_verify) (int dtype, const unsigned char *m,
27455                        unsigned int m_length, const unsigned char *sigbuf,
27456                        unsigned int siglen, const RSA *rsa);
27457     /*
27458      * If this callback is NULL, the builtin software RSA key-gen will be
27459      * used. This is for behavioural compatibility whilst the code gets
27460      * rewired, but one day it would be nice to assume there are no such
27461      * things as "builtin software" implementations.
27462      */
27463     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
27464 };
27465 
27466 struct rsa_st {
27467     /*
27468      * The first parameter is used to pickup errors where this is passed
27469      * instead of aEVP_PKEY, it is set to 0
27470      */
27471     int pad;
27472     long version;
27473     const RSA_METHOD *meth;
27474     /* functional reference if 'meth' is ENGINE-provided */
27475     ENGINE *engine;
27476     BIGNUM *n;
27477     BIGNUM *e;
27478     BIGNUM *d;
27479     BIGNUM *p;
27480     BIGNUM *q;
27481     BIGNUM *dmp1;
27482     BIGNUM *dmq1;
27483     BIGNUM *iqmp;
27484     /* be careful using this if the RSA structure is shared */
27485     CRYPTO_EX_DATA ex_data;
27486     int references;
27487     int flags;
27488     /* Used to cache montgomery values */
27489     BN_MONT_CTX *_method_mod_n;
27490     BN_MONT_CTX *_method_mod_p;
27491     BN_MONT_CTX *_method_mod_q;
27492     /*
27493      * all BIGNUM values are actually in the following data, if it is not
27494      * NULL
27495      */
27496     char *bignum_data;
27497     BN_BLINDING *blinding;
27498     BN_BLINDING *mt_blinding;
27499 };
27500 # 176 "/usr/include/openssl/rsa.h" 3 4
27501 /* exponent limit enforced for "large" modulus only */
27502 # 190 "/usr/include/openssl/rsa.h" 3 4
27503 /*
27504  * This flag means the private key operations will be handled by rsa_mod_exp
27505  * and that they do not depend on the private key components being present:
27506  * for example a key stored in external hardware. Without this flag
27507  * bn_mod_exp gets called when private key components are absent.
27508  */
27509 
27510 
27511 /*
27512  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
27513  * functions.
27514  */
27515 
27516 
27517 /*
27518  * new with 0.9.6j and 0.9.7b; the built-in
27519  * RSA implementation now uses blinding by
27520  * default (ignoring RSA_FLAG_BLINDING),
27521  * but other engines might not need it
27522  */
27523 
27524 /*
27525  * new with 0.9.8f; the built-in RSA
27526  * implementation now uses constant time
27527  * operations by default in private key operations,
27528  * e.g., constant time modular exponentiation,
27529  * modular inverse without leaking branches,
27530  * division without leaking branches. This
27531  * flag disables these constant time
27532  * operations and results in faster RSA
27533  * private key operations.
27534  */
27535 # 312 "/usr/include/openssl/rsa.h" 3 4
27536 /* EVP_PKEY_ only */
27537 
27538 
27539 
27540 
27541 
27542 
27543 
27544 RSA *RSA_new(void);
27545 RSA *RSA_new_method(ENGINE *engine);
27546 int RSA_size(const RSA *rsa);
27547 
27548 /* Deprecated version */
27549 
27550 RSA *RSA_generate_key(int bits, unsigned long e, void
27551                        (*callback) (int, int, void *), void *cb_arg);
27552 
27553 
27554 /* New version */
27555 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
27556 
27557 int RSA_check_key(const RSA *);
27558         /* next 4 return -1 on error */
27559 int RSA_public_encrypt(int flen, const unsigned char *from,
27560                        unsigned char *to, RSA *rsa, int padding);
27561 int RSA_private_encrypt(int flen, const unsigned char *from,
27562                         unsigned char *to, RSA *rsa, int padding);
27563 int RSA_public_decrypt(int flen, const unsigned char *from,
27564                        unsigned char *to, RSA *rsa, int padding);
27565 int RSA_private_decrypt(int flen, const unsigned char *from,
27566                         unsigned char *to, RSA *rsa, int padding);
27567 void RSA_free(RSA *r);
27568 /* "up" the RSA object's reference count */
27569 int RSA_up_ref(RSA *r);
27570 
27571 int RSA_flags(const RSA *r);
27572 
27573 void RSA_set_default_method(const RSA_METHOD *meth);
27574 const RSA_METHOD *RSA_get_default_method(void);
27575 const RSA_METHOD *RSA_get_method(const RSA *rsa);
27576 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
27577 
27578 /* This function needs the memory locking malloc callbacks to be installed */
27579 int RSA_memory_lock(RSA *r);
27580 
27581 /* these are the actual SSLeay RSA functions */
27582 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
27583 
27584 const RSA_METHOD *RSA_null_method(void);
27585 
27586 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;
27587 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;
27588 
27589 typedef struct rsa_pss_params_st {
27590     X509_ALGOR *hashAlgorithm;
27591     X509_ALGOR *maskGenAlgorithm;
27592     ASN1_INTEGER *saltLength;
27593     ASN1_INTEGER *trailerField;
27594 } RSA_PSS_PARAMS;
27595 
27596 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;
27597 
27598 typedef struct rsa_oaep_params_st {
27599     X509_ALGOR *hashFunc;
27600     X509_ALGOR *maskGenFunc;
27601     X509_ALGOR *pSourceFunc;
27602 } RSA_OAEP_PARAMS;
27603 
27604 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;
27605 
27606 
27607 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
27608 
27609 
27610 
27611 int RSA_print(BIO *bp, const RSA *r, int offset);
27612 
27613 
27614 
27615 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
27616                 int (*cb) (char *buf, int len, const char *prompt,
27617                            int verify), int sgckey);
27618 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
27619                  int (*cb) (char *buf, int len, const char *prompt,
27620                             int verify), int sgckey);
27621 
27622 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
27623                      int (*cb) (char *buf, int len, const char *prompt,
27624                                 int verify));
27625 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
27626                       int (*cb) (char *buf, int len, const char *prompt,
27627                                  int verify));
27628 
27629 
27630 /*
27631  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
27632  * PKCS#1 padded RSA encryption
27633  */
27634 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
27635              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
27636 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
27637                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
27638 
27639 /*
27640  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
27641  * PKCS#1 padded RSA encryption
27642  */
27643 int RSA_sign_ASN1_OCTET_STRING(int type,
27644                                const unsigned char *m, unsigned int m_length,
27645                                unsigned char *sigret, unsigned int *siglen,
27646                                RSA *rsa);
27647 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
27648                                  unsigned int m_length, unsigned char *sigbuf,
27649                                  unsigned int siglen, RSA *rsa);
27650 
27651 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
27652 void RSA_blinding_off(RSA *rsa);
27653 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
27654 
27655 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
27656                                  const unsigned char *f, int fl);
27657 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
27658                                    const unsigned char *f, int fl,
27659                                    int rsa_len);
27660 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
27661                                  const unsigned char *f, int fl);
27662 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
27663                                    const unsigned char *f, int fl,
27664                                    int rsa_len);
27665 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
27666                long seedlen, const EVP_MD *dgst);
27667 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
27668                                const unsigned char *f, int fl,
27669                                const unsigned char *p, int pl);
27670 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
27671                                  const unsigned char *f, int fl, int rsa_len,
27672                                  const unsigned char *p, int pl);
27673 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
27674                                     const unsigned char *from, int flen,
27675                                     const unsigned char *param, int plen,
27676                                     const EVP_MD *md, const EVP_MD *mgf1md);
27677 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
27678                                       const unsigned char *from, int flen,
27679                                       int num, const unsigned char *param,
27680                                       int plen, const EVP_MD *md,
27681                                       const EVP_MD *mgf1md);
27682 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
27683                            const unsigned char *f, int fl);
27684 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
27685                              const unsigned char *f, int fl, int rsa_len);
27686 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
27687                          int fl);
27688 int RSA_padding_check_none(unsigned char *to, int tlen,
27689                            const unsigned char *f, int fl, int rsa_len);
27690 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
27691                          int fl);
27692 int RSA_padding_check_X931(unsigned char *to, int tlen,
27693                            const unsigned char *f, int fl, int rsa_len);
27694 int RSA_X931_hash_id(int nid);
27695 
27696 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
27697                          const EVP_MD *Hash, const unsigned char *EM,
27698                          int sLen);
27699 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
27700                               const unsigned char *mHash, const EVP_MD *Hash,
27701                               int sLen);
27702 
27703 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
27704                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
27705                               const unsigned char *EM, int sLen);
27706 
27707 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
27708                                    const unsigned char *mHash,
27709                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
27710                                    int sLen);
27711 
27712 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
27713                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
27714 int RSA_set_ex_data(RSA *r, int idx, void *arg);
27715 void *RSA_get_ex_data(const RSA *r, int idx);
27716 
27717 RSA *RSAPublicKey_dup(RSA *rsa);
27718 RSA *RSAPrivateKey_dup(RSA *rsa);
27719 
27720 /*
27721  * If this flag is set the RSA method is FIPS compliant and can be used in
27722  * FIPS mode. This is set in the validated module method. If an application
27723  * sets this flag in its own methods it is its responsibility to ensure the
27724  * result is compliant.
27725  */
27726 
27727 
27728 
27729 /*
27730  * If this flag is set the operations normally disabled in FIPS mode are
27731  * permitted it is then the applications responsibility to ensure that the
27732  * usage is compliant.
27733  */
27734 
27735 
27736 /*
27737  * Application has decided PRNG is good enough to generate a key: don't
27738  * check.
27739  */
27740 
27741 
27742 /* BEGIN ERROR CODES */
27743 /*
27744  * The following lines are auto generated by the script mkerr.pl. Any changes
27745  * made after this point may be overwritten when the script is next run.
27746  */
27747 void ERR_load_RSA_strings(void);
27748 
27749 /* Error codes for the RSA functions. */
27750 
27751 /* Function codes. */
27752 # 592 "/usr/include/openssl/rsa.h" 3 4
27753 /* Reason codes. */
27754 # 97 "/usr/include/openssl/x509.h" 2 3 4
27755 
27756 
27757 # 1 "/usr/include/openssl/dsa.h" 1 3 4
27758 /* crypto/dsa/dsa.h */
27759 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27760  * All rights reserved.
27761  *
27762  * This package is an SSL implementation written
27763  * by Eric Young (eay@cryptsoft.com).
27764  * The implementation was written so as to conform with Netscapes SSL.
27765  *
27766  * This library is free for commercial and non-commercial use as long as
27767  * the following conditions are aheared to.  The following conditions
27768  * apply to all code found in this distribution, be it the RC4, RSA,
27769  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27770  * included with this distribution is covered by the same copyright terms
27771  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27772  *
27773  * Copyright remains Eric Young's, and as such any Copyright notices in
27774  * the code are not to be removed.
27775  * If this package is used in a product, Eric Young should be given attribution
27776  * as the author of the parts of the library used.
27777  * This can be in the form of a textual message at program startup or
27778  * in documentation (online or textual) provided with the package.
27779  *
27780  * Redistribution and use in source and binary forms, with or without
27781  * modification, are permitted provided that the following conditions
27782  * are met:
27783  * 1. Redistributions of source code must retain the copyright
27784  *    notice, this list of conditions and the following disclaimer.
27785  * 2. Redistributions in binary form must reproduce the above copyright
27786  *    notice, this list of conditions and the following disclaimer in the
27787  *    documentation and/or other materials provided with the distribution.
27788  * 3. All advertising materials mentioning features or use of this software
27789  *    must display the following acknowledgement:
27790  *    "This product includes cryptographic software written by
27791  *     Eric Young (eay@cryptsoft.com)"
27792  *    The word 'cryptographic' can be left out if the rouines from the library
27793  *    being used are not cryptographic related :-).
27794  * 4. If you include any Windows specific code (or a derivative thereof) from
27795  *    the apps directory (application code) you must include an acknowledgement:
27796  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27797  *
27798  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27799  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27800  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27801  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27802  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27803  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27804  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27805  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27806  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27807  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27808  * SUCH DAMAGE.
27809  *
27810  * The licence and distribution terms for any publically available version or
27811  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27812  * copied and put under another distribution licence
27813  * [including the GNU Public Licence.]
27814  */
27815 
27816 /*
27817  * The DSS routines are based on patches supplied by
27818  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
27819  * work and I have just tweaked them a little to fit into my
27820  * stylistic vision for SSLeay :-) */
27821 
27822 
27823 
27824 
27825 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
27826 /* e_os2.h */
27827 /* ====================================================================
27828  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
27829  *
27830  * Redistribution and use in source and binary forms, with or without
27831  * modification, are permitted provided that the following conditions
27832  * are met:
27833  *
27834  * 1. Redistributions of source code must retain the above copyright
27835  *    notice, this list of conditions and the following disclaimer.
27836  *
27837  * 2. Redistributions in binary form must reproduce the above copyright
27838  *    notice, this list of conditions and the following disclaimer in
27839  *    the documentation and/or other materials provided with the
27840  *    distribution.
27841  *
27842  * 3. All advertising materials mentioning features or use of this
27843  *    software must display the following acknowledgment:
27844  *    "This product includes software developed by the OpenSSL Project
27845  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
27846  *
27847  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27848  *    endorse or promote products derived from this software without
27849  *    prior written permission. For written permission, please contact
27850  *    openssl-core@openssl.org.
27851  *
27852  * 5. Products derived from this software may not be called "OpenSSL"
27853  *    nor may "OpenSSL" appear in their names without prior written
27854  *    permission of the OpenSSL Project.
27855  *
27856  * 6. Redistributions of any form whatsoever must retain the following
27857  *    acknowledgment:
27858  *    "This product includes software developed by the OpenSSL Project
27859  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
27860  *
27861  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
27862  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27863  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27864  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
27865  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27866  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27867  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27868  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27869  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27870  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27871  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27872  * OF THE POSSIBILITY OF SUCH DAMAGE.
27873  * ====================================================================
27874  *
27875  * This product includes cryptographic software written by Eric Young
27876  * (eay@cryptsoft.com).  This product includes software written by Tim
27877  * Hudson (tjh@cryptsoft.com).
27878  *
27879  */
27880 
27881 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
27882 /* opensslconf.h */
27883 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
27884 
27885 
27886 
27887 
27888 /* OpenSSL was configured with the following options: */
27889 # 108 "/usr/include/openssl/opensslconf.h" 3 4
27890 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
27891    asks for it.  This is a transient feature that is provided for those
27892    who haven't had the time to do the appropriate changes in their
27893    applications.  */
27894 # 204 "/usr/include/openssl/opensslconf.h" 3 4
27895 /* crypto/opensslconf.h.in */
27896 
27897 /* Generate 80386 code? */
27898 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
27899 # 69 "/usr/include/openssl/dsa.h" 2 3 4
27900 
27901 
27902 
27903 
27904 
27905 
27906 # 1 "/usr/include/openssl/bio.h" 1 3 4
27907 /* crypto/bio/bio.h */
27908 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27909  * All rights reserved.
27910  *
27911  * This package is an SSL implementation written
27912  * by Eric Young (eay@cryptsoft.com).
27913  * The implementation was written so as to conform with Netscapes SSL.
27914  *
27915  * This library is free for commercial and non-commercial use as long as
27916  * the following conditions are aheared to.  The following conditions
27917  * apply to all code found in this distribution, be it the RC4, RSA,
27918  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27919  * included with this distribution is covered by the same copyright terms
27920  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27921  *
27922  * Copyright remains Eric Young's, and as such any Copyright notices in
27923  * the code are not to be removed.
27924  * If this package is used in a product, Eric Young should be given attribution
27925  * as the author of the parts of the library used.
27926  * This can be in the form of a textual message at program startup or
27927  * in documentation (online or textual) provided with the package.
27928  *
27929  * Redistribution and use in source and binary forms, with or without
27930  * modification, are permitted provided that the following conditions
27931  * are met:
27932  * 1. Redistributions of source code must retain the copyright
27933  *    notice, this list of conditions and the following disclaimer.
27934  * 2. Redistributions in binary form must reproduce the above copyright
27935  *    notice, this list of conditions and the following disclaimer in the
27936  *    documentation and/or other materials provided with the distribution.
27937  * 3. All advertising materials mentioning features or use of this software
27938  *    must display the following acknowledgement:
27939  *    "This product includes cryptographic software written by
27940  *     Eric Young (eay@cryptsoft.com)"
27941  *    The word 'cryptographic' can be left out if the rouines from the library
27942  *    being used are not cryptographic related :-).
27943  * 4. If you include any Windows specific code (or a derivative thereof) from
27944  *    the apps directory (application code) you must include an acknowledgement:
27945  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27946  *
27947  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27948  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27949  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27950  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27951  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27952  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27953  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27954  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27955  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27956  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27957  * SUCH DAMAGE.
27958  *
27959  * The licence and distribution terms for any publically available version or
27960  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27961  * copied and put under another distribution licence
27962  * [including the GNU Public Licence.]
27963  */
27964 # 76 "/usr/include/openssl/dsa.h" 2 3 4
27965 
27966 # 1 "/usr/include/openssl/crypto.h" 1 3 4
27967 /* crypto/crypto.h */
27968 /* ====================================================================
27969  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
27970  *
27971  * Redistribution and use in source and binary forms, with or without
27972  * modification, are permitted provided that the following conditions
27973  * are met:
27974  *
27975  * 1. Redistributions of source code must retain the above copyright
27976  *    notice, this list of conditions and the following disclaimer.
27977  *
27978  * 2. Redistributions in binary form must reproduce the above copyright
27979  *    notice, this list of conditions and the following disclaimer in
27980  *    the documentation and/or other materials provided with the
27981  *    distribution.
27982  *
27983  * 3. All advertising materials mentioning features or use of this
27984  *    software must display the following acknowledgment:
27985  *    "This product includes software developed by the OpenSSL Project
27986  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
27987  *
27988  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27989  *    endorse or promote products derived from this software without
27990  *    prior written permission. For written permission, please contact
27991  *    openssl-core@openssl.org.
27992  *
27993  * 5. Products derived from this software may not be called "OpenSSL"
27994  *    nor may "OpenSSL" appear in their names without prior written
27995  *    permission of the OpenSSL Project.
27996  *
27997  * 6. Redistributions of any form whatsoever must retain the following
27998  *    acknowledgment:
27999  *    "This product includes software developed by the OpenSSL Project
28000  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
28001  *
28002  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
28003  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28004  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28005  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
28006  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28007  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28008  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28009  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28010  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28011  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28012  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28013  * OF THE POSSIBILITY OF SUCH DAMAGE.
28014  * ====================================================================
28015  *
28016  * This product includes cryptographic software written by Eric Young
28017  * (eay@cryptsoft.com).  This product includes software written by Tim
28018  * Hudson (tjh@cryptsoft.com).
28019  *
28020  */
28021 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
28022  * All rights reserved.
28023  *
28024  * This package is an SSL implementation written
28025  * by Eric Young (eay@cryptsoft.com).
28026  * The implementation was written so as to conform with Netscapes SSL.
28027  *
28028  * This library is free for commercial and non-commercial use as long as
28029  * the following conditions are aheared to.  The following conditions
28030  * apply to all code found in this distribution, be it the RC4, RSA,
28031  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
28032  * included with this distribution is covered by the same copyright terms
28033  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
28034  *
28035  * Copyright remains Eric Young's, and as such any Copyright notices in
28036  * the code are not to be removed.
28037  * If this package is used in a product, Eric Young should be given attribution
28038  * as the author of the parts of the library used.
28039  * This can be in the form of a textual message at program startup or
28040  * in documentation (online or textual) provided with the package.
28041  *
28042  * Redistribution and use in source and binary forms, with or without
28043  * modification, are permitted provided that the following conditions
28044  * are met:
28045  * 1. Redistributions of source code must retain the copyright
28046  *    notice, this list of conditions and the following disclaimer.
28047  * 2. Redistributions in binary form must reproduce the above copyright
28048  *    notice, this list of conditions and the following disclaimer in the
28049  *    documentation and/or other materials provided with the distribution.
28050  * 3. All advertising materials mentioning features or use of this software
28051  *    must display the following acknowledgement:
28052  *    "This product includes cryptographic software written by
28053  *     Eric Young (eay@cryptsoft.com)"
28054  *    The word 'cryptographic' can be left out if the rouines from the library
28055  *    being used are not cryptographic related :-).
28056  * 4. If you include any Windows specific code (or a derivative thereof) from
28057  *    the apps directory (application code) you must include an acknowledgement:
28058  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
28059  *
28060  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
28061  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28062  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28063  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28064  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28065  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28066  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28067  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28068  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28069  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28070  * SUCH DAMAGE.
28071  *
28072  * The licence and distribution terms for any publically available version or
28073  * derivative of this code cannot be changed.  i.e. this code cannot simply be
28074  * copied and put under another distribution licence
28075  * [including the GNU Public Licence.]
28076  */
28077 /* ====================================================================
28078  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
28079  * ECDH support in OpenSSL originally developed by
28080  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
28081  */
28082 # 78 "/usr/include/openssl/dsa.h" 2 3 4
28083 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
28084 /* ====================================================================
28085  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
28086  *
28087  * Redistribution and use in source and binary forms, with or without
28088  * modification, are permitted provided that the following conditions
28089  * are met:
28090  *
28091  * 1. Redistributions of source code must retain the above copyright
28092  *    notice, this list of conditions and the following disclaimer.
28093  *
28094  * 2. Redistributions in binary form must reproduce the above copyright
28095  *    notice, this list of conditions and the following disclaimer in
28096  *    the documentation and/or other materials provided with the
28097  *    distribution.
28098  *
28099  * 3. All advertising materials mentioning features or use of this
28100  *    software must display the following acknowledgment:
28101  *    "This product includes software developed by the OpenSSL Project
28102  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
28103  *
28104  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28105  *    endorse or promote products derived from this software without
28106  *    prior written permission. For written permission, please contact
28107  *    openssl-core@openssl.org.
28108  *
28109  * 5. Products derived from this software may not be called "OpenSSL"
28110  *    nor may "OpenSSL" appear in their names without prior written
28111  *    permission of the OpenSSL Project.
28112  *
28113  * 6. Redistributions of any form whatsoever must retain the following
28114  *    acknowledgment:
28115  *    "This product includes software developed by the OpenSSL Project
28116  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
28117  *
28118  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
28119  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28120  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28121  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
28122  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28123  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28124  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28125  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28126  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28127  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28128  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28129  * OF THE POSSIBILITY OF SUCH DAMAGE.
28130  * ====================================================================
28131  *
28132  * This product includes cryptographic software written by Eric Young
28133  * (eay@cryptsoft.com).  This product includes software written by Tim
28134  * Hudson (tjh@cryptsoft.com).
28135  *
28136  */
28137 # 79 "/usr/include/openssl/dsa.h" 2 3 4
28138 
28139 
28140 # 1 "/usr/include/openssl/bn.h" 1 3 4
28141 /* crypto/bn/bn.h */
28142 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
28143  * All rights reserved.
28144  *
28145  * This package is an SSL implementation written
28146  * by Eric Young (eay@cryptsoft.com).
28147  * The implementation was written so as to conform with Netscapes SSL.
28148  *
28149  * This library is free for commercial and non-commercial use as long as
28150  * the following conditions are aheared to.  The following conditions
28151  * apply to all code found in this distribution, be it the RC4, RSA,
28152  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
28153  * included with this distribution is covered by the same copyright terms
28154  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
28155  *
28156  * Copyright remains Eric Young's, and as such any Copyright notices in
28157  * the code are not to be removed.
28158  * If this package is used in a product, Eric Young should be given attribution
28159  * as the author of the parts of the library used.
28160  * This can be in the form of a textual message at program startup or
28161  * in documentation (online or textual) provided with the package.
28162  *
28163  * Redistribution and use in source and binary forms, with or without
28164  * modification, are permitted provided that the following conditions
28165  * are met:
28166  * 1. Redistributions of source code must retain the copyright
28167  *    notice, this list of conditions and the following disclaimer.
28168  * 2. Redistributions in binary form must reproduce the above copyright
28169  *    notice, this list of conditions and the following disclaimer in the
28170  *    documentation and/or other materials provided with the distribution.
28171  * 3. All advertising materials mentioning features or use of this software
28172  *    must display the following acknowledgement:
28173  *    "This product includes cryptographic software written by
28174  *     Eric Young (eay@cryptsoft.com)"
28175  *    The word 'cryptographic' can be left out if the rouines from the library
28176  *    being used are not cryptographic related :-).
28177  * 4. If you include any Windows specific code (or a derivative thereof) from
28178  *    the apps directory (application code) you must include an acknowledgement:
28179  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
28180  *
28181  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
28182  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28183  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28184  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28185  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28186  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28187  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28188  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28189  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28190  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28191  * SUCH DAMAGE.
28192  *
28193  * The licence and distribution terms for any publically available version or
28194  * derivative of this code cannot be changed.  i.e. this code cannot simply be
28195  * copied and put under another distribution licence
28196  * [including the GNU Public Licence.]
28197  */
28198 /* ====================================================================
28199  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
28200  *
28201  * Redistribution and use in source and binary forms, with or without
28202  * modification, are permitted provided that the following conditions
28203  * are met:
28204  *
28205  * 1. Redistributions of source code must retain the above copyright
28206  *    notice, this list of conditions and the following disclaimer.
28207  *
28208  * 2. Redistributions in binary form must reproduce the above copyright
28209  *    notice, this list of conditions and the following disclaimer in
28210  *    the documentation and/or other materials provided with the
28211  *    distribution.
28212  *
28213  * 3. All advertising materials mentioning features or use of this
28214  *    software must display the following acknowledgment:
28215  *    "This product includes software developed by the OpenSSL Project
28216  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
28217  *
28218  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28219  *    endorse or promote products derived from this software without
28220  *    prior written permission. For written permission, please contact
28221  *    openssl-core@openssl.org.
28222  *
28223  * 5. Products derived from this software may not be called "OpenSSL"
28224  *    nor may "OpenSSL" appear in their names without prior written
28225  *    permission of the OpenSSL Project.
28226  *
28227  * 6. Redistributions of any form whatsoever must retain the following
28228  *    acknowledgment:
28229  *    "This product includes software developed by the OpenSSL Project
28230  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
28231  *
28232  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
28233  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28234  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28235  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
28236  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28237  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28238  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28239  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28240  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28241  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28242  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28243  * OF THE POSSIBILITY OF SUCH DAMAGE.
28244  * ====================================================================
28245  *
28246  * This product includes cryptographic software written by Eric Young
28247  * (eay@cryptsoft.com).  This product includes software written by Tim
28248  * Hudson (tjh@cryptsoft.com).
28249  *
28250  */
28251 /* ====================================================================
28252  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
28253  *
28254  * Portions of the attached software ("Contribution") are developed by
28255  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
28256  *
28257  * The Contribution is licensed pursuant to the Eric Young open source
28258  * license provided above.
28259  *
28260  * The binary polynomial arithmetic software is originally written by
28261  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
28262  *
28263  */
28264 # 82 "/usr/include/openssl/dsa.h" 2 3 4
28265 
28266 # 1 "/usr/include/openssl/dh.h" 1 3 4
28267 /* crypto/dh/dh.h */
28268 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
28269  * All rights reserved.
28270  *
28271  * This package is an SSL implementation written
28272  * by Eric Young (eay@cryptsoft.com).
28273  * The implementation was written so as to conform with Netscapes SSL.
28274  *
28275  * This library is free for commercial and non-commercial use as long as
28276  * the following conditions are aheared to.  The following conditions
28277  * apply to all code found in this distribution, be it the RC4, RSA,
28278  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
28279  * included with this distribution is covered by the same copyright terms
28280  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
28281  *
28282  * Copyright remains Eric Young's, and as such any Copyright notices in
28283  * the code are not to be removed.
28284  * If this package is used in a product, Eric Young should be given attribution
28285  * as the author of the parts of the library used.
28286  * This can be in the form of a textual message at program startup or
28287  * in documentation (online or textual) provided with the package.
28288  *
28289  * Redistribution and use in source and binary forms, with or without
28290  * modification, are permitted provided that the following conditions
28291  * are met:
28292  * 1. Redistributions of source code must retain the copyright
28293  *    notice, this list of conditions and the following disclaimer.
28294  * 2. Redistributions in binary form must reproduce the above copyright
28295  *    notice, this list of conditions and the following disclaimer in the
28296  *    documentation and/or other materials provided with the distribution.
28297  * 3. All advertising materials mentioning features or use of this software
28298  *    must display the following acknowledgement:
28299  *    "This product includes cryptographic software written by
28300  *     Eric Young (eay@cryptsoft.com)"
28301  *    The word 'cryptographic' can be left out if the rouines from the library
28302  *    being used are not cryptographic related :-).
28303  * 4. If you include any Windows specific code (or a derivative thereof) from
28304  *    the apps directory (application code) you must include an acknowledgement:
28305  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
28306  *
28307  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
28308  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28309  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28310  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28311  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28312  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28313  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28314  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28315  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28316  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28317  * SUCH DAMAGE.
28318  *
28319  * The licence and distribution terms for any publically available version or
28320  * derivative of this code cannot be changed.  i.e. this code cannot simply be
28321  * copied and put under another distribution licence
28322  * [including the GNU Public Licence.]
28323  */
28324 
28325 
28326 
28327 
28328 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
28329 /* e_os2.h */
28330 /* ====================================================================
28331  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
28332  *
28333  * Redistribution and use in source and binary forms, with or without
28334  * modification, are permitted provided that the following conditions
28335  * are met:
28336  *
28337  * 1. Redistributions of source code must retain the above copyright
28338  *    notice, this list of conditions and the following disclaimer.
28339  *
28340  * 2. Redistributions in binary form must reproduce the above copyright
28341  *    notice, this list of conditions and the following disclaimer in
28342  *    the documentation and/or other materials provided with the
28343  *    distribution.
28344  *
28345  * 3. All advertising materials mentioning features or use of this
28346  *    software must display the following acknowledgment:
28347  *    "This product includes software developed by the OpenSSL Project
28348  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
28349  *
28350  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28351  *    endorse or promote products derived from this software without
28352  *    prior written permission. For written permission, please contact
28353  *    openssl-core@openssl.org.
28354  *
28355  * 5. Products derived from this software may not be called "OpenSSL"
28356  *    nor may "OpenSSL" appear in their names without prior written
28357  *    permission of the OpenSSL Project.
28358  *
28359  * 6. Redistributions of any form whatsoever must retain the following
28360  *    acknowledgment:
28361  *    "This product includes software developed by the OpenSSL Project
28362  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
28363  *
28364  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
28365  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28366  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28367  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
28368  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28369  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28370  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28371  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28372  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28373  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28374  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28375  * OF THE POSSIBILITY OF SUCH DAMAGE.
28376  * ====================================================================
28377  *
28378  * This product includes cryptographic software written by Eric Young
28379  * (eay@cryptsoft.com).  This product includes software written by Tim
28380  * Hudson (tjh@cryptsoft.com).
28381  *
28382  */
28383 
28384 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
28385 /* opensslconf.h */
28386 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
28387 
28388 
28389 
28390 
28391 /* OpenSSL was configured with the following options: */
28392 # 108 "/usr/include/openssl/opensslconf.h" 3 4
28393 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
28394    asks for it.  This is a transient feature that is provided for those
28395    who haven't had the time to do the appropriate changes in their
28396    applications.  */
28397 # 204 "/usr/include/openssl/opensslconf.h" 3 4
28398 /* crypto/opensslconf.h.in */
28399 
28400 /* Generate 80386 code? */
28401 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
28402 # 63 "/usr/include/openssl/dh.h" 2 3 4
28403 
28404 
28405 
28406 
28407 
28408 
28409 # 1 "/usr/include/openssl/bio.h" 1 3 4
28410 /* crypto/bio/bio.h */
28411 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
28412  * All rights reserved.
28413  *
28414  * This package is an SSL implementation written
28415  * by Eric Young (eay@cryptsoft.com).
28416  * The implementation was written so as to conform with Netscapes SSL.
28417  *
28418  * This library is free for commercial and non-commercial use as long as
28419  * the following conditions are aheared to.  The following conditions
28420  * apply to all code found in this distribution, be it the RC4, RSA,
28421  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
28422  * included with this distribution is covered by the same copyright terms
28423  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
28424  *
28425  * Copyright remains Eric Young's, and as such any Copyright notices in
28426  * the code are not to be removed.
28427  * If this package is used in a product, Eric Young should be given attribution
28428  * as the author of the parts of the library used.
28429  * This can be in the form of a textual message at program startup or
28430  * in documentation (online or textual) provided with the package.
28431  *
28432  * Redistribution and use in source and binary forms, with or without
28433  * modification, are permitted provided that the following conditions
28434  * are met:
28435  * 1. Redistributions of source code must retain the copyright
28436  *    notice, this list of conditions and the following disclaimer.
28437  * 2. Redistributions in binary form must reproduce the above copyright
28438  *    notice, this list of conditions and the following disclaimer in the
28439  *    documentation and/or other materials provided with the distribution.
28440  * 3. All advertising materials mentioning features or use of this software
28441  *    must display the following acknowledgement:
28442  *    "This product includes cryptographic software written by
28443  *     Eric Young (eay@cryptsoft.com)"
28444  *    The word 'cryptographic' can be left out if the rouines from the library
28445  *    being used are not cryptographic related :-).
28446  * 4. If you include any Windows specific code (or a derivative thereof) from
28447  *    the apps directory (application code) you must include an acknowledgement:
28448  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
28449  *
28450  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
28451  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28452  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28453  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28454  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28455  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28456  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28457  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28458  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28459  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28460  * SUCH DAMAGE.
28461  *
28462  * The licence and distribution terms for any publically available version or
28463  * derivative of this code cannot be changed.  i.e. this code cannot simply be
28464  * copied and put under another distribution licence
28465  * [including the GNU Public Licence.]
28466  */
28467 # 70 "/usr/include/openssl/dh.h" 2 3 4
28468 
28469 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
28470 /* ====================================================================
28471  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
28472  *
28473  * Redistribution and use in source and binary forms, with or without
28474  * modification, are permitted provided that the following conditions
28475  * are met:
28476  *
28477  * 1. Redistributions of source code must retain the above copyright
28478  *    notice, this list of conditions and the following disclaimer.
28479  *
28480  * 2. Redistributions in binary form must reproduce the above copyright
28481  *    notice, this list of conditions and the following disclaimer in
28482  *    the documentation and/or other materials provided with the
28483  *    distribution.
28484  *
28485  * 3. All advertising materials mentioning features or use of this
28486  *    software must display the following acknowledgment:
28487  *    "This product includes software developed by the OpenSSL Project
28488  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
28489  *
28490  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28491  *    endorse or promote products derived from this software without
28492  *    prior written permission. For written permission, please contact
28493  *    openssl-core@openssl.org.
28494  *
28495  * 5. Products derived from this software may not be called "OpenSSL"
28496  *    nor may "OpenSSL" appear in their names without prior written
28497  *    permission of the OpenSSL Project.
28498  *
28499  * 6. Redistributions of any form whatsoever must retain the following
28500  *    acknowledgment:
28501  *    "This product includes software developed by the OpenSSL Project
28502  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
28503  *
28504  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
28505  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28506  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28507  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
28508  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28509  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28510  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28511  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28512  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28513  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28514  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28515  * OF THE POSSIBILITY OF SUCH DAMAGE.
28516  * ====================================================================
28517  *
28518  * This product includes cryptographic software written by Eric Young
28519  * (eay@cryptsoft.com).  This product includes software written by Tim
28520  * Hudson (tjh@cryptsoft.com).
28521  *
28522  */
28523 # 72 "/usr/include/openssl/dh.h" 2 3 4
28524 
28525 # 1 "/usr/include/openssl/bn.h" 1 3 4
28526 /* crypto/bn/bn.h */
28527 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
28528  * All rights reserved.
28529  *
28530  * This package is an SSL implementation written
28531  * by Eric Young (eay@cryptsoft.com).
28532  * The implementation was written so as to conform with Netscapes SSL.
28533  *
28534  * This library is free for commercial and non-commercial use as long as
28535  * the following conditions are aheared to.  The following conditions
28536  * apply to all code found in this distribution, be it the RC4, RSA,
28537  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
28538  * included with this distribution is covered by the same copyright terms
28539  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
28540  *
28541  * Copyright remains Eric Young's, and as such any Copyright notices in
28542  * the code are not to be removed.
28543  * If this package is used in a product, Eric Young should be given attribution
28544  * as the author of the parts of the library used.
28545  * This can be in the form of a textual message at program startup or
28546  * in documentation (online or textual) provided with the package.
28547  *
28548  * Redistribution and use in source and binary forms, with or without
28549  * modification, are permitted provided that the following conditions
28550  * are met:
28551  * 1. Redistributions of source code must retain the copyright
28552  *    notice, this list of conditions and the following disclaimer.
28553  * 2. Redistributions in binary form must reproduce the above copyright
28554  *    notice, this list of conditions and the following disclaimer in the
28555  *    documentation and/or other materials provided with the distribution.
28556  * 3. All advertising materials mentioning features or use of this software
28557  *    must display the following acknowledgement:
28558  *    "This product includes cryptographic software written by
28559  *     Eric Young (eay@cryptsoft.com)"
28560  *    The word 'cryptographic' can be left out if the rouines from the library
28561  *    being used are not cryptographic related :-).
28562  * 4. If you include any Windows specific code (or a derivative thereof) from
28563  *    the apps directory (application code) you must include an acknowledgement:
28564  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
28565  *
28566  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
28567  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28568  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28569  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28570  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28571  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28572  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28573  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28574  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28575  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28576  * SUCH DAMAGE.
28577  *
28578  * The licence and distribution terms for any publically available version or
28579  * derivative of this code cannot be changed.  i.e. this code cannot simply be
28580  * copied and put under another distribution licence
28581  * [including the GNU Public Licence.]
28582  */
28583 /* ====================================================================
28584  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
28585  *
28586  * Redistribution and use in source and binary forms, with or without
28587  * modification, are permitted provided that the following conditions
28588  * are met:
28589  *
28590  * 1. Redistributions of source code must retain the above copyright
28591  *    notice, this list of conditions and the following disclaimer.
28592  *
28593  * 2. Redistributions in binary form must reproduce the above copyright
28594  *    notice, this list of conditions and the following disclaimer in
28595  *    the documentation and/or other materials provided with the
28596  *    distribution.
28597  *
28598  * 3. All advertising materials mentioning features or use of this
28599  *    software must display the following acknowledgment:
28600  *    "This product includes software developed by the OpenSSL Project
28601  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
28602  *
28603  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28604  *    endorse or promote products derived from this software without
28605  *    prior written permission. For written permission, please contact
28606  *    openssl-core@openssl.org.
28607  *
28608  * 5. Products derived from this software may not be called "OpenSSL"
28609  *    nor may "OpenSSL" appear in their names without prior written
28610  *    permission of the OpenSSL Project.
28611  *
28612  * 6. Redistributions of any form whatsoever must retain the following
28613  *    acknowledgment:
28614  *    "This product includes software developed by the OpenSSL Project
28615  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
28616  *
28617  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
28618  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28619  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28620  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
28621  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28622  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28623  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28624  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28625  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28626  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28627  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28628  * OF THE POSSIBILITY OF SUCH DAMAGE.
28629  * ====================================================================
28630  *
28631  * This product includes cryptographic software written by Eric Young
28632  * (eay@cryptsoft.com).  This product includes software written by Tim
28633  * Hudson (tjh@cryptsoft.com).
28634  *
28635  */
28636 /* ====================================================================
28637  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
28638  *
28639  * Portions of the attached software ("Contribution") are developed by
28640  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
28641  *
28642  * The Contribution is licensed pursuant to the Eric Young open source
28643  * license provided above.
28644  *
28645  * The binary polynomial arithmetic software is originally written by
28646  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
28647  *
28648  */
28649 # 74 "/usr/include/openssl/dh.h" 2 3 4
28650 # 82 "/usr/include/openssl/dh.h" 3 4
28651 /*
28652  * new with 0.9.7h; the built-in DH
28653  * implementation now uses constant time
28654  * modular exponentiation for secret exponents
28655  * by default. This flag causes the
28656  * faster variable sliding window method to
28657  * be used for all exponents.
28658  */
28659 
28660 
28661 /*
28662  * If this flag is set the DH method is FIPS compliant and can be used in
28663  * FIPS mode. This is set in the validated module method. If an application
28664  * sets this flag in its own methods it is its reposibility to ensure the
28665  * result is compliant.
28666  */
28667 
28668 
28669 
28670 /*
28671  * If this flag is set the operations normally disabled in FIPS mode are
28672  * permitted it is then the applications responsibility to ensure that the
28673  * usage is compliant.
28674  */
28675 
28676 
28677 
28678 
28679 
28680 
28681 
28682 /* Already defined in ossl_typ.h */
28683 /* typedef struct dh_st DH; */
28684 /* typedef struct dh_method DH_METHOD; */
28685 
28686 struct dh_method {
28687     const char *name;
28688     /* Methods here */
28689     int (*generate_key) (DH *dh);
28690     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
28691     /* Can be null */
28692     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
28693                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
28694                        BN_MONT_CTX *m_ctx);
28695     int (*init) (DH *dh);
28696     int (*finish) (DH *dh);
28697     int flags;
28698     char *app_data;
28699     /* If this is non-NULL, it will be used to generate parameters */
28700     int (*generate_params) (DH *dh, int prime_len, int generator,
28701                             BN_GENCB *cb);
28702 };
28703 
28704 struct dh_st {
28705     /*
28706      * This first argument is used to pick up errors when a DH is passed
28707      * instead of a EVP_PKEY
28708      */
28709     int pad;
28710     int version;
28711     BIGNUM *p;
28712     BIGNUM *g;
28713     long length; /* optional */
28714     BIGNUM *pub_key; /* g^x % p */
28715     BIGNUM *priv_key; /* x */
28716     int flags;
28717     BN_MONT_CTX *method_mont_p;
28718     /* Place holders if we want to do X9.42 DH */
28719     BIGNUM *q;
28720     BIGNUM *j;
28721     unsigned char *seed;
28722     int seedlen;
28723     BIGNUM *counter;
28724     int references;
28725     CRYPTO_EX_DATA ex_data;
28726     const DH_METHOD *meth;
28727     ENGINE *engine;
28728 };
28729 
28730 
28731 /* #define DH_GENERATOR_3       3 */
28732 
28733 
28734 /* DH_check error codes */
28735 # 174 "/usr/include/openssl/dh.h" 3 4
28736 /* DH_check_pub_key error codes */
28737 
28738 
28739 
28740 
28741 /*
28742  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
28743  * backward compatibility:
28744  */
28745 # 209 "/usr/include/openssl/dh.h" 3 4
28746 DH *DHparams_dup(DH *);
28747 
28748 const DH_METHOD *DH_OpenSSL(void);
28749 
28750 void DH_set_default_method(const DH_METHOD *meth);
28751 const DH_METHOD *DH_get_default_method(void);
28752 int DH_set_method(DH *dh, const DH_METHOD *meth);
28753 DH *DH_new_method(ENGINE *engine);
28754 
28755 DH *DH_new(void);
28756 void DH_free(DH *dh);
28757 int DH_up_ref(DH *dh);
28758 int DH_size(const DH *dh);
28759 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
28760                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
28761 int DH_set_ex_data(DH *d, int idx, void *arg);
28762 void *DH_get_ex_data(DH *d, int idx);
28763 
28764 /* Deprecated version */
28765 
28766 DH *DH_generate_parameters(int prime_len, int generator,
28767                            void (*callback) (int, int, void *), void *cb_arg);
28768 
28769 
28770 /* New version */
28771 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
28772                               BN_GENCB *cb);
28773 
28774 int DH_check(const DH *dh, int *codes);
28775 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
28776 int DH_generate_key(DH *dh);
28777 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
28778 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
28779 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
28780 int i2d_DHparams(const DH *a, unsigned char **pp);
28781 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
28782 int i2d_DHxparams(const DH *a, unsigned char **pp);
28783 
28784 int DHparams_print_fp(FILE *fp, const DH *x);
28785 
28786 
28787 int DHparams_print(BIO *bp, const DH *x);
28788 
28789 
28790 
28791 
28792 /* RFC 5114 parameters */
28793 DH *DH_get_1024_160(void);
28794 DH *DH_get_2048_224(void);
28795 DH *DH_get_2048_256(void);
28796 
28797 
28798 /* RFC2631 KDF */
28799 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
28800                  const unsigned char *Z, size_t Zlen,
28801                  ASN1_OBJECT *key_oid,
28802                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
28803 # 357 "/usr/include/openssl/dh.h" 3 4
28804 /* KDF types */
28805 
28806 
28807 
28808 /* BEGIN ERROR CODES */
28809 /*
28810  * The following lines are auto generated by the script mkerr.pl. Any changes
28811  * made after this point may be overwritten when the script is next run.
28812  */
28813 void ERR_load_DH_strings(void);
28814 
28815 /* Error codes for the DH functions. */
28816 
28817 /* Function codes. */
28818 # 392 "/usr/include/openssl/dh.h" 3 4
28819 /* Reason codes. */
28820 # 84 "/usr/include/openssl/dsa.h" 2 3 4
28821 # 92 "/usr/include/openssl/dsa.h" 3 4
28822 /*
28823  * new with 0.9.7h; the built-in DSA implementation now uses constant time
28824  * modular exponentiation for secret exponents by default. This flag causes
28825  * the faster variable sliding window method to be used for all exponents.
28826  */
28827 
28828 
28829 /*
28830  * If this flag is set the DSA method is FIPS compliant and can be used in
28831  * FIPS mode. This is set in the validated module method. If an application
28832  * sets this flag in its own methods it is its reposibility to ensure the
28833  * result is compliant.
28834  */
28835 
28836 
28837 
28838 /*
28839  * If this flag is set the operations normally disabled in FIPS mode are
28840  * permitted it is then the applications responsibility to ensure that the
28841  * usage is compliant.
28842  */
28843 
28844 
28845 
28846 
28847 
28848 
28849 
28850 /* Already defined in ossl_typ.h */
28851 /* typedef struct dsa_st DSA; */
28852 /* typedef struct dsa_method DSA_METHOD; */
28853 
28854 typedef struct DSA_SIG_st {
28855     BIGNUM *r;
28856     BIGNUM *s;
28857 } DSA_SIG;
28858 
28859 struct dsa_method {
28860     const char *name;
28861     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
28862     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
28863                            BIGNUM **rp);
28864     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
28865                           DSA_SIG *sig, DSA *dsa);
28866     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
28867                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
28868                         BN_MONT_CTX *in_mont);
28869     /* Can be null */
28870     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
28871                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
28872     int (*init) (DSA *dsa);
28873     int (*finish) (DSA *dsa);
28874     int flags;
28875     char *app_data;
28876     /* If this is non-NULL, it is used to generate DSA parameters */
28877     int (*dsa_paramgen) (DSA *dsa, int bits,
28878                          const unsigned char *seed, int seed_len,
28879                          int *counter_ret, unsigned long *h_ret,
28880                          BN_GENCB *cb);
28881     /* If this is non-NULL, it is used to generate DSA keys */
28882     int (*dsa_keygen) (DSA *dsa);
28883 };
28884 
28885 struct dsa_st {
28886     /*
28887      * This first variable is used to pick up errors where a DSA is passed
28888      * instead of of a EVP_PKEY
28889      */
28890     int pad;
28891     long version;
28892     int write_params;
28893     BIGNUM *p;
28894     BIGNUM *q; /* == 20 */
28895     BIGNUM *g;
28896     BIGNUM *pub_key; /* y public key */
28897     BIGNUM *priv_key; /* x private key */
28898     BIGNUM *kinv; /* Signing pre-calc */
28899     BIGNUM *r; /* Signing pre-calc */
28900     int flags;
28901     /* Normally used to cache montgomery values */
28902     BN_MONT_CTX *method_mont_p;
28903     int references;
28904     CRYPTO_EX_DATA ex_data;
28905     const DSA_METHOD *meth;
28906     /* functional reference if 'meth' is ENGINE-provided */
28907     ENGINE *engine;
28908 };
28909 # 187 "/usr/include/openssl/dsa.h" 3 4
28910 DSA *DSAparams_dup(DSA *x);
28911 DSA_SIG *DSA_SIG_new(void);
28912 void DSA_SIG_free(DSA_SIG *a);
28913 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
28914 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
28915 
28916 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
28917 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
28918                   DSA_SIG *sig, DSA *dsa);
28919 
28920 const DSA_METHOD *DSA_OpenSSL(void);
28921 
28922 void DSA_set_default_method(const DSA_METHOD *);
28923 const DSA_METHOD *DSA_get_default_method(void);
28924 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
28925 
28926 DSA *DSA_new(void);
28927 DSA *DSA_new_method(ENGINE *engine);
28928 void DSA_free(DSA *r);
28929 /* "up" the DSA object's reference count */
28930 int DSA_up_ref(DSA *r);
28931 int DSA_size(const DSA *);
28932         /* next 4 return -1 on error */
28933 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
28934 int DSA_sign(int type, const unsigned char *dgst, int dlen,
28935              unsigned char *sig, unsigned int *siglen, DSA *dsa);
28936 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
28937                const unsigned char *sigbuf, int siglen, DSA *dsa);
28938 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
28939                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
28940 int DSA_set_ex_data(DSA *d, int idx, void *arg);
28941 void *DSA_get_ex_data(DSA *d, int idx);
28942 
28943 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
28944 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
28945 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
28946 
28947 /* Deprecated version */
28948 
28949 DSA *DSA_generate_parameters(int bits,
28950                              unsigned char *seed, int seed_len,
28951                              int *counter_ret, unsigned long *h_ret, void
28952                               (*callback) (int, int, void *), void *cb_arg);
28953 
28954 
28955 /* New version */
28956 int DSA_generate_parameters_ex(DSA *dsa, int bits,
28957                                const unsigned char *seed, int seed_len,
28958                                int *counter_ret, unsigned long *h_ret,
28959                                BN_GENCB *cb);
28960 
28961 int DSA_generate_key(DSA *a);
28962 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
28963 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
28964 int i2d_DSAparams(const DSA *a, unsigned char **pp);
28965 
28966 
28967 int DSAparams_print(BIO *bp, const DSA *x);
28968 int DSA_print(BIO *bp, const DSA *x, int off);
28969 
28970 
28971 int DSAparams_print_fp(FILE *fp, const DSA *x);
28972 int DSA_print_fp(FILE *bp, const DSA *x, int off);
28973 
28974 
28975 
28976 /*
28977  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
28978  * have one value here we set the number of checks to 64 which is the 128 bit
28979  * security level that is the highest level and valid for creating a 3072 bit
28980  * DSA key.
28981  */
28982 
28983 
28984 
28985 
28986 /*
28987  * Convert DSA structure (key or just parameters) into DH structure (be
28988  * careful to avoid small subgroup attacks when using this!)
28989  */
28990 DH *DSA_dup_DH(const DSA *r);
28991 # 278 "/usr/include/openssl/dsa.h" 3 4
28992 /* BEGIN ERROR CODES */
28993 /*
28994  * The following lines are auto generated by the script mkerr.pl. Any changes
28995  * made after this point may be overwritten when the script is next run.
28996  */
28997 void ERR_load_DSA_strings(void);
28998 
28999 /* Error codes for the DSA functions. */
29000 
29001 /* Function codes. */
29002 # 316 "/usr/include/openssl/dsa.h" 3 4
29003 /* Reason codes. */
29004 # 100 "/usr/include/openssl/x509.h" 2 3 4
29005 
29006 
29007 # 1 "/usr/include/openssl/dh.h" 1 3 4
29008 /* crypto/dh/dh.h */
29009 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29010  * All rights reserved.
29011  *
29012  * This package is an SSL implementation written
29013  * by Eric Young (eay@cryptsoft.com).
29014  * The implementation was written so as to conform with Netscapes SSL.
29015  *
29016  * This library is free for commercial and non-commercial use as long as
29017  * the following conditions are aheared to.  The following conditions
29018  * apply to all code found in this distribution, be it the RC4, RSA,
29019  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29020  * included with this distribution is covered by the same copyright terms
29021  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29022  *
29023  * Copyright remains Eric Young's, and as such any Copyright notices in
29024  * the code are not to be removed.
29025  * If this package is used in a product, Eric Young should be given attribution
29026  * as the author of the parts of the library used.
29027  * This can be in the form of a textual message at program startup or
29028  * in documentation (online or textual) provided with the package.
29029  *
29030  * Redistribution and use in source and binary forms, with or without
29031  * modification, are permitted provided that the following conditions
29032  * are met:
29033  * 1. Redistributions of source code must retain the copyright
29034  *    notice, this list of conditions and the following disclaimer.
29035  * 2. Redistributions in binary form must reproduce the above copyright
29036  *    notice, this list of conditions and the following disclaimer in the
29037  *    documentation and/or other materials provided with the distribution.
29038  * 3. All advertising materials mentioning features or use of this software
29039  *    must display the following acknowledgement:
29040  *    "This product includes cryptographic software written by
29041  *     Eric Young (eay@cryptsoft.com)"
29042  *    The word 'cryptographic' can be left out if the rouines from the library
29043  *    being used are not cryptographic related :-).
29044  * 4. If you include any Windows specific code (or a derivative thereof) from
29045  *    the apps directory (application code) you must include an acknowledgement:
29046  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29047  *
29048  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29049  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29050  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29051  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29052  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29053  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29054  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29055  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29056  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29057  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29058  * SUCH DAMAGE.
29059  *
29060  * The licence and distribution terms for any publically available version or
29061  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29062  * copied and put under another distribution licence
29063  * [including the GNU Public Licence.]
29064  */
29065 # 103 "/usr/include/openssl/x509.h" 2 3 4
29066 
29067 
29068 
29069 
29070 # 1 "/usr/include/openssl/sha.h" 1 3 4
29071 /* crypto/sha/sha.h */
29072 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29073  * All rights reserved.
29074  *
29075  * This package is an SSL implementation written
29076  * by Eric Young (eay@cryptsoft.com).
29077  * The implementation was written so as to conform with Netscapes SSL.
29078  *
29079  * This library is free for commercial and non-commercial use as long as
29080  * the following conditions are aheared to.  The following conditions
29081  * apply to all code found in this distribution, be it the RC4, RSA,
29082  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29083  * included with this distribution is covered by the same copyright terms
29084  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29085  *
29086  * Copyright remains Eric Young's, and as such any Copyright notices in
29087  * the code are not to be removed.
29088  * If this package is used in a product, Eric Young should be given attribution
29089  * as the author of the parts of the library used.
29090  * This can be in the form of a textual message at program startup or
29091  * in documentation (online or textual) provided with the package.
29092  *
29093  * Redistribution and use in source and binary forms, with or without
29094  * modification, are permitted provided that the following conditions
29095  * are met:
29096  * 1. Redistributions of source code must retain the copyright
29097  *    notice, this list of conditions and the following disclaimer.
29098  * 2. Redistributions in binary form must reproduce the above copyright
29099  *    notice, this list of conditions and the following disclaimer in the
29100  *    documentation and/or other materials provided with the distribution.
29101  * 3. All advertising materials mentioning features or use of this software
29102  *    must display the following acknowledgement:
29103  *    "This product includes cryptographic software written by
29104  *     Eric Young (eay@cryptsoft.com)"
29105  *    The word 'cryptographic' can be left out if the rouines from the library
29106  *    being used are not cryptographic related :-).
29107  * 4. If you include any Windows specific code (or a derivative thereof) from
29108  *    the apps directory (application code) you must include an acknowledgement:
29109  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29110  *
29111  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29112  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29113  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29114  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29115  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29116  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29117  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29118  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29119  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29120  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29121  * SUCH DAMAGE.
29122  *
29123  * The licence and distribution terms for any publically available version or
29124  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29125  * copied and put under another distribution licence
29126  * [including the GNU Public Licence.]
29127  */
29128 
29129 
29130 
29131 
29132 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
29133 /* e_os2.h */
29134 /* ====================================================================
29135  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
29136  *
29137  * Redistribution and use in source and binary forms, with or without
29138  * modification, are permitted provided that the following conditions
29139  * are met:
29140  *
29141  * 1. Redistributions of source code must retain the above copyright
29142  *    notice, this list of conditions and the following disclaimer.
29143  *
29144  * 2. Redistributions in binary form must reproduce the above copyright
29145  *    notice, this list of conditions and the following disclaimer in
29146  *    the documentation and/or other materials provided with the
29147  *    distribution.
29148  *
29149  * 3. All advertising materials mentioning features or use of this
29150  *    software must display the following acknowledgment:
29151  *    "This product includes software developed by the OpenSSL Project
29152  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29153  *
29154  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29155  *    endorse or promote products derived from this software without
29156  *    prior written permission. For written permission, please contact
29157  *    openssl-core@openssl.org.
29158  *
29159  * 5. Products derived from this software may not be called "OpenSSL"
29160  *    nor may "OpenSSL" appear in their names without prior written
29161  *    permission of the OpenSSL Project.
29162  *
29163  * 6. Redistributions of any form whatsoever must retain the following
29164  *    acknowledgment:
29165  *    "This product includes software developed by the OpenSSL Project
29166  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29167  *
29168  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29169  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29170  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29171  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29172  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29173  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29174  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29175  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29176  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29177  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29178  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29179  * OF THE POSSIBILITY OF SUCH DAMAGE.
29180  * ====================================================================
29181  *
29182  * This product includes cryptographic software written by Eric Young
29183  * (eay@cryptsoft.com).  This product includes software written by Tim
29184  * Hudson (tjh@cryptsoft.com).
29185  *
29186  */
29187 
29188 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
29189 /* opensslconf.h */
29190 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
29191 
29192 
29193 
29194 
29195 /* OpenSSL was configured with the following options: */
29196 # 108 "/usr/include/openssl/opensslconf.h" 3 4
29197 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
29198    asks for it.  This is a transient feature that is provided for those
29199    who haven't had the time to do the appropriate changes in their
29200    applications.  */
29201 # 204 "/usr/include/openssl/opensslconf.h" 3 4
29202 /* crypto/opensslconf.h.in */
29203 
29204 /* Generate 80386 code? */
29205 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
29206 # 63 "/usr/include/openssl/sha.h" 2 3 4
29207 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
29208 /*
29209  * CDDL HEADER START
29210  *
29211  * The contents of this file are subject to the terms of the
29212  * Common Development and Distribution License, Version 1.0 only
29213  * (the "License").  You may not use this file except in compliance
29214  * with the License.
29215  *
29216  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29217  * or http://www.opensolaris.org/os/licensing.
29218  * See the License for the specific language governing permissions
29219  * and limitations under the License.
29220  *
29221  * When distributing Covered Code, include this CDDL HEADER in each
29222  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29223  * If applicable, add the following below this CDDL HEADER, with the
29224  * fields enclosed by brackets "[]" replaced with your own identifying
29225  * information: Portions Copyright [yyyy] [name of copyright owner]
29226  *
29227  * CDDL HEADER END
29228  */
29229 /*	Copyright (c) 1988 AT&T	*/
29230 /*	  All Rights Reserved  	*/
29231 
29232 
29233 /*
29234  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
29235  * Use is subject to license terms.
29236  */
29237 # 64 "/usr/include/openssl/sha.h" 2 3 4
29238 # 77 "/usr/include/openssl/sha.h" 3 4
29239 /*-
29240  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29241  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
29242  * ! SHA_LONG_LOG2 has to be defined along.                        !
29243  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29244  */
29245 # 100 "/usr/include/openssl/sha.h" 3 4
29246 typedef struct SHAstate_st {
29247     unsigned int h0, h1, h2, h3, h4;
29248     unsigned int Nl, Nh;
29249     unsigned int data[16];
29250     unsigned int num;
29251 } SHA_CTX;
29252 
29253 
29254 
29255 
29256 
29257 int SHA_Init(SHA_CTX *c);
29258 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
29259 int SHA_Final(unsigned char *md, SHA_CTX *c);
29260 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
29261 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
29262 
29263 
29264 
29265 
29266 
29267 int SHA1_Init(SHA_CTX *c);
29268 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
29269 int SHA1_Final(unsigned char *md, SHA_CTX *c);
29270 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
29271 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
29272 # 134 "/usr/include/openssl/sha.h" 3 4
29273 typedef struct SHA256state_st {
29274     unsigned int h[8];
29275     unsigned int Nl, Nh;
29276     unsigned int data[16];
29277     unsigned int num, md_len;
29278 } SHA256_CTX;
29279 
29280 
29281 
29282 
29283 
29284 
29285 int SHA224_Init(SHA256_CTX *c);
29286 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
29287 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
29288 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
29289 int SHA256_Init(SHA256_CTX *c);
29290 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
29291 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
29292 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
29293 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
29294 
29295 
29296 
29297 
29298 
29299 
29300 /*
29301  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
29302  * being exactly 64-bit wide. See Implementation Notes in sha512.c
29303  * for further details.
29304  */
29305 /*
29306  * SHA-512 treats input data as a
29307  * contiguous array of 64 bit
29308  * wide big-endian values.
29309  */
29310 # 183 "/usr/include/openssl/sha.h" 3 4
29311 typedef struct SHA512state_st {
29312     unsigned long long h[8];
29313     unsigned long long Nl, Nh;
29314     union {
29315         unsigned long long d[16];
29316         unsigned char p[(16*8)];
29317     } u;
29318     unsigned int num, md_len;
29319 } SHA512_CTX;
29320 
29321 
29322 
29323 
29324 
29325 
29326 
29327 int SHA384_Init(SHA512_CTX *c);
29328 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
29329 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
29330 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
29331 int SHA512_Init(SHA512_CTX *c);
29332 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
29333 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
29334 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
29335 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
29336 # 108 "/usr/include/openssl/x509.h" 2 3 4
29337 
29338 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
29339 /* ====================================================================
29340  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
29341  *
29342  * Redistribution and use in source and binary forms, with or without
29343  * modification, are permitted provided that the following conditions
29344  * are met:
29345  *
29346  * 1. Redistributions of source code must retain the above copyright
29347  *    notice, this list of conditions and the following disclaimer.
29348  *
29349  * 2. Redistributions in binary form must reproduce the above copyright
29350  *    notice, this list of conditions and the following disclaimer in
29351  *    the documentation and/or other materials provided with the
29352  *    distribution.
29353  *
29354  * 3. All advertising materials mentioning features or use of this
29355  *    software must display the following acknowledgment:
29356  *    "This product includes software developed by the OpenSSL Project
29357  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29358  *
29359  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29360  *    endorse or promote products derived from this software without
29361  *    prior written permission. For written permission, please contact
29362  *    openssl-core@openssl.org.
29363  *
29364  * 5. Products derived from this software may not be called "OpenSSL"
29365  *    nor may "OpenSSL" appear in their names without prior written
29366  *    permission of the OpenSSL Project.
29367  *
29368  * 6. Redistributions of any form whatsoever must retain the following
29369  *    acknowledgment:
29370  *    "This product includes software developed by the OpenSSL Project
29371  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29372  *
29373  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29374  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29375  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29376  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29377  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29378  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29379  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29380  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29381  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29382  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29383  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29384  * OF THE POSSIBILITY OF SUCH DAMAGE.
29385  * ====================================================================
29386  *
29387  * This product includes cryptographic software written by Eric Young
29388  * (eay@cryptsoft.com).  This product includes software written by Tim
29389  * Hudson (tjh@cryptsoft.com).
29390  *
29391  */
29392 # 110 "/usr/include/openssl/x509.h" 2 3 4
29393 # 137 "/usr/include/openssl/x509.h" 3 4
29394 typedef struct X509_objects_st {
29395     int nid;
29396     int (*a2i) (void);
29397     int (*i2a) (void);
29398 } X509_OBJECTS;
29399 
29400 struct X509_algor_st {
29401     ASN1_OBJECT *algorithm;
29402     ASN1_TYPE *parameter;
29403 } /* X509_ALGOR */ ;
29404 
29405 
29406 
29407 typedef struct stack_st_X509_ALGOR X509_ALGORS;
29408 
29409 typedef struct X509_val_st {
29410     ASN1_TIME *notBefore;
29411     ASN1_TIME *notAfter;
29412 } X509_VAL;
29413 
29414 struct X509_pubkey_st {
29415     X509_ALGOR *algor;
29416     ASN1_BIT_STRING *public_key;
29417     EVP_PKEY *pkey;
29418 };
29419 
29420 typedef struct X509_sig_st {
29421     X509_ALGOR *algor;
29422     ASN1_OCTET_STRING *digest;
29423 } X509_SIG;
29424 
29425 typedef struct X509_name_entry_st {
29426     ASN1_OBJECT *object;
29427     ASN1_STRING *value;
29428     int set;
29429     int size; /* temp variable */
29430 } X509_NAME_ENTRY;
29431 
29432 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
29433 
29434 
29435 /* we always keep X509_NAMEs in 2 forms. */
29436 struct X509_name_st {
29437     struct stack_st_X509_NAME_ENTRY *entries;
29438     int modified; /* true if 'bytes' needs to be built */
29439 
29440     BUF_MEM *bytes;
29441 
29442 
29443 
29444 /*      unsigned long hash; Keep the hash around for lookups */
29445     unsigned char *canon_enc;
29446     int canon_enclen;
29447 } /* X509_NAME */ ;
29448 
29449 struct stack_st_X509_NAME { _STACK stack; };
29450 
29451 
29452 
29453 typedef struct X509_extension_st {
29454     ASN1_OBJECT *object;
29455     ASN1_BOOLEAN critical;
29456     ASN1_OCTET_STRING *value;
29457 } X509_EXTENSION;
29458 
29459 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
29460 
29461 struct stack_st_X509_EXTENSION { _STACK stack; };
29462 
29463 
29464 /* a sequence of these are used */
29465 typedef struct x509_attributes_st {
29466     ASN1_OBJECT *object;
29467     int single; /* 0 for a set, 1 for a single item (which is
29468                                  * wrong) */
29469     union {
29470         char *ptr;
29471         /*
29472          * 0
29473          */ struct stack_st_ASN1_TYPE *set;
29474         /*
29475          * 1
29476          */ ASN1_TYPE *single;
29477     } value;
29478 } X509_ATTRIBUTE;
29479 
29480 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
29481 
29482 
29483 typedef struct X509_req_info_st {
29484     ASN1_ENCODING enc;
29485     ASN1_INTEGER *version;
29486     X509_NAME *subject;
29487     X509_PUBKEY *pubkey;
29488     /*  d=2 hl=2 l=  0 cons: cont: 00 */
29489     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
29490 } X509_REQ_INFO;
29491 
29492 typedef struct X509_req_st {
29493     X509_REQ_INFO *req_info;
29494     X509_ALGOR *sig_alg;
29495     ASN1_BIT_STRING *signature;
29496     int references;
29497 } X509_REQ;
29498 
29499 typedef struct x509_cinf_st {
29500     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
29501     ASN1_INTEGER *serialNumber;
29502     X509_ALGOR *signature;
29503     X509_NAME *issuer;
29504     X509_VAL *validity;
29505     X509_NAME *subject;
29506     X509_PUBKEY *key;
29507     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
29508     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
29509     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
29510     ASN1_ENCODING enc;
29511 } X509_CINF;
29512 
29513 /*
29514  * This stuff is certificate "auxiliary info" it contains details which are
29515  * useful in certificate stores and databases. When used this is tagged onto
29516  * the end of the certificate itself
29517  */
29518 
29519 typedef struct x509_cert_aux_st {
29520     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
29521     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
29522     ASN1_UTF8STRING *alias; /* "friendly name" */
29523     ASN1_OCTET_STRING *keyid; /* key id of private key */
29524     struct stack_st_X509_ALGOR *other; /* other unspecified info */
29525 } X509_CERT_AUX;
29526 
29527 struct x509_st {
29528     X509_CINF *cert_info;
29529     X509_ALGOR *sig_alg;
29530     ASN1_BIT_STRING *signature;
29531     int valid;
29532     int references;
29533     char *name;
29534     CRYPTO_EX_DATA ex_data;
29535     /* These contain copies of various extension values */
29536     long ex_pathlen;
29537     long ex_pcpathlen;
29538     unsigned long ex_flags;
29539     unsigned long ex_kusage;
29540     unsigned long ex_xkusage;
29541     unsigned long ex_nscert;
29542     ASN1_OCTET_STRING *skid;
29543     AUTHORITY_KEYID *akid;
29544     X509_POLICY_CACHE *policy_cache;
29545     struct stack_st_DIST_POINT *crldp;
29546     struct stack_st_GENERAL_NAME *altname;
29547     NAME_CONSTRAINTS *nc;
29548 
29549 
29550 
29551 
29552 
29553     unsigned char sha1_hash[20];
29554 
29555     X509_CERT_AUX *aux;
29556 } /* X509 */ ;
29557 
29558 struct stack_st_X509 { _STACK stack; };
29559 
29560 
29561 /* This is used for a table of trust checking functions */
29562 
29563 typedef struct x509_trust_st {
29564     int trust;
29565     int flags;
29566     int (*check_trust) (struct x509_trust_st *, X509 *, int);
29567     char *name;
29568     int arg1;
29569     void *arg2;
29570 } X509_TRUST;
29571 
29572 struct stack_st_X509_TRUST { _STACK stack; };
29573 
29574 typedef struct x509_cert_pair_st {
29575     X509 *forward;
29576     X509 *reverse;
29577 } X509_CERT_PAIR;
29578 
29579 /* standard trust ids */
29580 # 335 "/usr/include/openssl/x509.h" 3 4
29581 /* Keep these up to date! */
29582 
29583 
29584 
29585 /* trust_flags values */
29586 
29587 
29588 
29589 /* check_trust return codes */
29590 
29591 
29592 
29593 
29594 
29595 /* Flags for X509_print_ex() */
29596 # 366 "/usr/include/openssl/x509.h" 3 4
29597 /* Flags specific to X509_NAME_print_ex() */
29598 
29599 /* The field separator information */
29600 # 381 "/usr/include/openssl/x509.h" 3 4
29601 /* How the field name is shown */
29602 # 392 "/usr/include/openssl/x509.h" 3 4
29603 /*
29604  * This determines if we dump fields we don't recognise: RFC2253 requires
29605  * this.
29606  */
29607 
29608 
29609 
29610 
29611 
29612 
29613 /* Complete set of RFC2253 flags */
29614 
29615 
29616 
29617 
29618 
29619 
29620 
29621 /* readable oneline form */
29622 
29623 
29624 
29625 
29626 
29627 
29628 
29629 /* readable multiline form */
29630 # 427 "/usr/include/openssl/x509.h" 3 4
29631 struct x509_revoked_st {
29632     ASN1_INTEGER *serialNumber;
29633     ASN1_TIME *revocationDate;
29634     struct stack_st_X509_EXTENSION /* optional */ *extensions;
29635     /* Set up if indirect CRL */
29636     struct stack_st_GENERAL_NAME *issuer;
29637     /* Revocation reason */
29638     int reason;
29639     int sequence; /* load sequence */
29640 };
29641 
29642 struct stack_st_X509_REVOKED { _STACK stack; };
29643 
29644 
29645 typedef struct X509_crl_info_st {
29646     ASN1_INTEGER *version;
29647     X509_ALGOR *sig_alg;
29648     X509_NAME *issuer;
29649     ASN1_TIME *lastUpdate;
29650     ASN1_TIME *nextUpdate;
29651     struct stack_st_X509_REVOKED *revoked;
29652     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
29653     ASN1_ENCODING enc;
29654 } X509_CRL_INFO;
29655 
29656 struct X509_crl_st {
29657     /* actual signature */
29658     X509_CRL_INFO *crl;
29659     X509_ALGOR *sig_alg;
29660     ASN1_BIT_STRING *signature;
29661     int references;
29662     int flags;
29663     /* Copies of various extensions */
29664     AUTHORITY_KEYID *akid;
29665     ISSUING_DIST_POINT *idp;
29666     /* Convenient breakdown of IDP */
29667     int idp_flags;
29668     int idp_reasons;
29669     /* CRL and base CRL numbers for delta processing */
29670     ASN1_INTEGER *crl_number;
29671     ASN1_INTEGER *base_crl_number;
29672 
29673     unsigned char sha1_hash[20];
29674 
29675     struct stack_st_GENERAL_NAMES *issuers;
29676     const X509_CRL_METHOD *meth;
29677     void *meth_data;
29678 } /* X509_CRL */ ;
29679 
29680 struct stack_st_X509_CRL { _STACK stack; };
29681 
29682 
29683 typedef struct private_key_st {
29684     int version;
29685     /* The PKCS#8 data types */
29686     X509_ALGOR *enc_algor;
29687     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
29688     /* When decrypted, the following will not be NULL */
29689     EVP_PKEY *dec_pkey;
29690     /* used to encrypt and decrypt */
29691     int key_length;
29692     char *key_data;
29693     int key_free; /* true if we should auto free key_data */
29694     /* expanded version of 'enc_algor' */
29695     EVP_CIPHER_INFO cipher;
29696     int references;
29697 } X509_PKEY;
29698 
29699 
29700 typedef struct X509_info_st {
29701     X509 *x509;
29702     X509_CRL *crl;
29703     X509_PKEY *x_pkey;
29704     EVP_CIPHER_INFO enc_cipher;
29705     int enc_len;
29706     char *enc_data;
29707     int references;
29708 } X509_INFO;
29709 
29710 struct stack_st_X509_INFO { _STACK stack; };
29711 
29712 
29713 /*
29714  * The next 2 structures and their 8 routines were sent to me by Pat Richard
29715  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
29716  * useful if you are writing a CA web page
29717  */
29718 typedef struct Netscape_spkac_st {
29719     X509_PUBKEY *pubkey;
29720     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
29721 } NETSCAPE_SPKAC;
29722 
29723 typedef struct Netscape_spki_st {
29724     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
29725     X509_ALGOR *sig_algor;
29726     ASN1_BIT_STRING *signature;
29727 } NETSCAPE_SPKI;
29728 
29729 /* Netscape certificate sequence structure */
29730 typedef struct Netscape_certificate_sequence {
29731     ASN1_OBJECT *type;
29732     struct stack_st_X509 *certs;
29733 } NETSCAPE_CERT_SEQUENCE;
29734 
29735 /*- Unused (and iv length is wrong)
29736 typedef struct CBCParameter_st
29737         {
29738         unsigned char iv[8];
29739         } CBC_PARAM;
29740 */
29741 
29742 /* Password based encryption structure */
29743 
29744 typedef struct PBEPARAM_st {
29745     ASN1_OCTET_STRING *salt;
29746     ASN1_INTEGER *iter;
29747 } PBEPARAM;
29748 
29749 /* Password based encryption V2 structures */
29750 
29751 typedef struct PBE2PARAM_st {
29752     X509_ALGOR *keyfunc;
29753     X509_ALGOR *encryption;
29754 } PBE2PARAM;
29755 
29756 typedef struct PBKDF2PARAM_st {
29757 /* Usually OCTET STRING but could be anything */
29758     ASN1_TYPE *salt;
29759     ASN1_INTEGER *iter;
29760     ASN1_INTEGER *keylength;
29761     X509_ALGOR *prf;
29762 } PBKDF2PARAM;
29763 
29764 /* PKCS#8 private key info structure */
29765 
29766 struct pkcs8_priv_key_info_st {
29767     /* Flag for various broken formats */
29768     int broken;
29769 
29770 
29771 
29772 
29773 
29774     ASN1_INTEGER *version;
29775     X509_ALGOR *pkeyalg;
29776     /* Should be OCTET STRING but some are broken */
29777     ASN1_TYPE *pkey;
29778     struct stack_st_X509_ATTRIBUTE *attributes;
29779 };
29780 
29781 
29782 
29783 
29784 
29785 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
29786 /* crypto/x509/x509_vfy.h */
29787 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29788  * All rights reserved.
29789  *
29790  * This package is an SSL implementation written
29791  * by Eric Young (eay@cryptsoft.com).
29792  * The implementation was written so as to conform with Netscapes SSL.
29793  *
29794  * This library is free for commercial and non-commercial use as long as
29795  * the following conditions are aheared to.  The following conditions
29796  * apply to all code found in this distribution, be it the RC4, RSA,
29797  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29798  * included with this distribution is covered by the same copyright terms
29799  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29800  *
29801  * Copyright remains Eric Young's, and as such any Copyright notices in
29802  * the code are not to be removed.
29803  * If this package is used in a product, Eric Young should be given attribution
29804  * as the author of the parts of the library used.
29805  * This can be in the form of a textual message at program startup or
29806  * in documentation (online or textual) provided with the package.
29807  *
29808  * Redistribution and use in source and binary forms, with or without
29809  * modification, are permitted provided that the following conditions
29810  * are met:
29811  * 1. Redistributions of source code must retain the copyright
29812  *    notice, this list of conditions and the following disclaimer.
29813  * 2. Redistributions in binary form must reproduce the above copyright
29814  *    notice, this list of conditions and the following disclaimer in the
29815  *    documentation and/or other materials provided with the distribution.
29816  * 3. All advertising materials mentioning features or use of this software
29817  *    must display the following acknowledgement:
29818  *    "This product includes cryptographic software written by
29819  *     Eric Young (eay@cryptsoft.com)"
29820  *    The word 'cryptographic' can be left out if the rouines from the library
29821  *    being used are not cryptographic related :-).
29822  * 4. If you include any Windows specific code (or a derivative thereof) from
29823  *    the apps directory (application code) you must include an acknowledgement:
29824  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29825  *
29826  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29827  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29828  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29829  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29830  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29831  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29832  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29833  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29834  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29835  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29836  * SUCH DAMAGE.
29837  *
29838  * The licence and distribution terms for any publically available version or
29839  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29840  * copied and put under another distribution licence
29841  * [including the GNU Public Licence.]
29842  */
29843 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
29844 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
29845 /* opensslconf.h */
29846 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
29847 
29848 
29849 
29850 
29851 /* OpenSSL was configured with the following options: */
29852 # 108 "/usr/include/openssl/opensslconf.h" 3 4
29853 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
29854    asks for it.  This is a transient feature that is provided for those
29855    who haven't had the time to do the appropriate changes in their
29856    applications.  */
29857 # 204 "/usr/include/openssl/opensslconf.h" 3 4
29858 /* crypto/opensslconf.h.in */
29859 
29860 /* Generate 80386 code? */
29861 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
29862 
29863 # 1 "/usr/include/openssl/lhash.h" 1 3 4
29864 /* crypto/lhash/lhash.h */
29865 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29866  * All rights reserved.
29867  *
29868  * This package is an SSL implementation written
29869  * by Eric Young (eay@cryptsoft.com).
29870  * The implementation was written so as to conform with Netscapes SSL.
29871  *
29872  * This library is free for commercial and non-commercial use as long as
29873  * the following conditions are aheared to.  The following conditions
29874  * apply to all code found in this distribution, be it the RC4, RSA,
29875  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29876  * included with this distribution is covered by the same copyright terms
29877  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29878  *
29879  * Copyright remains Eric Young's, and as such any Copyright notices in
29880  * the code are not to be removed.
29881  * If this package is used in a product, Eric Young should be given attribution
29882  * as the author of the parts of the library used.
29883  * This can be in the form of a textual message at program startup or
29884  * in documentation (online or textual) provided with the package.
29885  *
29886  * Redistribution and use in source and binary forms, with or without
29887  * modification, are permitted provided that the following conditions
29888  * are met:
29889  * 1. Redistributions of source code must retain the copyright
29890  *    notice, this list of conditions and the following disclaimer.
29891  * 2. Redistributions in binary form must reproduce the above copyright
29892  *    notice, this list of conditions and the following disclaimer in the
29893  *    documentation and/or other materials provided with the distribution.
29894  * 3. All advertising materials mentioning features or use of this software
29895  *    must display the following acknowledgement:
29896  *    "This product includes cryptographic software written by
29897  *     Eric Young (eay@cryptsoft.com)"
29898  *    The word 'cryptographic' can be left out if the rouines from the library
29899  *    being used are not cryptographic related :-).
29900  * 4. If you include any Windows specific code (or a derivative thereof) from
29901  *    the apps directory (application code) you must include an acknowledgement:
29902  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29903  *
29904  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29905  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29906  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29907  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29908  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29909  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29910  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29911  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29912  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29913  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29914  * SUCH DAMAGE.
29915  *
29916  * The licence and distribution terms for any publically available version or
29917  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29918  * copied and put under another distribution licence
29919  * [including the GNU Public Licence.]
29920  */
29921 
29922 /*
29923  * Header for dynamic hash table routines Author - Eric Young
29924  */
29925 
29926 
29927 
29928 
29929 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
29930 /* e_os2.h */
29931 /* ====================================================================
29932  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
29933  *
29934  * Redistribution and use in source and binary forms, with or without
29935  * modification, are permitted provided that the following conditions
29936  * are met:
29937  *
29938  * 1. Redistributions of source code must retain the above copyright
29939  *    notice, this list of conditions and the following disclaimer.
29940  *
29941  * 2. Redistributions in binary form must reproduce the above copyright
29942  *    notice, this list of conditions and the following disclaimer in
29943  *    the documentation and/or other materials provided with the
29944  *    distribution.
29945  *
29946  * 3. All advertising materials mentioning features or use of this
29947  *    software must display the following acknowledgment:
29948  *    "This product includes software developed by the OpenSSL Project
29949  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29950  *
29951  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29952  *    endorse or promote products derived from this software without
29953  *    prior written permission. For written permission, please contact
29954  *    openssl-core@openssl.org.
29955  *
29956  * 5. Products derived from this software may not be called "OpenSSL"
29957  *    nor may "OpenSSL" appear in their names without prior written
29958  *    permission of the OpenSSL Project.
29959  *
29960  * 6. Redistributions of any form whatsoever must retain the following
29961  *    acknowledgment:
29962  *    "This product includes software developed by the OpenSSL Project
29963  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29964  *
29965  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29966  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29967  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29968  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29969  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29970  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29971  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29972  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29973  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29974  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29975  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29976  * OF THE POSSIBILITY OF SUCH DAMAGE.
29977  * ====================================================================
29978  *
29979  * This product includes cryptographic software written by Eric Young
29980  * (eay@cryptsoft.com).  This product includes software written by Tim
29981  * Hudson (tjh@cryptsoft.com).
29982  *
29983  */
29984 
29985 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
29986 /* opensslconf.h */
29987 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
29988 
29989 
29990 
29991 
29992 /* OpenSSL was configured with the following options: */
29993 # 108 "/usr/include/openssl/opensslconf.h" 3 4
29994 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
29995    asks for it.  This is a transient feature that is provided for those
29996    who haven't had the time to do the appropriate changes in their
29997    applications.  */
29998 # 204 "/usr/include/openssl/opensslconf.h" 3 4
29999 /* crypto/opensslconf.h.in */
30000 
30001 /* Generate 80386 code? */
30002 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
30003 # 67 "/usr/include/openssl/lhash.h" 2 3 4
30004 
30005 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
30006 /*
30007  * CDDL HEADER START
30008  *
30009  * The contents of this file are subject to the terms of the
30010  * Common Development and Distribution License (the "License").
30011  * You may not use this file except in compliance with the License.
30012  *
30013  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30014  * or http://www.opensolaris.org/os/licensing.
30015  * See the License for the specific language governing permissions
30016  * and limitations under the License.
30017  *
30018  * When distributing Covered Code, include this CDDL HEADER in each
30019  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30020  * If applicable, add the following below this CDDL HEADER, with the
30021  * fields enclosed by brackets "[]" replaced with your own identifying
30022  * information: Portions Copyright [yyyy] [name of copyright owner]
30023  *
30024  * CDDL HEADER END
30025  */
30026 
30027 /*
30028  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30029  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
30030  */
30031 
30032 /*	Copyright (c) 1988 AT&T	*/
30033 /*	  All Rights Reserved  	*/
30034 
30035 /*
30036  * User-visible pieces of the ANSI C standard I/O package.
30037  */
30038 # 69 "/usr/include/openssl/lhash.h" 2 3 4
30039 
30040 
30041 
30042 # 1 "/usr/include/openssl/bio.h" 1 3 4
30043 /* crypto/bio/bio.h */
30044 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30045  * All rights reserved.
30046  *
30047  * This package is an SSL implementation written
30048  * by Eric Young (eay@cryptsoft.com).
30049  * The implementation was written so as to conform with Netscapes SSL.
30050  *
30051  * This library is free for commercial and non-commercial use as long as
30052  * the following conditions are aheared to.  The following conditions
30053  * apply to all code found in this distribution, be it the RC4, RSA,
30054  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30055  * included with this distribution is covered by the same copyright terms
30056  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30057  *
30058  * Copyright remains Eric Young's, and as such any Copyright notices in
30059  * the code are not to be removed.
30060  * If this package is used in a product, Eric Young should be given attribution
30061  * as the author of the parts of the library used.
30062  * This can be in the form of a textual message at program startup or
30063  * in documentation (online or textual) provided with the package.
30064  *
30065  * Redistribution and use in source and binary forms, with or without
30066  * modification, are permitted provided that the following conditions
30067  * are met:
30068  * 1. Redistributions of source code must retain the copyright
30069  *    notice, this list of conditions and the following disclaimer.
30070  * 2. Redistributions in binary form must reproduce the above copyright
30071  *    notice, this list of conditions and the following disclaimer in the
30072  *    documentation and/or other materials provided with the distribution.
30073  * 3. All advertising materials mentioning features or use of this software
30074  *    must display the following acknowledgement:
30075  *    "This product includes cryptographic software written by
30076  *     Eric Young (eay@cryptsoft.com)"
30077  *    The word 'cryptographic' can be left out if the rouines from the library
30078  *    being used are not cryptographic related :-).
30079  * 4. If you include any Windows specific code (or a derivative thereof) from
30080  *    the apps directory (application code) you must include an acknowledgement:
30081  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30082  *
30083  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30084  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30085  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30086  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30087  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30088  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30089  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30090  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30091  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30092  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30093  * SUCH DAMAGE.
30094  *
30095  * The licence and distribution terms for any publically available version or
30096  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30097  * copied and put under another distribution licence
30098  * [including the GNU Public Licence.]
30099  */
30100 # 73 "/usr/include/openssl/lhash.h" 2 3 4
30101 
30102 
30103 
30104 
30105 
30106 
30107 typedef struct lhash_node_st {
30108     void *data;
30109     struct lhash_node_st *next;
30110 
30111     unsigned long hash;
30112 
30113 } LHASH_NODE;
30114 
30115 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
30116 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
30117 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
30118 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
30119 
30120 /*
30121  * Macros for declaring and implementing type-safe wrappers for LHASH
30122  * callbacks. This way, callbacks can be provided to LHASH structures without
30123  * function pointer casting and the macro-defined callbacks provide
30124  * per-variable casting before deferring to the underlying type-specific
30125  * callbacks. NB: It is possible to place a "static" in front of both the
30126  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
30127  */
30128 
30129 /* First: "hash" functions */
30130 # 110 "/usr/include/openssl/lhash.h" 3 4
30131 /* Second: "compare" functions */
30132 # 120 "/usr/include/openssl/lhash.h" 3 4
30133 /* Third: "doall" functions */
30134 # 129 "/usr/include/openssl/lhash.h" 3 4
30135 /* Fourth: "doall_arg" functions */
30136 # 139 "/usr/include/openssl/lhash.h" 3 4
30137 typedef struct lhash_st {
30138     LHASH_NODE **b;
30139     LHASH_COMP_FN_TYPE comp;
30140     LHASH_HASH_FN_TYPE hash;
30141     unsigned int num_nodes;
30142     unsigned int num_alloc_nodes;
30143     unsigned int p;
30144     unsigned int pmax;
30145     unsigned long up_load; /* load times 256 */
30146     unsigned long down_load; /* load times 256 */
30147     unsigned long num_items;
30148     unsigned long num_expands;
30149     unsigned long num_expand_reallocs;
30150     unsigned long num_contracts;
30151     unsigned long num_contract_reallocs;
30152     unsigned long num_hash_calls;
30153     unsigned long num_comp_calls;
30154     unsigned long num_insert;
30155     unsigned long num_replace;
30156     unsigned long num_delete;
30157     unsigned long num_no_delete;
30158     unsigned long num_retrieve;
30159     unsigned long num_retrieve_miss;
30160     unsigned long num_hash_comps;
30161     int error;
30162 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
30163                                  * and friends */
30164 
30165 
30166 
30167 /*
30168  * Indicates a malloc() error in the last call, this is only bad in
30169  * lh_insert().
30170  */
30171 
30172 
30173 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
30174 void lh_free(_LHASH *lh);
30175 void *lh_insert(_LHASH *lh, void *data);
30176 void *lh_delete(_LHASH *lh, const void *data);
30177 void *lh_retrieve(_LHASH *lh, const void *data);
30178 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
30179 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
30180 unsigned long lh_strhash(const char *c);
30181 unsigned long lh_num_items(const _LHASH *lh);
30182 
30183 
30184 void lh_stats(const _LHASH *lh, FILE *out);
30185 void lh_node_stats(const _LHASH *lh, FILE *out);
30186 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
30187 
30188 
30189 
30190 void lh_stats_bio(const _LHASH *lh, BIO *out);
30191 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
30192 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
30193 
30194 
30195 /* Type checking... */
30196 # 206 "/usr/include/openssl/lhash.h" 3 4
30197 /* Define wrapper functions. */
30198 # 233 "/usr/include/openssl/lhash.h" 3 4
30199 struct lhash_st_OPENSSL_STRING { int dummy; };
30200 struct lhash_st_OPENSSL_CSTRING { int dummy; };
30201 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
30202 
30203 # 1 "/usr/include/openssl/bio.h" 1 3 4
30204 /* crypto/bio/bio.h */
30205 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30206  * All rights reserved.
30207  *
30208  * This package is an SSL implementation written
30209  * by Eric Young (eay@cryptsoft.com).
30210  * The implementation was written so as to conform with Netscapes SSL.
30211  *
30212  * This library is free for commercial and non-commercial use as long as
30213  * the following conditions are aheared to.  The following conditions
30214  * apply to all code found in this distribution, be it the RC4, RSA,
30215  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30216  * included with this distribution is covered by the same copyright terms
30217  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30218  *
30219  * Copyright remains Eric Young's, and as such any Copyright notices in
30220  * the code are not to be removed.
30221  * If this package is used in a product, Eric Young should be given attribution
30222  * as the author of the parts of the library used.
30223  * This can be in the form of a textual message at program startup or
30224  * in documentation (online or textual) provided with the package.
30225  *
30226  * Redistribution and use in source and binary forms, with or without
30227  * modification, are permitted provided that the following conditions
30228  * are met:
30229  * 1. Redistributions of source code must retain the copyright
30230  *    notice, this list of conditions and the following disclaimer.
30231  * 2. Redistributions in binary form must reproduce the above copyright
30232  *    notice, this list of conditions and the following disclaimer in the
30233  *    documentation and/or other materials provided with the distribution.
30234  * 3. All advertising materials mentioning features or use of this software
30235  *    must display the following acknowledgement:
30236  *    "This product includes cryptographic software written by
30237  *     Eric Young (eay@cryptsoft.com)"
30238  *    The word 'cryptographic' can be left out if the rouines from the library
30239  *    being used are not cryptographic related :-).
30240  * 4. If you include any Windows specific code (or a derivative thereof) from
30241  *    the apps directory (application code) you must include an acknowledgement:
30242  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30243  *
30244  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30245  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30246  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30247  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30248  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30249  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30250  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30251  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30252  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30253  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30254  * SUCH DAMAGE.
30255  *
30256  * The licence and distribution terms for any publically available version or
30257  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30258  * copied and put under another distribution licence
30259  * [including the GNU Public Licence.]
30260  */
30261 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
30262 # 1 "/usr/include/openssl/crypto.h" 1 3 4
30263 /* crypto/crypto.h */
30264 /* ====================================================================
30265  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
30266  *
30267  * Redistribution and use in source and binary forms, with or without
30268  * modification, are permitted provided that the following conditions
30269  * are met:
30270  *
30271  * 1. Redistributions of source code must retain the above copyright
30272  *    notice, this list of conditions and the following disclaimer.
30273  *
30274  * 2. Redistributions in binary form must reproduce the above copyright
30275  *    notice, this list of conditions and the following disclaimer in
30276  *    the documentation and/or other materials provided with the
30277  *    distribution.
30278  *
30279  * 3. All advertising materials mentioning features or use of this
30280  *    software must display the following acknowledgment:
30281  *    "This product includes software developed by the OpenSSL Project
30282  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
30283  *
30284  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
30285  *    endorse or promote products derived from this software without
30286  *    prior written permission. For written permission, please contact
30287  *    openssl-core@openssl.org.
30288  *
30289  * 5. Products derived from this software may not be called "OpenSSL"
30290  *    nor may "OpenSSL" appear in their names without prior written
30291  *    permission of the OpenSSL Project.
30292  *
30293  * 6. Redistributions of any form whatsoever must retain the following
30294  *    acknowledgment:
30295  *    "This product includes software developed by the OpenSSL Project
30296  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
30297  *
30298  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
30299  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30300  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30301  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
30302  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30303  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30304  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30305  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30306  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30307  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30308  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30309  * OF THE POSSIBILITY OF SUCH DAMAGE.
30310  * ====================================================================
30311  *
30312  * This product includes cryptographic software written by Eric Young
30313  * (eay@cryptsoft.com).  This product includes software written by Tim
30314  * Hudson (tjh@cryptsoft.com).
30315  *
30316  */
30317 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30318  * All rights reserved.
30319  *
30320  * This package is an SSL implementation written
30321  * by Eric Young (eay@cryptsoft.com).
30322  * The implementation was written so as to conform with Netscapes SSL.
30323  *
30324  * This library is free for commercial and non-commercial use as long as
30325  * the following conditions are aheared to.  The following conditions
30326  * apply to all code found in this distribution, be it the RC4, RSA,
30327  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30328  * included with this distribution is covered by the same copyright terms
30329  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30330  *
30331  * Copyright remains Eric Young's, and as such any Copyright notices in
30332  * the code are not to be removed.
30333  * If this package is used in a product, Eric Young should be given attribution
30334  * as the author of the parts of the library used.
30335  * This can be in the form of a textual message at program startup or
30336  * in documentation (online or textual) provided with the package.
30337  *
30338  * Redistribution and use in source and binary forms, with or without
30339  * modification, are permitted provided that the following conditions
30340  * are met:
30341  * 1. Redistributions of source code must retain the copyright
30342  *    notice, this list of conditions and the following disclaimer.
30343  * 2. Redistributions in binary form must reproduce the above copyright
30344  *    notice, this list of conditions and the following disclaimer in the
30345  *    documentation and/or other materials provided with the distribution.
30346  * 3. All advertising materials mentioning features or use of this software
30347  *    must display the following acknowledgement:
30348  *    "This product includes cryptographic software written by
30349  *     Eric Young (eay@cryptsoft.com)"
30350  *    The word 'cryptographic' can be left out if the rouines from the library
30351  *    being used are not cryptographic related :-).
30352  * 4. If you include any Windows specific code (or a derivative thereof) from
30353  *    the apps directory (application code) you must include an acknowledgement:
30354  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30355  *
30356  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30357  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30358  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30359  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30360  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30361  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30362  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30363  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30364  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30365  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30366  * SUCH DAMAGE.
30367  *
30368  * The licence and distribution terms for any publically available version or
30369  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30370  * copied and put under another distribution licence
30371  * [including the GNU Public Licence.]
30372  */
30373 /* ====================================================================
30374  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
30375  * ECDH support in OpenSSL originally developed by
30376  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
30377  */
30378 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
30379 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
30380 /* ====================================================================
30381  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
30382  *
30383  * Redistribution and use in source and binary forms, with or without
30384  * modification, are permitted provided that the following conditions
30385  * are met:
30386  *
30387  * 1. Redistributions of source code must retain the above copyright
30388  *    notice, this list of conditions and the following disclaimer.
30389  *
30390  * 2. Redistributions in binary form must reproduce the above copyright
30391  *    notice, this list of conditions and the following disclaimer in
30392  *    the documentation and/or other materials provided with the
30393  *    distribution.
30394  *
30395  * 3. All advertising materials mentioning features or use of this
30396  *    software must display the following acknowledgment:
30397  *    "This product includes software developed by the OpenSSL Project
30398  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
30399  *
30400  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
30401  *    endorse or promote products derived from this software without
30402  *    prior written permission. For written permission, please contact
30403  *    openssl-core@openssl.org.
30404  *
30405  * 5. Products derived from this software may not be called "OpenSSL"
30406  *    nor may "OpenSSL" appear in their names without prior written
30407  *    permission of the OpenSSL Project.
30408  *
30409  * 6. Redistributions of any form whatsoever must retain the following
30410  *    acknowledgment:
30411  *    "This product includes software developed by the OpenSSL Project
30412  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
30413  *
30414  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
30415  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30416  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30417  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
30418  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30419  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30420  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30421  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30422  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30423  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30424  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30425  * OF THE POSSIBILITY OF SUCH DAMAGE.
30426  * ====================================================================
30427  *
30428  * This product includes cryptographic software written by Eric Young
30429  * (eay@cryptsoft.com).  This product includes software written by Tim
30430  * Hudson (tjh@cryptsoft.com).
30431  *
30432  */
30433 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
30434 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
30435 typedef struct x509_file_st {
30436     int num_paths; /* number of paths to files or directories */
30437     int num_alloced;
30438     char **paths; /* the list of paths or directories */
30439     int *path_type;
30440 } X509_CERT_FILE_CTX;
30441 
30442 /*******************************/
30443 /*-
30444 SSL_CTX -> X509_STORE
30445                 -> X509_LOOKUP
30446                         ->X509_LOOKUP_METHOD
30447                 -> X509_LOOKUP
30448                         ->X509_LOOKUP_METHOD
30449 
30450 SSL     -> X509_STORE_CTX
30451                 ->X509_STORE
30452 
30453 The X509_STORE holds the tables etc for verification stuff.
30454 A X509_STORE_CTX is used while validating a single certificate.
30455 The X509_STORE has X509_LOOKUPs for looking up certs.
30456 The X509_STORE then calls a function to actually verify the
30457 certificate chain.
30458 */
30459 
30460 
30461 
30462 
30463 
30464 
30465 
30466 typedef struct x509_object_st {
30467     /* one of the above types */
30468     int type;
30469     union {
30470         char *ptr;
30471         X509 *x509;
30472         X509_CRL *crl;
30473         EVP_PKEY *pkey;
30474     } data;
30475 } X509_OBJECT;
30476 
30477 typedef struct x509_lookup_st X509_LOOKUP;
30478 
30479 struct stack_st_X509_LOOKUP { _STACK stack; };
30480 struct stack_st_X509_OBJECT { _STACK stack; };
30481 
30482 /* This is a static that defines the function interface */
30483 typedef struct x509_lookup_method_st {
30484     const char *name;
30485     int (*new_item) (X509_LOOKUP *ctx);
30486     void (*free) (X509_LOOKUP *ctx);
30487     int (*init) (X509_LOOKUP *ctx);
30488     int (*shutdown) (X509_LOOKUP *ctx);
30489     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
30490                  char **ret);
30491     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
30492                            X509_OBJECT *ret);
30493     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
30494                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
30495     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
30496                                unsigned char *bytes, int len,
30497                                X509_OBJECT *ret);
30498     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
30499                          X509_OBJECT *ret);
30500 } X509_LOOKUP_METHOD;
30501 
30502 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
30503 
30504 /*
30505  * This structure hold all parameters associated with a verify operation by
30506  * including an X509_VERIFY_PARAM structure in related structures the
30507  * parameters used can be customized
30508  */
30509 
30510 typedef struct X509_VERIFY_PARAM_st {
30511     char *name;
30512     time_t check_time; /* Time to use */
30513     unsigned long inh_flags; /* Inheritance flags */
30514     unsigned long flags; /* Various verify flags */
30515     int purpose; /* purpose to check untrusted certificates */
30516     int trust; /* trust setting to check */
30517     int depth; /* Verify depth */
30518     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
30519     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
30520 } X509_VERIFY_PARAM;
30521 
30522 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
30523 
30524 /*
30525  * This is used to hold everything.  It is used for all certificate
30526  * validation.  Once we have a certificate chain, the 'verify' function is
30527  * then called to actually check the cert chain.
30528  */
30529 struct x509_store_st {
30530     /* The following is a cache of trusted certs */
30531     int cache; /* if true, stash any hits */
30532     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
30533     /* These are external lookup methods */
30534     struct stack_st_X509_LOOKUP *get_cert_methods;
30535     X509_VERIFY_PARAM *param;
30536     /* Callbacks for various operations */
30537     /* called to verify a certificate */
30538     int (*verify) (X509_STORE_CTX *ctx);
30539     /* error callback */
30540     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
30541     /* get issuers cert from ctx */
30542     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
30543     /* check issued */
30544     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
30545     /* Check revocation status of chain */
30546     int (*check_revocation) (X509_STORE_CTX *ctx);
30547     /* retrieve CRL */
30548     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
30549     /* Check CRL validity */
30550     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
30551     /* Check certificate against CRL */
30552     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
30553     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
30554     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
30555     int (*cleanup) (X509_STORE_CTX *ctx);
30556     CRYPTO_EX_DATA ex_data;
30557     int references;
30558 } /* X509_STORE */ ;
30559 
30560 int X509_STORE_set_depth(X509_STORE *store, int depth);
30561 
30562 
30563 
30564 
30565 /* This is the functions plus an instance of the local variables. */
30566 struct x509_lookup_st {
30567     int init; /* have we been started */
30568     int skip; /* don't use us. */
30569     X509_LOOKUP_METHOD *method; /* the functions */
30570     char *method_data; /* method data */
30571     X509_STORE *store_ctx; /* who owns us */
30572 } /* X509_LOOKUP */ ;
30573 
30574 /*
30575  * This is a used when verifying cert chains.  Since the gathering of the
30576  * cert chain can take some time (and have to be 'retried', this needs to be
30577  * kept and passed around.
30578  */
30579 struct x509_store_ctx_st { /* X509_STORE_CTX */
30580     X509_STORE *ctx;
30581     /* used when looking up certs */
30582     int current_method;
30583     /* The following are set by the caller */
30584     /* The cert to check */
30585     X509 *cert;
30586     /* chain of X509s - untrusted - passed in */
30587     struct stack_st_X509 *untrusted;
30588     /* set of CRLs passed in */
30589     struct stack_st_X509_CRL *crls;
30590     X509_VERIFY_PARAM *param;
30591     /* Other info for use with get_issuer() */
30592     void *other_ctx;
30593     /* Callbacks for various operations */
30594     /* called to verify a certificate */
30595     int (*verify) (X509_STORE_CTX *ctx);
30596     /* error callback */
30597     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
30598     /* get issuers cert from ctx */
30599     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
30600     /* check issued */
30601     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
30602     /* Check revocation status of chain */
30603     int (*check_revocation) (X509_STORE_CTX *ctx);
30604     /* retrieve CRL */
30605     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
30606     /* Check CRL validity */
30607     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
30608     /* Check certificate against CRL */
30609     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
30610     int (*check_policy) (X509_STORE_CTX *ctx);
30611     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
30612     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
30613     int (*cleanup) (X509_STORE_CTX *ctx);
30614     /* The following is built up */
30615     /* if 0, rebuild chain */
30616     int valid;
30617     /* index of last untrusted cert */
30618     int last_untrusted;
30619     /* chain of X509s - built up and trusted */
30620     struct stack_st_X509 *chain;
30621     /* Valid policy tree */
30622     X509_POLICY_TREE *tree;
30623     /* Require explicit policy value */
30624     int explicit_policy;
30625     /* When something goes wrong, this is why */
30626     int error_depth;
30627     int error;
30628     X509 *current_cert;
30629     /* cert currently being tested as valid issuer */
30630     X509 *current_issuer;
30631     /* current CRL */
30632     X509_CRL *current_crl;
30633     /* score of current CRL */
30634     int current_crl_score;
30635     /* Reason mask */
30636     unsigned int current_reasons;
30637     /* For CRL path validation: parent context */
30638     X509_STORE_CTX *parent;
30639     CRYPTO_EX_DATA ex_data;
30640 } /* X509_STORE_CTX */ ;
30641 
30642 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
30643 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
30644 /* These are 'informational' when looking for issuer cert */
30645 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
30646 /* Suite B mode algorithm violation */
30647 
30648 
30649 
30650 
30651 
30652 
30653 
30654 /* Host, email and IP check errors */
30655 
30656 
30657 
30658 
30659 /* Caller error */
30660 
30661 /* Issuer lookup error */
30662 
30663 
30664 
30665 
30666 /* Certificate verify flags */
30667 
30668 /* Send issuer+subject checks to verify_cb */
30669 
30670 /* Use check time instead of current time */
30671 
30672 /* Lookup CRLs */
30673 
30674 /* Lookup CRLs for whole chain */
30675 
30676 /* Ignore unhandled critical extensions */
30677 
30678 /* Disable workarounds for broken certificates */
30679 
30680 /* Enable proxy certificate validation */
30681 
30682 /* Enable policy checking */
30683 
30684 /* Policy variable require-explicit-policy */
30685 
30686 /* Policy variable inhibit-any-policy */
30687 
30688 /* Policy variable inhibit-policy-mapping */
30689 
30690 /* Notify callback that policy is OK */
30691 
30692 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
30693 
30694 /* Delta CRL support */
30695 
30696 /* Check selfsigned CA signature */
30697 
30698 /* Use trusted store first */
30699 
30700 /* Suite B 128 bit only mode: not normally used */
30701 
30702 /* Suite B 192 bit only mode */
30703 
30704 /* Suite B 128 bit mode allowing 192 bit algorithms */
30705 
30706 
30707 /* Allow partial chains if at least one certificate is in trusted store */
30708 
30709 /*
30710  * If the initial chain is not trusted, do not attempt to build an alternative
30711  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
30712  * will force the behaviour to match that of previous versions.
30713  */
30714 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
30715 /* Internal use: mask of policy related options */
30716 
30717 
30718 
30719 
30720 
30721 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
30722                                X509_NAME *name);
30723 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
30724                                              int type, X509_NAME *name);
30725 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
30726                                         X509_OBJECT *x);
30727 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
30728 void X509_OBJECT_free_contents(X509_OBJECT *a);
30729 X509_STORE *X509_STORE_new(void);
30730 void X509_STORE_free(X509_STORE *v);
30731 
30732 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
30733 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
30734 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
30735 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
30736 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
30737 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
30738 
30739 void X509_STORE_set_verify_cb(X509_STORE *ctx,
30740                               int (*verify_cb) (int, X509_STORE_CTX *));
30741 
30742 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
30743                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
30744                                                               *ctx,
30745                                                               X509_NAME *nm));
30746 
30747 X509_STORE_CTX *X509_STORE_CTX_new(void);
30748 
30749 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
30750 
30751 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
30752 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
30753                         X509 *x509, struct stack_st_X509 *chain);
30754 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
30755 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
30756 
30757 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
30758 
30759 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
30760 
30761 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
30762 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
30763 
30764 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
30765 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
30766 
30767 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
30768                               X509_OBJECT *ret);
30769 
30770 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
30771                      long argl, char **ret);
30772 
30773 
30774 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
30775 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
30776 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
30777 
30778 
30779 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
30780 void X509_LOOKUP_free(X509_LOOKUP *ctx);
30781 int X509_LOOKUP_init(X509_LOOKUP *ctx);
30782 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
30783                            X509_OBJECT *ret);
30784 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
30785                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
30786 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
30787                                unsigned char *bytes, int len,
30788                                X509_OBJECT *ret);
30789 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
30790                          X509_OBJECT *ret);
30791 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
30792 
30793 
30794 int X509_STORE_load_locations(X509_STORE *ctx,
30795                               const char *file, const char *dir);
30796 int X509_STORE_set_default_paths(X509_STORE *ctx);
30797 
30798 
30799 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
30800                                     CRYPTO_EX_new *new_func,
30801                                     CRYPTO_EX_dup *dup_func,
30802                                     CRYPTO_EX_free *free_func);
30803 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
30804 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
30805 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
30806 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
30807 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
30808 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
30809 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
30810 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
30811 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
30812 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
30813 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
30814 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
30815 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
30816 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
30817 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
30818 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
30819 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
30820                                    int purpose, int trust);
30821 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
30822 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
30823                              time_t t);
30824 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
30825                                   int (*verify_cb) (int, X509_STORE_CTX *));
30826 
30827 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
30828 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
30829 
30830 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
30831 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
30832 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
30833 
30834 /* X509_VERIFY_PARAM functions */
30835 
30836 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
30837 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
30838 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
30839                               const X509_VERIFY_PARAM *from);
30840 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
30841                            const X509_VERIFY_PARAM *from);
30842 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
30843 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
30844                                 unsigned long flags);
30845 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
30846                                   unsigned long flags);
30847 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
30848 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
30849 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
30850 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
30851 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
30852 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
30853                                   ASN1_OBJECT *policy);
30854 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
30855                                     struct stack_st_ASN1_OBJECT *policies);
30856 
30857 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
30858                                 const char *name, size_t namelen);
30859 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
30860                                 const char *name, size_t namelen);
30861 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
30862                                      unsigned int flags);
30863 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
30864 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
30865                                  const char *email, size_t emaillen);
30866 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
30867                               const unsigned char *ip, size_t iplen);
30868 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
30869                                   const char *ipasc);
30870 
30871 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
30872 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
30873 
30874 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
30875 int X509_VERIFY_PARAM_get_count(void);
30876 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
30877 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
30878 void X509_VERIFY_PARAM_table_cleanup(void);
30879 
30880 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
30881                       struct stack_st_X509 *certs,
30882                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
30883 
30884 void X509_policy_tree_free(X509_POLICY_TREE *tree);
30885 
30886 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
30887 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
30888                                                int i);
30889 
30890 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
30891                                                            X509_POLICY_TREE
30892                                                            *tree);
30893 
30894 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
30895                                                                 X509_POLICY_TREE
30896                                                                 *tree);
30897 
30898 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
30899 
30900 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
30901                                               int i);
30902 
30903 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
30904 
30905 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
30906                                                            X509_POLICY_NODE
30907                                                            *node);
30908 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
30909                                                      *node);
30910 # 582 "/usr/include/openssl/x509.h" 2 3 4
30911 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
30912 /* crypto/pkcs7/pkcs7.h */
30913 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30914  * All rights reserved.
30915  *
30916  * This package is an SSL implementation written
30917  * by Eric Young (eay@cryptsoft.com).
30918  * The implementation was written so as to conform with Netscapes SSL.
30919  *
30920  * This library is free for commercial and non-commercial use as long as
30921  * the following conditions are aheared to.  The following conditions
30922  * apply to all code found in this distribution, be it the RC4, RSA,
30923  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30924  * included with this distribution is covered by the same copyright terms
30925  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30926  *
30927  * Copyright remains Eric Young's, and as such any Copyright notices in
30928  * the code are not to be removed.
30929  * If this package is used in a product, Eric Young should be given attribution
30930  * as the author of the parts of the library used.
30931  * This can be in the form of a textual message at program startup or
30932  * in documentation (online or textual) provided with the package.
30933  *
30934  * Redistribution and use in source and binary forms, with or without
30935  * modification, are permitted provided that the following conditions
30936  * are met:
30937  * 1. Redistributions of source code must retain the copyright
30938  *    notice, this list of conditions and the following disclaimer.
30939  * 2. Redistributions in binary form must reproduce the above copyright
30940  *    notice, this list of conditions and the following disclaimer in the
30941  *    documentation and/or other materials provided with the distribution.
30942  * 3. All advertising materials mentioning features or use of this software
30943  *    must display the following acknowledgement:
30944  *    "This product includes cryptographic software written by
30945  *     Eric Young (eay@cryptsoft.com)"
30946  *    The word 'cryptographic' can be left out if the rouines from the library
30947  *    being used are not cryptographic related :-).
30948  * 4. If you include any Windows specific code (or a derivative thereof) from
30949  *    the apps directory (application code) you must include an acknowledgement:
30950  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30951  *
30952  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30953  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30954  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30955  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30956  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30957  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30958  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30959  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30960  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30961  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30962  * SUCH DAMAGE.
30963  *
30964  * The licence and distribution terms for any publically available version or
30965  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30966  * copied and put under another distribution licence
30967  * [including the GNU Public Licence.]
30968  */
30969 
30970 
30971 
30972 
30973 # 1 "/usr/include/openssl/asn1.h" 1 3 4
30974 /* crypto/asn1/asn1.h */
30975 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30976  * All rights reserved.
30977  *
30978  * This package is an SSL implementation written
30979  * by Eric Young (eay@cryptsoft.com).
30980  * The implementation was written so as to conform with Netscapes SSL.
30981  *
30982  * This library is free for commercial and non-commercial use as long as
30983  * the following conditions are aheared to.  The following conditions
30984  * apply to all code found in this distribution, be it the RC4, RSA,
30985  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30986  * included with this distribution is covered by the same copyright terms
30987  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30988  *
30989  * Copyright remains Eric Young's, and as such any Copyright notices in
30990  * the code are not to be removed.
30991  * If this package is used in a product, Eric Young should be given attribution
30992  * as the author of the parts of the library used.
30993  * This can be in the form of a textual message at program startup or
30994  * in documentation (online or textual) provided with the package.
30995  *
30996  * Redistribution and use in source and binary forms, with or without
30997  * modification, are permitted provided that the following conditions
30998  * are met:
30999  * 1. Redistributions of source code must retain the copyright
31000  *    notice, this list of conditions and the following disclaimer.
31001  * 2. Redistributions in binary form must reproduce the above copyright
31002  *    notice, this list of conditions and the following disclaimer in the
31003  *    documentation and/or other materials provided with the distribution.
31004  * 3. All advertising materials mentioning features or use of this software
31005  *    must display the following acknowledgement:
31006  *    "This product includes cryptographic software written by
31007  *     Eric Young (eay@cryptsoft.com)"
31008  *    The word 'cryptographic' can be left out if the rouines from the library
31009  *    being used are not cryptographic related :-).
31010  * 4. If you include any Windows specific code (or a derivative thereof) from
31011  *    the apps directory (application code) you must include an acknowledgement:
31012  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31013  *
31014  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31015  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31016  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31017  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31018  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31019  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31020  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31021  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31022  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31023  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31024  * SUCH DAMAGE.
31025  *
31026  * The licence and distribution terms for any publically available version or
31027  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31028  * copied and put under another distribution licence
31029  * [including the GNU Public Licence.]
31030  */
31031 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
31032 # 1 "/usr/include/openssl/bio.h" 1 3 4
31033 /* crypto/bio/bio.h */
31034 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
31035  * All rights reserved.
31036  *
31037  * This package is an SSL implementation written
31038  * by Eric Young (eay@cryptsoft.com).
31039  * The implementation was written so as to conform with Netscapes SSL.
31040  *
31041  * This library is free for commercial and non-commercial use as long as
31042  * the following conditions are aheared to.  The following conditions
31043  * apply to all code found in this distribution, be it the RC4, RSA,
31044  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31045  * included with this distribution is covered by the same copyright terms
31046  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31047  *
31048  * Copyright remains Eric Young's, and as such any Copyright notices in
31049  * the code are not to be removed.
31050  * If this package is used in a product, Eric Young should be given attribution
31051  * as the author of the parts of the library used.
31052  * This can be in the form of a textual message at program startup or
31053  * in documentation (online or textual) provided with the package.
31054  *
31055  * Redistribution and use in source and binary forms, with or without
31056  * modification, are permitted provided that the following conditions
31057  * are met:
31058  * 1. Redistributions of source code must retain the copyright
31059  *    notice, this list of conditions and the following disclaimer.
31060  * 2. Redistributions in binary form must reproduce the above copyright
31061  *    notice, this list of conditions and the following disclaimer in the
31062  *    documentation and/or other materials provided with the distribution.
31063  * 3. All advertising materials mentioning features or use of this software
31064  *    must display the following acknowledgement:
31065  *    "This product includes cryptographic software written by
31066  *     Eric Young (eay@cryptsoft.com)"
31067  *    The word 'cryptographic' can be left out if the rouines from the library
31068  *    being used are not cryptographic related :-).
31069  * 4. If you include any Windows specific code (or a derivative thereof) from
31070  *    the apps directory (application code) you must include an acknowledgement:
31071  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31072  *
31073  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31074  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31075  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31076  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31077  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31078  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31079  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31080  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31081  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31082  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31083  * SUCH DAMAGE.
31084  *
31085  * The licence and distribution terms for any publically available version or
31086  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31087  * copied and put under another distribution licence
31088  * [including the GNU Public Licence.]
31089  */
31090 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
31091 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
31092 /* e_os2.h */
31093 /* ====================================================================
31094  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
31095  *
31096  * Redistribution and use in source and binary forms, with or without
31097  * modification, are permitted provided that the following conditions
31098  * are met:
31099  *
31100  * 1. Redistributions of source code must retain the above copyright
31101  *    notice, this list of conditions and the following disclaimer.
31102  *
31103  * 2. Redistributions in binary form must reproduce the above copyright
31104  *    notice, this list of conditions and the following disclaimer in
31105  *    the documentation and/or other materials provided with the
31106  *    distribution.
31107  *
31108  * 3. All advertising materials mentioning features or use of this
31109  *    software must display the following acknowledgment:
31110  *    "This product includes software developed by the OpenSSL Project
31111  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31112  *
31113  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31114  *    endorse or promote products derived from this software without
31115  *    prior written permission. For written permission, please contact
31116  *    openssl-core@openssl.org.
31117  *
31118  * 5. Products derived from this software may not be called "OpenSSL"
31119  *    nor may "OpenSSL" appear in their names without prior written
31120  *    permission of the OpenSSL Project.
31121  *
31122  * 6. Redistributions of any form whatsoever must retain the following
31123  *    acknowledgment:
31124  *    "This product includes software developed by the OpenSSL Project
31125  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31126  *
31127  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31128  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31129  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31130  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31131  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31132  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31133  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31134  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31135  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31136  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31137  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31138  * OF THE POSSIBILITY OF SUCH DAMAGE.
31139  * ====================================================================
31140  *
31141  * This product includes cryptographic software written by Eric Young
31142  * (eay@cryptsoft.com).  This product includes software written by Tim
31143  * Hudson (tjh@cryptsoft.com).
31144  *
31145  */
31146 
31147 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
31148 /* opensslconf.h */
31149 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
31150 
31151 
31152 
31153 
31154 /* OpenSSL was configured with the following options: */
31155 # 108 "/usr/include/openssl/opensslconf.h" 3 4
31156 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
31157    asks for it.  This is a transient feature that is provided for those
31158    who haven't had the time to do the appropriate changes in their
31159    applications.  */
31160 # 204 "/usr/include/openssl/opensslconf.h" 3 4
31161 /* crypto/opensslconf.h.in */
31162 
31163 /* Generate 80386 code? */
31164 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
31165 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
31166 
31167 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
31168 /* ====================================================================
31169  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
31170  *
31171  * Redistribution and use in source and binary forms, with or without
31172  * modification, are permitted provided that the following conditions
31173  * are met:
31174  *
31175  * 1. Redistributions of source code must retain the above copyright
31176  *    notice, this list of conditions and the following disclaimer.
31177  *
31178  * 2. Redistributions in binary form must reproduce the above copyright
31179  *    notice, this list of conditions and the following disclaimer in
31180  *    the documentation and/or other materials provided with the
31181  *    distribution.
31182  *
31183  * 3. All advertising materials mentioning features or use of this
31184  *    software must display the following acknowledgment:
31185  *    "This product includes software developed by the OpenSSL Project
31186  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31187  *
31188  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31189  *    endorse or promote products derived from this software without
31190  *    prior written permission. For written permission, please contact
31191  *    openssl-core@openssl.org.
31192  *
31193  * 5. Products derived from this software may not be called "OpenSSL"
31194  *    nor may "OpenSSL" appear in their names without prior written
31195  *    permission of the OpenSSL Project.
31196  *
31197  * 6. Redistributions of any form whatsoever must retain the following
31198  *    acknowledgment:
31199  *    "This product includes software developed by the OpenSSL Project
31200  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31201  *
31202  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31203  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31204  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31205  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31206  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31207  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31208  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31209  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31210  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31211  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31212  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31213  * OF THE POSSIBILITY OF SUCH DAMAGE.
31214  * ====================================================================
31215  *
31216  * This product includes cryptographic software written by Eric Young
31217  * (eay@cryptsoft.com).  This product includes software written by Tim
31218  * Hudson (tjh@cryptsoft.com).
31219  *
31220  */
31221 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
31222 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
31223 /* ====================================================================
31224  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
31225  *
31226  * Redistribution and use in source and binary forms, with or without
31227  * modification, are permitted provided that the following conditions
31228  * are met:
31229  *
31230  * 1. Redistributions of source code must retain the above copyright
31231  *    notice, this list of conditions and the following disclaimer.
31232  *
31233  * 2. Redistributions in binary form must reproduce the above copyright
31234  *    notice, this list of conditions and the following disclaimer in
31235  *    the documentation and/or other materials provided with the
31236  *    distribution.
31237  *
31238  * 3. All advertising materials mentioning features or use of this
31239  *    software must display the following acknowledgment:
31240  *    "This product includes software developed by the OpenSSL Project
31241  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31242  *
31243  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31244  *    endorse or promote products derived from this software without
31245  *    prior written permission. For written permission, please contact
31246  *    openssl-core@openssl.org.
31247  *
31248  * 5. Products derived from this software may not be called "OpenSSL"
31249  *    nor may "OpenSSL" appear in their names without prior written
31250  *    permission of the OpenSSL Project.
31251  *
31252  * 6. Redistributions of any form whatsoever must retain the following
31253  *    acknowledgment:
31254  *    "This product includes software developed by the OpenSSL Project
31255  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31256  *
31257  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31258  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31259  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31260  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31261  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31262  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31263  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31264  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31265  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31266  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31267  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31268  * OF THE POSSIBILITY OF SUCH DAMAGE.
31269  * ====================================================================
31270  *
31271  * This product includes cryptographic software written by Eric Young
31272  * (eay@cryptsoft.com).  This product includes software written by Tim
31273  * Hudson (tjh@cryptsoft.com).
31274  *
31275  */
31276 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
31277 # 79 "/usr/include/openssl/pkcs7.h" 3 4
31278 /*-
31279 Encryption_ID           DES-CBC
31280 Digest_ID               MD5
31281 Digest_Encryption_ID    rsaEncryption
31282 Key_Encryption_ID       rsaEncryption
31283 */
31284 
31285 typedef struct pkcs7_issuer_and_serial_st {
31286     X509_NAME *issuer;
31287     ASN1_INTEGER *serial;
31288 } PKCS7_ISSUER_AND_SERIAL;
31289 
31290 typedef struct pkcs7_signer_info_st {
31291     ASN1_INTEGER *version; /* version 1 */
31292     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
31293     X509_ALGOR *digest_alg;
31294     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
31295     X509_ALGOR *digest_enc_alg;
31296     ASN1_OCTET_STRING *enc_digest;
31297     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
31298     /* The private key to sign with */
31299     EVP_PKEY *pkey;
31300 } PKCS7_SIGNER_INFO;
31301 
31302 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
31303 
31304 
31305 typedef struct pkcs7_recip_info_st {
31306     ASN1_INTEGER *version; /* version 0 */
31307     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
31308     X509_ALGOR *key_enc_algor;
31309     ASN1_OCTET_STRING *enc_key;
31310     X509 *cert; /* get the pub-key from this */
31311 } PKCS7_RECIP_INFO;
31312 
31313 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
31314 
31315 
31316 typedef struct pkcs7_signed_st {
31317     ASN1_INTEGER *version; /* version 1 */
31318     struct stack_st_X509_ALGOR *md_algs; /* md used */
31319     struct stack_st_X509 *cert; /* [ 0 ] */
31320     struct stack_st_X509_CRL *crl; /* [ 1 ] */
31321     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
31322     struct pkcs7_st *contents;
31323 } PKCS7_SIGNED;
31324 /*
31325  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
31326  * merging the two
31327  */
31328 
31329 typedef struct pkcs7_enc_content_st {
31330     ASN1_OBJECT *content_type;
31331     X509_ALGOR *algorithm;
31332     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
31333     const EVP_CIPHER *cipher;
31334 } PKCS7_ENC_CONTENT;
31335 
31336 typedef struct pkcs7_enveloped_st {
31337     ASN1_INTEGER *version; /* version 0 */
31338     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
31339     PKCS7_ENC_CONTENT *enc_data;
31340 } PKCS7_ENVELOPE;
31341 
31342 typedef struct pkcs7_signedandenveloped_st {
31343     ASN1_INTEGER *version; /* version 1 */
31344     struct stack_st_X509_ALGOR *md_algs; /* md used */
31345     struct stack_st_X509 *cert; /* [ 0 ] */
31346     struct stack_st_X509_CRL *crl; /* [ 1 ] */
31347     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
31348     PKCS7_ENC_CONTENT *enc_data;
31349     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
31350 } PKCS7_SIGN_ENVELOPE;
31351 
31352 typedef struct pkcs7_digest_st {
31353     ASN1_INTEGER *version; /* version 0 */
31354     X509_ALGOR *md; /* md used */
31355     struct pkcs7_st *contents;
31356     ASN1_OCTET_STRING *digest;
31357 } PKCS7_DIGEST;
31358 
31359 typedef struct pkcs7_encrypted_st {
31360     ASN1_INTEGER *version; /* version 0 */
31361     PKCS7_ENC_CONTENT *enc_data;
31362 } PKCS7_ENCRYPT;
31363 
31364 typedef struct pkcs7_st {
31365     /*
31366      * The following is non NULL if it contains ASN1 encoding of this
31367      * structure
31368      */
31369     unsigned char *asn1;
31370     long length;
31371 
31372 
31373 
31374     int state; /* used during processing */
31375     int detached;
31376     ASN1_OBJECT *type;
31377     /* content as defined by the type */
31378     /*
31379      * all encryption/message digests are applied to the 'contents', leaving
31380      * out the 'type' field.
31381      */
31382     union {
31383         char *ptr;
31384         /* NID_pkcs7_data */
31385         ASN1_OCTET_STRING *data;
31386         /* NID_pkcs7_signed */
31387         PKCS7_SIGNED *sign;
31388         /* NID_pkcs7_enveloped */
31389         PKCS7_ENVELOPE *enveloped;
31390         /* NID_pkcs7_signedAndEnveloped */
31391         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
31392         /* NID_pkcs7_digest */
31393         PKCS7_DIGEST *digest;
31394         /* NID_pkcs7_encrypted */
31395         PKCS7_ENCRYPT *encrypted;
31396         /* Anything else */
31397         ASN1_TYPE *other;
31398     } d;
31399 } PKCS7;
31400 
31401 struct stack_st_PKCS7 { _STACK stack; };
31402 
31403 
31404 # 227 "/usr/include/openssl/pkcs7.h" 3 4
31405 /* S/MIME related flags */
31406 # 246 "/usr/include/openssl/pkcs7.h" 3 4
31407 /* Flags: for compatibility with older code */
31408 # 258 "/usr/include/openssl/pkcs7.h" 3 4
31409 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;
31410 
31411 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
31412                                    const EVP_MD *type, unsigned char *md,
31413                                    unsigned int *len);
31414 
31415 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
31416 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
31417 
31418 PKCS7 *PKCS7_dup(PKCS7 *p7);
31419 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
31420 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
31421 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
31422 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
31423 
31424 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;
31425 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;
31426 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;
31427 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;
31428 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;
31429 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;
31430 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;
31431 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;
31432 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;
31433 
31434 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
31435 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
31436 
31437 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
31438 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
31439 
31440 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
31441 
31442 int PKCS7_set_type(PKCS7 *p7, int type);
31443 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
31444 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
31445 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
31446                           const EVP_MD *dgst);
31447 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
31448 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
31449 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
31450 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
31451 int PKCS7_content_new(PKCS7 *p7, int nid);
31452 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
31453                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
31454 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
31455                           X509 *x509);
31456 
31457 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
31458 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
31459 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
31460 
31461 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
31462                                        EVP_PKEY *pkey, const EVP_MD *dgst);
31463 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
31464 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
31465 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
31466 
31467 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
31468 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
31469                                  X509_ALGOR **pdig, X509_ALGOR **psig);
31470 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
31471 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
31472 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
31473 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
31474 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
31475 
31476 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
31477 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
31478 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
31479                                void *data);
31480 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
31481                         void *value);
31482 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
31483 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
31484 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
31485                                 struct stack_st_X509_ATTRIBUTE *sk);
31486 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
31487                          struct stack_st_X509_ATTRIBUTE *sk);
31488 
31489 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
31490                   BIO *data, int flags);
31491 
31492 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
31493                                          X509 *signcert, EVP_PKEY *pkey,
31494                                          const EVP_MD *md, int flags);
31495 
31496 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
31497 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
31498                  BIO *indata, BIO *out, int flags);
31499 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
31500                                    int flags);
31501 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
31502                      int flags);
31503 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
31504                   int flags);
31505 
31506 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
31507                               struct stack_st_X509_ALGOR *cap);
31508 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
31509 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
31510 
31511 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
31512 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
31513 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
31514                              const unsigned char *md, int mdlen);
31515 
31516 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
31517 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
31518 
31519 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
31520 
31521 /* BEGIN ERROR CODES */
31522 /*
31523  * The following lines are auto generated by the script mkerr.pl. Any changes
31524  * made after this point may be overwritten when the script is next run.
31525  */
31526 void ERR_load_PKCS7_strings(void);
31527 
31528 /* Error codes for the PKCS7 functions. */
31529 
31530 /* Function codes. */
31531 # 421 "/usr/include/openssl/pkcs7.h" 3 4
31532 /* Reason codes. */
31533 # 583 "/usr/include/openssl/x509.h" 2 3 4
31534 # 592 "/usr/include/openssl/x509.h" 3 4
31535 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
31536 # 608 "/usr/include/openssl/x509.h" 3 4
31537 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
31538 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
31539                                      int (*crl_free) (X509_CRL *crl),
31540                                      int (*crl_lookup) (X509_CRL *crl,
31541                                                         X509_REVOKED **ret,
31542                                                         ASN1_INTEGER *ser,
31543                                                         X509_NAME *issuer),
31544                                      int (*crl_verify) (X509_CRL *crl,
31545                                                         EVP_PKEY *pk));
31546 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
31547 
31548 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
31549 void *X509_CRL_get_meth_data(X509_CRL *crl);
31550 
31551 /*
31552  * This one is only used so that a binary form can output, as in
31553  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
31554  */
31555 
31556 
31557 const char *X509_verify_cert_error_string(long n);
31558 
31559 
31560 int X509_verify(X509 *a, EVP_PKEY *r);
31561 
31562 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
31563 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
31564 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
31565 
31566 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
31567 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
31568 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
31569 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
31570 
31571 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
31572 
31573 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
31574 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
31575 
31576 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
31577 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
31578 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
31579 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
31580 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
31581 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
31582 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
31583 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
31584 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
31585 
31586 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
31587                        unsigned char *md, unsigned int *len);
31588 int X509_digest(const X509 *data, const EVP_MD *type,
31589                 unsigned char *md, unsigned int *len);
31590 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
31591                     unsigned char *md, unsigned int *len);
31592 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
31593                     unsigned char *md, unsigned int *len);
31594 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
31595                      unsigned char *md, unsigned int *len);
31596 
31597 
31598 
31599 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
31600 int i2d_X509_fp(FILE *fp, X509 *x509);
31601 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
31602 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
31603 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
31604 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
31605 
31606 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
31607 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
31608 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
31609 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
31610 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
31611 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
31612 
31613 
31614 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
31615 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
31616 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
31617 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
31618 
31619 
31620 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
31621 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
31622 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
31623 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
31624 
31625 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
31626 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
31627 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
31628                                                 PKCS8_PRIV_KEY_INFO **p8inf);
31629 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
31630 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
31631 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
31632 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
31633 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
31634 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
31635 
31636 
31637 
31638 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
31639 int i2d_X509_bio(BIO *bp, X509 *x509);
31640 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
31641 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
31642 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
31643 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
31644 
31645 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
31646 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
31647 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
31648 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
31649 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
31650 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
31651 
31652 
31653 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
31654 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
31655 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
31656 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
31657 
31658 
31659 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
31660 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
31661 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
31662 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
31663 
31664 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
31665 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
31666 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
31667                                                  PKCS8_PRIV_KEY_INFO **p8inf);
31668 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
31669 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
31670 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
31671 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
31672 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
31673 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
31674 
31675 
31676 X509 *X509_dup(X509 *x509);
31677 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
31678 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
31679 X509_CRL *X509_CRL_dup(X509_CRL *crl);
31680 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
31681 X509_REQ *X509_REQ_dup(X509_REQ *req);
31682 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
31683 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
31684                     void *pval);
31685 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
31686                      X509_ALGOR *algor);
31687 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
31688 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
31689 
31690 X509_NAME *X509_NAME_dup(X509_NAME *xn);
31691 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
31692 
31693 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
31694 int X509_cmp_current_time(const ASN1_TIME *s);
31695 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
31696 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
31697                             int offset_day, long offset_sec, time_t *t);
31698 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
31699 
31700 const char *X509_get_default_cert_area(void);
31701 const char *X509_get_default_cert_dir(void);
31702 const char *X509_get_default_cert_file(void);
31703 const char *X509_get_default_cert_dir_env(void);
31704 const char *X509_get_default_cert_file_env(void);
31705 const char *X509_get_default_private_dir(void);
31706 
31707 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
31708 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
31709 
31710 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;
31711 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;
31712 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;
31713 
31714 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;
31715 
31716 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
31717 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
31718 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
31719 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
31720 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
31721 
31722 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
31723 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
31724 
31725 
31726 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
31727 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
31728 
31729 
31730 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
31731 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
31732 
31733 
31734 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;
31735 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;
31736 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;
31737 
31738 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;
31739 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
31740 
31741 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;
31742 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;
31743 
31744 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;
31745 
31746 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;
31747 
31748 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
31749 
31750 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;
31751 
31752 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;
31753 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;
31754 
31755 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;
31756 
31757 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
31758                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
31759 int X509_set_ex_data(X509 *r, int idx, void *arg);
31760 void *X509_get_ex_data(X509 *r, int idx);
31761 int i2d_X509_AUX(X509 *a, unsigned char **pp);
31762 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
31763 
31764 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
31765 
31766 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
31767                          const X509 *x);
31768 int X509_get_signature_nid(const X509 *x);
31769 
31770 int X509_alias_set1(X509 *x, unsigned char *name, int len);
31771 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
31772 unsigned char *X509_alias_get0(X509 *x, int *len);
31773 unsigned char *X509_keyid_get0(X509 *x, int *len);
31774 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
31775                                                                 int);
31776 int X509_TRUST_set(int *t, int trust);
31777 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
31778 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
31779 void X509_trust_clear(X509 *x);
31780 void X509_reject_clear(X509 *x);
31781 
31782 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;
31783 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;
31784 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;
31785 
31786 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
31787 int X509_CRL_get0_by_serial(X509_CRL *crl,
31788                             X509_REVOKED **ret, ASN1_INTEGER *serial);
31789 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
31790 
31791 X509_PKEY *X509_PKEY_new(void);
31792 void X509_PKEY_free(X509_PKEY *a);
31793 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
31794 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
31795                          long length);
31796 
31797 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;
31798 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;
31799 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;
31800 
31801 
31802 X509_INFO *X509_INFO_new(void);
31803 void X509_INFO_free(X509_INFO *a);
31804 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
31805 
31806 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
31807                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
31808 
31809 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
31810                 unsigned char *md, unsigned int *len);
31811 
31812 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
31813               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
31814               char *data, EVP_PKEY *pkey, const EVP_MD *type);
31815 
31816 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
31817                      unsigned char *md, unsigned int *len);
31818 
31819 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
31820                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
31821 
31822 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
31823                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
31824                    EVP_PKEY *pkey, const EVP_MD *type);
31825 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
31826                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
31827                        void *asn, EVP_MD_CTX *ctx);
31828 
31829 
31830 int X509_set_version(X509 *x, long version);
31831 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
31832 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
31833 int X509_set_issuer_name(X509 *x, X509_NAME *name);
31834 X509_NAME *X509_get_issuer_name(X509 *a);
31835 int X509_set_subject_name(X509 *x, X509_NAME *name);
31836 X509_NAME *X509_get_subject_name(X509 *a);
31837 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
31838 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
31839 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
31840 EVP_PKEY *X509_get_pubkey(X509 *x);
31841 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
31842 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
31843 
31844 int X509_REQ_set_version(X509_REQ *x, long version);
31845 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
31846 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
31847 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
31848 int X509_REQ_extension_nid(int nid);
31849 int *X509_REQ_get_extension_nids(void);
31850 void X509_REQ_set_extension_nids(int *nids);
31851 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
31852 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
31853                                 int nid);
31854 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
31855 int X509_REQ_get_attr_count(const X509_REQ *req);
31856 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
31857 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
31858                              int lastpos);
31859 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
31860 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
31861 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
31862 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
31863                               const ASN1_OBJECT *obj, int type,
31864                               const unsigned char *bytes, int len);
31865 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
31866                               int nid, int type,
31867                               const unsigned char *bytes, int len);
31868 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
31869                               const char *attrname, int type,
31870                               const unsigned char *bytes, int len);
31871 
31872 int X509_CRL_set_version(X509_CRL *x, long version);
31873 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
31874 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
31875 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
31876 int X509_CRL_sort(X509_CRL *crl);
31877 
31878 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
31879 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
31880 
31881 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
31882                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
31883 
31884 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
31885 
31886 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
31887 int X509_chain_check_suiteb(int *perror_depth,
31888                             X509 *x, struct stack_st_X509 *chain,
31889                             unsigned long flags);
31890 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
31891 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
31892 
31893 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
31894 unsigned long X509_issuer_and_serial_hash(X509 *a);
31895 
31896 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
31897 unsigned long X509_issuer_name_hash(X509 *a);
31898 
31899 int X509_subject_name_cmp(const X509 *a, const X509 *b);
31900 unsigned long X509_subject_name_hash(X509 *x);
31901 
31902 
31903 unsigned long X509_issuer_name_hash_old(X509 *a);
31904 unsigned long X509_subject_name_hash_old(X509 *x);
31905 
31906 
31907 int X509_cmp(const X509 *a, const X509 *b);
31908 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
31909 unsigned long X509_NAME_hash(X509_NAME *x);
31910 unsigned long X509_NAME_hash_old(X509_NAME *x);
31911 
31912 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
31913 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
31914 
31915 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
31916                      unsigned long cflag);
31917 int X509_print_fp(FILE *bp, X509 *x);
31918 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
31919 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
31920 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
31921                           unsigned long flags);
31922 
31923 
31924 
31925 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
31926 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
31927                        unsigned long flags);
31928 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
31929                   unsigned long cflag);
31930 int X509_print(BIO *bp, X509 *x);
31931 int X509_ocspid_print(BIO *bp, X509 *x);
31932 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
31933 int X509_CRL_print(BIO *bp, X509_CRL *x);
31934 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
31935                       unsigned long cflag);
31936 int X509_REQ_print(BIO *bp, X509_REQ *req);
31937 
31938 
31939 int X509_NAME_entry_count(X509_NAME *name);
31940 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
31941 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
31942                               char *buf, int len);
31943 
31944 /*
31945  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
31946  * lastpos, search after that position on.
31947  */
31948 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
31949 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
31950                                int lastpos);
31951 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
31952 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
31953 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
31954                         int loc, int set);
31955 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
31956                                unsigned char *bytes, int len, int loc,
31957                                int set);
31958 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
31959                                unsigned char *bytes, int len, int loc,
31960                                int set);
31961 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
31962                                                const char *field, int type,
31963                                                const unsigned char *bytes,
31964                                                int len);
31965 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
31966                                                int type, unsigned char *bytes,
31967                                                int len);
31968 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
31969                                const unsigned char *bytes, int len, int loc,
31970                                int set);
31971 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
31972                                                ASN1_OBJECT *obj, int type,
31973                                                const unsigned char *bytes,
31974                                                int len);
31975 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
31976 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
31977                              const unsigned char *bytes, int len);
31978 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
31979 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
31980 
31981 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
31982 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
31983                           int nid, int lastpos);
31984 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
31985                           ASN1_OBJECT *obj, int lastpos);
31986 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
31987                                int crit, int lastpos);
31988 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
31989 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
31990 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
31991                                          X509_EXTENSION *ex, int loc);
31992 
31993 int X509_get_ext_count(X509 *x);
31994 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
31995 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
31996 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
31997 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
31998 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
31999 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
32000 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
32001 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
32002                       unsigned long flags);
32003 
32004 int X509_CRL_get_ext_count(X509_CRL *x);
32005 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
32006 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
32007 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
32008 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
32009 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
32010 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
32011 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
32012 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
32013                           unsigned long flags);
32014 
32015 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
32016 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
32017 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
32018                                 int lastpos);
32019 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
32020 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
32021 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
32022 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
32023 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
32024 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
32025                               unsigned long flags);
32026 
32027 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
32028                                              int nid, int crit,
32029                                              ASN1_OCTET_STRING *data);
32030 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
32031                                              ASN1_OBJECT *obj, int crit,
32032                                              ASN1_OCTET_STRING *data);
32033 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
32034 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
32035 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
32036 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
32037 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
32038 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
32039 
32040 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
32041 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
32042                            int lastpos);
32043 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
32044                            ASN1_OBJECT *obj, int lastpos);
32045 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
32046 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
32047 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
32048                                            X509_ATTRIBUTE *attr);
32049 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
32050                                                   **x, const ASN1_OBJECT *obj,
32051                                                   int type,
32052                                                   const unsigned char *bytes,
32053                                                   int len);
32054 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
32055                                                   **x, int nid, int type,
32056                                                   const unsigned char *bytes,
32057                                                   int len);
32058 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
32059                                                   **x, const char *attrname,
32060                                                   int type,
32061                                                   const unsigned char *bytes,
32062                                                   int len);
32063 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
32064                               int lastpos, int type);
32065 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
32066                                              int atrtype, const void *data,
32067                                              int len);
32068 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
32069                                              const ASN1_OBJECT *obj,
32070                                              int atrtype, const void *data,
32071                                              int len);
32072 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
32073                                              const char *atrname, int type,
32074                                              const unsigned char *bytes,
32075                                              int len);
32076 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
32077 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
32078                              const void *data, int len);
32079 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
32080                                void *data);
32081 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
32082 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
32083 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
32084 
32085 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
32086 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
32087 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
32088                              int lastpos);
32089 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
32090 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
32091 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
32092 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
32093                               const ASN1_OBJECT *obj, int type,
32094                               const unsigned char *bytes, int len);
32095 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
32096                               int nid, int type,
32097                               const unsigned char *bytes, int len);
32098 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
32099                               const char *attrname, int type,
32100                               const unsigned char *bytes, int len);
32101 
32102 int X509_verify_cert(X509_STORE_CTX *ctx);
32103 
32104 /* lookup a cert from a X509 STACK */
32105 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
32106                                      ASN1_INTEGER *serial);
32107 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
32108 
32109 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;
32110 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;
32111 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;
32112 
32113 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
32114                          const unsigned char *salt, int saltlen);
32115 
32116 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
32117                           const unsigned char *salt, int saltlen);
32118 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
32119                            unsigned char *salt, int saltlen);
32120 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
32121                               unsigned char *salt, int saltlen,
32122                               unsigned char *aiv, int prf_nid);
32123 
32124 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
32125                              int prf_nid, int keylen);
32126 
32127 /* PKCS#8 utilities */
32128 
32129 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;
32130 
32131 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
32132 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
32133 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
32134 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
32135 
32136 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
32137                     int version, int ptype, void *pval,
32138                     unsigned char *penc, int penclen);
32139 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
32140                     const unsigned char **pk, int *ppklen,
32141                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
32142 
32143 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
32144                            int ptype, void *pval,
32145                            unsigned char *penc, int penclen);
32146 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
32147                            const unsigned char **pk, int *ppklen,
32148                            X509_ALGOR **pa, X509_PUBKEY *pub);
32149 
32150 int X509_check_trust(X509 *x, int id, int flags);
32151 int X509_TRUST_get_count(void);
32152 X509_TRUST *X509_TRUST_get0(int idx);
32153 int X509_TRUST_get_by_id(int id);
32154 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
32155                    char *name, int arg1, void *arg2);
32156 void X509_TRUST_cleanup(void);
32157 int X509_TRUST_get_flags(X509_TRUST *xp);
32158 char *X509_TRUST_get0_name(X509_TRUST *xp);
32159 int X509_TRUST_get_trust(X509_TRUST *xp);
32160 
32161 /* BEGIN ERROR CODES */
32162 /*
32163  * The following lines are auto generated by the script mkerr.pl. Any changes
32164  * made after this point may be overwritten when the script is next run.
32165  */
32166 
32167 void ERR_load_X509_strings(void);
32168 
32169 /* Error codes for the X509 functions. */
32170 
32171 /* Function codes. */
32172 # 1291 "/usr/include/openssl/x509.h" 3 4
32173 /* Reason codes. */
32174 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
32175 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
32176 /*
32177  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32178  *
32179  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32180  * Use is subject to license terms.
32181  */
32182 
32183 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
32184 /*	  All Rights Reserved  	*/
32185 
32186 /*
32187  * BIND 4.9.3:
32188  *
32189  * Copyright (c) 1980, 1983, 1988, 1993
32190  *	The Regents of the University of California.  All rights reserved.
32191  *
32192  * Redistribution and use in source and binary forms, with or without
32193  * modification, are permitted provided that the following conditions
32194  * are met:
32195  * 1. Redistributions of source code must retain the above copyright
32196  *    notice, this list of conditions and the following disclaimer.
32197  * 2. Redistributions in binary form must reproduce the above copyright
32198  *    notice, this list of conditions and the following disclaimer in the
32199  *    documentation and/or other materials provided with the distribution.
32200  * 3. All advertising materials mentioning features or use of this software
32201  *    must display the following acknowledgement:
32202  *	This product includes software developed by the University of
32203  *	California, Berkeley and its contributors.
32204  * 4. Neither the name of the University nor the names of its contributors
32205  *    may be used to endorse or promote products derived from this software
32206  *    without specific prior written permission.
32207  *
32208  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
32209  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32210  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32211  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32212  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32213  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32214  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32215  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32216  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32217  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32218  * SUCH DAMAGE.
32219  * -
32220  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
32221  *
32222  * Permission to use, copy, modify, and distribute this software for any
32223  * purpose with or without fee is hereby granted, provided that the above
32224  * copyright notice and this permission notice appear in all copies, and that
32225  * the name of Digital Equipment Corporation not be used in advertising or
32226  * publicity pertaining to distribution of the document or software without
32227  * specific, written prior permission.
32228  *
32229  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
32230  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
32231  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
32232  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
32233  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
32234  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
32235  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
32236  * SOFTWARE.
32237  * --Copyright--
32238  *
32239  * End BIND 4.9.3
32240  */
32241 
32242 /*
32243  * Structures returned by network data base library.
32244  * All addresses are supplied in host order, and
32245  * returned in network order (suitable for use in system calls).
32246  */
32247 
32248 
32249 
32250 
32251 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
32252 /*
32253  * CDDL HEADER START
32254  *
32255  * The contents of this file are subject to the terms of the
32256  * Common Development and Distribution License (the "License").
32257  * You may not use this file except in compliance with the License.
32258  *
32259  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32260  * or http://www.opensolaris.org/os/licensing.
32261  * See the License for the specific language governing permissions
32262  * and limitations under the License.
32263  *
32264  * When distributing Covered Code, include this CDDL HEADER in each
32265  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32266  * If applicable, add the following below this CDDL HEADER, with the
32267  * fields enclosed by brackets "[]" replaced with your own identifying
32268  * information: Portions Copyright [yyyy] [name of copyright owner]
32269  *
32270  * CDDL HEADER END
32271  */
32272 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32273 /*	  All Rights Reserved  	*/
32274 
32275 
32276 /*
32277  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32278  * Use is subject to license terms.
32279  *
32280  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
32281  * Copyright 2016 Joyent, Inc.
32282  */
32283 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
32284 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
32285 /*
32286  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32287  * Use is subject to license terms.
32288  *
32289  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
32290  */
32291 /*
32292  * Copyright (c) 1982, 1986 Regents of the University of California.
32293  * All rights reserved.
32294  *
32295  * Redistribution and use in source and binary forms are permitted
32296  * provided that this notice is preserved and that due credit is given
32297  * to the University of California at Berkeley. The name of the University
32298  * may not be used to endorse or promote products derived from this
32299  * software without specific prior written permission. This software
32300  * is provided ``as is'' without express or implied warranty.
32301  */
32302 
32303 /*
32304  * Constants and structures defined by the internet system,
32305  * according to following documents
32306  *
32307  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
32308  *	http://www.iana.org/assignments/protocol-numbers
32309  *	http://www.iana.org/assignments/port-numbers
32310  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
32311  *
32312  */
32313 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
32314 
32315 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
32316 /*
32317  * CDDL HEADER START
32318  *
32319  * The contents of this file are subject to the terms of the
32320  * Common Development and Distribution License (the "License").
32321  * You may not use this file except in compliance with the License.
32322  *
32323  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32324  * or http://www.opensolaris.org/os/licensing.
32325  * See the License for the specific language governing permissions
32326  * and limitations under the License.
32327  *
32328  * When distributing Covered Code, include this CDDL HEADER in each
32329  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32330  * If applicable, add the following below this CDDL HEADER, with the
32331  * fields enclosed by brackets "[]" replaced with your own identifying
32332  * information: Portions Copyright [yyyy] [name of copyright owner]
32333  *
32334  * CDDL HEADER END
32335  */
32336 /*
32337  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32338  *
32339  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
32340  */
32341 
32342 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
32343 /*	  All Rights Reserved	*/
32344 
32345 /*
32346  * University Copyright- Copyright (c) 1982, 1986, 1988
32347  * The Regents of the University of California
32348  * All Rights Reserved
32349  *
32350  * University Acknowledgment- Portions of this document are derived from
32351  * software developed by the University of California, Berkeley, and its
32352  * contributors.
32353  */
32354 
32355 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
32356 
32357 
32358 
32359 
32360 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
32361 /*
32362  * CDDL HEADER START
32363  *
32364  * The contents of this file are subject to the terms of the
32365  * Common Development and Distribution License (the "License").
32366  * You may not use this file except in compliance with the License.
32367  *
32368  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32369  * or http://www.opensolaris.org/os/licensing.
32370  * See the License for the specific language governing permissions
32371  * and limitations under the License.
32372  *
32373  * When distributing Covered Code, include this CDDL HEADER in each
32374  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32375  * If applicable, add the following below this CDDL HEADER, with the
32376  * fields enclosed by brackets "[]" replaced with your own identifying
32377  * information: Portions Copyright [yyyy] [name of copyright owner]
32378  *
32379  * CDDL HEADER END
32380  */
32381 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32382 /*	  All Rights Reserved  	*/
32383 
32384 
32385 /*
32386  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32387  * Use is subject to license terms.
32388  *
32389  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
32390  * Copyright 2016 Joyent, Inc.
32391  */
32392 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
32393 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
32394 /*
32395  * CDDL HEADER START
32396  *
32397  * The contents of this file are subject to the terms of the
32398  * Common Development and Distribution License (the "License").
32399  * You may not use this file except in compliance with the License.
32400  *
32401  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32402  * or http://www.opensolaris.org/os/licensing.
32403  * See the License for the specific language governing permissions
32404  * and limitations under the License.
32405  *
32406  * When distributing Covered Code, include this CDDL HEADER in each
32407  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32408  * If applicable, add the following below this CDDL HEADER, with the
32409  * fields enclosed by brackets "[]" replaced with your own identifying
32410  * information: Portions Copyright [yyyy] [name of copyright owner]
32411  *
32412  * CDDL HEADER END
32413  */
32414 /*
32415  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32416  *
32417  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
32418  * Use is subject to license terms.
32419  *
32420  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
32421  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
32422  */
32423 
32424 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32425 /*	  All Rights Reserved  	*/
32426 
32427 /*
32428  * University Copyright- Copyright (c) 1982, 1986, 1988
32429  * The Regents of the University of California
32430  * All Rights Reserved
32431  *
32432  * University Acknowledgment- Portions of this document are derived from
32433  * software developed by the University of California, Berkeley, and its
32434  * contributors.
32435  */
32436 
32437 
32438 
32439 
32440 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
32441 /*
32442  * CDDL HEADER START
32443  *
32444  * The contents of this file are subject to the terms of the
32445  * Common Development and Distribution License (the "License").
32446  * You may not use this file except in compliance with the License.
32447  *
32448  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32449  * or http://www.opensolaris.org/os/licensing.
32450  * See the License for the specific language governing permissions
32451  * and limitations under the License.
32452  *
32453  * When distributing Covered Code, include this CDDL HEADER in each
32454  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32455  * If applicable, add the following below this CDDL HEADER, with the
32456  * fields enclosed by brackets "[]" replaced with your own identifying
32457  * information: Portions Copyright [yyyy] [name of copyright owner]
32458  *
32459  * CDDL HEADER END
32460  */
32461 
32462 /*
32463  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
32464  * Copyright 2016 Joyent, Inc.
32465  *
32466  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
32467  * Use is subject to license terms.
32468  */
32469 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
32470 
32471 
32472 
32473 
32474 
32475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
32476 /*
32477  * CDDL HEADER START
32478  *
32479  * The contents of this file are subject to the terms of the
32480  * Common Development and Distribution License (the "License").
32481  * You may not use this file except in compliance with the License.
32482  *
32483  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32484  * or http://www.opensolaris.org/os/licensing.
32485  * See the License for the specific language governing permissions
32486  * and limitations under the License.
32487  *
32488  * When distributing Covered Code, include this CDDL HEADER in each
32489  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32490  * If applicable, add the following below this CDDL HEADER, with the
32491  * fields enclosed by brackets "[]" replaced with your own identifying
32492  * information: Portions Copyright [yyyy] [name of copyright owner]
32493  *
32494  * CDDL HEADER END
32495  */
32496 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32497 /*	  All Rights Reserved  	*/
32498 
32499 
32500 /*
32501  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32502  * Use is subject to license terms.
32503  *
32504  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
32505  * Copyright 2016 Joyent, Inc.
32506  */
32507 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
32508 
32509 /*
32510  * I/O parameter information.  A uio structure describes the I/O which
32511  * is to be performed by an operation.  Typically the data movement will
32512  * be performed by a routine such as uiomove(), which updates the uio
32513  * structure to reflect what was done.
32514  */
32515 
32516 
32517 
32518 
32519 
32520 
32521 
32522 typedef struct iovec {
32523  caddr_t iov_base;
32524 
32525 
32526 
32527  long iov_len;
32528 
32529 } iovec_t;
32530 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32531 /*
32532  * Segment flag values.
32533  */
32534 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
32535 
32536 typedef struct uio {
32537  iovec_t *uio_iov; /* pointer to array of iovecs */
32538  int uio_iovcnt; /* number of iovecs */
32539  lloff_t _uio_offset; /* file offset */
32540  uio_seg_t uio_segflg; /* address space (kernel or user) */
32541  uint16_t uio_fmode; /* file mode flags */
32542  uint16_t uio_extflg; /* extended flags */
32543  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
32544  ssize_t uio_resid; /* residual count */
32545 } uio_t;
32546 
32547 /*
32548  * Extended uio_t uioa_t used for asynchronous uio.
32549  *
32550  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
32551  *	 as there isn't a formal definition of IOV_MAX for the kernel.
32552  */
32553 
32554 
32555 typedef struct uioa_page_s { /* locked uio_iov state */
32556  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
32557  void **uioa_ppp; /* page_t or pfn_t arrary */
32558  caddr_t uioa_base; /* address base */
32559  size_t uioa_len; /* span length */
32560 } uioa_page_t;
32561 
32562 typedef struct uioa_s {
32563  iovec_t *uio_iov; /* pointer to array of iovecs */
32564  int uio_iovcnt; /* number of iovecs */
32565  lloff_t _uio_offset; /* file offset */
32566  uio_seg_t uio_segflg; /* address space (kernel or user) */
32567  uint16_t uio_fmode; /* file mode flags */
32568  uint16_t uio_extflg; /* extended flags */
32569  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
32570  ssize_t uio_resid; /* residual count */
32571  /*
32572 	 * uioa extended members.
32573 	 */
32574  uint32_t uioa_state; /* state of asynch i/o */
32575  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
32576  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
32577  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
32578  void *uioa_hwst[4]; /* opaque hardware state */
32579  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
32580 } uioa_t;
32581 
32582 /*
32583  * uio extensions
32584  *
32585  * PSARC 2009/478: Copy Reduction Interfaces
32586  */
32587 typedef enum xuio_type {
32588  UIOTYPE_ASYNCIO,
32589  UIOTYPE_ZEROCOPY
32590 } xuio_type_t;
32591 
32592 typedef struct xuio {
32593  uio_t xu_uio; /* Embedded UIO structure */
32594 
32595  /* Extended uio fields */
32596  enum xuio_type xu_type; /* What kind of uio structure? */
32597  union {
32598   /* Async I/O Support, intend to replace uioa_t. */
32599   struct {
32600    uint32_t xu_a_state; /* state of async i/o */
32601    /* bytes that have been uioamove()ed */
32602    ssize_t xu_a_mbytes;
32603    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
32604    /* pointer into lcur->uioa_ppp[] */
32605    void **xu_a_lppp;
32606    void *xu_a_hwst[4]; /* opaque hardware state */
32607    /* Per iov locked pages */
32608    uioa_page_t xu_a_locked[16];
32609   } xu_aio;
32610 
32611   /*
32612 		 * Copy Reduction Support -- facilate loaning / returning of
32613 		 * filesystem cache buffers.
32614 		 */
32615   struct {
32616    int xu_zc_rw; /* read or write buffer */
32617    void *xu_zc_priv; /* fs specific */
32618   } xu_zc;
32619  } xu_ext;
32620 } xuio_t;
32621 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32622 /*
32623  * I/O direction.
32624  */
32625 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
32626 
32627 /*
32628  * uio_extflg: extended flags
32629  *
32630  * NOTE: This flag will be used in uiomove to determine if non-temporal
32631  * access, ie, access bypassing caches, should be used.  Filesystems that
32632  * don't initialize this field could experience suboptimal performance due to
32633  * the random data the field contains.
32634  *
32635  * NOTE: This flag is also used by uioasync callers to pass an extended
32636  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
32637  * consumers of a uioa_t require the uio_extflg to be initialized.
32638  */
32639 
32640 
32641 
32642 
32643 
32644 
32645 /*
32646  * Global uioasync capability shadow state.
32647  */
32648 typedef struct uioasync_s {
32649  boolean_t enabled; /* Is uioasync enabled? */
32650  size_t mincnt; /* Minimum byte count for use of */
32651 } uioasync_t;
32652 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32653 extern ssize_t readv(int, const struct iovec *, int);
32654 extern ssize_t writev(int, const struct iovec *, int);
32655 
32656 /*
32657  * When in the large file compilation environment,
32658  * map preadv/pwritev to their 64 bit offset versions
32659  */
32660 
32661 
32662 
32663 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32664 #pragma redefine_extname preadv preadv64
32665 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32666 
32667 
32668 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32669 #pragma redefine_extname pwritev pwritev64
32670 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32671 
32672 
32673 
32674 
32675 
32676 
32677 
32678 /* In the LP64 compilation environment, the APIs are already large file */
32679 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
32680 extern ssize_t preadv(int, const struct iovec *, int, off_t);
32681 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
32682 
32683 /*
32684  * preadv64 and pwritev64 should be defined when:
32685  * - Using the transitional compilation environment, and not
32686  *     the large file compilation environment.
32687  */
32688 
32689 
32690 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
32691 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
32692 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
32693 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
32694 /*
32695  * CDDL HEADER START
32696  *
32697  * The contents of this file are subject to the terms of the
32698  * Common Development and Distribution License (the "License").
32699  * You may not use this file except in compliance with the License.
32700  *
32701  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32702  * or http://www.opensolaris.org/os/licensing.
32703  * See the License for the specific language governing permissions
32704  * and limitations under the License.
32705  *
32706  * When distributing Covered Code, include this CDDL HEADER in each
32707  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32708  * If applicable, add the following below this CDDL HEADER, with the
32709  * fields enclosed by brackets "[]" replaced with your own identifying
32710  * information: Portions Copyright [yyyy] [name of copyright owner]
32711  *
32712  * CDDL HEADER END
32713  */
32714 
32715 /*
32716  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
32717  * Copyright 2016 Joyent, Inc.
32718  *
32719  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
32720  * Use is subject to license terms.
32721  */
32722 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
32723 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
32724 /*
32725  * CDDL HEADER START
32726  *
32727  * The contents of this file are subject to the terms of the
32728  * Common Development and Distribution License (the "License").
32729  * You may not use this file except in compliance with the License.
32730  *
32731  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32732  * or http://www.opensolaris.org/os/licensing.
32733  * See the License for the specific language governing permissions
32734  * and limitations under the License.
32735  *
32736  * When distributing Covered Code, include this CDDL HEADER in each
32737  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32738  * If applicable, add the following below this CDDL HEADER, with the
32739  * fields enclosed by brackets "[]" replaced with your own identifying
32740  * information: Portions Copyright [yyyy] [name of copyright owner]
32741  *
32742  * CDDL HEADER END
32743  */
32744 /*
32745  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32746  * Use is subject to license terms.
32747  */
32748 
32749 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
32750 /*	  All Rights Reserved	*/
32751 
32752 /*
32753  * Portions of this source code were derived from Berkeley 4.3 BSD
32754  * under license from the Regents of the University of California.
32755  */
32756 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
32757 
32758 
32759 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
32760 /*
32761  * CDDL HEADER START
32762  *
32763  * The contents of this file are subject to the terms of the
32764  * Common Development and Distribution License, Version 1.0 only
32765  * (the "License").  You may not use this file except in compliance
32766  * with the License.
32767  *
32768  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32769  * or http://www.opensolaris.org/os/licensing.
32770  * See the License for the specific language governing permissions
32771  * and limitations under the License.
32772  *
32773  * When distributing Covered Code, include this CDDL HEADER in each
32774  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32775  * If applicable, add the following below this CDDL HEADER, with the
32776  * fields enclosed by brackets "[]" replaced with your own identifying
32777  * information: Portions Copyright [yyyy] [name of copyright owner]
32778  *
32779  * CDDL HEADER END
32780  */
32781 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32782 /*	  All Rights Reserved  	*/
32783 
32784 
32785 /*
32786  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32787  *
32788  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
32789  * Use is subject to license terms.
32790  */
32791 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
32792 struct netconfig {
32793  char *nc_netid; /* network identifier		*/
32794  unsigned int nc_semantics; /* defined below		*/
32795  unsigned int nc_flag; /* defined below		*/
32796  char *nc_protofmly; /* protocol family name		*/
32797  char *nc_proto; /* protocol name		*/
32798  char *nc_device; /* device name for network id	*/
32799  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
32800  char **nc_lookups; /* list of lookup directories	*/
32801  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
32802 };
32803 
32804 typedef struct {
32805  struct netconfig **nc_head;
32806  struct netconfig **nc_curr;
32807 } NCONF_HANDLE;
32808 
32809 /*
32810  *	Values of nc_semantics
32811  */
32812 
32813 
32814 
32815 
32816 
32817 /*
32818  * NOT FOR PUBLIC USE, Solaris internal only.
32819  * This value of nc_semantics is strictly for use of Remote Direct
32820  * Memory Access provider interfaces in Solaris only and not for
32821  * general use. Do not use this value for general purpose user or
32822  * kernel programming. If used the behavior is undefined.
32823  * This is a PRIVATE interface to be used by Solaris kRPC only.
32824  */
32825 
32826 
32827 /*
32828  *	Values of nc_flag
32829  */
32830 
32831 
32832 
32833 
32834 
32835 /*
32836  *	Values of nc_protofmly
32837  */
32838 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
32839 /*
32840  * NOT FOR PUBLIC USE, Solaris internal only.
32841  * This value of nc_semantics is strictly for use of Remote Direct
32842  * Memory Access provider interfaces in Solaris only and not for
32843  * general use. Do not use this value for general purpose user or
32844  * kernel programming. If used the behavior is undefined.
32845  * This is a PRIVATE interface to be used by Solaris kRPC only.
32846  */
32847 
32848 
32849 /*
32850  *	Values for nc_proto
32851  */
32852 
32853 
32854 
32855 
32856 
32857 
32858 /*
32859  * 	Values for nc_proto for "rdma" protofmly
32860  */
32861 
32862 
32863 
32864 
32865 extern void *setnetconfig(void);
32866 extern int endnetconfig(void *);
32867 extern struct netconfig *getnetconfig(void *);
32868 extern struct netconfig *getnetconfigent(const char *);
32869 extern void freenetconfigent(struct netconfig *);
32870 extern void *setnetpath(void);
32871 extern int endnetpath(void *);
32872 extern struct netconfig *getnetpath(void *);
32873 extern void nc_perror(const char *);
32874 extern char *nc_sperror(void);
32875 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
32876 
32877 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
32878 /*
32879  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
32880  * Use is subject to license terms.
32881  *
32882  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
32883  */
32884 /*
32885  * Copyright (c) 1982, 1986 Regents of the University of California.
32886  * All rights reserved.
32887  *
32888  * Redistribution and use in source and binary forms are permitted
32889  * provided that this notice is preserved and that due credit is given
32890  * to the University of California at Berkeley. The name of the University
32891  * may not be used to endorse or promote products derived from this
32892  * software without specific prior written permission. This software
32893  * is provided ``as is'' without express or implied warranty.
32894  */
32895 
32896 /*
32897  * Constants and structures defined by the internet system,
32898  * according to following documents
32899  *
32900  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
32901  *	http://www.iana.org/assignments/protocol-numbers
32902  *	http://www.iana.org/assignments/port-numbers
32903  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
32904  *
32905  */
32906 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
32907 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32908 /*
32909  * Definitions related to sockets: types, address families, options.
32910  */
32911 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32912 /*
32913  * Types
32914  */
32915 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32916 /*
32917  * Flags for socket() and accept4()
32918  */
32919 
32920 
32921 
32922 
32923 /*
32924  * Option flags per-socket.
32925  */
32926 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32927 /*
32928  * Socket options are passed using a signed integer, but it is also rare
32929  * for more than one to ever be passed at the same time with setsockopt
32930  * and only one at a time can be retrieved with getsockopt.
32931  *
32932  * Since the lower numbers cannot be renumbered for compatibility reasons,
32933  * it would seem that we need to start a new number space (0x40000000 -
32934  * 0x7fffffff) for those that don't need to be stored as a bit flag
32935  * somewhere. This limits the flag options to 30 but that seems to be
32936  * plenty, anyway. 0x40000000 is reserved for future use.
32937  */
32938 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32939 /*
32940  * N.B.: The following definition is present only for compatibility
32941  * with release 3.0.  It will disappear in later releases.
32942  */
32943 
32944 
32945 /*
32946  * Additional options, not kept in so_options.
32947  */
32948 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32949 /* "Socket"-level control message types: */
32950 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32951 /*
32952  * Socket filter options
32953  */
32954 
32955 
32956 
32957 
32958 
32959 /*
32960  * Structure returned by FIL_LIST
32961  */
32962 struct fil_info {
32963  int fi_flags; /* see below (FILF_*) */
32964  int fi_pos; /* position (0 is bottom) */
32965  char fi_name[32]; /* filter name */
32966 };
32967 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32968 /*
32969  * Structure used for manipulating linger option.
32970  */
32971 struct linger {
32972  int l_onoff; /* option on/off */
32973  int l_linger; /* linger time */
32974 };
32975 
32976 /*
32977  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
32978  */
32979 
32980 
32981 
32982 
32983 
32984 
32985 
32986 /*
32987  * Address families.
32988  *
32989  * Some of these constant names are copied for the DTrace IP provider in
32990  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
32991  * in sync.
32992  */
32993 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32994 /*
32995  * Protocol families, same as address families for now.
32996  */
32997 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
32998 /*
32999  * Maximum queue length specifiable by listen.
33000  */
33001 
33002 
33003 /*
33004  * Message header for recvmsg and sendmsg calls.
33005  */
33006 struct msghdr {
33007  void *msg_name; /* optional address */
33008  socklen_t msg_namelen; /* size of address */
33009  struct iovec *msg_iov; /* scatter/gather array */
33010  int msg_iovlen; /* # elements in msg_iov */
33011 
33012 
33013 
33014 
33015 
33016 
33017  caddr_t msg_accrights; /* access rights sent/received */
33018  int msg_accrightslen;
33019 
33020 };
33021 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
33022 /* Added for XPGv2 compliance */
33023 
33024 
33025 
33026 
33027 
33028      /* with left over data */
33029 /* End of XPGv2 compliance */
33030 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
33031 /* Added for XPGv2 compliance */
33032 
33033 
33034 
33035 
33036 struct cmsghdr {
33037  socklen_t cmsg_len; /* data byte count, including hdr */
33038  int cmsg_level; /* originating protocol */
33039  int cmsg_type; /* protocol-specific type */
33040 };
33041 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
33042 extern int accept(int, struct sockaddr *, Psocklen_t);
33043 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
33044 extern int bind(int, const struct sockaddr *, socklen_t);
33045 extern int connect(int, const struct sockaddr *, socklen_t);
33046 extern int getpeername(int, struct sockaddr *, Psocklen_t);
33047 extern int getsockname(int, struct sockaddr *, Psocklen_t);
33048 extern int getsockopt(int, int, int, void *, Psocklen_t);
33049 extern int listen(int, int); /* XXX - fixme???  where do I go */
33050 extern int socketpair(int, int, int, int *);
33051 extern ssize_t recv(int, void *, size_t, int);
33052 extern ssize_t recvfrom(int, void *, size_t, int,
33053  struct sockaddr *, Psocklen_t);
33054 extern ssize_t recvmsg(int, struct msghdr *, int);
33055 extern ssize_t send(int, const void *, size_t, int);
33056 extern ssize_t sendmsg(int, const struct msghdr *, int);
33057 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
33058  socklen_t);
33059 extern int setsockopt(int, int, int, const void *, socklen_t);
33060 extern int shutdown(int, int);
33061 extern int socket(int, int, int);
33062 
33063 
33064 extern int sockatmark(int);
33065 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
33066 
33067 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
33068 /*
33069  * CDDL HEADER START
33070  *
33071  * The contents of this file are subject to the terms of the
33072  * Common Development and Distribution License (the "License").
33073  * You may not use this file except in compliance with the License.
33074  *
33075  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33076  * or http://www.opensolaris.org/os/licensing.
33077  * See the License for the specific language governing permissions
33078  * and limitations under the License.
33079  *
33080  * When distributing Covered Code, include this CDDL HEADER in each
33081  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33082  * If applicable, add the following below this CDDL HEADER, with the
33083  * fields enclosed by brackets "[]" replaced with your own identifying
33084  * information: Portions Copyright [yyyy] [name of copyright owner]
33085  *
33086  * CDDL HEADER END
33087  */
33088 
33089 /*
33090  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
33091  * Copyright 2016 Joyent, Inc.
33092  *
33093  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
33094  * Use is subject to license terms.
33095  */
33096 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
33097 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
33098 struct hostent {
33099  char *h_name; /* official name of host */
33100  char **h_aliases; /* alias list */
33101  int h_addrtype; /* host address type */
33102  int h_length; /* length of address */
33103  char **h_addr_list; /* list of addresses from name server */
33104 
33105 };
33106 
33107 
33108 /*
33109  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
33110  * and Service Name Translation.
33111  */
33112 
33113 
33114 struct addrinfo {
33115  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
33116  int ai_family; /* PF_xxx */
33117  int ai_socktype; /* SOCK_xxx */
33118  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
33119 
33120 
33121 
33122  socklen_t ai_addrlen;
33123  char *ai_canonname; /* canonical name for hostname */
33124  struct sockaddr *ai_addr; /* binary address */
33125  struct addrinfo *ai_next; /* next structure in linked list */
33126 };
33127 
33128 /*
33129  * The flag 0x8000 is currently reserved for private use between libnsl and
33130  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
33131  */
33132 /* addrinfo flags */
33133 
33134 
33135 
33136 
33137 
33138 /* getipnodebyname() flags */
33139 
33140 
33141 
33142 
33143 
33144 /*
33145  * These were defined in RFC 2553 but not SUSv3
33146  * or RFC 3493 which obsoleted 2553.
33147  */
33148 
33149 
33150 
33151 /* addrinfo errors */
33152 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
33153 /* getnameinfo flags */
33154 
33155 
33156 
33157 
33158 
33159 
33160 
33161 /* Not listed in any standards document */
33162 
33163 
33164 
33165 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
33166 
33167 
33168 
33169 
33170 
33171 /*
33172  * Scope delimit character
33173  */
33174 
33175 
33176 
33177 /*
33178  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
33179  * and algorithms.
33180  */
33181 
33182 typedef struct ipsecalgent {
33183  char **a_names; /* algorithm names */
33184  int a_proto_num; /* protocol number */
33185  int a_alg_num; /* algorithm number */
33186  char *a_mech_name; /* encryption framework mechanism name */
33187  int *a_block_sizes; /* supported block sizes */
33188  int *a_key_sizes; /* supported key sizes */
33189  int a_key_increment; /* key size increment */
33190  int *a_mech_params; /* mechanism specific parameters */
33191  int a_alg_flags; /* algorithm flags */
33192 } ipsecalgent_t;
33193 
33194 /* well-known IPsec protocol numbers */
33195 
33196 
33197 
33198 
33199 
33200 /*
33201  * Assumption here is that a network number
33202  * fits in 32 bits -- probably a poor one.
33203  */
33204 struct netent {
33205  char *n_name; /* official name of net */
33206  char **n_aliases; /* alias list */
33207  int n_addrtype; /* net address type */
33208  in_addr_t n_net; /* network # */
33209 };
33210 
33211 struct protoent {
33212  char *p_name; /* official protocol name */
33213  char **p_aliases; /* alias list */
33214  int p_proto; /* protocol # */
33215 };
33216 
33217 struct servent {
33218  char *s_name; /* official service name */
33219  char **s_aliases; /* alias list */
33220  int s_port; /* port # */
33221  char *s_proto; /* protocol to use */
33222 };
33223 
33224 
33225 struct hostent *gethostbyname_r
33226  (const char *, struct hostent *, char *, int, int *h_errnop);
33227 struct hostent *gethostbyaddr_r
33228  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
33229 struct hostent *getipnodebyname(const char *, int, int, int *);
33230 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
33231 void freehostent(struct hostent *);
33232 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
33233 
33234 struct servent *getservbyname_r
33235  (const char *name, const char *, struct servent *, char *, int);
33236 struct servent *getservbyport_r
33237  (int port, const char *, struct servent *, char *, int);
33238 struct servent *getservent_r(struct servent *, char *, int);
33239 
33240 struct netent *getnetbyname_r
33241  (const char *, struct netent *, char *, int);
33242 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
33243 struct netent *getnetent_r(struct netent *, char *, int);
33244 
33245 struct protoent *getprotobyname_r
33246  (const char *, struct protoent *, char *, int);
33247 struct protoent *getprotobynumber_r
33248  (int, struct protoent *, char *, int);
33249 struct protoent *getprotoent_r(struct protoent *, char *, int);
33250 
33251 int getnetgrent_r(char **, char **, char **, char *, int);
33252 int innetgr(const char *, const char *, const char *, const char *);
33253 
33254 
33255 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
33256 struct hostent *gethostbyname(const char *);
33257 struct hostent *gethostent(void);
33258 struct netent *getnetbyaddr(in_addr_t, int);
33259 struct netent *getnetbyname(const char *);
33260 struct netent *getnetent(void);
33261 struct protoent *getprotobyname(const char *);
33262 struct protoent *getprotobynumber(int);
33263 struct protoent *getprotoent(void);
33264 struct servent *getservbyname(const char *, const char *);
33265 struct servent *getservbyport(int, const char *);
33266 struct servent *getservent(void);
33267 
33268 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
33269 
33270 struct hostent *gethostbyaddr(const void *, socklen_t, int);
33271 
33272 
33273 
33274 
33275 
33276 int endhostent(void);
33277 int endnetent(void);
33278 int endprotoent(void);
33279 int endservent(void);
33280 int sethostent(int);
33281 int setnetent(int);
33282 int setprotoent(int);
33283 int setservent(int);
33284 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
33285 int getaddrinfo(const char *,
33286    const char *,
33287    const struct addrinfo *,
33288    struct addrinfo **);
33289 void freeaddrinfo(struct addrinfo *);
33290 const char *gai_strerror(int);
33291 int getnameinfo(const struct sockaddr *,
33292    socklen_t, char *, socklen_t,
33293    char *, socklen_t, int);
33294 
33295 
33296 
33297 int getnetgrent(char **, char **, char **);
33298 int setnetgrent(const char *);
33299 int endnetgrent(void);
33300 int rcmd(char **, unsigned short,
33301  const char *, const char *, const char *, int *);
33302 int rcmd_af(char **, unsigned short,
33303  const char *, const char *, const char *, int *, int);
33304 int rresvport_af(int *, int);
33305 int rresvport_addr(int *, struct sockaddr_storage *);
33306 int rexec(char **, unsigned short,
33307  const char *, const char *, const char *, int *);
33308 int rexec_af(char **, unsigned short,
33309  const char *, const char *, const char *, int *, int);
33310 int rresvport(int *);
33311 int ruserok(const char *, int, const char *, const char *);
33312 /* BIND */
33313 struct hostent *gethostbyname2(const char *, int);
33314 void herror(const char *);
33315 const char *hstrerror(int);
33316 /* End BIND */
33317 
33318 /* IPsec algorithm prototype definitions */
33319 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
33320 struct ipsecalgent *getipsecalgbynum(int, int, int *);
33321 int getipsecprotobyname(const char *doi_name);
33322 char *getipsecprotobynum(int doi_domain);
33323 void freeipsecalgent(struct ipsecalgent *ptr);
33324 /* END IPsec algorithm prototype definitions */
33325 
33326 
33327 
33328 /*
33329  * Error return codes from gethostbyname() and gethostbyaddr()
33330  * (when using the resolver)
33331  */
33332 
33333 extern int h_errno;
33334 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
33335 /*
33336  * Error return codes from gethostbyname() and gethostbyaddr()
33337  * (left in extern int h_errno).
33338  */
33339 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
33340 /* BIND */
33341 
33342 
33343 /* End BIND */
33344 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
33345 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
33346 /*
33347  * CDDL HEADER START
33348  *
33349  * The contents of this file are subject to the terms of the
33350  * Common Development and Distribution License, Version 1.0 only
33351  * (the "License").  You may not use this file except in compliance
33352  * with the License.
33353  *
33354  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33355  * or http://www.opensolaris.org/os/licensing.
33356  * See the License for the specific language governing permissions
33357  * and limitations under the License.
33358  *
33359  * When distributing Covered Code, include this CDDL HEADER in each
33360  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33361  * If applicable, add the following below this CDDL HEADER, with the
33362  * fields enclosed by brackets "[]" replaced with your own identifying
33363  * information: Portions Copyright [yyyy] [name of copyright owner]
33364  *
33365  * CDDL HEADER END
33366  */
33367 /*
33368  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
33369  * Use is subject to license terms.
33370  */
33371 
33372 
33373 
33374 
33375 #pragma ident "%Z%%M%	%I%	%E% SMI"
33376 
33377 
33378 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
33379 /*
33380  * CDDL HEADER START
33381  *
33382  * The contents of this file are subject to the terms of the
33383  * Common Development and Distribution License (the "License").
33384  * You may not use this file except in compliance with the License.
33385  *
33386  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33387  * or http://www.opensolaris.org/os/licensing.
33388  * See the License for the specific language governing permissions
33389  * and limitations under the License.
33390  *
33391  * When distributing Covered Code, include this CDDL HEADER in each
33392  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33393  * If applicable, add the following below this CDDL HEADER, with the
33394  * fields enclosed by brackets "[]" replaced with your own identifying
33395  * information: Portions Copyright [yyyy] [name of copyright owner]
33396  *
33397  * CDDL HEADER END
33398  */
33399 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
33400 /*	  All Rights Reserved  	*/
33401 
33402 
33403 /*
33404  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
33405  * Use is subject to license terms.
33406  *
33407  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
33408  * Copyright 2016 Joyent, Inc.
33409  */
33410 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
33411 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
33412 /*
33413  * CDDL HEADER START
33414  *
33415  * The contents of this file are subject to the terms of the
33416  * Common Development and Distribution License, Version 1.0 only
33417  * (the "License").  You may not use this file except in compliance
33418  * with the License.
33419  *
33420  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33421  * or http://www.opensolaris.org/os/licensing.
33422  * See the License for the specific language governing permissions
33423  * and limitations under the License.
33424  *
33425  * When distributing Covered Code, include this CDDL HEADER in each
33426  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33427  * If applicable, add the following below this CDDL HEADER, with the
33428  * fields enclosed by brackets "[]" replaced with your own identifying
33429  * information: Portions Copyright [yyyy] [name of copyright owner]
33430  *
33431  * CDDL HEADER END
33432  */
33433 /*
33434  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
33435  * Use is subject to license terms.
33436  */
33437 
33438 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
33439 /*	  All Rights Reserved  	*/
33440 
33441 /*
33442  * University Copyright- Copyright (c) 1982, 1986, 1988
33443  * The Regents of the University of California
33444  * All Rights Reserved
33445  *
33446  * University Acknowledgment- Portions of this document are derived from
33447  * software developed by the University of California, Berkeley, and its
33448  * contributors.
33449  */
33450 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
33451 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
33452 /*
33453  * CDDL HEADER START
33454  *
33455  * The contents of this file are subject to the terms of the
33456  * Common Development and Distribution License, Version 1.0 only
33457  * (the "License").  You may not use this file except in compliance
33458  * with the License.
33459  *
33460  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33461  * or http://www.opensolaris.org/os/licensing.
33462  * See the License for the specific language governing permissions
33463  * and limitations under the License.
33464  *
33465  * When distributing Covered Code, include this CDDL HEADER in each
33466  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33467  * If applicable, add the following below this CDDL HEADER, with the
33468  * fields enclosed by brackets "[]" replaced with your own identifying
33469  * information: Portions Copyright [yyyy] [name of copyright owner]
33470  *
33471  * CDDL HEADER END
33472  */
33473 /*
33474  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
33475  * Use is subject to license terms.
33476  */
33477 
33478 
33479 
33480 
33481 #pragma ident "%Z%%M%	%I%	%E% SMI"
33482 
33483 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
33484 /*
33485  * CDDL HEADER START
33486  *
33487  * The contents of this file are subject to the terms of the
33488  * Common Development and Distribution License (the "License").
33489  * You may not use this file except in compliance with the License.
33490  *
33491  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33492  * or http://www.opensolaris.org/os/licensing.
33493  * See the License for the specific language governing permissions
33494  * and limitations under the License.
33495  *
33496  * When distributing Covered Code, include this CDDL HEADER in each
33497  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33498  * If applicable, add the following below this CDDL HEADER, with the
33499  * fields enclosed by brackets "[]" replaced with your own identifying
33500  * information: Portions Copyright [yyyy] [name of copyright owner]
33501  *
33502  * CDDL HEADER END
33503  */
33504 
33505 /*
33506  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
33507  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
33508  */
33509 
33510 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
33511 /*	  All Rights Reserved  	*/
33512 
33513 /*
33514  * University Copyright- Copyright (c) 1982, 1986, 1988
33515  * The Regents of the University of California
33516  * All Rights Reserved
33517  *
33518  * University Acknowledgment- Portions of this document are derived from
33519  * software developed by the University of California, Berkeley, and its
33520  * contributors.
33521  */
33522 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
33523 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
33524 typedef struct {
33525  char hostname[256];
33526  ushort_t port;
33527 } url_hport_t;
33528 
33529 typedef struct {
33530  boolean_t https;
33531  url_hport_t hport;
33532  char abspath[1024];
33533 } url_t;
33534 
33535 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
33536 extern int url_parse(const char *, url_t *);
33537 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
33538 
33539 
33540 
33541 
33542 
33543 /* State information returned by http_conn_info() */
33544 typedef struct {
33545  url_t uri; /* URI last loaded */
33546  url_hport_t proxy; /* proxy, if any being used */
33547  boolean_t keepalive; /* Keepalive setting being used */
33548  uint_t read_timeout; /* Timeout to use for socket reads */
33549 } http_conninfo_t;
33550 
33551 
33552 /* Structure for version of the http file */
33553 typedef struct {
33554  uint_t maj_ver; /* Major version */
33555  uint_t min_ver; /* Minor version */
33556  uint_t micro_ver; /* Micro version */
33557 } boot_http_ver_t;
33558 
33559 /* Internal Libhttp errors */
33560 
33561 
33562 
33563     /* necessarily the underlying transport */
33564     /* connection). */
33565 
33566     /* error. */
33567 
33568 
33569 
33570     /* No matching entry */
33571 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
33572 /* Sources of errors */
33573 
33574 
33575 
33576 
33577 
33578 
33579 
33580 typedef struct {
33581  uint_t code; /* status code */
33582  char *statusmsg; /* status message */
33583  uint_t nresphdrs; /* number of response headers */
33584 } http_respinfo_t;
33585 
33586 
33587 typedef void *http_handle_t;
33588 
33589 boot_http_ver_t const *http_get_version(void);
33590 void http_set_p12_format(int);
33591 void http_set_verbose(boolean_t);
33592 int http_set_cipher_list(const char *);
33593 http_handle_t http_srv_init(const url_t *);
33594 int http_set_proxy(http_handle_t, const url_hport_t *);
33595 int http_set_keepalive(http_handle_t, boolean_t);
33596 int http_set_socket_read_timeout(http_handle_t, uint_t);
33597 int http_set_basic_auth(http_handle_t, const char *, const char *);
33598 int http_set_random_file(http_handle_t, const char *);
33599 int http_set_certificate_authority_file(const char *);
33600 int http_set_client_certificate_file(http_handle_t, const char *);
33601 int http_set_password(http_handle_t, const char *);
33602 int http_set_key_file_password(http_handle_t, const char *);
33603 int http_set_private_key_file(http_handle_t, const char *);
33604 
33605 int http_srv_connect(http_handle_t);
33606 int http_head_request(http_handle_t, const char *);
33607 int http_get_request(http_handle_t, const char *);
33608 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
33609 void http_free_respinfo(http_respinfo_t *);
33610 int http_process_headers(http_handle_t, http_respinfo_t **);
33611 int http_process_part_headers(http_handle_t, http_respinfo_t **);
33612 char *http_get_header_value(http_handle_t, const char *);
33613 char *http_get_response_header(http_handle_t, uint_t);
33614 int http_read_body(http_handle_t, char *, size_t);
33615 int http_srv_disconnect(http_handle_t);
33616 int http_srv_close(http_handle_t);
33617 http_conninfo_t *http_get_conn_info(http_handle_t);
33618 int http_conn_is_https(http_handle_t, boolean_t *);
33619 ulong_t http_get_lasterr(http_handle_t, uint_t *);
33620 void http_decode_err(ulong_t, int *, int *, int *);
33621 char const *http_errorstr(uint_t, ulong_t);
33622 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
33623 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
33624 /*
33625  * CDDL HEADER START
33626  *
33627  * The contents of this file are subject to the terms of the
33628  * Common Development and Distribution License (the "License").
33629  * You may not use this file except in compliance with the License.
33630  *
33631  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33632  * or http://www.opensolaris.org/os/licensing.
33633  * See the License for the specific language governing permissions
33634  * and limitations under the License.
33635  *
33636  * When distributing Covered Code, include this CDDL HEADER in each
33637  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33638  * If applicable, add the following below this CDDL HEADER, with the
33639  * fields enclosed by brackets "[]" replaced with your own identifying
33640  * information: Portions Copyright [yyyy] [name of copyright owner]
33641  *
33642  * CDDL HEADER END
33643  */
33644 
33645 /*
33646  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
33647  * Use is subject to license terms.
33648  */
33649 
33650 
33651 
33652 
33653 
33654 /*
33655  * Module:	pkgerr.h
33656  * Description:
33657  *
33658  *   Implements error routines to handle the creation,
33659  *   management, and destruction of error objects, which
33660  *   hold error messages and codes returned from libpkg
33661  *   routines that support the objects defined herein.
33662  */
33663 
33664 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
33665 /*
33666  * CDDL HEADER START
33667  *
33668  * The contents of this file are subject to the terms of the
33669  * Common Development and Distribution License (the "License").
33670  * You may not use this file except in compliance with the License.
33671  *
33672  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33673  * or http://www.opensolaris.org/os/licensing.
33674  * See the License for the specific language governing permissions
33675  * and limitations under the License.
33676  *
33677  * When distributing Covered Code, include this CDDL HEADER in each
33678  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33679  * If applicable, add the following below this CDDL HEADER, with the
33680  * fields enclosed by brackets "[]" replaced with your own identifying
33681  * information: Portions Copyright [yyyy] [name of copyright owner]
33682  *
33683  * CDDL HEADER END
33684  */
33685 
33686 /*
33687  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
33688  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
33689  */
33690 
33691 /*	Copyright (c) 1988 AT&T	*/
33692 /*	  All Rights Reserved  	*/
33693 
33694 /*
33695  * User-visible pieces of the ANSI C standard I/O package.
33696  */
33697 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
33698 
33699 
33700 
33701 
33702 
33703 /*
33704  * Public Definitions
33705  */
33706 
33707 typedef enum {
33708  PKGERR_OK = 0,
33709  PKGERR_EXIST,
33710  PKGERR_READ,
33711  PKGERR_CORRUPT,
33712  PKGERR_PARSE,
33713  PKGERR_BADPASS,
33714  PKGERR_BADALIAS,
33715  PKGERR_INTERNAL,
33716  PKGERR_UNSUP,
33717  PKGERR_NOALIAS,
33718  PKGERR_NOALIASMATCH,
33719  PKGERR_MULTIPLE,
33720  PKGERR_INCOMPLETE,
33721  PKGERR_NOPRIVKEY,
33722  PKGERR_NOPUBKEY,
33723  PKGERR_NOCACERT,
33724  PKGERR_NOMEM,
33725  PKGERR_CHAIN,
33726  PKGERR_LOCKED,
33727  PKGERR_WRITE,
33728  PKGERR_UNLOCK,
33729  PKGERR_TIME,
33730  PKGERR_DUPLICATE,
33731  PKGERR_WEB,
33732  PKGERR_VERIFY
33733 } PKG_ERR_CODE;
33734 
33735 /*
33736  * Public Structures
33737  */
33738 
33739 /* external reference to PKG_ERR object (contents private) */
33740 typedef PKG_ERR_CODE pkg_err_t;
33741 
33742 typedef struct _pkg_err_struct PKG_ERR;
33743 
33744 /*
33745  * Public Methods
33746  */
33747 
33748 PKG_ERR *pkgerr_new();
33749 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
33750 void pkgerr_clear(PKG_ERR *);
33751 int pkgerr_dump(PKG_ERR *, FILE *);
33752 int pkgerr_num(PKG_ERR *);
33753 char *pkgerr_get(PKG_ERR *, int);
33754 void pkgerr_free(PKG_ERR *);
33755 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
33756 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
33757 /*
33758  * CDDL HEADER START
33759  *
33760  * The contents of this file are subject to the terms of the
33761  * Common Development and Distribution License (the "License").
33762  * You may not use this file except in compliance with the License.
33763  *
33764  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33765  * or http://www.opensolaris.org/os/licensing.
33766  * See the License for the specific language governing permissions
33767  * and limitations under the License.
33768  *
33769  * When distributing Covered Code, include this CDDL HEADER in each
33770  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33771  * If applicable, add the following below this CDDL HEADER, with the
33772  * fields enclosed by brackets "[]" replaced with your own identifying
33773  * information: Portions Copyright [yyyy] [name of copyright owner]
33774  *
33775  * CDDL HEADER END
33776  */
33777 
33778 /*
33779  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
33780  * Use is subject to license terms.
33781  */
33782 
33783 
33784 
33785 
33786 
33787 /*
33788  * Module:	keystore.h
33789  * Description:	This module contains the structure definitions for processing
33790  *		package keystore files.
33791  */
33792 
33793 
33794 
33795 
33796 
33797 # 1 "/usr/include/openssl/evp.h" 1 3 4
33798 /* crypto/evp/evp.h */
33799 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
33800  * All rights reserved.
33801  *
33802  * This package is an SSL implementation written
33803  * by Eric Young (eay@cryptsoft.com).
33804  * The implementation was written so as to conform with Netscapes SSL.
33805  *
33806  * This library is free for commercial and non-commercial use as long as
33807  * the following conditions are aheared to.  The following conditions
33808  * apply to all code found in this distribution, be it the RC4, RSA,
33809  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
33810  * included with this distribution is covered by the same copyright terms
33811  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
33812  *
33813  * Copyright remains Eric Young's, and as such any Copyright notices in
33814  * the code are not to be removed.
33815  * If this package is used in a product, Eric Young should be given attribution
33816  * as the author of the parts of the library used.
33817  * This can be in the form of a textual message at program startup or
33818  * in documentation (online or textual) provided with the package.
33819  *
33820  * Redistribution and use in source and binary forms, with or without
33821  * modification, are permitted provided that the following conditions
33822  * are met:
33823  * 1. Redistributions of source code must retain the copyright
33824  *    notice, this list of conditions and the following disclaimer.
33825  * 2. Redistributions in binary form must reproduce the above copyright
33826  *    notice, this list of conditions and the following disclaimer in the
33827  *    documentation and/or other materials provided with the distribution.
33828  * 3. All advertising materials mentioning features or use of this software
33829  *    must display the following acknowledgement:
33830  *    "This product includes cryptographic software written by
33831  *     Eric Young (eay@cryptsoft.com)"
33832  *    The word 'cryptographic' can be left out if the rouines from the library
33833  *    being used are not cryptographic related :-).
33834  * 4. If you include any Windows specific code (or a derivative thereof) from
33835  *    the apps directory (application code) you must include an acknowledgement:
33836  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
33837  *
33838  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
33839  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33840  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33841  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33842  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33843  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33844  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33845  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33846  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33847  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33848  * SUCH DAMAGE.
33849  *
33850  * The licence and distribution terms for any publically available version or
33851  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33852  * copied and put under another distribution licence
33853  * [including the GNU Public Licence.]
33854  */
33855 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
33856 # 1 "/usr/include/openssl/x509.h" 1 3 4
33857 /* crypto/x509/x509.h */
33858 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
33859  * All rights reserved.
33860  *
33861  * This package is an SSL implementation written
33862  * by Eric Young (eay@cryptsoft.com).
33863  * The implementation was written so as to conform with Netscapes SSL.
33864  *
33865  * This library is free for commercial and non-commercial use as long as
33866  * the following conditions are aheared to.  The following conditions
33867  * apply to all code found in this distribution, be it the RC4, RSA,
33868  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
33869  * included with this distribution is covered by the same copyright terms
33870  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
33871  *
33872  * Copyright remains Eric Young's, and as such any Copyright notices in
33873  * the code are not to be removed.
33874  * If this package is used in a product, Eric Young should be given attribution
33875  * as the author of the parts of the library used.
33876  * This can be in the form of a textual message at program startup or
33877  * in documentation (online or textual) provided with the package.
33878  *
33879  * Redistribution and use in source and binary forms, with or without
33880  * modification, are permitted provided that the following conditions
33881  * are met:
33882  * 1. Redistributions of source code must retain the copyright
33883  *    notice, this list of conditions and the following disclaimer.
33884  * 2. Redistributions in binary form must reproduce the above copyright
33885  *    notice, this list of conditions and the following disclaimer in the
33886  *    documentation and/or other materials provided with the distribution.
33887  * 3. All advertising materials mentioning features or use of this software
33888  *    must display the following acknowledgement:
33889  *    "This product includes cryptographic software written by
33890  *     Eric Young (eay@cryptsoft.com)"
33891  *    The word 'cryptographic' can be left out if the rouines from the library
33892  *    being used are not cryptographic related :-).
33893  * 4. If you include any Windows specific code (or a derivative thereof) from
33894  *    the apps directory (application code) you must include an acknowledgement:
33895  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
33896  *
33897  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
33898  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33899  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33900  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33901  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33902  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33903  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33904  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33905  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33906  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33907  * SUCH DAMAGE.
33908  *
33909  * The licence and distribution terms for any publically available version or
33910  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33911  * copied and put under another distribution licence
33912  * [including the GNU Public Licence.]
33913  */
33914 /* ====================================================================
33915  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
33916  * ECDH support in OpenSSL originally developed by
33917  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
33918  */
33919 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
33920 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
33921 /*
33922  * CDDL HEADER START
33923  *
33924  * The contents of this file are subject to the terms of the
33925  * Common Development and Distribution License (the "License").
33926  * You may not use this file except in compliance with the License.
33927  *
33928  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33929  * or http://www.opensolaris.org/os/licensing.
33930  * See the License for the specific language governing permissions
33931  * and limitations under the License.
33932  *
33933  * When distributing Covered Code, include this CDDL HEADER in each
33934  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33935  * If applicable, add the following below this CDDL HEADER, with the
33936  * fields enclosed by brackets "[]" replaced with your own identifying
33937  * information: Portions Copyright [yyyy] [name of copyright owner]
33938  *
33939  * CDDL HEADER END
33940  */
33941 
33942 /*
33943  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
33944  * Use is subject to license terms.
33945  */
33946 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
33947 
33948 /* keystore structures */
33949 
33950 /* this opaque type represents a keystore */
33951 typedef void *keystore_handle_t;
33952 
33953 /* flags passed to open_keystore */
33954 
33955 /* opens keystore read-only.  Attempts to modify results in an error */
33956 
33957 
33958 /* opens keystore read-write */
33959 
33960 
33961 /*
33962  * tells open_keystore to fall back to app-generic paths in the case that
33963  * the app-specific paths do not exist.
33964  */
33965 
33966 
33967 /*
33968  * tells open_keystore to use the app-specific paths no matter what,
33969  * failing if they cannot be used for any reason.
33970  */
33971 
33972 
33973 /* masks off various types of flags */
33974 
33975 
33976 
33977 /* default is read-only, soft */
33978 
33979 
33980 
33981 /*
33982  * possible encoding formats used by the library, used
33983  * by print_cert
33984  */
33985 typedef enum {
33986  KEYSTORE_FORMAT_PEM,
33987  KEYSTORE_FORMAT_DER,
33988  KEYSTORE_FORMAT_TEXT
33989 } keystore_encoding_format_t;
33990 
33991 /*
33992  * structure passed back to password callback for determining how
33993  * to prompt for passphrase, and where to record errors
33994  */
33995 typedef struct {
33996  PKG_ERR *err;
33997 } keystore_passphrase_data;
33998 
33999 
34000 /* max length of a passphrase.  One could use a short story! */
34001 
34002 
34003 /* callback for collecting passphrase when open_keystore() is called */
34004 typedef int keystore_passphrase_cb(char *, int, int, void *);
34005 
34006 /* names of the individual files within the keystore path */
34007 
34008 
34009 
34010 
34011 /* keystore.c */
34012 extern int open_keystore(PKG_ERR *, char *, char *,
34013     keystore_passphrase_cb, long flags, keystore_handle_t *);
34014 
34015 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
34016     keystore_encoding_format_t, FILE *);
34017 
34018 extern int check_cert(PKG_ERR *, X509 *);
34019 
34020 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
34021 
34022 extern int print_cert(PKG_ERR *, X509 *,
34023     keystore_encoding_format_t, char *, boolean_t, FILE *);
34024 
34025 extern int close_keystore(PKG_ERR *, keystore_handle_t,
34026     keystore_passphrase_cb);
34027 
34028 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
34029 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
34030     char *, keystore_handle_t);
34031 
34032 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
34033     char *);
34034 
34035 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
34036     char *, EVP_PKEY **, X509 **);
34037 
34038 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
34039     struct stack_st_X509 **);
34040 
34041 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
34042     struct stack_st_X509 **);
34043 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
34044 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
34045 /*
34046  * CDDL HEADER START
34047  *
34048  * The contents of this file are subject to the terms of the
34049  * Common Development and Distribution License (the "License").
34050  * You may not use this file except in compliance with the License.
34051  *
34052  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34053  * or http://www.opensolaris.org/os/licensing.
34054  * See the License for the specific language governing permissions
34055  * and limitations under the License.
34056  *
34057  * When distributing Covered Code, include this CDDL HEADER in each
34058  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34059  * If applicable, add the following below this CDDL HEADER, with the
34060  * fields enclosed by brackets "[]" replaced with your own identifying
34061  * information: Portions Copyright [yyyy] [name of copyright owner]
34062  *
34063  * CDDL HEADER END
34064  */
34065 
34066 /*
34067  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
34068  * Use is subject to license terms.
34069  */
34070 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
34071 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
34072 /*
34073  * CDDL HEADER START
34074  *
34075  * The contents of this file are subject to the terms of the
34076  * Common Development and Distribution License (the "License").
34077  * You may not use this file except in compliance with the License.
34078  *
34079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34080  * or http://www.opensolaris.org/os/licensing.
34081  * See the License for the specific language governing permissions
34082  * and limitations under the License.
34083  *
34084  * When distributing Covered Code, include this CDDL HEADER in each
34085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34086  * If applicable, add the following below this CDDL HEADER, with the
34087  * fields enclosed by brackets "[]" replaced with your own identifying
34088  * information: Portions Copyright [yyyy] [name of copyright owner]
34089  *
34090  * CDDL HEADER END
34091  */
34092 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34093 /*	  All Rights Reserved  	*/
34094 
34095 /*
34096  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
34097  * Use is subject to license terms.
34098  */
34099 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
34100 
34101 struct mergstat {
34102  unsigned setuid:1; /* pkgmap entry has setuid */
34103  unsigned setgid:1; /* ... and/or setgid bit set */
34104  unsigned contchg:1; /* contents of the files different */
34105  unsigned attrchg:1; /* attributes are different */
34106  unsigned shared:1; /* > 1 pkg associated with this */
34107  unsigned osetuid:1; /* installed set[ug]id process ... */
34108  unsigned osetgid:1; /* ... being overwritten by pkg. */
34109  unsigned rogue:1; /* conflicting file not owned by a package */
34110  unsigned dir2nondir:1; /* was a directory & now a non-directory */
34111  unsigned replace:1; /* merge makes no sense for this object pair */
34112  unsigned denied:1; /* for some reason this was not allowed in */
34113  unsigned preloaded:1; /* already checked in a prior pkg op */
34114  unsigned processed:1; /* already installed or removed */
34115  unsigned parentsyml2dir:1;
34116  /* parent directory changed from symlink to a directory */
34117 };
34118 
34119 /*
34120  * This is information required by pkgadd for fast operation. A
34121  * cfextra struct is tagged to each cfent structure requiring
34122  * processing. This is how we avoid some unneeded repetition. The
34123  * entries incorporating the word 'local' refer to the path that
34124  * gets us to the delivered package file. In other words, to install
34125  * a file we usually copy from 'local' to 'path' below. In the case
34126  * of a link, where no actual copying takes place, local is the source
34127  * of the link. Note that environment variables are not evaluated in
34128  * the locals unless they are links since the literal path is how
34129  * pkgadd finds the entry under the reloc directory.
34130  */
34131 struct cfextra {
34132  struct cfent cf_ent; /* basic contents file entry */
34133  struct mergstat mstat; /* merge status for installs */
34134  uint32_t fsys_value; /* fstab[] entry index */
34135  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
34136  char *client_path; /* the client-relative path */
34137  char *server_path; /* the server-relative path */
34138  char *map_path; /* as read from the pkgmap */
34139  char *client_local; /* client_relative local */
34140  char *server_local; /* server relative local */
34141 };
34142 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
34143 
34144 /*
34145  * The contents database file interface.
34146  */
34147 
34148 typedef struct pkg_server *PKGserver;
34149 
34150 /* Some commands modify the internal database: add them here */
34151 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34152 typedef enum {
34153  INVALID, /* Not initialized */
34154  NEVER, /* Don't start, does check if it is running. */
34155  FLUSH_LOG, /* Run it once to incorporate the log. */
34156  RUN_ONCE, /* Run until the current client stops. */
34157  TIMEOUT, /* Run until a timeout occurs. */
34158  PERMANENT, /* Run until it is externally terminated. */
34159  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
34160 } start_mode_t;
34161 
34162 typedef struct pkgcmd {
34163  int cmd;
34164  char buf[1];
34165 } pkgcmd_t;
34166 
34167 typedef struct pkgfilter {
34168  int cmd;
34169  int len;
34170  char buf[1];
34171 } pkgfilter_t;
34172 
34173 /*
34174  * Virtual File Protocol definitions
34175  */
34176 
34177 /*
34178  * flags associated with virtual file protocol operations; note that these flags
34179  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
34180  */
34181 
34182 typedef unsigned long VFPFLAGS_T;
34183 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34184 /* virtual file protocol object */
34185 
34186 typedef struct _vfp VFP_T;
34187 
34188 /* structure behind the virtual file protocol object */
34189 
34190 struct _vfp {
34191  FILE *_vfpFile; /* -> opened FILE */
34192  char *_vfpCurr; /* -> current byte to read/write */
34193  char *_vfpHighWater; /* -> last byte modified */
34194  char *_vfpEnd; /* -> last data byte */
34195  char *_vfpPath; /* -> path associated with FILE */
34196  char *_vfpStart; /* -> first data byte */
34197  void *_vfpExtra; /* undefined */
34198  size_t _vfpSize; /* size of mapped/allocated area */
34199  size_t _vfpMapSize; /* # mapped bytes */
34200  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
34201  int _vfpOverflow; /* non-zero if buffer write overflow */
34202  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
34203  dev_t _vfpCkDev; /* checkpoint device i.d. */
34204  ino_t _vfpCkIno; /* checkpoint inode # */
34205  off_t _vfpCkSize; /* checkpoint size */
34206  time_t _vfpCkMtime; /* checkpoint modification time */
34207 };
34208 
34209 /*
34210  * get highest modified byte (length) contained in vfp
34211  *
34212  * determine number of bytes to write - it will be the highest of:
34213  *  -- the current pointer into the file - this is updated whenever
34214  *	the location of the file is changed by a single byte
34215  *  -- the last "high water mark" - the last known location that
34216  *	was written to the file - updated only when the location
34217  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
34218  *	vfpTruncate, vfpRewind.
34219  * this reduces the "bookkeeping" that needs to be done to know
34220  * how many bytes to write out to the file - typically a file is
34221  * written sequentially so the current file pointer is sufficient
34222  * to determine how many bytes to write out.
34223  */
34224 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34225 /*
34226  * increment current pointer by specified delta
34227  * if the delta exceeds the buffer size, set pointer to buffer end
34228  */
34229 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34230 /* get the path associated with the vfp */
34231 
34232 
34233 /* get a string from the vfp into a fixed size buffer */
34234 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34235 /* get number of bytes remaining to read */
34236 
34237 
34238 
34239 
34240 /* get number of bytes remaining to write */
34241 
34242 
34243 
34244 
34245 /* put current character and increment to next */
34246 
34247 
34248 
34249 
34250 
34251 
34252 /* put integer to current character and increment */
34253 
34254 
34255 /* put long to current character and increment */
34256 
34257 
34258 /* get current character and increment to next */
34259 
34260 
34261 /* get current character - do not increment */
34262 
34263 
34264 /* get pointer to current character */
34265 
34266 
34267 /* increment current character pointer */
34268 
34269 
34270 /* decrement current character pointer */
34271 
34272 
34273 /* get pointer to first data byte in buffer */
34274 
34275 
34276 /* get pointer to last data byte in buffer */
34277 
34278 
34279 /* set pointer to current character */
34280 
34281 
34282 
34283 
34284 
34285 
34286 /* set pointer to last data byte in buffer */
34287 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34288 /* seek to end of file - one past last data byte in file */
34289 
34290 
34291 /* get number of bytes between current char and specified char */
34292 
34293 
34294 
34295 /* put string to current character and increment */
34296 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34297 /* put fixed number of bytes to current character and increment */
34298 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34299 /* put format one arg to current character and increment */
34300 
34301 
34302 
34303 
34304 
34305 
34306 
34307 struct dm_buf {
34308  char *text_buffer; /* start of allocated buffer */
34309  int offset; /* number of bytes into the text_buffer */
34310  int allocation; /* size of buffer in bytes */
34311 };
34312 
34313 /* This structure is used to hold a dynamically growing string */
34314 
34315 struct dstr {
34316  char *pc;
34317  int len;
34318  int max;
34319 };
34320 
34321 /* setmapmode() defines */
34322 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34323 /* max length for printed attributes */
34324 
34325 
34326 /*
34327  * These three defines indicate that the prototype file contains a '?'
34328  * meaning do not specify this data in the pkgmap entry.
34329  */
34330 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34331 /* Settings for network admin defaults */
34332 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
34333 /* package header magic tokens */
34334 
34335 
34336 
34337 /* name of security files */
34338 
34339 
34340 
34341 
34342 
34343 
34344 /*
34345  * The next three mean that no mode, owner or group was specified or that the
34346  * one specified is invalid for some reason. Sometimes this is an error in
34347  * which case it is generally converted to CUR* with a warning. Other times
34348  * it means "look it up" by stating the existing file system object pointred
34349  * to in the prototype file.
34350  */
34351 
34352 
34353 
34354 
34355 /* string comparitor abbreviators */
34356 
34357 
34358 
34359 
34360 
34361 
34362 extern FILE *epopen(char *cmd, char *mode);
34363 extern char **gpkglist(char *dir, char **pkg, char **catg);
34364 extern int is_not_valid_length(char **category);
34365 extern int is_not_valid_category(char **category, char *progname);
34366 extern int is_same_CATEGORY(char **category, char *installed_category);
34367 extern char **get_categories(char *catg_arg);
34368 
34369 extern void pkglist_cont(char *keyword);
34370 extern char **pkgalias(char *pkg);
34371 extern char *get_prog_name(void);
34372 extern char *set_prog_name(char *name);
34373 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
34374 extern int ckparam(char *param, char *value);
34375 extern int ckvolseq(char *dir, int part, int nparts);
34376 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
34377    int allow_checksum);
34378 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
34379 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
34380       struct cinfo *cinfo);
34381 extern char *getErrbufAddr(void);
34382 extern int getErrbufSize(void);
34383 extern char *getErrstr(void);
34384 extern void setErrstr(char *errstr);
34385 extern int devtype(char *alias, struct pkgdev *devp);
34386 extern int ds_totread; /* total number of parts read */
34387 extern int ds_close(int pkgendflg);
34388 extern int ds_findpkg(char *device, char *pkg);
34389 extern int ds_getinfo(char *string);
34390 extern int ds_getpkg(char *device, int n, char *dstdir);
34391 extern int ds_ginit(char *device);
34392 extern boolean_t ds_fd_open(void);
34393 extern int ds_init(char *device, char **pkg, char *norewind);
34394 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
34395 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
34396 extern int BIO_dump_cmd(char *cmd, BIO *bio);
34397 extern int ds_next(char *, char *);
34398 extern int ds_readbuf(char *device);
34399 extern int epclose(FILE *pp);
34400 extern int esystem(char *cmd, int ifd, int ofd);
34401 extern int e_ExecCmdArray(int *r_status, char **r_results,
34402    char *a_inputFile, char *a_cmd, char **a_args);
34403 extern int e_ExecCmdList(int *r_status, char **r_results,
34404    char *a_inputFile, char *a_cmd, ...);
34405 extern int gpkgmap(struct cfent *ept, FILE *fp);
34406 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
34407 extern void setmapmode(int mode_no);
34408 extern int isFdRemote(int a_fd);
34409 extern int isFstypeRemote(char *a_fstype);
34410 extern int isPathRemote(char *a_path);
34411 extern int iscpio(char *path, int *iscomp);
34412 extern int isdir(char *path);
34413 extern int isfile(char *dir, char *file);
34414 extern int fmkdir(char *a_path, int a_mode);
34415 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
34416    ...);
34417 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
34418    char *arg[]);
34419 extern int pkghead(char *device);
34420 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
34421    int getvolflg);
34422 extern int pkgtrans(char *device1, char *device2, char **pkg,
34423    int options, keystore_handle_t, char *);
34424 extern int pkgumount(struct pkgdev *devp);
34425 extern int ppkgmap(struct cfent *ept, FILE *fp);
34426 extern int putcfile(struct cfent *ept, FILE *fp);
34427 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
34428 extern int rrmdir(char *path);
34429 extern void set_memalloc_failure_func(void (*)(int));
34430 extern void *xmalloc(size_t size);
34431 extern void *xrealloc(void *ptr, size_t size);
34432 extern char *xstrdup(char *str);
34433 extern void set_passphrase_prompt(char *);
34434 extern void set_passphrase_passarg(char *);
34435 extern int pkg_passphrase_cb(char *, int, int, void *);
34436 
34437 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
34438 extern struct group *cgrgid(gid_t gid);
34439 extern struct group *cgrnam(char *nam);
34440 extern struct passwd *cpwnam(char *nam);
34441 extern struct passwd *cpwuid(uid_t uid);
34442 extern struct group *clgrgid(gid_t gid);
34443 extern struct group *clgrnam(char *nam);
34444 extern struct passwd *clpwnam(char *nam);
34445 extern struct passwd *clpwuid(uid_t uid);
34446 extern void basepath(char *path, char *basedir, char *ir);
34447 extern void canonize(char *file);
34448 extern void canonize_slashes(char *file);
34449 extern void checksum_off(void);
34450 extern void checksum_on(void);
34451 extern void cvtpath(char *path, char *copy);
34452 extern void ds_order(char *list[]);
34453 extern void ds_putinfo(char *buf, size_t);
34454 extern void ds_skiptoend(char *device);
34455 extern void ecleanup(void);
34456 /*PRINTFLIKE1*/
34457 extern void logerr(char *fmt, ...);
34458 extern int mappath(int flag, char *path);
34459 extern int mapvar(int flag, char *varname);
34460 /*PRINTFLIKE1*/
34461 extern void progerr(char *fmt, ...);
34462 extern void pkgerr(PKG_ERR *);
34463 extern void rpterr(void);
34464 extern void tputcfent(struct cfent *ept, FILE *fp);
34465 extern void set_nonABI_symlinks(void);
34466 extern int nonABI_symlinks(void);
34467 extern void disable_attribute_check(void);
34468 extern int get_disable_attribute_check(void);
34469 
34470 /* security.c */
34471 extern void sec_init(void);
34472 extern char *get_subject_display_name(X509 *);
34473 extern char *get_issuer_display_name(X509 *);
34474 extern char *get_serial_num(X509 *);
34475 extern char *get_fingerprint(X509 *, const EVP_MD *);
34476 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
34477     struct stack_st_X509 *, struct stack_st_X509 **);
34478 
34479 /* pkgstr.c */
34480 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
34481    char *a_buf, int a_bufLen);
34482 char *pkgstrConvertPathToBasename(char *a_path);
34483 char *pkgstrConvertPathToDirname(char *a_path);
34484 char *pkgstrDup(char *a_str);
34485 char *pkgstrLocatePathBasename(char *a_path);
34486 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
34487 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
34488 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
34489    char *a_separators);
34490 void pkgstrExpandTokens(char **a_old, char *a_string,
34491    char a_separator, char *a_separators);
34492 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
34493    char *a_separators);
34494 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
34495    char *a_separators, char *a_buf, int a_bufLen);
34496 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
34497 char *pkgstrPrintf(char *a_format, ...);
34498 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
34499 void pkgstrRemoveToken(char **r_string, char *a_token,
34500    char *a_separators, int a_index);
34501 void pkgstrRemoveLeadingWhitespace(char **a_str);
34502 /* vfpops.c */
34503 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
34504    char *a_path);
34505 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
34506    char *a_mode, VFPFLAGS_T a_flags);
34507 extern int vfpClearModified(VFP_T *a_vfp);
34508 extern int vfpClose(VFP_T **r_vfp);
34509 extern int vfpGetModified(VFP_T *a_vfp);
34510 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
34511    VFPFLAGS_T a_flags);
34512 extern void vfpRewind(VFP_T *a_vfp);
34513 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
34514    size_t a_nbyte, off_t a_offset);
34515 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
34516 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
34517 extern int vfpSetModified(VFP_T *a_vfp);
34518 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
34519 extern void vfpTruncate(VFP_T *a_vfp);
34520 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
34521 
34522 /* handlelocalfs.c */
34523 boolean_t enable_local_fs(void);
34524 boolean_t restore_local_fs(void);
34525 
34526 /* pkgserv.c */
34527 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
34528 extern void pkgcloseserver(PKGserver);
34529 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
34530     int *);
34531 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
34532 extern int pkgsync(const char *, const char *, boolean_t);
34533 extern int pkgservercommitfile(VFP_T *, PKGserver);
34534 extern int pkgopenfilter(PKGserver server, const char *pkginst);
34535 extern void pkgclosefilter(PKGserver);
34536 extern char *pkggetentry(PKGserver, int *, int *);
34537 extern char *pkggetentry_named(PKGserver, const char *, int *,
34538     int *);
34539 extern void pkgserversetmode(start_mode_t);
34540 extern start_mode_t pkgservergetmode(void);
34541 extern start_mode_t pkgparsemode(const char *);
34542 extern char *pkgmodeargument(start_mode_t);
34543 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
34544 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
34545 /*
34546  * CDDL HEADER START
34547  *
34548  * The contents of this file are subject to the terms of the
34549  * Common Development and Distribution License (the "License").
34550  * You may not use this file except in compliance with the License.
34551  *
34552  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34553  * or http://www.opensolaris.org/os/licensing.
34554  * See the License for the specific language governing permissions
34555  * and limitations under the License.
34556  *
34557  * When distributing Covered Code, include this CDDL HEADER in each
34558  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34559  * If applicable, add the following below this CDDL HEADER, with the
34560  * fields enclosed by brackets "[]" replaced with your own identifying
34561  * information: Portions Copyright [yyyy] [name of copyright owner]
34562  *
34563  * CDDL HEADER END
34564  */
34565 
34566 /*
34567  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
34568  * Use is subject to license terms.
34569  */
34570 # 42 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
34571 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
34572 /*
34573  * CDDL HEADER START
34574  *
34575  * The contents of this file are subject to the terms of the
34576  * Common Development and Distribution License (the "License").
34577  * You may not use this file except in compliance with the License.
34578  *
34579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34580  * or http://www.opensolaris.org/os/licensing.
34581  * See the License for the specific language governing permissions
34582  * and limitations under the License.
34583  *
34584  * When distributing Covered Code, include this CDDL HEADER in each
34585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34586  * If applicable, add the following below this CDDL HEADER, with the
34587  * fields enclosed by brackets "[]" replaced with your own identifying
34588  * information: Portions Copyright [yyyy] [name of copyright owner]
34589  *
34590  * CDDL HEADER END
34591  */
34592 
34593 /*
34594  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
34595  * Use is subject to license terms.
34596  */
34597 
34598 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
34599 /* All Rights Reserved */
34600 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
34601 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
34602 /*
34603  * CDDL HEADER START
34604  *
34605  * The contents of this file are subject to the terms of the
34606  * Common Development and Distribution License (the "License").
34607  * You may not use this file except in compliance with the License.
34608  *
34609  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34610  * or http://www.opensolaris.org/os/licensing.
34611  * See the License for the specific language governing permissions
34612  * and limitations under the License.
34613  *
34614  * When distributing Covered Code, include this CDDL HEADER in each
34615  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34616  * If applicable, add the following below this CDDL HEADER, with the
34617  * fields enclosed by brackets "[]" replaced with your own identifying
34618  * information: Portions Copyright [yyyy] [name of copyright owner]
34619  *
34620  * CDDL HEADER END
34621  */
34622 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34623 /*	  All Rights Reserved  	*/
34624 
34625 
34626 /*
34627  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
34628  * Use is subject to license terms.
34629  *
34630  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
34631  * Copyright 2016 Joyent, Inc.
34632  */
34633 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
34634 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
34635 /*
34636  * CDDL HEADER START
34637  *
34638  * The contents of this file are subject to the terms of the
34639  * Common Development and Distribution License (the "License").
34640  * You may not use this file except in compliance with the License.
34641  *
34642  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34643  * or http://www.opensolaris.org/os/licensing.
34644  * See the License for the specific language governing permissions
34645  * and limitations under the License.
34646  *
34647  * When distributing Covered Code, include this CDDL HEADER in each
34648  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34649  * If applicable, add the following below this CDDL HEADER, with the
34650  * fields enclosed by brackets "[]" replaced with your own identifying
34651  * information: Portions Copyright [yyyy] [name of copyright owner]
34652  *
34653  * CDDL HEADER END
34654  */
34655 
34656 /*
34657  * Copyright (c) 2013 Gary Mills
34658  *
34659  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
34660  * Use is subject to license terms.
34661  */
34662 
34663 /*	Copyright (c) 1988 AT&T	*/
34664 /*	  All Rights Reserved  	*/
34665 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
34666 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
34667 /*
34668  * CDDL HEADER START
34669  *
34670  * The contents of this file are subject to the terms of the
34671  * Common Development and Distribution License (the "License").
34672  * You may not use this file except in compliance with the License.
34673  *
34674  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34675  * or http://www.opensolaris.org/os/licensing.
34676  * See the License for the specific language governing permissions
34677  * and limitations under the License.
34678  *
34679  * When distributing Covered Code, include this CDDL HEADER in each
34680  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34681  * If applicable, add the following below this CDDL HEADER, with the
34682  * fields enclosed by brackets "[]" replaced with your own identifying
34683  * information: Portions Copyright [yyyy] [name of copyright owner]
34684  *
34685  * CDDL HEADER END
34686  */
34687 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
34688 /*	  All Rights Reserved  	*/
34689 
34690 /*
34691  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
34692  * Use is subject to license terms.
34693  */
34694 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
34695 
34696 /* Settings for procedure scripts */
34697 
34698 
34699 
34700 
34701 
34702 
34703 /* Settings for class action scripts */
34704 
34705 
34706 
34707 
34708 
34709 /* Settings for non-privileged scripts */
34710 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
34711 /* Settings for admin "rscriptalt" option */
34712 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
34713 /* Additional cfent/cfextra codes. */
34714 
34715 
34716 
34717 /* This holds admin file data. */
34718 struct admin {
34719  char *mail;
34720  char *instance;
34721  char *partial;
34722  char *runlevel;
34723  char *idepend;
34724  char *rdepend;
34725  char *space;
34726  char *setuid;
34727  char *conflict;
34728  char *action;
34729  char *networktimeout;
34730  char *networkretries;
34731  char *authentication;
34732  char *keystore;
34733  char *proxy;
34734  char *basedir;
34735  char *rscriptalt;
34736 };
34737 
34738 /*
34739  * This table details the status of all filesystems available to the target
34740  * host.
34741  */
34742 struct fstable {
34743  char *name; /* name of filesystem, (mount point) */
34744  int namlen; /* The length of the name (mountpoint) */
34745  fsblkcnt_t bsize; /* fundamental file system block size */
34746  fsblkcnt_t frsize; /* file system fragment size */
34747  fsblkcnt_t bfree; /* total # of free blocks */
34748  fsblkcnt_t bused; /* total # of used blocks */
34749  fsblkcnt_t ffree; /* total # of free file nodes */
34750  fsblkcnt_t fused; /* total # of used file nodes */
34751  char *fstype; /* type of filesystem - nfs, lo, ... */
34752  char *remote_name; /* client's mounted filesystem */
34753  unsigned writeable:1; /* access permission */
34754  unsigned write_tested:1; /* access permission fully tested */
34755  unsigned remote:1; /* on a remote filesystem */
34756  unsigned mounted:1; /* actually mounted right now */
34757  unsigned srvr_map:1; /* use server_map() */
34758  unsigned cl_mounted:1; /* mounted in client space */
34759  unsigned mnt_failed:1; /* attempt to loopback mount failed */
34760  unsigned served:1; /* filesystem comes from a server */
34761 };
34762 # 43 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
34763 
34764 
34765 
34766 
34767 
34768 /* signal handler function definition */
34769 
34770 typedef void (sighdlrFunc_t)(int);
34771 
34772 /* maximum parameter length */
34773 
34774 
34775 
34776 /* flag for check_applicability */
34777 
34778 typedef unsigned long CAF_T;
34779 
34780 /* flags for check_applicability */
34781 
34782 
34783 
34784 
34785 
34786 /* path to the request file in the package directory */
34787 
34788 
34789 
34790 /* path to the copyright file in the package directory */
34791 
34792 
34793 
34794 /* path to the depend file in the package directory */
34795 
34796 
34797 
34798 /*
34799  * name of environment variable set to non-global zone name being installed:
34800  * pkgadd/pkginstall expects this name and passes it on to any scripts that
34801  * are run if it is set.
34802  */
34803 
34804 
34805 
34806 /*
34807  * name of environment variable set to indicate this package should be installed
34808  * in the current zone only - see PSARC/2004/789 - New Pkginfo(4) attributes
34809  * for zones
34810  */
34811 
34812 
34813 
34814 /*
34815  * name of environment variable set to indicate this package should be installed
34816  * in all zones, and only from the global zone - see PSARC/2003/460
34817  */
34818 
34819 
34820 
34821 /*
34822  * name of environment variable set to indicate this package should be installed
34823  * hollow (db update only) when installed in nonglobal zone - see PSARC/2003/460
34824  */
34825 
34826 
34827 
34828 /*
34829  * General purpose return codes used for functions which don't return a basic
34830  * success or failure. For those functions wherein a yes/no result is
34831  * possible, then 1 means OK and 0 means FAIL.
34832  */
34833 
34834 
34835 
34836 
34837 /* These are the file status indicators for the contents file */
34838 # 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
34839 /* control bits for pkgdbmerg() */
34840 
34841 
34842 
34843 /* control bits for file verification by class */
34844 
34845 
34846 
34847 
34848 /* control bit for path type to pass to CAS */
34849 
34850 
34851 
34852 /* findscripts() argument */
34853 
34854 
34855 
34856 struct cl_attr {
34857  char name[64 +1]; /* name of class */
34858  char *inst_script; /* install class action script */
34859  char *rem_script; /* remove class action script */
34860  unsigned src_verify:3; /* source verification level */
34861  unsigned dst_verify:4; /* destination verification level */
34862  unsigned relpath_2_CAS:1; /* CAS gets relative paths */
34863 };
34864 
34865 
34866 
34867 
34868 
34869 
34870 
34871 /* Common quit declaration used across many package commands */
34872 extern void quit(int) __attribute__((__noreturn__));
34873 
34874 
34875 /* listmgr.c */
34876 extern int bl_create (int count_per_block, int struct_size, char *desc);
34877 
34878 extern char *bl_next_avail (int list_handle);
34879 extern char *bl_get_record (int list_handle, int recno);
34880 extern void bl_free (int list_handle);
34881 extern int ar_create (int count_per_block, int struct_size, char *desc);
34882 
34883 extern char **ar_next_avail (int list_handle);
34884 extern char **ar_get_head (int list_handle);
34885 extern int ar_delete (int list_handle, int index);
34886 extern void ar_free (int list_handle);
34887 
34888 /* doulimit.c */
34889 extern int set_ulimit (char *script, char *err_msg);
34890 extern int clr_ulimit (void);
34891 extern int assign_ulimit (char *fslimit);
34892 
34893 /* dryrun.c */
34894 extern void set_continue_not_ok (void);
34895 extern int continue_is_ok (void);
34896 extern int in_dryrun_mode (void);
34897 extern int in_continue_mode (void);
34898 extern void init_dryrunfile (char *dr_dir);
34899 extern void init_contfile (char *cn_dir);
34900 extern void set_dr_exitmsg (char *value);
34901 extern void set_dr_info (int type, int value);
34902 extern void write_dryrun_file (struct cfextra **extlist);
34903 
34904 /* instvol.c */
34905 extern void regfiles_free (void);
34906 
34907 /* lockinst.c */
34908 extern int lockinst (char *util_name, char *pkg_name, char *place);
34909 extern void lockupd (char *place);
34910 extern void unlockinst (void);
34911 
34912 extern char *pathdup (char *s);
34913 extern char *pathalloc (int n);
34914 extern char *fixpath (char *path);
34915 extern char *get_info_basedir (void);
34916 extern char *get_basedir (void);
34917 extern char *get_client_basedir (void);
34918 extern int set_basedirs (int reloc, char *adm_basedir, char *pkginst, int nointeract);
34919 
34920 extern int eval_path (char **server_ptr, char **client_ptr, char **map_ptr, char *path);
34921 
34922 extern int get_orig_offset (void);
34923 extern char *get_inst_root (void);
34924 extern char *get_mount_point (uint32_t n);
34925 extern char *get_remote_path (uint32_t n);
34926 extern void set_env_cbdir (void);
34927 extern int set_inst_root (char *path);
34928 extern void put_path_params (void);
34929 extern int mkpath (char *p);
34930 extern void mkbasedir (int flag, char *path);
34931 extern int is_an_inst_root (void);
34932 extern int is_a_basedir (void);
34933 extern int is_a_cl_basedir (void);
34934 extern int is_relocatable (void);
34935 extern char *orig_path (char *path);
34936 extern char *orig_path_ptr (char *path);
34937 extern char *qreason (int caller, int retcode, int started, int includeZonename);
34938 
34939 extern char *qstrdup (char *s);
34940 extern char *srcpath (char *d, char *p, int part, int nparts);
34941 extern char *trans_srcp_pi (char *local_path);
34942 extern int copyf (char *from, char *to, time_t mytime);
34943 extern int copyFile (int, int, char *, char *, struct stat *, long);
34944 extern int openLocal (char *a_path, int a_oflag, char *a_tmpdir);
34945 extern int dockdeps (char *depfile, int removeFlag, boolean_t a_preinstallCheck);
34946 
34947 extern int finalck (struct cfent *ept, int attrchg, int contchg, boolean_t a_warning);
34948 
34949 
34950 /* dockdeps.c */
34951 extern void setUpdate (void);
34952 extern int isUpdate (void);
34953 
34954 /* mntinfo.c */
34955 extern int get_mntinfo (int map_client, char *vfstab_file);
34956 extern uint32_t fsys (char *path);
34957 extern struct fstable *get_fs_entry (uint32_t n);
34958 extern int mount_client (void);
34959 extern int unmount_client (void);
34960 extern uint32_t resolved_fsys (char *path);
34961 extern char *get_server_host (uint32_t n);
34962 extern char *server_map (char *path, uint32_t fsys_value);
34963 extern int use_srvr_map (char *path, uint32_t *fsys_value);
34964 extern int use_srvr_map_n (uint32_t n);
34965 extern int is_fs_writeable (char *path, uint32_t *fsys_value);
34966 extern int is_remote_fs (char *path, uint32_t *fsys_value);
34967 extern int is_served (char *path, uint32_t *fsys_value);
34968 extern int is_mounted (char *path, uint32_t *fsys_value);
34969 extern int is_fs_writeable_n (uint32_t n);
34970 extern int is_remote_fs_n (uint32_t n);
34971 extern int is_served_n (uint32_t n);
34972 extern int is_mounted_n (uint32_t n);
34973 extern fsblkcnt_t get_blk_size_n (uint32_t n);
34974 extern fsblkcnt_t get_frag_size_n (uint32_t n);
34975 extern fsblkcnt_t get_blk_used_n (uint32_t n);
34976 extern fsblkcnt_t get_blk_free_n (uint32_t n);
34977 extern fsblkcnt_t get_inode_used_n (uint32_t n);
34978 extern fsblkcnt_t get_inode_free_n (uint32_t n);
34979 extern void set_blk_used_n (uint32_t n, fsblkcnt_t value);
34980 extern char *get_source_name_n (uint32_t n);
34981 extern char *get_fs_name_n (uint32_t n);
34982 extern int load_fsentry (struct fstable *fs_entry, char *name, char *fstype, char *remote_name);
34983 
34984 extern int isreloc (char *pkginstdir);
34985 extern int is_local_host (char *hostname);
34986 extern void fs_tab_free (void);
34987 
34988 /* pkgdbmerg.c */
34989 extern int pkgdbmerg (PKGserver server, VFP_T *tmpvfp, struct cfextra **extlist);
34990 
34991 extern int files_installed (void);
34992 
34993 /* ocfile.c */
34994 extern int trunc_tcfile (int fd);
34995 extern int ocfile (PKGserver *serverp, VFP_T **tmpvfp, fsblkcnt_t map_blks);
34996 
34997 extern int swapcfile (PKGserver server, VFP_T **a_tmpvfp, char *pkginst, int dbchg);
34998 
34999 extern int set_cfdir (char *cfdir);
35000 extern int socfile (PKGserver *server, boolean_t quiet);
35001 extern int relslock (void);
35002 extern int pkgWlock (int verbose);
35003 extern int iscfile (void);
35004 extern int vcfile (void);
35005 
35006 extern fsblkcnt_t nblk (fsblkcnt_t size, ulong_t bsize, ulong_t frsize);
35007 
35008 extern struct cfent **procmap (VFP_T *vfp, int mapflag, char *ir);
35009 extern void repl_cfent (struct cfent *new, struct cfent *old);
35010 extern struct cfextra **pkgobjmap (VFP_T *vfp, int mapflag, char *ir);
35011 extern void pkgobjinit (void);
35012 extern int seed_pkgobjmap (struct cfextra *ext_entry, char *path, char *local);
35013 
35014 extern int init_pkgobjspace (void);
35015 
35016 /* eptstat.c */
35017 extern void pinfo_free (void);
35018 extern struct pinfo *eptstat (struct cfent *entry, char *pkg, char c);
35019 
35020 /* echo.c */
35021 /*PRINTFLIKE1*/
35022 extern void echo (char *a_fmt, ...);
35023 /*PRINTFLIKE1*/
35024 extern void echoDebug (char *a_fmt, ...);
35025 extern boolean_t echoGetFlag (void);
35026 extern boolean_t echoDebugGetFlag (void);
35027 extern boolean_t echoSetFlag (boolean_t a_debugFlag);
35028 extern boolean_t echoDebugSetFlag (boolean_t a_debugFlag);
35029 
35030 /* ptext.c */
35031 /*PRINTFLIKE2*/
35032 extern void ptext (FILE *fp, char *fmt, ...);
35033 
35034 /* putparam.c */
35035 extern void putparam (char *param, char *value);
35036 extern void getuserlocale (void);
35037 extern void putuserlocale (void);
35038 extern void putConditionInfo (char *, char *);
35039 
35040 /* setadmin.c */
35041 extern void setadminFile (char *file);
35042 extern char *setadminSetting (char *a_paramName, char *a_paramValue);
35043 
35044 extern char *set_keystore_admin (void);
35045 extern boolean_t get_proxy_port_admin (char **, ushort_t *);
35046 extern boolean_t check_keystore_admin (char **);
35047 extern int web_ck_retries (void);
35048 extern int web_ck_timeout (void);
35049 extern int web_ck_authentication (void);
35050 
35051 /* setlist.c */
35052 extern char *cl_iscript (int idx);
35053 extern char *cl_rscript (int idx);
35054 extern void find_CAS (int CAS_type, char *bin_ptr, char *inst_ptr);
35055 extern int setlist (struct cl_attr ***plist, char *slist);
35056 extern void addlist (struct cl_attr ***plist, char *item);
35057 extern char *cl_nam (int cl_idx);
35058 extern char *flex_device(char *device_name, int dev_ok);
35059 extern int cl_getn (void);
35060 extern int cl_idx (char *cl_nam);
35061 extern void cl_sets (char *slist);
35062 extern void cl_setl (struct cl_attr **cl_lst);
35063 extern void cl_putl (char *parm_name, struct cl_attr **list);
35064 extern int cl_deliscript (int i);
35065 extern unsigned cl_svfy (int i);
35066 extern unsigned cl_dvfy (int i);
35067 extern unsigned cl_pthrel (int i);
35068 
35069 /* passwd.c */
35070 extern int pkg_passphrase_cb (char *, int, int, void *);
35071 extern void set_passarg (char *);
35072 extern void set_prompt (char *);
35073 
35074 /* fixpath.c */
35075 extern void export_client_env(char *);
35076 extern void set_partial_inst(void);
35077 extern int is_partial_inst(void);
35078 extern void set_depend_pkginfo_DB(boolean_t a_setting);
35079 extern boolean_t is_depend_pkginfo_DB(void);
35080 extern void disable_spool_create(void);
35081 extern int is_spool_create(void);
35082 
35083 /* open_package_datastream.c */
35084 extern boolean_t open_package_datastream(int a_argc, char **a_argv,
35085     char *a_spoolto, char *a_device,
35086     int *r_repeat, char **r_idsName,
35087     char *a_tmpdir, struct pkgdev *a_pkgdev,
35088     int a_optind);
35089 
35090 /* setup_temporary_directory.c */
35091 extern boolean_t setup_temporary_directory(char **r_dirname,
35092     char *a_tmpdir, char *a_suffix);
35093 
35094 /* unpack_package_from_stream.c */
35095 extern boolean_t unpack_package_from_stream(char *a_idsName,
35096     char *a_pkginst, char *a_tempDir);
35097 
35098 /* pkgops.c */
35099 
35100 extern boolean_t pkgAddPackageToGzonlyList(char *a_pkgInst,
35101     char *a_rootPath);
35102 extern void pkgAddThisZonePackage(char *a_pkgInst);
35103 extern boolean_t pkgRemovePackageFromGzonlyList(char *a_rootPath,
35104     char *a_pkgInst);
35105 extern FILE *pkgOpenInGzOnlyFile(char *a_rootPath);
35106 extern void pkginfoFree(struct pkginfo **r_info);
35107 extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
35108     char *a_pkgInst);
35109 extern boolean_t pkgIsPkgInGzOnly(char *a_rootPath, char *a_pkgInst);
35110 extern boolean_t pkgIsPkgInGzOnlyFP(FILE *a_fp, char *a_pkgInst);
35111 extern boolean_t pkginfoParamTruth(FILE *a_fp, char *a_param,
35112     char *a_value, boolean_t a_default);
35113 extern int pkgGetPackageList(char ***r_pkgList, char **a_argv,
35114     int a_optind, char *a_categories,
35115     char **a_categoryList, struct pkgdev *a_pkgdev);
35116 extern void pkgLocateHighestInst(char *r_path, int r_pathLen,
35117     char *r_pkgInst, int r_pkgInstLen,
35118     char *a_rootPath, char *a_pkgInst);
35119 extern boolean_t pkgPackageIsThisZone(char *a_pkgInst);
35120 extern char *pkgGetGzOnlyPath(void);
35121 extern boolean_t pkgTestInstalled(char *a_packageName, char *a_rootPath);
35122 
35123 /* depchk.c */
35124 
35125 struct depckErrorRecord {
35126  int ier_numZones;
35127  char *ier_packageName;
35128  char **ier_zones;
35129  char **ier_values;
35130 };
35131 
35132 typedef struct depckErrorRecord depckErrorRecord_t;
35133 
35134 struct depckError {
35135  int er_numEntries;
35136  depckErrorRecord_t *er_theEntries;
35137 };
35138 
35139 typedef struct depckError depckError_t;
35140 
35141 typedef int (depcklFunc_t)(char *a_msg, char *a_pkg);
35142 
35143 /*
35144  * ignore_values:
35145  *	== NULL - record one message for each instance of "name" found
35146  *	== "" - record multiple instances
35147  *	!= "" - record multiple instances if value not in ignore_values
35148  */
35149 
35150 struct depckl_struct {
35151  char *name;
35152  char *ignore_values;
35153  char **err_msg;
35154  depcklFunc_t *depcklFunc;
35155  depckError_t *record;
35156 };
35157 
35158 typedef struct depckl_struct depckl_t;
35159 
35160 extern int depchkReportErrors(depckl_t *depckl);
35161 extern void depchkRecordError(depckError_t *a_erc,
35162     char *a_pkginst, char *a_zoneName,
35163     char *a_value);
35164 
35165 /* log.c */
35166 
35167 /* types of log messages we recognize */
35168 typedef enum {
35169  LOG_MSG_ERR,
35170  LOG_MSG_WRN,
35171  LOG_MSG_INFO,
35172  LOG_MSG_DEBUG
35173 } LogMsgType;
35174 
35175 /*PRINTFLIKE2*/
35176 extern void log_msg(LogMsgType, const char *, ...);
35177 extern void log_set_verbose(boolean_t);
35178 extern boolean_t log_get_verbose(void);
35179 
35180 /*
35181  * typedef for the 'ckreturn' function
35182  */
35183 typedef void (ckreturnFunc_t)(int a_retcode);
35184 
35185 /* sml.c */
35186 
35187 /* null reference to SML_TAG object */
35188 
35189 
35190 
35191 /* null reference to SML_TAG * object */
35192 
35193 
35194 
35195 /* is reference to SML_TAG object valid? */
35196 
35197 
35198 
35199 /* is indirect reference to SML_TAG object valid? */
35200 
35201 
35202 
35203 
35204 /* definitions for sml passed from pkginstall to pkgcond */
35205 # 505 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
35206 typedef struct _sml_tag_struct SML_TAG;
35207 typedef struct _sml_parameter_struct SML_PARAM;
35208 
35209 struct _sml_tag_struct {
35210  char *name; /* tag name */
35211  int params_num; /* # params in *params */
35212  SML_PARAM *params; /* tag parameters */
35213  int tags_num; /* # subtags in *tags */
35214  SML_TAG *tags; /* tag subtags */
35215 };
35216 
35217 struct _sml_parameter_struct {
35218  char *name; /* tag name */
35219  char *value; /* parameters */
35220 };
35221 
35222 SML_TAG *smlAddTag(SML_TAG **r_tag, int a_index,
35223    SML_TAG *a_subTag);
35224 boolean_t smlFstatCompareEq(struct stat *statbuf,
35225     SML_TAG *tag, char *path);
35226 char *smlConvertTagToString(SML_TAG *tag);
35227 /*PRINTFLIKE2*/
35228 void smlDbgPrintTag(SML_TAG *a_tag, char *a_format, ...);
35229 void smlDelTag(SML_TAG *tag, SML_TAG *sub_tag);
35230 void smlDelParam(SML_TAG *tag, char *name);
35231 SML_TAG *smlDup(SML_TAG *tag);
35232 boolean_t smlFindAndDelTag(SML_TAG *tag, char *findTag);
35233 void smlFreeTag(SML_TAG *tag);
35234 char *smlGetElementName(SML_TAG *a_tag);
35235 int smlGetNumParams(SML_TAG *a_tag);
35236 char *smlGetParam(SML_TAG *tag, char *name);
35237 /*PRINTFLIKE2*/
35238 char *smlGetParamF(SML_TAG *tag, char *format, ...);
35239 void smlGetParam_r(SML_TAG *tag, char *name, char *buf,
35240    int bufLen);
35241 char *smlGetParamByTag(SML_TAG *tag, int index,
35242    char *tagName, char *parmName);
35243 char *smlGetParamByTagParam(SML_TAG *tag, int index,
35244    char *tagName, char *parmName, char *parmValue,
35245    char *parmReturn);
35246 char *smlGetParamName(SML_TAG *tag, int index);
35247 SML_TAG *smlGetTag(SML_TAG *tag, int index);
35248 SML_TAG *smlGetTagByName(SML_TAG *tag, int index, char *name);
35249 SML_TAG *smlGetTagByTagParam(SML_TAG *tag, int index,
35250    char *tagName, char *paramName, char *paramValue);
35251 boolean_t smlGetVerbose(void);
35252 int smlLoadTagFromFile(SML_TAG **r_tag, char *a_fileName);
35253 SML_TAG *smlNewTag(char *name);
35254 boolean_t smlParamEq(SML_TAG *tag, char *findTag,
35255    char *findParam, char *str);
35256 /*PRINTFLIKE4*/
35257 boolean_t smlParamEqF(SML_TAG *tag, char *findTag, char *findParam,
35258    char *format, ...);
35259 void smlPrintTag(SML_TAG *tag);
35260 int smlReadOneTag(SML_TAG **r_tag, char *a_str);
35261 int smlConvertStringToTag(SML_TAG **r_tag, char *str);
35262 void smlSetFileStatInfo(SML_TAG **tag,
35263     struct stat *statbuf, char *path);
35264 void smlSetParam(SML_TAG *tag, char *name, char *value);
35265 /*PRINTFLIKE3*/
35266 void smlSetParamF(SML_TAG *tag, char *name, char *format, ...);
35267 void smlSetVerbose(boolean_t a_setting);
35268 int smlWriteTagToFd(SML_TAG *tag, int fd);
35269 int smlWriteTagToFile(SML_TAG *tag, char *filename);
35270 /*PRINTFLIKE3*/
35271 void sml_strPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
35272 /*PRINTFLIKE1*/
35273 char *sml_strPrintf(char *a_format, ...);
35274 char *sml_XmlEncodeString(char *a_plainTextString);
35275 char *sml_XmlDecodeString(char *a_xmlEncodedString);
35276 # 71 "lock.c" 2
35277 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
35278 /*
35279  * CDDL HEADER START
35280  *
35281  * The contents of this file are subject to the terms of the
35282  * Common Development and Distribution License (the "License").
35283  * You may not use this file except in compliance with the License.
35284  *
35285  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35286  * or http://www.opensolaris.org/os/licensing.
35287  * See the License for the specific language governing permissions
35288  * and limitations under the License.
35289  *
35290  * When distributing Covered Code, include this CDDL HEADER in each
35291  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35292  * If applicable, add the following below this CDDL HEADER, with the
35293  * fields enclosed by brackets "[]" replaced with your own identifying
35294  * information: Portions Copyright [yyyy] [name of copyright owner]
35295  *
35296  * CDDL HEADER END
35297  */
35298 
35299 /*
35300  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35301  * Use is subject to license terms.
35302  */
35303 
35304 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
35305 /* All Rights Reserved */
35306 # 72 "lock.c" 2
35307 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
35308 /*
35309  * CDDL HEADER START
35310  *
35311  * The contents of this file are subject to the terms of the
35312  * Common Development and Distribution License (the "License").
35313  * You may not use this file except in compliance with the License.
35314  *
35315  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35316  * or http://www.opensolaris.org/os/licensing.
35317  * See the License for the specific language governing permissions
35318  * and limitations under the License.
35319  *
35320  * When distributing Covered Code, include this CDDL HEADER in each
35321  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35322  * If applicable, add the following below this CDDL HEADER, with the
35323  * fields enclosed by brackets "[]" replaced with your own identifying
35324  * information: Portions Copyright [yyyy] [name of copyright owner]
35325  *
35326  * CDDL HEADER END
35327  */
35328 
35329 /*
35330  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
35331  * Use is subject to license terms.
35332  */
35333 # 73 "lock.c" 2
35334 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
35335 /*
35336  * CDDL HEADER START
35337  *
35338  * The contents of this file are subject to the terms of the
35339  * Common Development and Distribution License (the "License").
35340  * You may not use this file except in compliance 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 /*
35357  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
35358  * Use is subject to license terms.
35359  */
35360 # 74 "lock.c" 2
35361 # 1 "pkgadm.h" 1
35362 /*
35363  * CDDL HEADER START
35364  *
35365  * The contents of this file are subject to the terms of the
35366  * Common Development and Distribution License (the "License").
35367  * You may not use this file except in compliance with the License.
35368  *
35369  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35370  * or http://www.opensolaris.org/os/licensing.
35371  * See the License for the specific language governing permissions
35372  * and limitations under the License.
35373  *
35374  * When distributing Covered Code, include this CDDL HEADER in each
35375  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35376  * If applicable, add the following below this CDDL HEADER, with the
35377  * fields enclosed by brackets "[]" replaced with your own identifying
35378  * information: Portions Copyright [yyyy] [name of copyright owner]
35379  *
35380  * CDDL HEADER END
35381  */
35382 
35383 /*
35384  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
35385  * Use is subject to license terms.
35386  */
35387 # 35 "pkgadm.h"
35388 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
35389 /*
35390  * CDDL HEADER START
35391  *
35392  * The contents of this file are subject to the terms of the
35393  * Common Development and Distribution License (the "License").
35394  * You may not use this file except in compliance with the License.
35395  *
35396  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35397  * or http://www.opensolaris.org/os/licensing.
35398  * See the License for the specific language governing permissions
35399  * and limitations under the License.
35400  *
35401  * When distributing Covered Code, include this CDDL HEADER in each
35402  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35403  * If applicable, add the following below this CDDL HEADER, with the
35404  * fields enclosed by brackets "[]" replaced with your own identifying
35405  * information: Portions Copyright [yyyy] [name of copyright owner]
35406  *
35407  * CDDL HEADER END
35408  */
35409 
35410 /*
35411  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
35412  * Use is subject to license terms.
35413  */
35414 # 36 "pkgadm.h" 2
35415 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
35416 /*
35417  * CDDL HEADER START
35418  *
35419  * The contents of this file are subject to the terms of the
35420  * Common Development and Distribution License (the "License").
35421  * You may not use this file except in compliance with the License.
35422  *
35423  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35424  * or http://www.opensolaris.org/os/licensing.
35425  * See the License for the specific language governing permissions
35426  * and limitations under the License.
35427  *
35428  * When distributing Covered Code, include this CDDL HEADER in each
35429  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35430  * If applicable, add the following below this CDDL HEADER, with the
35431  * fields enclosed by brackets "[]" replaced with your own identifying
35432  * information: Portions Copyright [yyyy] [name of copyright owner]
35433  *
35434  * CDDL HEADER END
35435  */
35436 
35437 /*
35438  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
35439  * Use is subject to license terms.
35440  */
35441 # 37 "pkgadm.h" 2
35442 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
35443 /*
35444  * CDDL HEADER START
35445  *
35446  * The contents of this file are subject to the terms of the
35447  * Common Development and Distribution License (the "License").
35448  * You may not use this file except in compliance with the License.
35449  *
35450  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35451  * or http://www.opensolaris.org/os/licensing.
35452  * See the License for the specific language governing permissions
35453  * and limitations under the License.
35454  *
35455  * When distributing Covered Code, include this CDDL HEADER in each
35456  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35457  * If applicable, add the following below this CDDL HEADER, with the
35458  * fields enclosed by brackets "[]" replaced with your own identifying
35459  * information: Portions Copyright [yyyy] [name of copyright owner]
35460  *
35461  * CDDL HEADER END
35462  */
35463 
35464 /*
35465  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35466  * Use is subject to license terms.
35467  */
35468 
35469 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
35470 /* All Rights Reserved */
35471 # 38 "pkgadm.h" 2
35472 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
35473 /*
35474  * CDDL HEADER START
35475  *
35476  * The contents of this file are subject to the terms of the
35477  * Common Development and Distribution License (the "License").
35478  * You may not use this file except in compliance with the License.
35479  *
35480  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35481  * or http://www.opensolaris.org/os/licensing.
35482  * See the License for the specific language governing permissions
35483  * and limitations under the License.
35484  *
35485  * When distributing Covered Code, include this CDDL HEADER in each
35486  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35487  * If applicable, add the following below this CDDL HEADER, with the
35488  * fields enclosed by brackets "[]" replaced with your own identifying
35489  * information: Portions Copyright [yyyy] [name of copyright owner]
35490  *
35491  * CDDL HEADER END
35492  */
35493 
35494 /*
35495  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
35496  */
35497 # 39 "pkgadm.h" 2
35498 
35499 /* version of packaging interface */
35500 
35501 
35502 /* string comparitor abbreviators */
35503 
35504 
35505 
35506 
35507 
35508 
35509 /* max l10n message length we will display */
35510 
35511 
35512 /* main.c */
35513 extern void log_msg(LogMsgType, const char *, ...);
35514 extern void log_pkgerr(LogMsgType, PKG_ERR *);
35515 extern void set_verbose(boolean_t);
35516 extern boolean_t get_verbose(void);
35517 /* lock.c */
35518 extern int admin_lock(int, char **);
35519 /* listcert.c */
35520 extern int listcert(int, char **);
35521 /* importcert.c */
35522 extern int addcert(int, char **);
35523 /* removecert.c */
35524 extern int removecert(int, char **);
35525 
35526 /* certs.c */
35527 extern int load_cert_and_key(PKG_ERR *, FILE *,
35528     keystore_encoding_format_t, char *, EVP_PKEY **, X509 **);
35529 extern int load_all_certs(PKG_ERR *, FILE *,
35530     keystore_encoding_format_t, char *, struct stack_st_X509 **);
35531 # 75 "lock.c" 2
35532 # 1 "pkgadm_msgs.h" 1
35533 /*
35534  * CDDL HEADER START
35535  *
35536  * The contents of this file are subject to the terms of the
35537  * Common Development and Distribution License (the "License").
35538  * You may not use this file except in compliance with the License.
35539  *
35540  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35541  * or http://www.opensolaris.org/os/licensing.
35542  * See the License for the specific language governing permissions
35543  * and limitations under the License.
35544  *
35545  * When distributing Covered Code, include this CDDL HEADER in each
35546  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35547  * If applicable, add the following below this CDDL HEADER, with the
35548  * fields enclosed by brackets "[]" replaced with your own identifying
35549  * information: Portions Copyright [yyyy] [name of copyright owner]
35550  *
35551  * CDDL HEADER END
35552  */
35553 
35554 /*
35555  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
35556  * Use is subject to license terms.
35557  */
35558 
35559 
35560 
35561 
35562 
35563 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
35564 /*
35565  * CDDL HEADER START
35566  *
35567  * The contents of this file are subject to the terms of the
35568  * Common Development and Distribution License (the "License").
35569  * You may not use this file except in compliance with the License.
35570  *
35571  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35572  * or http://www.opensolaris.org/os/licensing.
35573  * See the License for the specific language governing permissions
35574  * and limitations under the License.
35575  *
35576  * When distributing Covered Code, include this CDDL HEADER in each
35577  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35578  * If applicable, add the following below this CDDL HEADER, with the
35579  * fields enclosed by brackets "[]" replaced with your own identifying
35580  * information: Portions Copyright [yyyy] [name of copyright owner]
35581  *
35582  * CDDL HEADER END
35583  */
35584 /*
35585  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
35586  *
35587  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
35588  * Use is subject to license terms.
35589  */
35590 # 32 "pkgadm_msgs.h" 2
35591 # 41 "pkgadm_msgs.h"
35592 /* generic messages */
35593 # 113 "pkgadm_msgs.h"
35594 /* warnings */
35595 # 124 "pkgadm_msgs.h"
35596 /* errors */
35597 # 392 "pkgadm_msgs.h"
35598 /*
35599  * i18n:
35600  * next two messages grouped together
35601  */
35602 
35603 
35604 
35605 
35606 
35607 
35608 
35609 /*
35610  * i18n: note this message may be appended to the previous message
35611  * by supplying it to the final "%s" at the end of the line above;
35612  * that is either:
35613  *  cannot acquire %s lock on <%s> key <%s>: object is locked <%s>
35614  * or:
35615  *  cannot acquire %s lock on <%s> [...] is locked <%s> and no key specified
35616  */
35617 
35618 
35619 
35620 
35621 /*
35622  * i18n: note these two "messages" are inserted into other
35623  * messages, such as:
35624  * 	cannot acquire %s lock on <%s>
35625  * will be either:
35626  *	cannot acquire shared lock on <%s>
35627  * or
35628  *	cannot acquire exclusive lock on <%s>
35629  */
35630 
35631 
35632 
35633 
35634 
35635 
35636 
35637 /*
35638  * i18n: note these messages are "debugging" messages and will normally
35639  * not be seen unless debugging has been enabled for problem root causing
35640  * so they are not meant to be perfectly "human readable"
35641  */
35642 # 76 "lock.c" 2
35643 
35644 /* definition and conversion of sleep units */
35645 
35646 
35647 
35648 
35649 /* define how waits are timed */
35650 
35651 
35652 
35653 
35654 
35655 typedef unsigned int WAITER_T;
35656 
35657 /*
35658  * The administrative lock file resides in /tmp
35659  * It does not survive a reboot
35660  * It consists of fixed length records
35661  * Each record has the following information:
35662  * 	record number - record position within the lock file
35663  * 	lock count - number of lock holders maintaining this lock
35664  * 	lock object - object being locked
35665  * 	lock key - key needed to manipulate existing lock
35666  *	lock exclusive - is the lock exclusive (single locker only)
35667  */
35668 
35669 
35670 
35671 
35672 
35673 
35674 /*
35675  * this is the "well known name" of the lock file that is used by the
35676  * package, patch, and zone administration commands to synchronize their
35677  * various efforts - it must live in a temporary directory that is cleared
35678  * on system reboot but it is NOT a temporary file in that it survives
35679  * the process that creates and updates it - if the format of the lock
35680  * file ever changes, this path should be updated with a later "uuid"
35681  * so that previous (incompatible) pkgadm's will not use the later data.
35682  */
35683 
35684 
35685 
35686 
35687 /* mode to use for LOCK_FILENAME */
35688 
35689 
35690 
35691 
35692 
35693 
35694 /* lock contents types */
35695 
35696 typedef unsigned long RECORDNUM_T;
35697 
35698 
35699 
35700 /* actual lock data */
35701 
35702 struct _adminLock
35703 {
35704  RECORDNUM_T lockRecordNum;
35705  unsigned long lockCount;
35706  unsigned long lockExclusive;
35707  pid_t lockPid;
35708  zoneid_t lockZoneId;
35709  char lockKey[37 +1];
35710  char lockObject[512-1 +1];
35711 };
35712 
35713 typedef struct _adminLock ADMINLOCK_T;
35714 
35715 /* size of an individual "lock" */
35716 
35717 
35718 
35719 /* union to allow lock to be accessed as raw or structured data */
35720 
35721 union _lockRecord
35722 {
35723  char _lrLockData[sizeof (ADMINLOCK_T)];
35724  ADMINLOCK_T _lrLock;
35725 };
35726 
35727 typedef union _lockRecord LOCK_T;
35728 
35729 /* return codes from "_findLock" */
35730 
35731 typedef unsigned long FINDLOCK_T;
35732 # 174 "lock.c"
35733 /*
35734  * Forward declarations
35735  */
35736 
35737 /* local main function implementation methods */
35738 
35739 static FINDLOCK_T lock_acquire(LOCK_T *a_lock, int *a_fd, char *a_root,
35740     char *a_key, char *a_object, int a_quiet,
35741     int a_wait, long a_timeout, int a_exclusive,
35742     char *a_altRoot, pid_t a_pid, zoneid_t a_zid);
35743 static int lock_release(int a_fd, char *a_key, char *a_object,
35744     int a_quiet);
35745 static int lock_status(int a_fd, char *a_key, char *a_object,
35746     int a_quiet);
35747 
35748 /* local utility functions */
35749 
35750 static int _lockMatch(char *a_s1Lock, char *a_s2Lock);
35751 static FINDLOCK_T _findLock(LOCK_T *a_theLock, RECORDNUM_T *r_recordNum,
35752     int a_fd, char *a_object, char *a_key);
35753 static int _decrementLockCount(int a_fd, LOCK_T *a_theLock);
35754 static int _addLock(char *r_key, int a_fd, char *a_object,
35755     int a_exclusive, pid_t a_pid, zoneid_t a_zid);
35756 static int _incrementLockCount(int a_fd, LOCK_T *a_theLock);
35757 static FINDLOCK_T _lock_acquire(LOCK_T *a_lock, int a_fd, char *a_key,
35758     char *a_object, int a_quiet, int a_exclusive,
35759     pid_t a_pid, zoneid_t a_zid);
35760 static char *_getUniqueId(void);
35761 static int _openLockFile(char *a_root);
35762 static void sighup_handler(int a_signo);
35763 static void sigint_handler(int a_signo);
35764 static boolean_t _validateLock(int a_fd, LOCK_T *a_theLock, int a_quiet);
35765 
35766 static int signal_received = 0;
35767 
35768 /*
35769  * main methods with external entry points
35770  */
35771 
35772 /*
35773  * Name:	admin_lock
35774  * Synopsis:	main entry point for pkgadm "lock" subcommand
35775  * Description:	Control zone/package administrative locking
35776  * Returns: 0 on success, non-zero otherwise.
35777  */
35778 
35779 int
35780 admin_lock(int argc, char **argv)
35781 {
35782  FINDLOCK_T tResult;
35783  LOCK_T theLock;
35784  char *RFlag = "/"; /* altRoot */
35785  char *endptr;
35786  char *kFlag = ""; /* key */
35787  char *oFlag = ""; /* object */
35788  char *p;
35789  char c;
35790  int aFlag = 0; /* acquire lock */
35791  int eFlag = 0; /* exclusive lock */
35792  int exclusive = 1; /* exclusive vs shared lock */
35793  int fd;
35794  int qFlag = 0; /* quiet */
35795  int rFlag = 0; /* release lock */
35796  int result;
35797  int sFlag = 0; /* shared lock */
35798  int tFlag = 0; /* test comparison */
35799  int wFlag = 0; /* wait */
35800  long WFlag = 0; /* wait timeout */
35801  pid_t pFlag = 0; /* process # */
35802  struct sigaction nact;
35803  struct sigaction oact;
35804  void (*funcSighup)();
35805  void (*funcSigint)();
35806  zoneid_t zFlag = -1; /* zone i.d. */
35807 
35808  while ((c = getopt(argc, argv, ":aek:o:p:qrR:stwW:z:")) != (-1)) {
35809   switch (c) {
35810   case 'a': /* acquire lock */
35811    aFlag++;
35812    break;
35813 
35814   case 'e': /* exclusive lock */
35815    eFlag++;
35816    break;
35817 
35818   case 'k': /* lock-key */
35819    kFlag = optarg;
35820    if (strlen(optarg) > 37) {
35821     log_msg(LOG_MSG_ERR,
35822      gettext( "Argument to -k is <%d> characters: may not exceed <%d> characters\n"),
35823      strlen(optarg), 37);
35824     return (1);
35825    }
35826    break;
35827 
35828   case 'o': /* object */
35829    oFlag = optarg;
35830    if (strlen(optarg) > 512-1) {
35831     log_msg(LOG_MSG_ERR,
35832      gettext( "Argument to -o is <%d> characters: may not exceed <%d> characters\n"),
35833      strlen(optarg), 512-1);
35834     return (1);
35835    }
35836    break;
35837 
35838   case 'p': /* process i.d. */
35839    (*(___errno())) = 0;
35840    endptr = 0;
35841    pFlag = strtol(optarg, &endptr, 10);
35842    if ((endptr != (char *)0) && (*endptr != '\0')) {
35843     log_msg(LOG_MSG_ERR, gettext( "The integer value <%s> given to the -p option includes an " "invalid character: \"%c\"\n"),
35844        optarg, *endptr);
35845     return (1);
35846    }
35847    if ((pFlag == 0) && ((*(___errno())) != 0)) {
35848     log_msg(LOG_MSG_ERR,
35849      gettext( "Argument to -p has problem with process i.d. value <%s>: %s"),
35850      optarg, strerror((*(___errno()))));
35851     return (1);
35852    }
35853    break;
35854 
35855   case 'q': /* quiet */
35856    qFlag++;
35857    break;
35858 
35859   case 'r': /* release lock */
35860    rFlag++;
35861    break;
35862 
35863   case 'R': /* alternative root */
35864    /* if root directory is not absolute path, error */
35865    if (*optarg != '/') {
35866     log_msg(LOG_MSG_ERR,
35867      gettext( "Argument to -R must be absolute path: %s"), optarg);
35868     return (1);
35869    }
35870 
35871    /* if root directory does not exist, create it */
35872    if (access(optarg, 0) != 0) {
35873 
35874     /* create top level root directory */
35875     if (mkdirp(optarg, 0755) != 0) {
35876      log_msg(LOG_MSG_ERR,
35877       gettext( "lock: cannot create alternative root directory <%s>: %s\n"),
35878       optarg, strerror((*(___errno()))));
35879      return (1);
35880     }
35881    }
35882 
35883    /* if $ALTROOT/tmp directory does not exist create it */
35884    p = pkgstrPrintf("%s/tmp", optarg);
35885    if (access(p, 0) != 0) {
35886 
35887     /* create $ALTROOT/tmp directory */
35888     if (mkdirp(p, 0777) != 0) {
35889      log_msg(LOG_MSG_ERR,
35890       gettext( "lock: cannot create alternative root directory <%s>: %s\n"),
35891       p, strerror((*(___errno()))));
35892      return (1);
35893     }
35894    }
35895 
35896    /* if $ALTROOT/tmp directory cannot be created, exit */
35897    if (access(p, 0) != 0) {
35898     log_msg(LOG_MSG_ERR, gettext( "lock: argument to -R <%s> is not a directory: %s\n"),
35899      optarg, strerror((*(___errno()))));
35900     return (1);
35901    }
35902 
35903    (void) free(p);
35904 
35905    RFlag = optarg;
35906    break;
35907 
35908   case 's': /* shared */
35909    sFlag++;
35910    break;
35911 
35912   case 't': /* test comparison */
35913    tFlag++;
35914    break;
35915 
35916   case 'w': /* wait */
35917    wFlag++;
35918    break;
35919 
35920   case 'W': /* wait with timeout */
35921    (*(___errno())) = 0;
35922    endptr = 0;
35923    WFlag = strtol(optarg, &endptr, 10);
35924    if ((endptr != (char *)0) && (*endptr != '\0')) {
35925     log_msg(LOG_MSG_ERR, gettext( "The integer value <%s> given to the -W option includes an " "invalid character: \"%c\"\n"),
35926        optarg, *endptr);
35927     return (1);
35928    }
35929    if ((WFlag == 0) && ((*(___errno())) != 0)) {
35930     log_msg(LOG_MSG_ERR,
35931      gettext( "Argument to -W has problem with wait interval <%s>: %s"),
35932      optarg, strerror((*(___errno()))));
35933     return (1);
35934    }
35935    wFlag++;
35936    break;
35937 
35938   case 'z': /* zone i.d. */
35939    (*(___errno())) = 0;
35940    endptr = 0;
35941    zFlag = strtol(optarg, &endptr, 10);
35942    if ((endptr != (char *)0) && (*endptr != '\0')) {
35943     log_msg(LOG_MSG_ERR, gettext( "The integer value <%s> given to the -z option includes an " "invalid character: \"%c\"\n"),
35944        optarg, *endptr);
35945     return (1);
35946    }
35947    if ((zFlag == 0) && ((*(___errno())) != 0)) {
35948     log_msg(LOG_MSG_ERR,
35949      gettext( "Argument to -p has problem with zone i.d. value <%s>: %s"),
35950      optarg, strerror((*(___errno()))));
35951     return (1);
35952    }
35953    break;
35954 
35955   case ':':
35956    log_msg(LOG_MSG_ERR, gettext( "-%c requires an operand"), optopt);
35957    /* LINTED fallthrough on case statement */
35958   case '?':
35959 
35960   default:
35961    log_msg(LOG_MSG_ERR, gettext("usage:\n" "\n" "pkgadm addcert  [-ty] [-a app] [-k keystore] [-e keyfile]\n" "\t[-f format] [-n name] [-P passarg] [-p input_passarg]\n" "\t[-R rootpath] certfile\n" "\n" "\t- Adds a trusted CA certificate or user certificate\n" "\tand private key\n" "\n" "pkgadm removecert [-a app] [-k keystore] -n name [-P passarg]\n" "\t[-R rootpath]\n" "\n" "\t- Removes a trusted CA certificate or user certificate\n" "\tand private key\n" "\n" "pkgadm listcert  [-a app] [-f format] [-k keystore] -n name\n" "\t[-P passarg] [-o outfile] [-R rootpath]\n" "\n" "\t- Prints trusted CA certificates or user certificates\n" "\n" "pkgadm dbstatus [-R rootpath]\n" "\n" "\t- Returns 'text' - the text install database in use since Solaris 2.0\n" "\t  is the current install database in use.\n" "\n" "pkgadm sync [-R rootpath] [-q]\n" "\n" "\t- Writes the contents file and rolls the contents log file.\n" "\t- Optionally forces the contents file server to quit [-q].\n" "\n" "pkgadm -V\n" "\t- Displays packaging tools version\n" "\n" "pkgadm -?\n" "\t- Shows this help message\n"));
35962    return (1);
35963   }
35964  }
35965 
35966  /*
35967 	 * validate arguments
35968 	 */
35969 
35970  /* if -t option is specified, override all other options */
35971 
35972  if (tFlag) {
35973   int rs;
35974   int rx;
35975   int a;
35976 
35977   /* only 2 or 3 args are valid */
35978 
35979   a = argc-optind;
35980   if ((a < 2) || (a > 3)) {
35981    (void) fprintf((&__iob[2]), gettext( "-t option takes 2 or 3 arguments, not %d!\n"), argc-optind);
35982    return (1);
35983   }
35984 
35985   /* if 3rd argument given, it is return value to check */
35986 
35987   if (a == 3) {
35988    rs = atoi(argv[optind+2]);
35989   }
35990   rx = _lockMatch(argv[optind+0], argv[optind+1]);
35991 
35992   /* if 3rd argument not given, code to check is code returned */
35993 
35994   if (a == 2) {
35995    rs = rx;
35996   }
35997 
35998   /* report results */
35999 
36000   if (a == 2) {
36001    (void) fprintf((&__iob[2]), gettext( "result <%d>: <%s> ~= <%s>\n"),
36002     rx, argv[optind+0], argv[optind+1]);
36003    return (rx);
36004   }
36005 
36006   if (rx != rs) {
36007    (void) fprintf((&__iob[2]), gettext( "required <%d> actual <%d> <%30s> ~- <%30s>\n"),
36008     rs, rx, argv[optind+0], argv[optind+1]);
36009   }
36010 
36011   /* always successful */
36012 
36013   return (rx == rs ? 0 : 1);
36014  }
36015 
36016  /* must be no non-option arguments left */
36017 
36018  if ((argc-optind) > 0) {
36019   log_msg(LOG_MSG_ERR, gettext("usage:\n" "\n" "pkgadm addcert  [-ty] [-a app] [-k keystore] [-e keyfile]\n" "\t[-f format] [-n name] [-P passarg] [-p input_passarg]\n" "\t[-R rootpath] certfile\n" "\n" "\t- Adds a trusted CA certificate or user certificate\n" "\tand private key\n" "\n" "pkgadm removecert [-a app] [-k keystore] -n name [-P passarg]\n" "\t[-R rootpath]\n" "\n" "\t- Removes a trusted CA certificate or user certificate\n" "\tand private key\n" "\n" "pkgadm listcert  [-a app] [-f format] [-k keystore] -n name\n" "\t[-P passarg] [-o outfile] [-R rootpath]\n" "\n" "\t- Prints trusted CA certificates or user certificates\n" "\n" "pkgadm dbstatus [-R rootpath]\n" "\n" "\t- Returns 'text' - the text install database in use since Solaris 2.0\n" "\t  is the current install database in use.\n" "\n" "pkgadm sync [-R rootpath] [-q]\n" "\n" "\t- Writes the contents file and rolls the contents log file.\n" "\t- Optionally forces the contents file server to quit [-q].\n" "\n" "pkgadm -V\n" "\t- Displays packaging tools version\n" "\n" "pkgadm -?\n" "\t- Shows this help message\n"));
36020   return (1);
36021  }
36022 
36023  /* -a and -r cannot be used together */
36024 
36025  if (aFlag && rFlag) {
36026   log_msg(LOG_MSG_ERR, gettext( "lock: The -a and -r options cannot be used together: " "specify only one.\n"));
36027   return (1);
36028  }
36029 
36030  /* -e and -s cannot be used together */
36031 
36032  if (eFlag && sFlag) {
36033   log_msg(LOG_MSG_ERR, gettext( "lock: The -e and -s options cannot be used together: " "specify only one.\n"));
36034   return (1);
36035  }
36036 
36037  /* -e can only be used if -a is used */
36038 
36039  if (!aFlag && eFlag) {
36040   log_msg(LOG_MSG_ERR, gettext( "lock: The -e option can only be used with the -a option.\n"));
36041   return (1);
36042  }
36043 
36044  /* -s can only be used if -a is used */
36045 
36046  if (!aFlag && sFlag) {
36047   log_msg(LOG_MSG_ERR, gettext( "lock: The -s option can only be used with the -a option.\n"));
36048   return (1);
36049  }
36050 
36051  /*
36052 	 * perform the requested operation
36053 	 */
36054 
36055  /*
36056 	 * hook SIGINT and SIGHUP interrupts into quit.c's trap handler
36057 	 */
36058 
36059  /* hold SIGINT/SIGHUP interrupts */
36060 
36061  (void) sighold(1);
36062  (void) sighold(2);
36063 
36064  /* connect sigint_handler() to SIGINT */
36065 
36066  nact._funcptr._handler = sigint_handler;
36067  nact.sa_flags = 0x00000004;
36068  (void) sigemptyset(&nact.sa_mask);
36069 
36070  if (sigaction(2, &nact, &oact) < 0) {
36071   funcSigint = (void(*)())0;
36072  } else {
36073   funcSigint = oact._funcptr._handler;
36074  }
36075 
36076  /* connect sighupt_handler() to SIGHUP */
36077 
36078  nact._funcptr._handler = sighup_handler;
36079  nact.sa_flags = 0x00000004;
36080  (void) sigemptyset(&nact.sa_mask);
36081 
36082  if (sigaction(1, &nact, &oact) < 0) {
36083   funcSighup = (void(*)())0;
36084  } else {
36085   funcSighup = oact._funcptr._handler;
36086  }
36087 
36088  /* release hold on signals */
36089 
36090  (void) sigrelse(1);
36091  (void) sigrelse(2);
36092 
36093  /* open the lock file */
36094 
36095  fd = _openLockFile(RFlag);
36096  if (fd < 0) {
36097   return (1);
36098  }
36099 
36100  if (aFlag) {
36101   /* set "exclusive" mode based on -e/-s flag used */
36102 
36103   if (sFlag) {
36104    exclusive = 0;
36105   } else if (eFlag) {
36106    exclusive = 1;
36107   }
36108 
36109   /* acquire lock */
36110 
36111   tResult = lock_acquire(&theLock, &fd, RFlag, kFlag, oFlag,
36112    qFlag, wFlag, WFlag, exclusive, RFlag, pFlag, zFlag);
36113 
36114   switch (tResult) {
36115   case ((FINDLOCK_T)-6):
36116    (void) fprintf((&__iob[1]), "%s\n",
36117     theLock._lrLock.lockKey);
36118    result = 0;
36119    break;
36120   case ((FINDLOCK_T)-4):
36121    (void) fprintf((&__iob[1]), "%s\n",
36122     theLock._lrLock.lockObject);
36123    result = 1;
36124    break;
36125   default:
36126    result = 1;
36127    break;
36128   }
36129 
36130  } else if (rFlag) {
36131   /* release lock */
36132   result = lock_release(fd, kFlag, oFlag, qFlag);
36133  } else {
36134   /* lock status */
36135   result = lock_status(fd, kFlag, oFlag, qFlag);
36136  }
36137 
36138  /* close the lock file */
36139 
36140  (void) close(fd);
36141 
36142  /* return results of operation */
36143 
36144  return (result);
36145 }
36146 
36147 /*
36148  * local main function implementation methods
36149  */
36150 
36151 /*
36152  * Name:	lock_acquire
36153  * Description:	implement lock acquisition implementing the wait/timeouts
36154  *		Calls _lock_acquire to attempt lock acquisition.
36155  * Arguments:
36156  *	a_theLock - lock object filled with contents of existing lock
36157  *	a_fd - file descriptor opened on the lock file
36158  *	a_root - root of file system to manipulate locks on
36159  *	a_key - key associated with lock to acquire
36160  *	a_object - object associated with lock to acquire
36161  *	a_wait - wait if lock cannot be acquired flag:
36162  *			== 0 - do not wait
36163  *			!= 0 - wait
36164  *	a_timeout - timeout if waiting to acquire busy lock:
36165  *			== 0 - no timeout (wait forever)
36166  *			!= 0 - max # seconds to wait to acquire busy lock
36167  *	a_quiet - quiet mode enabled flag
36168  *	a_exclusive - exclusive/shared lock flag
36169  *	a_pid - if != 0 process i.d. to associate with this lock
36170  *	a_zid - if >= 0 - zone i.d. to associate with this lock
36171  * Returns: int
36172  *		== 0 - successful
36173  *		!= 0 - not successful
36174  */
36175 
36176 static FINDLOCK_T
36177 lock_acquire(LOCK_T *a_theLock, int *a_fd, char *a_root, char *a_key,
36178  char *a_object, int a_quiet, int a_wait, long a_timeout,
36179  int a_exclusive, char *a_altRoot, pid_t a_pid, zoneid_t a_zid)
36180 {
36181  int notified = 0;
36182  FINDLOCK_T result;
36183  time_t timeout;
36184  int closeOnExit = 0;
36185 
36186  /* reset the lock */
36187 
36188  bzero(a_theLock, sizeof (LOCK_T));
36189 
36190  /* open file if not open */
36191 
36192  if ((*a_fd) < 0) {
36193   (*a_fd) = _openLockFile(a_altRoot);
36194   if ((*a_fd) < 0) {
36195    return (((FINDLOCK_T)-1));
36196   }
36197   closeOnExit++;
36198  }
36199 
36200  /* compute time after which acquire times out */
36201 
36202  timeout = time((time_t *)0) + a_timeout;
36203 
36204  for (;;) {
36205   time_t curtime;
36206 
36207   /* attempt to aquire the lock */
36208 
36209   result = _lock_acquire(a_theLock, *a_fd, a_key, a_object,
36210     a_quiet, a_exclusive, a_pid, a_zid);
36211 
36212   /* return result if any result other than object is locked */
36213 
36214   switch (result) {
36215   case ((FINDLOCK_T)-6):
36216 
36217    /* close lock file if opened in this function */
36218 
36219    if (closeOnExit) {
36220     (void) close(*a_fd);
36221     *a_fd = -1;
36222    }
36223 
36224    return (((FINDLOCK_T)-6));
36225 
36226   case ((FINDLOCK_T)0):
36227   case ((FINDLOCK_T)-2):
36228   case ((FINDLOCK_T)-3):
36229   case ((FINDLOCK_T)-5):
36230   case ((FINDLOCK_T)-1):
36231   default:
36232    /* close lock file if opened in this function */
36233 
36234    if (closeOnExit) {
36235     (void) close(*a_fd);
36236     *a_fd = -1;
36237    }
36238 
36239    return (result);
36240 
36241   case ((FINDLOCK_T)-4):
36242    ;
36243    /* FALLTHROUGH */
36244   }
36245 
36246   /*
36247 		 * object locked OR SIGINT/SIGHUP interrupt received;
36248 		 * return error if not waiting for lock OR signal received
36249 		 */
36250 
36251   if ((a_wait == 0) || (signal_received != 0)) {
36252    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36253     gettext( "cannot acquire %s lock on <%s> key <%s>: object <%s> is locked <%s>%s"),
36254     a_exclusive ? gettext( "exclusive") : gettext( "shared"),
36255     a_object, a_key,
36256     a_theLock->_lrLock.lockObject,
36257     a_theLock->_lrLock.lockExclusive ?
36258       gettext( "exclusive") : gettext( "shared"),
36259     a_theLock->_lrLock.lockExclusive !=
36260      a_exclusive ? "" :
36261      gettext( " and no key specified"));
36262 
36263    /* close lock file if opened in this function */
36264 
36265    if (closeOnExit) {
36266     (void) close(*a_fd);
36267     *a_fd = -1;
36268    }
36269 
36270    return (((FINDLOCK_T)-4));
36271   }
36272 
36273   /* waiting for lock - if timeout specified see if time left */
36274 
36275   if (a_timeout > 0) {
36276    curtime = time((time_t *)0);
36277    if (curtime > timeout) {
36278     log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36279      gettext( "cannot acquire %s lock on <%s> key <%s>: object locked, no key " "was specified, and the wait timed out"),
36280      a_exclusive ?
36281       gettext( "exclusive") : gettext( "shared"),
36282      a_object, a_key);
36283 
36284     /* close lock file if opened in this function */
36285 
36286     if (closeOnExit) {
36287      (void) close(*a_fd);
36288      *a_fd = -1;
36289     }
36290 
36291     return (((FINDLOCK_T)-1));
36292    }
36293   }
36294 
36295   /*
36296 		 * waiting to aquire lock:
36297 		 * - notify waiting (one time only)
36298 		 * - close lock file
36299 		 * - sleep
36300 		 * - open lock file
36301 		 * - try again
36302 		 */
36303 
36304   /* notify once */
36305 
36306   if (notified++ == 0) {
36307    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_WRN,
36308     gettext( "object <%s> is locked: waiting for object to become available"),
36309     a_object);
36310   }
36311 
36312   /* close lock file */
36313 
36314   (void) close(*a_fd);
36315 
36316   /* wait (sleep) */
36317 
36318   (void) sleep(((unsigned int)(2)));
36319 
36320   /* open the lock file and try again */
36321 
36322   *a_fd = _openLockFile(a_root);
36323   if (*a_fd < 0) {
36324    log_msg(LOG_MSG_ERR, gettext( "cannot reopen lock file after waiting for lock on object " "<%s> to be released"),
36325     a_object);
36326 
36327    /* close lock file if opened in this function */
36328 
36329    if (closeOnExit) {
36330     (void) close(*a_fd);
36331     *a_fd = -1;
36332    }
36333 
36334    return (((FINDLOCK_T)-1));
36335   }
36336  }
36337 }
36338 
36339 /*
36340  * Name:	lock_release
36341  * Description:	implement lock release
36342  * Arguments:
36343  *	a_fd - file descriptor opened on the lock file
36344  *	a_key - key associated with lock to release
36345  *	a_object - object associated with lock to release
36346  *	a_quiet - quiet mode enabled flag
36347  * Returns: int
36348  *		== 0 - successful
36349  *		!= 0 - not successful
36350  */
36351 
36352 static int
36353 lock_release(int a_fd, char *a_key, char *a_object, int a_quiet)
36354 {
36355  RECORDNUM_T recordNum;
36356  LOCK_T theLock;
36357  FINDLOCK_T result;
36358 
36359  /* entry debugging info */
36360 
36361  log_msg(LOG_MSG_DEBUG, gettext( "release lock key=<%s> object=<%s> quiet=<%d>"),
36362   a_key, a_object, a_quiet);
36363 
36364  /* find the lock to be released */
36365 
36366  result = _findLock(&theLock, &recordNum, a_fd, a_object, a_key);
36367 
36368  log_msg(LOG_MSG_DEBUG, gettext( "release lock result <%d> record <%d>"),
36369   result, recordNum);
36370 
36371  /* determine how to release the lock if found */
36372 
36373  switch (result) {
36374   /*
36375 		 * object is not locked but a key was specified
36376 		 */
36377   case ((FINDLOCK_T)-5):
36378    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36379     gettext( "cannot release lock on <%s> key <%s>: object not locked and " "a key was specified"),
36380     a_object, a_key);
36381    return (result);
36382 
36383   /*
36384 		 * object is locked and no matching key was specified
36385 		 */
36386   case ((FINDLOCK_T)-4):
36387    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36388     gettext( "cannot release lock on <%s> key <%s>: object locked but no " "key was specified"),
36389     a_object, a_key);
36390    return (result);
36391 
36392   /*
36393 		 * object is not locked
36394 		 */
36395   case ((FINDLOCK_T)-2):
36396    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36397     gettext( "cannot release lock on <%s> key <%s>: object is not locked"),
36398     a_object, a_key);
36399    return (result);
36400 
36401   /*
36402 		 * object is locked and specified key does not match
36403 		 */
36404   case ((FINDLOCK_T)-3):
36405    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36406     gettext( "cannot release lock on <%s>: object locked and specified key " "does not match"),
36407     a_object);
36408    return (result);
36409 
36410   /*
36411 		 * error determining if object is locked
36412 		 */
36413   case ((FINDLOCK_T)-1):
36414    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36415     gettext( "cannot determine if object <%s> key <%s> is locked"),
36416     a_object, a_key);
36417    perror("/tmp/.ai.pkg.zone.lock-afdb66cf-1dd1-11b2-a049-000d560ddc3e");
36418    return (result);
36419 
36420   /*
36421 		 * object is locked and specified key matches
36422 		 */
36423   case ((FINDLOCK_T)0):
36424    log_msg(LOG_MSG_DEBUG, gettext( "object <%s> key <%s> is locked: decrementing lock count"),
36425     a_object, a_key);
36426    (void) _decrementLockCount(a_fd, &theLock);
36427    break;
36428 
36429   /*
36430 		 * unknown return
36431 		 */
36432   default:
36433    result = ((FINDLOCK_T)-1);
36434    break;
36435 
36436  }
36437  return (result);
36438 }
36439 
36440 /*
36441  * Name:	lock_status
36442  * Description:	implement lock status display/inquiry
36443  * Arguments:
36444  *	a_fd - file descriptor opened on the lock file
36445  *	a_key - key associated with lock to look up
36446  *	a_object - object associated with lock to look up
36447  *	a_quiet - quiet mode enabled flag
36448  * Returns: int
36449  *		== 0 - successful
36450  *		!= 0 - not successful
36451  */
36452 
36453 static int
36454 lock_status(int a_fd, char *a_key, char *a_object, int a_quiet)
36455 {
36456  ADMINLOCK_T *pll;
36457  LOCK_T theLock;
36458  RECORDNUM_T recordNum = 0;
36459  char *pld;
36460  int found = 0;
36461  long pls;
36462 
36463  /* entry debugging info */
36464 
36465  log_msg(LOG_MSG_DEBUG, gettext( "status key=<%s> object=<%s>"),
36466   a_key, a_object);
36467 
36468  /* localize references to lock object */
36469 
36470  pld = &theLock._lrLockData[0];
36471  pll = &theLock._lrLock;
36472  pls = sizeof (theLock._lrLockData);
36473 
36474  bzero(pld, pls);
36475 
36476  /* read and process each lock */
36477 
36478  for (; pread(a_fd, pld, pls, pls*recordNum) == pls; recordNum++) {
36479   /* debug info on this lock */
36480 
36481   log_msg(LOG_MSG_DEBUG, gettext( "status read record <%d>: count <%d> object <%s> key <%s> pid <%ld> " "zid <%ld>"),
36482    recordNum, pll->lockCount,
36483    pll->lockObject, pll->lockKey, pll->lockPid,
36484    pll->lockZoneId);
36485 
36486   /* ignore if key specified and key does not match */
36487 
36488   if ((*a_key != '\0') &&
36489    (strcmp(pll->lockKey, a_key) != 0)) {
36490    continue;
36491   }
36492 
36493   /* ignore if object specified and object does not match */
36494 
36495   if ((*a_object != '\0') &&
36496    (strcmp(pll->lockObject, a_object) != 0)) {
36497    continue;
36498   }
36499 
36500   found++;
36501 
36502   /* process next lock if quiet operation */
36503 
36504   if (a_quiet != 0) {
36505    continue;
36506   }
36507 
36508   /* output header if first lock object */
36509 
36510   if (found == 1) {
36511    (void) fprintf((&__iob[1]),
36512     "%2s %2s %3s %8s %3s %9s %37s %s\n",
36513     "i#", "l#", "cnt", "pid", "zid", "lock-type",
36514     "---------------lock-key-------------",
36515     "lock-object");
36516   }
36517 
36518   /* output status line for this lock object */
36519 
36520   (void) fprintf((&__iob[1]),
36521    "%2ld %2ld %3ld %8ld %3d %9s %37s %s\n",
36522    recordNum, pll->lockRecordNum, pll->lockCount,
36523    pll->lockPid, pll->lockZoneId,
36524    pll->lockExclusive ? gettext( "exclusive") : gettext( "shared"),
36525    pll->lockKey,
36526    *pll->lockObject == '\0' ? "*" : pll->lockObject);
36527  }
36528 
36529  /* return == 0 if found, != 0 if not found */
36530 
36531  return (found == 0 ? 1 : 0);
36532 }
36533 
36534 /*
36535  * local utility functions
36536  */
36537 
36538 /*
36539  * Name:	_lock_acquire
36540  * Description:	implement lock acquisition without wait/timeouts
36541  * Arguments:
36542  *	a_theLock - lock object filled with contents of existing lock
36543  *	a_fd - file descriptor opened on the lock file
36544  *	a_key - key associated with lock to acquire
36545  *	a_object - object associated with lock to acquire
36546  *	a_quiet - quiet mode enabled flag
36547  *	a_exclusive - exclusive/shared lock flag
36548  *	a_pid - if != 0 process i.d. to associate with this lock
36549  *	a_zid - if >= 0 zone i.d. to associate with this lock
36550  * Returns: FINDLOCK_T
36551  */
36552 
36553 static FINDLOCK_T
36554 _lock_acquire(LOCK_T *a_theLock, int a_fd, char *a_key,
36555  char *a_object, int a_quiet, int a_exclusive, pid_t a_pid,
36556  zoneid_t a_zid)
36557 {
36558  RECORDNUM_T recordNum;
36559  FINDLOCK_T result;
36560  char key[37 +1] = {'\0'};
36561 
36562  /* entry debugging info */
36563 
36564  log_msg(LOG_MSG_DEBUG, gettext( "acquire lock key=<%s> object=<%s> quiet=<%d> exclusive=<%d>"),
36565   a_key, a_object, a_quiet, a_exclusive);
36566 
36567  /* is the specified object already locked? */
36568 
36569  for (;;) {
36570   result = _findLock(a_theLock, &recordNum, a_fd, a_object,
36571    a_key);
36572 
36573   if (result != ((FINDLOCK_T)-4)) {
36574    break;
36575   }
36576 
36577   if (_validateLock(a_fd, a_theLock, a_quiet) == B_TRUE) {
36578    break;
36579   }
36580  }
36581 
36582 
36583  /* debug info on result of find of lock */
36584 
36585  log_msg(LOG_MSG_DEBUG, gettext( "acquire %s lock result <%d> record <%d>"),
36586   a_exclusive ? gettext( "exclusive") : gettext( "shared"),
36587   result, recordNum);
36588 
36589  /* determine how to acquire the lock */
36590 
36591  switch (result) {
36592   /*
36593 		 * object is not locked but a key was specified
36594 		 */
36595   case ((FINDLOCK_T)-5):
36596    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36597     gettext( "cannot acquire %s lock on <%s> key <%s>: object not locked " "and non-matching key specified"),
36598     a_exclusive ? gettext( "exclusive") : gettext( "shared"),
36599     a_object, a_key);
36600    break;
36601 
36602   /*
36603 		 * object is locked and no key was specified:
36604 		 * - if lock is exclusively held, return "locked"
36605 		 * - if exclusive lock requested, return "locked"
36606 		 * - otherwise lock is shared and shared lock requested,
36607 		 *   - increment lock count and return the key
36608 		 */
36609   case ((FINDLOCK_T)-4):
36610    /* return error if current lock exclusive */
36611 
36612    if (a_theLock->_lrLock.lockExclusive) {
36613     break;
36614    }
36615 
36616    /* return error if requesting exclusive lock */
36617 
36618    if (a_exclusive) {
36619     break;
36620    }
36621 
36622    /* shared requesting shared - add to shared lock */
36623 
36624    log_msg(LOG_MSG_DEBUG,
36625     gettext( "object <%s> key <%s> is locked but shared: incrementing lock count"),
36626     a_object, a_key);
36627 
36628    /* increment shared lock count */
36629 
36630    if (_incrementLockCount(a_fd, a_theLock) == 0) {
36631     result = ((FINDLOCK_T)-6);
36632    } else {
36633     result = ((FINDLOCK_T)-1);
36634    }
36635 
36636    break;
36637 
36638   /*
36639 		 * object is not locked
36640 		 */
36641   case ((FINDLOCK_T)-2):
36642    log_msg(LOG_MSG_DEBUG,
36643     gettext( "acquiring %s lock on object <%s>"),
36644     a_exclusive ? gettext( "exclusive") : gettext( "shared"),
36645     a_object);
36646 
36647    if (_addLock(key, a_fd, a_object, a_exclusive,
36648        a_pid, a_zid) == 0) {
36649     (void) strncpy(a_theLock->_lrLock.lockKey, key,
36650      sizeof (a_theLock->_lrLock.lockKey));
36651     result = ((FINDLOCK_T)-6);
36652    } else {
36653     result = ((FINDLOCK_T)-1);
36654    }
36655    break;
36656 
36657   /*
36658 		 * object is locked, key specified, specified key does not match
36659 		 */
36660   case ((FINDLOCK_T)-3):
36661    log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_ERR,
36662     gettext( "cannot acquire %s lock on <%s>: object locked and specified key " "does not match"),
36663     a_exclusive ? gettext( "exclusive") : gettext( "shared"),
36664     a_object);
36665    break;
36666 
36667   /*
36668 		 * error determining if object is locked
36669 		 */
36670   case ((FINDLOCK_T)-1):
36671    log_msg(LOG_MSG_ERR, gettext( "cannot determine if object <%s> key <%s> is locked: %s"),
36672     a_object, a_key, strerror((*(___errno()))));
36673    break;
36674 
36675   /*
36676 		 * object is locked and specified key matches
36677 		 */
36678   case ((FINDLOCK_T)0):
36679    /* return locked if object currently locked */
36680    if (a_exclusive != a_theLock->_lrLock.lockExclusive) {
36681     result = ((FINDLOCK_T)-4);
36682     break;
36683    }
36684 
36685    log_msg(LOG_MSG_DEBUG, gettext( "object <%s> key <%s> is locked: incrementing <%s> lock count"),
36686     a_object, a_key,
36687     a_exclusive ? gettext( "exclusive") : gettext( "shared"));
36688 
36689    /* increment shared lock */
36690 
36691    if (_incrementLockCount(a_fd, a_theLock) == 0) {
36692     result = ((FINDLOCK_T)-6);
36693    } else {
36694     result = ((FINDLOCK_T)-1);
36695    }
36696    break;
36697 
36698   /*
36699 		 * unknown return
36700 		 */
36701   default:
36702    result = ((FINDLOCK_T)-1);
36703    break;
36704  }
36705 
36706  return (result);
36707 }
36708 
36709 /*
36710  * Name:	_openLockFile
36711  * Description:	open the lock file, acquiring exclusive record locks
36712  * Arguments:
36713  *	a_root - root of file system to manipulate locks on
36714  * Returns: int
36715  *		>= 0 - successful - file descriptor lock file opened on
36716  *		< 0 - not successful
36717  */
36718 
36719 static int
36720 _openLockFile(char *a_root)
36721 {
36722  WAITER_T waiter;
36723  char lockpath[1024];
36724  int fd;
36725  int result;
36726 
36727  /* entry debugging info */
36728 
36729  log_msg(LOG_MSG_DEBUG, gettext( "open lock file root <%s> file <%s>"),
36730   a_root, "/tmp/.ai.pkg.zone.lock-afdb66cf-1dd1-11b2-a049-000d560ddc3e");
36731 
36732  /* generate path to lock directory */
36733 
36734  (void) snprintf(lockpath, sizeof (lockpath), "%s/%s",
36735   a_root, "/tmp");
36736 
36737  if (access(lockpath, 0) != 0) {
36738   log_msg(LOG_MSG_ERR, gettext( "lock: lock file base directory <%s> not valid: %s\n"),
36739    lockpath, strerror((*(___errno()))));
36740   return (-1);
36741  }
36742 
36743  /* generate path to lock file */
36744 
36745  (void) snprintf(lockpath, sizeof (lockpath),
36746   "%s/%s", a_root, "/tmp/.ai.pkg.zone.lock-afdb66cf-1dd1-11b2-a049-000d560ddc3e");
36747 
36748  /* wait for open to succeed up to limits */
36749 
36750  for (waiter = ((unsigned int)(1));
36751   waiter < ((unsigned int)(60));
36752   waiter = ((waiter)*2)) {
36753 
36754   /* LINTED O_CREAT without O_EXCL specified in call to open() */
36755   fd = open(lockpath, 0x100|2, (0x400|00400|00200|00040|00020|00004|00002));
36756 
36757   /* break out of loop if file opened */
36758 
36759   if (fd >= 0) {
36760    break;
36761   }
36762 
36763   /* failed - exit loop if due to access (permissions) failure */
36764 
36765   if ((*(___errno())) == 13) {
36766    break;
36767   }
36768 
36769   /* file is busy - wait and try again */
36770 
36771   if (waiter == ((unsigned int)(1))) {
36772    log_msg(LOG_MSG_DEBUG,
36773     gettext( "open lock file busy <%s>: sleeping <%d>"),
36774     strerror((*(___errno()))), waiter);
36775   }
36776 
36777   (void) sleep(waiter);
36778  }
36779 
36780  /* if open filed generate error message and return error */
36781 
36782  if (fd < 0) {
36783   log_msg(LOG_MSG_DEBUG, gettext( "open lock file could not be opened: %s"),
36784    strerror((*(___errno()))));
36785   perror(lockpath);
36786   return (-1);
36787  }
36788 
36789  /*
36790 	 * lock file opened - acquire exclusive section lock on entire file;
36791 	 * wait for lockf to succeed up to limits
36792 	 */
36793 
36794  for (waiter = ((unsigned int)(1));
36795   waiter < ((unsigned int)(60));
36796   waiter = ((waiter)*2)) {
36797 
36798   /* acquire exclusive section lock on entire file */
36799 
36800   result = lockf(fd, 1, 0xFFFFF);
36801 
36802   /* break out of loop if entire file locked */
36803 
36804   if (result == 0) {
36805    break;
36806   }
36807 
36808   /* file is busy - wait and try again */
36809 
36810   if (waiter == ((unsigned int)(1))) {
36811    log_msg(LOG_MSG_DEBUG, gettext( "open lock file cannot obtain record lock <%s>: sleeping <%d>"),
36812     strerror((*(___errno()))), waiter);
36813   }
36814 
36815   (void) sleep(waiter);
36816  }
36817 
36818  /* if section lock failed generate error message and return error */
36819 
36820  if (result < 0) {
36821   log_msg(LOG_MSG_DEBUG, gettext( "open lock file could not obtain record lock: <%s>"),
36822    strerror((*(___errno()))));
36823   perror(lockpath);
36824   (void) close(fd);
36825   return (-1);
36826  }
36827 
36828  /* file opened and locked - return success */
36829 
36830  log_msg(LOG_MSG_DEBUG, gettext( "open lock file: opened and locked fd <%d>"), fd);
36831 
36832  return (fd);
36833 }
36834 
36835 /*
36836  * Name:	_lockMatch
36837  * Description:	Compare two lock objects using file name match criteria
36838  * Arguments:
36839  *	a_s1Lock - first lock object to compare against the second
36840  *	a_s2Lock - second lock object to compare against the first
36841  * Returns:
36842  * 	== 0 - the locks match at some level
36843  *	!= 0 - the locks do not match at any level
36844  */
36845 
36846 static int
36847 _lockMatch(char *a_s1Lock, char *a_s2Lock)
36848 {
36849  boolean_t s1Sfx = B_FALSE;
36850  boolean_t s2Sfx = B_FALSE;
36851  char *final1Lock = (char *)0;
36852  char *final2Lock = (char *)0;
36853  char s1Buf[1024] = {'\0'};
36854  char s1Prefix[1024] = {'\0'};
36855  char s2Buf[1024] = {'\0'};
36856  char s2Prefix[1024] = {'\0'};
36857  int result = 0;
36858  int s1Cnt;
36859  int s2Cnt;
36860 
36861  /* entry assertions */
36862 
36863  (void)((a_s1Lock != (char *)0) || (__assert("a_s1Lock != (char *)NULL", "lock.c", 1304), 0));
36864  (void)((a_s2Lock != (char *)0) || (__assert("a_s2Lock != (char *)NULL", "lock.c", 1305), 0));
36865 
36866  /* entry debugging info */
36867 
36868  log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: *** BEGIN *** compare objects <%s> <%s>"), a_s1Lock, a_s2Lock);
36869 
36870  /*
36871 	 * attempt to find a common anchor between the two locks; that is,
36872 	 * find the first node in the first lock that matches any node
36873 	 * in the second lock; for example:
36874 	 * --> a/b/c vs b/c/d
36875 	 * -> common anchor is "b"; comparison would expand to:
36876 	 * --> a/b/c/? vs ?/b/c/d
36877 	 */
36878 
36879  /* process each node in the first lock */
36880 
36881  for (s1Cnt = 0; ; s1Cnt++) {
36882   /* get next first lock node */
36883 
36884   pkgstrGetToken_r((char *)0, a_s1Lock, s1Cnt, "/",
36885    s1Buf, sizeof (s1Buf));
36886 
36887   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: first lock node (%d) <%s>"), s1Cnt, s1Buf);
36888 
36889   /* exit if no more nodes left */
36890 
36891   if (s1Buf[0] == '\0') {
36892    break;
36893   }
36894 
36895   /* discover "." prefix for this node */
36896 
36897   pkgstrGetToken_r((char *)0, s1Buf, 0, ".", s1Prefix,
36898    sizeof (s1Prefix));
36899 
36900   s1Sfx = (strlen(s1Prefix) == strlen(s1Buf) ? B_FALSE : B_TRUE);
36901 
36902   /* search each second lock node; look for the first node lock */
36903 
36904   for (s2Cnt = 0; ; s2Cnt++) {
36905    /* get next second lock node */
36906 
36907    pkgstrGetToken_r((char *)0, a_s2Lock, s2Cnt, "/",
36908     s2Buf, sizeof (s2Buf));
36909 
36910    log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: second lock node (%d) <%s>"), s2Cnt,
36911     s2Buf);
36912 
36913    /* exit if no nodes left */
36914 
36915    if (s2Buf[0] == '\0') {
36916     break;
36917    }
36918 
36919    /* discover "." prefix for this node */
36920 
36921    pkgstrGetToken_r((char *)0, s2Buf, 0, ".", s2Prefix,
36922     sizeof (s2Prefix));
36923 
36924    s2Sfx = (strlen(s2Prefix) ==
36925      strlen(s2Buf) ? B_FALSE : B_TRUE);
36926 
36927    /*
36928 			 * process this pair of nodes:
36929 			 * if both nodes do not have a prefix, then directly
36930 			 * compare the nodes (e.g. a/b vs c/d: a vs c, b vs d)
36931 			 * and break out of the loop if there is a match;
36932 			 * otherwise, compare prefixes and break out of the
36933 			 * loop if there is a match (e.g. a.* / b.* vs
36934 			 * vs c.* / d.*: a.* vs c.*, a.* vs d.*, b.* vs c.*,
36935 			 * b.* vs d.*).
36936 			 */
36937 
36938    log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: first lock node <%s> prefix <%s> (%d) second lock " " node <%s> prefix <%s> (%d)"), s1Buf,
36939     s1Prefix, s1Sfx, s2Buf, s2Prefix, s2Sfx);
36940 
36941    if ((s1Sfx == B_FALSE) || (s2Sfx == B_FALSE)) {
36942     /* one doesnt have a prefix direct comparison */
36943 
36944     if (strcmp(s1Buf, s2Buf) == 0) {
36945      log_msg(LOG_MSG_DEBUG,
36946       gettext( "lockMatch: no prefix direct comparison: match: <%s> <%s>"),
36947       s1Buf, s2Buf);
36948      break;
36949     }
36950 
36951     /* nodes do not directly match, continue */
36952 
36953     log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: no prefix direct comparison: NO MATCH: <%s> <%s>"),
36954       s1Buf, s2Buf);
36955     continue;
36956    }
36957 
36958    /* both have prefix, compare prefixes */
36959 
36960    if (strcmp(s1Prefix, s2Prefix) == 0) {
36961     log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: prefix comparison: match: <%s> <%s>"),
36962      s1Prefix, s2Prefix);
36963     break;
36964    }
36965 
36966    /* prefixes do not match, continue */
36967 
36968    log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: prefix comparison: NO MATCH: <%s> <%s>"), s1Prefix,
36969     s2Prefix);
36970   }
36971 
36972   /*
36973 		 * match found if not at the end of the second lock node list,
36974 		 * break out of loop because some match between the two lock
36975 		 * objects has been found
36976 		 */
36977 
36978   if (s2Buf[0] != '\0') {
36979    break;
36980   }
36981  }
36982 
36983  /*
36984 	 * at this point, either a match has been found between the nodes in
36985 	 * the two lock objects, or there is no commonality at all between
36986 	 * the two lock objects.
36987 	 *
36988 	 * s1Buf[0] == '\0' && s2Buf[0] == '\0':
36989 	 * --> nothing in first lock matches anything in second lock:
36990 	 * ----> (s1Cnt == 1) || (s2Cnt == 1) && (s1Sfx == B_FALSE)
36991 	 * ----> || (s2Sfx == B_FALSE)
36992 	 * --------> an absolute lock do not match
36993 	 * ----> else both object locks have nothing in common - match
36994 	 *
36995 	 * s2Buf[0] != '\0' && s1Buf[0] != '\0' && s1Cnt > 0 && s2Cnt > 0
36996 	 * --> locks have incompatible overlaps - no match, such as:
36997 	 * ---->  a.* / b.* / c.* / d.*   and   y.* / b.* / c.*
36998 	 *
36999 	 * s1Cnt == 0 && s2Cnt == 0:
37000 	 * --> locks begin with same node - do comparison
37001 	 *
37002 	 * s1Cnt != 0 && s2Cnt == 0 && s2Buf[0] != '\0'
37003 	 * --> second lock is subset of first lock
37004 	 *
37005 	 * s2Cnt == 0 && s2Buf[0] != '\0':
37006 	 * --> s1Buf[s1Cnt] matches s2Buf[0] - second is subset of first
37007 	 *
37008 	 * s2Cnt != 0 && s1Cnt == 0 && s1Buf[0] != '\0':
37009 	 * --> first lock is subset of second lock
37010 	 *
37011 	 */
37012 
37013  log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: first lock index (%d) last scanned node <%s> prefix " "<%s> (%d)"), s1Cnt, s1Buf,
37014   s1Prefix, s1Sfx);
37015  log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: second lock index (%d) last scanned node <%s> prefix " "<%s> (%d)"), s2Cnt, s2Buf,
37016   s2Prefix, s2Sfx);
37017 
37018  /* process any direct comparisons that might be possible */
37019 
37020  if ((s1Buf[0] == '\0') && (s2Buf[0] == '\0')) {
37021   /* nothing in first matches anything in second lock */
37022 
37023   if (((s1Cnt == 1) || (s2Cnt == 1)) &&
37024    ((s1Sfx == B_FALSE) || (s2Sfx == B_FALSE))) {
37025    /* two absolute locks match (e.g. 'file' and 'dir') */
37026    log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: absolute locks: NO MATCH: <%s> <%s>"), a_s1Lock,
37027     a_s2Lock);
37028    return (1);
37029   }
37030 
37031   /* two object locks have nothing in common: match */
37032 
37033   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: object locks: match: <%s> <%s>"), a_s1Lock, a_s2Lock);
37034 
37035   return (0);
37036  }
37037 
37038  if ((s2Buf[0] != '\0') && (s1Buf[0] != '\0') &&
37039       (s1Cnt > 0) && (s2Cnt > 0)) {
37040   /* incompatible overlapping objects */
37041 
37042   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: nonmatching overlapping objects: <%s> <%s> before " "(%d) <%s>"), a_s1Lock, a_s2Lock,
37043    s1Cnt+1, s1Buf);
37044 
37045   return (1);
37046  }
37047 
37048  /*
37049 	 * must compare each node of each lock to determine match;
37050 	 * start off at the first byte of both locks
37051 	 */
37052 
37053  final1Lock = a_s1Lock;
37054  final2Lock = a_s2Lock;
37055 
37056  if ((s1Cnt == 0) && (s2Cnt == 0)) {
37057   /* both have first match - start comparison from the begining */
37058 
37059   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: locks begin with same node - compare: <%s> <%s> at <%s>"), a_s1Lock, a_s2Lock,
37060    s1Buf);
37061 
37062  } else if ((s1Cnt != 0) && (s2Cnt == 0) && (s2Buf[0] != '\0')) {
37063   /* second lock begins somewhere inside of the first lock */
37064 
37065   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: second lock <%s> subset of <%s> at (%d) <%s>"), a_s2Lock, a_s1Lock,
37066    s1Cnt+1, s1Buf);
37067 
37068   /* advance first lock to matching node in second lock */
37069 
37070   if (strchr(a_s1Lock, '/') != (char *)0) {
37071    for (; s1Cnt > 0 && (*final1Lock != '\0');
37072     final1Lock++) {
37073     if (*final1Lock == '/') {
37074      s1Cnt--;
37075     }
37076    }
37077   }
37078  } else if ((s2Cnt != 0) && (s1Cnt == 0) && (s1Buf[0] != '\0')) {
37079   /* first lock begins somewhere inside of the second lock */
37080 
37081   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: first lock <%s> subset of <%s> at (%d) <%s>"), a_s1Lock, a_s2Lock,
37082    s2Cnt+1, s2Buf);
37083 
37084   /* advance second lock to matching node in first lock */
37085 
37086   if (strchr(a_s2Lock, '/') != (char *)0) {
37087    for (; s2Cnt > 0 && (*final2Lock != '\0');
37088     final2Lock++) {
37089     if (*final2Lock == '/') {
37090      s2Cnt--;
37091     }
37092    }
37093   }
37094  } else {
37095   /* unknown condition (probably impossible): directly compare */
37096 
37097   log_msg(LOG_MSG_ERR, gettext( "lockMatch: unable to determine how to compare locks: <%s> <%s>: " "using direct comparision"), a_s1Lock, a_s2Lock);
37098  }
37099 
37100  /*
37101 	 * locks have common node - compare from that node forward
37102 	 */
37103 
37104  log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: comparing nodes locks <%s> <%s>"), final1Lock, final2Lock);
37105 
37106  /* compare each node (prefix) - success when no more nodes to compare */
37107 
37108  for (s1Cnt = 0; ; s1Cnt++) {
37109   /* get next node from first lock */
37110 
37111   pkgstrGetToken_r((char *)0, final1Lock, s1Cnt, "/", s1Buf,
37112    sizeof (s1Buf));
37113 
37114   /* success if at end of lock */
37115 
37116   if (s1Buf[0] == '\0') {
37117    break;
37118   }
37119 
37120   /* get next node from second lock */
37121 
37122   pkgstrGetToken_r((char *)0, final2Lock, s1Cnt, "/", s2Buf,
37123    sizeof (s2Buf));
37124 
37125   /* success if at end of lock */
37126 
37127   if (s2Buf[0] == '\0') {
37128    break;
37129   }
37130 
37131   /* compare both nodes */
37132 
37133   result = fnmatch(s1Buf, s2Buf, 0);
37134   if (result != 0) {
37135    result = fnmatch(s2Buf, s1Buf, 0);
37136   }
37137 
37138   /* failure if nodes do not match */
37139 
37140   if (result != 0) {
37141    log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: node (%d) comparison: NO MATCH: <%s> != <%s>"),
37142     s1Cnt, s1Buf, s2Buf);
37143    return (1);
37144   }
37145 
37146   /* nodes match, continue and compare next set of nodes */
37147 
37148   log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: node (%d) comparision: match: <%s> == <%s>"), s1Cnt, s1Buf, s2Buf);
37149  }
37150 
37151  /* no more nodes to compare - locks match */
37152 
37153  log_msg(LOG_MSG_DEBUG, gettext( "lockMatch: locks match: <%s> == <%s>"), final1Lock, final2Lock);
37154 
37155  return (0);
37156 }
37157 
37158 /*
37159  * Name:	_findLock
37160  * Description:	Locate specified lock in lock file
37161  * Arguments:
37162  *	a_theLock - lock object filled with contents of lock (if found)
37163  *	r_recordNum - will contain record number if lock found
37164  *		- will be RECORDNUM_NONE if lock not found
37165  *	a_fd - file descriptor opened on the lock file
37166  *	a_key - key associated with lock to look up
37167  *	a_object - object associated with lock to look up
37168  * Returns:
37169  *	FINDLOCK_FOUND - specified lock found; a_theLock contains contents
37170  *		of found lock, r_recordNum contain record number of lock
37171  *	FINDLOCK_ERROR - failed - error occurred looking up the lock
37172  *	FINDLOCK_NOTFOUND - specified object is not locked
37173  *	FINDLOCK_KEYMISMATCH - object lock found but specified key doesnt match
37174  *	FINDLOCK_LOCKED - object lock found but no key specified
37175  *	FINDLOCK_NOTLOCKED - object not locked
37176  */
37177 
37178 static FINDLOCK_T
37179 _findLock(LOCK_T *a_theLock, RECORDNUM_T *r_recordNum,
37180  int a_fd, char *a_object, char *a_key)
37181 {
37182  ADMINLOCK_T *pll;
37183  char *pld;
37184  int recordNum = 0;
37185  long pls;
37186  off_t pos;
37187 
37188  /* reset returned record number to "none" */
37189 
37190  *r_recordNum = 0xFFFFFFFF;
37191 
37192  /* localize references to lock object */
37193 
37194  pld = &a_theLock->_lrLockData[0];
37195  pll = &a_theLock->_lrLock;
37196  pls = sizeof (a_theLock->_lrLockData);
37197 
37198  /* zero out returned lock data */
37199 
37200  bzero(pld, pls);
37201 
37202  /* debug info before processing lock file */
37203 
37204  log_msg(LOG_MSG_DEBUG, gettext( "find lock object <%s> key <%s>"),
37205   a_object, a_key);
37206 
37207  /* rewind to beginning of lock file */
37208 
37209  pos = lseek(a_fd, 0L, 0);
37210  if (pos == (off_t)-1) {
37211   log_msg(LOG_MSG_ERR, gettext( "cannot find lock <%s> key <%s>: lseek failure: %s"),
37212    a_object, a_key, strerror((*(___errno()))));
37213   return (((FINDLOCK_T)-1));
37214  }
37215 
37216  /* read and process each lock */
37217 
37218  for (; pread(a_fd, pld, pls, pls*recordNum) == pls; recordNum++) {
37219   /* debug info on this lock */
37220 
37221   log_msg(LOG_MSG_DEBUG, gettext( "find lock read record <%d>: count <%d> object <%s> key <%s> pid " "<%ld> zid <%ld>"),
37222    recordNum, pll->lockCount,
37223    pll->lockObject, pll->lockKey, pll->lockPid,
37224    pll->lockZoneId);
37225 
37226   /* continue if object is not the one we are looking for */
37227 
37228   if (_lockMatch(a_object, pll->lockObject) != 0) {
37229    continue;
37230   }
37231 
37232   /*
37233 		 * object found; return locked if searching for no key
37234 		 */
37235 
37236   if (*a_key == '\0') {
37237    /* no key specified - object is locked */
37238    *r_recordNum = recordNum;
37239    return (((FINDLOCK_T)-4));
37240   }
37241 
37242   /*
37243 		 * object found and keys present; see if keys match
37244 		 */
37245 
37246   if (strcmp(pll->lockKey, a_key) != 0) {
37247    /* keys do not match */
37248    *r_recordNum = recordNum;
37249    return (((FINDLOCK_T)-3));
37250   }
37251 
37252   /* object found and keys match - return match */
37253 
37254   log_msg(LOG_MSG_DEBUG, gettext( "find lock record found"));
37255 
37256   *r_recordNum = recordNum;
37257   return (((FINDLOCK_T)0));
37258  }
37259 
37260  /* object not locked - return error if key supplied */
37261 
37262  if (*a_key != '\0') {
37263   return (((FINDLOCK_T)-5));
37264  }
37265 
37266  /* object not locked and key not supplied - no lock found */
37267 
37268  log_msg(LOG_MSG_DEBUG, gettext( "find lock record not found"));
37269 
37270  return (((FINDLOCK_T)-2));
37271 }
37272 
37273 /*
37274  * Name:	_addLock
37275  * Description:	Add a new lock to the lock file
37276  * Arguments:
37277  *	r_key - if lock acquired key is placed here
37278  *	a_fd - file descriptor opened on the lock file
37279  *	a_object - object to lock
37280  *	a_exclusive - type of lock to add:
37281  *		== 0 - shared lock
37282  *		!= 0 - exclusive lock
37283  *	a_pid - if != 0 process i.d. to associate with this lock
37284  *	a_zid - if >= 0 zone i.d. to associate with this lock
37285  * Returns:	int
37286  *			== 0 - success
37287  *			!= 0 - failure
37288  */
37289 
37290 static int
37291 _addLock(char *r_key, int a_fd, char *a_object, int a_exclusive, pid_t a_pid,
37292  zoneid_t a_zid)
37293 {
37294  LOCK_T theLock;
37295  char *key;
37296  off_t pos;
37297  ssize_t result;
37298 
37299  /* get unique i.d. for this lock */
37300 
37301  key = _getUniqueId();
37302 
37303  /* determine record number for next record in lock file */
37304 
37305  pos = lseek(a_fd, 0L, 2);
37306  if (pos == (off_t)-1) {
37307   log_msg(LOG_MSG_ERR, gettext( "cannot create %s lock for object <%s>: lseek failure: %s"),
37308    a_exclusive ? gettext( "exclusive") : gettext( "shared"),
37309    a_object, strerror((*(___errno()))));
37310   return (1);
37311  }
37312 
37313  /* allocate storace for this lock */
37314 
37315  bzero(&theLock, sizeof (theLock));
37316 
37317  /* fill in components of the lock */
37318 
37319  (void) strlcpy(theLock._lrLock.lockObject, a_object,
37320        512-1);
37321  (void) strlcpy(theLock._lrLock.lockKey, key, 37);
37322  theLock._lrLock.lockCount = 1;
37323  theLock._lrLock.lockPid = (a_pid > 0 ? a_pid : 0);
37324  theLock._lrLock.lockRecordNum = (pos == 0 ? 0 : (pos/sizeof (LOCK_T)));
37325  theLock._lrLock.lockExclusive = a_exclusive;
37326  theLock._lrLock.lockZoneId = (a_zid >= 0 ? a_zid : -1);
37327 
37328  /* debug info on new lock */
37329 
37330  log_msg(LOG_MSG_DEBUG, gettext( "adding %s lock pos <%d> object <%s> key <%s> pid <%ld> zid <%ld>"),
37331   a_exclusive ? gettext( "exclusive") : gettext( "shared"),
37332   pos, theLock._lrLock.lockObject, theLock._lrLock.lockKey,
37333   theLock._lrLock.lockPid, theLock._lrLock.lockZoneId);
37334 
37335  /* write the new lock record to the end of the lock file */
37336 
37337  result = pwrite(a_fd, &theLock, sizeof (ADMINLOCK_T), pos);
37338  if (result != sizeof (ADMINLOCK_T)) {
37339   log_msg(LOG_MSG_ERR, gettext( "cannot create %s lock for object <%s>: pwrite failure: %s"),
37340    a_exclusive ? gettext( "exclusive") : gettext( "shared"),
37341    a_object, strerror((*(___errno()))));
37342   return (1);
37343  }
37344 
37345  /* output the key assigned to standard out */
37346 
37347  (void) strncpy(r_key, key, 37);
37348 
37349  return (0);
37350 }
37351 
37352 static int
37353 _incrementLockCount(int a_fd, LOCK_T *a_theLock)
37354 {
37355  ADMINLOCK_T *pll;
37356  char *pld;
37357  long pls;
37358  ssize_t result;
37359 
37360  /* localize references to lock object */
37361 
37362  pld = &a_theLock->_lrLockData[0];
37363  pll = &a_theLock->_lrLock;
37364  pls = sizeof (a_theLock->_lrLockData);
37365 
37366  /* debug info on incrementing lock */
37367 
37368  log_msg(LOG_MSG_DEBUG, gettext( "increment <%s> lock count record <%d> count <%d>"),
37369   a_theLock->_lrLock.lockExclusive ?
37370     gettext( "exclusive") : gettext( "shared"),
37371   pll->lockRecordNum, pll->lockCount);
37372 
37373  /* increment lock count */
37374 
37375  pll->lockCount++;
37376 
37377  /* write out updated lock */
37378 
37379  result = pwrite(a_fd, pld, pls, pll->lockRecordNum*pls);
37380  if (result != pls) {
37381   log_msg(LOG_MSG_ERR, gettext( "cannot increment %s lock for object <%s>: pwrite failure: %s"),
37382    a_theLock->_lrLock.lockExclusive ?
37383      gettext( "exclusive") : gettext( "shared"),
37384    a_theLock->_lrLock.lockObject,
37385    strerror((*(___errno()))));
37386   return (1);
37387  }
37388 
37389  /* debug info lock incremented */
37390 
37391  log_msg(LOG_MSG_DEBUG, gettext( "increment lock record <%d> count <%d> object <%s> key <%s>"),
37392   pll->lockRecordNum, pll->lockCount,
37393   pll->lockObject, pll->lockKey);
37394 
37395  return (0);
37396 }
37397 
37398 /*
37399  * Name:	_validateLock
37400  * Description:	determine if a specified lock is valid; if the lock is not valid
37401  *		then remove the lock
37402  * Arguments:	a_fd - file descriptor opened on the lock file
37403  *		a_theLock - lock object to validate
37404  * Returns:	boolean_t
37405  *			B_TRUE - the lock is valid
37406  *			B_FALSE - the lock is not valid and has been removed
37407  */
37408 
37409 static boolean_t
37410 _validateLock(int a_fd, LOCK_T *a_theLock, int a_quiet)
37411 {
37412  ADMINLOCK_T *pll;
37413  char *pld;
37414  long pls;
37415  char path[1024];
37416 
37417  /* localize references to lock object */
37418 
37419  pld = &a_theLock->_lrLockData[0];
37420  pll = &a_theLock->_lrLock;
37421  pls = sizeof (a_theLock->_lrLockData);
37422 
37423  /* return true if no process i.d. associated with lock */
37424 
37425  if (pll->lockPid <= 0) {
37426   log_msg(LOG_MSG_DEBUG, gettext( "validate lock <%s>: VALID (no pid)"), pll->lockObject);
37427   return (B_TRUE);
37428  }
37429 
37430  /* see if the zone i.d. matches */
37431 
37432  if (pll->lockZoneId != getzoneid()) {
37433   log_msg(LOG_MSG_DEBUG, gettext( "validate lock <%s>: VALID (lock zid <%ld> this zid <%ld>)"), pll->lockObject,
37434   pll->lockZoneId, getzoneid());
37435   return (B_TRUE);
37436  } else {
37437   log_msg(LOG_MSG_DEBUG, gettext( "validate lock <%s>: zone i.d.s match (lock zid <%ld> this zid <%ld>)"), pll->lockObject,
37438   pll->lockZoneId, getzoneid());
37439  }
37440 
37441  /* see if the process is still active */
37442 
37443  pkgstrPrintf_r(path, sizeof (path), "/proc/%d", pll->lockPid);
37444  if (access(path, 0) == 0) {
37445   log_msg(LOG_MSG_DEBUG, gettext( "validate lock <%s> pid <%ld> path <%s>: VALID"), pll->lockObject,
37446    pll->lockPid, path);
37447   return (B_TRUE);
37448  }
37449 
37450  log_msg(LOG_MSG_DEBUG, gettext( "validate lock <%s> pid <%ld> path <%s>: NOT VALID"), pll->lockObject, pll->lockPid,
37451   path);
37452 
37453  /* delete this lock */
37454 
37455  log_msg(a_quiet ? LOG_MSG_DEBUG : LOG_MSG_WRN,
37456   gettext( "Removing stale lock on <%s> pid <%ld> zid <%ld>"), pll->lockObject, pll->lockPid,
37457   pll->lockZoneId);
37458 
37459  _decrementLockCount(a_fd, a_theLock);
37460 
37461  return (B_FALSE);
37462 }
37463 
37464 static int
37465 _decrementLockCount(int a_fd, LOCK_T *a_theLock)
37466 {
37467  ADMINLOCK_T *pll;
37468  LOCK_T tmpLock;
37469  RECORDNUM_T lastRecord;
37470  char *pld;
37471  long pls;
37472  off_t lastPos;
37473  ssize_t result;
37474  int res;
37475 
37476  /* localize references to lock object */
37477 
37478  pld = &a_theLock->_lrLockData[0];
37479  pll = &a_theLock->_lrLock;
37480  pls = sizeof (a_theLock->_lrLockData);
37481 
37482  /* decrement lock count */
37483 
37484  pll->lockCount--;
37485 
37486  /* if lock count > 0 then write out and leave locked */
37487 
37488  if (pll->lockCount > 0) {
37489   log_msg(LOG_MSG_DEBUG, gettext( "decrement <%s> lock count record <%d> count <%d>"),
37490    a_theLock->_lrLock.lockExclusive ?
37491     gettext( "exclusive") : gettext( "shared"),
37492    pll->lockRecordNum, pll->lockCount);
37493 
37494   result = pwrite(a_fd, pld, pls, pll->lockRecordNum*pls);
37495   if (result != pls) {
37496    log_msg(LOG_MSG_ERR, gettext( "cannot decrement %s lock for object <%s>: pwrite failure: %s"),
37497     a_theLock->_lrLock.lockExclusive ?
37498       gettext( "exclusive") : gettext( "shared"),
37499     a_theLock->_lrLock.lockObject,
37500     strerror((*(___errno()))));
37501    return (1);
37502   }
37503 
37504   log_msg(LOG_MSG_DEBUG, gettext( "decrement lock record <%d> count <%d> object <%s> key <%s>"),
37505    pll->lockRecordNum, pll->lockCount,
37506    pll->lockObject, pll->lockKey);
37507 
37508   return (0);
37509  }
37510 
37511  /*
37512 	 * lock count zero - erase the record
37513 	 */
37514 
37515  /* find last record in the lock file */
37516 
37517  lastPos = lseek(a_fd, 0L, 2); /* get size of lock file */
37518  if (lastPos == (off_t)-1) {
37519   log_msg(LOG_MSG_ERR, gettext( "cannot decrement %s lock for object <%s>: lseek failure: %s"),
37520    a_theLock->_lrLock.lockExclusive ?
37521      gettext( "exclusive") : gettext( "shared"),
37522    a_theLock->_lrLock.lockObject,
37523    strerror((*(___errno()))));
37524   return (1);
37525  }
37526 
37527  lastRecord = (lastPos/pls)-1; /* convert size to record # */
37528 
37529  log_msg(LOG_MSG_DEBUG, gettext( "decrement lock remove record lastPos %ld last record %d " "current record %d"),
37530   lastPos, lastRecord, pll->lockRecordNum);
37531 
37532  /* see if removing last record of file */
37533 
37534  if (lastRecord == pll->lockRecordNum) {
37535   /* debug info removing last record */
37536 
37537   log_msg(LOG_MSG_DEBUG, gettext( "decrement lock removing <%s> lock last record <%d> " "truncating to <%ld>"),
37538    a_theLock->_lrLock.lockExclusive ?
37539     gettext( "exclusive") : gettext( "shared"),
37540    lastRecord, lastPos-pls);
37541 
37542   /* removing last record of file, truncate */
37543 
37544   res = ftruncate(a_fd, lastPos-pls);
37545   if (res == -1) {
37546    log_msg(LOG_MSG_ERR, gettext( "cannot decrement %s lock for object <%s>: ftruncate failure: %s"),
37547     a_theLock->_lrLock.lockExclusive ?
37548       gettext( "exclusive") : gettext( "shared"),
37549     a_theLock->_lrLock.lockObject,
37550     strerror((*(___errno()))));
37551     return (1);
37552   }
37553   return (0);
37554  }
37555 
37556  /*
37557 	 * not removing last record of file:
37558 	 * read last record, truncate file one record,
37559 	 * replace record to be removed with last record read
37560 	 */
37561 
37562  log_msg(LOG_MSG_DEBUG, gettext( "decrement lock removing record <%d> last record <%d> " "truncating to <%ld>"),
37563   pll->lockRecordNum, lastRecord, lastPos-pls);
37564 
37565  /* read in the last record */
37566 
37567  result = pread(a_fd, tmpLock._lrLockData, pls, lastRecord*pls);
37568  if (result != pls) {
37569   log_msg(LOG_MSG_ERR, gettext( "cannot decrement %s lock for object <%s>: pread failure: %s"),
37570    a_theLock->_lrLock.lockExclusive ?
37571      gettext( "exclusive") : gettext( "shared"),
37572    a_theLock->_lrLock.lockObject,
37573    strerror((*(___errno()))));
37574   return (1);
37575 
37576  }
37577 
37578  /* truncate lock file removing the last record (just read in) */
37579 
37580  res = ftruncate(a_fd, lastPos-pls);
37581  if (res == -1) {
37582   log_msg(LOG_MSG_ERR, gettext( "cannot decrement %s lock for object <%s>: ftruncate failure: %s"),
37583    a_theLock->_lrLock.lockExclusive ?
37584      gettext( "exclusive") : gettext( "shared"),
37585    a_theLock->_lrLock.lockObject,
37586    strerror((*(___errno()))));
37587    return (1);
37588  }
37589 
37590  /* update record to indicate its new position in the lock file */
37591 
37592  tmpLock._lrLock.lockRecordNum = pll->lockRecordNum;
37593 
37594  /* write out the updated record to the new location */
37595 
37596  result = pwrite(a_fd, tmpLock._lrLockData, pls, pll->lockRecordNum*pls);
37597  if (result != pls) {
37598   log_msg(LOG_MSG_ERR, gettext( "cannot decrement %s lock for object <%s>: pwrite failure: %s"),
37599    a_theLock->_lrLock.lockExclusive ?
37600      gettext( "exclusive") : gettext( "shared"),
37601    a_theLock->_lrLock.lockObject,
37602    strerror((*(___errno()))));
37603   return (1);
37604  }
37605 
37606  return (0);
37607 }
37608 
37609 /*
37610  * Name:	_getUniqueId
37611  * Description:	Generate a unique ID that can be used as a key for a new lock
37612  * Arguments:	None
37613  * Returns:	char *
37614  *			== NULL - error, no key generated
37615  *			!= NULL - generated key
37616  * NOTE:    	Any results returned is placed in new storage for the
37617  *		calling method. The caller must use 'lu_memFree' to dispose
37618  *		of the storage once the results are no longer needed.
37619  */
37620 
37621 static char *
37622 _getUniqueId(void)
37623 {
37624  char *args[10];
37625  char *execResults;
37626  char newkey[37];
37627  hrtime_t hretime;
37628  int b;
37629  int execStatus;
37630  struct tm tstruct;
37631  time_t thetime;
37632 
37633  /*
37634 	 * try and use makeuuid to generate a unique i.d. Such a unique i.d.
37635 	 * will look like:
37636 	 *		7814e3c1-1dd2-11b2-9fe8-000d560ddc82
37637 	 */
37638 
37639  args[0] = "makeuuid";
37640  args[1] = (char *)0;
37641 
37642  b = e_ExecCmdList(&execStatus, &execResults, (char *)0,
37643   "/usr/bin/makeuuid", (char *)0);
37644 
37645  if ((b == 0) && (execStatus == 0) && (*execResults != '\0')) {
37646   char *p;
37647   p = strpbrk(execResults, " \t\n");
37648   if (p != (char *)0) {
37649    *p = '\0';
37650   }
37651   log_msg(LOG_MSG_DEBUG, gettext( "generated new unique key using makeuuid: %s"),
37652    execResults);
37653   return (execResults);
37654  }
37655 
37656  /*
37657 	 * cannot run makeuuid - generate own unique key - the key is the
37658 	 * same length as unique uid but contains different information that
37659 	 * is as unique as can be made - include current hires time (nanosecond
37660 	 * real timer. Such a unique i.d. will look like:
37661 	 *		0203104092-1145345-0004e94d6af481a0
37662 	 */
37663 
37664  hretime = gethrtime();
37665 
37666  thetime = time((time_t *)0);
37667  (void) localtime_r(&thetime, &tstruct);
37668 
37669  (void) snprintf(newkey, sizeof (newkey),
37670   "%02d%02d%02d%03d-%02d%02d%02d%d-%016llx", tstruct.tm_mday,
37671   tstruct.tm_mon, tstruct.tm_year, tstruct.tm_yday,
37672   tstruct.tm_hour, tstruct.tm_min, tstruct.tm_sec,
37673   tstruct.tm_wday, hretime);
37674 
37675  log_msg(LOG_MSG_DEBUG, gettext( "generated new unique key using date: %s"), newkey);
37676  return (strdup(newkey));
37677 }
37678 
37679 /*
37680  * Name:	sigint_handler
37681  * Synopsis:	SIGINT interrupt handler
37682  * Description:	Catch the "SIGINT" signal; increment signal_received
37683  *		global variable,
37684  * Arguments:	signo - [RO, *RO] - (int)
37685  *			Signal number that was caught
37686  * Returns:	void
37687  */
37688 
37689 static void
37690 sigint_handler(int a_signo)
37691 {
37692  signal_received++;
37693 }
37694 
37695 /*
37696  * Name:	sighup_handler
37697  * Synopsis:	SIGHUP interrupt handler
37698  * Description:	Catch the "SIGHUP" signal; increment signal_received
37699  *		global variable,
37700  * Arguments:	signo - [RO, *RO] - (int)
37701  *			Signal number that was caught
37702  * Returns:	void
37703  */
37704 
37705 static void
37706 sighup_handler(int a_signo)
37707 {
37708  signal_received++;
37709 }
37710