FreeBSD Bugzilla – Attachment 173258 Details for
Bug 211563
CPUTYPE=skylake build broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
ns_name-287f0a.c
ns_name-287f0a.c (text/plain), 414.90 KB, created by
Nikolai Lifanov
on 2016-08-04 01:13:26 UTC
(
hide
)
Description:
ns_name-287f0a.c
Filename:
MIME Type:
Creator:
Nikolai Lifanov
Created:
2016-08-04 01:13:26 UTC
Size:
414.90 KB
patch
obsolete
># 1 "<built-in>" ># 1 "/usr/src/lib/libc/nameser/ns_name.c" >/* > * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") > * Copyright (c) 1996,1999 by Internet Software Consortium. > * > * Permission to use, copy, modify, and distribute this software for any > * purpose with or without fee is hereby granted, provided that the above > * copyright notice and this permission notice appear in all copies. > * > * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES > * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR > * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN > * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT > * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > */ > >#ifndef lint >static const char rcsid[] = "$Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp $"; >#endif ># 21 "/usr/src/lib/libc/nameser/ns_name.c" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 21 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 1 3 4 >/*- > * Copyright (c) 1991, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Berkeley Software Design, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 > * $FreeBSD: head/sys/sys/cdefs.h 300967 2016-05-29 17:32:19Z dim $ > */ > >#ifndef _SYS_CDEFS_H_ >#define _SYS_CDEFS_H_ > >/* > * Testing against Clang-specific extensions. > */ >#ifndef __has_attribute >#define __has_attribute(x) 0 >#endif ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_extension >#define __has_extension __has_feature >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_feature >#define __has_feature(x) 0 >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_include >#define __has_include(x) 0 >#endif ># 54 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_builtin >#define __has_builtin(x) 0 >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) >#define __BEGIN_DECLS extern "C" { >#define __END_DECLS } >#else ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS >#define __END_DECLS >#endif ># 65 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * This code has been put in place to help reduce the addition of > * compiler specific defines in FreeBSD code. It helps to aid in > * having a compiler-agnostic source tree. > */ > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) > >#if __GNUC__ >= 3 || defined(__INTEL_COMPILER) >#define __GNUCLIKE_ASM 3 >#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS >#else ># 78 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE_ASM 2 >#endif ># 80 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE___TYPEOF 1 >#define __GNUCLIKE___OFFSETOF 1 >#define __GNUCLIKE___SECTION 1 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_CTOR_SECTION_HANDLING 1 >#endif ># 87 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 >#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ > __INTEL_COMPILER < 800 >#undef __GNUCLIKE_BUILTIN_CONSTANT_P >#endif ># 93 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) >#define __GNUCLIKE_BUILTIN_VARARGS 1 >#define __GNUCLIKE_BUILTIN_STDARG 1 >#define __GNUCLIKE_BUILTIN_VAALIST 1 >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__GNUC__) >#define __GNUC_VA_LIST_COMPATIBILITY 1 >#endif ># 103 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler memory barriers, specific to gcc and clang. > */ >#if defined(__GNUC__) >#define __compiler_membar() __asm __volatile(" " : : : "memory") >#endif ># 110 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_BUILTIN_NEXT_ARG 1 >#define __GNUCLIKE_MATH_BUILTIN_RELOPS >#endif ># 115 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_MEMCPY 1 > >/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ >#define __CC_SUPPORTS_INLINE 1 >#define __CC_SUPPORTS___INLINE 1 >#define __CC_SUPPORTS___INLINE__ 1 > >#define __CC_SUPPORTS___FUNC__ 1 >#define __CC_SUPPORTS_WARNING 1 > >#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > >#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 > >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 131 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Macro to test if we're using a specific version of gcc or later. > */ >#if defined(__GNUC__) && !defined(__INTEL_COMPILER) >#define __GNUC_PREREQ__(ma, mi) \ > (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) >#else ># 139 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) 0 >#endif ># 141 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI > * mode -- there must be no spaces between its arguments, and for nested > * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also > * concatenate double-quoted strings produced by the __STRING macro, but > * this only works with ANSI C. > * > * __XSTRING is like __STRING, but it expands any macros in its argument > * first. It is only available with ANSI C. > */ >#if defined(__STDC__) || defined(__cplusplus) >#define __P(protos) protos /* full-blown ANSI C */ >#define __CONCAT1(x,y) x ## y >#define __CONCAT(x,y) __CONCAT1(x,y) >#define __STRING(x) #x /* stringify without expanding x */ >#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ > >#define __const const /* define reserved names to standard */ >#define __signed signed >#define __volatile volatile >#if defined(__cplusplus) >#define __inline inline /* convert to C++ keyword */ >#else ># 167 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if !(defined(__CC_SUPPORTS___INLINE)) >#define __inline /* delete GCC keyword */ >#endif /* ! __CC_SUPPORTS___INLINE */ ># 170 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !__cplusplus */ ># 171 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#else /* !(__STDC__ || __cplusplus) */ ># 173 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) () /* traditional C preprocessor */ >#define __CONCAT(x,y) x/**/y >#define __STRING(x) "x" > >#if !defined(__CC_SUPPORTS___INLINE) >#define __const /* delete pseudo-ANSI C keywords */ >#define __inline >#define __signed >#define __volatile >/* > * In non-ANSI C environments, new programs will want ANSI-only C keywords > * deleted from the program and old programs will want them left alone. > * When using a compiler other than gcc, programs using the ANSI C keywords > * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. > * When using "gcc -traditional", we assume that this is the intent; if > * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. > */ >#ifndef NO_ANSI_KEYWORDS >#define const /* delete ANSI C keywords */ >#define inline >#define signed >#define volatile >#endif /* !NO_ANSI_KEYWORDS */ ># 196 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !__CC_SUPPORTS___INLINE */ ># 197 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !(__STDC__ || __cplusplus) */ ># 198 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to help declare dead (non-returning) and > * pure (no side effects) functions, and unused variables. They are > * null except for versions of gcc that are known to support the features > * properly (old versions of gcc-2 supported the dead and pure features > * in a different (wrong) way). If we do not provide an implementation > * for a given compiler, let the compile fail if it is told to use > * a feature that we cannot live without. > */ >#ifdef lint >#define __dead2 >#define __pure2 >#define __unused >#define __packed >#define __aligned(x) >#define __alloc_align(x) >#define __alloc_size(x) >#define __section(x) >#define __weak_symbol >#else ># 219 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __weak_symbol __attribute__((__weak__)) >#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) >#define __dead2 >#define __pure2 >#define __unused >#endif ># 225 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused >/* XXX Find out what to do for __packed, __aligned and __section */ >#endif ># 231 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused __attribute__((__unused__)) >#define __used __attribute__((__used__)) >#define __packed __attribute__((__packed__)) >#define __aligned(x) __attribute__((__aligned__(x))) >#define __section(x) __attribute__((__section__(x))) >#endif ># 240 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) >#define __alloc_size(x) __attribute__((__alloc_size__(x))) >#else ># 243 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __alloc_size(x) >#endif ># 245 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) >#define __alloc_align(x) __attribute__((__alloc_align__(x))) >#else ># 248 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __alloc_align(x) >#endif ># 250 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* lint */ ># 251 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !__GNUC_PREREQ__(2, 95) >#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) >#endif ># 255 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Keywords added in C11. > */ > >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) > >#if !__has_extension(c_alignas) >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_alignas) >#define _Alignas(x) alignas(x) >#else ># 267 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */ >#define _Alignas(x) __aligned(x) >#endif ># 270 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 271 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _Alignof(x) alignof(x) >#else ># 275 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) __alignof(x) >#endif ># 277 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !defined(__cplusplus) && !__has_extension(c_atomic) && \ > !__has_extension(cxx_atomic) >/* > * No native support for _Atomic(). Place object in structure to prevent > * most forms of direct non-atomic access. > */ >#define _Atomic(T) struct { T volatile __val; } >#endif ># 286 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _Noreturn [[noreturn]] >#else ># 290 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn __dead2 >#endif ># 292 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !__has_extension(c_static_assert) >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_static_assert) >#define _Static_assert(x, y) static_assert(x, y) >#elif __GNUC_PREREQ__(4,6) ># 298 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ >#elif defined(__COUNTER__) ># 300 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) >#define __Static_assert(x, y) ___Static_assert(x, y) >#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ > __unused >#else ># 305 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) struct __hack >#endif ># 307 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 308 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !__has_extension(c_thread_local) >/* > * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode > * without actually supporting the thread_local keyword. Don't check for > * the presence of C++11 when defining _Thread_local. > */ >#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ > __has_extension(cxx_thread_local) >#define _Thread_local thread_local >#else ># 319 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local __thread >#endif ># 321 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 322 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ ># 324 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Emulation of C11 _Generic(). Unlike the previously defined C11 > * keywords, it is not possible to implement this using exactly the same > * syntax. Therefore implement something similar under the name > * __generic(). Unlike _Generic(), this macro can only distinguish > * between a single type, so it requires nested invocations to > * distinguish multiple cases. > */ > >#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ > __has_extension(c_generic_selections) >#define __generic(expr, t, yes, no) \ > _Generic(expr, t: yes, default: no) >#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) ># 339 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > __builtin_choose_expr( \ > __builtin_types_compatible_p(__typeof(expr), t), yes, no) >#endif ># 343 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(2, 96) >#define __malloc_like __attribute__((__malloc__)) >#define __pure __attribute__((__pure__)) >#else ># 348 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __malloc_like >#define __pure >#endif ># 351 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) >#define __always_inline __attribute__((__always_inline__)) >#else ># 355 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __always_inline >#endif ># 357 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 1) >#define __noinline __attribute__ ((__noinline__)) >#else ># 361 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __noinline >#endif ># 363 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 3) >#define __nonnull(x) __attribute__((__nonnull__(x))) >#define __nonnull_all __attribute__((__nonnull__)) >#else ># 368 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nonnull(x) >#define __nonnull_all >#endif ># 371 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 4) >#define __fastcall __attribute__((__fastcall__)) >#define __result_use_check __attribute__((__warn_unused_result__)) >#else ># 376 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __fastcall >#define __result_use_check >#endif ># 379 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 1) >#define __returns_twice __attribute__((__returns_twice__)) >#else ># 383 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __returns_twice >#endif ># 385 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) >#define __unreachable() __builtin_unreachable() >#else ># 389 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __unreachable() ((void)0) >#endif ># 391 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* XXX: should use `#if __STDC_VERSION__ < 199901'. */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#define __func__ NULL >#endif ># 396 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901 >#define __LONG_LONG_SUPPORTED >#endif ># 400 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* C++11 exposes a load of C99 stuff */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#define __LONG_LONG_SUPPORTED >#ifndef __STDC_LIMIT_MACROS >#define __STDC_LIMIT_MACROS >#endif ># 407 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __STDC_CONSTANT_MACROS >#define __STDC_CONSTANT_MACROS >#endif ># 410 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 411 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * GCC 2.95 provides `__restrict' as an extension to C90 to support the > * C99-specific `restrict' type qualifier. We happen to use `__restrict' as > * a way to define the `restrict' type qualifier without disturbing older > * software that is unaware of C99 keywords. > */ >#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint) >#define __restrict >#else ># 422 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __restrict restrict >#endif ># 424 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 425 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * GNU C version 2.96 adds explicit branch prediction so that > * the CPU back-end can hint the processor and also so that > * code blocks can be reordered such that the predicted path > * sees a more linear flow, thus improving cache behavior, etc. > * > * The following two macros provide us with a way to utilize this > * compiler feature. Use __predict_true() if you expect the expression > * to evaluate to true, and __predict_false() if you expect the > * expression to evaluate to false. > * > * A few notes about usage: > * > * * Generally, __predict_false() error condition checks (unless > * you have some _strong_ reason to do otherwise, in which case > * document it), and/or __predict_true() `no-error' condition > * checks, assuming you want to optimize for the no-error case. > * > * * Other than that, if you don't know the likelihood of a test > * succeeding from empirical or other `hard' evidence, don't > * make predictions. > * > * * These are meant to be used in places that are run `a lot'. > * It is wasteful to make predictions in code that is run > * seldomly (e.g. at subsystem initialization time) as the > * basic block reordering that this affects can often generate > * larger code. > */ >#if __GNUC_PREREQ__(2, 96) >#define __predict_true(exp) __builtin_expect((exp), 1) >#define __predict_false(exp) __builtin_expect((exp), 0) >#else ># 458 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __predict_true(exp) (exp) >#define __predict_false(exp) (exp) >#endif ># 461 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 0) >#define __null_sentinel __attribute__((__sentinel__)) >#define __exported __attribute__((__visibility__("default"))) >#define __hidden __attribute__((__visibility__("hidden"))) >#else ># 467 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __null_sentinel >#define __exported >#define __hidden >#endif ># 471 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> > * require it. > */ >#if __GNUC_PREREQ__(4, 1) >#define __offsetof(type, field) __builtin_offsetof(type, field) >#else ># 479 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __cplusplus >#define __offsetof(type, field) \ > ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) >#else ># 483 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __offsetof(type, field) \ > (__offsetof__ (reinterpret_cast <__size_t> \ > (&reinterpret_cast <const volatile char &> \ > (static_cast<type *> (0)->field)))) >#endif ># 488 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 489 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __rangeof(type, start, end) \ > (__offsetof(type, end) - __offsetof(type, start)) > >/* > * Given the pointer x to the member m of the struct s, return > * a pointer to the containing structure. When using GCC, we first > * assign pointer x to a local variable, to check that its type is > * compatible with member m. > */ >#if __GNUC_PREREQ__(3, 1) >#define __containerof(x, s, m) ({ \ > const volatile __typeof(((s *)0)->m) *__x = (x); \ > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ >}) >#else ># 504 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __containerof(x, s, m) \ > __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) >#endif ># 507 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to declare that functions take printf-like > * or scanf-like arguments. They are null except for versions of gcc > * that are known to support the features properly (old versions of gcc-2 > * didn't permit keeping the keywords out of the application namespace). > */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#define __printflike(fmtarg, firstvararg) >#define __scanflike(fmtarg, firstvararg) >#define __format_arg(fmtarg) >#define __strfmonlike(fmtarg, firstvararg) >#define __strftimelike(fmtarg, firstvararg) >#else ># 521 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __printflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf__, fmtarg, firstvararg))) >#define __scanflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) >#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) >#define __strfmonlike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) >#define __strftimelike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >#endif ># 531 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * FORTIFY_SOURCE, and perhaps other compiler-specific features, require > * the use of non-standard inlining. In general we should try to avoid > * using these but GCC-compatible compilers tend to support the extensions > * well enough to use them in limited cases. > */ >#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) >#if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__) >#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) >#else ># 542 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __gnu_inline __attribute__((__gnu_inline__)) >#endif /* artificial */ ># 544 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 545 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __gnu_inline >#endif ># 547 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ >#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ > defined(__GNUC__) && !defined(__INTEL_COMPILER) >#define __printf0like(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >#else ># 554 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) >#endif ># 556 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#ifndef __INTEL_COMPILER >#define __strong_reference(sym,aliassym) \ > extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) >#endif ># 562 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef __STDC__ >#define __weak_reference(sym,alias) \ > __asm__(".weak " #alias); \ > __asm__(".equ " #alias ", " #sym) >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning." #sym); \ > __asm__(".asciz \"" msg "\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@" #verid) >#define __sym_default(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@@" #verid) >#else ># 575 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __weak_reference(sym,alias) \ > __asm__(".weak alias"); \ > __asm__(".equ alias, sym") >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning.sym"); \ > __asm__(".asciz \"msg\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver impl, sym@verid") >#define __sym_default(impl,sym,verid) \ > __asm__(".symver impl, sym@@verid") >#endif /* __STDC__ */ ># 587 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 588 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GLOBL1(sym) __asm__(".globl " #sym) >#define __GLOBL(sym) __GLOBL1(sym) > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") >#else ># 595 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/* > * The following definition might not work well if used in header files, > * but it should be better than nothing. If you want a "do nothing" > * version, then it should generate some harmless declaration, such as: > * #define __IDSTRING(name,string) struct __hack > */ >#define __IDSTRING(name,string) static const char name[] __unused = string >#endif ># 603 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Embed the rcs id of a source file in the resulting library. Note that in > * more recent ELF binutils, we use .ident allowing the ID to be stripped. > * Usage: > * __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 300967 2016-05-29 17:32:19Z dim $"); > */ >#ifndef __FBSDID >#if !defined(lint) && !defined(STRIP_FBSDID) >#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 614 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) struct __hack >#endif ># 616 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 617 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID >#ifndef NO__RCSID >#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 622 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RCSID(s) struct __hack >#endif ># 624 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 625 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID_SOURCE >#ifndef NO__RCSID_SOURCE >#define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) >#else ># 630 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RCSID_SOURCE(s) struct __hack >#endif ># 632 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 633 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __SCCSID >#ifndef NO__SCCSID >#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) >#else ># 638 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __SCCSID(s) struct __hack >#endif ># 640 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 641 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __COPYRIGHT >#ifndef NO__COPYRIGHT >#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) >#else ># 646 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __COPYRIGHT(s) struct __hack >#endif ># 648 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 649 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DECONST >#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) >#endif ># 653 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEVOLATILE >#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) >#endif ># 657 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEQUALIFY >#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) >#endif ># 661 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/*- > * The following definitions are an extension of the behavior originally > * implemented in <sys/_posix.h>, but with a different level of granularity. > * POSIX.1 requires that the macros we test be defined before any standard > * header file is included. > * > * Here's a quick run-down of the versions: > * defined(_POSIX_SOURCE) 1003.1-1988 > * _POSIX_C_SOURCE == 1 1003.1-1990 > * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option > * _POSIX_C_SOURCE == 199309 1003.1b-1993 > * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, > * and the omnibus ISO/IEC 9945-1: 1996 > * _POSIX_C_SOURCE == 200112 1003.1-2001 > * _POSIX_C_SOURCE == 200809 1003.1-2008 > * > * In addition, the X/Open Portability Guide, which is now the Single UNIX > * Specification, defines a feature-test macro which indicates the version of > * that specification, and which subsumes _POSIX_C_SOURCE. > * > * Our macros begin with two underscores to avoid namespace screwage. > */ > >/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 >#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ >#define _POSIX_C_SOURCE 199009 >#endif ># 690 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199209 >#endif ># 696 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ >#ifdef _XOPEN_SOURCE >#if _XOPEN_SOURCE - 0 >= 700 >#define __XSI_VISIBLE 700 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200809 >#elif _XOPEN_SOURCE - 0 >= 600 ># 704 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 600 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200112 >#elif _XOPEN_SOURCE - 0 >= 500 ># 708 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 500 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199506 >#endif ># 712 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 713 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Deal with all versions of POSIX. The ordering relative to the tests above is > * important. > */ >#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) >#define _POSIX_C_SOURCE 198808 >#endif ># 721 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef _POSIX_C_SOURCE >#if _POSIX_C_SOURCE >= 200809 >#define __POSIX_VISIBLE 200809 >#define __ISO_C_VISIBLE 1999 >#elif _POSIX_C_SOURCE >= 200112 ># 726 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200112 >#define __ISO_C_VISIBLE 1999 >#elif _POSIX_C_SOURCE >= 199506 ># 729 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199506 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199309 ># 732 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199309 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199209 ># 735 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199209 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199009 ># 738 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199009 >#define __ISO_C_VISIBLE 1990 >#else ># 741 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 198808 >#define __ISO_C_VISIBLE 0 >#endif /* _POSIX_C_SOURCE */ ># 744 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 745 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/*- > * Deal with _ANSI_SOURCE: > * If it is defined, and no other compilation environment is explicitly > * requested, then define our internal feature-test macros to zero. This > * makes no difference to the preprocessor (undefined symbols in preprocessing > * expressions are defined to have value zero), but makes it more convenient for > * a test program to print out the values. > * > * If a program mistakenly defines _ANSI_SOURCE and some other macro such as > * _POSIX_C_SOURCE, we will assume that it wants the broader compilation > * environment (and in fact we will never get here). > */ >#if defined(_ANSI_SOURCE) /* Hide almost everything. */ >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1990 >#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ ># 763 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1999 >#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ ># 768 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 2011 >#else /* Default environment: show everything. */ ># 773 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __XSI_VISIBLE 700 >#define __BSD_VISIBLE 1 >#define __ISO_C_VISIBLE 2011 >#endif ># 778 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 779 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__mips) || defined(__powerpc64__) || defined(__riscv__) >#define __NO_TLS 1 >#endif ># 783 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h > * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. > */ >#if defined(__arm__) && !defined(__ARM_ARCH) >#if 0 /* expanded by -frewrite-includes */ >#include <machine/acle-compat.h> >#endif /* expanded by -frewrite-includes */ ># 789 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 ># 790 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 791 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Type Safety Checking > * > * Clang provides additional attributes to enable checking type safety > * properties that cannot be enforced by the C type system. > */ > >#if __has_attribute(__argument_with_type_tag__) && \ > __has_attribute(__type_tag_for_datatype__) && !defined(lint) >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ > __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) >#define __datatype_type_tag(kind, type) \ > __attribute__((__type_tag_for_datatype__(kind, type))) >#else ># 806 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) >#define __datatype_type_tag(kind, type) >#endif ># 809 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Lock annotations. > * > * Clang provides support for doing basic thread-safety tests at > * compile-time, by marking which locks will/should be held when > * entering/leaving a functions. > * > * Furthermore, it is also possible to annotate variables and structure > * members to enforce that they are only accessed when certain locks are > * held. > */ > >#if __has_extension(c_thread_safety_attributes) >#define __lock_annotate(x) __attribute__((x)) >#else ># 825 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) >#endif ># 827 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Structure implements a lock. */ >#define __lockable __lock_annotate(lockable) > >/* Function acquires an exclusive or shared lock. */ >#define __locks_exclusive(...) \ > __lock_annotate(exclusive_lock_function(__VA_ARGS__)) >#define __locks_shared(...) \ > __lock_annotate(shared_lock_function(__VA_ARGS__)) > >/* Function attempts to acquire an exclusive or shared lock. */ >#define __trylocks_exclusive(...) \ > __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) >#define __trylocks_shared(...) \ > __lock_annotate(shared_trylock_function(__VA_ARGS__)) > >/* Function releases a lock. */ >#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) > >/* Function asserts that an exclusive or shared lock is held. */ >#define __asserts_exclusive(...) \ > __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) >#define __asserts_shared(...) \ > __lock_annotate(assert_shared_lock(__VA_ARGS__)) > >/* Function requires that an exclusive or shared lock is or is not held. */ >#define __requires_exclusive(...) \ > __lock_annotate(exclusive_locks_required(__VA_ARGS__)) >#define __requires_shared(...) \ > __lock_annotate(shared_locks_required(__VA_ARGS__)) >#define __requires_unlocked(...) \ > __lock_annotate(locks_excluded(__VA_ARGS__)) > >/* Function should not be analyzed. */ >#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) > >/* Guard variables and structure members by lock. */ >#define __guarded_by(x) __lock_annotate(guarded_by(x)) >#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > >#endif /* !_SYS_CDEFS_H_ */ ># 868 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 ># 22 "/usr/src/lib/libc/nameser/ns_name.c" 2 >__FBSDID("$FreeBSD: head/lib/libc/nameser/ns_name.c 269873 2014-08-12 13:09:32Z ume $"); > >#if 0 /* expanded by -frewrite-includes */ >#include "port_before.h" >#endif /* expanded by -frewrite-includes */ ># 24 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/include/port_before.h" 1 >/* $FreeBSD: head/lib/libc/include/port_before.h 269867 2014-08-12 12:36:06Z ume $ */ > >#ifndef _PORT_BEFORE_H_ >#define _PORT_BEFORE_H_ > >#define _LIBC 1 >#define DO_PTHREADS 1 >#define USE_POLL 1 >#define HAVE_MD5 1 > >#define ISC_SOCKLEN_T socklen_t >#define ISC_FORMAT_PRINTF(fmt, args) \ > __attribute__((__format__(__printf__, fmt, args))) >#define DE_CONST(konst, var) \ > do { \ > union { const void *k; void *v; } _u; \ > _u.k = konst; \ > var = _u.v; \ > } while (0) > >#define UNUSED(x) (void)(x) > >#endif /* _PORT_BEFORE_H_ */ ># 24 "/usr/src/lib/libc/include/port_before.h" ># 25 "/usr/src/lib/libc/nameser/ns_name.c" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 26 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)types.h 8.6 (Berkeley) 2/19/95 > * $FreeBSD: head/sys/sys/types.h 299571 2016-05-12 21:18:17Z cem $ > */ > >#ifndef _SYS_TYPES_H_ >#define _SYS_TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >/* Machine type dependent parameters. */ >#if 0 /* expanded by -frewrite-includes */ >#include <machine/endian.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/endian.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 1 3 4 >/*- > * Copyright (c) 1987, 1991 Regents of the University of California. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)endian.h 7.8 (Berkeley) 4/3/91 > * $FreeBSD: head/sys/x86/include/endian.h 233684 2012-03-29 23:31:48Z dim $ > */ > >#ifndef _MACHINE_ENDIAN_H_ >#define _MACHINE_ENDIAN_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_types.h 299571 2016-05-12 21:18:17Z cem $ > */ > >#ifndef _SYS__TYPES_H_ >#define _SYS__TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_types.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/_types.h 232261 2012-02-28 18:15:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_types.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 > * From: @(#)types.h 8.3 (Berkeley) 1/5/94 > * $FreeBSD: head/sys/x86/include/_types.h 301029 2016-05-31 08:36:39Z ed $ > */ > >#ifndef _MACHINE__TYPES_H_ >#define _MACHINE__TYPES_H_ > >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 45 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)limits.h 8.3 (Berkeley) 1/4/94 > * $FreeBSD: head/sys/x86/include/_limits.h 235939 2012-05-24 21:44:46Z obrien $ > */ > >#ifndef _MACHINE__LIMITS_H_ >#define _MACHINE__LIMITS_H_ > >/* > * According to ANSI (section 2.2.4.2), the values below must be usable by > * #if preprocessing directives. Additionally, the expression must have the > * same type as would an expression that is an object of the corresponding > * type converted according to the integral promotions. The subtraction for > * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an > * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). > */ > >#define __CHAR_BIT 8 /* number of bits in a char */ > >#define __SCHAR_MAX 0x7f /* max value for a signed char */ >#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ > >#define __UCHAR_MAX 0xff /* max value for an unsigned char */ > >#define __USHRT_MAX 0xffff /* max value for an unsigned short */ >#define __SHRT_MAX 0x7fff /* max value for a short */ >#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ > >#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ >#define __INT_MAX 0x7fffffff /* max value for an int */ >#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ > >#ifdef __LP64__ >#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ >#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ >#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ >#else ># 65 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 >#define __ULONG_MAX 0xffffffffUL >#define __LONG_MAX 0x7fffffffL >#define __LONG_MIN (-0x7fffffffL - 1) >#endif ># 69 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 > > /* max value for an unsigned long long */ >#define __ULLONG_MAX 0xffffffffffffffffULL >#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ >#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ > >#ifdef __LP64__ >#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ >#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ >#define __OFF_MAX __LONG_MAX /* max value for an off_t */ >#define __OFF_MIN __LONG_MIN /* min value for an off_t */ >/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ >#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ >#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ >#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ >#define __LONG_BIT 64 >#else ># 86 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 >#define __SSIZE_MAX __INT_MAX >#define __SIZE_T_MAX __UINT_MAX >#define __OFF_MAX __LLONG_MAX >#define __OFF_MIN __LLONG_MIN >#define __UQUAD_MAX __ULLONG_MAX >#define __QUAD_MAX __LLONG_MAX >#define __QUAD_MIN __LLONG_MIN >#define __LONG_BIT 32 >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 > >#define __WORD_BIT 32 > >/* Minimum signal stack size. */ >#define __MINSIGSTKSZ (512 * 4) > >#endif /* !_MACHINE__LIMITS_H_ */ ># 102 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 2 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 2 3 4 > >#define __NO_STRICT_ALIGNMENT > >/* > * Basic types upon which most other types are built. > */ >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef short __int16_t; >typedef unsigned short __uint16_t; >typedef int __int32_t; >typedef unsigned int __uint32_t; >#ifdef __LP64__ >typedef long __int64_t; >typedef unsigned long __uint64_t; >#else ># 63 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#ifndef lint >__extension__ >#endif ># 66 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >/* LONGLONG */ >typedef long long __int64_t; >#ifndef lint >__extension__ >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >/* LONGLONG */ >typedef unsigned long long __uint64_t; >#endif ># 74 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 > >/* > * Standard type definitions. > */ >#ifdef __LP64__ >typedef __int32_t __clock_t; /* clock()... */ >typedef __int64_t __critical_t; >typedef double __double_t; >typedef float __float_t; >typedef __int64_t __intfptr_t; >typedef __int64_t __intptr_t; >#else ># 86 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef unsigned long __clock_t; >typedef __int32_t __critical_t; >typedef long double __double_t; >typedef long double __float_t; >typedef __int32_t __intfptr_t; >typedef __int32_t __intptr_t; >#endif ># 93 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __int64_t __intmax_t; >typedef __int32_t __int_fast8_t; >typedef __int32_t __int_fast16_t; >typedef __int32_t __int_fast32_t; >typedef __int64_t __int_fast64_t; >typedef __int8_t __int_least8_t; >typedef __int16_t __int_least16_t; >typedef __int32_t __int_least32_t; >typedef __int64_t __int_least64_t; >#ifdef __LP64__ >typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ >typedef __int64_t __register_t; >typedef __int64_t __segsz_t; /* segment size (in pages) */ >typedef __uint64_t __size_t; /* sizeof() */ >typedef __int64_t __ssize_t; /* byte count or error */ >typedef __int64_t __time_t; /* time()... */ >typedef __uint64_t __uintfptr_t; >typedef __uint64_t __uintptr_t; >#else ># 112 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __int32_t __ptrdiff_t; >typedef __int32_t __register_t; >typedef __int32_t __segsz_t; >typedef __uint32_t __size_t; >typedef __int32_t __ssize_t; >typedef __int32_t __time_t; >typedef __uint32_t __uintfptr_t; >typedef __uint32_t __uintptr_t; >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint64_t __uintmax_t; >typedef __uint32_t __uint_fast8_t; >typedef __uint32_t __uint_fast16_t; >typedef __uint32_t __uint_fast32_t; >typedef __uint64_t __uint_fast64_t; >typedef __uint8_t __uint_least8_t; >typedef __uint16_t __uint_least16_t; >typedef __uint32_t __uint_least32_t; >typedef __uint64_t __uint_least64_t; >#ifdef __LP64__ >typedef __uint64_t __u_register_t; >typedef __uint64_t __vm_offset_t; >typedef __uint64_t __vm_paddr_t; >typedef __uint64_t __vm_size_t; >#else ># 136 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __u_register_t; >typedef __uint32_t __vm_offset_t; >#ifdef PAE >typedef __uint64_t __vm_paddr_t; >#else ># 141 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_paddr_t; >#endif ># 143 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_size_t; >#endif ># 145 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __int64_t __vm_ooffset_t; >typedef __uint64_t __vm_pindex_t; >typedef int ___wchar_t; > >#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ >#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ > >/* > * Unusual type definitions. > */ >#ifdef __GNUCLIKE_BUILTIN_VARARGS >typedef __builtin_va_list __va_list; /* internally known to gcc */ >#else ># 158 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#ifdef __LP64__ >struct __s_va_list { > __uint32_t _pad1[2]; /* gp_offset, fp_offset */ > __uint64_t _pad2[2]; /* overflow_arg_area, reg_save_area */ >}; >typedef struct __s_va_list __va_list; >#else ># 165 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef char * __va_list; >#endif ># 167 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#endif ># 168 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ > && !defined(__NO_GNUC_VA_LIST) >#define __GNUC_VA_LIST >typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ >#endif ># 173 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 > >#endif /* !_MACHINE__TYPES_H_ */ ># 175 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_types.h" 2 3 4 ># 34 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 2 3 4 > >/* > * Standard type definitions. > */ >typedef __int32_t __blksize_t; /* file block size */ >typedef __int64_t __blkcnt_t; /* file block count */ >typedef __int32_t __clockid_t; /* clock_gettime()... */ >typedef __uint32_t __fflags_t; /* file flags */ >typedef __uint64_t __fsblkcnt_t; >typedef __uint64_t __fsfilcnt_t; >typedef __uint32_t __gid_t; >typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ >typedef __uint32_t __ino_t; /* inode number */ >typedef long __key_t; /* IPC key (for Sys V IPC) */ >typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ >typedef __uint16_t __mode_t; /* permissions */ >typedef int __accmode_t; /* access permissions */ >typedef int __nl_item; >typedef __uint16_t __nlink_t; /* link count */ >typedef __int64_t __off_t; /* file offset */ >typedef __int64_t __off64_t; /* file offset (alias) */ >typedef __int32_t __pid_t; /* process [group] */ >typedef __int64_t __rlim_t; /* resource limit - intentionally */ > /* signed, because of legacy code */ > /* that uses -1 for RLIM_INFINITY */ >typedef __uint8_t __sa_family_t; >typedef __uint32_t __socklen_t; >typedef long __suseconds_t; /* microseconds (signed) */ >typedef struct __timer *__timer_t; /* timer_gettime()... */ >typedef struct __mq *__mqd_t; /* mq_open()... */ >typedef __uint32_t __uid_t; >typedef unsigned int __useconds_t; /* microseconds (unsigned) */ >typedef int __cpuwhich_t; /* which parameter for cpuset. */ >typedef int __cpulevel_t; /* level parameter for cpuset. */ >typedef int __cpusetid_t; /* cpuset identifier. */ > >/* > * Unusual type definitions. > */ >/* > * rune_t is declared to be an ``int'' instead of the more natural > * ``unsigned long'' or ``long''. Two things are happening here. It is not > * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, > * it looks like 10646 will be a 31 bit standard. This means that if your > * ints cannot hold 32 bits, you will be in trouble. The reason an int was > * chosen over a long is that the is*() and to*() routines take ints (says > * ANSI C), but they use __ct_rune_t instead of int. > * > * NOTE: rune_t is not covered by ANSI nor other standards, and should not > * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and > * rune_t must be the same type. Also, wint_t should be able to hold all > * members of the largest character set plus one extra value (WEOF), and > * must be at least 16 bits. > */ >typedef int __ct_rune_t; /* arg type for ctype funcs */ >typedef __ct_rune_t __rune_t; /* rune_t (see above) */ >typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > >/* Clang already provides these types as built-ins, but only in C++ mode. */ >#if !defined(__clang__) || !defined(__cplusplus) >typedef __uint_least16_t __char16_t; >typedef __uint_least32_t __char32_t; >#endif ># 97 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 >/* In C++11, char16_t and char32_t are built-in types. */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _CHAR16_T_DECLARED >#define _CHAR32_T_DECLARED >#endif ># 102 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 > >typedef __uint32_t __dev_t; /* device number */ > >typedef __uint32_t __fixpt_t; /* fixed point number */ > >/* > * mbstate_t is an opaque object to keep conversion state during multibyte > * stream conversions. > */ >typedef union { > char __mbstate8[128]; > __int64_t _mbstateL; /* for alignment */ >} __mbstate_t; > >typedef __uintmax_t __rman_res_t; > >#endif /* !_SYS__TYPES_H_ */ ># 119 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 2 3 4 > >/* > * Define the order of 32-bit words in 64-bit words. > */ >#define _QUAD_HIGHWORD 1 >#define _QUAD_LOWWORD 0 > >/* > * Definitions for byte order, according to byte significance from low > * address to high. > */ >#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ >#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ >#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ > >#define _BYTE_ORDER _LITTLE_ENDIAN > >/* > * Deprecated variants that don't have enough underscores to be useful in more > * strict namespaces. > */ >#if __BSD_VISIBLE >#define LITTLE_ENDIAN _LITTLE_ENDIAN >#define BIG_ENDIAN _BIG_ENDIAN >#define PDP_ENDIAN _PDP_ENDIAN >#define BYTE_ORDER _BYTE_ORDER >#endif ># 65 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > >#define __bswap16_gen(x) (__uint16_t)((x) << 8 | (x) >> 8) >#define __bswap32_gen(x) \ > (((__uint32_t)__bswap16((x) & 0xffff) << 16) | __bswap16((x) >> 16)) >#define __bswap64_gen(x) \ > (((__uint64_t)__bswap32((x) & 0xffffffff) << 32) | __bswap32((x) >> 32)) > >#ifdef __GNUCLIKE_BUILTIN_CONSTANT_P >#define __bswap16(x) \ > ((__uint16_t)(__builtin_constant_p(x) ? \ > __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x))) >#define __bswap32(x) \ > (__builtin_constant_p(x) ? \ > __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x)) >#define __bswap64(x) \ > (__builtin_constant_p(x) ? \ > __bswap64_gen((__uint64_t)(x)) : __bswap64_var(x)) >#else ># 83 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >/* XXX these are broken for use in static initializers. */ >#define __bswap16(x) __bswap16_var(x) >#define __bswap32(x) __bswap32_var(x) >#define __bswap64(x) __bswap64_var(x) >#endif ># 88 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > >/* These are defined as functions to avoid multiple evaluation of x. */ > >static __inline __uint16_t >__bswap16_var(__uint16_t _x) >{ > > return (__bswap16_gen(_x)); >} > >static __inline __uint32_t >__bswap32_var(__uint32_t _x) >{ > >#ifdef __GNUCLIKE_ASM > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 106 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > return (__bswap32_gen(_x)); >#endif ># 108 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >} > >static __inline __uint64_t >__bswap64_var(__uint64_t _x) >{ > >#if defined(__amd64__) && defined(__GNUCLIKE_ASM) > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 118 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > /* > * It is important for the optimizations that the following is not > * really generic, but expands to 2 __bswap32_var()'s. > */ > return (__bswap64_gen(_x)); >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >} > >#define __htonl(x) __bswap32(x) >#define __htons(x) __bswap16(x) >#define __ntohl(x) __bswap32(x) >#define __ntohs(x) __bswap16(x) > >#endif /* !_MACHINE_ENDIAN_H_ */ ># 132 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 2 3 4 ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_pthreadtypes.h" 1 3 4 >/* > * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu > * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by Chris Provenzano. > * 4. The name of Chris Provenzano may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY > * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER > * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_pthreadtypes.h 189828 2009-03-14 20:10:14Z das $ > */ > >#ifndef _SYS__PTHREADTYPES_H_ >#define _SYS__PTHREADTYPES_H_ > >/* > * Forward structure definitions. > * > * These are mostly opaque to the user. > */ >struct pthread; >struct pthread_attr; >struct pthread_cond; >struct pthread_cond_attr; >struct pthread_mutex; >struct pthread_mutex_attr; >struct pthread_once; >struct pthread_rwlock; >struct pthread_rwlockattr; >struct pthread_barrier; >struct pthread_barrier_attr; >struct pthread_spinlock; > >/* > * Primitive system data type definitions required by P1003.1c. > * > * Note that P1003.1c specifies that there are no defined comparison > * or assignment operators for the types pthread_attr_t, pthread_cond_t, > * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. > */ >#ifndef _PTHREAD_T_DECLARED >typedef struct pthread *pthread_t; >#define _PTHREAD_T_DECLARED >#endif ># 68 "/usr/obj/usr/src/tmp/usr/include/sys/_pthreadtypes.h" 3 4 >typedef struct pthread_attr *pthread_attr_t; >typedef struct pthread_mutex *pthread_mutex_t; >typedef struct pthread_mutex_attr *pthread_mutexattr_t; >typedef struct pthread_cond *pthread_cond_t; >typedef struct pthread_cond_attr *pthread_condattr_t; >typedef int pthread_key_t; >typedef struct pthread_once pthread_once_t; >typedef struct pthread_rwlock *pthread_rwlock_t; >typedef struct pthread_rwlockattr *pthread_rwlockattr_t; >typedef struct pthread_barrier *pthread_barrier_t; >typedef struct pthread_barrierattr *pthread_barrierattr_t; >typedef struct pthread_spinlock *pthread_spinlock_t; > >/* > * Additional type definitions: > * > * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for > * use in header symbols. > */ >typedef void *pthread_addr_t; >typedef void *(*pthread_startroutine_t)(void *); > >/* > * Once definitions. > */ >struct pthread_once { > int state; > pthread_mutex_t mutex; >}; > >#endif /* ! _SYS__PTHREADTYPES_H_ */ ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/_pthreadtypes.h" 3 4 ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 > >#if __BSD_VISIBLE >typedef unsigned char u_char; >typedef unsigned short u_short; >typedef unsigned int u_int; >typedef unsigned long u_long; >#ifndef _KERNEL >typedef unsigned short ushort; /* Sys V compatibility */ >typedef unsigned int uint; /* Sys V compatibility */ >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >/* > * XXX POSIX sized integrals that should appear only in <sys/stdint.h>. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 63 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 1 3 4 >/*- > * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_stdint.h 290492 2015-11-07 12:30:43Z kib $ > */ > >#ifndef _SYS__STDINT_H_ >#define _SYS__STDINT_H_ > >#ifndef _INT8_T_DECLARED >typedef __int8_t int8_t; >#define _INT8_T_DECLARED >#endif ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT16_T_DECLARED >typedef __int16_t int16_t; >#define _INT16_T_DECLARED >#endif ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT32_T_DECLARED >typedef __int32_t int32_t; >#define _INT32_T_DECLARED >#endif ># 47 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT64_T_DECLARED >typedef __int64_t int64_t; >#define _INT64_T_DECLARED >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT64_T_DECLARED >typedef __uint64_t uint64_t; >#define _UINT64_T_DECLARED >#endif ># 72 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INTPTR_T_DECLARED >typedef __intptr_t intptr_t; >#define _INTPTR_T_DECLARED >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _INTMAX_T_DECLARED >typedef __intmax_t intmax_t; >#define _INTMAX_T_DECLARED >#endif ># 85 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTMAX_T_DECLARED >typedef __uintmax_t uintmax_t; >#define _UINTMAX_T_DECLARED >#endif ># 89 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#endif /* !_SYS__STDINT_H_ */ ># 91 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 > >typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ >typedef __uint16_t u_int16_t; >typedef __uint32_t u_int32_t; >typedef __uint64_t u_int64_t; > >typedef __uint64_t u_quad_t; /* quads (deprecated) */ >typedef __int64_t quad_t; >typedef quad_t * qaddr_t; > >typedef char * caddr_t; /* core address */ >typedef const char * c_caddr_t; /* core address, pointer to const */ > >#ifndef _BLKSIZE_T_DECLARED >typedef __blksize_t blksize_t; >#define _BLKSIZE_T_DECLARED >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __cpuwhich_t cpuwhich_t; >typedef __cpulevel_t cpulevel_t; >typedef __cpusetid_t cpusetid_t; > >#ifndef _BLKCNT_T_DECLARED >typedef __blkcnt_t blkcnt_t; >#define _BLKCNT_T_DECLARED >#endif ># 90 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCK_T_DECLARED >typedef __clock_t clock_t; >#define _CLOCK_T_DECLARED >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCKID_T_DECLARED >typedef __clockid_t clockid_t; >#define _CLOCKID_T_DECLARED >#endif ># 100 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __critical_t critical_t; /* Critical section value */ >typedef __int64_t daddr_t; /* disk address */ > >#ifndef _DEV_T_DECLARED >typedef __dev_t dev_t; /* device number or struct cdev */ >#define _DEV_T_DECLARED >#endif ># 108 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _FFLAGS_T_DECLARED >typedef __fflags_t fflags_t; /* file flags */ >#define _FFLAGS_T_DECLARED >#endif ># 113 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __fixpt_t fixpt_t; /* fixed point number */ > >#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */ >typedef __fsblkcnt_t fsblkcnt_t; >typedef __fsfilcnt_t fsfilcnt_t; >#define _FSBLKCNT_T_DECLARED >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; /* group id */ >#define _GID_T_DECLARED >#endif ># 126 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _IN_ADDR_T_DECLARED >typedef __uint32_t in_addr_t; /* base type for internet address */ >#define _IN_ADDR_T_DECLARED >#endif ># 131 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _IN_PORT_T_DECLARED >typedef __uint16_t in_port_t; >#define _IN_PORT_T_DECLARED >#endif ># 136 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _ID_T_DECLARED >typedef __id_t id_t; /* can hold a uid_t or pid_t */ >#define _ID_T_DECLARED >#endif ># 141 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _INO_T_DECLARED >typedef __ino_t ino_t; /* inode number */ >#define _INO_T_DECLARED >#endif ># 146 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _KEY_T_DECLARED >typedef __key_t key_t; /* IPC key (for Sys V IPC) */ >#define _KEY_T_DECLARED >#endif ># 151 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _LWPID_T_DECLARED >typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */ >#define _LWPID_T_DECLARED >#endif ># 156 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; /* permissions */ >#define _MODE_T_DECLARED >#endif ># 161 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _ACCMODE_T_DECLARED >typedef __accmode_t accmode_t; /* access permissions */ >#define _ACCMODE_T_DECLARED >#endif ># 166 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _NLINK_T_DECLARED >typedef __nlink_t nlink_t; /* link count */ >#define _NLINK_T_DECLARED >#endif ># 171 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; /* file offset */ >#define _OFF_T_DECLARED >#endif ># 176 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _OFF64_T_DECLARED >typedef __off64_t off64_t; /* file offset (alias) */ >#define _OFF64_T_DECLARED >#endif ># 181 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; /* process id */ >#define _PID_T_DECLARED >#endif ># 186 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __register_t register_t; > >#ifndef _RLIM_T_DECLARED >typedef __rlim_t rlim_t; /* resource limit */ >#define _RLIM_T_DECLARED >#endif ># 193 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __int64_t sbintime_t; > >typedef __segsz_t segsz_t; /* segment size (in pages) */ > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 202 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 207 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; /* microseconds (signed) */ >#define _SUSECONDS_T_DECLARED >#endif ># 212 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 217 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _TIMER_T_DECLARED >typedef __timer_t timer_t; >#define _TIMER_T_DECLARED >#endif ># 222 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _MQD_T_DECLARED >typedef __mqd_t mqd_t; >#define _MQD_T_DECLARED >#endif ># 227 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __u_register_t u_register_t; > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; /* user id */ >#define _UID_T_DECLARED >#endif ># 234 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _USECONDS_T_DECLARED >typedef __useconds_t useconds_t; /* microseconds (unsigned) */ >#define _USECONDS_T_DECLARED >#endif ># 239 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_IOCTL_T_DECLARED >#define _CAP_IOCTL_T_DECLARED >typedef unsigned long cap_ioctl_t; >#endif ># 244 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_RIGHTS_T_DECLARED >#define _CAP_RIGHTS_T_DECLARED >struct cap_rights; > >typedef struct cap_rights cap_rights_t; >#endif ># 251 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __vm_offset_t vm_offset_t; >typedef __vm_ooffset_t vm_ooffset_t; >typedef __vm_paddr_t vm_paddr_t; >typedef __vm_pindex_t vm_pindex_t; >typedef __vm_size_t vm_size_t; > >typedef __rman_res_t rman_res_t; > >#ifdef _KERNEL >typedef int boolean_t; >typedef struct device *device_t; >typedef __intfptr_t intfptr_t; > >/* > * XXX this is fixed width for historical reasons. It should have had type > * __int_fast32_t. Fixed-width types should not be used unless binary > * compatibility is essential. Least-width types should be used even less > * since they provide smaller benefits. > * > * XXX should be MD. > * > * XXX this is bogus in -current, but still used for spl*(). > */ >typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ > >typedef __uintfptr_t uintfptr_t; >typedef __uint64_t uoff_t; >typedef char vm_memattr_t; /* memory attribute codes */ >typedef struct vm_page *vm_page_t; > >#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) >#define __bool_true_false_are_defined 1 >#define false 0 >#define true 1 >#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) >typedef int _Bool; >#endif ># 289 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >typedef _Bool bool; >#endif /* !__bool_true_false_are_defined && !__cplusplus */ ># 291 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#define offsetof(type, field) __offsetof(type, field) > >#endif /* !_KERNEL */ ># 295 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >/* > * The following are all things that really shouldn't exist in this header, > * since its purpose is to provide typedefs, not miscellaneous doodads. > */ > >#ifdef __POPCNT__ >#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) >#define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) >#define __bitcount16(x) __builtin_popcount((__uint16_t)(x)) >#define __bitcountl(x) __builtin_popcountl((unsigned long)(x)) >#define __bitcount(x) __builtin_popcount((unsigned int)(x)) >#else ># 308 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >/* > * Population count algorithm using SWAR approach > * - "SIMD Within A Register". > */ >static __inline __uint16_t >__bitcount16(__uint16_t _x) >{ > > _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); > _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f; > _x = (_x + (_x >> 8)) & 0x00ff; > return (_x); >} > >static __inline __uint32_t >__bitcount32(__uint32_t _x) >{ > > _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); > _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)) & 0x000000ff; > return (_x); >} > >#ifdef __LP64__ >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); > _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)); > _x = (_x + (_x >> 32)) & 0x000000ff; > return (_x); >} > >#define __bitcountl(x) __bitcount64((unsigned long)(x)) >#else ># 351 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > return (__bitcount32(_x >> 32) + __bitcount32(_x)); >} > >#define __bitcountl(x) __bitcount32((unsigned long)(x)) >#endif ># 360 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#define __bitcount(x) __bitcount32((unsigned int)(x)) >#endif ># 362 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#if __BSD_VISIBLE > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/select.h> >#endif /* expanded by -frewrite-includes */ ># 365 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 1 3 4 >/*- > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/select.h 265051 2014-04-28 13:42:41Z emaste $ > */ > >#ifndef _SYS_SELECT_H_ >#define _SYS_SELECT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_sigset.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: head/sys/sys/_sigset.h 139825 2005-01-07 02:29:27Z imp $ > */ > >#ifndef _SYS__SIGSET_H_ >#define _SYS__SIGSET_H_ > >/* > * sigset_t macros. > */ >#define _SIG_WORDS 4 >#define _SIG_MAXSIG 128 >#define _SIG_IDX(sig) ((sig) - 1) >#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) >#define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31)) >#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) > >typedef struct __sigset { > __uint32_t __bits[_SIG_WORDS]; >} __sigset_t; > >#if defined(_KERNEL) && defined(COMPAT_43) >typedef unsigned int osigset_t; >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/sys/_sigset.h" 3 4 > >#endif /* !_SYS__SIGSET_H_ */ ># 60 "/usr/obj/usr/src/tmp/usr/include/sys/_sigset.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timeval.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_timeval.h 158471 2006-05-12 05:04:46Z jhb $ > */ > >#ifndef _SYS__TIMEVAL_H_ >#define _SYS__TIMEVAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; >#define _SUSECONDS_T_DECLARED >#endif ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 > >/* > * Structure returned by gettimeofday(2) system call, and used in other calls. > */ >struct timeval { > time_t tv_sec; /* seconds */ > suseconds_t tv_usec; /* and microseconds */ >}; > >#endif /* !_SYS__TIMEVAL_H_ */ ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: head/sys/sys/timespec.h 205792 2010-03-28 13:13:22Z ed $ > */ > >#ifndef _SYS_TIMESPEC_H_ >#define _SYS_TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: head/sys/sys/_timespec.h 205792 2010-03-28 13:13:22Z ed $ > */ > >#ifndef _SYS__TIMESPEC_H_ >#define _SYS__TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 > >struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ >}; > >#endif /* !_SYS__TIMESPEC_H_ */ ># 50 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 2 3 4 > >#if __BSD_VISIBLE >#define TIMEVAL_TO_TIMESPEC(tv, ts) \ > do { \ > (ts)->tv_sec = (tv)->tv_sec; \ > (ts)->tv_nsec = (tv)->tv_usec * 1000; \ > } while (0) >#define TIMESPEC_TO_TIMEVAL(tv, ts) \ > do { \ > (tv)->tv_sec = (ts)->tv_sec; \ > (tv)->tv_usec = (ts)->tv_nsec / 1000; \ > } while (0) > >#endif /* __BSD_VISIBLE */ ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 > >/* > * Structure defined by POSIX.1b to be like a itimerval, but with > * timespecs. Used in the timer_*() system calls. > */ >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >#endif /* _SYS_TIMESPEC_H_ */ ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 2 3 4 > >typedef unsigned long __fd_mask; >#if __BSD_VISIBLE >typedef __fd_mask fd_mask; >#endif ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >/* > * Select uses bit masks of file descriptors in longs. These macros > * manipulate such bit fields (the filesystem macros use chars). > * FD_SETSIZE may be defined by the user, but the default here should > * be enough for most uses. > */ >#ifndef FD_SETSIZE >#define FD_SETSIZE 1024 >#endif ># 61 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */ >#if __BSD_VISIBLE >#define NFDBITS _NFDBITS >#endif ># 66 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#ifndef _howmany >#define _howmany(x, y) (((x) + ((y) - 1)) / (y)) >#endif ># 70 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >typedef struct fd_set { > __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)]; >} fd_set; >#if __BSD_VISIBLE >#define fds_bits __fds_bits >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) >#define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n)) >#if __BSD_VISIBLE >#define FD_COPY(f, t) (void)(*(t) = *(f)) >#endif ># 83 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 >#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0) >#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n)) >#define FD_ZERO(p) do { \ > fd_set *_p; \ > __size_t _n; \ > \ > _p = (p); \ > _n = _howmany(FD_SETSIZE, _NFDBITS); \ > while (_n > 0) \ > _p->__fds_bits[--_n] = 0; \ >} while (0) > >#ifndef _KERNEL > >__BEGIN_DECLS >int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, > const struct timespec *__restrict, const sigset_t *__restrict); >#ifndef _SELECT_DECLARED >#define _SELECT_DECLARED >/* XXX missing restrict type-qualifier */ >int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); >#endif ># 105 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 107 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#endif /* _SYS_SELECT_H_ */ ># 109 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 366 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 > >/* > * minor() gives a cookie instead of an index since we don't want to > * change the meanings of bits 0-15 or waste time and space shifting > * bits 16-31 for devices that don't use them. > */ >#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ >#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ >#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > >/* > * These declarations belong elsewhere, but are repeated here and in > * <stdio.h> to give broken programs a better chance of working with > * 64-bit off_t's. > */ >#ifndef _KERNEL >__BEGIN_DECLS >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, off_t); >#endif ># 387 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >off_t lseek(int, off_t, int); >#endif ># 391 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void * mmap(void *, size_t, int, int, int, off_t); >#endif ># 395 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, off_t); >#endif ># 399 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 401 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#endif /* __BSD_VISIBLE */ ># 403 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#endif /* !_SYS_TYPES_H_ */ ># 405 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 27 "/usr/src/lib/libc/nameser/ns_name.c" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include <netinet/in.h> >#endif /* expanded by -frewrite-includes */ ># 28 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)in.h 8.3 (Berkeley) 1/3/94 > * $FreeBSD: head/sys/netinet/in.h 281649 2015-04-17 11:57:06Z glebius $ > */ > >#ifndef _NETINET_IN_H_ >#define _NETINET_IN_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/endian.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/endian.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 2 3 4 > >/* Protocols common to RFC 1700, POSIX, and X/Open. */ >#define IPPROTO_IP 0 /* dummy for IP */ >#define IPPROTO_ICMP 1 /* control message protocol */ >#define IPPROTO_TCP 6 /* tcp */ >#define IPPROTO_UDP 17 /* user datagram protocol */ > >#define INADDR_ANY ((in_addr_t)0x00000000) >#define INADDR_BROADCAST ((in_addr_t)0xffffffff) /* must be masked */ > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 53 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _IN_ADDR_T_DECLARED >typedef uint32_t in_addr_t; >#define _IN_ADDR_T_DECLARED >#endif ># 68 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _IN_PORT_T_DECLARED >typedef uint16_t in_port_t; >#define _IN_PORT_T_DECLARED >#endif ># 73 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _SA_FAMILY_T_DECLARED >typedef __sa_family_t sa_family_t; >#define _SA_FAMILY_T_DECLARED >#endif ># 78 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >/* Internet address (a structure for historical reasons). */ >#ifndef _STRUCT_IN_ADDR_DECLARED >struct in_addr { > in_addr_t s_addr; >}; >#define _STRUCT_IN_ADDR_DECLARED >#endif ># 86 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _SOCKLEN_T_DECLARED >typedef __socklen_t socklen_t; >#define _SOCKLEN_T_DECLARED >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sockaddr_storage.h> >#endif /* expanded by -frewrite-includes */ ># 92 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_sockaddr_storage.h" 1 3 4 >/*- > * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)socket.h 8.4 (Berkeley) 2/21/94 > * $FreeBSD: head/sys/sys/_sockaddr_storage.h 196967 2009-09-08 10:39:38Z phk $ > */ > >#ifndef _SYS__SOCKADDR_STORAGE_H_ >#define _SYS__SOCKADDR_STORAGE_H_ > >/* > * RFC 2553: protocol-independent placeholder for socket addresses > */ >#define _SS_MAXSIZE 128U >#define _SS_ALIGNSIZE (sizeof(__int64_t)) >#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - \ > sizeof(sa_family_t)) >#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - \ > sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE) > >struct sockaddr_storage { > unsigned char ss_len; /* address length */ > sa_family_t ss_family; /* address family */ > char __ss_pad1[_SS_PAD1SIZE]; > __int64_t __ss_align; /* force desired struct alignment */ > char __ss_pad2[_SS_PAD2SIZE]; >}; > >#endif /* !_SYS__SOCKADDR_STORAGE_H_ */ ># 55 "/usr/obj/usr/src/tmp/usr/include/sys/_sockaddr_storage.h" 3 4 ># 93 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 2 3 4 > >/* Socket address, internet style. */ >struct sockaddr_in { > uint8_t sin_len; > sa_family_t sin_family; > in_port_t sin_port; > struct in_addr sin_addr; > char sin_zero[8]; >}; > >#if !defined(_KERNEL) && __POSIX_VISIBLE >= 200112 > >#ifndef _BYTEORDER_PROTOTYPED >#define _BYTEORDER_PROTOTYPED >__BEGIN_DECLS >uint32_t htonl(uint32_t); >uint16_t htons(uint16_t); >uint32_t ntohl(uint32_t); >uint16_t ntohs(uint16_t); >__END_DECLS >#endif ># 114 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifndef _BYTEORDER_FUNC_DEFINED >#define _BYTEORDER_FUNC_DEFINED >#define htonl(x) __htonl(x) >#define htons(x) __htons(x) >#define ntohl(x) __ntohl(x) >#define ntohs(x) __ntohs(x) >#endif ># 122 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#endif /* !_KERNEL && __POSIX_VISIBLE >= 200112 */ ># 124 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#define IPPROTO_IPV6 41 /* IP6 header */ >#define IPPROTO_RAW 255 /* raw IP packet */ >#define INET_ADDRSTRLEN 16 >#endif ># 130 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#if __BSD_VISIBLE >/* > * Constants and structures defined by the internet system, > * Per RFC 790, September 1981, and numerous additions. > */ > >/* > * Protocols (RFC 1700) > */ >#define IPPROTO_HOPOPTS 0 /* IP6 hop-by-hop options */ >#define IPPROTO_IGMP 2 /* group mgmt protocol */ >#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */ >#define IPPROTO_IPV4 4 /* IPv4 encapsulation */ >#define IPPROTO_IPIP IPPROTO_IPV4 /* for compatibility */ >#define IPPROTO_ST 7 /* Stream protocol II */ >#define IPPROTO_EGP 8 /* exterior gateway protocol */ >#define IPPROTO_PIGP 9 /* private interior gateway */ >#define IPPROTO_RCCMON 10 /* BBN RCC Monitoring */ >#define IPPROTO_NVPII 11 /* network voice protocol*/ >#define IPPROTO_PUP 12 /* pup */ >#define IPPROTO_ARGUS 13 /* Argus */ >#define IPPROTO_EMCON 14 /* EMCON */ >#define IPPROTO_XNET 15 /* Cross Net Debugger */ >#define IPPROTO_CHAOS 16 /* Chaos*/ >#define IPPROTO_MUX 18 /* Multiplexing */ >#define IPPROTO_MEAS 19 /* DCN Measurement Subsystems */ >#define IPPROTO_HMP 20 /* Host Monitoring */ >#define IPPROTO_PRM 21 /* Packet Radio Measurement */ >#define IPPROTO_IDP 22 /* xns idp */ >#define IPPROTO_TRUNK1 23 /* Trunk-1 */ >#define IPPROTO_TRUNK2 24 /* Trunk-2 */ >#define IPPROTO_LEAF1 25 /* Leaf-1 */ >#define IPPROTO_LEAF2 26 /* Leaf-2 */ >#define IPPROTO_RDP 27 /* Reliable Data */ >#define IPPROTO_IRTP 28 /* Reliable Transaction */ >#define IPPROTO_TP 29 /* tp-4 w/ class negotiation */ >#define IPPROTO_BLT 30 /* Bulk Data Transfer */ >#define IPPROTO_NSP 31 /* Network Services */ >#define IPPROTO_INP 32 /* Merit Internodal */ >#define IPPROTO_SEP 33 /* Sequential Exchange */ >#define IPPROTO_3PC 34 /* Third Party Connect */ >#define IPPROTO_IDPR 35 /* InterDomain Policy Routing */ >#define IPPROTO_XTP 36 /* XTP */ >#define IPPROTO_DDP 37 /* Datagram Delivery */ >#define IPPROTO_CMTP 38 /* Control Message Transport */ >#define IPPROTO_TPXX 39 /* TP++ Transport */ >#define IPPROTO_IL 40 /* IL transport protocol */ >#define IPPROTO_SDRP 42 /* Source Demand Routing */ >#define IPPROTO_ROUTING 43 /* IP6 routing header */ >#define IPPROTO_FRAGMENT 44 /* IP6 fragmentation header */ >#define IPPROTO_IDRP 45 /* InterDomain Routing*/ >#define IPPROTO_RSVP 46 /* resource reservation */ >#define IPPROTO_GRE 47 /* General Routing Encap. */ >#define IPPROTO_MHRP 48 /* Mobile Host Routing */ >#define IPPROTO_BHA 49 /* BHA */ >#define IPPROTO_ESP 50 /* IP6 Encap Sec. Payload */ >#define IPPROTO_AH 51 /* IP6 Auth Header */ >#define IPPROTO_INLSP 52 /* Integ. Net Layer Security */ >#define IPPROTO_SWIPE 53 /* IP with encryption */ >#define IPPROTO_NHRP 54 /* Next Hop Resolution */ >#define IPPROTO_MOBILE 55 /* IP Mobility */ >#define IPPROTO_TLSP 56 /* Transport Layer Security */ >#define IPPROTO_SKIP 57 /* SKIP */ >#define IPPROTO_ICMPV6 58 /* ICMP6 */ >#define IPPROTO_NONE 59 /* IP6 no next header */ >#define IPPROTO_DSTOPTS 60 /* IP6 destination option */ >#define IPPROTO_AHIP 61 /* any host internal protocol */ >#define IPPROTO_CFTP 62 /* CFTP */ >#define IPPROTO_HELLO 63 /* "hello" routing protocol */ >#define IPPROTO_SATEXPAK 64 /* SATNET/Backroom EXPAK */ >#define IPPROTO_KRYPTOLAN 65 /* Kryptolan */ >#define IPPROTO_RVD 66 /* Remote Virtual Disk */ >#define IPPROTO_IPPC 67 /* Pluribus Packet Core */ >#define IPPROTO_ADFS 68 /* Any distributed FS */ >#define IPPROTO_SATMON 69 /* Satnet Monitoring */ >#define IPPROTO_VISA 70 /* VISA Protocol */ >#define IPPROTO_IPCV 71 /* Packet Core Utility */ >#define IPPROTO_CPNX 72 /* Comp. Prot. Net. Executive */ >#define IPPROTO_CPHB 73 /* Comp. Prot. HeartBeat */ >#define IPPROTO_WSN 74 /* Wang Span Network */ >#define IPPROTO_PVP 75 /* Packet Video Protocol */ >#define IPPROTO_BRSATMON 76 /* BackRoom SATNET Monitoring */ >#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */ >#define IPPROTO_WBMON 78 /* WIDEBAND Monitoring */ >#define IPPROTO_WBEXPAK 79 /* WIDEBAND EXPAK */ >#define IPPROTO_EON 80 /* ISO cnlp */ >#define IPPROTO_VMTP 81 /* VMTP */ >#define IPPROTO_SVMTP 82 /* Secure VMTP */ >#define IPPROTO_VINES 83 /* Banyon VINES */ >#define IPPROTO_TTP 84 /* TTP */ >#define IPPROTO_IGP 85 /* NSFNET-IGP */ >#define IPPROTO_DGP 86 /* dissimilar gateway prot. */ >#define IPPROTO_TCF 87 /* TCF */ >#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */ >#define IPPROTO_OSPFIGP 89 /* OSPFIGP */ >#define IPPROTO_SRPC 90 /* Strite RPC protocol */ >#define IPPROTO_LARP 91 /* Locus Address Resoloution */ >#define IPPROTO_MTP 92 /* Multicast Transport */ >#define IPPROTO_AX25 93 /* AX.25 Frames */ >#define IPPROTO_IPEIP 94 /* IP encapsulated in IP */ >#define IPPROTO_MICP 95 /* Mobile Int.ing control */ >#define IPPROTO_SCCSP 96 /* Semaphore Comm. security */ >#define IPPROTO_ETHERIP 97 /* Ethernet IP encapsulation */ >#define IPPROTO_ENCAP 98 /* encapsulation header */ >#define IPPROTO_APES 99 /* any private encr. scheme */ >#define IPPROTO_GMTP 100 /* GMTP*/ >#define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */ >#define IPPROTO_SCTP 132 /* SCTP */ >#define IPPROTO_MH 135 /* IPv6 Mobility Header */ >#define IPPROTO_UDPLITE 136 /* UDP-Lite */ >#define IPPROTO_HIP 139 /* IP6 Host Identity Protocol */ >#define IPPROTO_SHIM6 140 /* IP6 Shim6 Protocol */ >/* 101-254: Partly Unassigned */ >#define IPPROTO_PIM 103 /* Protocol Independent Mcast */ >#define IPPROTO_CARP 112 /* CARP */ >#define IPPROTO_PGM 113 /* PGM */ >#define IPPROTO_MPLS 137 /* MPLS-in-IP */ >#define IPPROTO_PFSYNC 240 /* PFSYNC */ >#define IPPROTO_RESERVED_253 253 /* Reserved */ >#define IPPROTO_RESERVED_254 254 /* Reserved */ >/* 255: Reserved */ >/* BSD Private, local use, namespace incursion, no longer used */ >#define IPPROTO_OLD_DIVERT 254 /* OLD divert pseudo-proto */ >#define IPPROTO_MAX 256 > >/* last return value of *_input(), meaning "all job for this pkt is done". */ >#define IPPROTO_DONE 257 > >/* Only used internally, so can be outside the range of valid IP protocols. */ >#define IPPROTO_DIVERT 258 /* divert pseudo-protocol */ >#define IPPROTO_SEND 259 /* SeND pseudo-protocol */ > >/* > * Defined to avoid confusion. The master value is defined by > * PROTO_SPACER in sys/protosw.h. > */ >#define IPPROTO_SPACER 32767 /* spacer for loadable protos */ > >/* > * Local port number conventions: > * > * When a user does a bind(2) or connect(2) with a port number of zero, > * a non-conflicting local port address is chosen. > * The default range is IPPORT_HIFIRSTAUTO through > * IPPORT_HILASTAUTO, although that is settable by sysctl. > * > * A user may set the IPPROTO_IP option IP_PORTRANGE to change this > * default assignment range. > * > * The value IP_PORTRANGE_DEFAULT causes the default behavior. > * > * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers > * into the "high" range. These are reserved for client outbound connections > * which do not want to be filtered by any firewalls. > * > * The value IP_PORTRANGE_LOW changes the range to the "low" are > * that is (by convention) restricted to privileged processes. This > * convention is based on "vouchsafe" principles only. It is only secure > * if you trust the remote host to restrict these ports. > * > * The default range of ports and the high range can be changed by > * sysctl(3). (net.inet.ip.port{hi,low}{first,last}_auto) > * > * Changing those values has bad security implications if you are > * using a stateless firewall that is allowing packets outside of that > * range in order to allow transparent outgoing connections. > * > * Such a firewall configuration will generally depend on the use of these > * default values. If you change them, you may find your Security > * Administrator looking for you with a heavy object. > * > * For a slightly more orthodox text view on this: > * > * ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers > * > * port numbers are divided into three ranges: > * > * 0 - 1023 Well Known Ports > * 1024 - 49151 Registered Ports > * 49152 - 65535 Dynamic and/or Private Ports > * > */ > >/* > * Ports < IPPORT_RESERVED are reserved for > * privileged processes (e.g. root). (IP_PORTRANGE_LOW) > */ >#define IPPORT_RESERVED 1024 > >/* > * Default local port range, used by IP_PORTRANGE_DEFAULT > */ >#define IPPORT_EPHEMERALFIRST 10000 >#define IPPORT_EPHEMERALLAST 65535 > >/* > * Dynamic port range, used by IP_PORTRANGE_HIGH. > */ >#define IPPORT_HIFIRSTAUTO 49152 >#define IPPORT_HILASTAUTO 65535 > >/* > * Scanning for a free reserved port return a value below IPPORT_RESERVED, > * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was > * 512, but that conflicts with some well-known-services that firewalls may > * have a fit if we use. > */ >#define IPPORT_RESERVEDSTART 600 > >#define IPPORT_MAX 65535 > >/* > * Definitions of bits in internet address integers. > * On subnets, the decomposition of addresses to host and net parts > * is done according to subnet mask, not the masks here. > */ >#define IN_CLASSA(i) (((in_addr_t)(i) & 0x80000000) == 0) >#define IN_CLASSA_NET 0xff000000 >#define IN_CLASSA_NSHIFT 24 >#define IN_CLASSA_HOST 0x00ffffff >#define IN_CLASSA_MAX 128 > >#define IN_CLASSB(i) (((in_addr_t)(i) & 0xc0000000) == 0x80000000) >#define IN_CLASSB_NET 0xffff0000 >#define IN_CLASSB_NSHIFT 16 >#define IN_CLASSB_HOST 0x0000ffff >#define IN_CLASSB_MAX 65536 > >#define IN_CLASSC(i) (((in_addr_t)(i) & 0xe0000000) == 0xc0000000) >#define IN_CLASSC_NET 0xffffff00 >#define IN_CLASSC_NSHIFT 8 >#define IN_CLASSC_HOST 0x000000ff > >#define IN_CLASSD(i) (((in_addr_t)(i) & 0xf0000000) == 0xe0000000) >#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */ >#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */ >#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */ >#define IN_MULTICAST(i) IN_CLASSD(i) > >#define IN_EXPERIMENTAL(i) (((in_addr_t)(i) & 0xf0000000) == 0xf0000000) >#define IN_BADCLASS(i) (((in_addr_t)(i) & 0xf0000000) == 0xf0000000) > >#define IN_LINKLOCAL(i) (((in_addr_t)(i) & 0xffff0000) == 0xa9fe0000) >#define IN_LOOPBACK(i) (((in_addr_t)(i) & 0xff000000) == 0x7f000000) >#define IN_ZERONET(i) (((in_addr_t)(i) & 0xff000000) == 0) > >#define IN_PRIVATE(i) ((((in_addr_t)(i) & 0xff000000) == 0x0a000000) || \ > (((in_addr_t)(i) & 0xfff00000) == 0xac100000) || \ > (((in_addr_t)(i) & 0xffff0000) == 0xc0a80000)) > >#define IN_LOCAL_GROUP(i) (((in_addr_t)(i) & 0xffffff00) == 0xe0000000) > >#define IN_ANY_LOCAL(i) (IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i)) > >#define INADDR_LOOPBACK ((in_addr_t)0x7f000001) >#ifndef _KERNEL >#define INADDR_NONE ((in_addr_t)0xffffffff) /* -1 return */ >#endif ># 389 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#define INADDR_UNSPEC_GROUP ((in_addr_t)0xe0000000) /* 224.0.0.0 */ >#define INADDR_ALLHOSTS_GROUP ((in_addr_t)0xe0000001) /* 224.0.0.1 */ >#define INADDR_ALLRTRS_GROUP ((in_addr_t)0xe0000002) /* 224.0.0.2 */ >#define INADDR_ALLRPTS_GROUP ((in_addr_t)0xe0000016) /* 224.0.0.22, IGMPv3 */ >#define INADDR_CARP_GROUP ((in_addr_t)0xe0000012) /* 224.0.0.18 */ >#define INADDR_PFSYNC_GROUP ((in_addr_t)0xe00000f0) /* 224.0.0.240 */ >#define INADDR_ALLMDNS_GROUP ((in_addr_t)0xe00000fb) /* 224.0.0.251 */ >#define INADDR_MAX_LOCAL_GROUP ((in_addr_t)0xe00000ff) /* 224.0.0.255 */ > >#define IN_LOOPBACKNET 127 /* official! */ > >#define IN_RFC3021_MASK ((in_addr_t)0xfffffffe) > >/* > * Options for use with [gs]etsockopt at the IP level. > * First word of comment is data type; bool is stored in int. > */ >#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */ >#define IP_HDRINCL 2 /* int; header is included with data */ >#define IP_TOS 3 /* int; IP type of service and preced. */ >#define IP_TTL 4 /* int; IP time to live */ >#define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */ >#define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */ >#define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */ >#define IP_SENDSRCADDR IP_RECVDSTADDR /* cmsg_type to set src addr */ >#define IP_RETOPTS 8 /* ip_opts; set/get IP options */ >#define IP_MULTICAST_IF 9 /* struct in_addr *or* struct ip_mreqn; > * set/get IP multicast i/f */ >#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */ >#define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */ >#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ >#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ >#define IP_MULTICAST_VIF 14 /* set/get IP mcast virt. iface */ >#define IP_RSVP_ON 15 /* enable RSVP in kernel */ >#define IP_RSVP_OFF 16 /* disable RSVP in kernel */ >#define IP_RSVP_VIF_ON 17 /* set RSVP per-vif socket */ >#define IP_RSVP_VIF_OFF 18 /* unset RSVP per-vif socket */ >#define IP_PORTRANGE 19 /* int; range to choose for unspec port */ >#define IP_RECVIF 20 /* bool; receive reception if w/dgram */ >/* for IPSEC */ >#define IP_IPSEC_POLICY 21 /* int; set/get security policy */ > /* unused; was IP_FAITH */ >#define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ >#define IP_BINDANY 24 /* bool: allow bind to any address */ >#define IP_BINDMULTI 25 /* bool: allow multiple listeners on a tuple */ >#define IP_RSS_LISTEN_BUCKET 26 /* int; set RSS listen bucket */ > >/* > * Options for controlling the firewall and dummynet. > * Historical options (from 40 to 64) will eventually be > * replaced by only two options, IP_FW3 and IP_DUMMYNET3. > */ >#define IP_FW_TABLE_ADD 40 /* add entry */ >#define IP_FW_TABLE_DEL 41 /* delete entry */ >#define IP_FW_TABLE_FLUSH 42 /* flush table */ >#define IP_FW_TABLE_GETSIZE 43 /* get table size */ >#define IP_FW_TABLE_LIST 44 /* list table contents */ > >#define IP_FW3 48 /* generic ipfw v.3 sockopts */ >#define IP_DUMMYNET3 49 /* generic dummynet v.3 sockopts */ > >#define IP_FW_ADD 50 /* add a firewall rule to chain */ >#define IP_FW_DEL 51 /* delete a firewall rule from chain */ >#define IP_FW_FLUSH 52 /* flush firewall rule chain */ >#define IP_FW_ZERO 53 /* clear single/all firewall counter(s) */ >#define IP_FW_GET 54 /* get entire firewall rule chain */ >#define IP_FW_RESETLOG 55 /* reset logging counters */ > >#define IP_FW_NAT_CFG 56 /* add/config a nat rule */ >#define IP_FW_NAT_DEL 57 /* delete a nat rule */ >#define IP_FW_NAT_GET_CONFIG 58 /* get configuration of a nat rule */ >#define IP_FW_NAT_GET_LOG 59 /* get log of a nat rule */ > >#define IP_DUMMYNET_CONFIGURE 60 /* add/configure a dummynet pipe */ >#define IP_DUMMYNET_DEL 61 /* delete a dummynet pipe from chain */ >#define IP_DUMMYNET_FLUSH 62 /* flush dummynet */ >#define IP_DUMMYNET_GET 64 /* get entire dummynet pipes */ > >#define IP_RECVTTL 65 /* bool; receive IP TTL w/dgram */ >#define IP_MINTTL 66 /* minimum TTL for packet or drop */ >#define IP_DONTFRAG 67 /* don't fragment packet */ >#define IP_RECVTOS 68 /* bool; receive IP TOS w/dgram */ > >/* IPv4 Source Filter Multicast API [RFC3678] */ >#define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */ >#define IP_DROP_SOURCE_MEMBERSHIP 71 /* drop a single source */ >#define IP_BLOCK_SOURCE 72 /* block a source */ >#define IP_UNBLOCK_SOURCE 73 /* unblock a source */ > >/* The following option is private; do not use it from user applications. */ >#define IP_MSFILTER 74 /* set/get filter list */ > >/* Protocol Independent Multicast API [RFC3678] */ >#define MCAST_JOIN_GROUP 80 /* join an any-source group */ >#define MCAST_LEAVE_GROUP 81 /* leave all sources for group */ >#define MCAST_JOIN_SOURCE_GROUP 82 /* join a source-specific group */ >#define MCAST_LEAVE_SOURCE_GROUP 83 /* leave a single source */ >#define MCAST_BLOCK_SOURCE 84 /* block a source */ >#define MCAST_UNBLOCK_SOURCE 85 /* unblock a source */ > >/* Flow and RSS definitions */ >#define IP_FLOWID 90 /* get flow id for the given socket/inp */ >#define IP_FLOWTYPE 91 /* get flow type (M_HASHTYPE) */ >#define IP_RSSBUCKETID 92 /* get RSS flowid -> bucket mapping */ >#define IP_RECVFLOWID 93 /* bool; receive IP flowid/flowtype w/ datagram */ >#define IP_RECVRSSBUCKETID 94 /* bool; receive IP RSS bucket id w/ datagram */ > >/* > * Defaults and limits for options > */ >#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ >#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ > >/* > * The imo_membership vector for each socket is now dynamically allocated at > * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized > * according to a power-of-two increment. > */ >#define IP_MIN_MEMBERSHIPS 31 >#define IP_MAX_MEMBERSHIPS 4095 >#define IP_MAX_SOURCE_FILTER 1024 /* XXX to be unused */ > >/* > * Default resource limits for IPv4 multicast source filtering. > * These may be modified by sysctl. > */ >#define IP_MAX_GROUP_SRC_FILTER 512 /* sources per group */ >#define IP_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ >#define IP_MAX_SOCK_MUTE_FILTER 128 /* XXX no longer used */ > >/* > * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. > */ >struct ip_mreq { > struct in_addr imr_multiaddr; /* IP multicast address of group */ > struct in_addr imr_interface; /* local IP address of interface */ >}; > >/* > * Modified argument structure for IP_MULTICAST_IF, obtained from Linux. > * This is used to specify an interface index for multicast sends, as > * the IPv4 legacy APIs do not support this (unless IP_SENDIF is available). > */ >struct ip_mreqn { > struct in_addr imr_multiaddr; /* IP multicast address of group */ > struct in_addr imr_address; /* local IP address of interface */ > int imr_ifindex; /* Interface index; cast to uint32_t */ >}; > >/* > * Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] > */ >struct ip_mreq_source { > struct in_addr imr_multiaddr; /* IP multicast address of group */ > struct in_addr imr_sourceaddr; /* IP address of source */ > struct in_addr imr_interface; /* local IP address of interface */ >}; > >/* > * Argument structures for Protocol-Independent Multicast Source > * Filter APIs. [RFC3678] > */ >struct group_req { > uint32_t gr_interface; /* interface index */ > struct sockaddr_storage gr_group; /* group address */ >}; > >struct group_source_req { > uint32_t gsr_interface; /* interface index */ > struct sockaddr_storage gsr_group; /* group address */ > struct sockaddr_storage gsr_source; /* source address */ >}; > >#ifndef __MSFILTERREQ_DEFINED >#define __MSFILTERREQ_DEFINED >/* > * The following structure is private; do not use it from user applications. > * It is used to communicate IP_MSFILTER/IPV6_MSFILTER information between > * the RFC 3678 libc functions and the kernel. > */ >struct __msfilterreq { > uint32_t msfr_ifindex; /* interface index */ > uint32_t msfr_fmode; /* filter mode for group */ > uint32_t msfr_nsrcs; /* # of sources in msfr_srcs */ > struct sockaddr_storage msfr_group; /* group address */ > struct sockaddr_storage *msfr_srcs; /* pointer to the first member > * of a contiguous array of > * sources to filter in full. > */ >}; >#endif ># 581 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >struct sockaddr; > >/* > * Advanced (Full-state) APIs [RFC3678] > * The RFC specifies uint_t for the 6th argument to [sg]etsourcefilter(). > * We use uint32_t here to be consistent. > */ >int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t, > uint32_t, struct in_addr *); >int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *, > uint32_t *, struct in_addr *); >int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, > uint32_t, uint32_t, struct sockaddr_storage *); >int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, > uint32_t *, uint32_t *, struct sockaddr_storage *); > >/* > * Filter modes; also used to represent per-socket filter mode internally. > */ >#define MCAST_UNDEFINED 0 /* fmode: not yet defined */ >#define MCAST_INCLUDE 1 /* fmode: include these source(s) */ >#define MCAST_EXCLUDE 2 /* fmode: exclude these source(s) */ > >/* > * Argument for IP_PORTRANGE: > * - which range to search when port is unspecified at bind() or connect() > */ >#define IP_PORTRANGE_DEFAULT 0 /* default range */ >#define IP_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ >#define IP_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ > >/* > * Identifiers for IP sysctl nodes > */ >#define IPCTL_FORWARDING 1 /* act as router */ >#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ >#define IPCTL_DEFTTL 3 /* default TTL */ >#ifdef notyet >#define IPCTL_DEFMTU 4 /* default MTU */ >#endif ># 622 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 >/* IPCTL_RTEXPIRE 5 deprecated */ >/* IPCTL_RTMINEXPIRE 6 deprecated */ >/* IPCTL_RTMAXCACHE 7 deprecated */ >#define IPCTL_SOURCEROUTE 8 /* may perform source routes */ >#define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */ >#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */ >#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */ >#define IPCTL_STATS 12 /* ipstat structure */ >#define IPCTL_ACCEPTSOURCEROUTE 13 /* may accept source routed packets */ >#define IPCTL_FASTFORWARDING 14 /* use fast IP forwarding code */ > /* 15, unused, was: IPCTL_KEEPFAITH */ >#define IPCTL_GIF_TTL 16 /* default TTL for gif encap packet */ > >#endif /* __BSD_VISIBLE */ ># 636 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#ifdef _KERNEL > >struct ifnet; struct mbuf; /* forward declarations for Standard C */ > >int in_broadcast(struct in_addr, struct ifnet *); >int in_canforward(struct in_addr); >int in_localaddr(struct in_addr); >int in_localip(struct in_addr); >int in_ifhasaddr(struct ifnet *, struct in_addr); >int inet_aton(const char *, struct in_addr *); /* in libkern */ >char *inet_ntoa(struct in_addr); /* in libkern */ >char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */ >char *inet_ntop(int, const void *, char *, socklen_t); /* in libkern */ >int inet_pton(int af, const char *, void *); /* in libkern */ >void in_ifdetach(struct ifnet *); > >#define in_hosteq(s, t) ((s).s_addr == (t).s_addr) >#define in_nullhost(x) ((x).s_addr == INADDR_ANY) >#define in_allhosts(x) ((x).s_addr == htonl(INADDR_ALLHOSTS_GROUP)) > >#define satosin(sa) ((struct sockaddr_in *)(sa)) >#define sintosa(sin) ((struct sockaddr *)(sin)) >#define ifatoia(ifa) ((struct in_ifaddr *)(ifa)) >#endif /* _KERNEL */ ># 661 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >/* INET6 stuff */ >#if __POSIX_VISIBLE >= 200112 >#define __KAME_NETINET_IN_H_INCLUDED_ >#if 0 /* expanded by -frewrite-includes */ >#include <netinet6/in6.h> >#endif /* expanded by -frewrite-includes */ ># 665 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 1 3 4 >/*- > * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the project nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ > */ > >/*- > * Copyright (c) 1982, 1986, 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)in.h 8.3 (Berkeley) 1/3/94 > * $FreeBSD: head/sys/netinet6/in6.h 302906 2016-07-15 17:09:30Z ae $ > */ > >#ifndef __KAME_NETINET_IN_H_INCLUDED_ >#error "do not include netinet6/in6.h directly, include netinet/in.h. see RFC2553" >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#ifndef _NETINET6_IN6_H_ >#define _NETINET6_IN6_H_ > >/* > * Identification of the network protocol stack > * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE > * has the table of implementation/integration differences. > */ >#define __KAME__ >#define __KAME_VERSION "FreeBSD" > >/* > * IPv6 port allocation rules should mirror the IPv4 rules and are controlled > * by the net.inet.ip.portrange sysctl tree. The following defines exist > * for compatibility with userland applications that need them. > */ >#if __BSD_VISIBLE >#define IPV6PORT_RESERVED 1024 >#define IPV6PORT_ANONMIN 49152 >#define IPV6PORT_ANONMAX 65535 >#define IPV6PORT_RESERVEDMIN 600 >#define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1) >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * IPv6 address > */ >struct in6_addr { > union { > uint8_t __u6_addr8[16]; > uint16_t __u6_addr16[8]; > uint32_t __u6_addr32[4]; > } __u6_addr; /* 128-bit IP6 address */ >}; > >#define s6_addr __u6_addr.__u6_addr8 >#ifdef _KERNEL /* XXX nonstandard */ >#define s6_addr8 __u6_addr.__u6_addr8 >#define s6_addr16 __u6_addr.__u6_addr16 >#define s6_addr32 __u6_addr.__u6_addr32 >#endif ># 109 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#define INET6_ADDRSTRLEN 46 > >/* > * XXX missing POSIX.1-2001 macro IPPROTO_IPV6. > */ > >/* > * Socket address for IPv6 > */ >#if __BSD_VISIBLE >#define SIN6_LEN >#endif ># 122 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >struct sockaddr_in6 { > uint8_t sin6_len; /* length of this struct */ > sa_family_t sin6_family; /* AF_INET6 */ > in_port_t sin6_port; /* Transport layer port # */ > uint32_t sin6_flowinfo; /* IP6 flow information */ > struct in6_addr sin6_addr; /* IP6 address */ > uint32_t sin6_scope_id; /* scope zone index */ >}; > >/* > * Local definition for masks > */ >#ifdef _KERNEL /* XXX nonstandard */ >#define IN6MASK0 {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}} >#define IN6MASK32 {{{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} >#define IN6MASK64 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} >#define IN6MASK96 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ > 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}} >#define IN6MASK128 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ > 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}} >#endif ># 146 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#ifdef _KERNEL >extern const struct sockaddr_in6 sa6_any; > >extern const struct in6_addr in6mask0; >extern const struct in6_addr in6mask32; >extern const struct in6_addr in6mask64; >extern const struct in6_addr in6mask96; >extern const struct in6_addr in6mask128; >#endif /* _KERNEL */ ># 156 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Macros started with IPV6_ADDR is KAME local > */ >#ifdef _KERNEL /* XXX nonstandard */ >#if _BYTE_ORDER == _BIG_ENDIAN >#define IPV6_ADDR_INT32_ONE 1 >#define IPV6_ADDR_INT32_TWO 2 >#define IPV6_ADDR_INT32_MNL 0xff010000 >#define IPV6_ADDR_INT32_MLL 0xff020000 >#define IPV6_ADDR_INT32_SMP 0x0000ffff >#define IPV6_ADDR_INT16_ULL 0xfe80 >#define IPV6_ADDR_INT16_USL 0xfec0 >#define IPV6_ADDR_INT16_MLL 0xff02 >#elif _BYTE_ORDER == _LITTLE_ENDIAN ># 171 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define IPV6_ADDR_INT32_ONE 0x01000000 >#define IPV6_ADDR_INT32_TWO 0x02000000 >#define IPV6_ADDR_INT32_MNL 0x000001ff >#define IPV6_ADDR_INT32_MLL 0x000002ff >#define IPV6_ADDR_INT32_SMP 0xffff0000 >#define IPV6_ADDR_INT16_ULL 0x80fe >#define IPV6_ADDR_INT16_USL 0xc0fe >#define IPV6_ADDR_INT16_MLL 0x02ff >#endif ># 180 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#endif ># 181 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Definition of some useful macros to handle IP6 addresses > */ >#if __BSD_VISIBLE >#define IN6ADDR_ANY_INIT \ > {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} >#define IN6ADDR_LOOPBACK_INIT \ > {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} >#define IN6ADDR_NODELOCAL_ALLNODES_INIT \ > {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} >#define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \ > {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} >#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ > {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} >#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ > {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}} >#define IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT \ > {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 }}} >#endif ># 208 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >extern const struct in6_addr in6addr_any; >extern const struct in6_addr in6addr_loopback; >#if __BSD_VISIBLE >extern const struct in6_addr in6addr_nodelocal_allnodes; >extern const struct in6_addr in6addr_linklocal_allnodes; >extern const struct in6_addr in6addr_linklocal_allrouters; >extern const struct in6_addr in6addr_linklocal_allv2routers; >#endif ># 217 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Equality > * NOTE: Some of kernel programming environment (for example, openbsd/sparc) > * does not supply memcmp(). For userland memcmp() is preferred as it is > * in ANSI standard. > */ >#ifdef _KERNEL >#define IN6_ARE_ADDR_EQUAL(a, b) \ > (bcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) >#else ># 228 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#if __BSD_VISIBLE >#define IN6_ARE_ADDR_EQUAL(a, b) \ > (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) >#endif ># 232 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#endif ># 233 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Unspecified > */ >#define IN6_IS_ADDR_UNSPECIFIED(a) \ > ((a)->__u6_addr.__u6_addr32[0] == 0 && \ > (a)->__u6_addr.__u6_addr32[1] == 0 && \ > (a)->__u6_addr.__u6_addr32[2] == 0 && \ > (a)->__u6_addr.__u6_addr32[3] == 0) > >/* > * Loopback > */ >#define IN6_IS_ADDR_LOOPBACK(a) \ > ((a)->__u6_addr.__u6_addr32[0] == 0 && \ > (a)->__u6_addr.__u6_addr32[1] == 0 && \ > (a)->__u6_addr.__u6_addr32[2] == 0 && \ > (a)->__u6_addr.__u6_addr32[3] == ntohl(1)) > >/* > * IPv4 compatible > */ >#define IN6_IS_ADDR_V4COMPAT(a) \ > ((a)->__u6_addr.__u6_addr32[0] == 0 && \ > (a)->__u6_addr.__u6_addr32[1] == 0 && \ > (a)->__u6_addr.__u6_addr32[2] == 0 && \ > (a)->__u6_addr.__u6_addr32[3] != 0 && \ > (a)->__u6_addr.__u6_addr32[3] != ntohl(1)) > >/* > * Mapped > */ >#define IN6_IS_ADDR_V4MAPPED(a) \ > ((a)->__u6_addr.__u6_addr32[0] == 0 && \ > (a)->__u6_addr.__u6_addr32[1] == 0 && \ > (a)->__u6_addr.__u6_addr32[2] == ntohl(0x0000ffff)) > >/* > * KAME Scope Values > */ > >#ifdef _KERNEL /* XXX nonstandard */ >#define IPV6_ADDR_SCOPE_NODELOCAL 0x01 >#define IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 >#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02 >#define IPV6_ADDR_SCOPE_SITELOCAL 0x05 >#define IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */ >#define IPV6_ADDR_SCOPE_GLOBAL 0x0e >#else ># 282 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define __IPV6_ADDR_SCOPE_NODELOCAL 0x01 >#define __IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 >#define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02 >#define __IPV6_ADDR_SCOPE_SITELOCAL 0x05 >#define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */ >#define __IPV6_ADDR_SCOPE_GLOBAL 0x0e >#endif ># 289 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Unicast Scope > * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). > */ >#define IN6_IS_ADDR_LINKLOCAL(a) \ > (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) >#define IN6_IS_ADDR_SITELOCAL(a) \ > (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) > >/* > * Multicast > */ >#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) > >#ifdef _KERNEL /* XXX nonstandard */ >#define IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) >#else ># 307 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) >#endif ># 309 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Multicast Scope > */ >#ifdef _KERNEL /* refers nonstandard items */ >#define IN6_IS_ADDR_MC_NODELOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL)) >#define IN6_IS_ADDR_MC_INTFACELOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_INTFACELOCAL)) >#define IN6_IS_ADDR_MC_LINKLOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL)) >#define IN6_IS_ADDR_MC_SITELOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL)) >#define IN6_IS_ADDR_MC_ORGLOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL)) >#define IN6_IS_ADDR_MC_GLOBAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL)) >#else ># 333 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define IN6_IS_ADDR_MC_NODELOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL)) >#define IN6_IS_ADDR_MC_LINKLOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL)) >#define IN6_IS_ADDR_MC_SITELOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL)) >#define IN6_IS_ADDR_MC_ORGLOCAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL)) >#define IN6_IS_ADDR_MC_GLOBAL(a) \ > (IN6_IS_ADDR_MULTICAST(a) && \ > (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL)) >#endif ># 349 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#ifdef _KERNEL /* nonstandard */ >/* > * KAME Scope > */ >#define IN6_IS_SCOPE_LINKLOCAL(a) \ > ((IN6_IS_ADDR_LINKLOCAL(a)) || \ > (IN6_IS_ADDR_MC_LINKLOCAL(a))) >#define IN6_IS_SCOPE_EMBED(a) \ > ((IN6_IS_ADDR_LINKLOCAL(a)) || \ > (IN6_IS_ADDR_MC_LINKLOCAL(a)) || \ > (IN6_IS_ADDR_MC_INTFACELOCAL(a))) > >#define IFA6_IS_DEPRECATED(a) \ > ((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \ > (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \ > (a)->ia6_lifetime.ia6t_pltime) >#define IFA6_IS_INVALID(a) \ > ((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \ > (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \ > (a)->ia6_lifetime.ia6t_vltime) >#endif /* _KERNEL */ ># 371 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * IP6 route structure > */ >#if __BSD_VISIBLE >struct route_in6 { > struct rtentry *ro_rt; > struct llentry *ro_lle; > /* > * ro_prepend and ro_plen are only used for bpf to pass in a > * preformed header. They are not cacheable. > */ > char *ro_prepend; > uint16_t ro_plen; > uint16_t ro_flags; > uint16_t ro_mtu; /* saved ro_rt mtu */ > uint16_t spare; > struct sockaddr_in6 ro_dst; >}; >#endif ># 391 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#ifdef _KERNEL >#define MTAG_ABI_IPV6 1444287380 /* IPv6 ABI */ >#define IPV6_TAG_DIRECT 0 /* direct-dispatch IPv6 */ >#endif /* _KERNEL */ ># 396 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Options for use with [gs]etsockopt at the IPV6 level. > * First word of comment is data type; bool is stored in int. > */ >/* no hdrincl */ >#if 0 /* the followings are relic in IPv4 and hence are disabled */ >#define IPV6_OPTIONS 1 /* buf/ip6_opts; set/get IP6 options */ >#define IPV6_RECVOPTS 5 /* bool; receive all IP6 opts w/dgram */ >#define IPV6_RECVRETOPTS 6 /* bool; receive IP6 opts for response */ >#define IPV6_RECVDSTADDR 7 /* bool; receive IP6 dst addr w/dgram */ >#define IPV6_RETOPTS 8 /* ip6_opts; set/get IP6 options */ >#endif ># 409 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */ >#define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */ >#define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ >#define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ >#define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 multicast loopback */ >#define IPV6_JOIN_GROUP 12 /* ipv6_mreq; join a group membership */ >#define IPV6_LEAVE_GROUP 13 /* ipv6_mreq; leave a group membership */ >#define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ >#define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ >/* RFC2292 options */ >#ifdef _KERNEL >#define IPV6_2292PKTINFO 19 /* bool; send/recv if, src/dst addr */ >#define IPV6_2292HOPLIMIT 20 /* bool; hop limit */ >#define IPV6_2292NEXTHOP 21 /* bool; next hop addr */ >#define IPV6_2292HOPOPTS 22 /* bool; hop-by-hop option */ >#define IPV6_2292DSTOPTS 23 /* bool; destinaion option */ >#define IPV6_2292RTHDR 24 /* bool; routing header */ >#define IPV6_2292PKTOPTIONS 25 /* buf/cmsghdr; set/get IPv6 options */ >#endif ># 428 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */ >#define IPV6_V6ONLY 27 /* bool; make AF_INET6 sockets v6 only */ >#ifndef _KERNEL >#define IPV6_BINDV6ONLY IPV6_V6ONLY >#endif ># 434 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#if 1 /* IPSEC */ >#define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ >#endif /* IPSEC */ ># 438 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > > /* 29; unused; was IPV6_FAITH */ >#if 1 /* IPV6FIREWALL */ >#define IPV6_FW_ADD 30 /* add a firewall rule to chain */ >#define IPV6_FW_DEL 31 /* delete a firewall rule from chain */ >#define IPV6_FW_FLUSH 32 /* flush firewall rule chain */ >#define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */ >#define IPV6_FW_GET 34 /* get entire firewall rule chain */ >#endif ># 447 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* new socket options introduced in RFC3542 */ >#define IPV6_RTHDRDSTOPTS 35 /* ip6_dest; send dst option before rthdr */ > >#define IPV6_RECVPKTINFO 36 /* bool; recv if, dst addr */ >#define IPV6_RECVHOPLIMIT 37 /* bool; recv hop limit */ >#define IPV6_RECVRTHDR 38 /* bool; recv routing header */ >#define IPV6_RECVHOPOPTS 39 /* bool; recv hop-by-hop option */ >#define IPV6_RECVDSTOPTS 40 /* bool; recv dst option after rthdr */ >#ifdef _KERNEL >#define IPV6_RECVRTHDRDSTOPTS 41 /* bool; recv dst option before rthdr */ >#endif ># 459 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#define IPV6_USE_MIN_MTU 42 /* bool; send packets at the minimum MTU */ >#define IPV6_RECVPATHMTU 43 /* bool; notify an according MTU */ > >#define IPV6_PATHMTU 44 /* mtuinfo; get the current path MTU (sopt), > 4 bytes int; MTU notification (cmsg) */ >#if 0 /*obsoleted during 2292bis -> 3542*/ >#define IPV6_REACHCONF 45 /* no data; ND reachability confirm > (cmsg only/not in of RFC3542) */ >#endif ># 469 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* more new socket options introduced in RFC3542 */ >#define IPV6_PKTINFO 46 /* in6_pktinfo; send if, src addr */ >#define IPV6_HOPLIMIT 47 /* int; send hop limit */ >#define IPV6_NEXTHOP 48 /* sockaddr; next hop addr */ >#define IPV6_HOPOPTS 49 /* ip6_hbh; send hop-by-hop option */ >#define IPV6_DSTOPTS 50 /* ip6_dest; send dst option befor rthdr */ >#define IPV6_RTHDR 51 /* ip6_rthdr; send routing header */ >#if 0 >#define IPV6_PKTOPTIONS 52 /* buf/cmsghdr; set/get IPv6 options */ > /* obsoleted by RFC3542 */ >#endif ># 481 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#define IPV6_RECVTCLASS 57 /* bool; recv traffic class values */ > >#define IPV6_AUTOFLOWLABEL 59 /* bool; attach flowlabel automagically */ > >#define IPV6_TCLASS 61 /* int; send traffic class value */ >#define IPV6_DONTFRAG 62 /* bool; disable IPv6 fragmentation */ > >#define IPV6_PREFER_TEMPADDR 63 /* int; prefer temporary addresses as > * the source address. > */ > >#define IPV6_BINDANY 64 /* bool: allow bind to any address */ > >#define IPV6_BINDMULTI 65 /* bool; allow multibind to same addr/port */ >#define IPV6_RSS_LISTEN_BUCKET 66 /* int; set RSS listen bucket */ >#define IPV6_FLOWID 67 /* int; flowid of given socket */ >#define IPV6_FLOWTYPE 68 /* int; flowtype of given socket */ >#define IPV6_RSSBUCKETID 69 /* int; RSS bucket ID of given socket */ >#define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ >#define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ > >/* > * The following option is private; do not use it from user applications. > * It is deliberately defined to the same value as IP_MSFILTER. > */ >#define IPV6_MSFILTER 74 /* struct __msfilterreq; > * set/get multicast source filter list. > */ > >/* to define items, should talk with KAME guys first, for *BSD compatibility */ > >#define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. XXX old spec */ >#define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. XXX old spec */ >#define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */ > >/* > * Defaults and limits for options > */ >#define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */ >#define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ > >/* > * The im6o_membership vector for each socket is now dynamically allocated at > * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized > * according to a power-of-two increment. > */ >#define IPV6_MIN_MEMBERSHIPS 31 >#define IPV6_MAX_MEMBERSHIPS 4095 > >/* > * Default resource limits for IPv6 multicast source filtering. > * These may be modified by sysctl. > */ >#define IPV6_MAX_GROUP_SRC_FILTER 512 /* sources per group */ >#define IPV6_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ > >/* > * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. > */ >struct ipv6_mreq { > struct in6_addr ipv6mr_multiaddr; > unsigned int ipv6mr_interface; >}; > >/* > * IPV6_PKTINFO: Packet information(RFC2292 sec 5) > */ >struct in6_pktinfo { > struct in6_addr ipi6_addr; /* src/dst IPv6 address */ > unsigned int ipi6_ifindex; /* send/recv interface index */ >}; > >/* > * Control structure for IPV6_RECVPATHMTU socket option. > */ >struct ip6_mtuinfo { > struct sockaddr_in6 ip6m_addr; /* or sockaddr_storage? */ > uint32_t ip6m_mtu; >}; > >/* > * Argument for IPV6_PORTRANGE: > * - which range to search when port is unspecified at bind() or connect() > */ >#define IPV6_PORTRANGE_DEFAULT 0 /* default range */ >#define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ >#define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ > >#if __BSD_VISIBLE >/* > * Definitions for inet6 sysctl operations. > * > * Third level is protocol number. > * Fourth level is desired variable within that protocol. > */ >#define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */ > >/* > * Names for IP sysctl objects > */ >#define IPV6CTL_FORWARDING 1 /* act as router */ >#define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding*/ >#define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */ >#ifdef notyet >#define IPV6CTL_DEFMTU 4 /* default MTU */ >#endif ># 588 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */ >#define IPV6CTL_STATS 6 /* stats */ >#define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */ >#define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */ >#define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */ >#define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */ >#define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */ >#define IPV6CTL_ACCEPT_RTADV 12 > /* 13; unused; was: IPV6CTL_KEEPFAITH */ >#define IPV6CTL_LOG_INTERVAL 14 >#define IPV6CTL_HDRNESTLIMIT 15 >#define IPV6CTL_DAD_COUNT 16 >#define IPV6CTL_AUTO_FLOWLABEL 17 >#define IPV6CTL_DEFMCASTHLIM 18 >#define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */ >#define IPV6CTL_KAME_VERSION 20 >#define IPV6CTL_USE_DEPRECATED 21 /* use deprecated addr (RFC2462 5.5.4) */ >#define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */ >#if 0 /* obsolete */ >#define IPV6CTL_MAPPED_ADDR 23 >#endif ># 609 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define IPV6CTL_V6ONLY 24 >/* IPV6CTL_RTEXPIRE 25 deprecated */ >/* IPV6CTL_RTMINEXPIRE 26 deprecated */ >/* IPV6CTL_RTMAXCACHE 27 deprecated */ > >#define IPV6CTL_USETEMPADDR 32 /* use temporary addresses (RFC3041) */ >#define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */ >#define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */ >#define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */ >#define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */ >#define IPV6CTL_PREFER_TEMPADDR 37 /* prefer temporary addr as src */ >#define IPV6CTL_ADDRCTLPOLICY 38 /* get/set address selection policy */ >#define IPV6CTL_USE_DEFAULTZONE 39 /* use default scope zone */ > >#define IPV6CTL_MAXFRAGS 41 /* max fragments */ >#if 0 >#define IPV6CTL_IFQ 42 /* ip6intrq node */ >#define IPV6CTL_ISATAPRTR 43 /* isatap router */ >#endif ># 628 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >#define IPV6CTL_MCAST_PMTU 44 /* enable pMTU discovery for multicast? */ > >/* New entries should be added here from current IPV6CTL_MAXID value. */ >/* to define items, should talk with KAME guys first, for *BSD compatibility */ >#define IPV6CTL_STEALTH 45 > >#define ICMPV6CTL_ND6_ONLINKNSRFC4861 47 >#define IPV6CTL_NO_RADR 48 /* No defroute from RA */ >#define IPV6CTL_NORBIT_RAIF 49 /* Disable R-bit in NA on RA > * receiving IF. */ >#define IPV6CTL_RFC6204W3 50 /* Accept defroute even when forwarding > enabled */ >#define IPV6CTL_INTRQMAXLEN 51 /* max length of IPv6 netisr queue */ >#define IPV6CTL_INTRDQMAXLEN 52 /* max length of direct IPv6 netisr > * queue */ >#define IPV6CTL_MAXID 53 >#endif /* __BSD_VISIBLE */ ># 645 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >/* > * Since both netinet/ and netinet6/ call into netipsec/ and netpfil/, > * the protocol specific mbuf flags are shared between them. > */ >#define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */ >#define M_IP6_NEXTHOP M_PROTO2 /* explicit ip nexthop */ >#define M_IP_NEXTHOP M_PROTO2 /* explicit ip nexthop */ >#define M_SKIP_FIREWALL M_PROTO3 /* skip firewall processing */ >#define M_AUTHIPHDR M_PROTO4 >#define M_DECRYPTED M_PROTO5 >#define M_LOOP M_PROTO6 >#define M_AUTHIPDGM M_PROTO7 >#define M_RTALERT_MLD M_PROTO8 > >#ifdef _KERNEL >struct cmsghdr; >struct ip6_hdr; > >int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); >int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); >int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t, > u_int32_t); >int in6_localaddr(struct in6_addr *); >int in6_localip(struct in6_addr *); >int in6_ifhasaddr(struct ifnet *, struct in6_addr *); >int in6_addrscope(const struct in6_addr *); >char *ip6_sprintf(char *, const struct in6_addr *); >struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *); >extern void in6_if_up(struct ifnet *); >struct sockaddr; >extern u_char ip6_protox[]; > >void in6_sin6_2_sin(struct sockaddr_in *sin, > struct sockaddr_in6 *sin6); >void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, > struct sockaddr_in6 *sin6); >void in6_sin6_2_sin_in_sock(struct sockaddr *nam); >void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); >extern void addrsel_policy_init(void); > >#define satosin6(sa) ((struct sockaddr_in6 *)(sa)) >#define sin6tosa(sin6) ((struct sockaddr *)(sin6)) >#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa)) > >#endif /* _KERNEL */ ># 691 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 696 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#ifndef _SOCKLEN_T_DECLARED >typedef __socklen_t socklen_t; >#define _SOCKLEN_T_DECLARED >#endif ># 701 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#if __BSD_VISIBLE > >__BEGIN_DECLS >struct cmsghdr; > >extern int inet6_option_space(int); >extern int inet6_option_init(void *, struct cmsghdr **, int); >extern int inet6_option_append(struct cmsghdr *, const uint8_t *, > int, int); >extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); >extern int inet6_option_next(const struct cmsghdr *, uint8_t **); >extern int inet6_option_find(const struct cmsghdr *, uint8_t **, int); > >extern size_t inet6_rthdr_space(int, int); >extern struct cmsghdr *inet6_rthdr_init(void *, int); >extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, > unsigned int); >extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); >#if 0 /* not implemented yet */ >extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); >#endif ># 723 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 >extern int inet6_rthdr_segments(const struct cmsghdr *); >extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); >extern int inet6_rthdr_getflags(const struct cmsghdr *, int); > >extern int inet6_opt_init(void *, socklen_t); >extern int inet6_opt_append(void *, socklen_t, int, uint8_t, socklen_t, > uint8_t, void **); >extern int inet6_opt_finish(void *, socklen_t, int); >extern int inet6_opt_set_val(void *, int, void *, socklen_t); > >extern int inet6_opt_next(void *, socklen_t, int, uint8_t *, socklen_t *, > void **); >extern int inet6_opt_find(void *, socklen_t, int, uint8_t, socklen_t *, > void **); >extern int inet6_opt_get_val(void *, int, void *, socklen_t); >extern socklen_t inet6_rth_space(int, int); >extern void *inet6_rth_init(void *, socklen_t, int, int); >extern int inet6_rth_add(void *, const struct in6_addr *); >extern int inet6_rth_reverse(const void *, void *); >extern int inet6_rth_segments(const void *); >extern struct in6_addr *inet6_rth_getaddr(const void *, int); >__END_DECLS > >#endif /* __BSD_VISIBLE */ ># 747 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 > >#endif /* !_NETINET6_IN6_H_ */ ># 749 "/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h" 3 4 ># 666 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 2 3 4 >#undef __KAME_NETINET_IN_H_INCLUDED_ >#endif ># 668 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 > >#endif /* !_NETINET_IN_H_*/ ># 670 "/usr/obj/usr/src/tmp/usr/include/netinet/in.h" 3 4 ># 29 "/usr/src/lib/libc/nameser/ns_name.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <arpa/nameser.h> >#endif /* expanded by -frewrite-includes */ ># 29 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/../../include/arpa/nameser.h" 1 >/* > * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") > * Portions Copyright (C) 1996-2003 Internet Software Consortium. > * > * Permission to use, copy, modify, and/or distribute this software for any > * purpose with or without fee is hereby granted, provided that the above > * copyright notice and this permission notice appear in all copies. > * > * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH > * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY > * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, > * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM > * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE > * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR > * PERFORMANCE OF THIS SOFTWARE. > */ > >/* > * Copyright (c) 1983, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > */ > >/* > * $Id: nameser.h,v 1.16 2009/03/03 01:52:48 each Exp $ > * $FreeBSD: head/include/arpa/nameser.h 298849 2016-04-30 14:43:42Z pfg $ > */ > >#ifndef _ARPA_NAMESER_H_ >#define _ARPA_NAMESER_H_ > >/*! \file */ > >#define BIND_4_COMPAT > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/param.h> >#endif /* expanded by -frewrite-includes */ ># 59 "/usr/src/lib/libc/../../include/arpa/nameser.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)param.h 8.3 (Berkeley) 4/4/95 > * $FreeBSD: head/sys/sys/param.h 302628 2016-07-12 07:16:37Z ache $ > */ > >#ifndef _SYS_PARAM_H_ >#define _SYS_PARAM_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 1 3 4 >/*- > * Copyright (c) 2003 Marcel Moolenaar > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/_null.h 228918 2011-12-27 21:36:31Z theraven $ > */ > >#ifndef NULL > >#if !defined(__cplusplus) >#define NULL ((void *)0) >#else ># 34 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#if __cplusplus >= 201103L >#define NULL nullptr >#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#define NULL __null >#else ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#if defined(__LP64__) >#define NULL (0L) >#else ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#define NULL 0 >#endif /* __LP64__ */ ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#endif /* __GNUG__ */ ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#endif /* !__cplusplus */ ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 > >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 2 3 4 > >#define BSD 199506 /* System version (year & month). */ >#define BSD4_3 1 >#define BSD4_4 1 > >/* > * __FreeBSD_version numbers are documented in the Porter's Handbook. > * If you bump the version for any reason, you should update the documentation > * there. > * Currently this lives here in the doc/ repository: > * > * head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml > * > * scheme is: <major><two digit minor>Rxx > * 'R' is in the range 0 to 4 if this is a release branch or > * x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is > * in the range 5 to 9. > */ >#undef __FreeBSD_version >#define __FreeBSD_version 1200001 /* Master, propagated to newvers */ > >/* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, > * which by definition is always true on FreeBSD. This macro is also defined > * on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD. > * > * It is tempting to use this macro in userland code when we want to enable > * kernel-specific routines, and in fact it's fine to do this in code that > * is part of FreeBSD itself. However, be aware that as presence of this > * macro is still not widespread (e.g. older FreeBSD versions, 3rd party > * compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in > * external applications without also checking for __FreeBSD__ as an > * alternative. > */ >#undef __FreeBSD_kernel__ >#define __FreeBSD_kernel__ > >#ifdef _KERNEL >#define P_OSREL_SIGWAIT 700000 >#define P_OSREL_SIGSEGV 700004 >#define P_OSREL_MAP_ANON 800104 >#define P_OSREL_MAP_FSTRICT 1100036 >#define P_OSREL_SHUTDOWN_ENOTCONN 1100077 > >#define P_OSREL_MAJOR(x) ((x) / 100000) >#endif ># 88 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef LOCORE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 90 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 91 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#endif ># 92 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >/* > * Machine-independent constants (some used in following include files). > * Redefined constants are from POSIX 1003.1 limits file. > * > * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>) > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/syslimits.h> >#endif /* expanded by -frewrite-includes */ ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: head/sys/sys/syslimits.h 194498 2009-06-19 17:10:35Z brooks $ > */ > >#ifndef _SYS_SYSLIMITS_H_ >#define _SYS_SYSLIMITS_H_ > >#if !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#ifdef __CC_SUPPORTS_WARNING >#warning "No user-serviceable parts inside." >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#endif ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 > >/* > * Do not add any new variables here. (See the comment at the end of > * the file for why.) > */ >#define ARG_MAX 262144 /* max bytes for an exec function */ >#ifndef CHILD_MAX >#define CHILD_MAX 40 /* max simultaneous processes */ >#endif ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#define LINK_MAX 32767 /* max file link count */ >#define MAX_CANON 255 /* max bytes in term canon input line */ >#define MAX_INPUT 255 /* max bytes in terminal input */ >#define NAME_MAX 255 /* max bytes in a file name */ >#ifndef NGROUPS_MAX >#define NGROUPS_MAX 1023 /* max supplemental group id's */ >#endif ># 60 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#ifndef OPEN_MAX >#define OPEN_MAX 64 /* max open files per process */ >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#define PATH_MAX 1024 /* max bytes in pathname */ >#define PIPE_BUF 512 /* max bytes for atomic pipe writes */ >#define IOV_MAX 1024 /* max elements in i/o vector */ > >/* > * We leave the following values undefined to force applications to either > * assume conservative values or call sysconf() to get the current value. > * > * HOST_NAME_MAX > * > * (We should do this for most of the values currently defined here, > * but many programs are not prepared to deal with this yet.) > */ >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 ># 100 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 2 3 4 > >#define MAXCOMLEN 19 /* max command name remembered */ >#define MAXINTERP PATH_MAX /* max interpreter file name length */ >#define MAXLOGNAME 33 /* max login name length (incl. NUL) */ >#define MAXUPRC CHILD_MAX /* max simultaneous processes */ >#define NCARGS ARG_MAX /* max bytes for an exec function */ >#define NGROUPS (NGROUPS_MAX+1) /* max number groups */ >#define NOFILE OPEN_MAX /* max open files per process */ >#define NOGROUP 65535 /* marker for empty group set member */ >#define MAXHOSTNAMELEN 256 /* max hostname size */ >#define SPECNAMELEN 63 /* max length of devicename */ > >/* More types and definitions used throughout the kernel. */ >#ifdef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 114 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 115 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/errno.h> >#endif /* expanded by -frewrite-includes */ ># 115 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 116 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#ifndef LOCORE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/time.h> >#endif /* expanded by -frewrite-includes */ ># 117 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 118 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/priority.h> >#endif /* expanded by -frewrite-includes */ ># 118 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 119 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#endif ># 120 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef FALSE >#define FALSE 0 >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#ifndef TRUE >#define TRUE 1 >#endif ># 127 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#endif ># 128 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef _KERNEL >/* Signals. */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/signal.h> >#endif /* expanded by -frewrite-includes */ ># 131 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: head/sys/sys/signal.h 301071 2016-05-31 19:05:41Z ed $ > */ > >#ifndef _SYS_SIGNAL_H_ >#define _SYS_SIGNAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> /* __MINSIGSTKSZ */ >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */ >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/signal.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/signal.h 247047 2013-02-20 17:39:52Z kib $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/signal.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 1 3 4 >/*- > * Copyright (c) 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * Copyright (c) 2003 Peter Wemm. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.1 (Berkeley) 6/11/93 > * $FreeBSD: head/sys/x86/include/signal.h 247047 2013-02-20 17:39:52Z kib $ > */ > >#ifndef _X86_SIGNAL_H >#define _X86_SIGNAL_H 1 > >/* > * Machine-dependent signal definitions > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#if __BSD_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <machine/trap.h> /* codes for SIGILL, SIGFPE */ >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/trap.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/trap.h 232492 2012-03-04 14:12:57Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/trap.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/trap.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/trap.h" 1 3 4 >/*- > * Copyright (c) 1990 The Regents of the University of California. > * All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * William Jolitz. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 > * $FreeBSD: head/sys/x86/include/trap.h 257417 2013-10-31 02:35:00Z markj $ > */ > >#ifndef _MACHINE_TRAP_H_ >#define _MACHINE_TRAP_H_ > >/* > * Trap type values > * also known in trap.c for name strings > */ > >#define T_PRIVINFLT 1 /* privileged instruction */ >#define T_BPTFLT 3 /* breakpoint instruction */ >#define T_ARITHTRAP 6 /* arithmetic trap */ >#define T_PROTFLT 9 /* protection fault */ >#define T_TRCTRAP 10 /* debug exception (sic) */ >#define T_PAGEFLT 12 /* page fault */ >#define T_ALIGNFLT 14 /* alignment fault */ > >#define T_DIVIDE 18 /* integer divide fault */ >#define T_NMI 19 /* non-maskable trap */ >#define T_OFLOW 20 /* overflow trap */ >#define T_BOUND 21 /* bound instruction fault */ >#define T_DNA 22 /* device not available fault */ >#define T_DOUBLEFLT 23 /* double fault */ >#define T_FPOPFLT 24 /* fp coprocessor operand fetch fault */ >#define T_TSSFLT 25 /* invalid tss fault */ >#define T_SEGNPFLT 26 /* segment not present fault */ >#define T_STKFLT 27 /* stack fault */ >#define T_MCHK 28 /* machine check trap */ >#define T_XMMFLT 29 /* SIMD floating-point exception */ >#define T_RESERVED 30 /* reserved (unknown) */ >#define T_DTRACE_RET 32 /* DTrace pid return */ > >/* XXX most of the following codes aren't used, but could be. */ > >/* definitions for <sys/signal.h> */ >#define ILL_RESAD_FAULT T_RESADFLT >#define ILL_PRIVIN_FAULT T_PRIVINFLT >#define ILL_RESOP_FAULT T_RESOPFLT >#define ILL_ALIGN_FAULT T_ALIGNFLT >#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ > >/* old FreeBSD macros, deprecated */ >#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ >#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ >#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ >#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ >#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ >#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ >#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ > >/* codes for SIGBUS */ >#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ >#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ >#define BUS_STK_FAULT T_STKFLT /* stack segment */ >#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ > >/* Trap's coming from user mode */ >#define T_USER 0x100 > >#endif /* !_MACHINE_TRAP_H_ */ ># 95 "/usr/obj/usr/src/tmp/usr/include/x86/trap.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/trap.h" 2 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 2 3 4 >#endif ># 47 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#ifdef __i386__ >typedef int sig_atomic_t; > >#if __BSD_VISIBLE >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > int sc_onstack; /* sigstack state to restore */ > int sc_gs; /* machine state (struct trapframe) */ > int sc_fs; > int sc_es; > int sc_ds; > int sc_edi; > int sc_esi; > int sc_ebp; > int sc_isp; > int sc_ebx; > int sc_edx; > int sc_ecx; > int sc_eax; > int sc_trapno; > int sc_err; > int sc_eip; > int sc_cs; > int sc_efl; > int sc_esp; > int sc_ss; > int sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/npx.h> for > * the following fields. > */ > int sc_fpformat; > int sc_ownedfp; > int sc_flags; > int sc_fpstate[128] __aligned(16); > > int sc_fsbase; > int sc_gsbase; > > int sc_xfpustate; > int sc_xfpustate_len; > > int sc_spare2[4]; >}; > >#define sc_sp sc_esp >#define sc_fp sc_ebp >#define sc_pc sc_eip >#define sc_ps sc_efl >#define sc_eflags sc_efl > >#endif /* __BSD_VISIBLE */ ># 100 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 >#endif /* __i386__ */ ># 101 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#ifdef __amd64__ >typedef long sig_atomic_t; > >#if __BSD_VISIBLE >/* > * Information pushed on stack when a signal is delivered. > * This is used by the kernel to restore state following > * execution of the signal handler. It is also made available > * to the handler to allow it to restore state properly if > * a non-standard exit is performed. > * > * The sequence of the fields/registers after sc_mask in struct > * sigcontext must match those in mcontext_t and struct trapframe. > */ >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > long sc_onstack; /* sigstack state to restore */ > long sc_rdi; /* machine state (struct trapframe) */ > long sc_rsi; > long sc_rdx; > long sc_rcx; > long sc_r8; > long sc_r9; > long sc_rax; > long sc_rbx; > long sc_rbp; > long sc_r10; > long sc_r11; > long sc_r12; > long sc_r13; > long sc_r14; > long sc_r15; > int sc_trapno; > short sc_fs; > short sc_gs; > long sc_addr; > int sc_flags; > short sc_es; > short sc_ds; > long sc_err; > long sc_rip; > long sc_cs; > long sc_rflags; > long sc_rsp; > long sc_ss; > long sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/fpu.h> for the following > * fields. > */ > long sc_fpformat; > long sc_ownedfp; > long sc_fpstate[64] __aligned(16); > > long sc_fsbase; > long sc_gsbase; > > long sc_xfpustate; > long sc_xfpustate_len; > > long sc_spare[4]; >}; >#endif /* __BSD_VISIBLE */ ># 165 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 >#endif /* __amd64__ */ ># 166 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#endif ># 168 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/signal.h" 2 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 2 3 4 > >#if __POSIX_VISIBLE >= 200809 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 50 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 200809 */ ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* > * System defined signals. > */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGHUP 1 /* hangup */ >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGINT 2 /* interrupt */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGQUIT 3 /* quit */ >#endif ># 75 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGILL 4 /* illegal instr. (not reset when caught) */ >#if __XSI_VISIBLE >#define SIGTRAP 5 /* trace trap (not reset when caught) */ >#endif ># 79 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGABRT 6 /* abort() */ >#if __BSD_VISIBLE >#define SIGIOT SIGABRT /* compatibility */ >#define SIGEMT 7 /* EMT instruction */ >#endif ># 84 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGFPE 8 /* floating point exception */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGKILL 9 /* kill (cannot be caught or ignored) */ >#endif ># 88 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIGBUS 10 /* bus error */ >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGSEGV 11 /* segmentation violation */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIGSYS 12 /* non-existent system call invoked */ >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGPIPE 13 /* write on a pipe with no one to read it */ >#define SIGALRM 14 /* alarm clock */ >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGTERM 15 /* software termination signal from kill */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIGURG 16 /* urgent condition on IO channel */ >#endif ># 103 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGSTOP 17 /* sendable stop signal not from tty */ >#define SIGTSTP 18 /* stop signal from tty */ >#define SIGCONT 19 /* continue a stopped process */ >#define SIGCHLD 20 /* to parent on child stop or exit */ >#define SIGTTIN 21 /* to readers pgrp upon background tty read */ >#define SIGTTOU 22 /* like TTIN if (tp->t_local<OSTOP) */ >#endif ># 111 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SIGIO 23 /* input/output possible signal */ >#endif ># 114 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __XSI_VISIBLE >#define SIGXCPU 24 /* exceeded CPU time limit */ >#define SIGXFSZ 25 /* exceeded file size limit */ >#define SIGVTALRM 26 /* virtual time alarm */ >#define SIGPROF 27 /* profiling time alarm */ >#endif ># 120 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SIGWINCH 28 /* window size changes */ >#define SIGINFO 29 /* information request */ >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGUSR1 30 /* user defined signal 1 */ >#define SIGUSR2 31 /* user defined signal 2 */ >#endif ># 128 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SIGTHR 32 /* reserved by thread library. */ >#define SIGLWP SIGTHR >#define SIGLIBRT 33 /* reserved by real-time library. */ >#endif ># 133 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#define SIGRTMIN 65 >#define SIGRTMAX 126 > >#define SIG_DFL ((__sighandler_t *)0) >#define SIG_IGN ((__sighandler_t *)1) >#define SIG_ERR ((__sighandler_t *)-1) >/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ >#define SIG_HOLD ((__sighandler_t *)3) > >/* > * Type of a signal handling function. > * > * Language spec sez signal handlers take exactly one arg, even though we > * actually supply three. Ugh! > * > * We don't try to hide the difference by leaving out the args because > * that would cause warnings about conformant programs. Nonconformant > * programs can avoid the warnings by casting to (__sighandler_t *) or > * sig_t before calling signal() or assigning to sa_handler or sv_handler. > * > * The kernel should reverse the cast before calling the function. It > * has no way to do this, but on most machines 1-arg and 3-arg functions > * have the same calling protocol so there is no problem in practice. > * A bit in sa_flags could be used to specify the number of args. > */ >typedef void __sighandler_t(int); > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 166 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#endif ># 167 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500 >union sigval { > /* Members as suggested by Annex C of POSIX 1003.1b. */ > int sival_int; > void *sival_ptr; > /* 6.0 compatibility */ > int sigval_int; > void *sigval_ptr; >}; >#endif ># 178 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 > >struct pthread_attr; > >struct sigevent { > int sigev_notify; /* Notification type */ > int sigev_signo; /* Signal number */ > union sigval sigev_value; /* Signal value */ > union { > __lwpid_t _threadid; > struct { > void (*_function)(union sigval); > struct pthread_attr **_attribute; > } _sigev_thread; > unsigned short _kevent_flags; > long __spare__[8]; > } _sigev_un; >}; > >#if __BSD_VISIBLE >#define sigev_notify_kqueue sigev_signo >#define sigev_notify_kevent_flags _sigev_un._kevent_flags >#define sigev_notify_thread_id _sigev_un._threadid >#endif ># 203 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define sigev_notify_function _sigev_un._sigev_thread._function >#define sigev_notify_attributes _sigev_un._sigev_thread._attribute > >#define SIGEV_NONE 0 /* No async notification. */ >#define SIGEV_SIGNAL 1 /* Generate a queued signal. */ >#define SIGEV_THREAD 2 /* Call back from another pthread. */ >#if __BSD_VISIBLE >#define SIGEV_KEVENT 3 /* Generate a kevent. */ >#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */ >#endif ># 213 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 199309 */ ># 215 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >typedef struct __siginfo { > int si_signo; /* signal number */ > int si_errno; /* errno association */ > /* > * Cause of signal, one of the SI_ macros or signal-specific > * values, i.e. one of the FPE_... values for SIGFPE. This > * value is equivalent to the second argument to an old-style > * FreeBSD signal handler. > */ > int si_code; /* signal code */ > __pid_t si_pid; /* sending process */ > __uid_t si_uid; /* sender's ruid */ > int si_status; /* exit value */ > void *si_addr; /* faulting instruction */ > union sigval si_value; /* signal value */ > union { > struct { > int _trapno;/* machine specific trap code */ > } _fault; > struct { > int _timerid; > int _overrun; > } _timer; > struct { > int _mqd; > } _mesgq; > struct { > long _band; /* band event for SIGPOLL */ > } _poll; /* was this ever used ? */ > struct { > long __spare1__; > int __spare2__[7]; > } __spare__; > } _reason; >} siginfo_t; > >#define si_trapno _reason._fault._trapno >#define si_timerid _reason._timer._timerid >#define si_overrun _reason._timer._overrun >#define si_mqd _reason._mesgq._mqd >#define si_band _reason._poll._band > >/** si_code **/ >/* codes for SIGILL */ >#define ILL_ILLOPC 1 /* Illegal opcode. */ >#define ILL_ILLOPN 2 /* Illegal operand. */ >#define ILL_ILLADR 3 /* Illegal addressing mode. */ >#define ILL_ILLTRP 4 /* Illegal trap. */ >#define ILL_PRVOPC 5 /* Privileged opcode. */ >#define ILL_PRVREG 6 /* Privileged register. */ >#define ILL_COPROC 7 /* Coprocessor error. */ >#define ILL_BADSTK 8 /* Internal stack error. */ > >/* codes for SIGBUS */ >#define BUS_ADRALN 1 /* Invalid address alignment. */ >#define BUS_ADRERR 2 /* Nonexistent physical address. */ >#define BUS_OBJERR 3 /* Object-specific hardware error. */ > >/* codes for SIGSEGV */ >#define SEGV_MAPERR 1 /* Address not mapped to object. */ >#define SEGV_ACCERR 2 /* Invalid permissions for mapped */ > /* object. */ > >/* codes for SIGFPE */ >#define FPE_INTOVF 1 /* Integer overflow. */ >#define FPE_INTDIV 2 /* Integer divide by zero. */ >#define FPE_FLTDIV 3 /* Floating point divide by zero. */ >#define FPE_FLTOVF 4 /* Floating point overflow. */ >#define FPE_FLTUND 5 /* Floating point underflow. */ >#define FPE_FLTRES 6 /* Floating point inexact result. */ >#define FPE_FLTINV 7 /* Invalid floating point operation. */ >#define FPE_FLTSUB 8 /* Subscript out of range. */ > >/* codes for SIGTRAP */ >#define TRAP_BRKPT 1 /* Process breakpoint. */ >#define TRAP_TRACE 2 /* Process trace trap. */ >#define TRAP_DTRACE 3 /* DTrace induced trap. */ > >/* codes for SIGCHLD */ >#define CLD_EXITED 1 /* Child has exited */ >#define CLD_KILLED 2 /* Child has terminated abnormally but */ > /* did not create a core file */ >#define CLD_DUMPED 3 /* Child has terminated abnormally and */ > /* created a core file */ >#define CLD_TRAPPED 4 /* Traced child has trapped */ >#define CLD_STOPPED 5 /* Child has stopped */ >#define CLD_CONTINUED 6 /* Stopped child has continued */ > >/* codes for SIGPOLL */ >#define POLL_IN 1 /* Data input available */ >#define POLL_OUT 2 /* Output buffers available */ >#define POLL_MSG 3 /* Input message available */ >#define POLL_ERR 4 /* I/O Error */ >#define POLL_PRI 5 /* High priority input available */ >#define POLL_HUP 6 /* Device disconnected */ > >#endif ># 314 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >struct __siginfo; > >/* > * Signal vector "template" used in sigaction call. > */ >struct sigaction { > union { > void (*__sa_handler)(int); > void (*__sa_sigaction)(int, struct __siginfo *, void *); > } __sigaction_u; /* signal handler */ > int sa_flags; /* see signal options below */ > sigset_t sa_mask; /* signal mask to apply */ >}; > >#define sa_handler __sigaction_u.__sa_handler >#endif ># 332 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */ >#define sa_sigaction __sigaction_u.__sa_sigaction >#endif ># 337 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ >#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ ># 341 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >#define SA_ONSTACK 0x0001 /* take signal on signal stack */ >#define SA_RESTART 0x0002 /* restart system call on signal return */ >#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ >#define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ >#define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */ >#define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */ >#endif ># 350 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE >#define NSIG 32 /* number of old signals (counting 0) */ >#endif ># 354 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SI_NOINFO 0 /* No signal info besides si_signo. */ >#define SI_USER 0x10001 /* Signal sent by kill(). */ >#define SI_QUEUE 0x10002 /* Signal sent by the sigqueue(). */ >#define SI_TIMER 0x10003 /* Signal generated by expiration of */ > /* a timer set by timer_settime(). */ >#define SI_ASYNCIO 0x10004 /* Signal generated by completion of */ > /* an asynchronous I/O request.*/ >#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */ > /* message on an empty message queue. */ >#define SI_KERNEL 0x10006 >#define SI_LWP 0x10007 /* Signal sent by thr_kill */ >#endif ># 368 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SI_UNDEFINED 0 >#endif ># 371 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE >typedef __sighandler_t *sig_t; /* type of pointer to a signal function */ >typedef void __siginfohandler_t(int, struct __siginfo *, void *); >#endif ># 376 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >#if __BSD_VISIBLE >#define __stack_t sigaltstack >#endif ># 381 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >typedef struct __stack_t stack_t; > >#define SS_ONSTACK 0x0001 /* take signal on alternate stack */ >#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ >#define MINSIGSTKSZ __MINSIGSTKSZ /* minimum stack size */ >#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ >#endif ># 388 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* > * Structure used in sigaltstack call. Its definition is always > * needed for __ucontext. If __BSD_VISIBLE is defined, the structure > * tag is actually sigaltstack. > */ >struct __stack_t { > void *ss_sp; /* signal stack base */ > __size_t ss_size; /* signal stack length */ > int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ >}; > >#if __BSD_VISIBLE >/* > * 4.3 compatibility: > * Signal vector "template" used in sigvec call. > */ >struct sigvec { > __sighandler_t *sv_handler; /* signal handler */ > int sv_mask; /* signal mask to apply */ > int sv_flags; /* see signal options below */ >}; > >#define SV_ONSTACK SA_ONSTACK >#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */ >#define SV_RESETHAND SA_RESETHAND >#define SV_NODEFER SA_NODEFER >#define SV_NOCLDSTOP SA_NOCLDSTOP >#define SV_SIGINFO SA_SIGINFO >#define sv_onstack sv_flags /* isn't compatibility wonderful! */ >#endif ># 419 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* Keep this in one place only */ >#if defined(_KERNEL) && defined(COMPAT_43) && \ > !defined(__i386__) >struct osigcontext { > int _not_used; >}; >#endif ># 427 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >/* > * Structure used in sigstack call. > */ >struct sigstack { > void *ss_sp; /* signal stack pointer */ > int ss_onstack; /* current status */ >}; >#endif ># 437 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 >/* > * Macro for converting signal number to a mask suitable for > * sigblock(). > */ >#define sigmask(m) (1 << ((m)-1)) >#endif ># 445 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE >#define BADSIG SIG_ERR >#endif ># 449 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >/* > * Flags for sigprocmask: > */ >#define SIG_BLOCK 1 /* block specified signal set */ >#define SIG_UNBLOCK 2 /* unblock specified signal set */ >#define SIG_SETMASK 3 /* set specified signal set */ >#endif ># 458 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* > * For historical reasons; programs expect signal's return value to be > * defined by <sys/signal.h>. > */ >__BEGIN_DECLS >__sighandler_t *signal(int, __sighandler_t *); >__END_DECLS > >#endif /* !_SYS_SIGNAL_H_ */ ># 468 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 132 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 2 3 4 >#endif ># 133 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >/* Machine type dependent parameters. */ >#if 0 /* expanded by -frewrite-includes */ >#include <machine/param.h> >#endif /* expanded by -frewrite-includes */ ># 135 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 1 3 4 >/*- > * Copyright (c) 2002 David E. O'Brien. All rights reserved. > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * the Systems Programming Group of the University of Utah Computer > * Science Department and Ralph Campbell. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)param.h 8.1 (Berkeley) 6/10/93 > * $FreeBSD: head/sys/amd64/include/param.h 297877 2016-04-12 21:23:44Z jhb $ > */ > > >#ifndef _AMD64_INCLUDE_PARAM_H_ >#define _AMD64_INCLUDE_PARAM_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_align.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_align.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/_align.h 215856 2010-11-26 10:59:20Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_align.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_align.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_align.h" 1 3 4 >/*- > * Copyright (c) 2001 David E. O'Brien > * Copyright (c) 1990 The Regents of the University of California. > * All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * William Jolitz. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * from: @(#)param.h 5.8 (Berkeley) 6/28/91 > * $FreeBSD: head/sys/x86/include/_align.h 301037 2016-05-31 13:31:19Z ed $ > */ > >#ifndef _X86_INCLUDE__ALIGN_H_ >#define _X86_INCLUDE__ALIGN_H_ > >/* > * Round p (pointer or byte index) up to a correctly-aligned value > * for all data types (int, long, ...). The result is unsigned int > * and must be cast to any desired pointer type. > */ >#define _ALIGNBYTES (sizeof(__register_t) - 1) >#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) > >#endif /* !_X86_INCLUDE__ALIGN_H_ */ ># 53 "/usr/obj/usr/src/tmp/usr/include/x86/_align.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_align.h" 2 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 2 3 4 > >/* > * Machine dependent constants for AMD64. > */ > > >#define __HAVE_ACPI >#define __PCI_REROUTE_INTERRUPT > >#ifndef MACHINE >#define MACHINE "amd64" >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 >#ifndef MACHINE_ARCH >#define MACHINE_ARCH "amd64" >#endif ># 62 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 >#ifndef MACHINE_ARCH32 >#define MACHINE_ARCH32 "i386" >#endif ># 65 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 > >#if defined(SMP) || defined(KLD_MODULE) >#ifndef MAXCPU >#define MAXCPU 256 >#endif ># 70 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 >#else ># 71 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 >#define MAXCPU 1 >#endif ># 73 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 > >#ifndef MAXMEMDOM >#define MAXMEMDOM 8 >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 > >#define ALIGNBYTES _ALIGNBYTES >#define ALIGN(p) _ALIGN(p) >/* > * ALIGNED_POINTER is a boolean macro that checks whether an address > * is valid to fetch data elements of type t from on this architecture. > * This does not reflect the optimal alignment, just the possibility > * (within reasonable limits). > */ >#define ALIGNED_POINTER(p, t) 1 > >/* > * CACHE_LINE_SIZE is the compile-time maximum cache line size for an > * architecture. It should be used with appropriate caution. > */ >#define CACHE_LINE_SHIFT 7 >#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) > >/* Size of the level 1 page table units */ >#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) >#define NPTEPGSHIFT 9 /* LOG2(NPTEPG) */ >#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ >#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */ >#define PAGE_MASK (PAGE_SIZE-1) >/* Size of the level 2 page directory units */ >#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t))) >#define NPDEPGSHIFT 9 /* LOG2(NPDEPG) */ >#define PDRSHIFT 21 /* LOG2(NBPDR) */ >#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */ >#define PDRMASK (NBPDR-1) >/* Size of the level 3 page directory pointer table units */ >#define NPDPEPG (PAGE_SIZE/(sizeof (pdp_entry_t))) >#define NPDPEPGSHIFT 9 /* LOG2(NPDPEPG) */ >#define PDPSHIFT 30 /* LOG2(NBPDP) */ >#define NBPDP (1<<PDPSHIFT) /* bytes/page dir ptr table */ >#define PDPMASK (NBPDP-1) >/* Size of the level 4 page-map level-4 table units */ >#define NPML4EPG (PAGE_SIZE/(sizeof (pml4_entry_t))) >#define NPML4EPGSHIFT 9 /* LOG2(NPML4EPG) */ >#define PML4SHIFT 39 /* LOG2(NBPML4) */ >#define NBPML4 (1UL<<PML4SHIFT)/* bytes/page map lev4 table */ >#define PML4MASK (NBPML4-1) > >#define MAXPAGESIZES 3 /* maximum number of supported page sizes */ > >#define IOPAGES 2 /* pages of i/o permission bitmap */ >/* > * I/O permission bitmap has a bit for each I/O port plus an additional > * byte at the end with all bits set. See section "I/O Permission Bit Map" > * in the Intel SDM for more details. > */ >#define IOPERM_BITMAP_SIZE (IOPAGES * PAGE_SIZE + 1) > >#ifndef KSTACK_PAGES >#define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ >#endif ># 133 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 >#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ > >/* > * Mach derived conversion macros > */ >#define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) >#define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK)) >#define trunc_2mpage(x) ((unsigned long)(x) & ~PDRMASK) >#define round_2mpage(x) ((((unsigned long)(x)) + PDRMASK) & ~PDRMASK) >#define trunc_1gpage(x) ((unsigned long)(x) & ~PDPMASK) > >#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) >#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) > >#define amd64_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) >#define amd64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) > >#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) > >#define INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \ > || ((va) >= VM_MIN_KERNEL_ADDRESS && (va) < VM_MAX_KERNEL_ADDRESS)) > >#endif /* !_AMD64_INCLUDE_PARAM_H_ */ ># 156 "/usr/obj/usr/src/tmp/usr/include/machine/param.h" 3 4 ># 136 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 2 3 4 >#ifndef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/limits.h> >#endif /* expanded by -frewrite-includes */ ># 137 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/limits.h 219271 2011-03-04 19:28:27Z jilles $ > */ > >#ifndef _SYS_LIMITS_H_ >#define _SYS_LIMITS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 2 3 4 > >#define CHAR_BIT __CHAR_BIT /* number of bits in a char */ > >#define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */ >#define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */ > >#define UCHAR_MAX __UCHAR_MAX /* max value for an unsigned char */ > >#ifdef __CHAR_UNSIGNED__ >#define CHAR_MAX UCHAR_MAX /* max value for a char */ >#define CHAR_MIN 0 /* min value for a char */ >#else ># 49 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 >#define CHAR_MAX SCHAR_MAX >#define CHAR_MIN SCHAR_MIN >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */ >#define SHRT_MAX __SHRT_MAX /* max value for a short */ >#define SHRT_MIN __SHRT_MIN /* min value for a short */ > >#define UINT_MAX __UINT_MAX /* max value for an unsigned int */ >#define INT_MAX __INT_MAX /* max value for an int */ >#define INT_MIN __INT_MIN /* min value for an int */ > >#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */ >#define LONG_MAX __LONG_MAX /* max for a long */ >#define LONG_MIN __LONG_MIN /* min for a long */ > >#ifdef __LONG_LONG_SUPPORTED >#define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */ >#define LLONG_MAX __LLONG_MAX /* max for a long long */ >#define LLONG_MIN __LLONG_MIN /* min for a long long */ >#endif ># 70 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */ >#endif ># 74 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */ > >#define OFF_MAX __OFF_MAX /* max value for an off_t */ >#define OFF_MIN __OFF_MIN /* min value for an off_t */ >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __BSD_VISIBLE >#define GID_MAX UINT_MAX /* max value for a gid_t */ >#define UID_MAX UINT_MAX /* max value for a uid_t */ > >#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */ >#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */ >#define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */ >#endif ># 90 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 >#define LONG_BIT __LONG_BIT >#define WORD_BIT __WORD_BIT >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __POSIX_VISIBLE >#define MQ_PRIO_MAX 64 >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#endif /* !_SYS_LIMITS_H_ */ ># 101 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 ># 138 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 2 3 4 >#endif ># 139 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef DEV_BSHIFT >#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ >#endif ># 143 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#define DEV_BSIZE (1<<DEV_BSHIFT) > >#ifndef BLKDEV_IOSIZE >#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */ >#endif ># 148 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#ifndef DFLTPHYS >#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ >#endif ># 151 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#ifndef MAXPHYS >#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ >#endif ># 154 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#ifndef MAXDUMPPGS >#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) >#endif ># 157 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >/* > * Constants related to network buffer management. > * MCLBYTES must be no larger than PAGE_SIZE. > */ >#ifndef MSIZE >#define MSIZE 256 /* size of an mbuf */ >#endif ># 165 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef MCLSHIFT >#define MCLSHIFT 11 /* convert bytes to mbuf clusters */ >#endif /* MCLSHIFT */ ># 169 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */ > >#if PAGE_SIZE < 2048 >#define MJUMPAGESIZE MCLBYTES >#elif PAGE_SIZE <= 8192 ># 175 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#define MJUMPAGESIZE PAGE_SIZE >#else ># 177 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#define MJUMPAGESIZE (8 * 1024) >#endif ># 179 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */ >#define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */ > >/* > * Some macros for units conversion > */ > >/* clicks to bytes */ >#ifndef ctob >#define ctob(x) ((x)<<PAGE_SHIFT) >#endif ># 191 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >/* bytes to clicks */ >#ifndef btoc >#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT) >#endif ># 196 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >/* > * btodb() is messy and perhaps slow because `bytes' may be an off_t. We > * want to shift an unsigned type to avoid sign extension and we don't > * want to widen `bytes' unnecessarily. Assume that the result fits in > * a daddr_t. > */ >#ifndef btodb >#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ > (sizeof (bytes) > sizeof(long) \ > ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \ > : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) >#endif ># 209 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef dbtob >#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ > ((off_t)(db) << DEV_BSHIFT) >#endif ># 214 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#define PRIMASK 0x0ff >#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ >#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ > >#define NZERO 0 /* default "nice" */ > >#define NBBY 8 /* number of bits in a byte */ >#define NBPW sizeof(int) /* number of bytes per word (integer) */ > >#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ > >#define NODEV (dev_t)(-1) /* non-existent device */ > >/* > * File system parameters and macros. > * > * MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes > * per block. MAXBSIZE may be made larger without effecting > * any existing filesystems as long as it does not exceed MAXPHYS, > * and may be made smaller at the risk of not being able to use > * filesystems which require a block size exceeding MAXBSIZE. > * > * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must > * be >= MAXBSIZE and can be set differently for different > * architectures by defining it in <machine/param.h>. > * Making this larger allows NFS to do larger reads/writes. > * > * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the > * minimum KVM memory reservation the kernel is willing to make. > * Filesystems can of course request smaller chunks. Actual > * backing memory uses a chunk size of a page (PAGE_SIZE). > * The default value here can be overridden on a per-architecture > * basis by defining it in <machine/param.h>. This should > * probably be done to increase its value, when MAXBCACHEBUF is > * defined as a larger value in <machine/param.h>. > * > * If you make BKVASIZE too small you risk seriously fragmenting > * the buffer KVM map which may slow things down a bit. If you > * make it too big the kernel will not be able to optimally use > * the KVM memory reserved for the buffer cache and will wind > * up with too-few buffers. > * > * The default is 16384, roughly 2x the block size used by a > * normal UFS filesystem. > */ >#define MAXBSIZE 65536 /* must be power of 2 */ >#ifndef MAXBCACHEBUF >#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ >#endif ># 264 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#ifndef BKVASIZE >#define BKVASIZE 16384 /* must be power of 2 */ >#endif ># 267 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#define BKVAMASK (BKVASIZE-1) > >/* > * MAXPATHLEN defines the longest permissible path length after expanding > * symbolic links. It is used to allocate a temporary buffer from the buffer > * pool in which to do the name expansion, hence should be a power of two, > * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the > * maximum number of symbolic links that may be expanded in a path name. > * It should be set high enough to allow all legitimate uses, but halt > * infinite loops reasonably quickly. > */ >#define MAXPATHLEN PATH_MAX >#define MAXSYMLINKS 32 > >/* Bit map related macros. */ >#define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) >#define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) >#define isset(a,i) \ > (((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) >#define isclr(a,i) \ > ((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) > >/* Macros for counting and rounding. */ >#ifndef howmany >#define howmany(x, y) (((x)+((y)-1))/(y)) >#endif ># 293 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#define nitems(x) (sizeof((x)) / sizeof((x)[0])) >#define rounddown(x, y) (((x)/(y))*(y)) >#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ >#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ >#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ >#define powerof2(x) ((((x)-1)&(x))==0) > >/* Macros for min/max. */ >#define MIN(a,b) (((a)<(b))?(a):(b)) >#define MAX(a,b) (((a)>(b))?(a):(b)) > >#ifdef _KERNEL >/* > * Basic byte order function prototypes for non-inline functions. > */ >#ifndef LOCORE >#ifndef _BYTEORDER_PROTOTYPED >#define _BYTEORDER_PROTOTYPED >__BEGIN_DECLS >__uint32_t htonl(__uint32_t); >__uint16_t htons(__uint16_t); >__uint32_t ntohl(__uint32_t); >__uint16_t ntohs(__uint16_t); >__END_DECLS >#endif ># 318 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#endif ># 319 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >#ifndef lint >#ifndef _BYTEORDER_FUNC_DEFINED >#define _BYTEORDER_FUNC_DEFINED >#define htonl(x) __htonl(x) >#define htons(x) __htons(x) >#define ntohl(x) __ntohl(x) >#define ntohs(x) __ntohs(x) >#endif /* !_BYTEORDER_FUNC_DEFINED */ ># 328 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#endif /* lint */ ># 329 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 >#endif /* _KERNEL */ ># 330 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 > >/* > * Scale factor for scaled integers used to count %cpu time and load avgs. > * > * The number of CPU `tick's that map to a unique `%age' can be expressed > * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that > * can be calculated (assuming 32 bits) can be closely approximated using > * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). > * > * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', > * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. > */ >#define FSHIFT 11 /* bits to right of fixed binary point */ >#define FSCALE (1<<FSHIFT) > >#define dbtoc(db) /* calculates devblks to pages */ \ > ((db + (ctodb(1) - 1)) >> (PAGE_SHIFT - DEV_BSHIFT)) > >#define ctodb(db) /* calculates pages to devblks */ \ > ((db) << (PAGE_SHIFT - DEV_BSHIFT)) > >/* > * Old spelling of __containerof(). > */ >#define member2struct(s, m, x) \ > ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) > >/* > * Access a variable length array that has been declared as a fixed > * length array. > */ >#define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset]) > >#endif /* _SYS_PARAM_H_ */ ># 364 "/usr/obj/usr/src/tmp/usr/include/sys/param.h" 3 4 ># 60 "/usr/src/lib/libc/../../include/arpa/nameser.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 60 "/usr/src/lib/libc/../../include/arpa/nameser.h" ># 61 "/usr/src/lib/libc/../../include/arpa/nameser.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 61 "/usr/src/lib/libc/../../include/arpa/nameser.h" ># 62 "/usr/src/lib/libc/../../include/arpa/nameser.h" > >/*% > * Revision information. This is the release date in YYYYMMDD format. > * It can change every day so the right thing to do with it is use it > * in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not > * compare for equality; rather, use it to determine whether your libbind.a > * contains a new enough lib/nameser/ to support the feature you need. > */ > >#define __NAMESER 20090302 /*%< New interface version stamp. */ >/* > * Define constants based on RFC0883, RFC1034, RFC 1035 > */ >#define NS_PACKETSZ 512 /*%< default UDP packet size */ >#define NS_MAXDNAME 1025 /*%< maximum domain name (presentation format)*/ >#define NS_MAXMSG 65535 /*%< maximum message size */ >#define NS_MAXCDNAME 255 /*%< maximum compressed domain name */ >#define NS_MAXLABEL 63 /*%< maximum length of domain label */ >#define NS_MAXLABELS 128 /*%< theoretical max #/labels per domain name */ >#define NS_MAXNNAME 256 /*%< maximum uncompressed (binary) domain name*/ >#define NS_MAXPADDR (sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff") >#define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */ >#define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */ >#define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */ >#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ >#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ >#define NS_INT8SZ 1 /*%< #/bytes of data in a u_int8_t */ >#define NS_INADDRSZ 4 /*%< IPv4 T_A */ >#define NS_IN6ADDRSZ 16 /*%< IPv6 T_AAAA */ >#define NS_CMPRSFLGS 0xc0 /*%< Flag bits indicating name compression. */ >#define NS_DEFAULTPORT 53 /*%< For both TCP and UDP. */ >/* > * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord() > * in synch with it. > */ >typedef enum __ns_sect { > ns_s_qd = 0, /*%< Query: Question. */ > ns_s_zn = 0, /*%< Update: Zone. */ > ns_s_an = 1, /*%< Query: Answer. */ > ns_s_pr = 1, /*%< Update: Prerequisites. */ > ns_s_ns = 2, /*%< Query: Name servers. */ > ns_s_ud = 2, /*%< Update: Update. */ > ns_s_ar = 3, /*%< Query|Update: Additional records. */ > ns_s_max = 4 >} ns_sect; > >/*% > * Network name (compressed or not) type. Equivalent to a pointer when used > * in a function prototype. Can be const'd. > */ >typedef u_char ns_nname[NS_MAXNNAME]; >typedef const u_char *ns_nname_ct; >typedef u_char *ns_nname_t; > >struct ns_namemap { ns_nname_ct base; int len; }; >typedef struct ns_namemap *ns_namemap_t; >typedef const struct ns_namemap *ns_namemap_ct; > >/*% > * This is a message handle. It is caller allocated and has no dynamic data. > * This structure is intended to be opaque to all but ns_parse.c, thus the > * leading _'s on the member names. Use the accessor functions, not the _'s. > */ >typedef struct __ns_msg { > const u_char *_msg, *_eom; > u_int16_t _id, _flags, _counts[ns_s_max]; > const u_char *_sections[ns_s_max]; > ns_sect _sect; > int _rrnum; > const u_char *_msg_ptr; >} ns_msg; > >/* > * This is a newmsg handle, used when constructing new messages with > * ns_newmsg_init, et al. > */ >struct ns_newmsg { > ns_msg msg; > const u_char *dnptrs[25]; > const u_char **lastdnptr; >}; >typedef struct ns_newmsg ns_newmsg; > >/* Private data structure - do not use from outside library. */ >struct _ns_flagdata { int mask, shift; }; >extern struct _ns_flagdata _ns_flagdata[]; > >/* Accessor macros - this is part of the public interface. */ > >#define ns_msg_id(handle) ((handle)._id + 0) >#define ns_msg_base(handle) ((handle)._msg + 0) >#define ns_msg_end(handle) ((handle)._eom + 0) >#define ns_msg_size(handle) ((handle)._eom - (handle)._msg) >#define ns_msg_count(handle, section) ((handle)._counts[section] + 0) > >/*% > * This is a parsed record. It is caller allocated and has no dynamic data. > */ >typedef struct __ns_rr { > char name[NS_MAXDNAME]; > u_int16_t type; > u_int16_t rr_class; > u_int32_t ttl; > u_int16_t rdlength; > const u_char * rdata; >} ns_rr; > >/* > * Same thing, but using uncompressed network binary names, and real C types. > */ >typedef struct __ns_rr2 { > ns_nname nname; > size_t nnamel; > int type; > int rr_class; > u_int ttl; > int rdlength; > const u_char * rdata; >} ns_rr2; > >/* Accessor macros - this is part of the public interface. */ >#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".") >#define ns_rr_nname(rr) ((const ns_nname_t)(rr).nname) >#define ns_rr_nnamel(rr) ((rr).nnamel + 0) >#define ns_rr_type(rr) ((ns_type)((rr).type + 0)) >#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0)) >#define ns_rr_ttl(rr) ((rr).ttl + 0) >#define ns_rr_rdlen(rr) ((rr).rdlength + 0) >#define ns_rr_rdata(rr) ((rr).rdata + 0) > >/*% > * These don't have to be in the same order as in the packet flags word, > * and they can even overlap in some cases, but they will need to be kept > * in synch with ns_parse.c:ns_flagdata[]. > */ >typedef enum __ns_flag { > ns_f_qr, /*%< Question/Response. */ > ns_f_opcode, /*%< Operation code. */ > ns_f_aa, /*%< Authoritative Answer. */ > ns_f_tc, /*%< Truncation occurred. */ > ns_f_rd, /*%< Recursion Desired. */ > ns_f_ra, /*%< Recursion Available. */ > ns_f_z, /*%< MBZ. */ > ns_f_ad, /*%< Authentic Data (DNSSEC). */ > ns_f_cd, /*%< Checking Disabled (DNSSEC). */ > ns_f_rcode, /*%< Response code. */ > ns_f_max >} ns_flag; > >/*% > * Currently defined opcodes. > */ >typedef enum __ns_opcode { > ns_o_query = 0, /*%< Standard query. */ > ns_o_iquery = 1, /*%< Inverse query (deprecated/unsupported). */ > ns_o_status = 2, /*%< Name server status query (unsupported). */ > /* Opcode 3 is undefined/reserved. */ > ns_o_notify = 4, /*%< Zone change notification. */ > ns_o_update = 5, /*%< Zone update message. */ > ns_o_max = 6 >} ns_opcode; > >/*% > * Currently defined response codes. > */ >typedef enum __ns_rcode { > ns_r_noerror = 0, /*%< No error occurred. */ > ns_r_formerr = 1, /*%< Format error. */ > ns_r_servfail = 2, /*%< Server failure. */ > ns_r_nxdomain = 3, /*%< Name error. */ > ns_r_notimpl = 4, /*%< Unimplemented. */ > ns_r_refused = 5, /*%< Operation refused. */ > /* these are for BIND_UPDATE */ > ns_r_yxdomain = 6, /*%< Name exists */ > ns_r_yxrrset = 7, /*%< RRset exists */ > ns_r_nxrrset = 8, /*%< RRset does not exist */ > ns_r_notauth = 9, /*%< Not authoritative for zone */ > ns_r_notzone = 10, /*%< Zone of record different from zone section */ > ns_r_max = 11, > /* The following are EDNS extended rcodes */ > ns_r_badvers = 16, > /* The following are TSIG errors */ > ns_r_badsig = 16, > ns_r_badkey = 17, > ns_r_badtime = 18 >} ns_rcode; > >/* BIND_UPDATE */ >typedef enum __ns_update_operation { > ns_uop_delete = 0, > ns_uop_add = 1, > ns_uop_max = 2 >} ns_update_operation; > >/*% > * This structure is used for TSIG authenticated messages > */ >struct ns_tsig_key { > char name[NS_MAXDNAME], alg[NS_MAXDNAME]; > unsigned char *data; > int len; >}; >typedef struct ns_tsig_key ns_tsig_key; > >/*% > * This structure is used for TSIG authenticated TCP messages > */ >struct ns_tcp_tsig_state { > int counter; > struct dst_key *key; > void *ctx; > unsigned char sig[NS_PACKETSZ]; > int siglen; >}; >typedef struct ns_tcp_tsig_state ns_tcp_tsig_state; > >#define NS_TSIG_FUDGE 300 >#define NS_TSIG_TCP_COUNT 100 >#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT" > >#define NS_TSIG_ERROR_NO_TSIG -10 >#define NS_TSIG_ERROR_NO_SPACE -11 >#define NS_TSIG_ERROR_FORMERR -12 > >/*% > * Currently defined type values for resources and queries. > */ >typedef enum __ns_type { > ns_t_invalid = 0, /*%< Cookie. */ > ns_t_a = 1, /*%< Host address. */ > ns_t_ns = 2, /*%< Authoritative server. */ > ns_t_md = 3, /*%< Mail destination. */ > ns_t_mf = 4, /*%< Mail forwarder. */ > ns_t_cname = 5, /*%< Canonical name. */ > ns_t_soa = 6, /*%< Start of authority zone. */ > ns_t_mb = 7, /*%< Mailbox domain name. */ > ns_t_mg = 8, /*%< Mail group member. */ > ns_t_mr = 9, /*%< Mail rename name. */ > ns_t_null = 10, /*%< Null resource record. */ > ns_t_wks = 11, /*%< Well known service. */ > ns_t_ptr = 12, /*%< Domain name pointer. */ > ns_t_hinfo = 13, /*%< Host information. */ > ns_t_minfo = 14, /*%< Mailbox information. */ > ns_t_mx = 15, /*%< Mail routing information. */ > ns_t_txt = 16, /*%< Text strings. */ > ns_t_rp = 17, /*%< Responsible person. */ > ns_t_afsdb = 18, /*%< AFS cell database. */ > ns_t_x25 = 19, /*%< X_25 calling address. */ > ns_t_isdn = 20, /*%< ISDN calling address. */ > ns_t_rt = 21, /*%< Router. */ > ns_t_nsap = 22, /*%< NSAP address. */ > ns_t_nsap_ptr = 23, /*%< Reverse NSAP lookup (deprecated). */ > ns_t_sig = 24, /*%< Security signature. */ > ns_t_key = 25, /*%< Security key. */ > ns_t_px = 26, /*%< X.400 mail mapping. */ > ns_t_gpos = 27, /*%< Geographical position (withdrawn). */ > ns_t_aaaa = 28, /*%< IPv6 Address. */ > ns_t_loc = 29, /*%< Location Information. */ > ns_t_nxt = 30, /*%< Next domain (security). */ > ns_t_eid = 31, /*%< Endpoint identifier. */ > ns_t_nimloc = 32, /*%< Nimrod Locator. */ > ns_t_srv = 33, /*%< Server Selection. */ > ns_t_atma = 34, /*%< ATM Address */ > ns_t_naptr = 35, /*%< Naming Authority PoinTeR */ > ns_t_kx = 36, /*%< Key Exchange */ > ns_t_cert = 37, /*%< Certification record */ > ns_t_a6 = 38, /*%< IPv6 address (experimental) */ > ns_t_dname = 39, /*%< Non-terminal DNAME */ > ns_t_sink = 40, /*%< Kitchen sink (experimentatl) */ > ns_t_opt = 41, /*%< EDNS0 option (meta-RR) */ > ns_t_apl = 42, /*%< Address prefix list (RFC3123) */ > ns_t_ds = 43, /*%< Delegation Signer */ > ns_t_sshfp = 44, /*%< SSH Fingerprint */ > ns_t_ipseckey = 45, /*%< IPSEC Key */ > ns_t_rrsig = 46, /*%< RRset Signature */ > ns_t_nsec = 47, /*%< Negative security */ > ns_t_dnskey = 48, /*%< DNS Key */ > ns_t_dhcid = 49, /*%< Dynamic host configuratin identifier */ > ns_t_nsec3 = 50, /*%< Negative security type 3 */ > ns_t_nsec3param = 51, /*%< Negative security type 3 parameters */ > ns_t_hip = 55, /*%< Host Identity Protocol */ > ns_t_spf = 99, /*%< Sender Policy Framework */ > ns_t_tkey = 249, /*%< Transaction key */ > ns_t_tsig = 250, /*%< Transaction signature. */ > ns_t_ixfr = 251, /*%< Incremental zone transfer. */ > ns_t_axfr = 252, /*%< Transfer zone of authority. */ > ns_t_mailb = 253, /*%< Transfer mailbox records. */ > ns_t_maila = 254, /*%< Transfer mail agent records. */ > ns_t_any = 255, /*%< Wildcard match. */ > ns_t_zxfr = 256, /*%< BIND-specific, nonstandard. */ > ns_t_dlv = 32769, /*%< DNSSEC look-aside validatation. */ > ns_t_max = 65536 >} ns_type; > >/* Exclusively a QTYPE? (not also an RTYPE) */ >#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \ > (t) == ns_t_mailb || (t) == ns_t_maila) >/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */ >#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt) >/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */ >#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t)) >#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr) >#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \ > (t) == ns_t_zxfr) > >/*% > * Values for class field > */ >typedef enum __ns_class { > ns_c_invalid = 0, /*%< Cookie. */ > ns_c_in = 1, /*%< Internet. */ > ns_c_2 = 2, /*%< unallocated/unsupported. */ > ns_c_chaos = 3, /*%< MIT Chaos-net. */ > ns_c_hs = 4, /*%< MIT Hesiod. */ > /* Query class values which do not appear in resource records */ > ns_c_none = 254, /*%< for prereq. sections in update requests */ > ns_c_any = 255, /*%< Wildcard match. */ > ns_c_max = 65536 >} ns_class; > >/* DNSSEC constants. */ > >typedef enum __ns_key_types { > ns_kt_rsa = 1, /*%< key type RSA/MD5 */ > ns_kt_dh = 2, /*%< Diffie Hellman */ > ns_kt_dsa = 3, /*%< Digital Signature Standard (MANDATORY) */ > ns_kt_private = 254 /*%< Private key type starts with OID */ >} ns_key_types; > >typedef enum __ns_cert_types { > cert_t_pkix = 1, /*%< PKIX (X.509v3) */ > cert_t_spki = 2, /*%< SPKI */ > cert_t_pgp = 3, /*%< PGP */ > cert_t_url = 253, /*%< URL private type */ > cert_t_oid = 254 /*%< OID private type */ >} ns_cert_types; > >/* Flags field of the KEY RR rdata. */ >#define NS_KEY_TYPEMASK 0xC000 /*%< Mask for "type" bits */ >#define NS_KEY_TYPE_AUTH_CONF 0x0000 /*%< Key usable for both */ >#define NS_KEY_TYPE_CONF_ONLY 0x8000 /*%< Key usable for confidentiality */ >#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /*%< Key usable for authentication */ >#define NS_KEY_TYPE_NO_KEY 0xC000 /*%< No key usable for either; no key */ >/* The type bits can also be interpreted independently, as single bits: */ >#define NS_KEY_NO_AUTH 0x8000 /*%< Key unusable for authentication */ >#define NS_KEY_NO_CONF 0x4000 /*%< Key unusable for confidentiality */ >#define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */ >#define NS_KEY_EXTENDED_FLAGS 0x1000 /*%< reserved - must be zero */ >#define NS_KEY_RESERVED4 0x0800 /*%< reserved - must be zero */ >#define NS_KEY_RESERVED5 0x0400 /*%< reserved - must be zero */ >#define NS_KEY_NAME_TYPE 0x0300 /*%< these bits determine the type */ >#define NS_KEY_NAME_USER 0x0000 /*%< key is assoc. with user */ >#define NS_KEY_NAME_ENTITY 0x0200 /*%< key is assoc. with entity eg host */ >#define NS_KEY_NAME_ZONE 0x0100 /*%< key is zone key */ >#define NS_KEY_NAME_RESERVED 0x0300 /*%< reserved meaning */ >#define NS_KEY_RESERVED8 0x0080 /*%< reserved - must be zero */ >#define NS_KEY_RESERVED9 0x0040 /*%< reserved - must be zero */ >#define NS_KEY_RESERVED10 0x0020 /*%< reserved - must be zero */ >#define NS_KEY_RESERVED11 0x0010 /*%< reserved - must be zero */ >#define NS_KEY_SIGNATORYMASK 0x000F /*%< key can sign RR's of same name */ >#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \ > NS_KEY_RESERVED4 | \ > NS_KEY_RESERVED5 | \ > NS_KEY_RESERVED8 | \ > NS_KEY_RESERVED9 | \ > NS_KEY_RESERVED10 | \ > NS_KEY_RESERVED11 ) >#define NS_KEY_RESERVED_BITMASK2 0xFFFF /*%< no bits defined here */ >/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */ >#define NS_ALG_MD5RSA 1 /*%< MD5 with RSA */ >#define NS_ALG_DH 2 /*%< Diffie Hellman KEY */ >#define NS_ALG_DSA 3 /*%< DSA KEY */ >#define NS_ALG_DSS NS_ALG_DSA >#define NS_ALG_EXPIRE_ONLY 253 /*%< No alg, no security */ >#define NS_ALG_PRIVATE_OID 254 /*%< Key begins with OID giving alg */ >/* Protocol values */ >/* value 0 is reserved */ >#define NS_KEY_PROT_TLS 1 >#define NS_KEY_PROT_EMAIL 2 >#define NS_KEY_PROT_DNSSEC 3 >#define NS_KEY_PROT_IPSEC 4 >#define NS_KEY_PROT_ANY 255 > >/* Signatures */ >#define NS_MD5RSA_MIN_BITS 512 /*%< Size of a mod or exp in bits */ >#define NS_MD5RSA_MAX_BITS 4096 > /* Total of binary mod and exp */ >#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3) > /* Max length of text sig block */ >#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4) >#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8) >#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8) > >#define NS_DSA_SIG_SIZE 41 >#define NS_DSA_MIN_SIZE 213 >#define NS_DSA_MAX_BYTES 405 > >/* Offsets into SIG record rdata to find various values */ >#define NS_SIG_TYPE 0 /*%< Type flags */ >#define NS_SIG_ALG 2 /*%< Algorithm */ >#define NS_SIG_LABELS 3 /*%< How many labels in name */ >#define NS_SIG_OTTL 4 /*%< Original TTL */ >#define NS_SIG_EXPIR 8 /*%< Expiration time */ >#define NS_SIG_SIGNED 12 /*%< Signature time */ >#define NS_SIG_FOOT 16 /*%< Key footprint */ >#define NS_SIG_SIGNER 18 /*%< Domain name of who signed it */ >/* How RR types are represented as bit-flags in NXT records */ >#define NS_NXT_BITS 8 >#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS))) >#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS))) >#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS))) >#define NS_NXT_MAX 127 > >/*% > * EDNS0 extended flags and option codes, host order. > */ >#define NS_OPT_DNSSEC_OK 0x8000U >#define NS_OPT_NSID 3 > >/*% > * Inline versions of get/put short/long. Pointer is advanced. > */ >#define NS_GET16(s, cp) do { \ > register const u_char *t_cp = (const u_char *)(cp); \ > (s) = ((u_int16_t)t_cp[0] << 8) \ > | ((u_int16_t)t_cp[1]) \ > ; \ > (cp) += NS_INT16SZ; \ >} while (0) > >#define NS_GET32(l, cp) do { \ > register const u_char *t_cp = (const u_char *)(cp); \ > (l) = ((u_int32_t)t_cp[0] << 24) \ > | ((u_int32_t)t_cp[1] << 16) \ > | ((u_int32_t)t_cp[2] << 8) \ > | ((u_int32_t)t_cp[3]) \ > ; \ > (cp) += NS_INT32SZ; \ >} while (0) > >#define NS_PUT16(s, cp) do { \ > register u_int16_t t_s = (u_int16_t)(s); \ > register u_char *t_cp = (u_char *)(cp); \ > *t_cp++ = t_s >> 8; \ > *t_cp = t_s; \ > (cp) += NS_INT16SZ; \ >} while (0) > >#define NS_PUT32(l, cp) do { \ > register u_int32_t t_l = (u_int32_t)(l); \ > register u_char *t_cp = (u_char *)(cp); \ > *t_cp++ = t_l >> 24; \ > *t_cp++ = t_l >> 16; \ > *t_cp++ = t_l >> 8; \ > *t_cp = t_l; \ > (cp) += NS_INT32SZ; \ >} while (0) > >/*% > * ANSI C identifier hiding for bind's lib/nameser. > */ >#define ns_msg_getflag __ns_msg_getflag >#define ns_get16 __ns_get16 >#define ns_get32 __ns_get32 >#define ns_put16 __ns_put16 >#define ns_put32 __ns_put32 >#define ns_initparse __ns_initparse >#define ns_skiprr __ns_skiprr >#define ns_parserr __ns_parserr >#define ns_parserr2 __ns_parserr2 >#define ns_sprintrr __ns_sprintrr >#define ns_sprintrrf __ns_sprintrrf >#define ns_format_ttl __ns_format_ttl >#define ns_parse_ttl __ns_parse_ttl >#if 0 >#define ns_datetosecs __ns_datetosecs >#endif ># 539 "/usr/src/lib/libc/../../include/arpa/nameser.h" >#define ns_name_ntol __ns_name_ntol >#define ns_name_ntop __ns_name_ntop >#define ns_name_pton __ns_name_pton >#define ns_name_pton2 __ns_name_pton2 >#define ns_name_unpack __ns_name_unpack >#define ns_name_unpack2 __ns_name_unpack2 >#define ns_name_pack __ns_name_pack >#define ns_name_compress __ns_name_compress >#define ns_name_uncompress __ns_name_uncompress >#define ns_name_skip __ns_name_skip >#define ns_name_rollback __ns_name_rollback >#define ns_name_length __ns_name_length >#define ns_name_eq __ns_name_eq >#define ns_name_owned __ns_name_owned >#define ns_name_map __ns_name_map >#define ns_name_labels __ns_name_labels >#if 0 >#define ns_sign __ns_sign >#define ns_sign2 __ns_sign2 >#define ns_sign_tcp __ns_sign_tcp >#define ns_sign_tcp2 __ns_sign_tcp2 >#define ns_sign_tcp_init __ns_sign_tcp_init >#define ns_find_tsig __ns_find_tsig >#define ns_verify __ns_verify >#define ns_verify_tcp __ns_verify_tcp >#define ns_verify_tcp_init __ns_verify_tcp_init >#endif ># 566 "/usr/src/lib/libc/../../include/arpa/nameser.h" >#define ns_samedomain __ns_samedomain >#if 0 >#define ns_subdomain __ns_subdomain >#endif ># 570 "/usr/src/lib/libc/../../include/arpa/nameser.h" >#define ns_makecanon __ns_makecanon >#define ns_samename __ns_samename >#define ns_newmsg_init __ns_newmsg_init >#define ns_newmsg_copy __ns_newmsg_copy >#define ns_newmsg_id __ns_newmsg_id >#define ns_newmsg_flag __ns_newmsg_flag >#define ns_newmsg_q __ns_newmsg_q >#define ns_newmsg_rr __ns_newmsg_rr >#define ns_newmsg_done __ns_newmsg_done >#define ns_rdata_unpack __ns_rdata_unpack >#define ns_rdata_equal __ns_rdata_equal >#define ns_rdata_refers __ns_rdata_refers > >__BEGIN_DECLS >int ns_msg_getflag(ns_msg, int); >u_int ns_get16(const u_char *); >u_long ns_get32(const u_char *); >void ns_put16(u_int, u_char *); >void ns_put32(u_long, u_char *); >int ns_initparse(const u_char *, int, ns_msg *); >int ns_skiprr(const u_char *, const u_char *, ns_sect, int); >int ns_parserr(ns_msg *, ns_sect, int, ns_rr *); >int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *); >int ns_sprintrr(const ns_msg *, const ns_rr *, > const char *, const char *, char *, size_t); >int ns_sprintrrf(const u_char *, size_t, const char *, > ns_class, ns_type, u_long, const u_char *, > size_t, const char *, const char *, > char *, size_t); >int ns_format_ttl(u_long, char *, size_t); >int ns_parse_ttl(const char *, u_long *); >#if 0 >u_int32_t ns_datetosecs(const char *cp, int *errp); >#endif ># 604 "/usr/src/lib/libc/../../include/arpa/nameser.h" >int ns_name_ntol(const u_char *, u_char *, size_t); >int ns_name_ntop(const u_char *, char *, size_t); >int ns_name_pton(const char *, u_char *, size_t); >int ns_name_pton2(const char *, u_char *, size_t, size_t *); >int ns_name_unpack(const u_char *, const u_char *, > const u_char *, u_char *, size_t); >int ns_name_unpack2(const u_char *, const u_char *, > const u_char *, u_char *, size_t, > size_t *); >int ns_name_pack(const u_char *, u_char *, int, > const u_char **, const u_char **); >int ns_name_uncompress(const u_char *, const u_char *, > const u_char *, char *, size_t); >int ns_name_compress(const char *, u_char *, size_t, > const u_char **, const u_char **); >int ns_name_skip(const u_char **, const u_char *); >void ns_name_rollback(const u_char *, const u_char **, > const u_char **); >ssize_t ns_name_length(ns_nname_ct, size_t); >int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t); >int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int); >int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int); >int ns_name_labels(ns_nname_ct, size_t); >#if 0 >int ns_sign(u_char *, int *, int, int, void *, > const u_char *, int, u_char *, int *, time_t); >int ns_sign2(u_char *, int *, int, int, void *, > const u_char *, int, u_char *, int *, time_t, > u_char **, u_char **); >int ns_sign_tcp(u_char *, int *, int, int, > ns_tcp_tsig_state *, int); >int ns_sign_tcp2(u_char *, int *, int, int, > ns_tcp_tsig_state *, int, > u_char **, u_char **); >int ns_sign_tcp_init(void *, const u_char *, int, > ns_tcp_tsig_state *); >u_char *ns_find_tsig(u_char *, u_char *); >int ns_verify(u_char *, int *, void *, > const u_char *, int, u_char *, int *, > time_t *, int); >int ns_verify_tcp(u_char *, int *, ns_tcp_tsig_state *, int); >int ns_verify_tcp_init(void *, const u_char *, int, > ns_tcp_tsig_state *); >#endif ># 648 "/usr/src/lib/libc/../../include/arpa/nameser.h" >int ns_samedomain(const char *, const char *); >#if 0 >int ns_subdomain(const char *, const char *); >#endif ># 652 "/usr/src/lib/libc/../../include/arpa/nameser.h" >int ns_makecanon(const char *, char *, size_t); >int ns_samename(const char *, const char *); >int ns_newmsg_init(u_char *buffer, size_t bufsiz, ns_newmsg *); >int ns_newmsg_copy(ns_newmsg *, ns_msg *); >void ns_newmsg_id(ns_newmsg *handle, u_int16_t id); >void ns_newmsg_flag(ns_newmsg *handle, ns_flag flag, u_int value); >int ns_newmsg_q(ns_newmsg *handle, ns_nname_ct qname, > ns_type qtype, ns_class qclass); >int ns_newmsg_rr(ns_newmsg *handle, ns_sect sect, > ns_nname_ct name, ns_type type, > ns_class rr_class, u_int32_t ttl, > u_int16_t rdlen, const u_char *rdata); >size_t ns_newmsg_done(ns_newmsg *handle); >ssize_t ns_rdata_unpack(const u_char *, const u_char *, ns_type, > const u_char *, size_t, u_char *, size_t); >int ns_rdata_equal(ns_type, > const u_char *, size_t, > const u_char *, size_t); >int ns_rdata_refers(ns_type, > const u_char *, size_t, > const u_char *); >__END_DECLS > >#ifdef BIND_4_COMPAT >#if 0 /* expanded by -frewrite-includes */ >#include <arpa/nameser_compat.h> >#endif /* expanded by -frewrite-includes */ ># 676 "/usr/src/lib/libc/../../include/arpa/nameser.h" ># 1 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" 1 >/* Copyright (c) 1983, 1989 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > */ > >/*% > * from nameser.h 8.1 (Berkeley) 6/2/93 > * $Id: nameser_compat.h,v 1.8 2006/05/19 02:33:40 marka Exp $ > * $FreeBSD: head/include/arpa/nameser_compat.h 269867 2014-08-12 12:36:06Z ume $ > */ > >#ifndef _ARPA_NAMESER_COMPAT_ >#define _ARPA_NAMESER_COMPAT_ > >#define __BIND 19950621 /*%< (DEAD) interface version stamp. */ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/endian.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/endian.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 3 4 ># 41 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" 2 > >#if !defined(_BYTE_ORDER) || \ > (_BYTE_ORDER != _BIG_ENDIAN && _BYTE_ORDER != _LITTLE_ENDIAN && \ > _BYTE_ORDER != _PDP_ENDIAN) > /* you must determine what the correct bit order is for > * your compiler - the next line is an intentional error > * which will force your compiles to bomb until you fix > * the above macros. > */ >#error "Undefined or invalid _BYTE_ORDER"; >#endif ># 52 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" > >/*% > * Structure for query header. The order of the fields is machine- and > * compiler-dependent, depending on the byte/bit order and the layout > * of bit fields. We use bit fields only in int variables, as this > * is all ANSI requires. This requires a somewhat confusing rearrangement. > */ > >typedef struct { > unsigned id :16; /*%< query identification number */ >#if _BYTE_ORDER == _BIG_ENDIAN > /* fields in third byte */ > unsigned qr: 1; /*%< response flag */ > unsigned opcode: 4; /*%< purpose of message */ > unsigned aa: 1; /*%< authoritative answer */ > unsigned tc: 1; /*%< truncated message */ > unsigned rd: 1; /*%< recursion desired */ > /* fields in fourth byte */ > unsigned ra: 1; /*%< recursion available */ > unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ > unsigned ad: 1; /*%< authentic data from named */ > unsigned cd: 1; /*%< checking disabled by resolver */ > unsigned rcode :4; /*%< response code */ >#endif ># 76 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" >#if _BYTE_ORDER == _LITTLE_ENDIAN || _BYTE_ORDER == _PDP_ENDIAN > /* fields in third byte */ > unsigned rd :1; /*%< recursion desired */ > unsigned tc :1; /*%< truncated message */ > unsigned aa :1; /*%< authoritative answer */ > unsigned opcode :4; /*%< purpose of message */ > unsigned qr :1; /*%< response flag */ > /* fields in fourth byte */ > unsigned rcode :4; /*%< response code */ > unsigned cd: 1; /*%< checking disabled by resolver */ > unsigned ad: 1; /*%< authentic data from named */ > unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ > unsigned ra :1; /*%< recursion available */ >#endif ># 90 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" > /* remaining bytes */ > unsigned qdcount :16; /*%< number of question entries */ > unsigned ancount :16; /*%< number of answer entries */ > unsigned nscount :16; /*%< number of authority entries */ > unsigned arcount :16; /*%< number of resource entries */ >} HEADER; > >#define PACKETSZ NS_PACKETSZ >#define MAXDNAME NS_MAXDNAME >#define MAXCDNAME NS_MAXCDNAME >#define MAXLABEL NS_MAXLABEL >#define HFIXEDSZ NS_HFIXEDSZ >#define QFIXEDSZ NS_QFIXEDSZ >#define RRFIXEDSZ NS_RRFIXEDSZ >#define INT32SZ NS_INT32SZ >#define INT16SZ NS_INT16SZ >#define INT8SZ NS_INT8SZ >#define INADDRSZ NS_INADDRSZ >#define IN6ADDRSZ NS_IN6ADDRSZ >#define INDIR_MASK NS_CMPRSFLGS >#define NAMESERVER_PORT NS_DEFAULTPORT > >#define S_ZONE ns_s_zn >#define S_PREREQ ns_s_pr >#define S_UPDATE ns_s_ud >#define S_ADDT ns_s_ar > >#define QUERY ns_o_query >#define IQUERY ns_o_iquery >#define STATUS ns_o_status >#define NS_NOTIFY_OP ns_o_notify >#define NS_UPDATE_OP ns_o_update > >#define NOERROR ns_r_noerror >#define FORMERR ns_r_formerr >#define SERVFAIL ns_r_servfail >#define NXDOMAIN ns_r_nxdomain >#define NOTIMP ns_r_notimpl >#define REFUSED ns_r_refused >#define YXDOMAIN ns_r_yxdomain >#define YXRRSET ns_r_yxrrset >#define NXRRSET ns_r_nxrrset >#define NOTAUTH ns_r_notauth >#define NOTZONE ns_r_notzone >/*#define BADSIG ns_r_badsig*/ >/*#define BADKEY ns_r_badkey*/ >/*#define BADTIME ns_r_badtime*/ > > >#define DELETE ns_uop_delete >#define ADD ns_uop_add > >#define T_A ns_t_a >#define T_NS ns_t_ns >#define T_MD ns_t_md >#define T_MF ns_t_mf >#define T_CNAME ns_t_cname >#define T_SOA ns_t_soa >#define T_MB ns_t_mb >#define T_MG ns_t_mg >#define T_MR ns_t_mr >#define T_NULL ns_t_null >#define T_WKS ns_t_wks >#define T_PTR ns_t_ptr >#define T_HINFO ns_t_hinfo >#define T_MINFO ns_t_minfo >#define T_MX ns_t_mx >#define T_TXT ns_t_txt >#define T_RP ns_t_rp >#define T_AFSDB ns_t_afsdb >#define T_X25 ns_t_x25 >#define T_ISDN ns_t_isdn >#define T_RT ns_t_rt >#define T_NSAP ns_t_nsap >#define T_NSAP_PTR ns_t_nsap_ptr >#define T_SIG ns_t_sig >#define T_KEY ns_t_key >#define T_PX ns_t_px >#define T_GPOS ns_t_gpos >#define T_AAAA ns_t_aaaa >#define T_LOC ns_t_loc >#define T_NXT ns_t_nxt >#define T_EID ns_t_eid >#define T_NIMLOC ns_t_nimloc >#define T_SRV ns_t_srv >#define T_ATMA ns_t_atma >#define T_NAPTR ns_t_naptr >#define T_A6 ns_t_a6 >#define T_OPT ns_t_opt >#define T_TSIG ns_t_tsig >#define T_IXFR ns_t_ixfr >#define T_AXFR ns_t_axfr >#define T_MAILB ns_t_mailb >#define T_MAILA ns_t_maila >#define T_ANY ns_t_any > >#define C_IN ns_c_in >#define C_CHAOS ns_c_chaos >#define C_HS ns_c_hs >/* BIND_UPDATE */ >#define C_NONE ns_c_none >#define C_ANY ns_c_any > >#define GETSHORT NS_GET16 >#define GETLONG NS_GET32 >#define PUTSHORT NS_PUT16 >#define PUTLONG NS_PUT32 > >#endif /* _ARPA_NAMESER_COMPAT_ */ ># 199 "/usr/src/lib/libc/../../include/arpa/nameser_compat.h" >/*! \file */ ># 677 "/usr/src/lib/libc/../../include/arpa/nameser.h" 2 >#endif ># 678 "/usr/src/lib/libc/../../include/arpa/nameser.h" > >#endif /* !_ARPA_NAMESER_H_ */ ># 680 "/usr/src/lib/libc/../../include/arpa/nameser.h" >/*! \file */ ># 30 "/usr/src/lib/libc/nameser/ns_name.c" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include <errno.h> >#endif /* expanded by -frewrite-includes */ ># 31 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/obj/usr/src/tmp/usr/include/errno.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)errno.h 8.5 (Berkeley) 1/21/94 > * $FreeBSD: head/sys/sys/errno.h 296715 2016-03-12 07:54:42Z trasz $ > */ > >#ifndef _SYS_ERRNO_H_ >#define _SYS_ERRNO_H_ > >#ifndef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >__BEGIN_DECLS >int * __error(void); >__END_DECLS >#define errno (* __error()) >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#define EPERM 1 /* Operation not permitted */ >#define ENOENT 2 /* No such file or directory */ >#define ESRCH 3 /* No such process */ >#define EINTR 4 /* Interrupted system call */ >#define EIO 5 /* Input/output error */ >#define ENXIO 6 /* Device not configured */ >#define E2BIG 7 /* Argument list too long */ >#define ENOEXEC 8 /* Exec format error */ >#define EBADF 9 /* Bad file descriptor */ >#define ECHILD 10 /* No child processes */ >#define EDEADLK 11 /* Resource deadlock avoided */ > /* 11 was EAGAIN */ >#define ENOMEM 12 /* Cannot allocate memory */ >#define EACCES 13 /* Permission denied */ >#define EFAULT 14 /* Bad address */ >#ifndef _POSIX_SOURCE >#define ENOTBLK 15 /* Block device required */ >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define EBUSY 16 /* Device busy */ >#define EEXIST 17 /* File exists */ >#define EXDEV 18 /* Cross-device link */ >#define ENODEV 19 /* Operation not supported by device */ >#define ENOTDIR 20 /* Not a directory */ >#define EISDIR 21 /* Is a directory */ >#define EINVAL 22 /* Invalid argument */ >#define ENFILE 23 /* Too many open files in system */ >#define EMFILE 24 /* Too many open files */ >#define ENOTTY 25 /* Inappropriate ioctl for device */ >#ifndef _POSIX_SOURCE >#define ETXTBSY 26 /* Text file busy */ >#endif ># 80 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define EFBIG 27 /* File too large */ >#define ENOSPC 28 /* No space left on device */ >#define ESPIPE 29 /* Illegal seek */ >#define EROFS 30 /* Read-only filesystem */ >#define EMLINK 31 /* Too many links */ >#define EPIPE 32 /* Broken pipe */ > >/* math software */ >#define EDOM 33 /* Numerical argument out of domain */ >#define ERANGE 34 /* Result too large */ > >/* non-blocking and interrupt i/o */ >#define EAGAIN 35 /* Resource temporarily unavailable */ >#ifndef _POSIX_SOURCE >#define EWOULDBLOCK EAGAIN /* Operation would block */ >#define EINPROGRESS 36 /* Operation now in progress */ >#define EALREADY 37 /* Operation already in progress */ > >/* ipc/network software -- argument errors */ >#define ENOTSOCK 38 /* Socket operation on non-socket */ >#define EDESTADDRREQ 39 /* Destination address required */ >#define EMSGSIZE 40 /* Message too long */ >#define EPROTOTYPE 41 /* Protocol wrong type for socket */ >#define ENOPROTOOPT 42 /* Protocol not available */ >#define EPROTONOSUPPORT 43 /* Protocol not supported */ >#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ >#define EOPNOTSUPP 45 /* Operation not supported */ >#define ENOTSUP EOPNOTSUPP /* Operation not supported */ >#define EPFNOSUPPORT 46 /* Protocol family not supported */ >#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ >#define EADDRINUSE 48 /* Address already in use */ >#define EADDRNOTAVAIL 49 /* Can't assign requested address */ > >/* ipc/network software -- operational errors */ >#define ENETDOWN 50 /* Network is down */ >#define ENETUNREACH 51 /* Network is unreachable */ >#define ENETRESET 52 /* Network dropped connection on reset */ >#define ECONNABORTED 53 /* Software caused connection abort */ >#define ECONNRESET 54 /* Connection reset by peer */ >#define ENOBUFS 55 /* No buffer space available */ >#define EISCONN 56 /* Socket is already connected */ >#define ENOTCONN 57 /* Socket is not connected */ >#define ESHUTDOWN 58 /* Can't send after socket shutdown */ >#define ETOOMANYREFS 59 /* Too many references: can't splice */ >#define ETIMEDOUT 60 /* Operation timed out */ >#define ECONNREFUSED 61 /* Connection refused */ > >#define ELOOP 62 /* Too many levels of symbolic links */ >#endif /* _POSIX_SOURCE */ ># 129 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define ENAMETOOLONG 63 /* File name too long */ > >/* should be rearranged */ >#ifndef _POSIX_SOURCE >#define EHOSTDOWN 64 /* Host is down */ >#define EHOSTUNREACH 65 /* No route to host */ >#endif /* _POSIX_SOURCE */ ># 136 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define ENOTEMPTY 66 /* Directory not empty */ > >/* quotas & mush */ >#ifndef _POSIX_SOURCE >#define EPROCLIM 67 /* Too many processes */ >#define EUSERS 68 /* Too many users */ >#define EDQUOT 69 /* Disc quota exceeded */ > >/* Network File System */ >#define ESTALE 70 /* Stale NFS file handle */ >#define EREMOTE 71 /* Too many levels of remote in path */ >#define EBADRPC 72 /* RPC struct is bad */ >#define ERPCMISMATCH 73 /* RPC version wrong */ >#define EPROGUNAVAIL 74 /* RPC prog. not avail */ >#define EPROGMISMATCH 75 /* Program version wrong */ >#define EPROCUNAVAIL 76 /* Bad procedure for program */ >#endif /* _POSIX_SOURCE */ ># 153 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#define ENOLCK 77 /* No locks available */ >#define ENOSYS 78 /* Function not implemented */ > >#ifndef _POSIX_SOURCE >#define EFTYPE 79 /* Inappropriate file type or format */ >#define EAUTH 80 /* Authentication error */ >#define ENEEDAUTH 81 /* Need authenticator */ >#define EIDRM 82 /* Identifier removed */ >#define ENOMSG 83 /* No message of desired type */ >#define EOVERFLOW 84 /* Value too large to be stored in data type */ >#define ECANCELED 85 /* Operation canceled */ >#define EILSEQ 86 /* Illegal byte sequence */ >#define ENOATTR 87 /* Attribute not found */ > >#define EDOOFUS 88 /* Programming error */ >#endif /* _POSIX_SOURCE */ ># 170 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#define EBADMSG 89 /* Bad message */ >#define EMULTIHOP 90 /* Multihop attempted */ >#define ENOLINK 91 /* Link has been severed */ >#define EPROTO 92 /* Protocol error */ > >#ifndef _POSIX_SOURCE >#define ENOTCAPABLE 93 /* Capabilities insufficient */ >#define ECAPMODE 94 /* Not permitted in capability mode */ >#define ENOTRECOVERABLE 95 /* State not recoverable */ >#define EOWNERDEAD 96 /* Previous owner died */ >#endif /* _POSIX_SOURCE */ ># 182 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#ifndef _POSIX_SOURCE >#define ELAST 96 /* Must be equal largest errno */ >#endif /* _POSIX_SOURCE */ ># 186 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#ifdef _KERNEL >/* pseudo-errors returned inside kernel to modify return to process */ >#define ERESTART (-1) /* restart syscall */ >#define EJUSTRETURN (-2) /* don't modify regs, just return */ >#define ENOIOCTL (-3) /* ioctl not handled by this layer */ >#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ >#define ERELOOKUP (-5) /* retry the directory lookup */ >#endif ># 195 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#endif ># 197 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 ># 32 "/usr/src/lib/libc/nameser/ns_name.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <resolv.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/../../include/resolv.h" 1 >/* > * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") > * Portions Copyright (C) 1995-2003 Internet Software Consortium. > * > * Permission to use, copy, modify, and/or distribute this software for any > * purpose with or without fee is hereby granted, provided that the above > * copyright notice and this permission notice appear in all copies. > * > * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH > * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY > * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, > * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM > * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE > * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR > * PERFORMANCE OF THIS SOFTWARE. > */ > >/* > * Copyright (c) 1983, 1987, 1989 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > */ > >/*% > * @(#)resolv.h 8.1 (Berkeley) 6/2/93 > * $Id: resolv.h,v 1.30 2009/03/03 01:52:48 each Exp $ > * $FreeBSD: head/include/resolv.h 292216 2015-12-14 17:21:06Z vangyzen $ > */ > >#ifndef _RESOLV_H_ >#define _RESOLV_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/param.h> >#endif /* expanded by -frewrite-includes */ ># 56 "/usr/src/lib/libc/../../include/resolv.h" ># 57 "/usr/src/lib/libc/../../include/resolv.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 57 "/usr/src/lib/libc/../../include/resolv.h" ># 58 "/usr/src/lib/libc/../../include/resolv.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 58 "/usr/src/lib/libc/../../include/resolv.h" ># 59 "/usr/src/lib/libc/../../include/resolv.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/socket.h> >#endif /* expanded by -frewrite-includes */ ># 59 "/usr/src/lib/libc/../../include/resolv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 1 3 4 >/*- > * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)socket.h 8.4 (Berkeley) 2/21/94 > * $FreeBSD: head/sys/sys/socket.h 301038 2016-05-31 13:32:33Z ed $ > */ > >#ifndef _SYS_SOCKET_H_ >#define _SYS_SOCKET_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_iovec.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_iovec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)uio.h 8.5 (Berkeley) 2/22/94 > * $FreeBSD: head/sys/sys/_iovec.h 139825 2005-01-07 02:29:27Z imp $ > */ > >#ifndef _SYS__IOVEC_H_ >#define _SYS__IOVEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/_iovec.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_iovec.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/_iovec.h" 3 4 > >struct iovec { > void *iov_base; /* Base address. */ > size_t iov_len; /* Length. */ >}; > >#endif /* !_SYS__IOVEC_H_ */ ># 49 "/usr/obj/usr/src/tmp/usr/include/sys/_iovec.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_align.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_align.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: head/sys/amd64/include/_align.h 215856 2010-11-26 10:59:20Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_align.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_align.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_align.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 2 3 4 > >/* > * Definitions related to sockets: types, address families, options. > */ > >/* > * Data types. > */ >#if __BSD_VISIBLE >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; >#define _GID_T_DECLARED >#endif ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#endif ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _SA_FAMILY_T_DECLARED >typedef __sa_family_t sa_family_t; >#define _SA_FAMILY_T_DECLARED >#endif ># 69 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _SOCKLEN_T_DECLARED >typedef __socklen_t socklen_t; >#define _SOCKLEN_T_DECLARED >#endif ># 74 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 79 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#if __BSD_VISIBLE >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 85 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#endif ># 86 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 96 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Types > */ >#define SOCK_STREAM 1 /* stream socket */ >#define SOCK_DGRAM 2 /* datagram socket */ >#define SOCK_RAW 3 /* raw-protocol interface */ >#if __BSD_VISIBLE >#define SOCK_RDM 4 /* reliably-delivered message */ >#endif ># 106 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#define SOCK_SEQPACKET 5 /* sequenced packet stream */ > >#if __BSD_VISIBLE >/* > * Creation flags, OR'ed into socket() and socketpair() type argument. > */ >#define SOCK_CLOEXEC 0x10000000 >#define SOCK_NONBLOCK 0x20000000 >#endif ># 115 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Option flags per-socket. > */ >#define SO_DEBUG 0x0001 /* turn on debugging info recording */ >#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ >#define SO_REUSEADDR 0x0004 /* allow local address reuse */ >#define SO_KEEPALIVE 0x0008 /* keep connections alive */ >#define SO_DONTROUTE 0x0010 /* just use interface addresses */ >#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ >#if __BSD_VISIBLE >#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ >#endif ># 128 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#define SO_LINGER 0x0080 /* linger on close if data present */ >#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ >#if __BSD_VISIBLE >#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ >#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ >#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */ >#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ >#define SO_BINTIME 0x2000 /* timestamp received dgram traffic */ >#endif ># 137 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#define SO_NO_OFFLOAD 0x4000 /* socket cannot be offloaded */ >#define SO_NO_DDP 0x8000 /* disable direct data placement */ > >/* > * Additional options, not kept in so_options. > */ >#define SO_SNDBUF 0x1001 /* send buffer size */ >#define SO_RCVBUF 0x1002 /* receive buffer size */ >#define SO_SNDLOWAT 0x1003 /* send low-water mark */ >#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ >#define SO_SNDTIMEO 0x1005 /* send timeout */ >#define SO_RCVTIMEO 0x1006 /* receive timeout */ >#define SO_ERROR 0x1007 /* get error status and clear */ >#define SO_TYPE 0x1008 /* get socket type */ >#if __BSD_VISIBLE >#define SO_LABEL 0x1009 /* socket's MAC label */ >#define SO_PEERLABEL 0x1010 /* socket's peer's MAC label */ >#define SO_LISTENQLIMIT 0x1011 /* socket's backlog limit */ >#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */ >#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ >#define SO_SETFIB 0x1014 /* use this FIB to route */ >#define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */ >#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ >#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ >#endif ># 162 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Space reserved for new socket options added by third-party vendors. > * This range applies to all socket option levels. New socket options > * in FreeBSD should always use an option value less than SO_VENDOR. > */ >#if __BSD_VISIBLE >#define SO_VENDOR 0x80000000 >#endif ># 171 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Structure used for manipulating linger option. > */ >struct linger { > int l_onoff; /* option on/off */ > int l_linger; /* linger time */ >}; > >#if __BSD_VISIBLE >struct accept_filter_arg { > char af_name[16]; > char af_arg[256-16]; >}; >#endif ># 186 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Level number for (get/set)sockopt() to apply to socket itself. > */ >#define SOL_SOCKET 0xffff /* options for socket level */ > >/* > * Address families. > */ >#define AF_UNSPEC 0 /* unspecified */ >#if __BSD_VISIBLE >#define AF_LOCAL AF_UNIX /* local to host (pipes, portals) */ >#endif ># 199 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#define AF_UNIX 1 /* standardized name for AF_LOCAL */ >#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ >#if __BSD_VISIBLE >#define AF_IMPLINK 3 /* arpanet imp addresses */ >#define AF_PUP 4 /* pup protocols: e.g. BSP */ >#define AF_CHAOS 5 /* mit CHAOS protocols */ >#define AF_NETBIOS 6 /* SMB protocols */ >#define AF_ISO 7 /* ISO protocols */ >#define AF_OSI AF_ISO >#define AF_ECMA 8 /* European computer manufacturers */ >#define AF_DATAKIT 9 /* datakit protocols */ >#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ >#define AF_SNA 11 /* IBM SNA */ >#define AF_DECnet 12 /* DECnet */ >#define AF_DLI 13 /* DEC Direct data link interface */ >#define AF_LAT 14 /* LAT */ >#define AF_HYLINK 15 /* NSC Hyperchannel */ >#define AF_APPLETALK 16 /* Apple Talk */ >#define AF_ROUTE 17 /* Internal Routing Protocol */ >#define AF_LINK 18 /* Link layer interface */ >#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ >#define AF_COIP 20 /* connection-oriented IP, aka ST II */ >#define AF_CNT 21 /* Computer Network Technology */ >#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ >#define AF_IPX 23 /* Novell Internet Protocol */ >#define AF_SIP 24 /* Simple Internet Protocol */ >#define pseudo_AF_PIP 25 /* Help Identify PIP packets */ >#define AF_ISDN 26 /* Integrated Services Digital Network*/ >#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ >#define pseudo_AF_KEY 27 /* Internal key-management function */ >#endif ># 230 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#define AF_INET6 28 /* IPv6 */ >#if __BSD_VISIBLE >#define AF_NATM 29 /* native ATM access */ >#define AF_ATM 30 /* ATM */ >#define pseudo_AF_HDRCMPLT 31 /* Used by BPF to not rewrite headers > * in interface output routine > */ >#define AF_NETGRAPH 32 /* Netgraph sockets */ >#define AF_SLOW 33 /* 802.3ad slow protocol */ >#define AF_SCLUSTER 34 /* Sitara cluster protocol */ >#define AF_ARP 35 >#define AF_BLUETOOTH 36 /* Bluetooth sockets */ >#define AF_IEEE80211 37 /* IEEE 802.11 protocol */ >#define AF_INET_SDP 40 /* OFED Socket Direct Protocol ipv4 */ >#define AF_INET6_SDP 42 /* OFED Socket Direct Protocol ipv6 */ >#define AF_MAX 42 >/* > * When allocating a new AF_ constant, please only allocate > * even numbered constants for FreeBSD until 134 as odd numbered AF_ > * constants 39-133 are now reserved for vendors. > */ >#define AF_VENDOR00 39 >#define AF_VENDOR01 41 >#define AF_VENDOR02 43 >#define AF_VENDOR03 45 >#define AF_VENDOR04 47 >#define AF_VENDOR05 49 >#define AF_VENDOR06 51 >#define AF_VENDOR07 53 >#define AF_VENDOR08 55 >#define AF_VENDOR09 57 >#define AF_VENDOR10 59 >#define AF_VENDOR11 61 >#define AF_VENDOR12 63 >#define AF_VENDOR13 65 >#define AF_VENDOR14 67 >#define AF_VENDOR15 69 >#define AF_VENDOR16 71 >#define AF_VENDOR17 73 >#define AF_VENDOR18 75 >#define AF_VENDOR19 77 >#define AF_VENDOR20 79 >#define AF_VENDOR21 81 >#define AF_VENDOR22 83 >#define AF_VENDOR23 85 >#define AF_VENDOR24 87 >#define AF_VENDOR25 89 >#define AF_VENDOR26 91 >#define AF_VENDOR27 93 >#define AF_VENDOR28 95 >#define AF_VENDOR29 97 >#define AF_VENDOR30 99 >#define AF_VENDOR31 101 >#define AF_VENDOR32 103 >#define AF_VENDOR33 105 >#define AF_VENDOR34 107 >#define AF_VENDOR35 109 >#define AF_VENDOR36 111 >#define AF_VENDOR37 113 >#define AF_VENDOR38 115 >#define AF_VENDOR39 117 >#define AF_VENDOR40 119 >#define AF_VENDOR41 121 >#define AF_VENDOR42 123 >#define AF_VENDOR43 125 >#define AF_VENDOR44 127 >#define AF_VENDOR45 129 >#define AF_VENDOR46 131 >#define AF_VENDOR47 133 >#endif ># 300 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Structure used by kernel to store most > * addresses. > */ >struct sockaddr { > unsigned char sa_len; /* total length */ > sa_family_t sa_family; /* address family */ > char sa_data[14]; /* actually longer; address value */ >}; >#if __BSD_VISIBLE >#define SOCK_MAXADDRLEN 255 /* longest possible addresses */ > >/* > * Structure used by kernel to pass protocol > * information in raw sockets. > */ >struct sockproto { > unsigned short sp_family; /* address family */ > unsigned short sp_protocol; /* protocol */ >}; >#endif ># 322 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sockaddr_storage.h> >#endif /* expanded by -frewrite-includes */ ># 323 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 324 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#if __BSD_VISIBLE >/* > * Protocol families, same as address families for now. > */ >#define PF_UNSPEC AF_UNSPEC >#define PF_LOCAL AF_LOCAL >#define PF_UNIX PF_LOCAL /* backward compatibility */ >#define PF_INET AF_INET >#define PF_IMPLINK AF_IMPLINK >#define PF_PUP AF_PUP >#define PF_CHAOS AF_CHAOS >#define PF_NETBIOS AF_NETBIOS >#define PF_ISO AF_ISO >#define PF_OSI AF_ISO >#define PF_ECMA AF_ECMA >#define PF_DATAKIT AF_DATAKIT >#define PF_CCITT AF_CCITT >#define PF_SNA AF_SNA >#define PF_DECnet AF_DECnet >#define PF_DLI AF_DLI >#define PF_LAT AF_LAT >#define PF_HYLINK AF_HYLINK >#define PF_APPLETALK AF_APPLETALK >#define PF_ROUTE AF_ROUTE >#define PF_LINK AF_LINK >#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ >#define PF_COIP AF_COIP >#define PF_CNT AF_CNT >#define PF_SIP AF_SIP >#define PF_IPX AF_IPX >#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ >#define PF_PIP pseudo_AF_PIP >#define PF_ISDN AF_ISDN >#define PF_KEY pseudo_AF_KEY >#define PF_INET6 AF_INET6 >#define PF_NATM AF_NATM >#define PF_ATM AF_ATM >#define PF_NETGRAPH AF_NETGRAPH >#define PF_SLOW AF_SLOW >#define PF_SCLUSTER AF_SCLUSTER >#define PF_ARP AF_ARP >#define PF_BLUETOOTH AF_BLUETOOTH >#define PF_IEEE80211 AF_IEEE80211 >#define PF_INET_SDP AF_INET_SDP >#define PF_INET6_SDP AF_INET6_SDP > >#define PF_MAX AF_MAX > >/* > * Definitions for network related sysctl, CTL_NET. > * > * Second level is protocol family. > * Third level is protocol number. > * > * Further levels are defined by the individual families. > */ > >/* > * PF_ROUTE - Routing table > * > * Three additional levels are defined: > * Fourth: address family, 0 is wildcard > * Fifth: type of info, defined below > * Sixth: flag(s) to mask with for NET_RT_FLAGS > */ >#define NET_RT_DUMP 1 /* dump; may limit to a.f. */ >#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ >#define NET_RT_IFLIST 3 /* survey interface list */ >#define NET_RT_IFMALIST 4 /* return multicast address list */ >#define NET_RT_IFLISTL 5 /* Survey interface list, using 'l'en > * versions of msghdr structs. */ >#endif /* __BSD_VISIBLE */ ># 397 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Maximum queue length specifiable by listen. > */ >#define SOMAXCONN 128 > >/* > * Message header for recvmsg and sendmsg calls. > * Used value-result for recvmsg, value only for sendmsg. > */ >struct msghdr { > void *msg_name; /* optional address */ > socklen_t msg_namelen; /* size of address */ > struct iovec *msg_iov; /* scatter/gather array */ > int msg_iovlen; /* # elements in msg_iov */ > void *msg_control; /* ancillary data, see below */ > socklen_t msg_controllen; /* ancillary data buffer len */ > int msg_flags; /* flags on received message */ >}; > >#define MSG_OOB 0x1 /* process out-of-band data */ >#define MSG_PEEK 0x2 /* peek at incoming message */ >#define MSG_DONTROUTE 0x4 /* send without using routing tables */ >#define MSG_EOR 0x8 /* data completes record */ >#define MSG_TRUNC 0x10 /* data discarded before delivery */ >#define MSG_CTRUNC 0x20 /* control data lost before delivery */ >#define MSG_WAITALL 0x40 /* wait for full request or error */ >#if __POSIX_VISIBLE >= 200809 >#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ >#endif ># 427 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#if __BSD_VISIBLE >#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ >#define MSG_EOF 0x100 /* data completes connection */ >#define MSG_NOTIFICATION 0x2000 /* SCTP notification */ >#define MSG_NBIO 0x4000 /* FIONBIO mode, used by fifofs */ >#define MSG_COMPAT 0x8000 /* used in sendit() */ >#define MSG_CMSG_CLOEXEC 0x40000 /* make received fds close-on-exec */ >#define MSG_WAITFORONE 0x80000 /* for recvmmsg() */ >#endif ># 436 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >#ifdef _KERNEL >#define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */ >#endif ># 439 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Header for ancillary data objects in msg_control buffer. > * Used for additional information with/about a datagram > * not expressible by flags. The format is a sequence > * of message elements headed by cmsghdr structures. > */ >struct cmsghdr { > socklen_t cmsg_len; /* data byte count, including hdr */ > int cmsg_level; /* originating protocol */ > int cmsg_type; /* protocol-specific type */ >/* followed by u_char cmsg_data[]; */ >}; > >#if __BSD_VISIBLE >/* > * While we may have more groups than this, the cmsgcred struct must > * be able to fit in an mbuf and we have historically supported a > * maximum of 16 groups. >*/ >#define CMGROUP_MAX 16 > >/* > * Credentials structure, used to verify the identity of a peer > * process that has sent us a message. This is allocated by the > * peer process but filled in by the kernel. This prevents the > * peer from lying about its identity. (Note that cmcred_groups[0] > * is the effective GID.) > */ >struct cmsgcred { > pid_t cmcred_pid; /* PID of sending process */ > uid_t cmcred_uid; /* real UID of sending process */ > uid_t cmcred_euid; /* effective UID of sending process */ > gid_t cmcred_gid; /* real GID of sending process */ > short cmcred_ngroups; /* number or groups */ > gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ >}; > >/* > * Socket credentials. > */ >struct sockcred { > uid_t sc_uid; /* real user id */ > uid_t sc_euid; /* effective user id */ > gid_t sc_gid; /* real group id */ > gid_t sc_egid; /* effective group id */ > int sc_ngroups; /* number of supplemental groups */ > gid_t sc_groups[1]; /* variable length */ >}; > >/* > * Compute size of a sockcred structure with groups. > */ >#define SOCKCREDSIZE(ngrps) \ > (sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1))) > >#endif /* __BSD_VISIBLE */ ># 496 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* given pointer to struct cmsghdr, return pointer to data */ >#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ > _ALIGN(sizeof(struct cmsghdr))) > >/* given pointer to struct cmsghdr, return pointer to next cmsghdr */ >#define CMSG_NXTHDR(mhdr, cmsg) \ > ((char *)(cmsg) == (char *)0 ? CMSG_FIRSTHDR(mhdr) : \ > ((char *)(cmsg) + _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len) + \ > _ALIGN(sizeof(struct cmsghdr)) > \ > (char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \ > (struct cmsghdr *)0 : \ > (struct cmsghdr *)(void *)((char *)(cmsg) + \ > _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))) > >/* > * RFC 2292 requires to check msg_controllen, in case that the kernel returns > * an empty list for some reasons. > */ >#define CMSG_FIRSTHDR(mhdr) \ > ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ > (struct cmsghdr *)(mhdr)->msg_control : \ > (struct cmsghdr *)0) > >#if __BSD_VISIBLE >/* RFC 2292 additions */ >#define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l)) >#define CMSG_LEN(l) (_ALIGN(sizeof(struct cmsghdr)) + (l)) >#endif ># 525 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifdef _KERNEL >#define CMSG_ALIGN(n) _ALIGN(n) >#endif ># 529 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* "Socket"-level control message types: */ >#define SCM_RIGHTS 0x01 /* access rights (array of int) */ >#if __BSD_VISIBLE >#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ >#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ >#define SCM_BINTIME 0x04 /* timestamp (struct bintime) */ >#endif ># 537 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#if __BSD_VISIBLE >/* > * 4.3 compat sockaddr, move to compat file later > */ >struct osockaddr { > unsigned short sa_family; /* address family */ > char sa_data[14]; /* up to 14 bytes of direct address */ >}; > >/* > * 4.3-compat message header (move to compat file later). > */ >struct omsghdr { > char *msg_name; /* optional address */ > int msg_namelen; /* size of address */ > struct iovec *msg_iov; /* scatter/gather array */ > int msg_iovlen; /* # elements in msg_iov */ > char *msg_accrights; /* access rights sent/received */ > int msg_accrightslen; >}; >#endif ># 559 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * howto arguments for shutdown(2), specified by Posix.1g. > */ >#define SHUT_RD 0 /* shut down the reading side */ >#define SHUT_WR 1 /* shut down the writing side */ >#define SHUT_RDWR 2 /* shut down both sides */ > >#if __BSD_VISIBLE >/* for SCTP */ >/* we cheat and use the SHUT_XX defines for these */ >#define PRU_FLUSH_RD SHUT_RD >#define PRU_FLUSH_WR SHUT_WR >#define PRU_FLUSH_RDWR SHUT_RDWR >#endif ># 574 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > > >#if __BSD_VISIBLE >/* > * sendfile(2) header/trailer struct > */ >struct sf_hdtr { > struct iovec *headers; /* pointer to an array of header struct iovec's */ > int hdr_cnt; /* number of header iovec's */ > struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ > int trl_cnt; /* number of trailer iovec's */ >}; > >/* > * Sendfile-specific flag(s) > */ >#define SF_NODISKIO 0x00000001 >#define SF_MNOWAIT 0x00000002 /* obsolete */ >#define SF_SYNC 0x00000004 >#define SF_NOCACHE 0x00000010 >#define SF_FLAGS(rh, flags) (((rh) << 16) | (flags)) > >#ifdef _KERNEL >#define SF_READAHEAD(flags) ((flags) >> 16) >#endif /* _KERNEL */ ># 599 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >/* > * Sendmmsg/recvmmsg specific structure(s) > */ >struct mmsghdr { > struct msghdr msg_hdr; /* message header */ > ssize_t msg_len; /* message length */ >}; >#endif /* __BSD_VISIBLE */ ># 608 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifndef _KERNEL > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 611 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 612 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >__BEGIN_DECLS >int accept(int, struct sockaddr * __restrict, socklen_t * __restrict); >int bind(int, const struct sockaddr *, socklen_t); >int connect(int, const struct sockaddr *, socklen_t); >#if __BSD_VISIBLE >int accept4(int, struct sockaddr * __restrict, socklen_t * __restrict, int); >int bindat(int, int, const struct sockaddr *, socklen_t); >int connectat(int, int, const struct sockaddr *, socklen_t); >#endif ># 622 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict); >int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict); >int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); >int listen(int, int); >ssize_t recv(int, void *, size_t, int); >ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, socklen_t * __restrict); >ssize_t recvmsg(int, struct msghdr *, int); >#if __BSD_VISIBLE >struct timespec; >ssize_t recvmmsg(int, struct mmsghdr * __restrict, size_t, int, > const struct timespec * __restrict); >#endif ># 634 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >ssize_t send(int, const void *, size_t, int); >ssize_t sendto(int, const void *, > size_t, int, const struct sockaddr *, socklen_t); >ssize_t sendmsg(int, const struct msghdr *, int); >#if __BSD_VISIBLE >int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int); >ssize_t sendmmsg(int, struct mmsghdr * __restrict, size_t, int); >int setfib(int); >#endif ># 643 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 >int setsockopt(int, int, int, const void *, socklen_t); >int shutdown(int, int); >int sockatmark(int); >int socket(int, int, int); >int socketpair(int, int, int, int *); >__END_DECLS > >#endif /* !_KERNEL */ ># 651 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > >#ifdef _KERNEL >struct socket; > >struct tcpcb *so_sototcpcb(struct socket *so); >struct inpcb *so_sotoinpcb(struct socket *so); >struct sockbuf *so_sockbuf_snd(struct socket *); >struct sockbuf *so_sockbuf_rcv(struct socket *); > >int so_state_get(const struct socket *); >void so_state_set(struct socket *, int); > >int so_options_get(const struct socket *); >void so_options_set(struct socket *, int); > >int so_error_get(const struct socket *); >void so_error_set(struct socket *, int); > >int so_linger_get(const struct socket *); >void so_linger_set(struct socket *, int); > >struct protosw *so_protosw_get(const struct socket *); >void so_protosw_set(struct socket *, struct protosw *); > >void so_sorwakeup_locked(struct socket *so); >void so_sowwakeup_locked(struct socket *so); > >void so_sorwakeup(struct socket *so); >void so_sowwakeup(struct socket *so); > >void so_lock(struct socket *so); >void so_unlock(struct socket *so); > >void so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg); > >#endif ># 687 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 > > >#endif /* !_SYS_SOCKET_H_ */ ># 690 "/usr/obj/usr/src/tmp/usr/include/sys/socket.h" 3 4 ># 60 "/usr/src/lib/libc/../../include/resolv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 60 "/usr/src/lib/libc/../../include/resolv.h" ># 1 "/usr/src/lib/libc/../../include/stdio.h" 1 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Chris Torek. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdio.h 8.5 (Berkeley) 4/29/95 > * $FreeBSD: head/include/stdio.h 303683 2016-08-02 21:55:23Z imp $ > */ > >#ifndef _STDIO_H_ >#define _STDIO_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/src/lib/libc/../../include/stdio.h" ># 40 "/usr/src/lib/libc/../../include/stdio.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/src/lib/libc/../../include/stdio.h" ># 41 "/usr/src/lib/libc/../../include/stdio.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/src/lib/libc/../../include/stdio.h" ># 42 "/usr/src/lib/libc/../../include/stdio.h" > >typedef __off_t fpos_t; > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 49 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >= 200809 >#ifndef _OFF_T_DECLARED >#define _OFF_T_DECLARED >typedef __off_t off_t; >#endif ># 55 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef _SSIZE_T_DECLARED >#define _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#endif ># 59 "/usr/src/lib/libc/../../include/stdio.h" >#endif ># 60 "/usr/src/lib/libc/../../include/stdio.h" > >#ifndef _OFF64_T_DECLARED >#define _OFF64_T_DECLARED >typedef __off64_t off64_t; >#endif ># 65 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#ifndef _VA_LIST_DECLARED >typedef __va_list va_list; >#define _VA_LIST_DECLARED >#endif ># 71 "/usr/src/lib/libc/../../include/stdio.h" >#endif ># 72 "/usr/src/lib/libc/../../include/stdio.h" > >#define _FSTDIO /* Define for new stdio with functions. */ > >/* > * NB: to fit things in six character monocase externals, the stdio > * code uses the prefix `__s' for stdio objects, typically followed > * by a three-character attempt at a mnemonic. > */ > >/* stdio buffers */ >struct __sbuf { > unsigned char *_base; > int _size; >}; > >/* > * stdio state variables. > * > * The following always hold: > * > * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), > * _lbfsize is -_bf._size, else _lbfsize is 0 > * if _flags&__SRD, _w is 0 > * if _flags&__SWR, _r is 0 > * > * This ensures that the getc and putc macros (or inline functions) never > * try to write or read from a file that is in `read' or `write' mode. > * (Moreover, they can, and do, automatically switch from read mode to > * write mode, and back, on "r+" and "w+" files.) > * > * _lbfsize is used only to make the inline line-buffered output stream > * code as compact as possible. > * > * _ub, _up, and _ur are used when ungetc() pushes back more characters > * than fit in the current _bf, or when ungetc() pushes back a character > * that does not match the previous one in _bf. When this happens, > * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff > * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. > * > * Certain members of __sFILE are accessed directly via macros or > * inline functions. To preserve ABI compat, these members must not > * be disturbed. These members are marked below with (*). > */ >struct __sFILE { > unsigned char *_p; /* (*) current position in (some) buffer */ > int _r; /* (*) read space left for getc() */ > int _w; /* (*) write space left for putc() */ > short _flags; /* (*) flags, below; this FILE is free if 0 */ > short _file; /* (*) fileno, if Unix descriptor, else -1 */ > struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */ > int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */ > > /* operations */ > void *_cookie; /* (*) cookie passed to io functions */ > int (*_close)(void *); > int (*_read)(void *, char *, int); > fpos_t (*_seek)(void *, fpos_t, int); > int (*_write)(void *, const char *, int); > > /* separate buffer for long sequences of ungetc() */ > struct __sbuf _ub; /* ungetc buffer */ > unsigned char *_up; /* saved _p when _p is doing ungetc data */ > int _ur; /* saved _r when _r is counting ungetc data */ > > /* tricks to meet minimum requirements even when malloc() fails */ > unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ > unsigned char _nbuf[1]; /* guarantee a getc() buffer */ > > /* separate buffer for fgetln() when line crosses buffer boundary */ > struct __sbuf _lb; /* buffer for fgetln() */ > > /* Unix stdio files get aligned to block boundaries on fseek() */ > int _blksize; /* stat.st_blksize (may be != _bf._size) */ > fpos_t _offset; /* current lseek offset */ > > struct pthread_mutex *_fl_mutex; /* used for MT-safety */ > struct pthread *_fl_owner; /* current owner */ > int _fl_count; /* recursive lock count */ > int _orientation; /* orientation for fwide() */ > __mbstate_t _mbstate; /* multibyte conversion state */ > int _flags2; /* additional flags */ >}; >#ifndef _STDFILE_DECLARED >#define _STDFILE_DECLARED >typedef struct __sFILE FILE; >#endif ># 158 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef _STDSTREAM_DECLARED >__BEGIN_DECLS >extern FILE *__stdinp; >extern FILE *__stdoutp; >extern FILE *__stderrp; >__END_DECLS >#define _STDSTREAM_DECLARED >#endif ># 166 "/usr/src/lib/libc/../../include/stdio.h" > >#define __SLBF 0x0001 /* line buffered */ >#define __SNBF 0x0002 /* unbuffered */ >#define __SRD 0x0004 /* OK to read */ >#define __SWR 0x0008 /* OK to write */ > /* RD and WR are never simultaneously asserted */ >#define __SRW 0x0010 /* open for reading & writing */ >#define __SEOF 0x0020 /* found EOF */ >#define __SERR 0x0040 /* found error */ >#define __SMBF 0x0080 /* _bf._base is from malloc */ >#define __SAPP 0x0100 /* fdopen()ed in append mode */ >#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ >#define __SOPT 0x0400 /* do fseek() optimization */ >#define __SNPT 0x0800 /* do not do fseek() optimization */ >#define __SOFF 0x1000 /* set iff _offset is in fact correct */ >#define __SMOD 0x2000 /* true => fgetln modified _p text */ >#define __SALC 0x4000 /* allocate string space dynamically */ >#define __SIGN 0x8000 /* ignore this file in _fwalk */ > >#define __S2OAP 0x0001 /* O_APPEND mode is set */ > >/* > * The following three definitions are for ANSI C, which took them > * from System V, which brilliantly took internal interface macros and > * made them official arguments to setvbuf(), without renaming them. > * Hence, these ugly _IOxxx names are *supposed* to appear in user code. > * > * Although numbered as their counterparts above, the implementation > * does not rely on this. > */ >#define _IOFBF 0 /* setvbuf should set fully buffered */ >#define _IOLBF 1 /* setvbuf should set line buffered */ >#define _IONBF 2 /* setvbuf should set unbuffered */ > >#define BUFSIZ 1024 /* size of buffer used by setbuf */ >#define EOF (-1) > >/* > * FOPEN_MAX is a minimum maximum, and is the number of streams that > * stdio can provide without attempting to allocate further resources > * (which could fail). Do not use this for anything. > */ > /* must be == _POSIX_STREAM_MAX <limits.h> */ >#ifndef FOPEN_MAX >#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */ >#endif ># 212 "/usr/src/lib/libc/../../include/stdio.h" >#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ > >/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ >#if __XSI_VISIBLE >#define P_tmpdir "/tmp/" >#endif ># 218 "/usr/src/lib/libc/../../include/stdio.h" >#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ >#define TMP_MAX 308915776 > >#ifndef SEEK_SET >#define SEEK_SET 0 /* set file offset to offset */ >#endif ># 224 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef SEEK_CUR >#define SEEK_CUR 1 /* set file offset to current plus offset */ >#endif ># 227 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef SEEK_END >#define SEEK_END 2 /* set file offset to EOF plus offset */ >#endif ># 230 "/usr/src/lib/libc/../../include/stdio.h" > >#define stdin __stdinp >#define stdout __stdoutp >#define stderr __stderrp > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdio.h> >#endif /* expanded by -frewrite-includes */ ># 237 "/usr/src/lib/libc/../../include/stdio.h" ># 238 "/usr/src/lib/libc/../../include/stdio.h" >#endif ># 239 "/usr/src/lib/libc/../../include/stdio.h" >/* > * Functions defined in ANSI C standard. > */ >void clearerr(FILE *); >int fclose(FILE *); >int feof(FILE *); >int ferror(FILE *); >int fflush(FILE *); >int fgetc(FILE *); >int fgetpos(FILE * __restrict, fpos_t * __restrict); >char *fgets(char * __restrict, int, FILE * __restrict); >FILE *fopen(const char * __restrict, const char * __restrict); >int fprintf(FILE * __restrict, const char * __restrict, ...); >int fputc(int, FILE *); >int fputs(const char * __restrict, FILE * __restrict); >size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); >FILE *freopen(const char * __restrict, const char * __restrict, FILE * __restrict); >int fscanf(FILE * __restrict, const char * __restrict, ...); >int fseek(FILE *, long, int); >int fsetpos(FILE *, const fpos_t *); >long ftell(FILE *); >size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); >int getc(FILE *); >int getchar(void); >char *gets(char *); >void perror(const char *); >int printf(const char * __restrict, ...); >int putc(int, FILE *); >int putchar(int); >int puts(const char *); >int remove(const char *); >int rename(const char *, const char *); >void rewind(FILE *); >int scanf(const char * __restrict, ...); >void setbuf(FILE * __restrict, char * __restrict); >int setvbuf(FILE * __restrict, char * __restrict, int, size_t); >int sprintf(char * __restrict, const char * __restrict, ...); >int sscanf(const char * __restrict, const char * __restrict, ...); >FILE *tmpfile(void); >char *tmpnam(char *); >int ungetc(int, FILE *); >int vfprintf(FILE * __restrict, const char * __restrict, > __va_list); >int vprintf(const char * __restrict, __va_list); >int vsprintf(char * __restrict, const char * __restrict, > __va_list); > >#if __ISO_C_VISIBLE >= 1999 >int snprintf(char * __restrict, size_t, const char * __restrict, > ...) __printflike(3, 4); >int vfscanf(FILE * __restrict, const char * __restrict, __va_list) > __scanflike(2, 0); >int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); >int vsnprintf(char * __restrict, size_t, const char * __restrict, > __va_list) __printflike(3, 0); >int vsscanf(const char * __restrict, const char * __restrict, __va_list) > __scanflike(2, 0); >#endif ># 297 "/usr/src/lib/libc/../../include/stdio.h" > >/* > * Functions defined in all versions of POSIX 1003.1. > */ >#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) >#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ >#endif ># 304 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */ > >char *ctermid(char *); >FILE *fdopen(int, const char *); >int fileno(FILE *); >#endif /* __POSIX_VISIBLE */ ># 312 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >= 199209 >int pclose(FILE *); >FILE *popen(const char *, const char *); >#endif ># 317 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >= 199506 >int ftrylockfile(FILE *); >void flockfile(FILE *); >void funlockfile(FILE *); > >/* > * These are normally used through macros as defined below, but POSIX > * requires functions as well. > */ >int getc_unlocked(FILE *); >int getchar_unlocked(void); >int putc_unlocked(int, FILE *); >int putchar_unlocked(int); >#endif ># 332 "/usr/src/lib/libc/../../include/stdio.h" >#if __BSD_VISIBLE >void clearerr_unlocked(FILE *); >int feof_unlocked(FILE *); >int ferror_unlocked(FILE *); >int fileno_unlocked(FILE *); >#endif ># 338 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >= 200112 >int fseeko(FILE *, __off_t, int); >__off_t ftello(FILE *); >#endif ># 343 "/usr/src/lib/libc/../../include/stdio.h" > >#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 >int getw(FILE *); >int putw(int, FILE *); >#endif /* BSD or X/Open before issue 6 */ ># 348 "/usr/src/lib/libc/../../include/stdio.h" > >#if __XSI_VISIBLE >char *tempnam(const char *, const char *); >#endif ># 352 "/usr/src/lib/libc/../../include/stdio.h" > >#if __POSIX_VISIBLE >= 200809 >FILE *fmemopen(void * __restrict, size_t, const char * __restrict); >ssize_t getdelim(char ** __restrict, size_t * __restrict, int, > FILE * __restrict); >FILE *open_memstream(char **, size_t *); >int renameat(int, const char *, int, const char *); >int vdprintf(int, const char * __restrict, __va_list); >/* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ >ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); >int dprintf(int, const char * __restrict, ...); >#endif /* __POSIX_VISIBLE >= 200809 */ ># 364 "/usr/src/lib/libc/../../include/stdio.h" > >/* > * Routines that are purely local. > */ >#if __BSD_VISIBLE >int asprintf(char **, const char *, ...) __printflike(2, 3); >char *ctermid_r(char *); >void fcloseall(void); >int fdclose(FILE *, int *); >char *fgetln(FILE *, size_t *); >const char *fmtcheck(const char *, const char *) __format_arg(2); >int fpurge(FILE *); >void setbuffer(FILE *, char *, int); >int setlinebuf(FILE *); >int vasprintf(char **, const char *, __va_list) > __printflike(2, 0); > >/* > * The system error table contains messages for the first sys_nerr > * positive errno values. Use strerror() or strerror_r() from <string.h> > * instead. > */ >extern const int sys_nerr; >extern const char * const sys_errlist[]; > >/* > * Stdio function-access interface. > */ >FILE *funopen(const void *, > int (*)(void *, char *, int), > int (*)(void *, const char *, int), > fpos_t (*)(void *, fpos_t, int), > int (*)(void *)); >#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) >#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) > >typedef __ssize_t cookie_read_function_t(void *, char *, size_t); >typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); >typedef int cookie_seek_function_t(void *, off64_t *, int); >typedef int cookie_close_function_t(void *); >typedef struct { > cookie_read_function_t *read; > cookie_write_function_t *write; > cookie_seek_function_t *seek; > cookie_close_function_t *close; >} cookie_io_functions_t; >FILE *fopencookie(void *, const char *, cookie_io_functions_t); > >/* > * Portability hacks. See <sys/types.h>. > */ >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, __off_t); >#endif ># 419 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >__off_t lseek(int, __off_t, int); >#endif ># 423 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void *mmap(void *, size_t, int, int, int, __off_t); >#endif ># 427 "/usr/src/lib/libc/../../include/stdio.h" >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, __off_t); >#endif ># 431 "/usr/src/lib/libc/../../include/stdio.h" >#endif /* __BSD_VISIBLE */ ># 432 "/usr/src/lib/libc/../../include/stdio.h" > >/* > * Functions internal to the implementation. > */ >int __srget(FILE *); >int __swbuf(int, FILE *); > >/* > * The __sfoo macros are here so that we can > * define function versions in the C library. > */ >#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) >#if defined(__GNUC__) && defined(__STDC__) >static __inline int __sputc(int _c, FILE *_p) { > if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) > return (*_p->_p++ = _c); > else > return (__swbuf(_c, _p)); >} >#else ># 452 "/usr/src/lib/libc/../../include/stdio.h" >/* > * This has been tuned to generate reasonable code on the vax using pcc. > */ >#define __sputc(c, p) \ > (--(p)->_w < 0 ? \ > (p)->_w >= (p)->_lbfsize ? \ > (*(p)->_p = (c)), *(p)->_p != '\n' ? \ > (int)*(p)->_p++ : \ > __swbuf('\n', p) : \ > __swbuf((int)(c), p) : \ > (*(p)->_p = (c), (int)*(p)->_p++)) >#endif ># 464 "/usr/src/lib/libc/../../include/stdio.h" > >extern int __isthreaded; > >#ifndef __cplusplus > >#define __sfeof(p) (((p)->_flags & __SEOF) != 0) >#define __sferror(p) (((p)->_flags & __SERR) != 0) >#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) >#define __sfileno(p) ((p)->_file) > > >#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p)) >#define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p)) >#define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p)) > >#if __POSIX_VISIBLE >#define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p)) >#endif ># 482 "/usr/src/lib/libc/../../include/stdio.h" > >#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp)) >#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp)) > >#define getchar() getc(stdin) >#define putchar(x) putc(x, stdout) > >#if __BSD_VISIBLE >/* > * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 > * B.8.2.7 for the rationale behind the *_unlocked() macros. > */ >#define feof_unlocked(p) __sfeof(p) >#define ferror_unlocked(p) __sferror(p) >#define clearerr_unlocked(p) __sclearerr(p) >#define fileno_unlocked(p) __sfileno(p) >#endif ># 499 "/usr/src/lib/libc/../../include/stdio.h" >#if __POSIX_VISIBLE >= 199506 >#define getc_unlocked(fp) __sgetc(fp) >#define putc_unlocked(x, fp) __sputc(x, fp) > >#define getchar_unlocked() getc_unlocked(stdin) >#define putchar_unlocked(x) putc_unlocked(x, stdout) >#endif ># 506 "/usr/src/lib/libc/../../include/stdio.h" >#endif /* __cplusplus */ ># 507 "/usr/src/lib/libc/../../include/stdio.h" > >__END_DECLS >#endif /* !_STDIO_H_ */ ># 510 "/usr/src/lib/libc/../../include/stdio.h" ># 61 "/usr/src/lib/libc/../../include/resolv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <arpa/nameser.h> >#endif /* expanded by -frewrite-includes */ ># 61 "/usr/src/lib/libc/../../include/resolv.h" ># 62 "/usr/src/lib/libc/../../include/resolv.h" > >/*% > * Revision information. This is the release date in YYYYMMDD format. > * It can change every day so the right thing to do with it is use it > * in preprocessor commands such as "#if (__RES > 19931104)". Do not > * compare for equality; rather, use it to determine whether your resolver > * is new enough to contain a certain feature. > */ > >#define __RES 20090302 > >/*% > * This used to be defined in res_query.c, now it's in herror.c. > * [XXX no it's not. It's in irs/irs_data.c] > * It was > * never extern'd by any *.h file before it was placed here. For thread > * aware programs, the last h_errno value set is stored in res->h_errno. > * > * XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO > * (and __h_errno_set) to the public via <resolv.h>. > * XXX: __h_errno_set is really part of IRS, not part of the resolver. > * If somebody wants to build and use a resolver that doesn't use IRS, > * what do they do? Perhaps something like > * #ifdef WANT_IRS > * # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x) > * #else > * # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x)) > * #endif > */ > >#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x) >struct __res_state; /*%< forward */ >__BEGIN_DECLS >void __h_errno_set(struct __res_state *, int); >__END_DECLS > >/*% > * Resolver configuration file. > * Normally not present, but may contain the address of the > * initial name server(s) to query and the domain search list. > */ > >#ifndef _PATH_RESCONF >#define _PATH_RESCONF "/etc/resolv.conf" >#endif ># 107 "/usr/src/lib/libc/../../include/resolv.h" > >typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } > res_sendhookact; > >typedef res_sendhookact (*res_send_qhook)(struct sockaddr * const *, > const u_char **, int *, > u_char *, int, int *); > >typedef res_sendhookact (*res_send_rhook)(const struct sockaddr *, > const u_char *, int, u_char *, > int, int *); > >struct res_sym { > int number; /*%< Identifying number, like T_MX */ > const char * name; /*%< Its symbolic name, like "MX" */ > const char * humanname; /*%< Its fun name, like "mail exchanger" */ >}; > >/*% > * Global defines and variables for resolver stub. > */ >#define MAXNS 3 /*%< max # name servers we'll track */ >#define MAXDFLSRCH 3 /*%< # default domain levels to try */ >#define MAXDNSRCH 6 /*%< max # domains in search path */ >#define LOCALDOMAINPARTS 2 /*%< min levels in name that is "local" */ >#define RES_TIMEOUT 5 /*%< min. seconds between retries */ >#define MAXRESOLVSORT 10 /*%< number of net to sort on */ >#define RES_MAXNDOTS 15 /*%< should reflect bit field size */ >#define RES_MAXRETRANS 30 /*%< only for resolv.conf/RES_OPTIONS */ >#define RES_MAXRETRY 5 /*%< only for resolv.conf/RES_OPTIONS */ >#define RES_DFLRETRY 2 /*%< Default #/tries. */ >#define RES_MAXTIME 65535 /*%< Infinity, in milliseconds. */ >struct __res_state_ext; > >struct __res_state { > int retrans; /*%< retransmission time interval */ > int retry; /*%< number of times to retransmit */ > /* > * XXX: If `sun' is defined, `options' and `pfcode' are > * defined as u_int in original BIND9 distribution. However, > * it breaks binary backward compatibility against FreeBSD's > * resolver. So, we changed not to see `sun'. > */ >#if defined(sun) && 0 > u_int options; /*%< option flags - see below. */ >#else ># 153 "/usr/src/lib/libc/../../include/resolv.h" > u_long options; /*%< option flags - see below. */ >#endif ># 155 "/usr/src/lib/libc/../../include/resolv.h" > int nscount; /*%< number of name servers */ > struct sockaddr_in > nsaddr_list[MAXNS]; /*%< address of name server */ >#define nsaddr nsaddr_list[0] /*%< for backward compatibility */ > u_short id; /*%< current message id */ > char *dnsrch[MAXDNSRCH+1]; /*%< components of domain to search */ > char defdname[256]; /*%< default domain (deprecated) */ >#if defined(sun) && 0 > u_int pfcode; /*%< RES_PRF_ flags - see below. */ >#else ># 165 "/usr/src/lib/libc/../../include/resolv.h" > u_long pfcode; /*%< RES_PRF_ flags - see below. */ >#endif ># 167 "/usr/src/lib/libc/../../include/resolv.h" > unsigned ndots:4; /*%< threshold for initial abs. query */ > unsigned nsort:4; /*%< number of elements in sort_list[] */ > char unused[3]; > struct { > struct in_addr addr; > u_int32_t mask; > } sort_list[MAXRESOLVSORT]; > res_send_qhook qhook; /*%< query hook */ > res_send_rhook rhook; /*%< response hook */ > int res_h_errno; /*%< last one set for this context */ > int _vcsock; /*%< PRIVATE: for res_send VC i/o */ > u_int _flags; /*%< PRIVATE: see below */ > u_int _pad; /*%< make _u 64 bit aligned */ > union { > /* On an 32-bit arch this means 512b total. */ > char pad[72 - 4*sizeof (int) - 3*sizeof (void *)]; > struct { > u_int16_t nscount; > u_int16_t nstimes[MAXNS]; /*%< ms. */ > int nssocks[MAXNS]; > struct __res_state_ext *ext; /*%< extension for IPv6 */ > } _ext; > } _u; > u_char *_rnd; /*%< PRIVATE: random state */ >}; > >typedef struct __res_state *res_state; > >union res_sockaddr_union { > struct sockaddr_in sin; >#ifdef IN6ADDR_ANY_INIT > struct sockaddr_in6 sin6; >#endif ># 200 "/usr/src/lib/libc/../../include/resolv.h" >#ifdef ISC_ALIGN64 > int64_t __align64; /*%< 64bit alignment */ >#else ># 203 "/usr/src/lib/libc/../../include/resolv.h" > int32_t __align32; /*%< 32bit alignment */ >#endif ># 205 "/usr/src/lib/libc/../../include/resolv.h" > char __space[128]; /*%< max size */ >}; > >/*% > * Resolver flags (used to be discrete per-module statics ints). > */ >#define RES_F_VC 0x00000001 /*%< socket is TCP */ >#define RES_F_CONN 0x00000002 /*%< socket is connected */ >#define RES_F_EDNS0ERR 0x00000004 /*%< EDNS0 caused errors */ >#define RES_F__UNUSED 0x00000008 /*%< (unused) */ >#define RES_F_LASTMASK 0x000000F0 /*%< ordinal server of last res_nsend */ >#define RES_F_LASTSHIFT 4 /*%< bit position of LASTMASK "flag" */ >#define RES_GETLAST(res) (((res)._flags & RES_F_LASTMASK) >> RES_F_LASTSHIFT) > >/* res_findzonecut2() options */ >#define RES_EXHAUSTIVE 0x00000001 /*%< always do all queries */ >#define RES_IPV4ONLY 0x00000002 /*%< IPv4 only */ >#define RES_IPV6ONLY 0x00000004 /*%< IPv6 only */ > >/*% > * Resolver options (keep these in synch with res_debug.c, please) > */ >#define RES_INIT 0x00000001 /*%< address initialized */ >#define RES_DEBUG 0x00000002 /*%< print debug messages */ >#define RES_AAONLY 0x00000004 /*%< authoritative answers only (!IMPL)*/ >#define RES_USEVC 0x00000008 /*%< use virtual circuit */ >#define RES_PRIMARY 0x00000010 /*%< query primary server only (!IMPL) */ >#define RES_IGNTC 0x00000020 /*%< ignore truncation errors */ >#define RES_RECURSE 0x00000040 /*%< recursion desired */ >#define RES_DEFNAMES 0x00000080 /*%< use default domain name */ >#define RES_STAYOPEN 0x00000100 /*%< Keep TCP socket open */ >#define RES_DNSRCH 0x00000200 /*%< search up local domain tree */ >#define RES_INSECURE1 0x00000400 /*%< type 1 security disabled */ >#define RES_INSECURE2 0x00000800 /*%< type 2 security disabled */ >#define RES_NOALIASES 0x00001000 /*%< shuts off HOSTALIASES feature */ >#define RES_USE_INET6 0x00002000 /*%< use/map IPv6 in gethostbyname() */ >#define RES_ROTATE 0x00004000 /*%< rotate ns list after each query */ >#define RES_NOCHECKNAME 0x00008000 /*%< do not check names for sanity. */ >#define RES_KEEPTSIG 0x00010000 /*%< do not strip TSIG records */ >#define RES_BLAST 0x00020000 /*%< blast all recursive servers */ >#define RES_NSID 0x00040000 /*%< request name server ID */ >#define RES_NOTLDQUERY 0x00100000 /*%< don't unqualified name as a tld */ >#define RES_USE_DNSSEC 0x00200000 /*%< use DNSSEC using OK bit in OPT */ >/* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */ >/* KAME extensions: use higher bit to avoid conflict with ISC use */ >#define RES_USE_DNAME 0x10000000 /*%< use DNAME */ >#define RES_USE_EDNS0 0x40000000 /*%< use EDNS0 if configured */ >#define RES_NO_NIBBLE2 0x80000000 /*%< disable alternate nibble lookup */ > >#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | \ > RES_DNSRCH | RES_NO_NIBBLE2) > >/*% > * Resolver "pfcode" values. Used by dig. > */ >#define RES_PRF_STATS 0x00000001 >#define RES_PRF_UPDATE 0x00000002 >#define RES_PRF_CLASS 0x00000004 >#define RES_PRF_CMD 0x00000008 >#define RES_PRF_QUES 0x00000010 >#define RES_PRF_ANS 0x00000020 >#define RES_PRF_AUTH 0x00000040 >#define RES_PRF_ADD 0x00000080 >#define RES_PRF_HEAD1 0x00000100 >#define RES_PRF_HEAD2 0x00000200 >#define RES_PRF_TTLID 0x00000400 >#define RES_PRF_HEADX 0x00000800 >#define RES_PRF_QUERY 0x00001000 >#define RES_PRF_REPLY 0x00002000 >#define RES_PRF_INIT 0x00004000 >#define RES_PRF_TRUNC 0x00008000 >/* 0x00010000 */ > >/* Things involving an internal (static) resolver context. */ >__BEGIN_DECLS >extern struct __res_state *__res_state(void); >__END_DECLS >#define _res (*__res_state()) > >#ifndef __BIND_NOSTATIC >#define fp_nquery __fp_nquery >#define fp_query __fp_query >#define hostalias __hostalias >#define p_query __p_query >#define res_close __res_close >#define res_init __res_init >#define res_isourserver __res_isourserver >#define res_mkquery __res_mkquery >#define res_opt __res_opt >#define res_query __res_query >#define res_querydomain __res_querydomain >#define res_search __res_search >#define res_send __res_send >#define res_sendsigned __res_sendsigned > >__BEGIN_DECLS >void fp_nquery(const u_char *, int, FILE *); >void fp_query(const u_char *, FILE *); >const char * hostalias(const char *); >void p_query(const u_char *); >void res_close(void); >int res_init(void); >int res_isourserver(const struct sockaddr_in *); >int res_mkquery(int, const char *, int, int, const u_char *, > int, const u_char *, u_char *, int); >int res_opt(int, u_char *, int, int); >int res_query(const char *, int, int, u_char *, int); >int res_querydomain(const char *, const char *, int, int, > u_char *, int); >int res_search(const char *, int, int, u_char *, int); >int res_send(const u_char *, int, u_char *, int); >int res_sendsigned(const u_char *, int, ns_tsig_key *, > u_char *, int); >__END_DECLS >#endif ># 320 "/usr/src/lib/libc/../../include/resolv.h" > >#if !defined(SHARED_LIBBIND) || defined(LIB) >/* > * If libbind is a shared object (well, DLL anyway) > * these externs break the linker when resolv.h is > * included by a lib client (like named) > * Make them go away if a client is including this > * > */ >extern const struct res_sym __p_key_syms[]; >extern const struct res_sym __p_cert_syms[]; >extern const struct res_sym __p_class_syms[]; >extern const struct res_sym __p_type_syms[]; >extern const struct res_sym __p_rcode_syms[]; >#endif /* SHARED_LIBBIND */ ># 335 "/usr/src/lib/libc/../../include/resolv.h" > >#define b64_ntop __b64_ntop >#define b64_pton __b64_pton >#define dn_comp __dn_comp >#define dn_count_labels __dn_count_labels >#define dn_expand __dn_expand >#define dn_skipname __dn_skipname >#define fp_resstat __fp_resstat >#define loc_aton __loc_aton >#define loc_ntoa __loc_ntoa >#define p_cdname __p_cdname >#define p_cdnname __p_cdnname >#define p_class __p_class >#define p_fqname __p_fqname >#define p_fqnname __p_fqnname >#define p_option __p_option >#define p_secstodate __p_secstodate >#define p_section __p_section >#define p_time __p_time >#define p_type __p_type >#define p_rcode __p_rcode >#define p_sockun __p_sockun >#define putlong __putlong >#define putshort __putshort >#define res_dnok __res_dnok >#if 0 >#define res_findzonecut __res_findzonecut >#endif ># 363 "/usr/src/lib/libc/../../include/resolv.h" >#define res_findzonecut2 __res_findzonecut2 >#define res_hnok __res_hnok >#define res_hostalias __res_hostalias >#define res_mailok __res_mailok >#define res_nameinquery __res_nameinquery >#define res_nclose __res_nclose >#define res_ninit __res_ninit >#define res_nmkquery __res_nmkquery >#define res_pquery __res_pquery >#define res_nquery __res_nquery >#define res_nquerydomain __res_nquerydomain >#define res_nsearch __res_nsearch >#define res_nsend __res_nsend >#if 0 >#define res_nsendsigned __res_nsendsigned >#endif ># 379 "/usr/src/lib/libc/../../include/resolv.h" >#define res_nisourserver __res_nisourserver >#define res_ownok __res_ownok >#define res_queriesmatch __res_queriesmatch >#define res_rndinit __res_rndinit >#define res_randomid __res_randomid >#define res_nrandomid __res_nrandomid >#define sym_ntop __sym_ntop >#define sym_ntos __sym_ntos >#define sym_ston __sym_ston >#define res_nopt __res_nopt >#define res_nopt_rdata __res_nopt_rdata >#define res_ndestroy __res_ndestroy >#define res_nametoclass __res_nametoclass >#define res_nametotype __res_nametotype >#define res_setservers __res_setservers >#define res_getservers __res_getservers >#if 0 >#define res_buildprotolist __res_buildprotolist >#define res_destroyprotolist __res_destroyprotolist >#define res_destroyservicelist __res_destroyservicelist >#define res_get_nibblesuffix __res_get_nibblesuffix >#define res_get_nibblesuffix2 __res_get_nibblesuffix2 >#endif ># 402 "/usr/src/lib/libc/../../include/resolv.h" >#define res_ourserver_p __res_ourserver_p >#if 0 >#define res_protocolname __res_protocolname >#define res_protocolnumber __res_protocolnumber >#endif ># 407 "/usr/src/lib/libc/../../include/resolv.h" >#define res_send_setqhook __res_send_setqhook >#define res_send_setrhook __res_send_setrhook >#if 0 >#define res_servicename __res_servicename >#define res_servicenumber __res_servicenumber >#endif ># 413 "/usr/src/lib/libc/../../include/resolv.h" >__BEGIN_DECLS >int res_hnok(const char *); >int res_ownok(const char *); >int res_mailok(const char *); >int res_dnok(const char *); >int sym_ston(const struct res_sym *, const char *, int *); >const char * sym_ntos(const struct res_sym *, int, int *); >const char * sym_ntop(const struct res_sym *, int, int *); >int b64_ntop(u_char const *, size_t, char *, size_t); >int b64_pton(char const *, u_char *, size_t); >int loc_aton(const char *, u_char *); >const char * loc_ntoa(const u_char *, char *); >int dn_skipname(const u_char *, const u_char *); >void putlong(u_int32_t, u_char *); >void putshort(u_int16_t, u_char *); >#ifndef __ultrix__ >u_int16_t _getshort(const u_char *); >u_int32_t _getlong(const u_char *); >#endif ># 432 "/usr/src/lib/libc/../../include/resolv.h" >const char * p_class(int); >const char * p_time(u_int32_t); >const char * p_type(int); >const char * p_rcode(int); >const char * p_sockun(union res_sockaddr_union, char *, size_t); >const u_char * p_cdnname(const u_char *, const u_char *, int, FILE *); >const u_char * p_cdname(const u_char *, const u_char *, FILE *); >const u_char * p_fqnname(const u_char *, const u_char *, int, char *, int); >const u_char * p_fqname(const u_char *, const u_char *, FILE *); >const char * p_option(u_long); >char * p_secstodate(u_long); >int dn_count_labels(const char *); >int dn_comp(const char *, u_char *, int, u_char **, u_char **); >int dn_expand(const u_char *, const u_char *, const u_char *, > char *, int); >void res_rndinit(res_state); >u_int res_randomid(void); >u_int res_nrandomid(res_state); >int res_nameinquery(const char *, int, int, const u_char *, > const u_char *); >int res_queriesmatch(const u_char *, const u_char *, > const u_char *, const u_char *); >const char * p_section(int, int); >/* Things involving a resolver context. */ >int res_ninit(res_state); >int res_nisourserver(const res_state, const struct sockaddr_in *); >void fp_resstat(const res_state, FILE *); >void res_pquery(const res_state, const u_char *, int, FILE *); >const char * res_hostalias(const res_state, const char *, char *, size_t); >int res_nquery(res_state, const char *, int, int, u_char *, int); >int res_nsearch(res_state, const char *, int, int, u_char *, int); >int res_nquerydomain(res_state, const char *, const char *, > int, int, u_char *, int); >int res_nmkquery(res_state, int, const char *, int, int, > const u_char *, int, const u_char *, > u_char *, int); >int res_nsend(res_state, const u_char *, int, u_char *, int); >#if 0 >int res_nsendsigned(res_state, const u_char *, int, > ns_tsig_key *, u_char *, int); >int res_findzonecut(res_state, const char *, ns_class, int, > char *, size_t, struct in_addr *, int); >#endif ># 475 "/usr/src/lib/libc/../../include/resolv.h" >int res_findzonecut2(res_state, const char *, ns_class, int, > char *, size_t, > union res_sockaddr_union *, int); >void res_nclose(res_state); >int res_nopt(res_state, int, u_char *, int, int); >int res_nopt_rdata(res_state, int, u_char *, int, u_char *, > u_short, u_short, u_char *); >void res_send_setqhook(res_send_qhook); >void res_send_setrhook(res_send_rhook); >int __res_vinit(res_state, int); >#if 0 >void res_destroyservicelist(void); >const char * res_servicename(u_int16_t, const char *); >const char * res_protocolname(int); >void res_destroyprotolist(void); >void res_buildprotolist(void); >const char * res_get_nibblesuffix(res_state); >const char * res_get_nibblesuffix2(res_state); >#endif ># 494 "/usr/src/lib/libc/../../include/resolv.h" >void res_ndestroy(res_state); >u_int16_t res_nametoclass(const char *, int *); >u_int16_t res_nametotype(const char *, int *); >void res_setservers(res_state, const union res_sockaddr_union *, > int); >int res_getservers(res_state, union res_sockaddr_union *, int); >__END_DECLS > >#endif /* !_RESOLV_H_ */ ># 503 "/usr/src/lib/libc/../../include/resolv.h" >/*! \file */ ># 33 "/usr/src/lib/libc/nameser/ns_name.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <string.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/../../include/string.h" 1 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)string.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: head/include/string.h 265878 2014-05-11 13:48:21Z jilles $ > */ > >#ifndef _STRING_H_ >#define _STRING_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/src/lib/libc/../../include/string.h" ># 37 "/usr/src/lib/libc/../../include/string.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/src/lib/libc/../../include/string.h" ># 38 "/usr/src/lib/libc/../../include/string.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/src/lib/libc/../../include/string.h" ># 39 "/usr/src/lib/libc/../../include/string.h" > >/* > * Prototype functions which were historically defined in <string.h>, but > * are required by POSIX to be prototyped in <strings.h>. > */ >#if __BSD_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <strings.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/src/lib/libc/../../include/string.h" ># 1 "/usr/src/lib/libc/../../include/strings.h" 1 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/strings.h 272673 2014-10-07 04:54:11Z delphij $ > */ > >#ifndef _STRINGS_H_ >#define _STRINGS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/src/lib/libc/../../include/strings.h" ># 33 "/usr/src/lib/libc/../../include/strings.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/src/lib/libc/../../include/strings.h" ># 34 "/usr/src/lib/libc/../../include/strings.h" > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 39 "/usr/src/lib/libc/../../include/strings.h" > >__BEGIN_DECLS >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ >void bcopy(const void *, void *, size_t); /* LEGACY */ >void bzero(void *, size_t); /* LEGACY */ >#endif ># 46 "/usr/src/lib/libc/../../include/strings.h" >#if __BSD_VISIBLE >void explicit_bzero(void *, size_t); >#endif ># 49 "/usr/src/lib/libc/../../include/strings.h" >#if __XSI_VISIBLE >int ffs(int) __pure2; >#endif ># 52 "/usr/src/lib/libc/../../include/strings.h" >#if __BSD_VISIBLE >int ffsl(long) __pure2; >int ffsll(long long) __pure2; >int fls(int) __pure2; >int flsl(long) __pure2; >int flsll(long long) __pure2; >#endif ># 59 "/usr/src/lib/libc/../../include/strings.h" >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >char *index(const char *, int) __pure; /* LEGACY */ >char *rindex(const char *, int) __pure; /* LEGACY */ >#endif ># 63 "/usr/src/lib/libc/../../include/strings.h" >int strcasecmp(const char *, const char *) __pure; >int strncasecmp(const char *, const char *, size_t) __pure; > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_strings.h> >#endif /* expanded by -frewrite-includes */ ># 67 "/usr/src/lib/libc/../../include/strings.h" ># 1 "/usr/src/lib/libc/../../include/xlocale/_strings.h" 1 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/xlocale/_strings.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/src/lib/libc/../../include/xlocale/_strings.h" > >/* > * This file is included from both strings.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRINGS1_H >#define _XLOCALE_STRINGS1_H > >/* > * POSIX2008 functions > */ >int strcasecmp_l(const char *, const char *, locale_t); >int strncasecmp_l(const char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRINGS1_H */ ># 49 "/usr/src/lib/libc/../../include/xlocale/_strings.h" ># 68 "/usr/src/lib/libc/../../include/strings.h" 2 >#endif ># 69 "/usr/src/lib/libc/../../include/strings.h" >__END_DECLS > >#endif /* _STRINGS_H_ */ ># 72 "/usr/src/lib/libc/../../include/strings.h" ># 46 "/usr/src/lib/libc/../../include/string.h" 2 >#endif ># 47 "/usr/src/lib/libc/../../include/string.h" > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 52 "/usr/src/lib/libc/../../include/string.h" > >__BEGIN_DECLS >#if __XSI_VISIBLE >= 600 >void *memccpy(void * __restrict, const void * __restrict, int, size_t); >#endif ># 57 "/usr/src/lib/libc/../../include/string.h" >void *memchr(const void *, int, size_t) __pure; >#if __BSD_VISIBLE >void *memrchr(const void *, int, size_t) __pure; >#endif ># 61 "/usr/src/lib/libc/../../include/string.h" >int memcmp(const void *, const void *, size_t) __pure; >void *memcpy(void * __restrict, const void * __restrict, size_t); >#if __BSD_VISIBLE >void *memmem(const void *, size_t, const void *, size_t) __pure; >#endif ># 66 "/usr/src/lib/libc/../../include/string.h" >void *memmove(void *, const void *, size_t); >void *memset(void *, int, size_t); >#if __POSIX_VISIBLE >= 200809 >char *stpcpy(char * __restrict, const char * __restrict); >char *stpncpy(char * __restrict, const char * __restrict, size_t); >#endif ># 72 "/usr/src/lib/libc/../../include/string.h" >#if __BSD_VISIBLE >char *strcasestr(const char *, const char *) __pure; >#endif ># 75 "/usr/src/lib/libc/../../include/string.h" >char *strcat(char * __restrict, const char * __restrict); >char *strchr(const char *, int) __pure; >#if __BSD_VISIBLE >char *strchrnul(const char*, int) __pure; >#endif ># 80 "/usr/src/lib/libc/../../include/string.h" >int strcmp(const char *, const char *) __pure; >int strcoll(const char *, const char *); >char *strcpy(char * __restrict, const char * __restrict); >size_t strcspn(const char *, const char *) __pure; >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >char *strdup(const char *) __malloc_like; >#endif ># 87 "/usr/src/lib/libc/../../include/string.h" >char *strerror(int); >#if __POSIX_VISIBLE >= 200112 >int strerror_r(int, char *, size_t); >#endif ># 91 "/usr/src/lib/libc/../../include/string.h" >#if __BSD_VISIBLE >size_t strlcat(char * __restrict, const char * __restrict, size_t); >size_t strlcpy(char * __restrict, const char * __restrict, size_t); >#endif ># 95 "/usr/src/lib/libc/../../include/string.h" >size_t strlen(const char *) __pure; >#if __BSD_VISIBLE >void strmode(int, char *); >#endif ># 99 "/usr/src/lib/libc/../../include/string.h" >char *strncat(char * __restrict, const char * __restrict, size_t); >int strncmp(const char *, const char *, size_t) __pure; >char *strncpy(char * __restrict, const char * __restrict, size_t); >#if __POSIX_VISIBLE >= 200809 >char *strndup(const char *, size_t) __malloc_like; >size_t strnlen(const char *, size_t) __pure; >#endif ># 106 "/usr/src/lib/libc/../../include/string.h" >#if __BSD_VISIBLE >char *strnstr(const char *, const char *, size_t) __pure; >#endif ># 109 "/usr/src/lib/libc/../../include/string.h" >char *strpbrk(const char *, const char *) __pure; >char *strrchr(const char *, int) __pure; >#if __BSD_VISIBLE >char *strsep(char **, const char *); >#endif ># 114 "/usr/src/lib/libc/../../include/string.h" >#if __POSIX_VISIBLE >= 200809 >char *strsignal(int); >#endif ># 117 "/usr/src/lib/libc/../../include/string.h" >size_t strspn(const char *, const char *) __pure; >char *strstr(const char *, const char *) __pure; >char *strtok(char * __restrict, const char * __restrict); >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 >char *strtok_r(char *, const char *, char **); >#endif ># 123 "/usr/src/lib/libc/../../include/string.h" >size_t strxfrm(char * __restrict, const char * __restrict, size_t); >#if __BSD_VISIBLE > >#ifndef _SWAB_DECLARED >#define _SWAB_DECLARED > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif /* _SIZE_T_DECLARED */ ># 133 "/usr/src/lib/libc/../../include/string.h" > >void swab(const void * __restrict, void * __restrict, ssize_t); >#endif /* _SWAB_DECLARED */ ># 136 "/usr/src/lib/libc/../../include/string.h" > >#endif /* __BSD_VISIBLE */ ># 138 "/usr/src/lib/libc/../../include/string.h" > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_string.h> >#endif /* expanded by -frewrite-includes */ ># 140 "/usr/src/lib/libc/../../include/string.h" ># 1 "/usr/src/lib/libc/../../include/xlocale/_string.h" 1 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/xlocale/_string.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/src/lib/libc/../../include/xlocale/_string.h" > >/* > * This file is included from both string.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRING1_H >#define _XLOCALE_STRING1_H > >/* > * POSIX2008 functions > */ >int strcoll_l(const char *, const char *, locale_t); >size_t strxfrm_l(char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRING1_H */ ># 49 "/usr/src/lib/libc/../../include/xlocale/_string.h" > >/* > * xlocale extensions > */ >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_STRING2_H >#define _XLOCALE_STRING2_H >char *strcasestr_l(const char *, const char *, locale_t); > >#endif /* _XLOCALE_STRING2_H */ ># 59 "/usr/src/lib/libc/../../include/xlocale/_string.h" >#endif /* _XLOCALE_H_ */ ># 60 "/usr/src/lib/libc/../../include/xlocale/_string.h" ># 141 "/usr/src/lib/libc/../../include/string.h" 2 >#endif ># 142 "/usr/src/lib/libc/../../include/string.h" >__END_DECLS > >#endif /* _STRING_H_ */ ># 145 "/usr/src/lib/libc/../../include/string.h" ># 34 "/usr/src/lib/libc/nameser/ns_name.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <ctype.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/../../include/ctype.h" 1 >/* > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * This code is derived from software contributed to Berkeley by > * Paul Borman at Krystal Technologies. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)ctype.h 8.4 (Berkeley) 1/21/94 > * $FreeBSD: head/include/ctype.h 290494 2015-11-07 12:43:35Z bapt $ > */ > >#ifndef _CTYPE_H_ >#define _CTYPE_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/src/lib/libc/../../include/ctype.h" ># 45 "/usr/src/lib/libc/../../include/ctype.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/src/lib/libc/../../include/ctype.h" ># 46 "/usr/src/lib/libc/../../include/ctype.h" >#if 0 /* expanded by -frewrite-includes */ >#include <_ctype.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/src/lib/libc/../../include/ctype.h" ># 1 "/usr/src/lib/libc/../../include/_ctype.h" 1 >/* > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * This code is derived from software contributed to Berkeley by > * Paul Borman at Krystal Technologies. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * From @(#)ctype.h 8.4 (Berkeley) 1/21/94 > * From FreeBSD: src/include/ctype.h,v 1.27 2004/06/23 07:11:39 tjr Exp > * $FreeBSD: head/include/_ctype.h 290494 2015-11-07 12:43:35Z bapt $ > */ > >#ifndef __CTYPE_H_ >#define __CTYPE_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/src/lib/libc/../../include/_ctype.h" ># 46 "/usr/src/lib/libc/../../include/_ctype.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/src/lib/libc/../../include/_ctype.h" ># 47 "/usr/src/lib/libc/../../include/_ctype.h" > >#define _CTYPE_A 0x00000100L /* Alpha */ >#define _CTYPE_C 0x00000200L /* Control */ >#define _CTYPE_D 0x00000400L /* Digit */ >#define _CTYPE_G 0x00000800L /* Graph */ >#define _CTYPE_L 0x00001000L /* Lower */ >#define _CTYPE_P 0x00002000L /* Punct */ >#define _CTYPE_S 0x00004000L /* Space */ >#define _CTYPE_U 0x00008000L /* Upper */ >#define _CTYPE_X 0x00010000L /* X digit */ >#define _CTYPE_B 0x00020000L /* Blank */ >#define _CTYPE_R 0x00040000L /* Print */ >#define _CTYPE_I 0x00080000L /* Ideogram */ >#define _CTYPE_T 0x00100000L /* Special */ >#define _CTYPE_Q 0x00200000L /* Phonogram */ >#define _CTYPE_N 0x00400000L /* Number (superset of digit) */ >#define _CTYPE_SW0 0x20000000L /* 0 width character */ >#define _CTYPE_SW1 0x40000000L /* 1 width character */ >#define _CTYPE_SW2 0x80000000L /* 2 width character */ >#define _CTYPE_SW3 0xc0000000L /* 3 width character */ >#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ >#define _CTYPE_SWS 30 /* Bits to shift to get width */ > >/* See comments in <sys/_types.h> about __ct_rune_t. */ >__BEGIN_DECLS >unsigned long ___runetype(__ct_rune_t) __pure; >__ct_rune_t ___tolower(__ct_rune_t) __pure; >__ct_rune_t ___toupper(__ct_rune_t) __pure; >__END_DECLS > >/* > * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us > * to generate code for extern versions of all our inline functions. > */ >#ifdef _EXTERNALIZE_CTYPE_INLINES_ >#define _USE_CTYPE_INLINE_ >#define static >#define __inline >#endif ># 86 "/usr/src/lib/libc/../../include/_ctype.h" > >extern int __mb_sb_limit; > >/* > * Use inline functions if we are allowed to and the compiler supports them. > */ >#if !defined(_DONT_USE_CTYPE_INLINE_) && \ > (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) > >#if 0 /* expanded by -frewrite-includes */ >#include <runetype.h> >#endif /* expanded by -frewrite-includes */ ># 95 "/usr/src/lib/libc/../../include/_ctype.h" ># 1 "/usr/src/lib/libc/../../include/runetype.h" 1 >/*- > * Copyright (c) 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Paul Borman at Krystal Technologies. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)runetype.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: head/include/runetype.h 232620 2012-03-06 20:15:23Z dim $ > */ > >#ifndef _RUNETYPE_H_ >#define _RUNETYPE_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/src/lib/libc/../../include/runetype.h" ># 40 "/usr/src/lib/libc/../../include/runetype.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/src/lib/libc/../../include/runetype.h" ># 41 "/usr/src/lib/libc/../../include/runetype.h" > >#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ >#define _CRMASK (~(_CACHED_RUNES - 1)) > >/* > * The lower 8 bits of runetype[] contain the digit value of the rune. > */ >typedef struct { > __rune_t __min; /* First rune of the range */ > __rune_t __max; /* Last rune (inclusive) of the range */ > __rune_t __map; /* What first maps to in maps */ > unsigned long *__types; /* Array of types in range */ >} _RuneEntry; > >typedef struct { > int __nranges; /* Number of ranges stored */ > _RuneEntry *__ranges; /* Pointer to the ranges */ >} _RuneRange; > >typedef struct { > char __magic[8]; /* Magic saying what version we are */ > char __encoding[32]; /* ASCII name of this encoding */ > > __rune_t (*__sgetrune)(const char *, __size_t, char const **); > int (*__sputrune)(__rune_t, char *, __size_t, char **); > __rune_t __invalid_rune; > > unsigned long __runetype[_CACHED_RUNES]; > __rune_t __maplower[_CACHED_RUNES]; > __rune_t __mapupper[_CACHED_RUNES]; > > /* > * The following are to deal with Runes larger than _CACHED_RUNES - 1. > * Their data is actually contiguous with this structure so as to make > * it easier to read/write from/to disk. > */ > _RuneRange __runetype_ext; > _RuneRange __maplower_ext; > _RuneRange __mapupper_ext; > > void *__variable; /* Data which depends on the encoding */ > int __variable_len; /* how long that data is */ >} _RuneLocale; > >#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ >__BEGIN_DECLS >extern const _RuneLocale _DefaultRuneLocale; >extern const _RuneLocale *_CurrentRuneLocale; >#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) >extern const _RuneLocale *__getCurrentRuneLocale(void); >#else ># 92 "/usr/src/lib/libc/../../include/runetype.h" >extern _Thread_local const _RuneLocale *_ThreadRuneLocale; >static __inline const _RuneLocale *__getCurrentRuneLocale(void) >{ > > if (_ThreadRuneLocale) > return _ThreadRuneLocale; > if (_CurrentRuneLocale) > return _CurrentRuneLocale; > return &_DefaultRuneLocale; >} >#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ ># 103 "/usr/src/lib/libc/../../include/runetype.h" >#define _CurrentRuneLocale (__getCurrentRuneLocale()) >__END_DECLS > >#endif /* !_RUNETYPE_H_ */ ># 107 "/usr/src/lib/libc/../../include/runetype.h" ># 96 "/usr/src/lib/libc/../../include/_ctype.h" 2 > >static __inline int >__maskrune(__ct_rune_t _c, unsigned long _f) >{ > return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) : > _CurrentRuneLocale->__runetype[_c]) & _f; >} > >static __inline int >__sbmaskrune(__ct_rune_t _c, unsigned long _f) >{ > return (_c < 0 || _c >= __mb_sb_limit) ? 0 : > _CurrentRuneLocale->__runetype[_c] & _f; >} > >static __inline int >__istype(__ct_rune_t _c, unsigned long _f) >{ > return (!!__maskrune(_c, _f)); >} > >static __inline int >__sbistype(__ct_rune_t _c, unsigned long _f) >{ > return (!!__sbmaskrune(_c, _f)); >} > >static __inline int >__isctype(__ct_rune_t _c, unsigned long _f) >{ > return (_c < 0 || _c >= 128) ? 0 : > !!(_DefaultRuneLocale.__runetype[_c] & _f); >} > >static __inline __ct_rune_t >__toupper(__ct_rune_t _c) >{ > return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : > _CurrentRuneLocale->__mapupper[_c]; >} > >static __inline __ct_rune_t >__sbtoupper(__ct_rune_t _c) >{ > return (_c < 0 || _c >= __mb_sb_limit) ? _c : > _CurrentRuneLocale->__mapupper[_c]; >} > >static __inline __ct_rune_t >__tolower(__ct_rune_t _c) >{ > return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : > _CurrentRuneLocale->__maplower[_c]; >} > >static __inline __ct_rune_t >__sbtolower(__ct_rune_t _c) >{ > return (_c < 0 || _c >= __mb_sb_limit) ? _c : > _CurrentRuneLocale->__maplower[_c]; >} > >static __inline int >__wcwidth(__ct_rune_t _c) >{ > unsigned int _x; > > if (_c == 0) > return (0); > _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); > if ((_x & _CTYPE_SWM) != 0) > return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); > return ((_x & _CTYPE_R) != 0 ? 1 : -1); >} > >#else /* not using inlines */ ># 172 "/usr/src/lib/libc/../../include/_ctype.h" > >__BEGIN_DECLS >int __maskrune(__ct_rune_t, unsigned long); >int __sbmaskrune(__ct_rune_t, unsigned long); >int __istype(__ct_rune_t, unsigned long); >int __sbistype(__ct_rune_t, unsigned long); >int __isctype(__ct_rune_t, unsigned long); >__ct_rune_t __toupper(__ct_rune_t); >__ct_rune_t __sbtoupper(__ct_rune_t); >__ct_rune_t __tolower(__ct_rune_t); >__ct_rune_t __sbtolower(__ct_rune_t); >int __wcwidth(__ct_rune_t); >__END_DECLS >#endif /* using inlines */ ># 186 "/usr/src/lib/libc/../../include/_ctype.h" > >#endif /* !__CTYPE_H_ */ ># 188 "/usr/src/lib/libc/../../include/_ctype.h" ># 47 "/usr/src/lib/libc/../../include/ctype.h" 2 > >__BEGIN_DECLS >int isalnum(int); >int isalpha(int); >int iscntrl(int); >int isdigit(int); >int isgraph(int); >int islower(int); >int isprint(int); >int ispunct(int); >int isspace(int); >int isupper(int); >int isxdigit(int); >int tolower(int); >int toupper(int); > >#if __XSI_VISIBLE >int isascii(int); >int toascii(int); >#endif ># 67 "/usr/src/lib/libc/../../include/ctype.h" > >#if __ISO_C_VISIBLE >= 1999 >int isblank(int); >#endif ># 71 "/usr/src/lib/libc/../../include/ctype.h" > >#if __BSD_VISIBLE >int digittoint(int); >int ishexnumber(int); >int isideogram(int); >int isnumber(int); >int isphonogram(int); >int isrune(int); >int isspecial(int); >#endif ># 81 "/usr/src/lib/libc/../../include/ctype.h" > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_ctype.h> >#endif /* expanded by -frewrite-includes */ ># 83 "/usr/src/lib/libc/../../include/ctype.h" ># 1 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" 1 >/*- > * Copyright (c) 2011 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by David Chisnall under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/include/xlocale/_ctype.h 290494 2015-11-07 12:43:35Z bapt $ > */ > > >#if (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ > (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) > >#ifdef _XLOCALE_WCTYPES >#define _XLOCALE_WCTYPE_H >#else ># 39 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >#define _XLOCALE_CTYPE_H >#endif ># 41 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 46 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" > >#ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED >#define _XLOCALE_RUN_FUNCTIONS_DEFINED 1 >unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure; >__ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure; >__ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure; >_RuneLocale *__runes_for_locale(locale_t, int*); >#endif ># 54 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" > >#ifndef _XLOCALE_INLINE >#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) >/* GNU89 inline has nonstandard semantics. */ >#define _XLOCALE_INLINE extern __inline >#else ># 60 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >/* Hack to work around people who define inline away */ >#ifdef inline >#define _XLOCALE_INLINE static __inline >#else ># 64 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >/* Define with C++ / C99 compatible semantics */ >#define _XLOCALE_INLINE inline >#endif ># 67 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >#endif ># 68 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >#endif /* _XLOCALE_INLINE */ ># 69 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" > >#ifdef _XLOCALE_WCTYPES >_XLOCALE_INLINE int >__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); >_XLOCALE_INLINE int >__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); > >_XLOCALE_INLINE int >__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > int __limit; > _RuneLocale *runes = __runes_for_locale(__loc, &__limit); > return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : > runes->__runetype[__c]) & __f; >} > >_XLOCALE_INLINE int >__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > return (!!__maskrune_l(__c, __f, __loc)); >} > >#define XLOCALE_ISCTYPE(fname, cat) \ > _XLOCALE_INLINE int isw##fname##_l(int, locale_t);\ > _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ > { return __istype_l(__c, cat, __l); } >#else ># 96 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >_XLOCALE_INLINE int >__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); >_XLOCALE_INLINE int >__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); > >_XLOCALE_INLINE int >__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > int __limit; > _RuneLocale *runes = __runes_for_locale(__loc, &__limit); > return (__c < 0 || __c >= __limit) ? 0 : > runes->__runetype[__c] & __f; >} > >_XLOCALE_INLINE int >__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > return (!!__sbmaskrune_l(__c, __f, __loc)); >} > >#define XLOCALE_ISCTYPE(__fname, __cat) \ > _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ > _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ > { return __sbistype_l(__c, __cat, __l); } >#endif ># 121 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" > >XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D|_CTYPE_N) >XLOCALE_ISCTYPE(alpha, _CTYPE_A) >XLOCALE_ISCTYPE(blank, _CTYPE_B) >XLOCALE_ISCTYPE(cntrl, _CTYPE_C) >XLOCALE_ISCTYPE(digit, _CTYPE_D) >XLOCALE_ISCTYPE(graph, _CTYPE_G) >XLOCALE_ISCTYPE(hexnumber, _CTYPE_X) >XLOCALE_ISCTYPE(ideogram, _CTYPE_I) >XLOCALE_ISCTYPE(lower, _CTYPE_L) >XLOCALE_ISCTYPE(number, _CTYPE_D|_CTYPE_N) >XLOCALE_ISCTYPE(phonogram, _CTYPE_Q) >XLOCALE_ISCTYPE(print, _CTYPE_R) >XLOCALE_ISCTYPE(punct, _CTYPE_P) >XLOCALE_ISCTYPE(rune, 0xFFFFFF00L) >XLOCALE_ISCTYPE(space, _CTYPE_S) >XLOCALE_ISCTYPE(special, _CTYPE_T) >XLOCALE_ISCTYPE(upper, _CTYPE_U) >XLOCALE_ISCTYPE(xdigit, _CTYPE_X) >#undef XLOCALE_ISCTYPE > >#ifdef _XLOCALE_WCTYPES >_XLOCALE_INLINE int towlower_l(int, locale_t); >_XLOCALE_INLINE int __wcwidth_l(__ct_rune_t, locale_t); >_XLOCALE_INLINE int towupper_l(int, locale_t); > >_XLOCALE_INLINE int towlower_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : > __runes->__maplower[__c]; >} >_XLOCALE_INLINE int towupper_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : > __runes->__mapupper[__c]; >} >_XLOCALE_INLINE int >__wcwidth_l(__ct_rune_t _c, locale_t __l) >{ > unsigned int _x; > > if (_c == 0) > return (0); > _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, __l); > if ((_x & _CTYPE_SWM) != 0) > return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); > return ((_x & _CTYPE_R) != 0 ? 1 : -1); >} >int iswctype_l(wint_t __wc, wctype_t __charclass, locale_t __l); >wctype_t wctype_l(const char *property, locale_t __l); >wint_t towctrans_l(wint_t __wc, wctrans_t desc, locale_t __l); >wint_t nextwctype_l(wint_t __wc, wctype_t wct, locale_t __l); >wctrans_t wctrans_l(const char *__charclass, locale_t __l); >#undef _XLOCALE_WCTYPES >#else ># 180 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >_XLOCALE_INLINE int digittoint_l(int, locale_t); >_XLOCALE_INLINE int tolower_l(int, locale_t); >_XLOCALE_INLINE int toupper_l(int, locale_t); > >_XLOCALE_INLINE int digittoint_l(int __c, locale_t __l) >{ return __sbmaskrune_l((__c), 0xFF, __l); } > >_XLOCALE_INLINE int tolower_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= __limit) ? __c : > __runes->__maplower[__c]; >} >_XLOCALE_INLINE int toupper_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= __limit) ? __c : > __runes->__mapupper[__c]; >} >#endif ># 202 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" >#endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ > (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) */ ># 204 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" ># 84 "/usr/src/lib/libc/../../include/ctype.h" 2 >#endif ># 85 "/usr/src/lib/libc/../../include/ctype.h" >__END_DECLS > >#ifndef __cplusplus >#define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D|_CTYPE_N) >#define isalpha(c) __sbistype((c), _CTYPE_A) >#define iscntrl(c) __sbistype((c), _CTYPE_C) >#define isdigit(c) __sbistype((c), _CTYPE_D) >#define isgraph(c) __sbistype((c), _CTYPE_G) >#define islower(c) __sbistype((c), _CTYPE_L) >#define isprint(c) __sbistype((c), _CTYPE_R) >#define ispunct(c) __sbistype((c), _CTYPE_P) >#define isspace(c) __sbistype((c), _CTYPE_S) >#define isupper(c) __sbistype((c), _CTYPE_U) >#define isxdigit(c) __sbistype((c), _CTYPE_X) >#define tolower(c) __sbtolower(c) >#define toupper(c) __sbtoupper(c) >#endif /* !__cplusplus */ ># 102 "/usr/src/lib/libc/../../include/ctype.h" > >#if __XSI_VISIBLE >/* > * POSIX.1-2001 specifies _tolower() and _toupper() to be macros equivalent to > * tolower() and toupper() respectively, minus extra checking to ensure that > * the argument is a lower or uppercase letter respectively. We've chosen to > * implement these macros with the same error checking as tolower() and > * toupper() since this doesn't violate the specification itself, only its > * intent. We purposely leave _tolower() and _toupper() undocumented to > * discourage their use. > * > * XXX isascii() and toascii() should similarly be undocumented. > */ >#define _tolower(c) __sbtolower(c) >#define _toupper(c) __sbtoupper(c) >#define isascii(c) (((c) & ~0x7F) == 0) >#define toascii(c) ((c) & 0x7F) >#endif ># 120 "/usr/src/lib/libc/../../include/ctype.h" > >#if __ISO_C_VISIBLE >= 1999 && !defined(__cplusplus) >#define isblank(c) __sbistype((c), _CTYPE_B) >#endif ># 124 "/usr/src/lib/libc/../../include/ctype.h" > >#if __BSD_VISIBLE >#define digittoint(c) __sbmaskrune((c), 0xFF) >#define ishexnumber(c) __sbistype((c), _CTYPE_X) >#define isideogram(c) __sbistype((c), _CTYPE_I) >#define isnumber(c) __sbistype((c), _CTYPE_D|_CTYPE_N) >#define isphonogram(c) __sbistype((c), _CTYPE_Q) >#define isrune(c) __sbistype((c), 0xFFFFFF00L) >#define isspecial(c) __sbistype((c), _CTYPE_T) >#endif ># 134 "/usr/src/lib/libc/../../include/ctype.h" > >#endif /* !_CTYPE_H_ */ ># 136 "/usr/src/lib/libc/../../include/ctype.h" ># 35 "/usr/src/lib/libc/nameser/ns_name.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/../../include/stdlib.h" 1 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 > * $FreeBSD: head/include/stdlib.h 303427 2016-07-28 09:50:19Z ed $ > */ > >#ifndef _STDLIB_H_ >#define _STDLIB_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/src/lib/libc/../../include/stdlib.h" ># 37 "/usr/src/lib/libc/../../include/stdlib.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/src/lib/libc/../../include/stdlib.h" ># 38 "/usr/src/lib/libc/../../include/stdlib.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/src/lib/libc/../../include/stdlib.h" ># 39 "/usr/src/lib/libc/../../include/stdlib.h" > >#if __BSD_VISIBLE >#ifndef _RUNE_T_DECLARED >typedef __rune_t rune_t; >#define _RUNE_T_DECLARED >#endif ># 45 "/usr/src/lib/libc/../../include/stdlib.h" >#endif ># 46 "/usr/src/lib/libc/../../include/stdlib.h" > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 51 "/usr/src/lib/libc/../../include/stdlib.h" > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 57 "/usr/src/lib/libc/../../include/stdlib.h" >#endif ># 58 "/usr/src/lib/libc/../../include/stdlib.h" > >typedef struct { > int quot; /* quotient */ > int rem; /* remainder */ >} div_t; > >typedef struct { > long quot; > long rem; >} ldiv_t; > >#define EXIT_FAILURE 1 >#define EXIT_SUCCESS 0 > >#define RAND_MAX 0x7ffffffd > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 76 "/usr/src/lib/libc/../../include/stdlib.h" ># 77 "/usr/src/lib/libc/../../include/stdlib.h" >#endif ># 78 "/usr/src/lib/libc/../../include/stdlib.h" >extern int __mb_cur_max; >extern int ___mb_cur_max(void); >#define MB_CUR_MAX ((size_t)___mb_cur_max()) > >_Noreturn void abort(void); >int abs(int) __pure2; >int atexit(void (*)(void)); >double atof(const char *); >int atoi(const char *); >long atol(const char *); >void *bsearch(const void *, const void *, size_t, > size_t, int (*)(const void *, const void *)); >void *calloc(size_t, size_t) __malloc_like __result_use_check > __alloc_size(1) __alloc_size(2); >div_t div(int, int) __pure2; >_Noreturn void exit(int); >void free(void *); >char *getenv(const char *); >long labs(long) __pure2; >ldiv_t ldiv(long, long) __pure2; >void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); >int mblen(const char *, size_t); >size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); >int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); >void qsort(void *, size_t, size_t, > int (*)(const void *, const void *)); >int rand(void); >void *realloc(void *, size_t) __result_use_check __alloc_size(2); >void srand(unsigned); >double strtod(const char * __restrict, char ** __restrict); >float strtof(const char * __restrict, char ** __restrict); >long strtol(const char * __restrict, char ** __restrict, int); >long double > strtold(const char * __restrict, char ** __restrict); >unsigned long > strtoul(const char * __restrict, char ** __restrict, int); >int system(const char *); >int wctomb(char *, wchar_t); >size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); > >/* > * Functions added in C99 which we make conditionally available in the > * BSD^C89 namespace if the compiler supports `long long'. > * The #if test is more complicated than it ought to be because > * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' > * is not supported in the compilation environment (which therefore means > * that it can't really be ISO C99). > * > * (The only other extension made by C99 in thie header is _Exit().) > */ >#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) >#ifdef __LONG_LONG_SUPPORTED >/* LONGLONG */ >typedef struct { > long long quot; > long long rem; >} lldiv_t; > >/* LONGLONG */ >long long > atoll(const char *); >/* LONGLONG */ >long long > llabs(long long) __pure2; >/* LONGLONG */ >lldiv_t lldiv(long long, long long) __pure2; >/* LONGLONG */ >long long > strtoll(const char * __restrict, char ** __restrict, int); >/* LONGLONG */ >unsigned long long > strtoull(const char * __restrict, char ** __restrict, int); >#endif /* __LONG_LONG_SUPPORTED */ ># 151 "/usr/src/lib/libc/../../include/stdlib.h" > >_Noreturn void _Exit(int); >#endif /* __ISO_C_VISIBLE >= 1999 */ ># 154 "/usr/src/lib/libc/../../include/stdlib.h" > >/* > * If we're in a mode greater than C99, expose C11 functions. > */ >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) > __alloc_size(2); >int at_quick_exit(void (*)(void)); >_Noreturn void > quick_exit(int); >#endif /* __ISO_C_VISIBLE >= 2011 */ ># 165 "/usr/src/lib/libc/../../include/stdlib.h" >/* > * Extensions made by POSIX relative to C. > */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >char *realpath(const char * __restrict, char * __restrict); >#endif ># 171 "/usr/src/lib/libc/../../include/stdlib.h" >#if __POSIX_VISIBLE >= 199506 >int rand_r(unsigned *); /* (TSF) */ >#endif ># 174 "/usr/src/lib/libc/../../include/stdlib.h" >#if __POSIX_VISIBLE >= 200112 >int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */ >int setenv(const char *, const char *, int); >int unsetenv(const char *); >#endif ># 179 "/usr/src/lib/libc/../../include/stdlib.h" > >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >int getsubopt(char **, char *const *, char **); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 186 "/usr/src/lib/libc/../../include/stdlib.h" >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 190 "/usr/src/lib/libc/../../include/stdlib.h" >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 191 "/usr/src/lib/libc/../../include/stdlib.h" > >/* > * The only changes to the XSI namespace in revision 6 were the deletion > * of the ttyslot() and valloc() functions, which FreeBSD never declared > * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which > * FreeBSD also does not have, and mktemp(), are to be deleted. > */ >#if __XSI_VISIBLE >/* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */ >long a64l(const char *); >double drand48(void); >/* char *ecvt(double, int, int * __restrict, int * __restrict); */ >double erand48(unsigned short[3]); >/* char *fcvt(double, int, int * __restrict, int * __restrict); */ >/* char *gcvt(double, int, int * __restrict, int * __restrict); */ >int grantpt(int); >char *initstate(unsigned int, char *, size_t); >long jrand48(unsigned short[3]); >char *l64a(long); >void lcong48(unsigned short[7]); >long lrand48(void); >#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 216 "/usr/src/lib/libc/../../include/stdlib.h" >long mrand48(void); >long nrand48(unsigned short[3]); >int posix_openpt(int); >char *ptsname(int); >int putenv(char *); >long random(void); >unsigned short > *seed48(unsigned short[3]); >#ifndef _SETKEY_DECLARED >int setkey(const char *); >#define _SETKEY_DECLARED >#endif ># 228 "/usr/src/lib/libc/../../include/stdlib.h" >char *setstate(/* const */ char *); >void srand48(long); >void srandom(unsigned int); >int unlockpt(int); >#endif /* __XSI_VISIBLE */ ># 233 "/usr/src/lib/libc/../../include/stdlib.h" > >#if __BSD_VISIBLE >extern const char *malloc_conf; >extern void (*malloc_message)(void *, const char *); > >/* > * The alloca() function can't be implemented in C, and on some > * platforms it can't be implemented at all as a callable function. > * The GNU C compiler provides a built-in alloca() which we can use; > * in all other cases, provide a prototype, mainly to pacify various > * incarnations of lint. On platforms where alloca() is not in libc, > * programs which use it will fail to link when compiled with non-GNU > * compilers. > */ >#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) >#undef alloca /* some GNU bits try to get cute and define this on their own */ >#define alloca(sz) __builtin_alloca(sz) >#elif defined(lint) ># 251 "/usr/src/lib/libc/../../include/stdlib.h" >void *alloca(size_t); >#endif ># 253 "/usr/src/lib/libc/../../include/stdlib.h" > >void abort2(const char *, int, void **) __dead2; >__uint32_t > arc4random(void); >void arc4random_addrandom(unsigned char *, int); >void arc4random_buf(void *, size_t); >void arc4random_stir(void); >__uint32_t > arc4random_uniform(__uint32_t); >#ifdef __BLOCKS__ >int atexit_b(void (^)(void)); >void *bsearch_b(const void *, const void *, size_t, > size_t, int (^)(const void *, const void *)); >#endif ># 267 "/usr/src/lib/libc/../../include/stdlib.h" >char *getbsize(int *, long *); > /* getcap(3) functions */ >char *cgetcap(char *, const char *, int); >int cgetclose(void); >int cgetent(char **, char **, const char *); >int cgetfirst(char **, char **); >int cgetmatch(const char *, const char *); >int cgetnext(char **, char **); >int cgetnum(char *, const char *, long *); >int cgetset(const char *); >int cgetstr(char *, const char *, char **); >int cgetustr(char *, const char *, char **); > >int daemon(int, int); >char *devname(__dev_t, __mode_t); >char *devname_r(__dev_t, __mode_t, char *, int); >char *fdevname(int); >char *fdevname_r(int, char *, int); >int getloadavg(double [], int); >const char * > getprogname(void); > >int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >void qsort_b(void *, size_t, size_t, > int (^)(const void *, const void *)); >#endif ># 295 "/usr/src/lib/libc/../../include/stdlib.h" >int l64a_r(long, char *, int); >int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >#endif ># 300 "/usr/src/lib/libc/../../include/stdlib.h" >int mkostemp(char *, int); >int mkostemps(char *, int, int); >void qsort_r(void *, size_t, size_t, void *, > int (*)(void *, const void *, const void *)); >int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) > __alloc_size(3); >void *reallocf(void *, size_t) __alloc_size(2); >int rpmatch(const char *); >void setprogname(const char *); >int sradixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void sranddev(void); >void srandomdev(void); >long long > strtonum(const char *, long long, long long, const char **); > >/* Deprecated interfaces, to be removed in FreeBSD 6.0. */ >__int64_t > strtoq(const char *, char **, int); >__uint64_t > strtouq(const char *, char **, int); > >extern char *suboptarg; /* getsubopt(3) external variable */ >#endif /* __BSD_VISIBLE */ ># 326 "/usr/src/lib/libc/../../include/stdlib.h" >__END_DECLS > >#endif /* !_STDLIB_H_ */ ># 329 "/usr/src/lib/libc/../../include/stdlib.h" ># 36 "/usr/src/lib/libc/nameser/ns_name.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <limits.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/../../include/limits.h" 1 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)limits.h 8.2 (Berkeley) 1/4/94 > * $FreeBSD: head/include/limits.h 293491 2016-01-09 14:53:23Z kevlo $ > */ > >#ifndef _LIMITS_H_ >#define _LIMITS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/src/lib/libc/../../include/limits.h" ># 37 "/usr/src/lib/libc/../../include/limits.h" > >#if __POSIX_VISIBLE >#define _POSIX_ARG_MAX 4096 >#define _POSIX_LINK_MAX 8 >#define _POSIX_MAX_CANON 255 >#define _POSIX_MAX_INPUT 255 >#define _POSIX_NAME_MAX 14 >#define _POSIX_PIPE_BUF 512 >#define _POSIX_SSIZE_MAX 32767 >#define _POSIX_STREAM_MAX 8 > >#if __POSIX_VISIBLE >= 200112 >#define _POSIX_CHILD_MAX 25 >#define _POSIX_NGROUPS_MAX 8 >#define _POSIX_OPEN_MAX 20 >#define _POSIX_PATH_MAX 256 >#define _POSIX_TZNAME_MAX 6 >#else ># 55 "/usr/src/lib/libc/../../include/limits.h" >#define _POSIX_CHILD_MAX 6 >#define _POSIX_NGROUPS_MAX 0 >#define _POSIX_OPEN_MAX 16 >#define _POSIX_PATH_MAX 255 >#define _POSIX_TZNAME_MAX 3 >#endif ># 61 "/usr/src/lib/libc/../../include/limits.h" > >#if __POSIX_VISIBLE >= 200112 >#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ >#define BC_DIM_MAX 2048 /* max array elements in bc(1) */ >#define BC_SCALE_MAX 99 /* max scale value in bc(1) */ >#define BC_STRING_MAX 1000 /* max const string length in bc(1) */ >#define CHARCLASS_NAME_MAX 14 /* max character class name size */ >#define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */ >#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ >#define LINE_MAX 2048 /* max bytes in an input line */ >#define RE_DUP_MAX 255 /* max RE's in interval notation */ > >#define _POSIX2_BC_BASE_MAX 99 >#define _POSIX2_BC_DIM_MAX 2048 >#define _POSIX2_BC_SCALE_MAX 99 >#define _POSIX2_BC_STRING_MAX 1000 >#define _POSIX2_CHARCLASS_NAME_MAX 14 >#define _POSIX2_COLL_WEIGHTS_MAX 2 >#define _POSIX2_EQUIV_CLASS_MAX 2 >#define _POSIX2_EXPR_NEST_MAX 32 >#define _POSIX2_LINE_MAX 2048 >#define _POSIX2_RE_DUP_MAX 255 >#endif ># 84 "/usr/src/lib/libc/../../include/limits.h" >#endif ># 85 "/usr/src/lib/libc/../../include/limits.h" > >#if __POSIX_VISIBLE >= 199309 >#define _POSIX_AIO_LISTIO_MAX 2 >#define _POSIX_AIO_MAX 1 >#define _POSIX_DELAYTIMER_MAX 32 >#define _POSIX_MQ_OPEN_MAX 8 >#define _POSIX_MQ_PRIO_MAX 32 >#define _POSIX_RTSIG_MAX 8 >#define _POSIX_SEM_NSEMS_MAX 256 >#define _POSIX_SEM_VALUE_MAX 32767 >#define _POSIX_SIGQUEUE_MAX 32 >#define _POSIX_TIMER_MAX 32 > >#define _POSIX_CLOCKRES_MIN 20000000 >#endif ># 100 "/usr/src/lib/libc/../../include/limits.h" > >#if __POSIX_VISIBLE >= 199506 >#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 >#define _POSIX_THREAD_KEYS_MAX 128 >#define _POSIX_THREAD_THREADS_MAX 64 >#endif ># 106 "/usr/src/lib/libc/../../include/limits.h" > >#if __POSIX_VISIBLE >= 200112 >#define _POSIX_HOST_NAME_MAX 255 >#define _POSIX_LOGIN_NAME_MAX 9 >#define _POSIX_SS_REPL_MAX 4 >#define _POSIX_SYMLINK_MAX 255 >#define _POSIX_SYMLOOP_MAX 8 >#define _POSIX_TRACE_EVENT_NAME_MAX 30 >#define _POSIX_TRACE_NAME_MAX 8 >#define _POSIX_TRACE_SYS_MAX 8 >#define _POSIX_TRACE_USER_EVENT_MAX 32 >#define _POSIX_TTY_NAME_MAX 9 > >#define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX >#endif ># 121 "/usr/src/lib/libc/../../include/limits.h" > >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 >#define NL_ARGMAX 99 /* max # of position args for printf */ >#define NL_MSGMAX 32767 >#define NL_SETMAX 255 >#define NL_TEXTMAX 2048 >#endif ># 128 "/usr/src/lib/libc/../../include/limits.h" > >#if __XSI_VISIBLE >#define _XOPEN_IOV_MAX 16 >#define _XOPEN_NAME_MAX 255 >#define _XOPEN_PATH_MAX 1024 >#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */ > >#define NL_LANGMAX 31 /* max LANG name length */ >#define NL_NMAX 1 >#endif ># 138 "/usr/src/lib/libc/../../include/limits.h" > >#define MB_LEN_MAX 6 /* 31-bit UTF-8 */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/limits.h> >#endif /* expanded by -frewrite-includes */ ># 141 "/usr/src/lib/libc/../../include/limits.h" ># 142 "/usr/src/lib/libc/../../include/limits.h" > >#if __POSIX_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/syslimits.h> >#endif /* expanded by -frewrite-includes */ ># 144 "/usr/src/lib/libc/../../include/limits.h" ># 145 "/usr/src/lib/libc/../../include/limits.h" >#endif ># 146 "/usr/src/lib/libc/../../include/limits.h" > >#endif /* !_LIMITS_H_ */ ># 148 "/usr/src/lib/libc/../../include/limits.h" ># 37 "/usr/src/lib/libc/nameser/ns_name.c" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include "port_after.h" >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/src/lib/libc/nameser/ns_name.c" ># 1 "/usr/src/lib/libc/include/port_after.h" 1 >/* $FreeBSD: head/lib/libc/include/port_after.h 156964 2006-03-21 18:31:24Z ume $ */ > >#ifndef _PORT_AFTER_H_ >#define _PORT_AFTER_H_ > >#define HAVE_SA_LEN 1 >#define HAS_INET6_STRUCTS 1 >#define HAVE_SIN6_SCOPE_ID 1 >#define HAVE_TIME_R 1 > >#endif /* _PORT_AFTER_H_ */ ># 12 "/usr/src/lib/libc/include/port_after.h" ># 39 "/usr/src/lib/libc/nameser/ns_name.c" 2 > >#ifdef SPRINTF_CHAR ># define SPRINTF(x) strlen(sprintf/**/x) >#else ># 43 "/usr/src/lib/libc/nameser/ns_name.c" ># define SPRINTF(x) ((size_t)sprintf x) >#endif ># 45 "/usr/src/lib/libc/nameser/ns_name.c" > >#define NS_TYPE_ELT 0x40 /*%< EDNS0 extended label type */ >#define DNS_LABELTYPE_BITSTRING 0x41 > >/* Data. */ > >static const char digits[] = "0123456789"; > >static const char digitvalue[256] = { > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*16*/ > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*32*/ > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*48*/ > 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /*64*/ > -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*80*/ > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*96*/ > -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*112*/ > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*128*/ > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, > -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*256*/ >}; > >/* Forward. */ > >static int special(int); >static int printable(int); >static int dn_find(const u_char *, const u_char *, > const u_char * const *, > const u_char * const *); >static int encode_bitsring(const char **, const char *, > unsigned char **, unsigned char **, > unsigned const char *); >static int labellen(const u_char *); >static int decode_bitstring(const unsigned char **, > char *, const char *); > >/* Public. */ > >/*% > * Convert an encoded domain name to printable ascii as per RFC1035. > > * return: > *\li Number of bytes written to buffer, or -1 (with errno set) > * > * notes: > *\li The root is returned as "." > *\li All other domains are returned in non absolute form > */ >int >ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) >{ > const u_char *cp; > char *dn, *eom; > u_char c; > u_int n; > int l; > > cp = src; > dn = dst; > eom = dst + dstsiz; > > while ((n = *cp++) != 0) { > if ((n & NS_CMPRSFLGS) == NS_CMPRSFLGS) { > /* Some kind of compression pointer. */ > errno = EMSGSIZE; > return (-1); > } > if (dn != dst) { > if (dn >= eom) { > errno = EMSGSIZE; > return (-1); > } > *dn++ = '.'; > } > if ((l = labellen(cp - 1)) < 0) { > errno = EMSGSIZE; /*%< XXX */ > return (-1); > } > if (dn + l >= eom) { > errno = EMSGSIZE; > return (-1); > } > if ((n & NS_CMPRSFLGS) == NS_TYPE_ELT) { > int m; > > if (n != DNS_LABELTYPE_BITSTRING) { > /* XXX: labellen should reject this case */ > errno = EINVAL; > return (-1); > } > if ((m = decode_bitstring(&cp, dn, eom)) < 0) > { > errno = EMSGSIZE; > return (-1); > } > dn += m; > continue; > } > for ((void)NULL; l > 0; l--) { > c = *cp++; > if (special(c)) { > if (dn + 1 >= eom) { > errno = EMSGSIZE; > return (-1); > } > *dn++ = '\\'; > *dn++ = (char)c; > } else if (!printable(c)) { > if (dn + 3 >= eom) { > errno = EMSGSIZE; > return (-1); > } > *dn++ = '\\'; > *dn++ = digits[c / 100]; > *dn++ = digits[(c % 100) / 10]; > *dn++ = digits[c % 10]; > } else { > if (dn >= eom) { > errno = EMSGSIZE; > return (-1); > } > *dn++ = (char)c; > } > } > } > if (dn == dst) { > if (dn >= eom) { > errno = EMSGSIZE; > return (-1); > } > *dn++ = '.'; > } > if (dn >= eom) { > errno = EMSGSIZE; > return (-1); > } > *dn++ = '\0'; > return (dn - dst); >} > >/*% > * Convert a ascii string into an encoded domain name as per RFC1035. > * > * return: > * > *\li -1 if it fails > *\li 1 if string was fully qualified > *\li 0 is string was not fully qualified > * > * notes: > *\li Enforces label and domain length limits. > */ >int >ns_name_pton(const char *src, u_char *dst, size_t dstsiz) { > return (ns_name_pton2(src, dst, dstsiz, NULL)); >} > >/* > * ns_name_pton2(src, dst, dstsiz, *dstlen) > * Convert a ascii string into an encoded domain name as per RFC1035. > * return: > * -1 if it fails > * 1 if string was fully qualified > * 0 is string was not fully qualified > * side effects: > * fills in *dstlen (if non-NULL) > * notes: > * Enforces label and domain length limits. > */ >int >ns_name_pton2(const char *src, u_char *dst, size_t dstsiz, size_t *dstlen) { > u_char *label, *bp, *eom; > int c, n, escaped, e = 0; > char *cp; > > escaped = 0; > bp = dst; > eom = dst + dstsiz; > label = bp++; > > while ((c = *src++) != 0) { > if (escaped) { > if (c == '[') { /*%< start a bit string label */ > if ((cp = strchr(src, ']')) == NULL) { > errno = EINVAL; /*%< ??? */ > return (-1); > } > if ((e = encode_bitsring(&src, cp + 2, > &label, &bp, eom)) > != 0) { > errno = e; > return (-1); > } > escaped = 0; > label = bp++; > if ((c = *src++) == 0) > goto done; > else if (c != '.') { > errno = EINVAL; > return (-1); > } > continue; > } > else if ((cp = strchr(digits, c)) != NULL) { > n = (cp - digits) * 100; > if ((c = *src++) == 0 || > (cp = strchr(digits, c)) == NULL) { > errno = EMSGSIZE; > return (-1); > } > n += (cp - digits) * 10; > if ((c = *src++) == 0 || > (cp = strchr(digits, c)) == NULL) { > errno = EMSGSIZE; > return (-1); > } > n += (cp - digits); > if (n > 255) { > errno = EMSGSIZE; > return (-1); > } > c = n; > } > escaped = 0; > } else if (c == '\\') { > escaped = 1; > continue; > } else if (c == '.') { > c = (bp - label - 1); > if ((c & NS_CMPRSFLGS) != 0) { /*%< Label too big. */ > errno = EMSGSIZE; > return (-1); > } > if (label >= eom) { > errno = EMSGSIZE; > return (-1); > } > *label = c; > /* Fully qualified ? */ > if (*src == '\0') { > if (c != 0) { > if (bp >= eom) { > errno = EMSGSIZE; > return (-1); > } > *bp++ = '\0'; > } > if ((bp - dst) > MAXCDNAME) { > errno = EMSGSIZE; > return (-1); > } > if (dstlen != NULL) > *dstlen = (bp - dst); > return (1); > } > if (c == 0 || *src == '.') { > errno = EMSGSIZE; > return (-1); > } > label = bp++; > continue; > } > if (bp >= eom) { > errno = EMSGSIZE; > return (-1); > } > *bp++ = (u_char)c; > } > c = (bp - label - 1); > if ((c & NS_CMPRSFLGS) != 0) { /*%< Label too big. */ > errno = EMSGSIZE; > return (-1); > } > done: > if (label >= eom) { > errno = EMSGSIZE; > return (-1); > } > *label = c; > if (c != 0) { > if (bp >= eom) { > errno = EMSGSIZE; > return (-1); > } > *bp++ = 0; > } > if ((bp - dst) > MAXCDNAME) { /*%< src too big */ > errno = EMSGSIZE; > return (-1); > } > if (dstlen != NULL) > *dstlen = (bp - dst); > return (0); >} > >/*% > * Convert a network strings labels into all lowercase. > * > * return: > *\li Number of bytes written to buffer, or -1 (with errno set) > * > * notes: > *\li Enforces label and domain length limits. > */ > >int >ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) >{ > const u_char *cp; > u_char *dn, *eom; > u_char c; > u_int n; > int l; > > cp = src; > dn = dst; > eom = dst + dstsiz; > > if (dn >= eom) { > errno = EMSGSIZE; > return (-1); > } > while ((n = *cp++) != 0) { > if ((n & NS_CMPRSFLGS) == NS_CMPRSFLGS) { > /* Some kind of compression pointer. */ > errno = EMSGSIZE; > return (-1); > } > *dn++ = n; > if ((l = labellen(cp - 1)) < 0) { > errno = EMSGSIZE; > return (-1); > } > if (dn + l >= eom) { > errno = EMSGSIZE; > return (-1); > } > for ((void)NULL; l > 0; l--) { > c = *cp++; > if (isascii(c) && isupper(c)) > *dn++ = tolower(c); > else > *dn++ = c; > } > } > *dn++ = '\0'; > return (dn - dst); >} > >/*% > * Unpack a domain name from a message, source may be compressed. > * > * return: > *\li -1 if it fails, or consumed octets if it succeeds. > */ >int >ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src, > u_char *dst, size_t dstsiz) >{ > return (ns_name_unpack2(msg, eom, src, dst, dstsiz, NULL)); >} > >/* > * ns_name_unpack2(msg, eom, src, dst, dstsiz, *dstlen) > * Unpack a domain name from a message, source may be compressed. > * return: > * -1 if it fails, or consumed octets if it succeeds. > * side effect: > * fills in *dstlen (if non-NULL). > */ >int >ns_name_unpack2(const u_char *msg, const u_char *eom, const u_char *src, > u_char *dst, size_t dstsiz, size_t *dstlen) >{ > const u_char *srcp, *dstlim; > u_char *dstp; > int n, len, checked, l; > > len = -1; > checked = 0; > dstp = dst; > srcp = src; > dstlim = dst + dstsiz; > if (srcp < msg || srcp >= eom) { > errno = EMSGSIZE; > return (-1); > } > /* Fetch next label in domain name. */ > while ((n = *srcp++) != 0) { > /* Check for indirection. */ > switch (n & NS_CMPRSFLGS) { > case 0: > case NS_TYPE_ELT: > /* Limit checks. */ > if ((l = labellen(srcp - 1)) < 0) { > errno = EMSGSIZE; > return (-1); > } > if (dstp + l + 1 >= dstlim || srcp + l >= eom) { > errno = EMSGSIZE; > return (-1); > } > checked += l + 1; > *dstp++ = n; > memcpy(dstp, srcp, l); > dstp += l; > srcp += l; > break; > > case NS_CMPRSFLGS: > if (srcp >= eom) { > errno = EMSGSIZE; > return (-1); > } > if (len < 0) > len = srcp - src + 1; > l = ((n & 0x3f) << 8) | (*srcp & 0xff); > if (l >= eom - msg) { /*%< Out of range. */ > errno = EMSGSIZE; > return (-1); > } > srcp = msg + l; > checked += 2; > /* > * Check for loops in the compressed name; > * if we've looked at the whole message, > * there must be a loop. > */ > if (checked >= eom - msg) { > errno = EMSGSIZE; > return (-1); > } > break; > > default: > errno = EMSGSIZE; > return (-1); /*%< flag error */ > } > } > *dstp++ = 0; > if (dstlen != NULL) > *dstlen = dstp - dst; > if (len < 0) > len = srcp - src; > return (len); >} > >/*% > * Pack domain name 'domain' into 'comp_dn'. > * > * return: > *\li Size of the compressed name, or -1. > * > * notes: > *\li 'dnptrs' is an array of pointers to previous compressed names. > *\li dnptrs[0] is a pointer to the beginning of the message. The array > * ends with NULL. > *\li 'lastdnptr' is a pointer to the end of the array pointed to > * by 'dnptrs'. > * > * Side effects: > *\li The list of pointers in dnptrs is updated for labels inserted into > * the message as we compress the name. If 'dnptr' is NULL, we don't > * try to compress names. If 'lastdnptr' is NULL, we don't update the > * list. > */ >int >ns_name_pack(const u_char *src, u_char *dst, int dstsiz, > const u_char **dnptrs, const u_char **lastdnptr) >{ > u_char *dstp; > const u_char **cpp, **lpp, *eob, *msg; > const u_char *srcp; > int n, l, first = 1; > > srcp = src; > dstp = dst; > eob = dstp + dstsiz; > lpp = cpp = NULL; > if (dnptrs != NULL) { > if ((msg = *dnptrs++) != NULL) { > for (cpp = dnptrs; *cpp != NULL; cpp++) > (void)NULL; > lpp = cpp; /*%< end of list to search */ > } > } else > msg = NULL; > > /* make sure the domain we are about to add is legal */ > l = 0; > do { > int l0; > > n = *srcp; > if ((n & NS_CMPRSFLGS) == NS_CMPRSFLGS) { > errno = EMSGSIZE; > return (-1); > } > if ((l0 = labellen(srcp)) < 0) { > errno = EINVAL; > return (-1); > } > l += l0 + 1; > if (l > MAXCDNAME) { > errno = EMSGSIZE; > return (-1); > } > srcp += l0 + 1; > } while (n != 0); > > /* from here on we need to reset compression pointer array on error */ > srcp = src; > do { > /* Look to see if we can use pointers. */ > n = *srcp; > if (n != 0 && msg != NULL) { > l = dn_find(srcp, msg, (const u_char * const *)dnptrs, > (const u_char * const *)lpp); > if (l >= 0) { > if (dstp + 1 >= eob) { > goto cleanup; > } > *dstp++ = (l >> 8) | NS_CMPRSFLGS; > *dstp++ = l % 256; > return (dstp - dst); > } > /* Not found, save it. */ > if (lastdnptr != NULL && cpp < lastdnptr - 1 && > (dstp - msg) < 0x4000 && first) { > *cpp++ = dstp; > *cpp = NULL; > first = 0; > } > } > /* copy label to buffer */ > if ((n & NS_CMPRSFLGS) == NS_CMPRSFLGS) { > /* Should not happen. */ > goto cleanup; > } > n = labellen(srcp); > if (dstp + 1 + n >= eob) { > goto cleanup; > } > memcpy(dstp, srcp, n + 1); > srcp += n + 1; > dstp += n + 1; > } while (n != 0); > > if (dstp > eob) { >cleanup: > if (msg != NULL) > *lpp = NULL; > errno = EMSGSIZE; > return (-1); > } > return (dstp - dst); >} > >/*% > * Expand compressed domain name to presentation format. > * > * return: > *\li Number of bytes read out of `src', or -1 (with errno set). > * > * note: > *\li Root domain returns as "." not "". > */ >int >ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src, > char *dst, size_t dstsiz) >{ > u_char tmp[NS_MAXCDNAME]; > int n; > > if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1) > return (-1); > if (ns_name_ntop(tmp, dst, dstsiz) == -1) > return (-1); > return (n); >} > >/*% > * Compress a domain name into wire format, using compression pointers. > * > * return: > *\li Number of bytes consumed in `dst' or -1 (with errno set). > * > * notes: > *\li 'dnptrs' is an array of pointers to previous compressed names. > *\li dnptrs[0] is a pointer to the beginning of the message. > *\li The list ends with NULL. 'lastdnptr' is a pointer to the end of the > * array pointed to by 'dnptrs'. Side effect is to update the list of > * pointers for labels inserted into the message as we compress the name. > *\li If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr' > * is NULL, we don't update the list. > */ >int >ns_name_compress(const char *src, u_char *dst, size_t dstsiz, > const u_char **dnptrs, const u_char **lastdnptr) >{ > u_char tmp[NS_MAXCDNAME]; > > if (ns_name_pton(src, tmp, sizeof tmp) == -1) > return (-1); > return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr)); >} > >/*% > * Reset dnptrs so that there are no active references to pointers at or > * after src. > */ >void >ns_name_rollback(const u_char *src, const u_char **dnptrs, > const u_char **lastdnptr) >{ > while (dnptrs < lastdnptr && *dnptrs != NULL) { > if (*dnptrs >= src) { > *dnptrs = NULL; > break; > } > dnptrs++; > } >} > >/*% > * Advance *ptrptr to skip over the compressed name it points at. > * > * return: > *\li 0 on success, -1 (with errno set) on failure. > */ >int >ns_name_skip(const u_char **ptrptr, const u_char *eom) >{ > const u_char *cp; > u_int n; > int l; > > cp = *ptrptr; > while (cp < eom && (n = *cp++) != 0) { > /* Check for indirection. */ > switch (n & NS_CMPRSFLGS) { > case 0: /*%< normal case, n == len */ > cp += n; > continue; > case NS_TYPE_ELT: /*%< EDNS0 extended label */ > if ((l = labellen(cp - 1)) < 0) { > errno = EMSGSIZE; /*%< XXX */ > return (-1); > } > cp += l; > continue; > case NS_CMPRSFLGS: /*%< indirection */ > cp++; > break; > default: /*%< illegal type */ > errno = EMSGSIZE; > return (-1); > } > break; > } > if (cp > eom) { > errno = EMSGSIZE; > return (-1); > } > *ptrptr = cp; > return (0); >} > >/* Find the number of octets an nname takes up, including the root label. > * (This is basically ns_name_skip() without compression-pointer support.) > * ((NOTE: can only return zero if passed-in namesiz argument is zero.)) > */ >ssize_t >ns_name_length(ns_nname_ct nname, size_t namesiz) { > ns_nname_ct orig = nname; > u_int n; > > while (namesiz-- > 0 && (n = *nname++) != 0) { > if ((n & NS_CMPRSFLGS) != 0) { > errno = EISDIR; > return (-1); > } > if (n > namesiz) { > errno = EMSGSIZE; > return (-1); > } > nname += n; > namesiz -= n; > } > return (nname - orig); >} > >/* Compare two nname's for equality. Return -1 on error (setting errno). > */ >int >ns_name_eq(ns_nname_ct a, size_t as, ns_nname_ct b, size_t bs) { > ns_nname_ct ae = a + as, be = b + bs; > int ac, bc; > > while (ac = *a, bc = *b, ac != 0 && bc != 0) { > if ((ac & NS_CMPRSFLGS) != 0 || (bc & NS_CMPRSFLGS) != 0) { > errno = EISDIR; > return (-1); > } > if (a + ac >= ae || b + bc >= be) { > errno = EMSGSIZE; > return (-1); > } > if (ac != bc || strncasecmp((const char *) ++a, > (const char *) ++b, ac) != 0) > return (0); > a += ac, b += bc; > } > return (ac == 0 && bc == 0); >} > >/* Is domain "A" owned by (at or below) domain "B"? > */ >int >ns_name_owned(ns_namemap_ct a, int an, ns_namemap_ct b, int bn) { > /* If A is shorter, it cannot be owned by B. */ > if (an < bn) > return (0); > > /* If they are unequal before the length of the shorter, A cannot... */ > while (bn > 0) { > if (a->len != b->len || > strncasecmp((const char *) a->base, > (const char *) b->base, a->len) != 0) > return (0); > a++, an--; > b++, bn--; > } > > /* A might be longer or not, but either way, B owns it. */ > return (1); >} > >/* Build an array of <base,len> tuples from an nname, top-down order. > * Return the number of tuples (labels) thus discovered. > */ >int >ns_name_map(ns_nname_ct nname, size_t namelen, ns_namemap_t map, int mapsize) { > u_int n; > int l; > > n = *nname++; > namelen--; > > /* Root zone? */ > if (n == 0) { > /* Extra data follows name? */ > if (namelen > 0) { > errno = EMSGSIZE; > return (-1); > } > return (0); > } > > /* Compression pointer? */ > if ((n & NS_CMPRSFLGS) != 0) { > errno = EISDIR; > return (-1); > } > > /* Label too long? */ > if (n > namelen) { > errno = EMSGSIZE; > return (-1); > } > > /* Recurse to get rest of name done first. */ > l = ns_name_map(nname + n, namelen - n, map, mapsize); > if (l < 0) > return (-1); > > /* Too many labels? */ > if (l >= mapsize) { > errno = ENAMETOOLONG; > return (-1); > } > > /* We're on our way back up-stack, store current map data. */ > map[l].base = nname; > map[l].len = n; > return (l + 1); >} > >/* Count the labels in a domain name. Root counts, so COM. has two. This > * is to make the result comparable to the result of ns_name_map(). > */ >int >ns_name_labels(ns_nname_ct nname, size_t namesiz) { > int ret = 0; > u_int n; > > while (namesiz-- > 0 && (n = *nname++) != 0) { > if ((n & NS_CMPRSFLGS) != 0) { > errno = EISDIR; > return (-1); > } > if (n > namesiz) { > errno = EMSGSIZE; > return (-1); > } > nname += n; > namesiz -= n; > ret++; > } > return (ret + 1); >} > >/* Private. */ > >/*% > * Thinking in noninternationalized USASCII (per the DNS spec), > * is this characted special ("in need of quoting") ? > * > * return: > *\li boolean. > */ >static int >special(int ch) { > switch (ch) { > case 0x22: /*%< '"' */ > case 0x2E: /*%< '.' */ > case 0x3B: /*%< ';' */ > case 0x5C: /*%< '\\' */ > case 0x28: /*%< '(' */ > case 0x29: /*%< ')' */ > /* Special modifiers in zone files. */ > case 0x40: /*%< '@' */ > case 0x24: /*%< '$' */ > return (1); > default: > return (0); > } >} > >/*% > * Thinking in noninternationalized USASCII (per the DNS spec), > * is this character visible and not a space when printed ? > * > * return: > *\li boolean. > */ >static int >printable(int ch) { > return (ch > 0x20 && ch < 0x7f); >} > >/*% > * Thinking in noninternationalized USASCII (per the DNS spec), > * convert this character to lower case if it's upper case. > */ >static int >mklower(int ch) { > if (ch >= 0x41 && ch <= 0x5A) > return (ch + 0x20); > return (ch); >} > >/*% > * Search for the counted-label name in an array of compressed names. > * > * return: > *\li offset from msg if found, or -1. > * > * notes: > *\li dnptrs is the pointer to the first name on the list, > *\li not the pointer to the start of the message. > */ >static int >dn_find(const u_char *domain, const u_char *msg, > const u_char * const *dnptrs, > const u_char * const *lastdnptr) >{ > const u_char *dn, *cp, *sp; > const u_char * const *cpp; > u_int n; > > for (cpp = dnptrs; cpp < lastdnptr; cpp++) { > sp = *cpp; > /* > * terminate search on: > * root label > * compression pointer > * unusable offset > */ > while (*sp != 0 && (*sp & NS_CMPRSFLGS) == 0 && > (sp - msg) < 0x4000) { > dn = domain; > cp = sp; > while ((n = *cp++) != 0) { > /* > * check for indirection > */ > switch (n & NS_CMPRSFLGS) { > case 0: /*%< normal case, n == len */ > n = labellen(cp - 1); /*%< XXX */ > if (n != *dn++) > goto next; > > for ((void)NULL; n > 0; n--) > if (mklower(*dn++) != > mklower(*cp++)) > goto next; > /* Is next root for both ? */ > if (*dn == '\0' && *cp == '\0') > return (sp - msg); > if (*dn) > continue; > goto next; > case NS_CMPRSFLGS: /*%< indirection */ > cp = msg + (((n & 0x3f) << 8) | *cp); > break; > > default: /*%< illegal type */ > errno = EMSGSIZE; > return (-1); > } > } > next: ; > sp += *sp + 1; > } > } > errno = ENOENT; > return (-1); >} > >static int >decode_bitstring(const unsigned char **cpp, char *dn, const char *eom) >{ > const unsigned char *cp = *cpp; > char *beg = dn, tc; > int b, blen, plen, i; > > if ((blen = (*cp & 0xff)) == 0) > blen = 256; > plen = (blen + 3) / 4; > plen += sizeof("\\[x/]") + (blen > 99 ? 3 : (blen > 9) ? 2 : 1); > if (dn + plen >= eom) > return (-1); > > cp++; > i = SPRINTF((dn, "\\[x")); > if (i < 0) > return (-1); > dn += i; > for (b = blen; b > 7; b -= 8, cp++) { > i = SPRINTF((dn, "%02x", *cp & 0xff)); > if (i < 0) > return (-1); > dn += i; > } > if (b > 4) { > tc = *cp++; > i = SPRINTF((dn, "%02x", tc & (0xff << (8 - b)))); > if (i < 0) > return (-1); > dn += i; > } else if (b > 0) { > tc = *cp++; > i = SPRINTF((dn, "%1x", > ((tc >> 4) & 0x0f) & (0x0f << (4 - b)))); > if (i < 0) > return (-1); > dn += i; > } > i = SPRINTF((dn, "/%d]", blen)); > if (i < 0) > return (-1); > dn += i; > > *cpp = cp; > return (dn - beg); >} > >static int >encode_bitsring(const char **bp, const char *end, unsigned char **labelp, > unsigned char ** dst, unsigned const char *eom) >{ > int afterslash = 0; > const char *cp = *bp; > unsigned char *tp; > char c; > const char *beg_blen; > char *end_blen = NULL; > int value = 0, count = 0, tbcount = 0, blen = 0; > > beg_blen = end_blen = NULL; > > /* a bitstring must contain at least 2 characters */ > if (end - cp < 2) > return (EINVAL); > > /* XXX: currently, only hex strings are supported */ > if (*cp++ != 'x') > return (EINVAL); > if (!isxdigit((*cp) & 0xff)) /*%< reject '\[x/BLEN]' */ > return (EINVAL); > > for (tp = *dst + 1; cp < end && tp < eom; cp++) { > switch((c = *cp)) { > case ']': /*%< end of the bitstring */ > if (afterslash) { > if (beg_blen == NULL) > return (EINVAL); > blen = (int)strtol(beg_blen, &end_blen, 10); > if (*end_blen != ']') > return (EINVAL); > } > if (count) > *tp++ = ((value << 4) & 0xff); > cp++; /*%< skip ']' */ > goto done; > case '/': > afterslash = 1; > break; > default: > if (afterslash) { > if (!isdigit(c&0xff)) > return (EINVAL); > if (beg_blen == NULL) { > > if (c == '0') { > /* blen never begings with 0 */ > return (EINVAL); > } > beg_blen = cp; > } > } else { > if (!isxdigit(c&0xff)) > return (EINVAL); > value <<= 4; > value += digitvalue[(int)c]; > count += 4; > tbcount += 4; > if (tbcount > 256) > return (EINVAL); > if (count == 8) { > *tp++ = value; > count = 0; > } > } > break; > } > } > done: > if (cp >= end || tp >= eom) > return (EMSGSIZE); > > /* > * bit length validation: > * If a <length> is present, the number of digits in the <bit-data> > * MUST be just sufficient to contain the number of bits specified > * by the <length>. If there are insignificant bits in a final > * hexadecimal or octal digit, they MUST be zero. > * RFC2673, Section 3.2. > */ > if (blen > 0) { > int traillen; > > if (((blen + 3) & ~3) != tbcount) > return (EINVAL); > traillen = tbcount - blen; /*%< between 0 and 3 */ > if (((value << (8 - traillen)) & 0xff) != 0) > return (EINVAL); > } > else > blen = tbcount; > if (blen == 256) > blen = 0; > > /* encode the type and the significant bit fields */ > **labelp = DNS_LABELTYPE_BITSTRING; > **dst = blen; > > *bp = cp; > *dst = tp; > > return (0); >} > >static int >labellen(const u_char *lp) >{ > int bitlen; > u_char l = *lp; > > if ((l & NS_CMPRSFLGS) == NS_CMPRSFLGS) { > /* should be avoided by the caller */ > return (-1); > } > > if ((l & NS_CMPRSFLGS) == NS_TYPE_ELT) { > if (l == DNS_LABELTYPE_BITSTRING) { > if ((bitlen = *(lp + 1)) == 0) > bitlen = 256; > return ((bitlen + 7 ) / 8 + 1); > } > return (-1); /*%< unknwon ELT */ > } > return (l); >} > >/*! \file */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 211563
:
173257
| 173258 |
173259
|
177450