diff --git a/.gitignore b/.gitignore
index c9ffe48..3b37c71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
/Default/
t
t.c
-*.o
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 5fd04a6..200d3ff 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,11 @@
-
+<<<<<<< HEAD
+
+=======
+
+>>>>>>> branch 'master' of http://Git.BrainChurts.com:8080/git/MrOlsen/UbixOS.git
diff --git a/Makefile b/Makefile
index cc37119..db57540 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,7 @@
-# The System Makefile (C) 2002, 2017 The UbixOS Project
+all: universe
-.if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == ""
-.MAKEFLAGS: -m ${.CURDIR}/share/mk
-.endif
+universe:
+ (cd src; make all)
-.include
-
-_SUBDIR=lib bin sys
-
-.for dir in ${_SUBDIR}
-.if (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile))
-SUBDIR+= ${dir}
-.endif
-.endfor
-
-.include
-.include
-.include
+clean:
+ (cd src;make clean)
\ No newline at end of file
diff --git a/Makefile.incl b/Makefile.incl
deleted file mode 100644
index f0a9e86..0000000
--- a/Makefile.incl
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Id: Makefile.inc 89 2016-01-12 00:20:40Z reddawg $
-# Global 'Source' Options
-
-# allow you to change your default compiler without affecting your other work
-#MrOlsen (2016-01-10) NOTE: I pass all this now
-#CFLAGS = -m32
-#CC = cc
-#CXX = c++
-#LD = ld
-#AR = ar
-
-#Glogal Override And Defs
-_ARCH?=${MACHINE_ARCH}
-
-_ARCH=i386
-
-REMOVE = rm -rf
-
-#FD_DEVICE = /dev/md0
diff --git a/build.sh b/build.sh
deleted file mode 100644
index f75c272..0000000
--- a/build.sh
+++ /dev/null
@@ -1,2321 +0,0 @@
-#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.308 2015/06/27 06:00:28 matt Exp $
-#
-# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Todd Vierling and Luke Mewburn.
-#
-# 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
-#
-#
-# Top level build wrapper, to build or cross-build NetBSD.
-#
-
-#
-# {{{ Begin shell feature tests.
-#
-# We try to determine whether or not this script is being run under
-# a shell that supports the features that we use. If not, we try to
-# re-exec the script under another shell. If we can't find another
-# suitable shell, then we print a message and exit.
-#
-
-errmsg='' # error message, if not empty
-shelltest=false # if true, exit after testing the shell
-re_exec_allowed=true # if true, we may exec under another shell
-
-# Parse special command line options in $1. These special options are
-# for internal use only, are not documented, and are not valid anywhere
-# other than $1.
-case "$1" in
-"--shelltest")
- shelltest=true
- re_exec_allowed=false
- shift
- ;;
-"--no-re-exec")
- re_exec_allowed=false
- shift
- ;;
-esac
-
-# Solaris /bin/sh, and other SVR4 shells, do not support "!".
-# This is the first feature that we test, because subsequent
-# tests use "!".
-#
-if test -z "$errmsg"; then
- if ( eval '! false' ) >/dev/null 2>&1 ; then
- :
- else
- errmsg='Shell does not support "!".'
- fi
-fi
-
-# Does the shell support functions?
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'somefunction() { : ; }'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support functions.'
- fi
-fi
-
-# Does the shell support the "local" keyword for variables in functions?
-#
-# Local variables are not required by SUSv3, but some scripts run during
-# the NetBSD build use them.
-#
-# ksh93 fails this test; it uses an incompatible syntax involving the
-# keywords 'function' and 'typeset'.
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'f() { local v=2; }; v=1; f && test x"$v" = x"1"'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support the "local" keyword in functions.'
- fi
-fi
-
-# Does the shell support ${var%suffix}, ${var#prefix}, and their variants?
-#
-# We don't bother testing for ${var+value}, ${var-value}, or their variants,
-# since shells without those are sure to fail other tests too.
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'var=a/b/c ;
- test x"${var#*/};${var##*/};${var%/*};${var%%/*}" = \
- x"b/c;c;a/b;a" ;'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support "${var%suffix}" or "${var#prefix}".'
- fi
-fi
-
-# Does the shell support IFS?
-#
-# zsh in normal mode (as opposed to "emulate sh" mode) fails this test.
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'IFS=: ; v=":a b::c" ; set -- $v ; IFS=+ ;
- test x"$#;$1,$2,$3,$4;$*" = x"4;,a b,,c;+a b++c"'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support IFS word splitting.'
- fi
-fi
-
-# Does the shell support ${1+"$@"}?
-#
-# Some versions of zsh fail this test, even in "emulate sh" mode.
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'set -- "a a a" "b b b"; set -- ${1+"$@"};
- test x"$#;$1;$2" = x"2;a a a;b b b";'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support ${1+"$@"}.'
- fi
-fi
-
-# Does the shell support $(...) command substitution?
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'var=$(echo abc); test x"$var" = x"abc"'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support "$(...)" command substitution.'
- fi
-fi
-
-# Does the shell support $(...) command substitution with
-# unbalanced parentheses?
-#
-# Some shells known to fail this test are: NetBSD /bin/ksh (as of 2009-12),
-# bash-3.1, pdksh-5.2.14, zsh-4.2.7 in "emulate sh" mode.
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'var=$(case x in x) echo abc;; esac); test x"$var" = x"abc"'
- ) >/dev/null 2>&1
- then
- # XXX: This test is ignored because so many shells fail it; instead,
- # the NetBSD build avoids using the problematic construct.
- : ignore 'Shell does not support "$(...)" with unbalanced ")".'
- fi
-fi
-
-# Does the shell support getopts or getopt?
-#
-if test -z "$errmsg"; then
- if ! (
- eval 'type getopts || type getopt'
- ) >/dev/null 2>&1
- then
- errmsg='Shell does not support getopts or getopt.'
- fi
-fi
-
-#
-# If shelltest is true, exit now, reporting whether or not the shell is good.
-#
-if $shelltest; then
- if test -n "$errmsg"; then
- echo >&2 "$0: $errmsg"
- exit 1
- else
- exit 0
- fi
-fi
-
-#
-# If the shell was bad, try to exec a better shell, or report an error.
-#
-# Loops are broken by passing an extra "--no-re-exec" flag to the new
-# instance of this script.
-#
-if test -n "$errmsg"; then
- if $re_exec_allowed; then
- for othershell in \
- "${HOST_SH}" /usr/xpg4/bin/sh ksh ksh88 mksh pdksh dash bash
- # NOTE: some shells known not to work are:
- # any shell using csh syntax;
- # Solaris /bin/sh (missing many modern features);
- # ksh93 (incompatible syntax for local variables);
- # zsh (many differences, unless run in compatibility mode).
- do
- test -n "$othershell" || continue
- if eval 'type "$othershell"' >/dev/null 2>&1 \
- && "$othershell" "$0" --shelltest >/dev/null 2>&1
- then
- cat <&2 < $@" | tee -a "${results}"
-}
-
-statusmsg2()
-{
- local msg
-
- msg="${1}"
- shift
- case "${msg}" in
- ????????????????*) ;;
- ??????????*) msg="${msg} ";;
- ?????*) msg="${msg} ";;
- *) msg="${msg} ";;
- esac
- case "${msg}" in
- ?????????????????????*) ;;
- ????????????????????) msg="${msg} ";;
- ???????????????????) msg="${msg} ";;
- ??????????????????) msg="${msg} ";;
- ?????????????????) msg="${msg} ";;
- ????????????????) msg="${msg} ";;
- esac
- statusmsg "${msg}$*"
-}
-
-warning()
-{
- statusmsg "Warning: $@"
-}
-
-# Find a program in the PATH, and print the result. If not found,
-# print a default. If $2 is defined (even if it is an empty string),
-# then that is the default; otherwise, $1 is used as the default.
-find_in_PATH()
-{
- local prog="$1"
- local result="${2-"$1"}"
- local oldIFS="${IFS}"
- local dir
- IFS=":"
- for dir in ${PATH}; do
- if [ -x "${dir}/${prog}" ]; then
- result="${dir}/${prog}"
- break
- fi
- done
- IFS="${oldIFS}"
- echo "${result}"
-}
-
-# Try to find a working POSIX shell, and set HOST_SH to refer to it.
-# Assumes that uname_s, uname_m, and PWD have been set.
-set_HOST_SH()
-{
- # Even if ${HOST_SH} is already defined, we still do the
- # sanity checks at the end.
-
- # Solaris has /usr/xpg4/bin/sh.
- #
- [ -z "${HOST_SH}" ] && [ x"${uname_s}" = x"SunOS" ] && \
- [ -x /usr/xpg4/bin/sh ] && HOST_SH="/usr/xpg4/bin/sh"
-
- # Try to get the name of the shell that's running this script,
- # by parsing the output from "ps". We assume that, if the host
- # system's ps command supports -o comm at all, it will do so
- # in the usual way: a one-line header followed by a one-line
- # result, possibly including trailing white space. And if the
- # host system's ps command doesn't support -o comm, we assume
- # that we'll get an error message on stderr and nothing on
- # stdout. (We don't try to use ps -o 'comm=' to suppress the
- # header line, because that is less widely supported.)
- #
- # If we get the wrong result here, the user can override it by
- # specifying HOST_SH in the environment.
- #
- [ -z "${HOST_SH}" ] && HOST_SH="$(
- (ps -p $$ -o comm | sed -ne "2s/[ ${tab}]*\$//p") 2>/dev/null )"
-
- # If nothing above worked, use "sh". We will later find the
- # first directory in the PATH that has a "sh" program.
- #
- [ -z "${HOST_SH}" ] && HOST_SH="sh"
-
- # If the result so far is not an absolute path, try to prepend
- # PWD or search the PATH.
- #
- case "${HOST_SH}" in
- /*) :
- ;;
- */*) HOST_SH="${PWD}/${HOST_SH}"
- ;;
- *) HOST_SH="$(find_in_PATH "${HOST_SH}")"
- ;;
- esac
-
- # If we don't have an absolute path by now, bomb.
- #
- case "${HOST_SH}" in
- /*) :
- ;;
- *) bomb "HOST_SH=\"${HOST_SH}\" is not an absolute path."
- ;;
- esac
-
- # If HOST_SH is not executable, bomb.
- #
- [ -x "${HOST_SH}" ] ||
- bomb "HOST_SH=\"${HOST_SH}\" is not executable."
-
- # If HOST_SH fails tests, bomb.
- # ("$0" may be a path that is no longer valid, because we have
- # performed "cd $(dirname $0)", so don't use $0 here.)
- #
- "${HOST_SH}" build.sh --shelltest ||
- bomb "HOST_SH=\"${HOST_SH}\" failed functionality tests."
-}
-
-# initdefaults --
-# Set defaults before parsing command line options.
-#
-initdefaults()
-{
- makeenv=
- makewrapper=
- makewrappermachine=
- runcmd=
- operations=
- removedirs=
-
- [ -d usr.bin/make ] || cd "$(dirname $0)"
- [ -d usr.bin/make ] ||
- bomb "build.sh must be run from the top source level"
- [ -f share/mk/bsd.own.mk ] ||
- bomb "src/share/mk is missing; please re-fetch the source tree"
-
- # Set various environment variables to known defaults,
- # to minimize (cross-)build problems observed "in the field".
- #
- # LC_ALL=C must be set before we try to parse the output from
- # any command. Other variables are set (or unset) here, before
- # we parse command line arguments.
- #
- # These variables can be overridden via "-V var=value" if
- # you know what you are doing.
- #
- unsetmakeenv INFODIR
- unsetmakeenv LESSCHARSET
- unsetmakeenv MAKEFLAGS
- unsetmakeenv TERMINFO
- setmakeenv LC_ALL C
-
- # Find information about the build platform. This should be
- # kept in sync with _HOST_OSNAME, _HOST_OSREL, and _HOST_ARCH
- # variables in share/mk/bsd.sys.mk.
- #
- # Note that "uname -p" is not part of POSIX, but we want uname_p
- # to be set to the host MACHINE_ARCH, if possible. On systems
- # where "uname -p" fails, prints "unknown", or prints a string
- # that does not look like an identifier, fall back to using the
- # output from "uname -m" instead.
- #
- uname_s=$(uname -s 2>/dev/null)
- uname_r=$(uname -r 2>/dev/null)
- uname_m=$(uname -m 2>/dev/null)
- uname_p=$(uname -p 2>/dev/null || echo "unknown")
- case "${uname_p}" in
- ''|unknown|*[^-_A-Za-z0-9]*) uname_p="${uname_m}" ;;
- esac
-
- id_u=$(id -u 2>/dev/null || /usr/xpg4/bin/id -u 2>/dev/null)
-
- # If $PWD is a valid name of the current directory, POSIX mandates
- # that pwd return it by default which causes problems in the
- # presence of symlinks. Unsetting PWD is simpler than changing
- # every occurrence of pwd to use -P.
- #
- # XXX Except that doesn't work on Solaris. Or many Linuces.
- #
- unset PWD
- TOP=$(/bin/pwd -P 2>/dev/null || /bin/pwd 2>/dev/null)
-
- # The user can set HOST_SH in the environment, or we try to
- # guess an appropriate value. Then we set several other
- # variables from HOST_SH.
- #
- set_HOST_SH
- setmakeenv HOST_SH "${HOST_SH}"
- setmakeenv BSHELL "${HOST_SH}"
- setmakeenv CONFIG_SHELL "${HOST_SH}"
-
- # Set defaults.
- #
- toolprefix=nb
-
- # Some systems have a small ARG_MAX. -X prevents make(1) from
- # exporting variables in the environment redundantly.
- #
- case "${uname_s}" in
- Darwin | FreeBSD | CYGWIN*)
- MAKEFLAGS="-X ${MAKEFLAGS}"
- ;;
- esac
-
- # do_{operation}=true if given operation is requested.
- #
- do_expertmode=false
- do_rebuildmake=false
- do_removedirs=false
- do_tools=false
- do_cleandir=false
- do_obj=false
- do_build=false
- do_distribution=false
- do_release=false
- do_kernel=false
- do_releasekernel=false
- do_kernels=false
- do_modules=false
- do_installmodules=false
- do_install=false
- do_sets=false
- do_sourcesets=false
- do_syspkgs=false
- do_iso_image=false
- do_iso_image_source=false
- do_live_image=false
- do_install_image=false
- do_disk_image=false
- do_show_params=false
- do_rump=false
-
- # done_{operation}=true if given operation has been done.
- #
- done_rebuildmake=false
-
- # Create scratch directory
- #
- tmpdir="${TMPDIR-/tmp}/nbbuild$$"
- mkdir "${tmpdir}" || bomb "Cannot mkdir: ${tmpdir}"
- trap "cd /; rm -r -f \"${tmpdir}\"" 0
- results="${tmpdir}/build.sh.results"
-
- # Set source directories
- #
- setmakeenv NETBSDSRCDIR "${TOP}"
-
- # Make sure KERNOBJDIR is an absolute path if defined
- #
- case "${KERNOBJDIR}" in
- ''|/*) ;;
- *) KERNOBJDIR="${TOP}/${KERNOBJDIR}"
- setmakeenv KERNOBJDIR "${KERNOBJDIR}"
- ;;
- esac
-
- # Find the version of NetBSD
- #
- DISTRIBVER="$(${HOST_SH} ${TOP}/sys/conf/osrelease.sh)"
-
- # Set the BUILDSEED to NetBSD-"N"
- #
- setmakeenv BUILDSEED "MINIX-$(${HOST_SH} ${TOP}/sys/conf/osrelease.sh -m)"
-
- # Set MKARZERO to "yes"
- #
- setmakeenv MKARZERO "yes"
-
-}
-
-# valid_MACHINE_ARCH -- A multi-line string, listing all valid
-# MACHINE/MACHINE_ARCH pairs.
-#
-# Each line contains a MACHINE and MACHINE_ARCH value, an optional ALIAS
-# which may be used to refer to the MACHINE/MACHINE_ARCH pair, and an
-# optional DEFAULT or NO_DEFAULT keyword.
-#
-# When a MACHINE corresponds to multiple possible values of
-# MACHINE_ARCH, then this table should list all allowed combinations.
-# If the MACHINE is associated with a default MACHINE_ARCH (to be
-# used when the user specifies the MACHINE but fails to specify the
-# MACHINE_ARCH), then one of the lines should have the "DEFAULT"
-# keyword. If there is no default MACHINE_ARCH for a particular
-# MACHINE, then there should be a line with the "NO_DEFAULT" keyword,
-# and with a blank MACHINE_ARCH.
-#
-valid_MACHINE_ARCH='
-MACHINE=acorn26 MACHINE_ARCH=arm
-MACHINE=acorn32 MACHINE_ARCH=arm
-MACHINE=algor MACHINE_ARCH=mips64el ALIAS=algor64
-MACHINE=algor MACHINE_ARCH=mipsel DEFAULT
-MACHINE=alpha MACHINE_ARCH=alpha
-MACHINE=amd64 MACHINE_ARCH=x86_64
-MACHINE=amiga MACHINE_ARCH=m68k
-MACHINE=amigappc MACHINE_ARCH=powerpc
-MACHINE=arc MACHINE_ARCH=mips64el ALIAS=arc64
-MACHINE=arc MACHINE_ARCH=mipsel DEFAULT
-MACHINE=atari MACHINE_ARCH=m68k
-MACHINE=bebox MACHINE_ARCH=powerpc
-MACHINE=cats MACHINE_ARCH=arm ALIAS=ocats
-MACHINE=cats MACHINE_ARCH=earmv4 ALIAS=ecats DEFAULT
-MACHINE=cesfic MACHINE_ARCH=m68k
-MACHINE=cobalt MACHINE_ARCH=mips64el ALIAS=cobalt64
-MACHINE=cobalt MACHINE_ARCH=mipsel DEFAULT
-MACHINE=dreamcast MACHINE_ARCH=sh3el
-MACHINE=emips MACHINE_ARCH=mipseb
-MACHINE=epoc32 MACHINE_ARCH=arm
-MACHINE=evbarm MACHINE_ARCH=arm ALIAS=evboarm-el
-MACHINE=evbarm MACHINE_ARCH=armeb ALIAS=evboarm-eb
-MACHINE=evbarm MACHINE_ARCH=earm ALIAS=evbearm-el DEFAULT
-MACHINE=evbarm MACHINE_ARCH=earmeb ALIAS=evbearm-eb
-MACHINE=evbarm MACHINE_ARCH=earmhf ALIAS=evbearmhf-el
-MACHINE=evbarm MACHINE_ARCH=earmhfeb ALIAS=evbearmhf-eb
-MACHINE=evbarm MACHINE_ARCH=earmv4 ALIAS=evbearmv4-el
-MACHINE=evbarm MACHINE_ARCH=earmv4eb ALIAS=evbearmv4-eb
-MACHINE=evbarm MACHINE_ARCH=earmv5 ALIAS=evbearmv5-el
-MACHINE=evbarm MACHINE_ARCH=earmv5eb ALIAS=evbearmv5-eb
-MACHINE=evbarm MACHINE_ARCH=earmv6 ALIAS=evbearmv6-el
-MACHINE=evbarm MACHINE_ARCH=earmv6hf ALIAS=evbearmv6hf-el
-MACHINE=evbarm MACHINE_ARCH=earmv6eb ALIAS=evbearmv6-eb
-MACHINE=evbarm MACHINE_ARCH=earmv6hfeb ALIAS=evbearmv6hf-eb
-MACHINE=evbarm MACHINE_ARCH=earmv7 ALIAS=evbearmv7-el
-MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb
-MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el
-MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb
-MACHINE=evbarm64 MACHINE_ARCH=aarch64 ALIAS=evbarm64-el DEFAULT
-MACHINE=evbarm64 MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb
-MACHINE=evbcf MACHINE_ARCH=coldfire
-MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT
-MACHINE=evbmips MACHINE_ARCH=mips64eb ALIAS=evbmips64-eb
-MACHINE=evbmips MACHINE_ARCH=mips64el ALIAS=evbmips64-el
-MACHINE=evbmips MACHINE_ARCH=mipseb ALIAS=evbmips-eb
-MACHINE=evbmips MACHINE_ARCH=mipsel ALIAS=evbmips-el
-MACHINE=evbppc MACHINE_ARCH=powerpc DEFAULT
-MACHINE=evbppc MACHINE_ARCH=powerpc64 ALIAS=evbppc64
-MACHINE=evbsh3 MACHINE_ARCH= NO_DEFAULT
-MACHINE=evbsh3 MACHINE_ARCH=sh3eb ALIAS=evbsh3-eb
-MACHINE=evbsh3 MACHINE_ARCH=sh3el ALIAS=evbsh3-el
-MACHINE=ews4800mips MACHINE_ARCH=mipseb
-MACHINE=hp300 MACHINE_ARCH=m68k
-MACHINE=hppa MACHINE_ARCH=hppa
-MACHINE=hpcarm MACHINE_ARCH=arm ALIAS=hpcoarm
-MACHINE=hpcarm MACHINE_ARCH=earmv4 ALIAS=hpcearm DEFAULT
-MACHINE=hpcmips MACHINE_ARCH=mipsel
-MACHINE=hpcsh MACHINE_ARCH=sh3el
-MACHINE=i386 MACHINE_ARCH=i386
-MACHINE=ia64 MACHINE_ARCH=ia64
-MACHINE=ibmnws MACHINE_ARCH=powerpc
-MACHINE=iyonix MACHINE_ARCH=arm ALIAS=oiyonix
-MACHINE=iyonix MACHINE_ARCH=earm ALIAS=eiyonix DEFAULT
-MACHINE=landisk MACHINE_ARCH=sh3el
-MACHINE=luna68k MACHINE_ARCH=m68k
-MACHINE=mac68k MACHINE_ARCH=m68k
-MACHINE=macppc MACHINE_ARCH=powerpc DEFAULT
-MACHINE=macppc MACHINE_ARCH=powerpc64 ALIAS=macppc64
-MACHINE=mipsco MACHINE_ARCH=mipseb
-MACHINE=mmeye MACHINE_ARCH=sh3eb
-MACHINE=mvme68k MACHINE_ARCH=m68k
-MACHINE=mvmeppc MACHINE_ARCH=powerpc
-MACHINE=netwinder MACHINE_ARCH=arm ALIAS=onetwinder
-MACHINE=netwinder MACHINE_ARCH=earmv4 ALIAS=enetwinder DEFAULT
-MACHINE=news68k MACHINE_ARCH=m68k
-MACHINE=newsmips MACHINE_ARCH=mipseb
-MACHINE=next68k MACHINE_ARCH=m68k
-MACHINE=ofppc MACHINE_ARCH=powerpc DEFAULT
-MACHINE=ofppc MACHINE_ARCH=powerpc64 ALIAS=ofppc64
-MACHINE=or1k MACHINE_ARCH=or1k
-MACHINE=playstation2 MACHINE_ARCH=mipsel
-MACHINE=pmax MACHINE_ARCH=mips64el ALIAS=pmax64
-MACHINE=pmax MACHINE_ARCH=mipsel DEFAULT
-MACHINE=prep MACHINE_ARCH=powerpc
-MACHINE=riscv MACHINE_ARCH=riscv64 ALIAS=riscv64 DEFAULT
-MACHINE=riscv MACHINE_ARCH=riscv32 ALIAS=riscv32
-MACHINE=rs6000 MACHINE_ARCH=powerpc
-MACHINE=sandpoint MACHINE_ARCH=powerpc
-MACHINE=sbmips MACHINE_ARCH= NO_DEFAULT
-MACHINE=sbmips MACHINE_ARCH=mips64eb ALIAS=sbmips64-eb
-MACHINE=sbmips MACHINE_ARCH=mips64el ALIAS=sbmips64-el
-MACHINE=sbmips MACHINE_ARCH=mipseb ALIAS=sbmips-eb
-MACHINE=sbmips MACHINE_ARCH=mipsel ALIAS=sbmips-el
-MACHINE=sgimips MACHINE_ARCH=mips64eb ALIAS=sgimips64
-MACHINE=sgimips MACHINE_ARCH=mipseb DEFAULT
-MACHINE=shark MACHINE_ARCH=arm ALIAS=oshark
-MACHINE=shark MACHINE_ARCH=earmv4 ALIAS=eshark DEFAULT
-MACHINE=sparc MACHINE_ARCH=sparc
-MACHINE=sparc64 MACHINE_ARCH=sparc64
-MACHINE=sun2 MACHINE_ARCH=m68000
-MACHINE=sun3 MACHINE_ARCH=m68k
-MACHINE=vax MACHINE_ARCH=vax
-MACHINE=x68k MACHINE_ARCH=m68k
-MACHINE=zaurus MACHINE_ARCH=arm ALIAS=ozaurus
-MACHINE=zaurus MACHINE_ARCH=earm ALIAS=ezaurus DEFAULT
-'
-
-# getarch -- find the default MACHINE_ARCH for a MACHINE,
-# or convert an alias to a MACHINE/MACHINE_ARCH pair.
-#
-# Saves the original value of MACHINE in makewrappermachine before
-# alias processing.
-#
-# Sets MACHINE and MACHINE_ARCH if the input MACHINE value is
-# recognised as an alias, or recognised as a machine that has a default
-# MACHINE_ARCH (or that has only one possible MACHINE_ARCH).
-#
-# Leaves MACHINE and MACHINE_ARCH unchanged if MACHINE is recognised
-# as being associated with multiple MACHINE_ARCH values with no default.
-#
-# Bombs if MACHINE is not recognised.
-#
-getarch()
-{
- local IFS
- local found=""
- local line
-
- IFS="${nl}"
- makewrappermachine="${MACHINE}"
- for line in ${valid_MACHINE_ARCH}; do
- line="${line%%#*}" # ignore comments
- line="$( IFS=" ${tab}" ; echo $line )" # normalise white space
- case "${line} " in
- " ")
- # skip blank lines or comment lines
- continue
- ;;
- *" ALIAS=${MACHINE} "*)
- # Found a line with a matching ALIAS=.
- found="$line"
- break
- ;;
- "MACHINE=${MACHINE} "*" NO_DEFAULT"*)
- # Found an explicit "NO_DEFAULT" for this MACHINE.
- found="$line"
- break
- ;;
- "MACHINE=${MACHINE} "*" DEFAULT"*)
- # Found an explicit "DEFAULT" for this MACHINE.
- found="$line"
- break
- ;;
- "MACHINE=${MACHINE} "*)
- # Found a line for this MACHINE. If it's the
- # first such line, then tentatively accept it.
- # If it's not the first matching line, then
- # remember that there was more than one match.
- case "$found" in
- '') found="$line" ;;
- *) found="MULTIPLE_MATCHES" ;;
- esac
- ;;
- esac
- done
-
- case "$found" in
- *NO_DEFAULT*|*MULTIPLE_MATCHES*)
- # MACHINE is OK, but MACHINE_ARCH is still unknown
- return
- ;;
- "MACHINE="*" MACHINE_ARCH="*)
- # Obey the MACHINE= and MACHINE_ARCH= parts of the line.
- IFS=" "
- for frag in ${found}; do
- case "$frag" in
- MACHINE=*|MACHINE_ARCH=*)
- eval "$frag"
- ;;
- esac
- done
- ;;
- *)
- bomb "Unknown target MACHINE: ${MACHINE}"
- ;;
- esac
-}
-
-# validatearch -- check that the MACHINE/MACHINE_ARCH pair is supported.
-#
-# Bombs if the pair is not supported.
-#
-validatearch()
-{
- local IFS
- local line
- local foundpair=false foundmachine=false foundarch=false
-
- case "${MACHINE_ARCH}" in
- "")
- bomb "No MACHINE_ARCH provided"
- ;;
- esac
-
- IFS="${nl}"
- for line in ${valid_MACHINE_ARCH}; do
- line="${line%%#*}" # ignore comments
- line="$( IFS=" ${tab}" ; echo $line )" # normalise white space
- case "${line} " in
- " ")
- # skip blank lines or comment lines
- continue
- ;;
- "MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} "*)
- foundpair=true
- ;;
- "MACHINE=${MACHINE} "*)
- foundmachine=true
- ;;
- *"MACHINE_ARCH=${MACHINE_ARCH} "*)
- foundarch=true
- ;;
- esac
- done
-
- case "${foundpair}:${foundmachine}:${foundarch}" in
- true:*)
- : OK
- ;;
- *:false:*)
- bomb "Unknown target MACHINE: ${MACHINE}"
- ;;
- *:*:false)
- bomb "Unknown target MACHINE_ARCH: ${MACHINE_ARCH}"
- ;;
- *)
- bomb "MACHINE_ARCH '${MACHINE_ARCH}' does not support MACHINE '${MACHINE}'"
- ;;
- esac
-}
-
-# listarch -- list valid MACHINE/MACHINE_ARCH/ALIAS values,
-# optionally restricted to those where the MACHINE and/or MACHINE_ARCH
-# match specifed glob patterns.
-#
-listarch()
-{
- local machglob="$1" archglob="$2"
- local IFS
- local wildcard="*"
- local line xline frag
- local line_matches_machine line_matches_arch
- local found=false
-
- # Empty machglob or archglob should match anything
- : "${machglob:=${wildcard}}"
- : "${archglob:=${wildcard}}"
-
- IFS="${nl}"
- for line in ${valid_MACHINE_ARCH}; do
- line="${line%%#*}" # ignore comments
- xline="$( IFS=" ${tab}" ; echo $line )" # normalise white space
- [ -z "${xline}" ] && continue # skip blank or comment lines
-
- line_matches_machine=false
- line_matches_arch=false
-
- IFS=" "
- for frag in ${xline}; do
- case "${frag}" in
- MACHINE=${machglob})
- line_matches_machine=true ;;
- ALIAS=${machglob})
- line_matches_machine=true ;;
- MACHINE_ARCH=${archglob})
- line_matches_arch=true ;;
- esac
- done
-
- if $line_matches_machine && $line_matches_arch; then
- found=true
- echo "$line"
- fi
- done
- if ! $found; then
- echo >&2 "No match for" \
- "MACHINE=${machglob} MACHINE_ARCH=${archglob}"
- return 1
- fi
- return 0
-}
-
-# nobomb_getmakevar --
-# Given the name of a make variable in $1, print make's idea of the
-# value of that variable, or return 1 if there's an error.
-#
-nobomb_getmakevar()
-{
- [ -x "${make}" ] || return 1
- "${make}" -m ${TOP}/share/mk -s -B -f- _x_ <
-.include
-EOF
-}
-
-# bomb_getmakevar --
-# Given the name of a make variable in $1, print make's idea of the
-# value of that variable, or bomb if there's an error.
-#
-bomb_getmakevar()
-{
- [ -x "${make}" ] || bomb "bomb_getmakevar $1: ${make} is not executable"
- nobomb_getmakevar "$1" || bomb "bomb_getmakevar $1: ${make} failed"
-}
-
-# getmakevar --
-# Given the name of a make variable in $1, print make's idea of the
-# value of that variable, or print a literal '$' followed by the
-# variable name if ${make} is not executable. This is intended for use in
-# messages that need to be readable even if $make hasn't been built,
-# such as when build.sh is run with the "-n" option.
-#
-getmakevar()
-{
- if [ -x "${make}" ]; then
- bomb_getmakevar "$1"
- else
- echo "\$$1"
- fi
-}
-
-setmakeenv()
-{
- eval "$1='$2'; export $1"
- makeenv="${makeenv} $1"
-}
-
-unsetmakeenv()
-{
- eval "unset $1"
- makeenv="${makeenv} $1"
-}
-
-# Given a variable name in $1, modify the variable in place as follows:
-# For each space-separated word in the variable, call resolvepath.
-resolvepaths()
-{
- local var="$1"
- local val
- eval val=\"\${${var}}\"
- local newval=''
- local word
- for word in ${val}; do
- resolvepath word
- newval="${newval}${newval:+ }${word}"
- done
- eval ${var}=\"\${newval}\"
-}
-
-# Given a variable name in $1, modify the variable in place as follows:
-# Convert possibly-relative path to absolute path by prepending
-# ${TOP} if necessary. Also delete trailing "/", if any.
-resolvepath()
-{
- local var="$1"
- local val
- eval val=\"\${${var}}\"
- case "${val}" in
- /)
- ;;
- /*)
- val="${val%/}"
- ;;
- *)
- val="${TOP}/${val%/}"
- ;;
- esac
- eval ${var}=\"\${val}\"
-}
-
-usage()
-{
- if [ -n "$*" ]; then
- echo ""
- echo "${progname}: $*"
- fi
- cat <<_usage_
-
-Usage: ${progname} [-EhnorUuxy] [-a arch] [-B buildid] [-C cdextras]
- [-D dest] [-j njob] [-M obj] [-m mach] [-N noisy]
- [-O obj] [-R release] [-S seed] [-T tools]
- [-V var=[value]] [-w wrapper] [-X x11src] [-Y extsrcsrc]
- [-Z var]
- operation [...]
-
- Build operations (all imply "obj" and "tools"):
- build Run "make build".
- distribution Run "make distribution" (includes DESTDIR/etc/ files).
- release Run "make release" (includes kernels & distrib media).
-
- Other operations:
- help Show this message and exit.
- makewrapper Create ${toolprefix}make-\${MACHINE} wrapper and ${toolprefix}make.
- Always performed.
- cleandir Run "make cleandir". [Default unless -u is used]
- obj Run "make obj". [Default unless -o is used]
- tools Build and install tools.
- install=idir Run "make installworld" to \`idir' to install all sets
- except \`etc'. Useful after "distribution" or "release"
- kernel=conf Build kernel with config file \`conf'
- kernel.gdb=conf Build kernel (including netbsd.gdb) with config
- file \`conf'
- releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR.
- kernels Build all kernels
- installmodules=idir Run "make installmodules" to \`idir' to install all
- kernel modules.
- modules Build kernel modules.
- rumptest Do a linktest for rump (for developers).
- sets Create binary sets in
- RELEASEDIR/RELEASEMACHINEDIR/binary/sets.
- DESTDIR should be populated beforehand.
- sourcesets Create source sets in RELEASEDIR/source/sets.
- syspkgs Create syspkgs in
- RELEASEDIR/RELEASEMACHINEDIR/binary/syspkgs.
- iso-image Create CD-ROM image in RELEASEDIR/images.
- iso-image-source Create CD-ROM image with source in RELEASEDIR/images.
- live-image Create bootable live image in
- RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage.
- install-image Create bootable installation image in
- RELEASEDIR/RELEASEMACHINEDIR/installation/installimage.
- disk-image=target Create bootable disk image in
- RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/target.img.gz.
- params Display various make(1) parameters.
- list-arch Display a list of valid MACHINE/MACHINE_ARCH values,
- and exit. The list may be narrowed by passing glob
- patterns or exact values in MACHINE or MACHINE_ARCH.
-
- Options:
- -a arch Set MACHINE_ARCH to arch. [Default: deduced from MACHINE]
- -B buildid Set BUILDID to buildid.
- -C cdextras Append cdextras to CDEXTRA variable for inclusion on CD-ROM.
- -D dest Set DESTDIR to dest. [Default: destdir.MACHINE]
- -E Set "expert" mode; disables various safety checks.
- Should not be used without expert knowledge of the build system.
- -h Print this help message.
- -j njob Run up to njob jobs in parallel; see make(1) -j.
- -M obj Set obj root directory to obj; sets MAKEOBJDIRPREFIX.
- Unsets MAKEOBJDIR.
- -m mach Set MACHINE to mach. Some mach values are actually
- aliases that set MACHINE/MACHINE_ARCH pairs.
- [Default: deduced from the host system if the host
- OS is NetBSD]
- -N noisy Set the noisyness (MAKEVERBOSE) level of the build:
- 0 Minimal output ("quiet")
- 1 Describe what is occurring
- 2 Describe what is occurring and echo the actual command
- 3 Ignore the effect of the "@" prefix in make commands
- 4 Trace shell commands using the shell's -x flag
- [Default: 2]
- -n Show commands that would be executed, but do not execute them.
- -O obj Set obj root directory to obj; sets a MAKEOBJDIR pattern.
- Unsets MAKEOBJDIRPREFIX.
- -o Set MKOBJDIRS=no; do not create objdirs at start of build.
- -R release Set RELEASEDIR to release. [Default: releasedir]
- -r Remove contents of TOOLDIR and DESTDIR before building.
- -S seed Set BUILDSEED to seed. [Default: NetBSD-majorversion]
- -T tools Set TOOLDIR to tools. If unset, and TOOLDIR is not set in
- the environment, ${toolprefix}make will be (re)built
- unconditionally.
- -U Set MKUNPRIVED=yes; build without requiring root privileges,
- install from an UNPRIVED build with proper file permissions.
- -u Set MKUPDATE=yes; do not run "make cleandir" first.
- Without this, everything is rebuilt, including the tools.
- -V var=[value] Set variable \`var' to \`value'.
- -w wrapper Create ${toolprefix}make script as wrapper.
- [Default: \${TOOLDIR}/bin/${toolprefix}make-\${MACHINE}]
- -X x11src Set X11SRCDIR to x11src. [Default: /usr/xsrc]
- -x Set MKX11=yes; build X11 from X11SRCDIR
- -Y extsrcsrc Set EXTSRCSRCDIR to extsrcsrc. [Default: /usr/extsrc]
- -y Set MKEXTSRC=yes; build extsrc from EXTSRCSRCDIR
- -Z var Unset ("zap") variable \`var'.
-
-_usage_
- exit 1
-}
-
-parseoptions()
-{
- opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:X:xY:yZ:'
- opt_a=false
- opt_m=false
-
- if type getopts >/dev/null 2>&1; then
- # Use POSIX getopts.
- #
- getoptcmd='getopts ${opts} opt && opt=-${opt}'
- optargcmd=':'
- optremcmd='shift $((${OPTIND} -1))'
- else
- type getopt >/dev/null 2>&1 ||
- bomb "Shell does not support getopts or getopt"
-
- # Use old-style getopt(1) (doesn't handle whitespace in args).
- #
- args="$(getopt ${opts} $*)"
- [ $? = 0 ] || usage
- set -- ${args}
-
- getoptcmd='[ $# -gt 0 ] && opt="$1" && shift'
- optargcmd='OPTARG="$1"; shift'
- optremcmd=':'
- fi
-
- # Parse command line options.
- #
- while eval ${getoptcmd}; do
- case ${opt} in
-
- -a)
- eval ${optargcmd}
- MACHINE_ARCH=${OPTARG}
- opt_a=true
- ;;
-
- -B)
- eval ${optargcmd}
- BUILDID=${OPTARG}
- ;;
-
- -C)
- eval ${optargcmd}; resolvepaths OPTARG
- CDEXTRA="${CDEXTRA}${CDEXTRA:+ }${OPTARG}"
- ;;
-
- -D)
- eval ${optargcmd}; resolvepath OPTARG
- setmakeenv DESTDIR "${OPTARG}"
- ;;
-
- -E)
- do_expertmode=true
- ;;
-
- -j)
- eval ${optargcmd}
- parallel="-j ${OPTARG}"
- ;;
-
- -M)
- eval ${optargcmd}; resolvepath OPTARG
- case "${OPTARG}" in
- \$*) usage "-M argument must not begin with '\$'"
- ;;
- *\$*) # can use resolvepath, but can't set TOP_objdir
- resolvepath OPTARG
- ;;
- *) resolvepath OPTARG
- TOP_objdir="${OPTARG}${TOP}"
- ;;
- esac
- unsetmakeenv MAKEOBJDIR
- setmakeenv MAKEOBJDIRPREFIX "${OPTARG}"
- ;;
-
- # -m overrides MACHINE_ARCH unless "-a" is specified
- -m)
- eval ${optargcmd}
- MACHINE="${OPTARG}"
- opt_m=true
- ;;
-
- -N)
- eval ${optargcmd}
- case "${OPTARG}" in
- 0|1|2|3|4)
- setmakeenv MAKEVERBOSE "${OPTARG}"
- ;;
- *)
- usage "'${OPTARG}' is not a valid value for -N"
- ;;
- esac
- ;;
-
- -n)
- runcmd=echo
- ;;
-
- -O)
- eval ${optargcmd}
- case "${OPTARG}" in
- *\$*) usage "-O argument must not contain '\$'"
- ;;
- *) resolvepath OPTARG
- TOP_objdir="${OPTARG}"
- ;;
- esac
- unsetmakeenv MAKEOBJDIRPREFIX
- setmakeenv MAKEOBJDIR "\${.CURDIR:C,^$TOP,$OPTARG,}"
- ;;
-
- -o)
- MKOBJDIRS=no
- ;;
-
- -R)
- eval ${optargcmd}; resolvepath OPTARG
- setmakeenv RELEASEDIR "${OPTARG}"
- ;;
-
- -r)
- do_removedirs=true
- do_rebuildmake=true
- ;;
-
- -S)
- eval ${optargcmd}
- setmakeenv BUILDSEED "${OPTARG}"
- ;;
-
- -T)
- eval ${optargcmd}; resolvepath OPTARG
- TOOLDIR="${OPTARG}"
- export TOOLDIR
- ;;
-
- -U)
- setmakeenv MKUNPRIVED yes
- ;;
-
- -u)
- setmakeenv MKUPDATE yes
- ;;
-
- -V)
- eval ${optargcmd}
- case "${OPTARG}" in
- # XXX: consider restricting which variables can be changed?
- [a-zA-Z_][a-zA-Z_0-9]*=*)
- setmakeenv "${OPTARG%%=*}" "${OPTARG#*=}"
- ;;
- *)
- usage "-V argument must be of the form 'var=[value]'"
- ;;
- esac
- ;;
-
- -w)
- eval ${optargcmd}; resolvepath OPTARG
- makewrapper="${OPTARG}"
- ;;
-
- -X)
- eval ${optargcmd}; resolvepath OPTARG
- setmakeenv X11SRCDIR "${OPTARG}"
- ;;
-
- -x)
- setmakeenv MKX11 yes
- ;;
-
- -Y)
- eval ${optargcmd}; resolvepath OPTARG
- setmakeenv EXTSRCSRCDIR "${OPTARG}"
- ;;
-
- -y)
- setmakeenv MKEXTSRC yes
- ;;
-
- -Z)
- eval ${optargcmd}
- # XXX: consider restricting which variables can be unset?
- unsetmakeenv "${OPTARG}"
- ;;
-
- --)
- break
- ;;
-
- -'?'|-h)
- usage
- ;;
-
- esac
- done
-
- # Validate operations.
- #
- eval ${optremcmd}
- while [ $# -gt 0 ]; do
- op=$1; shift
- operations="${operations} ${op}"
-
- case "${op}" in
-
- help)
- usage
- ;;
-
- list-arch)
- listarch "${MACHINE}" "${MACHINE_ARCH}"
- exit $?
- ;;
-
- show-params)
- op=show_params # used as part of a variable name
- ;;
-
- kernel=*|releasekernel=*|kernel.gdb=*)
- arg=${op#*=}
- op=${op%%=*}
- [ -n "${arg}" ] ||
- bomb "Must supply a kernel name with \`${op}=...'"
- ;;
-
- disk-image=*)
- arg=${op#*=}
- op=disk_image
- [ -n "${arg}" ] ||
- bomb "Must supply a target name with \`${op}=...'"
-
- ;;
-
- install=*|installmodules=*)
- arg=${op#*=}
- op=${op%%=*}
- [ -n "${arg}" ] ||
- bomb "Must supply a directory with \`install=...'"
- ;;
-
- build|\
- cleandir|\
- distribution|\
- install-image|\
- iso-image-source|\
- iso-image|\
- kernels|\
- live-image|\
- makewrapper|\
- modules|\
- obj|\
- params|\
- release|\
- rump|\
- rumptest|\
- sets|\
- sourcesets|\
- syspkgs|\
- tools)
- ;;
-
- *)
- usage "Unknown operation \`${op}'"
- ;;
-
- esac
- # ${op} may contain chars that are not allowed in variable
- # names. Replace them with '_' before setting do_${op}.
- op="$( echo "$op" | tr -s '.-' '__')"
- eval do_${op}=true
- done
- [ -n "${operations}" ] || usage "Missing operation to perform."
-
- # Set up MACHINE*. On a NetBSD host, these are allowed to be unset.
- #
- if [ -z "${MACHINE}" ]; then
- [ "${uname_s}" = "Minix" ] ||
- bomb "MACHINE must be set, or -m must be used, for cross builds."
- MACHINE=${uname_m}
- fi
- if $opt_m && ! $opt_a; then
- # Settings implied by the command line -m option
- # override MACHINE_ARCH from the environment (if any).
- getarch
- fi
- [ -n "${MACHINE_ARCH}" ] || getarch
- validatearch
-
- # Set up default make(1) environment.
- #
- makeenv="${makeenv} TOOLDIR MACHINE MACHINE_ARCH MAKEFLAGS"
- [ -z "${BUILDID}" ] || makeenv="${makeenv} BUILDID"
- [ -z "${BUILDINFO}" ] || makeenv="${makeenv} BUILDINFO"
- MAKEFLAGS="-de -m ${TOP}/share/mk ${MAKEFLAGS}"
- MAKEFLAGS="${MAKEFLAGS} MKOBJDIRS=${MKOBJDIRS-yes}"
- export MAKEFLAGS MACHINE MACHINE_ARCH
- setmakeenv USETOOLS "yes"
- setmakeenv MAKEWRAPPERMACHINE "${makewrappermachine:-${MACHINE}}"
-}
-
-# sanitycheck --
-# Sanity check after parsing command line options, before rebuildmake.
-#
-sanitycheck()
-{
- # Install as non-root is a bad idea.
- #
- if ${do_install} && [ "$id_u" -ne 0 ] ; then
- if ${do_expertmode}; then
- warning "Will install as an unprivileged user."
- else
- bomb "-E must be set for install as an unprivileged user."
- fi
- fi
-
- # If the PATH contains any non-absolute components (including,
- # but not limited to, "." or ""), then complain. As an exception,
- # allow "" or "." as the last component of the PATH. This is fatal
- # if expert mode is not in effect.
- #
- local path="${PATH}"
- path="${path%:}" # delete trailing ":"
- path="${path%:.}" # delete trailing ":."
- case ":${path}:/" in
- *:[!/]*)
- if ${do_expertmode}; then
- warning "PATH contains non-absolute components"
- else
- bomb "PATH environment variable must not" \
- "contain non-absolute components"
- fi
- ;;
- esac
-}
-
-# print_tooldir_make --
-# Try to find and print a path to an existing
-# ${TOOLDIR}/bin/${toolprefix}make, for use by rebuildmake() before a
-# new version of ${toolprefix}make has been built.
-#
-# * If TOOLDIR was set in the environment or on the command line, use
-# that value.
-# * Otherwise try to guess what TOOLDIR would be if not overridden by
-# /etc/mk.conf, and check whether the resulting directory contains
-# a copy of ${toolprefix}make (this should work for everybody who
-# doesn't override TOOLDIR via /etc/mk.conf);
-# * Failing that, search for ${toolprefix}make, nbmake, bmake, or make,
-# in the PATH (this might accidentally find a version of make that
-# does not understand the syntax used by NetBSD make, and that will
-# lead to failure in the next step);
-# * If a copy of make was found above, try to use it with
-# nobomb_getmakevar to find the correct value for TOOLDIR, and believe the
-# result only if it's a directory that already exists;
-# * If a value of TOOLDIR was found above, and if
-# ${TOOLDIR}/bin/${toolprefix}make exists, print that value.
-#
-print_tooldir_make()
-{
- local possible_TOP_OBJ
- local possible_TOOLDIR
- local possible_make
- local tooldir_make
-
- if [ -n "${TOOLDIR}" ]; then
- echo "${TOOLDIR}/bin/${toolprefix}make"
- return 0
- fi
-
- # Set host_ostype to something like "NetBSD-4.5.6-i386". This
- # is intended to match the HOST_OSTYPE variable in .
- #
- local host_ostype="${uname_s}-$(
- echo "${uname_r}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'
- )-$(
- echo "${uname_p}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'
- )"
-
- # Look in a few potential locations for
- # ${possible_TOOLDIR}/bin/${toolprefix}make.
- # If we find it, then set possible_make.
- #
- # In the usual case (without interference from environment
- # variables or /etc/mk.conf), should set TOOLDIR to
- # "${_SRC_TOP_OBJ_}/tooldir.${host_ostype}".
- #
- # In practice it's difficult to figure out the correct value
- # for _SRC_TOP_OBJ_. In the easiest case, when the -M or -O
- # options were passed to build.sh, then ${TOP_objdir} will be
- # the correct value. We also try a few other possibilities, but
- # we do not replicate all the logic of .
- #
- for possible_TOP_OBJ in \
- "${TOP_objdir}" \
- "${MAKEOBJDIRPREFIX:+${MAKEOBJDIRPREFIX}${TOP}}" \
- "${TOP}" \
- "${TOP}/obj" \
- "${TOP}/obj.${MACHINE}"
- do
- [ -n "${possible_TOP_OBJ}" ] || continue
- possible_TOOLDIR="${possible_TOP_OBJ}/tooldir.${host_ostype}"
- possible_make="${possible_TOOLDIR}/bin/${toolprefix}make"
- if [ -x "${possible_make}" ]; then
- break
- else
- unset possible_make
- fi
- done
-
- # If the above didn't work, search the PATH for a suitable
- # ${toolprefix}make, nbmake, bmake, or make.
- #
- : ${possible_make:=$(find_in_PATH ${toolprefix}make '')}
- : ${possible_make:=$(find_in_PATH nbmake '')}
- : ${possible_make:=$(find_in_PATH bmake '')}
- : ${possible_make:=$(find_in_PATH make '')}
-
- # At this point, we don't care whether possible_make is in the
- # correct TOOLDIR or not; we simply want it to be usable by
- # getmakevar to help us find the correct TOOLDIR.
- #
- # Use ${possible_make} with nobomb_getmakevar to try to find
- # the value of TOOLDIR. Believe the result only if it's
- # a directory that already exists and contains bin/${toolprefix}make.
- #
- if [ -x "${possible_make}" ]; then
- possible_TOOLDIR="$(
- make="${possible_make}" \
- nobomb_getmakevar TOOLDIR 2>/dev/null
- )"
- if [ $? = 0 ] && [ -n "${possible_TOOLDIR}" ] \
- && [ -d "${possible_TOOLDIR}" ];
- then
- tooldir_make="${possible_TOOLDIR}/bin/${toolprefix}make"
- if [ -x "${tooldir_make}" ]; then
- echo "${tooldir_make}"
- return 0
- fi
- fi
- fi
- return 1
-}
-
-# rebuildmake --
-# Rebuild nbmake in a temporary directory if necessary. Sets $make
-# to a path to the nbmake executable. Sets done_rebuildmake=true
-# if nbmake was rebuilt.
-#
-# There is a cyclic dependency between building nbmake and choosing
-# TOOLDIR: TOOLDIR may be affected by settings in /etc/mk.conf, so we
-# would like to use getmakevar to get the value of TOOLDIR; but we can't
-# use getmakevar before we have an up to date version of nbmake; we
-# might already have an up to date version of nbmake in TOOLDIR, but we
-# don't yet know where TOOLDIR is.
-#
-# The default value of TOOLDIR also depends on the location of the top
-# level object directory, so $(getmakevar TOOLDIR) invoked before or
-# after making the top level object directory may produce different
-# results.
-#
-# Strictly speaking, we should do the following:
-#
-# 1. build a new version of nbmake in a temporary directory;
-# 2. use the temporary nbmake to create the top level obj directory;
-# 3. use $(getmakevar TOOLDIR) with the temporary nbmake to
-# get the correct value of TOOLDIR;
-# 4. move the temporary nbmake to ${TOOLDIR}/bin/nbmake.
-#
-# However, people don't like building nbmake unnecessarily if their
-# TOOLDIR has not changed since an earlier build. We try to avoid
-# rebuilding a temporary version of nbmake by taking some shortcuts to
-# guess a value for TOOLDIR, looking for an existing version of nbmake
-# in that TOOLDIR, and checking whether that nbmake is newer than the
-# sources used to build it.
-#
-rebuildmake()
-{
- make="$(print_tooldir_make)"
- if [ -n "${make}" ] && [ -x "${make}" ]; then
- for f in usr.bin/make/*.[ch] usr.bin/make/lst.lib/*.[ch]; do
- if [ "${f}" -nt "${make}" ]; then
- statusmsg "${make} outdated" \
- "(older than ${f}), needs building."
- do_rebuildmake=true
- break
- fi
- done
- else
- statusmsg "No \$TOOLDIR/bin/${toolprefix}make, needs building."
- do_rebuildmake=true
- fi
-
- # Build bootstrap ${toolprefix}make if needed.
- if ${do_rebuildmake}; then
- statusmsg "Bootstrapping ${toolprefix}make"
- ${runcmd} cd "${tmpdir}"
- ${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \
- CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \
- ${HOST_SH} "${TOP}/tools/make/configure" ||
- ( cp ${tmpdir}/config.log ${tmpdir}-config.log
- bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" )
- ${runcmd} ${HOST_SH} buildmake.sh ||
- bomb "Build of ${toolprefix}make failed"
- make="${tmpdir}/${toolprefix}make"
- ${runcmd} cd "${TOP}"
- ${runcmd} rm -f usr.bin/make/*.o usr.bin/make/lst.lib/*.o
- done_rebuildmake=true
- fi
-}
-
-# validatemakeparams --
-# Perform some late sanity checks, after rebuildmake,
-# but before createmakewrapper or any real work.
-#
-# Creates the top-level obj directory, because that
-# is needed by some of the sanity checks.
-#
-# Prints status messages reporting the values of several variables.
-#
-validatemakeparams()
-{
- # MAKECONF (which defaults to /etc/mk.conf in share/mk/bsd.own.mk)
- # can affect many things, so mention it in an early status message.
- #
- MAKECONF=$(getmakevar MAKECONF)
- if [ -e "${MAKECONF}" ]; then
- statusmsg2 "MAKECONF file:" "${MAKECONF}"
- else
- statusmsg2 "MAKECONF file:" "${MAKECONF} (File not found)"
- fi
-
- # Normalise MKOBJDIRS, MKUNPRIVED, and MKUPDATE.
- # These may be set as build.sh options or in "mk.conf".
- # Don't export them as they're only used for tests in build.sh.
- #
- MKOBJDIRS=$(getmakevar MKOBJDIRS)
- MKUNPRIVED=$(getmakevar MKUNPRIVED)
- MKUPDATE=$(getmakevar MKUPDATE)
-
- # Non-root should always use either the -U or -E flag.
- #
- if ! ${do_expertmode} && \
- [ "$id_u" -ne 0 ] && \
- [ "${MKUNPRIVED}" = "no" ] ; then
- bomb "-U or -E must be set for build as an unprivileged user."
- fi
-
- if [ "${runcmd}" = "echo" ]; then
- TOOLCHAIN_MISSING=no
- EXTERNAL_TOOLCHAIN=""
- else
- TOOLCHAIN_MISSING=$(bomb_getmakevar TOOLCHAIN_MISSING)
- EXTERNAL_TOOLCHAIN=$(bomb_getmakevar EXTERNAL_TOOLCHAIN)
- fi
- if [ "${TOOLCHAIN_MISSING}" = "yes" ] && \
- [ -z "${EXTERNAL_TOOLCHAIN}" ]; then
- ${runcmd} echo "ERROR: build.sh (in-tree cross-toolchain) is not yet available for"
- ${runcmd} echo " MACHINE: ${MACHINE}"
- ${runcmd} echo " MACHINE_ARCH: ${MACHINE_ARCH}"
- ${runcmd} echo ""
- ${runcmd} echo "All builds for this platform should be done via a traditional make"
- ${runcmd} echo "If you wish to use an external cross-toolchain, set"
- ${runcmd} echo " EXTERNAL_TOOLCHAIN="
- ${runcmd} echo "in either the environment or mk.conf and rerun"
- ${runcmd} echo " ${progname} $*"
- exit 1
- fi
-
- if [ "${MKOBJDIRS}" != "no" ]; then
- # Create the top-level object directory.
- #
- # "make obj NOSUBDIR=" can handle most cases, but it
- # can't handle the case where MAKEOBJDIRPREFIX is set
- # while the corresponding directory does not exist
- # (rules in would abort the build). We
- # therefore have to handle the MAKEOBJDIRPREFIX case
- # without invoking "make obj". The MAKEOBJDIR case
- # could be handled either way, but we choose to handle
- # it similarly to MAKEOBJDIRPREFIX.
- #
- if [ -n "${TOP_obj}" ]; then
- # It must have been set by the "-M" or "-O"
- # command line options, so there's no need to
- # use getmakevar
- :
- elif [ -n "$MAKEOBJDIRPREFIX" ]; then
- TOP_obj="$(getmakevar MAKEOBJDIRPREFIX)${TOP}"
- elif [ -n "$MAKEOBJDIR" ]; then
- TOP_obj="$(getmakevar MAKEOBJDIR)"
- fi
- if [ -n "$TOP_obj" ]; then
- ${runcmd} mkdir -p "${TOP_obj}" ||
- bomb "Can't create top level object directory" \
- "${TOP_obj}"
- else
- ${runcmd} "${make}" -m ${TOP}/share/mk obj NOSUBDIR= ||
- bomb "Can't create top level object directory" \
- "using make obj"
- fi
-
- # make obj in tools to ensure that the objdir for "tools"
- # is available.
- #
- ${runcmd} cd tools
- ${runcmd} "${make}" -m ${TOP}/share/mk obj NOSUBDIR= ||
- bomb "Failed to make obj in tools"
- ${runcmd} cd "${TOP}"
- fi
-
- # Find TOOLDIR, DESTDIR, and RELEASEDIR, according to getmakevar,
- # and bomb if they have changed from the values we had from the
- # command line or environment.
- #
- # This must be done after creating the top-level object directory.
- #
- for var in TOOLDIR DESTDIR RELEASEDIR
- do
- eval oldval=\"\$${var}\"
- newval="$(getmakevar $var)"
- if ! $do_expertmode; then
- : ${_SRC_TOP_OBJ_:=$(getmakevar _SRC_TOP_OBJ_)}
- case "$var" in
- DESTDIR)
- : ${newval:=${_SRC_TOP_OBJ_}/destdir.${MACHINE}}
- makeenv="${makeenv} DESTDIR"
- ;;
- RELEASEDIR)
- : ${newval:=${_SRC_TOP_OBJ_}/releasedir}
- makeenv="${makeenv} RELEASEDIR"
- ;;
- esac
- fi
- if [ -n "$oldval" ] && [ "$oldval" != "$newval" ]; then
- bomb "Value of ${var} has changed" \
- "(was \"${oldval}\", now \"${newval}\")"
- fi
- eval ${var}=\"\${newval}\"
- eval export ${var}
- statusmsg2 "${var} path:" "${newval}"
- done
-
- # RELEASEMACHINEDIR is just a subdir name, e.g. "i386".
- RELEASEMACHINEDIR=$(getmakevar RELEASEMACHINEDIR)
-
- # Check validity of TOOLDIR and DESTDIR.
- #
- if [ -z "${TOOLDIR}" ] || [ "${TOOLDIR}" = "/" ]; then
- bomb "TOOLDIR '${TOOLDIR}' invalid"
- fi
- removedirs="${TOOLDIR}"
-
- if [ -z "${DESTDIR}" ] || [ "${DESTDIR}" = "/" ]; then
- if ${do_distribution} || ${do_release} || \
- ( [ "${uname_s}" != "NetBSD" ] && [ "${uname_s}" != "Minix" ] ) || \
- [ "${uname_m}" != "${MACHINE}" ]; then
- bomb "DESTDIR must != / for cross builds, or ${progname} 'distribution' or 'release'."
- fi
- if ! ${do_expertmode}; then
- bomb "DESTDIR must != / for non -E (expert) builds"
- fi
- statusmsg "WARNING: Building to /, in expert mode."
- statusmsg " This may cause your system to break! Reasons include:"
- statusmsg " - your kernel is not up to date"
- statusmsg " - the libraries or toolchain have changed"
- statusmsg " YOU HAVE BEEN WARNED!"
- else
- removedirs="${removedirs} ${DESTDIR}"
- fi
- if ${do_releasekernel} && [ -z "${RELEASEDIR}" ]; then
- bomb "Must set RELEASEDIR with \`releasekernel=...'"
- fi
-
- # If a previous build.sh run used -U (and therefore created a
- # METALOG file), then most subsequent build.sh runs must also
- # use -U. If DESTDIR is about to be removed, then don't perform
- # this check.
- #
- case "${do_removedirs} ${removedirs} " in
- true*" ${DESTDIR} "*)
- # DESTDIR is about to be removed
- ;;
- *)
- if [ -e "${DESTDIR}/METALOG" ] && \
- [ "${MKUNPRIVED}" = "no" ] ; then
- if $do_expertmode; then
- warning "A previous build.sh run specified -U."
- else
- bomb "A previous build.sh run specified -U; you must specify it again now."
- fi
- fi
- ;;
- esac
-
- # live-image and install-image targets require binary sets
- # (actually DESTDIR/etc/mtree/set.* files) built with MKUNPRIVED.
- # If release operation is specified with live-image or install-image,
- # the release op should be performed with -U for later image ops.
- #
- if ${do_release} && ( ${do_live_image} || ${do_install_image} ) && \
- [ "${MKUNPRIVED}" = "no" ] ; then
- bomb "-U must be specified on building release to create images later."
- fi
-}
-
-
-createmakewrapper()
-{
- # Remove the target directories.
- #
- if ${do_removedirs}; then
- for f in ${removedirs}; do
- statusmsg "Removing ${f}"
- ${runcmd} rm -r -f "${f}"
- done
- fi
-
- # Recreate $TOOLDIR.
- #
- ${runcmd} mkdir -p "${TOOLDIR}/bin" ||
- bomb "mkdir of '${TOOLDIR}/bin' failed"
-
- # If we did not previously rebuild ${toolprefix}make, then
- # check whether $make is still valid and the same as the output
- # from print_tooldir_make. If not, then rebuild make now. A
- # possible reason for this being necessary is that the actual
- # value of TOOLDIR might be different from the value guessed
- # before the top level obj dir was created.
- #
- if ! ${done_rebuildmake} && \
- ( [ ! -x "$make" ] || [ "$make" != "$(print_tooldir_make)" ] )
- then
- rebuildmake
- fi
-
- # Install ${toolprefix}make if it was built.
- #
- if ${done_rebuildmake}; then
- ${runcmd} rm -f "${TOOLDIR}/bin/${toolprefix}make"
- ${runcmd} cp "${make}" "${TOOLDIR}/bin/${toolprefix}make" ||
- bomb "Failed to install \$TOOLDIR/bin/${toolprefix}make"
- make="${TOOLDIR}/bin/${toolprefix}make"
- statusmsg "Created ${make}"
- fi
-
- # Build a ${toolprefix}make wrapper script, usable by hand as
- # well as by build.sh.
- #
- if [ -z "${makewrapper}" ]; then
- makewrapper="${TOOLDIR}/bin/${toolprefix}make-${makewrappermachine:-${MACHINE}}"
- [ -z "${BUILDID}" ] || makewrapper="${makewrapper}-${BUILDID}"
- fi
-
- ${runcmd} rm -f "${makewrapper}"
- if [ "${runcmd}" = "echo" ]; then
- echo 'cat <'${makewrapper}
- makewrapout=
- else
- makewrapout=">>\${makewrapper}"
- fi
-
- case "${KSH_VERSION:-${SH_VERSION}}" in
- *PD\ KSH*|*MIRBSD\ KSH*)
- set +o braceexpand
- ;;
- esac
-
- eval cat < ${releasekern}"
- else
- gzip -c -9 < "${builtkern}" > "${releasekern}"
- fi
- done
-}
-
-buildkernels()
-{
- allkernels=$( runcmd= make_in_dir etc '-V ${ALL_KERNELS}' )
- for k in $allkernels; do
- buildkernel "${k}"
- done
-}
-
-buildmodules()
-{
- setmakeenv MKBINUTILS no
- if ! ${do_tools} && ! ${buildmoduleswarned:-false}; then
- # Building tools every time we build modules is clearly
- # unnecessary as well as a kernel.
- #
- statusmsg "Building modules without building new tools"
- buildmoduleswarned=true
- fi
-
- statusmsg "Building kernel modules for NetBSD/${MACHINE} ${DISTRIBVER}"
- if [ "${MKOBJDIRS}" != "no" ]; then
- make_in_dir sys/modules obj
- fi
- if [ "${MKUPDATE}" = "no" ]; then
- make_in_dir sys/modules cleandir
- fi
- make_in_dir sys/modules dependall
- make_in_dir sys/modules install
-
- statusmsg "Successful build of kernel modules for NetBSD/${MACHINE} ${DISTRIBVER}"
-}
-
-installmodules()
-{
- dir="$1"
- ${runcmd} "${makewrapper}" INSTALLMODULESDIR="${dir}" installmodules ||
- bomb "Failed to make installmodules to ${dir}"
- statusmsg "Successful installmodules to ${dir}"
-}
-
-installworld()
-{
- dir="$1"
- ${runcmd} "${makewrapper}" INSTALLWORLDDIR="${dir}" installworld ||
- bomb "Failed to make installworld to ${dir}"
- statusmsg "Successful installworld to ${dir}"
-}
-
-# Run rump build&link tests.
-#
-# To make this feasible for running without having to install includes and
-# libraries into destdir (i.e. quick), we only run ld. This is possible
-# since the rump kernel is a closed namespace apart from calls to rumpuser.
-# Therefore, if ld complains only about rumpuser symbols, rump kernel
-# linking was successful.
-#
-# We test that rump links with a number of component configurations.
-# These attempt to mimic what is encountered in the full build.
-# See list below. The list should probably be either autogenerated
-# or managed elsewhere; keep it here until a better idea arises.
-#
-# Above all, note that THIS IS NOT A SUBSTITUTE FOR A FULL BUILD.
-#
-
-RUMP_LIBSETS='
- -lrump,
- -lrumpvfs -lrump,
- -lrumpvfs -lrumpdev -lrump,
- -lrumpnet -lrump,
- -lrumpkern_tty -lrumpvfs -lrump,
- -lrumpfs_tmpfs -lrumpvfs -lrump,
- -lrumpfs_ffs -lrumpfs_msdos -lrumpvfs -lrumpdev_disk -lrumpdev -lrump,
- -lrumpnet_virtif -lrumpnet_netinet -lrumpnet_net -lrumpnet -lrump,
- -lrumpnet_sockin -lrumpfs_smbfs -lrumpdev_netsmb
- -lrumpkern_crypto -lrumpdev -lrumpnet -lrumpvfs -lrump,
- -lrumpnet_sockin -lrumpfs_nfs -lrumpnet -lrumpvfs -lrump,
- -lrumpdev_cgd -lrumpdev_raidframe -lrumpdev_disk -lrumpdev_rnd
- -lrumpdev_dm -lrumpdev -lrumpvfs -lrumpkern_crypto -lrump'
-dorump()
-{
- local doclean=""
- local doobjs=""
-
- # we cannot link libs without building csu, and that leads to lossage
- [ "${1}" != "rumptest" ] && bomb 'build.sh rump not yet functional. ' \
- 'did you mean "rumptest"?'
-
- export RUMPKERN_ONLY=1
- # create obj and distrib dirs
- if [ "${MKOBJDIRS}" != "no" ]; then
- make_in_dir "${NETBSDSRCDIR}/etc/mtree" obj
- make_in_dir "${NETBSDSRCDIR}/sys/rump" obj
- fi
- ${runcmd} "${makewrapper}" ${parallel} do-distrib-dirs \
- || bomb 'could not create distrib-dirs'
-
- [ "${MKUPDATE}" = "no" ] && doclean="cleandir"
- targlist="${doclean} ${doobjs} dependall install"
- # optimize: for test we build only static libs (3x test speedup)
- if [ "${1}" = "rumptest" ] ; then
- setmakeenv NOPIC 1
- setmakeenv NOPROFILE 1
- fi
- for cmd in ${targlist} ; do
- make_in_dir "${NETBSDSRCDIR}/sys/rump" ${cmd}
- done
-
- # if we just wanted to build & install rump, we're done
- [ "${1}" != "rumptest" ] && return
-
- ${runcmd} cd "${NETBSDSRCDIR}/sys/rump/librump/rumpkern" \
- || bomb "cd to rumpkern failed"
- md_quirks=`${runcmd} "${makewrapper}" -V '${_SYMQUIRK}'`
- # one little, two little, three little backslashes ...
- md_quirks="$(echo ${md_quirks} | sed 's,\\,\\\\,g'";s/'//g" )"
- ${runcmd} cd "${TOP}" || bomb "cd to ${TOP} failed"
- tool_ld=`${runcmd} "${makewrapper}" -V '${LD}'`
-
- local oIFS="${IFS}"
- IFS=","
- for set in ${RUMP_LIBSETS} ; do
- IFS="${oIFS}"
- ${runcmd} ${tool_ld} -nostdlib -L${DESTDIR}/usr/lib \
- -static --whole-archive ${set} 2>&1 -o /tmp/rumptest.$$ | \
- awk -v quirks="${md_quirks}" '
- /undefined reference/ &&
- !/more undefined references.*follow/{
- if (match($NF,
- "`(rumpuser_|rumpcomp_|__" quirks ")") == 0)
- fails[NR] = $0
- }
- /cannot find -l/{fails[NR] = $0}
- /cannot open output file/{fails[NR] = $0}
- END{
- for (x in fails)
- print fails[x]
- exit x!=0
- }'
- [ $? -ne 0 ] && bomb "Testlink of rump failed: ${set}"
- done
- statusmsg "Rump build&link tests successful"
-}
-
-main()
-{
- initdefaults
- _args=$@
- parseoptions "$@"
-
- sanitycheck
-
- build_start=$(date)
- statusmsg2 "${progname} command:" "$0 $*"
- statusmsg2 "${progname} started:" "${build_start}"
- statusmsg2 "MINIX version:" "${DISTRIBVER}"
- statusmsg2 "MACHINE:" "${MACHINE}"
- statusmsg2 "MACHINE_ARCH:" "${MACHINE_ARCH}"
- statusmsg2 "Build platform:" "${uname_s} ${uname_r} ${uname_m}"
- statusmsg2 "HOST_SH:" "${HOST_SH}"
- if [ -n "${BUILDID}" ]; then
- statusmsg2 "BUILDID:" "${BUILDID}"
- fi
- if [ -n "${BUILDINFO}" ]; then
- printf "%b\n" "${BUILDINFO}" | \
- while read -r line ; do
- [ -s "${line}" ] && continue
- statusmsg2 "BUILDINFO:" "${line}"
- done
- fi
-
- rebuildmake
- validatemakeparams
- createmakewrapper
-
- # Perform the operations.
- #
- for op in ${operations}; do
- case "${op}" in
-
- makewrapper)
- # no-op
- ;;
-
- tools)
- buildtools
- ;;
-
- sets)
- statusmsg "Building sets from pre-populated ${DESTDIR}"
- ${runcmd} "${makewrapper}" ${parallel} ${op} ||
- bomb "Failed to make ${op}"
- setdir=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
- statusmsg "Built sets to ${setdir}"
- ;;
-
- cleandir|obj|build|distribution|release|sourcesets|syspkgs|show-params)
- ${runcmd} "${makewrapper}" ${parallel} ${op} ||
- bomb "Failed to make ${op}"
- statusmsg "Successful make ${op}"
- ;;
-
- iso-image|iso-image-source)
- ${runcmd} "${makewrapper}" ${parallel} \
- CDEXTRA="$CDEXTRA" ${op} ||
- bomb "Failed to make ${op}"
- statusmsg "Successful make ${op}"
- ;;
-
- live-image|install-image)
- # install-image and live-image require mtree spec files
- # built with UNPRIVED. Assume UNPRIVED build has been
- # performed if METALOG file is created in DESTDIR.
- if [ ! -e "${DESTDIR}/METALOG" ] ; then
- bomb "The release binaries must have been built with -U to create images."
- fi
- ${runcmd} "${makewrapper}" ${parallel} ${op} ||
- bomb "Failed to make ${op}"
- statusmsg "Successful make ${op}"
- ;;
- kernel=*)
- arg=${op#*=}
- buildkernel "${arg}"
- ;;
- kernel.gdb=*)
- arg=${op#*=}
- configopts="-D DEBUG=-g"
- buildkernel "${arg}"
- ;;
- releasekernel=*)
- arg=${op#*=}
- releasekernel "${arg}"
- ;;
-
- kernels)
- buildkernels
- ;;
-
- disk-image=*)
- arg=${op#*=}
- diskimage "${arg}"
- ;;
-
- modules)
- buildmodules
- ;;
-
- installmodules=*)
- arg=${op#*=}
- if [ "${arg}" = "/" ] && \
- ( ( [ "${uname_s}" != "NetBSD" ] && [ "${uname_s}" != "Minix" ] ) || \
- [ "${uname_m}" != "${MACHINE}" ] ); then
- bomb "'${op}' must != / for cross builds."
- fi
- installmodules "${arg}"
- ;;
-
- install=*)
- arg=${op#*=}
- if [ "${arg}" = "/" ] && \
- ( ( [ "${uname_s}" != "NetBSD" ] && [ "${uname_s}" != "Minix" ] ) || \
- [ "${uname_m}" != "${MACHINE}" ] ); then
- bomb "'${op}' must != / for cross builds."
- fi
- installworld "${arg}"
- ;;
-
- rump|rumptest)
- dorump "${op}"
- ;;
-
- *)
- bomb "Unknown operation \`${op}'"
- ;;
-
- esac
- done
-
- statusmsg2 "${progname} ended:" "$(date)"
- if [ -s "${results}" ]; then
- echo "===> Summary of results:"
- sed -e 's/^===>//;s/^/ /' "${results}"
- echo "===> ."
- fi
-}
-
-main "$@"
diff --git a/build/bin/.gitignore b/build/bin/.gitignore
deleted file mode 100644
index d6b7ef3..0000000
--- a/build/bin/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/build/lib/.gitignore b/build/lib/.gitignore
deleted file mode 100644
index d6b7ef3..0000000
--- a/build/lib/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/build/libexec/.gitignore b/build/libexec/.gitignore
deleted file mode 100644
index d6b7ef3..0000000
--- a/build/libexec/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/etc/motd b/etc/motd
deleted file mode 100644
index f5a6ac4..0000000
--- a/etc/motd
+++ /dev/null
@@ -1,12 +0,0 @@
-Welcome to UbixOS
-
-This is an experimental kernel so it has the potential
-to crash if it does please send us some info so we can
-fix it or if you have access to the source fix it and
-commit the changes.
-
-All reports can be sent to cwolsen@ubixos.com
-
-NOTICE!!!!!
-
-This is now 2016 and we're working again!
diff --git a/etc/userdb b/etc/userdb
deleted file mode 100644
index ed464e7..0000000
--- a/etc/userdb
+++ /dev/null
Binary files differ
diff --git a/include.new/Block.h b/include.new/Block.h
deleted file mode 100644
index 55cdd01..0000000
--- a/include.new/Block.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Block.h
- *
- * Copyright 2008-2010 Apple, Inc. Permission is hereby granted, free of charge,
- * to any person obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to permit
- * persons to whom the Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef _BLOCK_H_
-#define _BLOCK_H_
-
-#if !defined(BLOCK_EXPORT)
-# if defined(__cplusplus)
-# define BLOCK_EXPORT extern "C"
-# else
-# define BLOCK_EXPORT extern
-# endif
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Create a heap based copy of a Block or simply add a reference to an existing one.
- * This must be paired with Block_release to recover memory, even when running
- * under Objective-C Garbage Collection.
- */
-BLOCK_EXPORT void *_Block_copy(const void *aBlock);
-
-/* Lose the reference, and if heap based and last reference, recover the memory. */
-BLOCK_EXPORT void _Block_release(const void *aBlock);
-
-#if defined(__cplusplus)
-}
-#endif
-
-/* Type correct macros. */
-
-#define Block_copy(...) ((__typeof(__VA_ARGS__))_Block_copy((const void *)(__VA_ARGS__)))
-#define Block_release(...) _Block_release((const void *)(__VA_ARGS__))
-
-
-#endif
diff --git a/include.new/Block_private.h b/include.new/Block_private.h
deleted file mode 100644
index 8ae8218..0000000
--- a/include.new/Block_private.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Block_private.h
- *
- * Copyright 2008-2010 Apple, Inc. Permission is hereby granted, free of charge,
- * to any person obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to permit
- * persons to whom the Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef _BLOCK_PRIVATE_H_
-#define _BLOCK_PRIVATE_H_
-
-#if !defined(BLOCK_EXPORT)
-# if defined(__cplusplus)
-# define BLOCK_EXPORT extern "C"
-# else
-# define BLOCK_EXPORT extern
-# endif
-#endif
-
-#ifndef _MSC_VER
-#include
-#else
-/* MSVC doesn't have . Compensate. */
-typedef char bool;
-#define true (bool)1
-#define false (bool)0
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-
-enum {
- BLOCK_REFCOUNT_MASK = (0xffff),
- BLOCK_NEEDS_FREE = (1 << 24),
- BLOCK_HAS_COPY_DISPOSE = (1 << 25),
- BLOCK_HAS_CTOR = (1 << 26), /* Helpers have C++ code. */
- BLOCK_IS_GC = (1 << 27),
- BLOCK_IS_GLOBAL = (1 << 28),
- BLOCK_HAS_DESCRIPTOR = (1 << 29)
-};
-
-
-/* Revised new layout. */
-struct Block_descriptor {
- unsigned long int reserved;
- unsigned long int size;
- void (*copy)(void *dst, void *src);
- void (*dispose)(void *);
-};
-
-
-struct Block_layout {
- void *isa;
- int flags;
- int reserved;
- void (*invoke)(void *, ...);
- struct Block_descriptor *descriptor;
- /* Imported variables. */
-};
-
-
-struct Block_byref {
- void *isa;
- struct Block_byref *forwarding;
- int flags; /* refcount; */
- int size;
- void (*byref_keep)(struct Block_byref *dst, struct Block_byref *src);
- void (*byref_destroy)(struct Block_byref *);
- /* long shared[0]; */
-};
-
-
-struct Block_byref_header {
- void *isa;
- struct Block_byref *forwarding;
- int flags;
- int size;
-};
-
-
-/* Runtime support functions used by compiler when generating copy/dispose helpers. */
-
-enum {
- /* See function implementation for a more complete description of these fields and combinations */
- BLOCK_FIELD_IS_OBJECT = 3, /* id, NSObject, __attribute__((NSObject)), block, ... */
- BLOCK_FIELD_IS_BLOCK = 7, /* a block variable */
- BLOCK_FIELD_IS_BYREF = 8, /* the on stack structure holding the __block variable */
- BLOCK_FIELD_IS_WEAK = 16, /* declared __weak, only used in byref copy helpers */
- BLOCK_BYREF_CALLER = 128 /* called from __block (byref) copy/dispose support routines. */
-};
-
-/* Runtime entry point called by compiler when assigning objects inside copy helper routines */
-BLOCK_EXPORT void _Block_object_assign(void *destAddr, const void *object, const int flags);
- /* BLOCK_FIELD_IS_BYREF is only used from within block copy helpers */
-
-
-/* runtime entry point called by the compiler when disposing of objects inside dispose helper routine */
-BLOCK_EXPORT void _Block_object_dispose(const void *object, const int flags);
-
-
-
-/* Other support functions */
-
-/* Runtime entry to get total size of a closure */
-BLOCK_EXPORT unsigned long int Block_size(void *block_basic);
-
-
-
-/* the raw data space for runtime classes for blocks */
-/* class+meta used for stack, malloc, and collectable based blocks */
-BLOCK_EXPORT void * _NSConcreteStackBlock[32];
-BLOCK_EXPORT void * _NSConcreteMallocBlock[32];
-BLOCK_EXPORT void * _NSConcreteAutoBlock[32];
-BLOCK_EXPORT void * _NSConcreteFinalizingBlock[32];
-BLOCK_EXPORT void * _NSConcreteGlobalBlock[32];
-BLOCK_EXPORT void * _NSConcreteWeakBlockVariable[32];
-
-
-/* the intercept routines that must be used under GC */
-BLOCK_EXPORT void _Block_use_GC( void *(*alloc)(const unsigned long, const bool isOne, const bool isObject),
- void (*setHasRefcount)(const void *, const bool),
- void (*gc_assign_strong)(void *, void **),
- void (*gc_assign_weak)(const void *, void *),
- void (*gc_memmove)(void *, void *, unsigned long));
-
-/* earlier version, now simply transitional */
-BLOCK_EXPORT void _Block_use_GC5( void *(*alloc)(const unsigned long, const bool isOne, const bool isObject),
- void (*setHasRefcount)(const void *, const bool),
- void (*gc_assign_strong)(void *, void **),
- void (*gc_assign_weak)(const void *, void *));
-
-BLOCK_EXPORT void _Block_use_RR( void (*retain)(const void *),
- void (*release)(const void *));
-
-/* make a collectable GC heap based Block. Not useful under non-GC. */
-BLOCK_EXPORT void *_Block_copy_collectable(const void *aBlock);
-
-/* thread-unsafe diagnostic */
-BLOCK_EXPORT const char *_Block_dump(const void *block);
-
-
-/* Obsolete */
-
-/* first layout */
-struct Block_basic {
- void *isa;
- int Block_flags; /* int32_t */
- int Block_size; /* XXX should be packed into Block_flags */
- void (*Block_invoke)(void *);
- void (*Block_copy)(void *dst, void *src); /* iff BLOCK_HAS_COPY_DISPOSE */
- void (*Block_dispose)(void *); /* iff BLOCK_HAS_COPY_DISPOSE */
- /* long params[0]; // where const imports, __block storage references, etc. get laid down */
-};
-
-
-#if defined(__cplusplus)
-}
-#endif
-
-
-#endif /* _BLOCK_PRIVATE_H_ */
diff --git a/include.new/FlexLexer.h b/include.new/FlexLexer.h
deleted file mode 100644
index bad4ce0..0000000
--- a/include.new/FlexLexer.h
+++ /dev/null
@@ -1,206 +0,0 @@
-// -*-C++-*-
-// FlexLexer.h -- define interfaces for lexical analyzer classes generated
-// by flex
-
-// Copyright (c) 1993 The Regents of the University of California.
-// All rights reserved.
-//
-// This code is derived from software contributed to Berkeley by
-// Kent Williams and Tom Epperly.
-//
-// 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.
-
-// 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE.
-
-// This file defines FlexLexer, an abstract class which specifies the
-// external interface provided to flex C++ lexer objects, and yyFlexLexer,
-// which defines a particular lexer class.
-//
-// If you want to create multiple lexer classes, you use the -P flag
-// to rename each yyFlexLexer to some other xxFlexLexer. You then
-// include in your other sources once per lexer class:
-//
-// #undef yyFlexLexer
-// #define yyFlexLexer xxFlexLexer
-// #include
-//
-// #undef yyFlexLexer
-// #define yyFlexLexer zzFlexLexer
-// #include
-// ...
-
-#ifndef __FLEX_LEXER_H
-// Never included before - need to define base class.
-#define __FLEX_LEXER_H
-
-#include
-# ifndef FLEX_STD
-# define FLEX_STD std::
-# endif
-
-extern "C++" {
-
-struct yy_buffer_state;
-typedef int yy_state_type;
-
-class FlexLexer {
-public:
- virtual ~FlexLexer() { }
-
- const char* YYText() const { return yytext; }
- int YYLeng() const { return yyleng; }
-
- virtual void
- yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
- virtual struct yy_buffer_state*
- yy_create_buffer( FLEX_STD istream* s, int size ) = 0;
- virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
- virtual void yyrestart( FLEX_STD istream* s ) = 0;
-
- virtual int yylex() = 0;
-
- // Call yylex with new input/output sources.
- int yylex( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 )
- {
- switch_streams( new_in, new_out );
- return yylex();
- }
-
- // Switch to new input/output streams. A nil stream pointer
- // indicates "keep the current one".
- virtual void switch_streams( FLEX_STD istream* new_in = 0,
- FLEX_STD ostream* new_out = 0 ) = 0;
-
- int lineno() const { return yylineno; }
-
- int debug() const { return yy_flex_debug; }
- void set_debug( int flag ) { yy_flex_debug = flag; }
-
-protected:
- char* yytext;
- int yyleng;
- int yylineno; // only maintained if you use %option yylineno
- int yy_flex_debug; // only has effect with -d or "%option debug"
-};
-
-}
-#endif // FLEXLEXER_H
-
-#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
-// Either this is the first time through (yyFlexLexerOnce not defined),
-// or this is a repeated include to define a different flavor of
-// yyFlexLexer, as discussed in the flex manual.
-#define yyFlexLexerOnce
-
-extern "C++" {
-
-class yyFlexLexer : public FlexLexer {
-public:
- // arg_yyin and arg_yyout default to the cin and cout, but we
- // only make that assignment when initializing in yylex().
- yyFlexLexer( FLEX_STD istream* arg_yyin = 0, FLEX_STD ostream* arg_yyout = 0 );
-
- virtual ~yyFlexLexer();
-
- void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
- struct yy_buffer_state* yy_create_buffer( FLEX_STD istream* s, int size );
- void yy_delete_buffer( struct yy_buffer_state* b );
- void yyrestart( FLEX_STD istream* s );
-
- void yypush_buffer_state( struct yy_buffer_state* new_buffer );
- void yypop_buffer_state();
-
- virtual int yylex();
- virtual void switch_streams( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 );
- virtual int yywrap();
-
-protected:
- virtual int LexerInput( char* buf, int max_size );
- virtual void LexerOutput( const char* buf, int size );
- virtual void LexerError( const char* msg );
-
- void yyunput( int c, char* buf_ptr );
- int yyinput();
-
- void yy_load_buffer_state();
- void yy_init_buffer( struct yy_buffer_state* b, FLEX_STD istream* s );
- void yy_flush_buffer( struct yy_buffer_state* b );
-
- int yy_start_stack_ptr;
- int yy_start_stack_depth;
- int* yy_start_stack;
-
- void yy_push_state( int new_state );
- void yy_pop_state();
- int yy_top_state();
-
- yy_state_type yy_get_previous_state();
- yy_state_type yy_try_NUL_trans( yy_state_type current_state );
- int yy_get_next_buffer();
-
- FLEX_STD istream* yyin; // input source for default LexerInput
- FLEX_STD ostream* yyout; // output sink for default LexerOutput
-
- // yy_hold_char holds the character lost when yytext is formed.
- char yy_hold_char;
-
- // Number of characters read into yy_ch_buf.
- int yy_n_chars;
-
- // Points to current character in buffer.
- char* yy_c_buf_p;
-
- int yy_init; // whether we need to initialize
- int yy_start; // start state number
-
- // Flag which is used to allow yywrap()'s to do buffer switches
- // instead of setting up a fresh yyin. A bit of a hack ...
- int yy_did_buffer_switch_on_eof;
-
-
- size_t yy_buffer_stack_top; /**< index of top of stack. */
- size_t yy_buffer_stack_max; /**< capacity of stack. */
- struct yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */
- void yyensure_buffer_stack(void);
-
- // The following are not always needed, but may be depending
- // on use of certain flex features (like REJECT or yymore()).
-
- yy_state_type yy_last_accepting_state;
- char* yy_last_accepting_cpos;
-
- yy_state_type* yy_state_buf;
- yy_state_type* yy_state_ptr;
-
- char* yy_full_match;
- int* yy_full_state;
- int yy_full_lp;
-
- int yy_lp;
- int yy_looking_for_trail_begin;
-
- int yy_more_flag;
- int yy_more_len;
- int yy_more_offset;
- int yy_prev_more_offset;
-};
-
-}
-
-#endif // yyFlexLexer || ! yyFlexLexerOnce
-
diff --git a/include.new/_ctype.h b/include.new/_ctype.h
deleted file mode 100644
index 8ed4b86..0000000
--- a/include.new/_ctype.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * 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: releng/10.2/include/_ctype.h 203964 2010-02-16 19:39:50Z imp $
- */
-
-#ifndef __CTYPE_H_
-#define __CTYPE_H_
-
-#include
-#include
-
-#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_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 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
-
-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))
-
-#include
-
-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 */
-
-__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 */
-
-#endif /* !__CTYPE_H_ */
diff --git a/include.new/_semaphore.h b/include.new/_semaphore.h
deleted file mode 100644
index b8a83b2..0000000
--- a/include.new/_semaphore.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 2002 Alfred Perlstein
- * 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: releng/10.2/sys/sys/_semaphore.h 201546 2010-01-05 02:37:59Z davidxu $
- */
-#ifndef __SEMAPHORE_H_
-#define __SEMAPHORE_H_
-
-typedef intptr_t semid_t;
-struct timespec;
-
-#define SEM_VALUE_MAX __INT_MAX
-
-#ifndef _KERNEL
-
-__BEGIN_DECLS
-
-int ksem_close(semid_t id);
-int ksem_post(semid_t id);
-int ksem_wait(semid_t id);
-int ksem_trywait(semid_t id);
-int ksem_timedwait(semid_t id, const struct timespec *abstime);
-int ksem_init(semid_t *idp, unsigned int value);
-int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode,
- unsigned int value);
-int ksem_unlink(const char *name);
-int ksem_getvalue(semid_t id, int *val);
-int ksem_destroy(semid_t id);
-
-__END_DECLS
-
-#endif /* !_KERNEL */
-
-#endif /* __SEMAPHORE_H_ */
diff --git a/include.new/a.out.h b/include.new/a.out.h
deleted file mode 100644
index bf57968..0000000
--- a/include.new/a.out.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 1991, 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.
- *
- * @(#)a.out.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: releng/10.2/include/a.out.h 203964 2010-02-16 19:39:50Z imp $
- */
-
-#ifndef _AOUT_H_
-#define _AOUT_H_
-
-#include
-#include
-#include
-#include
-#include
-
-#define _AOUT_INCLUDE_
-#include
-
-#endif /* !_AOUT_H_ */
diff --git a/include.new/aio.h b/include.new/aio.h
deleted file mode 100644
index 75353a6..0000000
--- a/include.new/aio.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*-
- * Copyright (c) 1997 John S. Dyson. 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. John S. Dyson's name may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * DISCLAIMER: This code isn't warranted to do anything useful. Anything
- * bad that happens because of using this software isn't the responsibility
- * of the author. This software is distributed AS-IS.
- *
- * $FreeBSD: releng/10.2/sys/sys/aio.h 251526 2013-06-08 13:27:57Z glebius $
- */
-
-#ifndef _SYS_AIO_H_
-#define _SYS_AIO_H_
-
-#include
-#include
-
-/*
- * Returned by aio_cancel:
- */
-#define AIO_CANCELED 0x1
-#define AIO_NOTCANCELED 0x2
-#define AIO_ALLDONE 0x3
-
-/*
- * LIO opcodes
- */
-#define LIO_NOP 0x0
-#define LIO_WRITE 0x1
-#define LIO_READ 0x2
-#ifdef _KERNEL
-#define LIO_SYNC 0x3
-#define LIO_MLOCK 0x4
-#endif
-
-/*
- * LIO modes
- */
-#define LIO_NOWAIT 0x0
-#define LIO_WAIT 0x1
-
-/*
- * Maximum number of allowed LIO operations
- */
-#define AIO_LISTIO_MAX 16
-
-/*
- * Private members for aiocb -- don't access
- * directly.
- */
-struct __aiocb_private {
- long status;
- long error;
- void *kernelinfo;
-};
-
-/*
- * I/O control block
- */
-typedef struct aiocb {
- int aio_fildes; /* File descriptor */
- off_t aio_offset; /* File offset for I/O */
- volatile void *aio_buf; /* I/O buffer in process space */
- size_t aio_nbytes; /* Number of bytes for I/O */
- int __spare__[2];
- void *__spare2__;
- int aio_lio_opcode; /* LIO opcode */
- int aio_reqprio; /* Request priority -- ignored */
- struct __aiocb_private _aiocb_private;
- struct sigevent aio_sigevent; /* Signal to deliver */
-} aiocb_t;
-
-#ifndef _KERNEL
-
-struct timespec;
-
-__BEGIN_DECLS
-/*
- * Asynchronously read from a file
- */
-int aio_read(struct aiocb *);
-
-/*
- * Asynchronously write to file
- */
-int aio_write(struct aiocb *);
-
-/*
- * List I/O Asynchronously/synchronously read/write to/from file
- * "lio_mode" specifies whether or not the I/O is synchronous.
- * "acb_list" is an array of "nacb_listent" I/O control blocks.
- * when all I/Os are complete, the optional signal "sig" is sent.
- */
-int lio_listio(int, struct aiocb * const [], int, struct sigevent *);
-
-/*
- * Get completion status
- * returns EINPROGRESS until I/O is complete.
- * this routine does not block.
- */
-int aio_error(const struct aiocb *);
-
-/*
- * Finish up I/O, releasing I/O resources and returns the value
- * that would have been associated with a synchronous I/O request.
- * This routine must be called once and only once for each
- * I/O control block who has had I/O associated with it.
- */
-ssize_t aio_return(struct aiocb *);
-
-/*
- * Cancel I/O
- */
-int aio_cancel(int, struct aiocb *);
-
-/*
- * Suspend until all specified I/O or timeout is complete.
- */
-int aio_suspend(const struct aiocb * const[], int, const struct timespec *);
-
-/*
- * Asynchronous mlock
- */
-int aio_mlock(struct aiocb *);
-
-#ifdef __BSD_VISIBLE
-int aio_waitcomplete(struct aiocb **, struct timespec *);
-#endif
-
-int aio_fsync(int op, struct aiocb *aiocbp);
-__END_DECLS
-
-#else
-
-/* Forward declarations for prototypes below. */
-struct socket;
-struct sockbuf;
-
-extern void (*aio_swake)(struct socket *, struct sockbuf *);
-
-#endif
-
-#endif
diff --git a/include.new/alias.h b/include.new/alias.h
deleted file mode 100644
index 9559561..0000000
--- a/include.new/alias.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/* lint -save -library Flexelint comment for external headers */
-
-/*-
- * Copyright (c) 2001 Charles Mott
- * 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: releng/10.2/sys/netinet/libalias/alias.h 223080 2011-06-14 13:35:24Z ae $
- */
-
-/*
- * Alias.h defines the outside world interfaces for the packet aliasing
- * software.
- *
- * This software is placed into the public domain with no restrictions on its
- * distribution.
- */
-
-#ifndef _ALIAS_H_
-#define _ALIAS_H_
-
-#include
-#include
-#include
-
-#define LIBALIAS_BUF_SIZE 128
-#ifdef _KERNEL
-/*
- * The kernel version of libalias does not support these features.
- */
-#define NO_FW_PUNCH
-#define NO_USE_SOCKETS
-#endif
-
-/*
- * The external interface to libalias, the packet aliasing engine.
- *
- * There are two sets of functions:
- *
- * PacketAlias*() the old API which doesn't take an instance pointer
- * and therefore can only have one packet engine at a time.
- *
- * LibAlias*() the new API which takes as first argument a pointer to
- * the instance of the packet aliasing engine.
- *
- * The functions otherwise correspond to each other one for one, except
- * for the LibAliasUnaliasOut()/PacketUnaliasOut() function which were
- * were misnamed in the old API.
- */
-
-/*
- * The instance structure
- */
-struct libalias;
-
-/*
- * An anonymous structure, a pointer to which is returned from
- * PacketAliasRedirectAddr(), PacketAliasRedirectPort() or
- * PacketAliasRedirectProto(), passed to PacketAliasAddServer(),
- * and freed by PacketAliasRedirectDelete().
- */
-struct alias_link;
-
-/* Initialization and control functions. */
-struct libalias *LibAliasInit(struct libalias *);
-void LibAliasSetAddress(struct libalias *, struct in_addr _addr);
-void LibAliasSetFWBase(struct libalias *, unsigned int _base, unsigned int _num);
-void LibAliasSetSkinnyPort(struct libalias *, unsigned int _port);
-unsigned int
- LibAliasSetMode(struct libalias *, unsigned int _flags, unsigned int _mask);
-void LibAliasUninit(struct libalias *);
-
-/* Packet Handling functions. */
-int LibAliasIn (struct libalias *, char *_ptr, int _maxpacketsize);
-int LibAliasOut(struct libalias *, char *_ptr, int _maxpacketsize);
-int LibAliasOutTry(struct libalias *, char *_ptr, int _maxpacketsize, int _create);
-int LibAliasUnaliasOut(struct libalias *, char *_ptr, int _maxpacketsize);
-
-/* Port and address redirection functions. */
-
-int
-LibAliasAddServer(struct libalias *, struct alias_link *_lnk,
- struct in_addr _addr, unsigned short _port);
-struct alias_link *
-LibAliasRedirectAddr(struct libalias *, struct in_addr _src_addr,
- struct in_addr _alias_addr);
-int LibAliasRedirectDynamic(struct libalias *, struct alias_link *_lnk);
-void LibAliasRedirectDelete(struct libalias *, struct alias_link *_lnk);
-struct alias_link *
-LibAliasRedirectPort(struct libalias *, struct in_addr _src_addr,
- unsigned short _src_port, struct in_addr _dst_addr,
- unsigned short _dst_port, struct in_addr _alias_addr,
- unsigned short _alias_port, unsigned char _proto);
-struct alias_link *
-LibAliasRedirectProto(struct libalias *, struct in_addr _src_addr,
- struct in_addr _dst_addr, struct in_addr _alias_addr,
- unsigned char _proto);
-
-/* Fragment Handling functions. */
-void LibAliasFragmentIn(struct libalias *, char *_ptr, char *_ptr_fragment);
-char *LibAliasGetFragment(struct libalias *, char *_ptr);
-int LibAliasSaveFragment(struct libalias *, char *_ptr);
-
-/* Miscellaneous functions. */
-int LibAliasCheckNewLink(struct libalias *);
-unsigned short
- LibAliasInternetChecksum(struct libalias *, unsigned short *_ptr, int _nbytes);
-void LibAliasSetTarget(struct libalias *, struct in_addr _target_addr);
-
-/* Transparent proxying routines. */
-int LibAliasProxyRule(struct libalias *, const char *_cmd);
-
-/* Module handling API */
-int LibAliasLoadModule(char *);
-int LibAliasUnLoadAllModule(void);
-int LibAliasRefreshModules(void);
-
-/* Mbuf helper function. */
-struct mbuf *m_megapullup(struct mbuf *, int);
-
-/*
- * Mode flags and other constants.
- */
-
-
-/* Mode flags, set using PacketAliasSetMode() */
-
-/*
- * If PKT_ALIAS_LOG is set, a message will be printed to /var/log/alias.log
- * every time a link is created or deleted. This is useful for debugging.
- */
-#define PKT_ALIAS_LOG 0x01
-
-/*
- * If PKT_ALIAS_DENY_INCOMING is set, then incoming connections (e.g. to ftp,
- * telnet or web servers will be prevented by the aliasing mechanism.
- */
-#define PKT_ALIAS_DENY_INCOMING 0x02
-
-/*
- * If PKT_ALIAS_SAME_PORTS is set, packets will be attempted sent from the
- * same port as they originated on. This allows e.g. rsh to work *99% of the
- * time*, but _not_ 100% (it will be slightly flakey instead of not working
- * at all). This mode bit is set by PacketAliasInit(), so it is a default
- * mode of operation.
- */
-#define PKT_ALIAS_SAME_PORTS 0x04
-
-/*
- * If PKT_ALIAS_USE_SOCKETS is set, then when partially specified links (e.g.
- * destination port and/or address is zero), the packet aliasing engine will
- * attempt to allocate a socket for the aliasing port it chooses. This will
- * avoid interference with the host machine. Fully specified links do not
- * require this. This bit is set after a call to PacketAliasInit(), so it is
- * a default mode of operation.
- */
-#ifndef NO_USE_SOCKETS
-#define PKT_ALIAS_USE_SOCKETS 0x08
-#endif
-/*-
- * If PKT_ALIAS_UNREGISTERED_ONLY is set, then only packets with
- * unregistered source addresses will be aliased. Private
- * addresses are those in the following ranges:
- *
- * 10.0.0.0 -> 10.255.255.255
- * 172.16.0.0 -> 172.31.255.255
- * 192.168.0.0 -> 192.168.255.255
- */
-#define PKT_ALIAS_UNREGISTERED_ONLY 0x10
-
-/*
- * If PKT_ALIAS_RESET_ON_ADDR_CHANGE is set, then the table of dynamic
- * aliasing links will be reset whenever PacketAliasSetAddress() changes the
- * default aliasing address. If the default aliasing address is left
- * unchanged by this function call, then the table of dynamic aliasing links
- * will be left intact. This bit is set after a call to PacketAliasInit().
- */
-#define PKT_ALIAS_RESET_ON_ADDR_CHANGE 0x20
-
-/*
- * If PKT_ALIAS_PROXY_ONLY is set, then NAT will be disabled and only
- * transparent proxying is performed.
- */
-#define PKT_ALIAS_PROXY_ONLY 0x40
-
-/*
- * If PKT_ALIAS_REVERSE is set, the actions of PacketAliasIn() and
- * PacketAliasOut() are reversed.
- */
-#define PKT_ALIAS_REVERSE 0x80
-
-#ifndef NO_FW_PUNCH
-/*
- * If PKT_ALIAS_PUNCH_FW is set, active FTP and IRC DCC connections will
- * create a 'hole' in the firewall to allow the transfers to work. The
- * ipfw rule number that the hole is created with is controlled by
- * PacketAliasSetFWBase(). The hole will be attached to that
- * particular alias_link, so when the link goes away the hole is deleted.
- */
-#define PKT_ALIAS_PUNCH_FW 0x100
-#endif
-
-/*
- * If PKT_ALIAS_SKIP_GLOBAL is set, nat instance is not checked for matching
- * states in 'ipfw nat global' rule.
- */
-#define PKT_ALIAS_SKIP_GLOBAL 0x200
-
-/* Function return codes. */
-#define PKT_ALIAS_ERROR -1
-#define PKT_ALIAS_OK 1
-#define PKT_ALIAS_IGNORED 2
-#define PKT_ALIAS_UNRESOLVED_FRAGMENT 3
-#define PKT_ALIAS_FOUND_HEADER_FRAGMENT 4
-
-#endif /* !_ALIAS_H_ */
-
-/* lint -restore */
diff --git a/include.new/altq/altq.h b/include.new/altq/altq.h
deleted file mode 100644
index b6220d9..0000000
--- a/include.new/altq/altq.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* $FreeBSD: releng/10.2/sys/contrib/altq/altq/altq.h 130368 2004-06-12 00:57:20Z mlaier $ */
-/* $KAME: altq.h,v 1.10 2003/07/10 12:07:47 kjc Exp $ */
-
-/*
- * Copyright (C) 1998-2003
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-#ifndef _ALTQ_ALTQ_H_
-#define _ALTQ_ALTQ_H_
-
-#if 0
-/*
- * allow altq-3 (altqd(8) and /dev/altq) to coexist with the new pf-based altq.
- * altq3 is mainly for research experiments. pf-based altq is for daily use.
- */
-#define ALTQ3_COMPAT /* for compatibility with altq-3 */
-#define ALTQ3_CLFIER_COMPAT /* for compatibility with altq-3 classifier */
-#endif
-
-#ifdef ALTQ3_COMPAT
-#include
-#include
-#include
-#include
-
-#ifndef IFNAMSIZ
-#define IFNAMSIZ 16
-#endif
-#endif /* ALTQ3_COMPAT */
-
-/* altq discipline type */
-#define ALTQT_NONE 0 /* reserved */
-#define ALTQT_CBQ 1 /* cbq */
-#define ALTQT_WFQ 2 /* wfq */
-#define ALTQT_AFMAP 3 /* afmap */
-#define ALTQT_FIFOQ 4 /* fifoq */
-#define ALTQT_RED 5 /* red */
-#define ALTQT_RIO 6 /* rio */
-#define ALTQT_LOCALQ 7 /* local use */
-#define ALTQT_HFSC 8 /* hfsc */
-#define ALTQT_CDNR 9 /* traffic conditioner */
-#define ALTQT_BLUE 10 /* blue */
-#define ALTQT_PRIQ 11 /* priority queue */
-#define ALTQT_JOBS 12 /* JoBS */
-#define ALTQT_MAX 13 /* should be max discipline type + 1 */
-
-#ifdef ALTQ3_COMPAT
-struct altqreq {
- char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
- u_long arg; /* request-specific argument */
-};
-#endif
-
-/* simple token backet meter profile */
-struct tb_profile {
- u_int rate; /* rate in bit-per-sec */
- u_int depth; /* depth in bytes */
-};
-
-#ifdef ALTQ3_COMPAT
-struct tbrreq {
- char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct tb_profile tb_prof; /* token bucket profile */
-};
-
-#ifdef ALTQ3_CLFIER_COMPAT
-/*
- * common network flow info structure
- */
-struct flowinfo {
- u_char fi_len; /* total length */
- u_char fi_family; /* address family */
- u_int8_t fi_data[46]; /* actually longer; address family
- specific flow info. */
-};
-
-/*
- * flow info structure for internet protocol family.
- * (currently this is the only protocol family supported)
- */
-struct flowinfo_in {
- u_char fi_len; /* sizeof(struct flowinfo_in) */
- u_char fi_family; /* AF_INET */
- u_int8_t fi_proto; /* IPPROTO_XXX */
- u_int8_t fi_tos; /* type-of-service */
- struct in_addr fi_dst; /* dest address */
- struct in_addr fi_src; /* src address */
- u_int16_t fi_dport; /* dest port */
- u_int16_t fi_sport; /* src port */
- uint32_t fi_gpi; /* generalized port id for ipsec */
- u_int8_t _pad[28]; /* make the size equal to
- flowinfo_in6 */
-};
-
-#ifdef SIN6_LEN
-struct flowinfo_in6 {
- u_char fi6_len; /* sizeof(struct flowinfo_in6) */
- u_char fi6_family; /* AF_INET6 */
- u_int8_t fi6_proto; /* IPPROTO_XXX */
- u_int8_t fi6_tclass; /* traffic class */
- uint32_t fi6_flowlabel; /* ipv6 flowlabel */
- u_int16_t fi6_dport; /* dest port */
- u_int16_t fi6_sport; /* src port */
- uint32_t fi6_gpi; /* generalized port id */
- struct in6_addr fi6_dst; /* dest address */
- struct in6_addr fi6_src; /* src address */
-};
-#endif /* INET6 */
-
-/*
- * flow filters for AF_INET and AF_INET6
- */
-struct flow_filter {
- int ff_ruleno;
- struct flowinfo_in ff_flow;
- struct {
- struct in_addr mask_dst;
- struct in_addr mask_src;
- u_int8_t mask_tos;
- u_int8_t _pad[3];
- } ff_mask;
- u_int8_t _pad2[24]; /* make the size equal to flow_filter6 */
-};
-
-#ifdef SIN6_LEN
-struct flow_filter6 {
- int ff_ruleno;
- struct flowinfo_in6 ff_flow6;
- struct {
- struct in6_addr mask6_dst;
- struct in6_addr mask6_src;
- u_int8_t mask6_tclass;
- u_int8_t _pad[3];
- } ff_mask6;
-};
-#endif /* INET6 */
-#endif /* ALTQ3_CLFIER_COMPAT */
-#endif /* ALTQ3_COMPAT */
-
-/*
- * generic packet counter
- */
-struct pktcntr {
- u_int64_t packets;
- u_int64_t bytes;
-};
-
-#define PKTCNTR_ADD(cntr, len) \
- do { (cntr)->packets++; (cntr)->bytes += len; } while (/*CONSTCOND*/ 0)
-
-#ifdef ALTQ3_COMPAT
-/*
- * altq related ioctls
- */
-#define ALTQGTYPE _IOWR('q', 0, struct altqreq) /* get queue type */
-#if 0
-/*
- * these ioctls are currently discipline-specific but could be shared
- * in the future.
- */
-#define ALTQATTACH _IOW('q', 1, struct altqreq) /* attach discipline */
-#define ALTQDETACH _IOW('q', 2, struct altqreq) /* detach discipline */
-#define ALTQENABLE _IOW('q', 3, struct altqreq) /* enable discipline */
-#define ALTQDISABLE _IOW('q', 4, struct altqreq) /* disable discipline*/
-#define ALTQCLEAR _IOW('q', 5, struct altqreq) /* (re)initialize */
-#define ALTQCONFIG _IOWR('q', 6, struct altqreq) /* set config params */
-#define ALTQADDCLASS _IOWR('q', 7, struct altqreq) /* add a class */
-#define ALTQMODCLASS _IOWR('q', 8, struct altqreq) /* modify a class */
-#define ALTQDELCLASS _IOWR('q', 9, struct altqreq) /* delete a class */
-#define ALTQADDFILTER _IOWR('q', 10, struct altqreq) /* add a filter */
-#define ALTQDELFILTER _IOWR('q', 11, struct altqreq) /* delete a filter */
-#define ALTQGETSTATS _IOWR('q', 12, struct altqreq) /* get statistics */
-#define ALTQGETCNTR _IOWR('q', 13, struct altqreq) /* get a pkt counter */
-#endif /* 0 */
-#define ALTQTBRSET _IOW('q', 14, struct tbrreq) /* set tb regulator */
-#define ALTQTBRGET _IOWR('q', 15, struct tbrreq) /* get tb regulator */
-#endif /* ALTQ3_COMPAT */
-
-#ifdef _KERNEL
-#include
-#endif
-
-#endif /* _ALTQ_ALTQ_H_ */
diff --git a/include.new/altq/altq_cbq.h b/include.new/altq/altq_cbq.h
deleted file mode 100644
index 723bebb..0000000
--- a/include.new/altq/altq_cbq.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/* $KAME: altq_cbq.h,v 1.12 2003/10/03 05:05:15 kjc Exp $ */
-
-/*
- * Copyright (c) Sun Microsystems, Inc. 1993-1998 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 SMCC Technology
- * Development Group at Sun Microsystems, Inc.
- *
- * 4. The name of the Sun Microsystems, Inc nor may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * SUN MICROSYSTEMS DOES NOT CLAIM MERCHANTABILITY OF THIS SOFTWARE OR THE
- * SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE. The software is
- * provided "as is" without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this software.
- */
-
-#ifndef _ALTQ_ALTQ_CBQ_H_
-#define _ALTQ_ALTQ_CBQ_H_
-
-#include
-#include
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NULL_CLASS_HANDLE 0
-
-/* class flags should be same as class flags in rm_class.h */
-#define CBQCLF_RED 0x0001 /* use RED */
-#define CBQCLF_ECN 0x0002 /* use RED/ECN */
-#define CBQCLF_RIO 0x0004 /* use RIO */
-#define CBQCLF_FLOWVALVE 0x0008 /* use flowvalve (aka penalty-box) */
-#define CBQCLF_CLEARDSCP 0x0010 /* clear diffserv codepoint */
-#define CBQCLF_BORROW 0x0020 /* borrow from parent */
-
-/* class flags only for root class */
-#define CBQCLF_WRR 0x0100 /* weighted-round robin */
-#define CBQCLF_EFFICIENT 0x0200 /* work-conserving */
-
-/* class flags for special classes */
-#define CBQCLF_ROOTCLASS 0x1000 /* root class */
-#define CBQCLF_DEFCLASS 0x2000 /* default class */
-#ifdef ALTQ3_COMPAT
-#define CBQCLF_CTLCLASS 0x4000 /* control class */
-#endif
-#define CBQCLF_CLASSMASK 0xf000 /* class mask */
-
-#define CBQ_MAXQSIZE 200
-#define CBQ_MAXPRI RM_MAXPRIO
-
-typedef struct _cbq_class_stats_ {
- uint32_t handle;
- u_int depth;
-
- struct pktcntr xmit_cnt; /* packets sent in this class */
- struct pktcntr drop_cnt; /* dropped packets */
- u_int over; /* # times went over limit */
- u_int borrows; /* # times tried to borrow */
- u_int overactions; /* # times invoked overlimit action */
- u_int delays; /* # times invoked delay actions */
-
- /* other static class parameters useful for debugging */
- int priority;
- int maxidle;
- int minidle;
- int offtime;
- int qmax;
- int ns_per_byte;
- int wrr_allot;
-
- int qcnt; /* # packets in queue */
- int avgidle;
-
- /* red and rio related info */
- int qtype;
- struct redstats red[3];
-} class_stats_t;
-
-#ifdef ALTQ3_COMPAT
-/*
- * Define structures associated with IOCTLS for cbq.
- */
-
-/*
- * Define the CBQ interface structure. This must be included in all
- * IOCTL's such that the CBQ driver may find the appropriate CBQ module
- * associated with the network interface to be affected.
- */
-struct cbq_interface {
- char cbq_ifacename[IFNAMSIZ];
-};
-
-typedef struct cbq_class_spec {
- u_int priority;
- u_int nano_sec_per_byte;
- u_int maxq;
- u_int maxidle;
- int minidle;
- u_int offtime;
- uint32_t parent_class_handle;
- uint32_t borrow_class_handle;
-
- u_int pktsize;
- int flags;
-} cbq_class_spec_t;
-
-struct cbq_add_class {
- struct cbq_interface cbq_iface;
-
- cbq_class_spec_t cbq_class;
- uint32_t cbq_class_handle;
-};
-
-struct cbq_delete_class {
- struct cbq_interface cbq_iface;
- uint32_t cbq_class_handle;
-};
-
-struct cbq_modify_class {
- struct cbq_interface cbq_iface;
-
- cbq_class_spec_t cbq_class;
- uint32_t cbq_class_handle;
-};
-
-struct cbq_add_filter {
- struct cbq_interface cbq_iface;
- uint32_t cbq_class_handle;
- struct flow_filter cbq_filter;
-
- u_long cbq_filter_handle;
-};
-
-struct cbq_delete_filter {
- struct cbq_interface cbq_iface;
- u_long cbq_filter_handle;
-};
-
-/* number of classes are returned in nclasses field */
-struct cbq_getstats {
- struct cbq_interface iface;
- int nclasses;
- class_stats_t *stats;
-};
-
-/*
- * Define IOCTLs for CBQ.
- */
-#define CBQ_IF_ATTACH _IOW('Q', 1, struct cbq_interface)
-#define CBQ_IF_DETACH _IOW('Q', 2, struct cbq_interface)
-#define CBQ_ENABLE _IOW('Q', 3, struct cbq_interface)
-#define CBQ_DISABLE _IOW('Q', 4, struct cbq_interface)
-#define CBQ_CLEAR_HIERARCHY _IOW('Q', 5, struct cbq_interface)
-#define CBQ_ADD_CLASS _IOWR('Q', 7, struct cbq_add_class)
-#define CBQ_DEL_CLASS _IOW('Q', 8, struct cbq_delete_class)
-#define CBQ_MODIFY_CLASS _IOWR('Q', 9, struct cbq_modify_class)
-#define CBQ_ADD_FILTER _IOWR('Q', 10, struct cbq_add_filter)
-#define CBQ_DEL_FILTER _IOW('Q', 11, struct cbq_delete_filter)
-#define CBQ_GETSTATS _IOWR('Q', 12, struct cbq_getstats)
-#endif /* ALTQ3_COMPAT */
-
-#ifdef _KERNEL
-/*
- * Define macros only good for kernel drivers and modules.
- */
-#define CBQ_WATCHDOG (hz / 20)
-#define CBQ_TIMEOUT 10
-#define CBQ_LS_TIMEOUT (20 * hz / 1000)
-
-#define CBQ_MAX_CLASSES 256
-
-#ifdef ALTQ3_COMPAT
-#define CBQ_MAX_FILTERS 256
-
-#define DISABLE 0x00
-#define ENABLE 0x01
-#endif /* ALTQ3_COMPAT */
-
-/*
- * Define State structures.
- */
-typedef struct cbqstate {
-#ifdef ALTQ3_COMPAT
- struct cbqstate *cbq_next;
-#endif
- int cbq_qlen; /* # of packets in cbq */
- struct rm_class *cbq_class_tbl[CBQ_MAX_CLASSES];
-
- struct rm_ifdat ifnp;
- struct callout cbq_callout; /* for timeouts */
-#ifdef ALTQ3_CLFIER_COMPAT
- struct acc_classifier cbq_classifier;
-#endif
-} cbq_state_t;
-
-#endif /* _KERNEL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_ALTQ_ALTQ_CBQ_H_ */
diff --git a/include.new/altq/altq_cdnr.h b/include.new/altq/altq_cdnr.h
deleted file mode 100644
index f22fec7..0000000
--- a/include.new/altq/altq_cdnr.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/* $KAME: altq_cdnr.h,v 1.9 2003/07/10 12:07:48 kjc Exp $ */
-
-/*
- * Copyright (C) 1999-2002
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-
-#ifndef _ALTQ_ALTQ_CDNR_H_
-#define _ALTQ_ALTQ_CDNR_H_
-
-#include
-
-/*
- * traffic conditioner element types
- */
-#define TCETYPE_NONE 0
-#define TCETYPE_TOP 1 /* top level conditioner */
-#define TCETYPE_ELEMENT 2 /* a simple tc element */
-#define TCETYPE_TBMETER 3 /* token bucket meter */
-#define TCETYPE_TRTCM 4 /* (two-rate) three color marker */
-#define TCETYPE_TSWTCM 5 /* time sliding window 3-color maker */
-
-/*
- * traffic conditioner action
- */
-struct cdnr_block;
-
-struct tc_action {
- int tca_code; /* e.g., TCACODE_PASS */
- /* tca_code dependent variable */
- union {
- u_long un_value; /* template */
- u_int8_t un_dscp; /* diffserv code point */
- u_long un_handle; /* tc action handle */
- struct cdnr_block *un_next; /* next tc element block */
- } tca_un;
-};
-#define tca_value tca_un.un_value
-#define tca_dscp tca_un.un_dscp
-#define tca_handle tca_un.un_handle
-#define tca_next tca_un.un_next
-
-#define TCACODE_NONE 0 /* action is not set */
-#define TCACODE_PASS 1 /* pass this packet */
-#define TCACODE_DROP 2 /* discard this packet */
-#define TCACODE_RETURN 3 /* do not process this packet */
-#define TCACODE_MARK 4 /* mark dscp */
-#define TCACODE_HANDLE 5 /* take action specified by handle */
-#define TCACODE_NEXT 6 /* take action in the next tc element */
-#define TCACODE_MAX 6
-
-#define CDNR_NULL_HANDLE 0
-
-struct cdnr_interface {
- char cdnr_ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */
-};
-
-/* simple element operations */
-struct cdnr_add_element {
- struct cdnr_interface iface;
- struct tc_action action;
-
- u_long cdnr_handle; /* return value */
-};
-
-struct cdnr_delete_element {
- struct cdnr_interface iface;
- u_long cdnr_handle;
-};
-
-/* token-bucket meter operations */
-struct cdnr_add_tbmeter {
- struct cdnr_interface iface;
- struct tb_profile profile;
- struct tc_action in_action;
- struct tc_action out_action;
-
- u_long cdnr_handle; /* return value */
-};
-
-struct cdnr_modify_tbmeter {
- struct cdnr_interface iface;
- u_long cdnr_handle;
- struct tb_profile profile;
-};
-
-struct cdnr_tbmeter_stats {
- struct cdnr_interface iface;
- u_long cdnr_handle;
- struct pktcntr in_cnt;
- struct pktcntr out_cnt;
-};
-
-/* two-rate three-color marker operations */
-struct cdnr_add_trtcm {
- struct cdnr_interface iface;
- struct tb_profile cmtd_profile; /* profile for committed tb */
- struct tb_profile peak_profile; /* profile for peak tb */
- struct tc_action green_action; /* action for green packets */
- struct tc_action yellow_action; /* action for yellow packets */
- struct tc_action red_action; /* action for red packets */
- int coloraware; /* color-aware/color-blind */
-
- u_long cdnr_handle; /* return value */
-};
-
-struct cdnr_modify_trtcm {
- struct cdnr_interface iface;
- u_long cdnr_handle;
- struct tb_profile cmtd_profile; /* profile for committed tb */
- struct tb_profile peak_profile; /* profile for peak tb */
- int coloraware; /* color-aware/color-blind */
-};
-
-struct cdnr_tcm_stats {
- struct cdnr_interface iface;
- u_long cdnr_handle;
- struct pktcntr green_cnt;
- struct pktcntr yellow_cnt;
- struct pktcntr red_cnt;
-};
-
-/* time sliding window three-color marker operations */
-struct cdnr_add_tswtcm {
- struct cdnr_interface iface;
- uint32_t cmtd_rate; /* committed rate (bits/sec) */
- uint32_t peak_rate; /* peak rate (bits/sec) */
- uint32_t avg_interval; /* averaging interval (msec) */
- struct tc_action green_action; /* action for green packets */
- struct tc_action yellow_action; /* action for yellow packets */
- struct tc_action red_action; /* action for red packets */
-
- u_long cdnr_handle; /* return value */
-};
-
-struct cdnr_modify_tswtcm {
- struct cdnr_interface iface;
- u_long cdnr_handle;
- uint32_t cmtd_rate; /* committed rate (bits/sec) */
- uint32_t peak_rate; /* peak rate (bits/sec) */
- uint32_t avg_interval; /* averaging interval (msec) */
-};
-
-struct cdnr_add_filter {
- struct cdnr_interface iface;
- u_long cdnr_handle;
-#ifdef ALTQ3_CLFIER_COMPAT
- struct flow_filter filter;
-#endif
- u_long filter_handle; /* return value */
-};
-
-struct cdnr_delete_filter {
- struct cdnr_interface iface;
- u_long filter_handle;
-};
-
-struct tce_stats {
- u_long tce_handle; /* tc element handle */
- int tce_type; /* e.g., TCETYPE_ELEMENT */
- struct pktcntr tce_cnts[3]; /* tcm returns 3 counters */
-};
-
-struct cdnr_get_stats {
- struct cdnr_interface iface;
- struct pktcntr cnts[TCACODE_MAX+1];
-
- /* element stats */
- int nskip; /* skip # of elements */
- int nelements; /* # of element stats (WR) */
- struct tce_stats *tce_stats; /* pointer to stats array */
-};
-
-#define CDNR_IF_ATTACH _IOW('Q', 1, struct cdnr_interface)
-#define CDNR_IF_DETACH _IOW('Q', 2, struct cdnr_interface)
-#define CDNR_ENABLE _IOW('Q', 3, struct cdnr_interface)
-#define CDNR_DISABLE _IOW('Q', 4, struct cdnr_interface)
-#define CDNR_ADD_FILTER _IOWR('Q', 10, struct cdnr_add_filter)
-#define CDNR_DEL_FILTER _IOW('Q', 11, struct cdnr_delete_filter)
-#define CDNR_GETSTATS _IOWR('Q', 12, struct cdnr_get_stats)
-#define CDNR_ADD_ELEM _IOWR('Q', 30, struct cdnr_add_element)
-#define CDNR_DEL_ELEM _IOW('Q', 31, struct cdnr_delete_element)
-#define CDNR_ADD_TBM _IOWR('Q', 32, struct cdnr_add_tbmeter)
-#define CDNR_MOD_TBM _IOW('Q', 33, struct cdnr_modify_tbmeter)
-#define CDNR_TBM_STATS _IOWR('Q', 34, struct cdnr_tbmeter_stats)
-#define CDNR_ADD_TCM _IOWR('Q', 35, struct cdnr_add_trtcm)
-#define CDNR_MOD_TCM _IOWR('Q', 36, struct cdnr_modify_trtcm)
-#define CDNR_TCM_STATS _IOWR('Q', 37, struct cdnr_tcm_stats)
-#define CDNR_ADD_TSW _IOWR('Q', 38, struct cdnr_add_tswtcm)
-#define CDNR_MOD_TSW _IOWR('Q', 39, struct cdnr_modify_tswtcm)
-
-#ifndef DSCP_EF
-/* diffserve code points */
-#define DSCP_MASK 0xfc
-#define DSCP_CUMASK 0x03
-#define DSCP_EF 0xb8
-#define DSCP_AF11 0x28
-#define DSCP_AF12 0x30
-#define DSCP_AF13 0x38
-#define DSCP_AF21 0x48
-#define DSCP_AF22 0x50
-#define DSCP_AF23 0x58
-#define DSCP_AF31 0x68
-#define DSCP_AF32 0x70
-#define DSCP_AF33 0x78
-#define DSCP_AF41 0x88
-#define DSCP_AF42 0x90
-#define DSCP_AF43 0x98
-#define AF_CLASSMASK 0xe0
-#define AF_DROPPRECMASK 0x18
-#endif
-
-#ifdef _KERNEL
-
-/*
- * packet information passed to the input function of tc elements
- */
-struct cdnr_pktinfo {
- int pkt_len; /* packet length */
- u_int8_t pkt_dscp; /* diffserv code point */
-};
-
-/*
- * traffic conditioner control block common to all types of tc elements
- */
-struct cdnr_block {
- LIST_ENTRY(cdnr_block) cb_next;
- int cb_len; /* size of this tc element */
- int cb_type; /* cdnr block type */
- int cb_ref; /* reference count of this element */
- u_long cb_handle; /* handle of this tc element */
- struct top_cdnr *cb_top; /* back pointer to top */
- struct tc_action cb_action; /* top level action for this tcb */
- struct tc_action *(*cb_input)(struct cdnr_block *,
- struct cdnr_pktinfo *);
-};
-
-/*
- * top level traffic conditioner structure for an interface
- */
-struct top_cdnr {
- struct cdnr_block tc_block;
-
- LIST_ENTRY(top_cdnr) tc_next;
- struct ifaltq *tc_ifq;
-
- LIST_HEAD(, cdnr_block) tc_elements;
-#ifdef ALTQ3_CLFIER_COMPAT
- struct acc_classifier tc_classifier;
-#endif
- struct pktcntr tc_cnts[TCACODE_MAX+1];
-};
-
-/* token bucket element */
-struct tbe {
- u_int64_t rate;
- u_int64_t depth;
-
- u_int64_t token;
- u_int64_t filluptime;
- u_int64_t last;
-};
-
-/* token bucket meter structure */
-struct tbmeter {
- struct cdnr_block cdnrblk; /* conditioner block */
- struct tbe tb; /* token bucket */
- struct tc_action in_action; /* actions for IN/OUT */
- struct tc_action out_action; /* actions for IN/OUT */
- struct pktcntr in_cnt; /* statistics for IN/OUT */
- struct pktcntr out_cnt; /* statistics for IN/OUT */
-};
-
-/* two-rate three-color marker structure */
-struct trtcm {
- struct cdnr_block cdnrblk; /* conditioner block */
- struct tbe cmtd_tb; /* committed tb profile */
- struct tbe peak_tb; /* peak tb profile */
- struct tc_action green_action;
- struct tc_action yellow_action;
- struct tc_action red_action;
- int coloraware;
- u_int8_t green_dscp;
- u_int8_t yellow_dscp;
- u_int8_t red_dscp;
- struct pktcntr green_cnt;
- struct pktcntr yellow_cnt;
- struct pktcntr red_cnt;
-};
-
-/* time sliding window three-color marker structure */
-struct tswtcm {
- struct cdnr_block cdnrblk; /* conditioner block */
-
- uint32_t avg_rate; /* average rate (bytes/sec) */
- u_int64_t t_front; /* timestamp of last update */
-
- u_int64_t timewin; /* average interval */
- uint32_t cmtd_rate; /* committed target rate */
- uint32_t peak_rate; /* peak target rate */
- struct tc_action green_action;
- struct tc_action yellow_action;
- struct tc_action red_action;
- u_int8_t green_dscp;
- u_int8_t yellow_dscp;
- u_int8_t red_dscp;
- struct pktcntr green_cnt;
- struct pktcntr yellow_cnt;
- struct pktcntr red_cnt;
-};
-
-#endif /* _KERNEL */
-
-#endif /* _ALTQ_ALTQ_CDNR_H_ */
diff --git a/include.new/altq/altq_classq.h b/include.new/altq/altq_classq.h
deleted file mode 100644
index dc5c646..0000000
--- a/include.new/altq/altq_classq.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* $KAME: altq_classq.h,v 1.6 2003/01/07 07:33:38 kjc Exp $ */
-
-/*
- * Copyright (c) 1991-1997 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 Network Research
- * Group at Lawrence Berkeley Laboratory.
- * 4. Neither the name of the University nor of the Laboratory 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.
- */
-/*
- * class queue definitions extracted from rm_class.h.
- */
-#ifndef _ALTQ_ALTQ_CLASSQ_H_
-#define _ALTQ_ALTQ_CLASSQ_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Packet Queue types: RED or DROPHEAD.
- */
-#define Q_DROPHEAD 0x00
-#define Q_RED 0x01
-#define Q_RIO 0x02
-#define Q_DROPTAIL 0x03
-
-#ifdef _KERNEL
-
-/*
- * Packet Queue structures and macros to manipulate them.
- */
-struct _class_queue_ {
- struct mbuf *tail_; /* Tail of packet queue */
- int qlen_; /* Queue length (in number of packets) */
- int qlim_; /* Queue limit (in number of packets*) */
- int qtype_; /* Queue type */
-};
-
-typedef struct _class_queue_ class_queue_t;
-
-#define qtype(q) (q)->qtype_ /* Get queue type */
-#define qlimit(q) (q)->qlim_ /* Max packets to be queued */
-#define qlen(q) (q)->qlen_ /* Current queue length. */
-#define qtail(q) (q)->tail_ /* Tail of the queue */
-#define qhead(q) ((q)->tail_ ? (q)->tail_->m_nextpkt : NULL)
-
-#define qempty(q) ((q)->qlen_ == 0) /* Is the queue empty?? */
-#define q_is_red(q) ((q)->qtype_ == Q_RED) /* Is the queue a red queue */
-#define q_is_rio(q) ((q)->qtype_ == Q_RIO) /* Is the queue a rio queue */
-#define q_is_red_or_rio(q) ((q)->qtype_ == Q_RED || (q)->qtype_ == Q_RIO)
-
-#if !defined(__GNUC__) || defined(ALTQ_DEBUG)
-
-extern void _addq(class_queue_t *, struct mbuf *);
-extern struct mbuf *_getq(class_queue_t *);
-extern struct mbuf *_getq_tail(class_queue_t *);
-extern struct mbuf *_getq_random(class_queue_t *);
-extern void _removeq(class_queue_t *, struct mbuf *);
-extern void _flushq(class_queue_t *);
-
-#else /* __GNUC__ && !ALTQ_DEBUG */
-/*
- * inlined versions
- */
-static __inline void
-_addq(class_queue_t *q, struct mbuf *m)
-{
- struct mbuf *m0;
-
- if ((m0 = qtail(q)) != NULL)
- m->m_nextpkt = m0->m_nextpkt;
- else
- m0 = m;
- m0->m_nextpkt = m;
- qtail(q) = m;
- qlen(q)++;
-}
-
-static __inline struct mbuf *
-_getq(class_queue_t *q)
-{
- struct mbuf *m, *m0;
-
- if ((m = qtail(q)) == NULL)
- return (NULL);
- if ((m0 = m->m_nextpkt) != m)
- m->m_nextpkt = m0->m_nextpkt;
- else
- qtail(q) = NULL;
- qlen(q)--;
- m0->m_nextpkt = NULL;
- return (m0);
-}
-
-/* drop a packet at the tail of the queue */
-static __inline struct mbuf *
-_getq_tail(class_queue_t *q)
-{
- struct mbuf *m, *m0, *prev;
-
- if ((m = m0 = qtail(q)) == NULL)
- return NULL;
- do {
- prev = m0;
- m0 = m0->m_nextpkt;
- } while (m0 != m);
- prev->m_nextpkt = m->m_nextpkt;
- if (prev == m)
- qtail(q) = NULL;
- else
- qtail(q) = prev;
- qlen(q)--;
- m->m_nextpkt = NULL;
- return (m);
-}
-
-/* randomly select a packet in the queue */
-static __inline struct mbuf *
-_getq_random(class_queue_t *q)
-{
- struct mbuf *m;
- int i, n;
-
- if ((m = qtail(q)) == NULL)
- return NULL;
- if (m->m_nextpkt == m)
- qtail(q) = NULL;
- else {
- struct mbuf *prev = NULL;
-
- n = random() % qlen(q) + 1;
- for (i = 0; i < n; i++) {
- prev = m;
- m = m->m_nextpkt;
- }
- prev->m_nextpkt = m->m_nextpkt;
- if (m == qtail(q))
- qtail(q) = prev;
- }
- qlen(q)--;
- m->m_nextpkt = NULL;
- return (m);
-}
-
-static __inline void
-_removeq(class_queue_t *q, struct mbuf *m)
-{
- struct mbuf *m0, *prev;
-
- m0 = qtail(q);
- do {
- prev = m0;
- m0 = m0->m_nextpkt;
- } while (m0 != m);
- prev->m_nextpkt = m->m_nextpkt;
- if (prev == m)
- qtail(q) = NULL;
- else if (qtail(q) == m)
- qtail(q) = prev;
- qlen(q)--;
-}
-
-static __inline void
-_flushq(class_queue_t *q)
-{
- struct mbuf *m;
-
- while ((m = _getq(q)) != NULL)
- m_freem(m);
-}
-
-#endif /* __GNUC__ && !ALTQ_DEBUG */
-
-#endif /* _KERNEL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ALTQ_ALTQ_CLASSQ_H_ */
diff --git a/include.new/altq/altq_hfsc.h b/include.new/altq/altq_hfsc.h
deleted file mode 100644
index f343477..0000000
--- a/include.new/altq/altq_hfsc.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* $KAME: altq_hfsc.h,v 1.12 2003/12/05 05:40:46 kjc Exp $ */
-
-/*
- * Copyright (c) 1997-1999 Carnegie Mellon University. All Rights Reserved.
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation is hereby granted (including for commercial or
- * for-profit use), provided that both the copyright notice and this
- * permission notice appear in all copies of the software, derivative
- * works, or modified versions, and any portions thereof.
- *
- * THIS SOFTWARE IS EXPERIMENTAL AND IS KNOWN TO HAVE BUGS, SOME OF
- * WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON PROVIDES THIS
- * SOFTWARE IN ITS ``AS IS'' CONDITION, 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 CARNEGIE MELLON UNIVERSITY 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.
- *
- * Carnegie Mellon encourages (but does not require) users of this
- * software to return any improvements or extensions that they make,
- * and to grant Carnegie Mellon the rights to redistribute these
- * changes without encumbrance.
- */
-#ifndef _ALTQ_ALTQ_HFSC_H_
-#define _ALTQ_ALTQ_HFSC_H_
-
-#include
-#include
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct service_curve {
- u_int m1; /* slope of the first segment in bits/sec */
- u_int d; /* the x-projection of the first segment in msec */
- u_int m2; /* slope of the second segment in bits/sec */
-};
-
-/* special class handles */
-#define HFSC_NULLCLASS_HANDLE 0
-#define HFSC_MAX_CLASSES 64
-
-/* hfsc class flags */
-#define HFCF_RED 0x0001 /* use RED */
-#define HFCF_ECN 0x0002 /* use RED/ECN */
-#define HFCF_RIO 0x0004 /* use RIO */
-#define HFCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */
-#define HFCF_DEFAULTCLASS 0x1000 /* default class */
-
-/* service curve types */
-#define HFSC_REALTIMESC 1
-#define HFSC_LINKSHARINGSC 2
-#define HFSC_UPPERLIMITSC 4
-#define HFSC_DEFAULTSC (HFSC_REALTIMESC|HFSC_LINKSHARINGSC)
-
-struct hfsc_classstats {
- u_int class_id;
- uint32_t class_handle;
- struct service_curve rsc;
- struct service_curve fsc;
- struct service_curve usc; /* upper limit service curve */
-
- u_int64_t total; /* total work in bytes */
- u_int64_t cumul; /* cumulative work in bytes
- done by real-time criteria */
- u_int64_t d; /* deadline */
- u_int64_t e; /* eligible time */
- u_int64_t vt; /* virtual time */
- u_int64_t f; /* fit time for upper-limit */
-
- /* info helpful for debugging */
- u_int64_t initvt; /* init virtual time */
- u_int64_t vtoff; /* cl_vt_ipoff */
- u_int64_t cvtmax; /* cl_maxvt */
- u_int64_t myf; /* cl_myf */
- u_int64_t cfmin; /* cl_mincf */
- u_int64_t cvtmin; /* cl_mincvt */
- u_int64_t myfadj; /* cl_myfadj */
- u_int64_t vtadj; /* cl_vtadj */
- u_int64_t cur_time;
- uint32_t machclk_freq;
-
- u_int qlength;
- u_int qlimit;
- struct pktcntr xmit_cnt;
- struct pktcntr drop_cnt;
- u_int period;
-
- u_int vtperiod; /* vt period sequence no */
- u_int parentperiod; /* parent's vt period seqno */
- int nactive; /* number of active children */
-
- /* red and rio related info */
- int qtype;
- struct redstats red[3];
-};
-
-#ifdef ALTQ3_COMPAT
-struct hfsc_interface {
- char hfsc_ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */
-};
-
-struct hfsc_attach {
- struct hfsc_interface iface;
- u_int bandwidth; /* link bandwidth in bits/sec */
-};
-
-struct hfsc_add_class {
- struct hfsc_interface iface;
- uint32_t parent_handle;
- struct service_curve service_curve;
- int qlimit;
- int flags;
-
- uint32_t class_handle; /* return value */
-};
-
-struct hfsc_delete_class {
- struct hfsc_interface iface;
- uint32_t class_handle;
-};
-
-struct hfsc_modify_class {
- struct hfsc_interface iface;
- uint32_t class_handle;
- struct service_curve service_curve;
- int sctype;
-};
-
-struct hfsc_add_filter {
- struct hfsc_interface iface;
- uint32_t class_handle;
- struct flow_filter filter;
-
- u_long filter_handle; /* return value */
-};
-
-struct hfsc_delete_filter {
- struct hfsc_interface iface;
- u_long filter_handle;
-};
-
-struct hfsc_class_stats {
- struct hfsc_interface iface;
- int nskip; /* skip # of classes */
- int nclasses; /* # of class stats (WR) */
- u_int64_t cur_time; /* current time */
- uint32_t machclk_freq; /* machine clock frequency */
- u_int hif_classes; /* # of classes in the tree */
- u_int hif_packets; /* # of packets in the tree */
- struct hfsc_classstats *stats; /* pointer to stats array */
-};
-
-#define HFSC_IF_ATTACH _IOW('Q', 1, struct hfsc_attach)
-#define HFSC_IF_DETACH _IOW('Q', 2, struct hfsc_interface)
-#define HFSC_ENABLE _IOW('Q', 3, struct hfsc_interface)
-#define HFSC_DISABLE _IOW('Q', 4, struct hfsc_interface)
-#define HFSC_CLEAR_HIERARCHY _IOW('Q', 5, struct hfsc_interface)
-#define HFSC_ADD_CLASS _IOWR('Q', 7, struct hfsc_add_class)
-#define HFSC_DEL_CLASS _IOW('Q', 8, struct hfsc_delete_class)
-#define HFSC_MOD_CLASS _IOW('Q', 9, struct hfsc_modify_class)
-#define HFSC_ADD_FILTER _IOWR('Q', 10, struct hfsc_add_filter)
-#define HFSC_DEL_FILTER _IOW('Q', 11, struct hfsc_delete_filter)
-#define HFSC_GETSTATS _IOWR('Q', 12, struct hfsc_class_stats)
-#endif /* ALTQ3_COMPAT */
-
-#ifdef _KERNEL
-/*
- * kernel internal service curve representation
- * coordinates are given by 64 bit unsigned integers.
- * x-axis: unit is clock count. for the intel x86 architecture,
- * the raw Pentium TSC (Timestamp Counter) value is used.
- * virtual time is also calculated in this time scale.
- * y-axis: unit is byte.
- *
- * the service curve parameters are converted to the internal
- * representation.
- * the slope values are scaled to avoid overflow.
- * the inverse slope values as well as the y-projection of the 1st
- * segment are kept in order to to avoid 64-bit divide operations
- * that are expensive on 32-bit architectures.
- *
- * note: Intel Pentium TSC never wraps around in several thousands of years.
- * x-axis doesn't wrap around for 1089 years with 1GHz clock.
- * y-axis doesn't wrap around for 4358 years with 1Gbps bandwidth.
- */
-
-/* kernel internal representation of a service curve */
-struct internal_sc {
- u_int64_t sm1; /* scaled slope of the 1st segment */
- u_int64_t ism1; /* scaled inverse-slope of the 1st segment */
- u_int64_t dx; /* the x-projection of the 1st segment */
- u_int64_t dy; /* the y-projection of the 1st segment */
- u_int64_t sm2; /* scaled slope of the 2nd segment */
- u_int64_t ism2; /* scaled inverse-slope of the 2nd segment */
-};
-
-/* runtime service curve */
-struct runtime_sc {
- u_int64_t x; /* current starting position on x-axis */
- u_int64_t y; /* current starting position on x-axis */
- u_int64_t sm1; /* scaled slope of the 1st segment */
- u_int64_t ism1; /* scaled inverse-slope of the 1st segment */
- u_int64_t dx; /* the x-projection of the 1st segment */
- u_int64_t dy; /* the y-projection of the 1st segment */
- u_int64_t sm2; /* scaled slope of the 2nd segment */
- u_int64_t ism2; /* scaled inverse-slope of the 2nd segment */
-};
-
-struct hfsc_class {
- u_int cl_id; /* class id (just for debug) */
- uint32_t cl_handle; /* class handle */
- struct hfsc_if *cl_hif; /* back pointer to struct hfsc_if */
- int cl_flags; /* misc flags */
-
- struct hfsc_class *cl_parent; /* parent class */
- struct hfsc_class *cl_siblings; /* sibling classes */
- struct hfsc_class *cl_children; /* child classes */
-
- class_queue_t *cl_q; /* class queue structure */
- struct red *cl_red; /* RED state */
- struct altq_pktattr *cl_pktattr; /* saved header used by ECN */
-
- u_int64_t cl_total; /* total work in bytes */
- u_int64_t cl_cumul; /* cumulative work in bytes
- done by real-time criteria */
- u_int64_t cl_d; /* deadline */
- u_int64_t cl_e; /* eligible time */
- u_int64_t cl_vt; /* virtual time */
- u_int64_t cl_f; /* time when this class will fit for
- link-sharing, max(myf, cfmin) */
- u_int64_t cl_myf; /* my fit-time (as calculated from this
- class's own upperlimit curve) */
- u_int64_t cl_myfadj; /* my fit-time adjustment
- (to cancel history dependence) */
- u_int64_t cl_cfmin; /* earliest children's fit-time (used
- with cl_myf to obtain cl_f) */
- u_int64_t cl_cvtmin; /* minimal virtual time among the
- children fit for link-sharing
- (monotonic within a period) */
- u_int64_t cl_vtadj; /* intra-period cumulative vt
- adjustment */
- u_int64_t cl_vtoff; /* inter-period cumulative vt offset */
- u_int64_t cl_cvtmax; /* max child's vt in the last period */
-
- u_int64_t cl_initvt; /* init virtual time (for debugging) */
-
- struct internal_sc *cl_rsc; /* internal real-time service curve */
- struct internal_sc *cl_fsc; /* internal fair service curve */
- struct internal_sc *cl_usc; /* internal upperlimit service curve */
- struct runtime_sc cl_deadline; /* deadline curve */
- struct runtime_sc cl_eligible; /* eligible curve */
- struct runtime_sc cl_virtual; /* virtual curve */
- struct runtime_sc cl_ulimit; /* upperlimit curve */
-
- u_int cl_vtperiod; /* vt period sequence no */
- u_int cl_parentperiod; /* parent's vt period seqno */
- int cl_nactive; /* number of active children */
-
- TAILQ_HEAD(acthead, hfsc_class) cl_actc; /* active children list */
- TAILQ_ENTRY(hfsc_class) cl_actlist; /* active children list entry */
- TAILQ_ENTRY(hfsc_class) cl_ellist; /* eligible list entry */
-
- struct {
- struct pktcntr xmit_cnt;
- struct pktcntr drop_cnt;
- u_int period;
- } cl_stats;
-};
-
-/*
- * hfsc interface state
- */
-struct hfsc_if {
- struct hfsc_if *hif_next; /* interface state list */
- struct ifaltq *hif_ifq; /* backpointer to ifaltq */
- struct hfsc_class *hif_rootclass; /* root class */
- struct hfsc_class *hif_defaultclass; /* default class */
- struct hfsc_class *hif_class_tbl[HFSC_MAX_CLASSES];
- struct hfsc_class *hif_pollcache; /* cache for poll operation */
-
- u_int hif_classes; /* # of classes in the tree */
- u_int hif_packets; /* # of packets in the tree */
- u_int hif_classid; /* class id sequence number */
-
- TAILQ_HEAD(elighead, hfsc_class) hif_eligible; /* eligible list */
-
-#ifdef ALTQ3_CLFIER_COMPAT
- struct acc_classifier hif_classifier;
-#endif
-};
-
-#endif /* _KERNEL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ALTQ_ALTQ_HFSC_H_ */
diff --git a/include.new/altq/altq_priq.h b/include.new/altq/altq_priq.h
deleted file mode 100644
index 2851702..0000000
--- a/include.new/altq/altq_priq.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* $KAME: altq_priq.h,v 1.7 2003/10/03 05:05:15 kjc Exp $ */
-/*
- * Copyright (C) 2000-2003
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-
-#ifndef _ALTQ_ALTQ_PRIQ_H_
-#define _ALTQ_ALTQ_PRIQ_H_
-
-#include
-#include
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PRIQ_MAXPRI 16 /* upper limit of the number of priorities */
-
-#ifdef ALTQ3_COMPAT
-struct priq_interface {
- char ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */
- u_long arg; /* request-specific argument */
-};
-
-struct priq_add_class {
- struct priq_interface iface;
- int pri; /* priority (0 is the lowest) */
- int qlimit; /* queue size limit */
- int flags; /* misc flags (see below) */
-
- uint32_t class_handle; /* return value */
-};
-#endif /* ALTQ3_COMPAT */
-
-/* priq class flags */
-#define PRCF_RED 0x0001 /* use RED */
-#define PRCF_ECN 0x0002 /* use RED/ECN */
-#define PRCF_RIO 0x0004 /* use RIO */
-#define PRCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */
-#define PRCF_DEFAULTCLASS 0x1000 /* default class */
-
-/* special class handles */
-#define PRIQ_NULLCLASS_HANDLE 0
-
-#ifdef ALTQ3_COMPAT
-struct priq_delete_class {
- struct priq_interface iface;
- uint32_t class_handle;
-};
-
-struct priq_modify_class {
- struct priq_interface iface;
- uint32_t class_handle;
- int pri;
- int qlimit;
- int flags;
-};
-
-struct priq_add_filter {
- struct priq_interface iface;
- uint32_t class_handle;
- struct flow_filter filter;
-
- u_long filter_handle; /* return value */
-};
-
-struct priq_delete_filter {
- struct priq_interface iface;
- u_long filter_handle;
-};
-#endif /* ALTQ3_COMPAT */
-
-struct priq_classstats {
- uint32_t class_handle;
-
- u_int qlength;
- u_int qlimit;
- u_int period;
- struct pktcntr xmitcnt; /* transmitted packet counter */
- struct pktcntr dropcnt; /* dropped packet counter */
-
- /* red and rio related info */
- int qtype;
- struct redstats red[3]; /* rio has 3 red stats */
-};
-
-#ifdef ALTQ3_COMPAT
-struct priq_class_stats {
- struct priq_interface iface;
- int maxpri; /* in/out */
-
- struct priq_classstats *stats; /* pointer to stats array */
-};
-
-#define PRIQ_IF_ATTACH _IOW('Q', 1, struct priq_interface)
-#define PRIQ_IF_DETACH _IOW('Q', 2, struct priq_interface)
-#define PRIQ_ENABLE _IOW('Q', 3, struct priq_interface)
-#define PRIQ_DISABLE _IOW('Q', 4, struct priq_interface)
-#define PRIQ_CLEAR _IOW('Q', 5, struct priq_interface)
-#define PRIQ_ADD_CLASS _IOWR('Q', 7, struct priq_add_class)
-#define PRIQ_DEL_CLASS _IOW('Q', 8, struct priq_delete_class)
-#define PRIQ_MOD_CLASS _IOW('Q', 9, struct priq_modify_class)
-#define PRIQ_ADD_FILTER _IOWR('Q', 10, struct priq_add_filter)
-#define PRIQ_DEL_FILTER _IOW('Q', 11, struct priq_delete_filter)
-#define PRIQ_GETSTATS _IOWR('Q', 12, struct priq_class_stats)
-
-#endif /* ALTQ3_COMPAT */
-
-#ifdef _KERNEL
-
-struct priq_class {
- uint32_t cl_handle; /* class handle */
- class_queue_t *cl_q; /* class queue structure */
- struct red *cl_red; /* RED state */
- int cl_pri; /* priority */
- int cl_flags; /* class flags */
- struct priq_if *cl_pif; /* back pointer to pif */
- struct altq_pktattr *cl_pktattr; /* saved header used by ECN */
-
- /* statistics */
- u_int cl_period; /* backlog period */
- struct pktcntr cl_xmitcnt; /* transmitted packet counter */
- struct pktcntr cl_dropcnt; /* dropped packet counter */
-};
-
-/*
- * priq interface state
- */
-struct priq_if {
- struct priq_if *pif_next; /* interface state list */
- struct ifaltq *pif_ifq; /* backpointer to ifaltq */
- u_int pif_bandwidth; /* link bandwidth in bps */
- int pif_maxpri; /* max priority in use */
- struct priq_class *pif_default; /* default class */
- struct priq_class *pif_classes[PRIQ_MAXPRI]; /* classes */
-#ifdef ALTQ3_CLFIER_COMPAT
- struct acc_classifier pif_classifier; /* classifier */
-#endif
-};
-
-#endif /* _KERNEL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ALTQ_ALTQ_PRIQ_H_ */
diff --git a/include.new/altq/altq_red.h b/include.new/altq/altq_red.h
deleted file mode 100644
index dc8ea0a..0000000
--- a/include.new/altq/altq_red.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/* $KAME: altq_red.h,v 1.8 2003/07/10 12:07:49 kjc Exp $ */
-
-/*
- * Copyright (C) 1997-2003
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-
-#ifndef _ALTQ_ALTQ_RED_H_
-#define _ALTQ_ALTQ_RED_H_
-
-#include
-
-#ifdef ALTQ3_COMPAT
-struct red_interface {
- char red_ifname[IFNAMSIZ];
-};
-
-struct red_stats {
- struct red_interface iface;
- int q_len;
- int q_avg;
-
- struct pktcntr xmit_cnt;
- struct pktcntr drop_cnt;
- u_int drop_forced;
- u_int drop_unforced;
- u_int marked_packets;
-
- /* static red parameters */
- int q_limit;
- int weight;
- int inv_pmax;
- int th_min;
- int th_max;
-
- /* flowvalve related stuff */
- u_int fv_flows;
- u_int fv_pass;
- u_int fv_predrop;
- u_int fv_alloc;
- u_int fv_escape;
-};
-
-struct red_conf {
- struct red_interface iface;
- int red_weight; /* weight for EWMA */
- int red_inv_pmax; /* inverse of max drop probability */
- int red_thmin; /* red min threshold */
- int red_thmax; /* red max threshold */
- int red_limit; /* max queue length */
- int red_pkttime; /* average packet time in usec */
- int red_flags; /* see below */
-};
-#endif /* ALTQ3_COMPAT */
-
-/* red flags */
-#define REDF_ECN4 0x01 /* use packet marking for IPv4 packets */
-#define REDF_ECN6 0x02 /* use packet marking for IPv6 packets */
-#define REDF_ECN (REDF_ECN4 | REDF_ECN6)
-#define REDF_FLOWVALVE 0x04 /* use flowvalve (aka penalty-box) */
-
-/*
- * simpler versions of red parameters and statistics used by other
- * disciplines (e.g., CBQ)
- */
-struct redparams {
- int th_min; /* red min threshold */
- int th_max; /* red max threshold */
- int inv_pmax; /* inverse of max drop probability */
-};
-
-struct redstats {
- int q_avg;
- struct pktcntr xmit_cnt;
- struct pktcntr drop_cnt;
- u_int drop_forced;
- u_int drop_unforced;
- u_int marked_packets;
-};
-
-#ifdef ALTQ3_COMPAT
-/*
- * IOCTLs for RED
- */
-#define RED_IF_ATTACH _IOW('Q', 1, struct red_interface)
-#define RED_IF_DETACH _IOW('Q', 2, struct red_interface)
-#define RED_ENABLE _IOW('Q', 3, struct red_interface)
-#define RED_DISABLE _IOW('Q', 4, struct red_interface)
-#define RED_CONFIG _IOWR('Q', 6, struct red_conf)
-#define RED_GETSTATS _IOWR('Q', 12, struct red_stats)
-#define RED_SETDEFAULTS _IOW('Q', 30, struct redparams)
-#endif /* ALTQ3_COMPAT */
-
-#ifdef _KERNEL
-
-#ifdef ALTQ3_COMPAT
-struct flowvalve;
-#endif
-
-/* weight table structure for idle time calibration */
-struct wtab {
- struct wtab *w_next;
- int w_weight;
- int w_param_max;
- int w_refcount;
- int32_t w_tab[32];
-};
-
-typedef struct red {
- int red_pkttime; /* average packet time in micro sec
- used for idle calibration */
- int red_flags; /* red flags */
-
- /* red parameters */
- int red_weight; /* weight for EWMA */
- int red_inv_pmax; /* inverse of max drop probability */
- int red_thmin; /* red min threshold */
- int red_thmax; /* red max threshold */
-
- /* variables for internal use */
- int red_wshift; /* log(red_weight) */
- int red_thmin_s; /* th_min scaled by avgshift */
- int red_thmax_s; /* th_max scaled by avgshift */
- int red_probd; /* drop probability denominator */
-
- int red_avg; /* queue len avg scaled by avgshift */
- int red_count; /* packet count since last dropped/
- marked packet */
- int red_idle; /* queue was empty */
- int red_old; /* avg is above th_min */
- struct wtab *red_wtab; /* weight table */
- struct timeval red_last; /* time when the queue becomes idle */
-
-#ifdef ALTQ3_COMPAT
- struct flowvalve *red_flowvalve; /* flowvalve state */
-#endif
-
- struct {
- struct pktcntr xmit_cnt;
- struct pktcntr drop_cnt;
- u_int drop_forced;
- u_int drop_unforced;
- u_int marked_packets;
- } red_stats;
-} red_t;
-
-#ifdef ALTQ3_COMPAT
-typedef struct red_queue {
- struct red_queue *rq_next; /* next red_state in the list */
- struct ifaltq *rq_ifq; /* backpointer to ifaltq */
-
- class_queue_t *rq_q;
-
- red_t *rq_red;
-} red_queue_t;
-#endif /* ALTQ3_COMPAT */
-
-/* red drop types */
-#define DTYPE_NODROP 0 /* no drop */
-#define DTYPE_FORCED 1 /* a "forced" drop */
-#define DTYPE_EARLY 2 /* an "unforced" (early) drop */
-
-extern red_t *red_alloc(int, int, int, int, int, int);
-extern void red_destroy(red_t *);
-extern void red_getstats(red_t *, struct redstats *);
-extern int red_addq(red_t *, class_queue_t *, struct mbuf *,
- struct altq_pktattr *);
-extern struct mbuf *red_getq(red_t *, class_queue_t *);
-extern int drop_early(int, int, int);
-extern int mark_ecn(struct mbuf *, struct altq_pktattr *, int);
-extern struct wtab *wtab_alloc(int);
-extern int wtab_destroy(struct wtab *);
-extern int32_t pow_w(struct wtab *, int);
-
-#endif /* _KERNEL */
-
-#endif /* _ALTQ_ALTQ_RED_H_ */
diff --git a/include.new/altq/altq_rio.h b/include.new/altq/altq_rio.h
deleted file mode 100644
index 83210f2..0000000
--- a/include.new/altq/altq_rio.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* $KAME: altq_rio.h,v 1.9 2003/07/10 12:07:49 kjc Exp $ */
-
-/*
- * Copyright (C) 1998-2003
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-
-#ifndef _ALTQ_ALTQ_RIO_H_
-#define _ALTQ_ALTQ_RIO_H_
-
-#include
-
-/*
- * RIO: RED with IN/OUT bit
- * (extended to support more than 2 drop precedence values)
- */
-#define RIO_NDROPPREC 3 /* number of drop precedence values */
-
-#ifdef ALTQ3_COMPAT
-struct rio_interface {
- char rio_ifname[IFNAMSIZ];
-};
-
-struct rio_stats {
- struct rio_interface iface;
- int q_len[RIO_NDROPPREC];
- struct redstats q_stats[RIO_NDROPPREC];
-
- /* static red parameters */
- int q_limit;
- int weight;
- int flags;
- struct redparams q_params[RIO_NDROPPREC];
-};
-
-struct rio_conf {
- struct rio_interface iface;
- struct redparams q_params[RIO_NDROPPREC];
- int rio_weight; /* weight for EWMA */
- int rio_limit; /* max queue length */
- int rio_pkttime; /* average packet time in usec */
- int rio_flags; /* see below */
-};
-#endif /* ALTQ3_COMPAT */
-
-/* rio flags */
-#define RIOF_ECN4 0x01 /* use packet marking for IPv4 packets */
-#define RIOF_ECN6 0x02 /* use packet marking for IPv6 packets */
-#define RIOF_ECN (RIOF_ECN4 | RIOF_ECN6)
-#define RIOF_CLEARDSCP 0x200 /* clear diffserv codepoint */
-
-#ifdef ALTQ3_COMPAT
-/*
- * IOCTLs for RIO
- */
-#define RIO_IF_ATTACH _IOW('Q', 1, struct rio_interface)
-#define RIO_IF_DETACH _IOW('Q', 2, struct rio_interface)
-#define RIO_ENABLE _IOW('Q', 3, struct rio_interface)
-#define RIO_DISABLE _IOW('Q', 4, struct rio_interface)
-#define RIO_CONFIG _IOWR('Q', 6, struct rio_conf)
-#define RIO_GETSTATS _IOWR('Q', 12, struct rio_stats)
-#define RIO_SETDEFAULTS _IOW('Q', 30, struct redparams[RIO_NDROPPREC])
-#endif /* ALTQ3_COMPAT */
-
-#ifdef _KERNEL
-
-typedef struct rio {
- /* per drop precedence structure */
- struct dropprec_state {
- /* red parameters */
- int inv_pmax; /* inverse of max drop probability */
- int th_min; /* red min threshold */
- int th_max; /* red max threshold */
-
- /* variables for internal use */
- int th_min_s; /* th_min scaled by avgshift */
- int th_max_s; /* th_max scaled by avgshift */
- int probd; /* drop probability denominator */
-
- int qlen; /* queue length */
- int avg; /* (scaled) queue length average */
- int count; /* packet count since the last dropped/
- marked packet */
- int idle; /* queue was empty */
- int old; /* avg is above th_min */
- struct timeval last; /* timestamp when queue becomes idle */
- } rio_precstate[RIO_NDROPPREC];
-
- int rio_wshift; /* log(red_weight) */
- int rio_weight; /* weight for EWMA */
- struct wtab *rio_wtab; /* weight table */
-
- int rio_pkttime; /* average packet time in micro sec
- used for idle calibration */
- int rio_flags; /* rio flags */
-
- u_int8_t rio_codepoint; /* codepoint value to tag packets */
- u_int8_t rio_codepointmask; /* codepoint mask bits */
-
- struct redstats q_stats[RIO_NDROPPREC]; /* statistics */
-} rio_t;
-
-#ifdef ALTQ3_COMPAT
-typedef struct rio_queue {
- struct rio_queue *rq_next; /* next red_state in the list */
- struct ifaltq *rq_ifq; /* backpointer to ifaltq */
-
- class_queue_t *rq_q;
-
- rio_t *rq_rio;
-} rio_queue_t;
-#endif /* ALTQ3_COMPAT */
-
-extern rio_t *rio_alloc(int, struct redparams *, int, int);
-extern void rio_destroy(rio_t *);
-extern void rio_getstats(rio_t *, struct redstats *);
-extern int rio_addq(rio_t *, class_queue_t *, struct mbuf *,
- struct altq_pktattr *);
-extern struct mbuf *rio_getq(rio_t *, class_queue_t *);
-
-#endif /* _KERNEL */
-
-#endif /* _ALTQ_ALTQ_RIO_H_ */
diff --git a/include.new/altq/altq_rmclass.h b/include.new/altq/altq_rmclass.h
deleted file mode 100644
index cf0ddf4..0000000
--- a/include.new/altq/altq_rmclass.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/* $KAME: altq_rmclass.h,v 1.10 2003/08/20 23:30:23 itojun Exp $ */
-
-/*
- * Copyright (c) 1991-1997 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 Network Research
- * Group at Lawrence Berkeley Laboratory.
- * 4. Neither the name of the University nor of the Laboratory 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.
- */
-
-#ifndef _ALTQ_ALTQ_RMCLASS_H_
-#define _ALTQ_ALTQ_RMCLASS_H_
-
-#include
-
-/* #pragma ident "@(#)rm_class.h 1.20 97/10/23 SMI" */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define RM_MAXPRIO 8 /* Max priority */
-
-#ifdef _KERNEL
-
-typedef struct mbuf mbuf_t;
-typedef struct rm_ifdat rm_ifdat_t;
-typedef struct rm_class rm_class_t;
-
-struct red;
-
-/*
- * Macros for dealing with time values. We assume all times are
- * 'timevals'. `microtime' is used to get the best available clock
- * resolution. If `microtime' *doesn't* return a value that's about
- * ten times smaller than the average packet time on the fastest
- * link that will use these routines, a slightly different clock
- * scheme than this one should be used.
- * (Bias due to truncation error in this scheme will overestimate utilization
- * and discriminate against high bandwidth classes. To remove this bias an
- * integrator needs to be added. The simplest integrator uses a history of
- * 10 * avg.packet.time / min.tick.time packet completion entries. This is
- * straight forward to add but we don't want to pay the extra memory
- * traffic to maintain it if it's not necessary (occasionally a vendor
- * accidentally builds a workstation with a decent clock - e.g., Sun & HP).)
- */
-
-#define RM_GETTIME(now) microtime(&now)
-
-#define TV_LT(a, b) (((a)->tv_sec < (b)->tv_sec) || \
- (((a)->tv_usec < (b)->tv_usec) && ((a)->tv_sec <= (b)->tv_sec)))
-
-#define TV_DELTA(a, b, delta) { \
- register int xxs; \
- \
- delta = (a)->tv_usec - (b)->tv_usec; \
- if ((xxs = (a)->tv_sec - (b)->tv_sec)) { \
- switch (xxs) { \
- default: \
- /* if (xxs < 0) \
- printf("rm_class: bogus time values\n"); */ \
- delta = 0; \
- /* fall through */ \
- case 2: \
- delta += 1000000; \
- /* fall through */ \
- case 1: \
- delta += 1000000; \
- break; \
- } \
- } \
-}
-
-#define TV_ADD_DELTA(a, delta, res) { \
- register int xxus = (a)->tv_usec + (delta); \
- \
- (res)->tv_sec = (a)->tv_sec; \
- while (xxus >= 1000000) { \
- ++((res)->tv_sec); \
- xxus -= 1000000; \
- } \
- (res)->tv_usec = xxus; \
-}
-
-#define RM_TIMEOUT 2 /* 1 Clock tick. */
-
-#if 1
-#define RM_MAXQUEUED 1 /* this isn't used in ALTQ/CBQ */
-#else
-#define RM_MAXQUEUED 16 /* Max number of packets downstream of CBQ */
-#endif
-#define RM_MAXQUEUE 64 /* Max queue length */
-#define RM_FILTER_GAIN 5 /* log2 of gain, e.g., 5 => 31/32 */
-#define RM_POWER (1 << RM_FILTER_GAIN)
-#define RM_MAXDEPTH 32
-#define RM_NS_PER_SEC (1000000000)
-
-typedef struct _rm_class_stats_ {
- u_int handle;
- u_int depth;
-
- struct pktcntr xmit_cnt; /* packets sent in this class */
- struct pktcntr drop_cnt; /* dropped packets */
- u_int over; /* # times went over limit */
- u_int borrows; /* # times tried to borrow */
- u_int overactions; /* # times invoked overlimit action */
- u_int delays; /* # times invoked delay actions */
-} rm_class_stats_t;
-
-/*
- * CBQ Class state structure
- */
-struct rm_class {
- class_queue_t *q_; /* Queue of packets */
- rm_ifdat_t *ifdat_;
- int pri_; /* Class priority. */
- int depth_; /* Class depth */
- u_int ns_per_byte_; /* NanoSeconds per byte. */
- u_int maxrate_; /* Bytes per second for this class. */
- u_int allotment_; /* Fraction of link bandwidth. */
- u_int w_allotment_; /* Weighted allotment for WRR */
- int bytes_alloc_; /* Allocation for round of WRR */
-
- int avgidle_;
- int maxidle_;
- int minidle_;
- int offtime_;
- int sleeping_; /* != 0 if delaying */
- int qthresh_; /* Queue threshold for formal link sharing */
- int leaf_; /* Note whether leaf class or not.*/
-
- rm_class_t *children_; /* Children of this class */
- rm_class_t *next_; /* Next pointer, used if child */
-
- rm_class_t *peer_; /* Peer class */
- rm_class_t *borrow_; /* Borrow class */
- rm_class_t *parent_; /* Parent class */
-
- void (*overlimit)(struct rm_class *, struct rm_class *);
- void (*drop)(struct rm_class *); /* Class drop action. */
-
- struct red *red_; /* RED state pointer */
- struct altq_pktattr *pktattr_; /* saved hdr used by RED/ECN */
- int flags_;
-
- int last_pkttime_; /* saved pkt_time */
- struct timeval undertime_; /* time can next send */
- struct timeval last_; /* time last packet sent */
- struct timeval overtime_;
- struct callout callout_; /* for timeout() calls */
-
- rm_class_stats_t stats_; /* Class Statistics */
-};
-
-/*
- * CBQ Interface state
- */
-struct rm_ifdat {
- int queued_; /* # pkts queued downstream */
- int efficient_; /* Link Efficency bit */
- int wrr_; /* Enable Weighted Round-Robin */
- u_long ns_per_byte_; /* Link byte speed. */
- int maxqueued_; /* Max packets to queue */
- int maxpkt_; /* Max packet size. */
- int qi_; /* In/out pointers for downstream */
- int qo_; /* packets */
-
- /*
- * Active class state and WRR state.
- */
- rm_class_t *active_[RM_MAXPRIO]; /* Active cl's in each pri */
- int na_[RM_MAXPRIO]; /* # of active cl's in a pri */
- int num_[RM_MAXPRIO]; /* # of cl's per pri */
- int alloc_[RM_MAXPRIO]; /* Byte Allocation */
- u_long M_[RM_MAXPRIO]; /* WRR weights. */
-
- /*
- * Network Interface/Solaris Queue state pointer.
- */
- struct ifaltq *ifq_;
- rm_class_t *default_; /* Default Pkt class, BE */
- rm_class_t *root_; /* Root Link class. */
- rm_class_t *ctl_; /* Control Traffic class. */
- void (*restart)(struct ifaltq *); /* Restart routine. */
-
- /*
- * Current packet downstream packet state and dynamic state.
- */
- rm_class_t *borrowed_[RM_MAXQUEUED]; /* Class borrowed last */
- rm_class_t *class_[RM_MAXQUEUED]; /* class sending */
- int curlen_[RM_MAXQUEUED]; /* Current pktlen */
- struct timeval now_[RM_MAXQUEUED]; /* Current packet time. */
- int is_overlimit_[RM_MAXQUEUED];/* Current packet time. */
-
- int cutoff_; /* Cut-off depth for borrowing */
-
- struct timeval ifnow_; /* expected xmit completion time */
-#if 1 /* ALTQ4PPP */
- int maxiftime_; /* max delay inside interface */
-#endif
- rm_class_t *pollcache_; /* cached rm_class by poll operation */
-};
-
-/* flags for rmc_init and rmc_newclass */
-/* class flags */
-#define RMCF_RED 0x0001
-#define RMCF_ECN 0x0002
-#define RMCF_RIO 0x0004
-#define RMCF_FLOWVALVE 0x0008 /* use flowvalve (aka penalty-box) */
-#define RMCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */
-
-/* flags for rmc_init */
-#define RMCF_WRR 0x0100
-#define RMCF_EFFICIENT 0x0200
-
-#define is_a_parent_class(cl) ((cl)->children_ != NULL)
-
-extern rm_class_t *rmc_newclass(int, struct rm_ifdat *, u_int,
- void (*)(struct rm_class *, struct rm_class *),
- int, struct rm_class *, struct rm_class *,
- u_int, int, u_int, int, int);
-extern void rmc_delete_class(struct rm_ifdat *, struct rm_class *);
-extern int rmc_modclass(struct rm_class *, u_int, int,
- u_int, int, u_int, int);
-extern void rmc_init(struct ifaltq *, struct rm_ifdat *, u_int,
- void (*)(struct ifaltq *),
- int, int, u_int, int, u_int, int);
-extern int rmc_queue_packet(struct rm_class *, mbuf_t *);
-extern mbuf_t *rmc_dequeue_next(struct rm_ifdat *, int);
-extern void rmc_update_class_util(struct rm_ifdat *);
-extern void rmc_delay_action(struct rm_class *, struct rm_class *);
-extern void rmc_dropall(struct rm_class *);
-extern int rmc_get_weight(struct rm_ifdat *, int);
-
-#endif /* _KERNEL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ALTQ_ALTQ_RMCLASS_H_ */
diff --git a/include.new/altq/altq_rmclass_debug.h b/include.new/altq/altq_rmclass_debug.h
deleted file mode 100644
index 8f471b2..0000000
--- a/include.new/altq/altq_rmclass_debug.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* $KAME: altq_rmclass_debug.h,v 1.3 2002/11/29 04:36:24 kjc Exp $ */
-
-/*
- * Copyright (c) Sun Microsystems, Inc. 1998 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 SMCC Technology
- * Development Group at Sun Microsystems, Inc.
- *
- * 4. The name of the Sun Microsystems, Inc nor may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * SUN MICROSYSTEMS DOES NOT CLAIM MERCHANTABILITY OF THIS SOFTWARE OR THE
- * SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE. The software is
- * provided "as is" without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this software.
- */
-
-#ifndef _ALTQ_ALTQ_RMCLASS_DEBUG_H_
-#define _ALTQ_ALTQ_RMCLASS_DEBUG_H_
-
-/* #pragma ident "@(#)rm_class_debug.h 1.7 98/05/04 SMI" */
-
-/*
- * Cbq debugging macros
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef CBQ_TRACE
-#ifndef NCBQTRACE
-#define NCBQTRACE (16 * 1024)
-#endif
-
-/*
- * To view the trace output, using adb, type:
- * adb -k /dev/ksyms /dev/mem , then type
- * cbqtrace_count/D to get the count, then type
- * cbqtrace_buffer,0tcount/Dp4C" "Xn
- * This will dump the trace buffer from 0 to count.
- */
-/*
- * in ALTQ, "call cbqtrace_dump(N)" from DDB to display 20 events
- * from Nth event in the circular buffer.
- */
-
-struct cbqtrace {
- int count;
- int function; /* address of function */
- int trace_action; /* descriptive 4 characters */
- int object; /* object operated on */
-};
-
-extern struct cbqtrace cbqtrace_buffer[];
-extern struct cbqtrace *cbqtrace_ptr;
-extern int cbqtrace_count;
-
-#define CBQTRACEINIT() { \
- if (cbqtrace_ptr == NULL) \
- cbqtrace_ptr = cbqtrace_buffer; \
- else { \
- cbqtrace_ptr = cbqtrace_buffer; \
- bzero((void *)cbqtrace_ptr, sizeof(cbqtrace_buffer)); \
- cbqtrace_count = 0; \
- } \
-}
-
-#define LOCK_TRACE() splimp()
-#define UNLOCK_TRACE(x) splx(x)
-
-#define CBQTRACE(func, act, obj) { \
- int __s = LOCK_TRACE(); \
- int *_p = &cbqtrace_ptr->count; \
- *_p++ = ++cbqtrace_count; \
- *_p++ = (int)(func); \
- *_p++ = (int)(act); \
- *_p++ = (int)(obj); \
- if ((struct cbqtrace *)(void *)_p >= &cbqtrace_buffer[NCBQTRACE])\
- cbqtrace_ptr = cbqtrace_buffer; \
- else \
- cbqtrace_ptr = (struct cbqtrace *)(void *)_p; \
- UNLOCK_TRACE(__s); \
- }
-#else
-
-/* If no tracing, define no-ops */
-#define CBQTRACEINIT()
-#define CBQTRACE(a, b, c)
-
-#endif /* !CBQ_TRACE */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ALTQ_ALTQ_RMCLASS_DEBUG_H_ */
diff --git a/include.new/altq/altq_var.h b/include.new/altq/altq_var.h
deleted file mode 100644
index 75f9c8b..0000000
--- a/include.new/altq/altq_var.h
+++ /dev/null
@@ -1,261 +0,0 @@
-/* $FreeBSD: releng/10.2/sys/contrib/altq/altq/altq_var.h 219457 2011-03-10 18:49:15Z jkim $ */
-/* $KAME: altq_var.h,v 1.16 2003/10/03 05:05:15 kjc Exp $ */
-
-/*
- * Copyright (C) 1998-2003
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-#ifndef _ALTQ_ALTQ_VAR_H_
-#define _ALTQ_ALTQ_VAR_H_
-
-#ifdef _KERNEL
-
-#include
-#include
-#include
-
-#ifdef ALTQ3_CLFIER_COMPAT
-/*
- * filter structure for altq common classifier
- */
-struct acc_filter {
- LIST_ENTRY(acc_filter) f_chain;
- void *f_class; /* pointer to the class */
- u_long f_handle; /* filter id */
- uint32_t f_fbmask; /* filter bitmask */
- struct flow_filter f_filter; /* filter value */
-};
-
-/*
- * XXX ACC_FILTER_TABLESIZE can't be larger than 2048 unless we fix
- * the handle assignment.
- */
-#define ACC_FILTER_TABLESIZE (256+1)
-#define ACC_FILTER_MASK (ACC_FILTER_TABLESIZE - 2)
-#define ACC_WILDCARD_INDEX (ACC_FILTER_TABLESIZE - 1)
-#ifdef __GNUC__
-#define ACC_GET_HASH_INDEX(addr) \
- ({int x = (addr) + ((addr) >> 16); (x + (x >> 8)) & ACC_FILTER_MASK;})
-#else
-#define ACC_GET_HASH_INDEX(addr) \
- (((addr) + ((addr) >> 8) + ((addr) >> 16) + ((addr) >> 24)) \
- & ACC_FILTER_MASK)
-#endif
-#define ACC_GET_HINDEX(handle) ((handle) >> 20)
-
-#if (__FreeBSD_version > 500000)
-#define ACC_LOCK_INIT(ac) mtx_init(&(ac)->acc_mtx, "classifier", MTX_DEF)
-#define ACC_LOCK_DESTROY(ac) mtx_destroy(&(ac)->acc_mtx)
-#define ACC_LOCK(ac) mtx_lock(&(ac)->acc_mtx)
-#define ACC_UNLOCK(ac) mtx_unlock(&(ac)->acc_mtx)
-#else
-#define ACC_LOCK_INIT(ac)
-#define ACC_LOCK_DESTROY(ac)
-#define ACC_LOCK(ac)
-#define ACC_UNLOCK(ac)
-#endif
-
-struct acc_classifier {
- uint32_t acc_fbmask;
- LIST_HEAD(filt, acc_filter) acc_filters[ACC_FILTER_TABLESIZE];
-
-#if (__FreeBSD_version > 500000)
- struct mtx acc_mtx;
-#endif
-};
-
-/*
- * flowinfo mask bits used by classifier
- */
-/* for ipv4 */
-#define FIMB4_PROTO 0x0001
-#define FIMB4_TOS 0x0002
-#define FIMB4_DADDR 0x0004
-#define FIMB4_SADDR 0x0008
-#define FIMB4_DPORT 0x0010
-#define FIMB4_SPORT 0x0020
-#define FIMB4_GPI 0x0040
-#define FIMB4_ALL 0x007f
-/* for ipv6 */
-#define FIMB6_PROTO 0x0100
-#define FIMB6_TCLASS 0x0200
-#define FIMB6_DADDR 0x0400
-#define FIMB6_SADDR 0x0800
-#define FIMB6_DPORT 0x1000
-#define FIMB6_SPORT 0x2000
-#define FIMB6_GPI 0x4000
-#define FIMB6_FLABEL 0x8000
-#define FIMB6_ALL 0xff00
-
-#define FIMB_ALL (FIMB4_ALL|FIMB6_ALL)
-
-#define FIMB4_PORTS (FIMB4_DPORT|FIMB4_SPORT|FIMB4_GPI)
-#define FIMB6_PORTS (FIMB6_DPORT|FIMB6_SPORT|FIMB6_GPI)
-#endif /* ALTQ3_CLFIER_COMPAT */
-
-/*
- * machine dependent clock
- * a 64bit high resolution time counter.
- */
-extern int machclk_usepcc;
-extern uint32_t machclk_freq;
-extern uint32_t machclk_per_tick;
-extern void init_machclk(void);
-extern u_int64_t read_machclk(void);
-
-/*
- * debug support
- */
-#ifdef ALTQ_DEBUG
-#ifdef __STDC__
-#define ASSERT(e) ((e) ? (void)0 : altq_assert(__FILE__, __LINE__, #e))
-#else /* PCC */
-#define ASSERT(e) ((e) ? (void)0 : altq_assert(__FILE__, __LINE__, "e"))
-#endif
-#else
-#define ASSERT(e) ((void)0)
-#endif
-
-/*
- * misc stuff for compatibility
- */
-/* ioctl cmd type */
-typedef u_long ioctlcmd_t;
-
-/*
- * queue macros:
- * the interface of TAILQ_LAST macro changed after the introduction
- * of softupdate. redefine it here to make it work with pre-2.2.7.
- */
-#undef TAILQ_LAST
-#define TAILQ_LAST(head, headname) \
- (*(((struct headname *)((head)->tqh_last))->tqh_last))
-
-#ifndef TAILQ_EMPTY
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-#endif
-#ifndef TAILQ_FOREACH
-#define TAILQ_FOREACH(var, head, field) \
- for (var = TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field))
-#endif
-
-/* macro for timeout/untimeout */
-#if (__FreeBSD_version > 300000) || defined(__NetBSD__)
-/* use callout */
-#include
-
-#if (__FreeBSD_version > 500000)
-#define CALLOUT_INIT(c) callout_init((c), 0)
-#else
-#define CALLOUT_INIT(c) callout_init((c))
-#endif
-#define CALLOUT_RESET(c,t,f,a) callout_reset((c),(t),(f),(a))
-#define CALLOUT_STOP(c) callout_stop((c))
-#if !defined(CALLOUT_INITIALIZER) && (__FreeBSD_version < 600000)
-#define CALLOUT_INITIALIZER { { { NULL } }, 0, NULL, NULL, 0 }
-#endif
-#elif defined(__OpenBSD__)
-#include
-/* callout structure as a wrapper of struct timeout */
-struct callout {
- struct timeout c_to;
-};
-#define CALLOUT_INIT(c) do { bzero((c), sizeof(*(c))); } while (/*CONSTCOND*/ 0)
-#define CALLOUT_RESET(c,t,f,a) do { if (!timeout_initialized(&(c)->c_to)) \
- timeout_set(&(c)->c_to, (f), (a)); \
- timeout_add(&(c)->c_to, (t)); } while (/*CONSTCOND*/ 0)
-#define CALLOUT_STOP(c) timeout_del(&(c)->c_to)
-#define CALLOUT_INITIALIZER { { { NULL }, NULL, NULL, 0, 0 } }
-#else
-/* use old-style timeout/untimeout */
-/* dummy callout structure */
-struct callout {
- void *c_arg; /* function argument */
- void (*c_func)(void *); /* functiuon to call */
-};
-#define CALLOUT_INIT(c) do { bzero((c), sizeof(*(c))); } while (/*CONSTCOND*/ 0)
-#define CALLOUT_RESET(c,t,f,a) do { (c)->c_arg = (a); \
- (c)->c_func = (f); \
- timeout((f),(a),(t)); } while (/*CONSTCOND*/ 0)
-#define CALLOUT_STOP(c) untimeout((c)->c_func,(c)->c_arg)
-#define CALLOUT_INITIALIZER { NULL, NULL }
-#endif
-#if !defined(__FreeBSD__)
-typedef void (timeout_t)(void *);
-#endif
-
-#define m_pktlen(m) ((m)->m_pkthdr.len)
-
-struct ifnet; struct mbuf;
-struct pf_altq;
-#ifdef ALTQ3_CLFIER_COMPAT
-struct flowinfo;
-#endif
-
-void *altq_lookup(char *, int);
-#ifdef ALTQ3_CLFIER_COMPAT
-int altq_extractflow(struct mbuf *, int, struct flowinfo *, uint32_t);
-int acc_add_filter(struct acc_classifier *, struct flow_filter *,
- void *, u_long *);
-int acc_delete_filter(struct acc_classifier *, u_long);
-int acc_discard_filters(struct acc_classifier *, void *, int);
-void *acc_classify(void *, struct mbuf *, int);
-#endif
-u_int8_t read_dsfield(struct mbuf *, struct altq_pktattr *);
-void write_dsfield(struct mbuf *, struct altq_pktattr *, u_int8_t);
-void altq_assert(const char *, int, const char *);
-int tbr_set(struct ifaltq *, struct tb_profile *);
-int tbr_get(struct ifaltq *, struct tb_profile *);
-
-int altq_pfattach(struct pf_altq *);
-int altq_pfdetach(struct pf_altq *);
-int altq_add(struct pf_altq *);
-int altq_remove(struct pf_altq *);
-int altq_add_queue(struct pf_altq *);
-int altq_remove_queue(struct pf_altq *);
-int altq_getqstats(struct pf_altq *, void *, int *);
-
-int cbq_pfattach(struct pf_altq *);
-int cbq_add_altq(struct pf_altq *);
-int cbq_remove_altq(struct pf_altq *);
-int cbq_add_queue(struct pf_altq *);
-int cbq_remove_queue(struct pf_altq *);
-int cbq_getqstats(struct pf_altq *, void *, int *);
-
-int priq_pfattach(struct pf_altq *);
-int priq_add_altq(struct pf_altq *);
-int priq_remove_altq(struct pf_altq *);
-int priq_add_queue(struct pf_altq *);
-int priq_remove_queue(struct pf_altq *);
-int priq_getqstats(struct pf_altq *, void *, int *);
-
-int hfsc_pfattach(struct pf_altq *);
-int hfsc_add_altq(struct pf_altq *);
-int hfsc_remove_altq(struct pf_altq *);
-int hfsc_add_queue(struct pf_altq *);
-int hfsc_remove_queue(struct pf_altq *);
-int hfsc_getqstats(struct pf_altq *, void *, int *);
-
-#endif /* _KERNEL */
-#endif /* _ALTQ_ALTQ_VAR_H_ */
diff --git a/include.new/altq/altqconf.h b/include.new/altq/altqconf.h
deleted file mode 100644
index 4d3921c..0000000
--- a/include.new/altq/altqconf.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* $OpenBSD: altqconf.h,v 1.1 2001/06/27 05:28:36 kjc Exp $ */
-/* $NetBSD: altqconf.h,v 1.2 2001/05/30 11:57:16 mrg Exp $ */
-
-#if defined(_KERNEL_OPT) || defined(__OpenBSD__)
-
-#if defined(_KERNEL_OPT)
-#include "opt_altq_enabled.h"
-#endif
-
-#include
-
-#ifdef ALTQ
-#define NALTQ 1
-#else
-#define NALTQ 0
-#endif
-
-cdev_decl(altq);
-
-#ifdef __OpenBSD__
-#define cdev_altq_init(c,n) { \
- dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
- (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
- (dev_type_stop((*))) enodev, 0, (dev_type_select((*))) enodev, \
- (dev_type_mmap((*))) enodev }
-#else
-#define cdev_altq_init(x,y) cdev__oci_init(x,y)
-#endif
-#endif /* defined(_KERNEL_OPT) || defined(__OpenBSD__) */
diff --git a/include.new/altq/if_altq.h b/include.new/altq/if_altq.h
deleted file mode 100644
index 0b71eaf..0000000
--- a/include.new/altq/if_altq.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* $FreeBSD: releng/10.2/sys/contrib/altq/altq/if_altq.h 219457 2011-03-10 18:49:15Z jkim $ */
-/* $KAME: if_altq.h,v 1.12 2005/04/13 03:44:25 suz Exp $ */
-
-/*
- * Copyright (C) 1997-2003
- * Sony Computer Science Laboratories Inc. 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 SONY CSL 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 SONY CSL 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.
- */
-#ifndef _ALTQ_IF_ALTQ_H_
-#define _ALTQ_IF_ALTQ_H_
-
-#ifdef __FreeBSD__
-#include /* XXX */
-#include /* XXX */
-#include /* XXX */
-#endif
-
-#ifdef _KERNEL_OPT
-#include
-#endif
-
-struct altq_pktattr; struct tb_regulator; struct top_cdnr;
-
-/*
- * Structure defining a queue for a network interface.
- */
-struct ifaltq {
- /* fields compatible with struct ifqueue */
- struct mbuf *ifq_head;
- struct mbuf *ifq_tail;
- int ifq_len;
- int ifq_maxlen;
- int ifq_drops;
-#ifdef __FreeBSD__
- struct mtx ifq_mtx;
-#endif
-
- /* driver owned queue (used for bulk dequeue and prepend) UNLOCKED */
- struct mbuf *ifq_drv_head;
- struct mbuf *ifq_drv_tail;
- int ifq_drv_len;
- int ifq_drv_maxlen;
-
- /* alternate queueing related fields */
- int altq_type; /* discipline type */
- int altq_flags; /* flags (e.g. ready, in-use) */
- void *altq_disc; /* for discipline-specific use */
- struct ifnet *altq_ifp; /* back pointer to interface */
-
- int (*altq_enqueue)(struct ifaltq *, struct mbuf *,
- struct altq_pktattr *);
- struct mbuf *(*altq_dequeue)(struct ifaltq *, int);
- int (*altq_request)(struct ifaltq *, int, void *);
-
- /* classifier fields */
- void *altq_clfier; /* classifier-specific use */
- void *(*altq_classify)(void *, struct mbuf *, int);
-
- /* token bucket regulator */
- struct tb_regulator *altq_tbr;
-
- /* input traffic conditioner (doesn't belong to the output queue...) */
- struct top_cdnr *altq_cdnr;
-};
-
-
-#ifdef _KERNEL
-
-/*
- * packet attributes used by queueing disciplines.
- * pattr_class is a discipline-dependent scheduling class that is
- * set by a classifier.
- * pattr_hdr and pattr_af may be used by a discipline to access
- * the header within a mbuf. (e.g. ECN needs to update the CE bit)
- * note that pattr_hdr could be stale after m_pullup, though link
- * layer output routines usually don't use m_pullup. link-level
- * compression also invalidates these fields. thus, pattr_hdr needs
- * to be verified when a discipline touches the header.
- */
-struct altq_pktattr {
- void *pattr_class; /* sched class set by classifier */
- int pattr_af; /* address family */
- caddr_t pattr_hdr; /* saved header position in mbuf */
-};
-
-/*
- * mbuf tag to carry a queue id (and hints for ECN).
- */
-struct altq_tag {
- uint32_t qid; /* queue id */
- /* hints for ecn */
- int af; /* address family */
- void *hdr; /* saved header position in mbuf */
-};
-
-/*
- * a token-bucket regulator limits the rate that a network driver can
- * dequeue packets from the output queue.
- * modern cards are able to buffer a large amount of packets and dequeue
- * too many packets at a time. this bursty dequeue behavior makes it
- * impossible to schedule packets by queueing disciplines.
- * a token-bucket is used to control the burst size in a device
- * independent manner.
- */
-struct tb_regulator {
- int64_t tbr_rate; /* (scaled) token bucket rate */
- int64_t tbr_depth; /* (scaled) token bucket depth */
-
- int64_t tbr_token; /* (scaled) current token */
- int64_t tbr_filluptime; /* (scaled) time to fill up bucket */
- u_int64_t tbr_last; /* last time token was updated */
-
- int tbr_lastop; /* last dequeue operation type
- needed for poll-and-dequeue */
-};
-
-/* if_altqflags */
-#define ALTQF_READY 0x01 /* driver supports alternate queueing */
-#define ALTQF_ENABLED 0x02 /* altq is in use */
-#define ALTQF_CLASSIFY 0x04 /* classify packets */
-#define ALTQF_CNDTNING 0x08 /* altq traffic conditioning is enabled */
-#define ALTQF_DRIVER1 0x40 /* driver specific */
-
-/* if_altqflags set internally only: */
-#define ALTQF_CANTCHANGE (ALTQF_READY)
-
-/* altq_dequeue 2nd arg */
-#define ALTDQ_REMOVE 1 /* dequeue mbuf from the queue */
-#define ALTDQ_POLL 2 /* don't dequeue mbuf from the queue */
-
-/* altq request types (currently only purge is defined) */
-#define ALTRQ_PURGE 1 /* purge all packets */
-
-#define ALTQ_IS_READY(ifq) ((ifq)->altq_flags & ALTQF_READY)
-#define ALTQ_IS_ENABLED(ifq) ((ifq)->altq_flags & ALTQF_ENABLED)
-#define ALTQ_NEEDS_CLASSIFY(ifq) ((ifq)->altq_flags & ALTQF_CLASSIFY)
-#define ALTQ_IS_CNDTNING(ifq) ((ifq)->altq_flags & ALTQF_CNDTNING)
-
-#define ALTQ_SET_CNDTNING(ifq) ((ifq)->altq_flags |= ALTQF_CNDTNING)
-#define ALTQ_CLEAR_CNDTNING(ifq) ((ifq)->altq_flags &= ~ALTQF_CNDTNING)
-#define ALTQ_IS_ATTACHED(ifq) ((ifq)->altq_disc != NULL)
-
-#define ALTQ_ENQUEUE(ifq, m, pa, err) \
- (err) = (*(ifq)->altq_enqueue)((ifq),(m),(pa))
-#define ALTQ_DEQUEUE(ifq, m) \
- (m) = (*(ifq)->altq_dequeue)((ifq), ALTDQ_REMOVE)
-#define ALTQ_POLL(ifq, m) \
- (m) = (*(ifq)->altq_dequeue)((ifq), ALTDQ_POLL)
-#define ALTQ_PURGE(ifq) \
- (void)(*(ifq)->altq_request)((ifq), ALTRQ_PURGE, (void *)0)
-#define ALTQ_IS_EMPTY(ifq) ((ifq)->ifq_len == 0)
-#define TBR_IS_ENABLED(ifq) ((ifq)->altq_tbr != NULL)
-
-extern int altq_attach(struct ifaltq *, int, void *,
- int (*)(struct ifaltq *, struct mbuf *,
- struct altq_pktattr *),
- struct mbuf *(*)(struct ifaltq *, int),
- int (*)(struct ifaltq *, int, void *),
- void *,
- void *(*)(void *, struct mbuf *, int));
-extern int altq_detach(struct ifaltq *);
-extern int altq_enable(struct ifaltq *);
-extern int altq_disable(struct ifaltq *);
-extern struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int);
-extern int (*altq_input)(struct mbuf *, int);
-#if 0 /* ALTQ3_CLFIER_COMPAT */
-void altq_etherclassify(struct ifaltq *, struct mbuf *, struct altq_pktattr *);
-#endif
-#endif /* _KERNEL */
-
-#endif /* _ALTQ_IF_ALTQ_H_ */
diff --git a/include.new/ar.h b/include.new/ar.h
deleted file mode 100644
index c86a563..0000000
--- a/include.new/ar.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 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.
- *
- * This code is derived from software contributed to Berkeley by
- * Hugh Smith at The University of Guelph.
- *
- * 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.
- *
- * @(#)ar.h 8.2 (Berkeley) 1/21/94
- *
- * $FreeBSD: releng/10.2/include/ar.h 203964 2010-02-16 19:39:50Z imp $
- */
-
-#ifndef _AR_H_
-#define _AR_H_
-
-#include
-
-/* Pre-4BSD archives had these magic numbers in them. */
-#define OARMAG1 0177555
-#define OARMAG2 0177545
-
-#define ARMAG "!\n" /* ar "magic number" */
-#define SARMAG 8 /* strlen(ARMAG); */
-
-#define AR_EFMT1 "#1/" /* extended format #1 */
-
-struct ar_hdr {
- char ar_name[16]; /* name */
- char ar_date[12]; /* modification time */
- char ar_uid[6]; /* user id */
- char ar_gid[6]; /* group id */
- char ar_mode[8]; /* octal file permissions */
- char ar_size[10]; /* size in bytes */
-#define ARFMAG "`\n"
- char ar_fmag[2]; /* consistency check */
-} __packed;
-
-#endif /* !_AR_H_ */
diff --git a/include.new/archive.h b/include.new/archive.h
deleted file mode 100644
index db34904..0000000
--- a/include.new/archive.h
+++ /dev/null
@@ -1,1040 +0,0 @@
-/*-
- * Copyright (c) 2003-2010 Tim Kientzle
- * 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(S) ``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(S) 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: releng/10.2/contrib/libarchive/libarchive/archive.h 248616 2013-03-22 13:36:03Z mm $
- */
-
-#ifndef ARCHIVE_H_INCLUDED
-#define ARCHIVE_H_INCLUDED
-
-#include
-#include /* for wchar_t */
-#include /* For FILE * */
-
-/*
- * Note: archive.h is for use outside of libarchive; the configuration
- * headers (config.h, archive_platform.h, etc.) are purely internal.
- * Do NOT use HAVE_XXX configuration macros to control the behavior of
- * this header! If you must conditionalize, use predefined compiler and/or
- * platform macros.
- */
-#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
-# include
-#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS)
-# include
-#endif
-
-/* Get appropriate definitions of standard POSIX-style types. */
-/* These should match the types used in 'struct stat' */
-#if defined(_WIN32) && !defined(__CYGWIN__)
-# define __LA_INT64_T __int64
-# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_)
-# define __LA_SSIZE_T ssize_t
-# elif defined(_WIN64)
-# define __LA_SSIZE_T __int64
-# else
-# define __LA_SSIZE_T long
-# endif
-#else
-# include /* ssize_t */
-# if defined(_SCO_DS)
-# define __LA_INT64_T long long
-# else
-# define __LA_INT64_T int64_t
-# endif
-# define __LA_SSIZE_T ssize_t
-#endif
-
-/*
- * On Windows, define LIBARCHIVE_STATIC if you're building or using a
- * .lib. The default here assumes you're building a DLL. Only
- * libarchive source should ever define __LIBARCHIVE_BUILD.
- */
-#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
-# ifdef __LIBARCHIVE_BUILD
-# ifdef __GNUC__
-# define __LA_DECL __attribute__((dllexport)) extern
-# else
-# define __LA_DECL __declspec(dllexport)
-# endif
-# else
-# ifdef __GNUC__
-# define __LA_DECL
-# else
-# define __LA_DECL __declspec(dllimport)
-# endif
-# endif
-#else
-/* Static libraries or non-Windows needs no special declaration. */
-# define __LA_DECL
-#endif
-
-#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__MINGW32__)
-#define __LA_PRINTF(fmtarg, firstvararg) \
- __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
-#else
-#define __LA_PRINTF(fmtarg, firstvararg) /* nothing */
-#endif
-
-#if defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >= 1
-# define __LA_DEPRECATED __attribute__((deprecated))
-#else
-# define __LA_DEPRECATED
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The version number is provided as both a macro and a function.
- * The macro identifies the installed header; the function identifies
- * the library version (which may not be the same if you're using a
- * dynamically-linked version of the library). Of course, if the
- * header and library are very different, you should expect some
- * strangeness. Don't do that.
- */
-
-/*
- * The version number is expressed as a single integer that makes it
- * easy to compare versions at build time: for version a.b.c, the
- * version number is printf("%d%03d%03d",a,b,c). For example, if you
- * know your application requires version 2.12.108 or later, you can
- * assert that ARCHIVE_VERSION_NUMBER >= 2012108.
- */
-/* Note: Compiler will complain if this does not match archive_entry.h! */
-#define ARCHIVE_VERSION_NUMBER 3001002
-__LA_DECL int archive_version_number(void);
-
-/*
- * Textual name/version of the library, useful for version displays.
- */
-#define ARCHIVE_VERSION_STRING "libarchive 3.1.2"
-__LA_DECL const char * archive_version_string(void);
-
-/* Declare our basic types. */
-struct archive;
-struct archive_entry;
-
-/*
- * Error codes: Use archive_errno() and archive_error_string()
- * to retrieve details. Unless specified otherwise, all functions
- * that return 'int' use these codes.
- */
-#define ARCHIVE_EOF 1 /* Found end of archive. */
-#define ARCHIVE_OK 0 /* Operation was successful. */
-#define ARCHIVE_RETRY (-10) /* Retry might succeed. */
-#define ARCHIVE_WARN (-20) /* Partial success. */
-/* For example, if write_header "fails", then you can't push data. */
-#define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */
-/* But if write_header is "fatal," then this archive is dead and useless. */
-#define ARCHIVE_FATAL (-30) /* No more operations are possible. */
-
-/*
- * As far as possible, archive_errno returns standard platform errno codes.
- * Of course, the details vary by platform, so the actual definitions
- * here are stored in "archive_platform.h". The symbols are listed here
- * for reference; as a rule, clients should not need to know the exact
- * platform-dependent error code.
- */
-/* Unrecognized or invalid file format. */
-/* #define ARCHIVE_ERRNO_FILE_FORMAT */
-/* Illegal usage of the library. */
-/* #define ARCHIVE_ERRNO_PROGRAMMER_ERROR */
-/* Unknown or unclassified error. */
-/* #define ARCHIVE_ERRNO_MISC */
-
-/*
- * Callbacks are invoked to automatically read/skip/write/open/close the
- * archive. You can provide your own for complex tasks (like breaking
- * archives across multiple tapes) or use standard ones built into the
- * library.
- */
-
-/* Returns pointer and size of next block of data from archive. */
-typedef __LA_SSIZE_T archive_read_callback(struct archive *,
- void *_client_data, const void **_buffer);
-
-/* Skips at most request bytes from archive and returns the skipped amount.
- * This may skip fewer bytes than requested; it may even skip zero bytes.
- * If you do skip fewer bytes than requested, libarchive will invoke your
- * read callback and discard data as necessary to make up the full skip.
- */
-typedef __LA_INT64_T archive_skip_callback(struct archive *,
- void *_client_data, __LA_INT64_T request);
-
-/* Seeks to specified location in the file and returns the position.
- * Whence values are SEEK_SET, SEEK_CUR, SEEK_END from stdio.h.
- * Return ARCHIVE_FATAL if the seek fails for any reason.
- */
-typedef __LA_INT64_T archive_seek_callback(struct archive *,
- void *_client_data, __LA_INT64_T offset, int whence);
-
-/* Returns size actually written, zero on EOF, -1 on error. */
-typedef __LA_SSIZE_T archive_write_callback(struct archive *,
- void *_client_data,
- const void *_buffer, size_t _length);
-
-typedef int archive_open_callback(struct archive *, void *_client_data);
-
-typedef int archive_close_callback(struct archive *, void *_client_data);
-
-/* Switches from one client data object to the next/prev client data object.
- * This is useful for reading from different data blocks such as a set of files
- * that make up one large file.
- */
-typedef int archive_switch_callback(struct archive *, void *_client_data1,
- void *_client_data2);
-
-/*
- * Codes to identify various stream filters.
- */
-#define ARCHIVE_FILTER_NONE 0
-#define ARCHIVE_FILTER_GZIP 1
-#define ARCHIVE_FILTER_BZIP2 2
-#define ARCHIVE_FILTER_COMPRESS 3
-#define ARCHIVE_FILTER_PROGRAM 4
-#define ARCHIVE_FILTER_LZMA 5
-#define ARCHIVE_FILTER_XZ 6
-#define ARCHIVE_FILTER_UU 7
-#define ARCHIVE_FILTER_RPM 8
-#define ARCHIVE_FILTER_LZIP 9
-#define ARCHIVE_FILTER_LRZIP 10
-#define ARCHIVE_FILTER_LZOP 11
-#define ARCHIVE_FILTER_GRZIP 12
-
-#if ARCHIVE_VERSION_NUMBER < 4000000
-#define ARCHIVE_COMPRESSION_NONE ARCHIVE_FILTER_NONE
-#define ARCHIVE_COMPRESSION_GZIP ARCHIVE_FILTER_GZIP
-#define ARCHIVE_COMPRESSION_BZIP2 ARCHIVE_FILTER_BZIP2
-#define ARCHIVE_COMPRESSION_COMPRESS ARCHIVE_FILTER_COMPRESS
-#define ARCHIVE_COMPRESSION_PROGRAM ARCHIVE_FILTER_PROGRAM
-#define ARCHIVE_COMPRESSION_LZMA ARCHIVE_FILTER_LZMA
-#define ARCHIVE_COMPRESSION_XZ ARCHIVE_FILTER_XZ
-#define ARCHIVE_COMPRESSION_UU ARCHIVE_FILTER_UU
-#define ARCHIVE_COMPRESSION_RPM ARCHIVE_FILTER_RPM
-#define ARCHIVE_COMPRESSION_LZIP ARCHIVE_FILTER_LZIP
-#define ARCHIVE_COMPRESSION_LRZIP ARCHIVE_FILTER_LRZIP
-#endif
-
-/*
- * Codes returned by archive_format.
- *
- * Top 16 bits identifies the format family (e.g., "tar"); lower
- * 16 bits indicate the variant. This is updated by read_next_header.
- * Note that the lower 16 bits will often vary from entry to entry.
- * In some cases, this variation occurs as libarchive learns more about
- * the archive (for example, later entries might utilize extensions that
- * weren't necessary earlier in the archive; in this case, libarchive
- * will change the format code to indicate the extended format that
- * was used). In other cases, it's because different tools have
- * modified the archive and so different parts of the archive
- * actually have slightly different formats. (Both tar and cpio store
- * format codes in each entry, so it is quite possible for each
- * entry to be in a different format.)
- */
-#define ARCHIVE_FORMAT_BASE_MASK 0xff0000
-#define ARCHIVE_FORMAT_CPIO 0x10000
-#define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1)
-#define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2)
-#define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3)
-#define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4)
-#define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5)
-#define ARCHIVE_FORMAT_CPIO_AFIO_LARGE (ARCHIVE_FORMAT_CPIO | 6)
-#define ARCHIVE_FORMAT_SHAR 0x20000
-#define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1)
-#define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2)
-#define ARCHIVE_FORMAT_TAR 0x30000
-#define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1)
-#define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2)
-#define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3)
-#define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4)
-#define ARCHIVE_FORMAT_ISO9660 0x40000
-#define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1)
-#define ARCHIVE_FORMAT_ZIP 0x50000
-#define ARCHIVE_FORMAT_EMPTY 0x60000
-#define ARCHIVE_FORMAT_AR 0x70000
-#define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1)
-#define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2)
-#define ARCHIVE_FORMAT_MTREE 0x80000
-#define ARCHIVE_FORMAT_RAW 0x90000
-#define ARCHIVE_FORMAT_XAR 0xA0000
-#define ARCHIVE_FORMAT_LHA 0xB0000
-#define ARCHIVE_FORMAT_CAB 0xC0000
-#define ARCHIVE_FORMAT_RAR 0xD0000
-#define ARCHIVE_FORMAT_7ZIP 0xE0000
-
-/*-
- * Basic outline for reading an archive:
- * 1) Ask archive_read_new for an archive reader object.
- * 2) Update any global properties as appropriate.
- * In particular, you'll certainly want to call appropriate
- * archive_read_support_XXX functions.
- * 3) Call archive_read_open_XXX to open the archive
- * 4) Repeatedly call archive_read_next_header to get information about
- * successive archive entries. Call archive_read_data to extract
- * data for entries of interest.
- * 5) Call archive_read_finish to end processing.
- */
-__LA_DECL struct archive *archive_read_new(void);
-
-/*
- * The archive_read_support_XXX calls enable auto-detect for this
- * archive handle. They also link in the necessary support code.
- * For example, if you don't want bzlib linked in, don't invoke
- * support_compression_bzip2(). The "all" functions provide the
- * obvious shorthand.
- */
-
-#if ARCHIVE_VERSION_NUMBER < 4000000
-__LA_DECL int archive_read_support_compression_all(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_bzip2(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_compress(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_gzip(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_lzip(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_lzma(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_none(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_program(struct archive *,
- const char *command) __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_program_signature
- (struct archive *, const char *,
- const void * /* match */, size_t) __LA_DEPRECATED;
-
-__LA_DECL int archive_read_support_compression_rpm(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_uu(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_read_support_compression_xz(struct archive *)
- __LA_DEPRECATED;
-#endif
-
-__LA_DECL int archive_read_support_filter_all(struct archive *);
-__LA_DECL int archive_read_support_filter_bzip2(struct archive *);
-__LA_DECL int archive_read_support_filter_compress(struct archive *);
-__LA_DECL int archive_read_support_filter_gzip(struct archive *);
-__LA_DECL int archive_read_support_filter_grzip(struct archive *);
-__LA_DECL int archive_read_support_filter_lrzip(struct archive *);
-__LA_DECL int archive_read_support_filter_lzip(struct archive *);
-__LA_DECL int archive_read_support_filter_lzma(struct archive *);
-__LA_DECL int archive_read_support_filter_lzop(struct archive *);
-__LA_DECL int archive_read_support_filter_none(struct archive *);
-__LA_DECL int archive_read_support_filter_program(struct archive *,
- const char *command);
-__LA_DECL int archive_read_support_filter_program_signature
- (struct archive *, const char * /* cmd */,
- const void * /* match */, size_t);
-__LA_DECL int archive_read_support_filter_rpm(struct archive *);
-__LA_DECL int archive_read_support_filter_uu(struct archive *);
-__LA_DECL int archive_read_support_filter_xz(struct archive *);
-
-__LA_DECL int archive_read_support_format_7zip(struct archive *);
-__LA_DECL int archive_read_support_format_all(struct archive *);
-__LA_DECL int archive_read_support_format_ar(struct archive *);
-__LA_DECL int archive_read_support_format_by_code(struct archive *, int);
-__LA_DECL int archive_read_support_format_cab(struct archive *);
-__LA_DECL int archive_read_support_format_cpio(struct archive *);
-__LA_DECL int archive_read_support_format_empty(struct archive *);
-__LA_DECL int archive_read_support_format_gnutar(struct archive *);
-__LA_DECL int archive_read_support_format_iso9660(struct archive *);
-__LA_DECL int archive_read_support_format_lha(struct archive *);
-__LA_DECL int archive_read_support_format_mtree(struct archive *);
-__LA_DECL int archive_read_support_format_rar(struct archive *);
-__LA_DECL int archive_read_support_format_raw(struct archive *);
-__LA_DECL int archive_read_support_format_tar(struct archive *);
-__LA_DECL int archive_read_support_format_xar(struct archive *);
-__LA_DECL int archive_read_support_format_zip(struct archive *);
-
-/* Functions to manually set the format and filters to be used. This is
- * useful to bypass the bidding process when the format and filters to use
- * is known in advance.
- */
-__LA_DECL int archive_read_set_format(struct archive *, int);
-__LA_DECL int archive_read_append_filter(struct archive *, int);
-__LA_DECL int archive_read_append_filter_program(struct archive *,
- const char *);
-__LA_DECL int archive_read_append_filter_program_signature
- (struct archive *, const char *, const void * /* match */, size_t);
-
-/* Set various callbacks. */
-__LA_DECL int archive_read_set_open_callback(struct archive *,
- archive_open_callback *);
-__LA_DECL int archive_read_set_read_callback(struct archive *,
- archive_read_callback *);
-__LA_DECL int archive_read_set_seek_callback(struct archive *,
- archive_seek_callback *);
-__LA_DECL int archive_read_set_skip_callback(struct archive *,
- archive_skip_callback *);
-__LA_DECL int archive_read_set_close_callback(struct archive *,
- archive_close_callback *);
-/* Callback used to switch between one data object to the next */
-__LA_DECL int archive_read_set_switch_callback(struct archive *,
- archive_switch_callback *);
-
-/* This sets the first data object. */
-__LA_DECL int archive_read_set_callback_data(struct archive *, void *);
-/* This sets data object at specified index */
-__LA_DECL int archive_read_set_callback_data2(struct archive *, void *,
- unsigned int);
-/* This adds a data object at the specified index. */
-__LA_DECL int archive_read_add_callback_data(struct archive *, void *,
- unsigned int);
-/* This appends a data object to the end of list */
-__LA_DECL int archive_read_append_callback_data(struct archive *, void *);
-/* This prepends a data object to the beginning of list */
-__LA_DECL int archive_read_prepend_callback_data(struct archive *, void *);
-
-/* Opening freezes the callbacks. */
-__LA_DECL int archive_read_open1(struct archive *);
-
-/* Convenience wrappers around the above. */
-__LA_DECL int archive_read_open(struct archive *, void *_client_data,
- archive_open_callback *, archive_read_callback *,
- archive_close_callback *);
-__LA_DECL int archive_read_open2(struct archive *, void *_client_data,
- archive_open_callback *, archive_read_callback *,
- archive_skip_callback *, archive_close_callback *);
-
-/*
- * A variety of shortcuts that invoke archive_read_open() with
- * canned callbacks suitable for common situations. The ones that
- * accept a block size handle tape blocking correctly.
- */
-/* Use this if you know the filename. Note: NULL indicates stdin. */
-__LA_DECL int archive_read_open_filename(struct archive *,
- const char *_filename, size_t _block_size);
-/* Use this for reading multivolume files by filenames.
- * NOTE: Must be NULL terminated. Sorting is NOT done. */
-__LA_DECL int archive_read_open_filenames(struct archive *,
- const char **_filenames, size_t _block_size);
-__LA_DECL int archive_read_open_filename_w(struct archive *,
- const wchar_t *_filename, size_t _block_size);
-/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */
-__LA_DECL int archive_read_open_file(struct archive *,
- const char *_filename, size_t _block_size) __LA_DEPRECATED;
-/* Read an archive that's stored in memory. */
-__LA_DECL int archive_read_open_memory(struct archive *,
- void * buff, size_t size);
-/* A more involved version that is only used for internal testing. */
-__LA_DECL int archive_read_open_memory2(struct archive *a, void *buff,
- size_t size, size_t read_size);
-/* Read an archive that's already open, using the file descriptor. */
-__LA_DECL int archive_read_open_fd(struct archive *, int _fd,
- size_t _block_size);
-/* Read an archive that's already open, using a FILE *. */
-/* Note: DO NOT use this with tape drives. */
-__LA_DECL int archive_read_open_FILE(struct archive *, FILE *_file);
-
-/* Parses and returns next entry header. */
-__LA_DECL int archive_read_next_header(struct archive *,
- struct archive_entry **);
-
-/* Parses and returns next entry header using the archive_entry passed in */
-__LA_DECL int archive_read_next_header2(struct archive *,
- struct archive_entry *);
-
-/*
- * Retrieve the byte offset in UNCOMPRESSED data where last-read
- * header started.
- */
-__LA_DECL __LA_INT64_T archive_read_header_position(struct archive *);
-
-/* Read data from the body of an entry. Similar to read(2). */
-__LA_DECL __LA_SSIZE_T archive_read_data(struct archive *,
- void *, size_t);
-
-/* Seek within the body of an entry. Similar to lseek(2). */
-__LA_DECL __LA_INT64_T archive_seek_data(struct archive *, __LA_INT64_T, int);
-
-/*
- * A zero-copy version of archive_read_data that also exposes the file offset
- * of each returned block. Note that the client has no way to specify
- * the desired size of the block. The API does guarantee that offsets will
- * be strictly increasing and that returned blocks will not overlap.
- */
-__LA_DECL int archive_read_data_block(struct archive *a,
- const void **buff, size_t *size, __LA_INT64_T *offset);
-
-/*-
- * Some convenience functions that are built on archive_read_data:
- * 'skip': skips entire entry
- * 'into_buffer': writes data into memory buffer that you provide
- * 'into_fd': writes data to specified filedes
- */
-__LA_DECL int archive_read_data_skip(struct archive *);
-__LA_DECL int archive_read_data_into_fd(struct archive *, int fd);
-
-/*
- * Set read options.
- */
-/* Apply option to the format only. */
-__LA_DECL int archive_read_set_format_option(struct archive *_a,
- const char *m, const char *o,
- const char *v);
-/* Apply option to the filter only. */
-__LA_DECL int archive_read_set_filter_option(struct archive *_a,
- const char *m, const char *o,
- const char *v);
-/* Apply option to both the format and the filter. */
-__LA_DECL int archive_read_set_option(struct archive *_a,
- const char *m, const char *o,
- const char *v);
-/* Apply option string to both the format and the filter. */
-__LA_DECL int archive_read_set_options(struct archive *_a,
- const char *opts);
-
-/*-
- * Convenience function to recreate the current entry (whose header
- * has just been read) on disk.
- *
- * This does quite a bit more than just copy data to disk. It also:
- * - Creates intermediate directories as required.
- * - Manages directory permissions: non-writable directories will
- * be initially created with write permission enabled; when the
- * archive is closed, dir permissions are edited to the values specified
- * in the archive.
- * - Checks hardlinks: hardlinks will not be extracted unless the
- * linked-to file was also extracted within the same session. (TODO)
- */
-
-/* The "flags" argument selects optional behavior, 'OR' the flags you want. */
-
-/* Default: Do not try to set owner/group. */
-#define ARCHIVE_EXTRACT_OWNER (0x0001)
-/* Default: Do obey umask, do not restore SUID/SGID/SVTX bits. */
-#define ARCHIVE_EXTRACT_PERM (0x0002)
-/* Default: Do not restore mtime/atime. */
-#define ARCHIVE_EXTRACT_TIME (0x0004)
-/* Default: Replace existing files. */
-#define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008)
-/* Default: Try create first, unlink only if create fails with EEXIST. */
-#define ARCHIVE_EXTRACT_UNLINK (0x0010)
-/* Default: Do not restore ACLs. */
-#define ARCHIVE_EXTRACT_ACL (0x0020)
-/* Default: Do not restore fflags. */
-#define ARCHIVE_EXTRACT_FFLAGS (0x0040)
-/* Default: Do not restore xattrs. */
-#define ARCHIVE_EXTRACT_XATTR (0x0080)
-/* Default: Do not try to guard against extracts redirected by symlinks. */
-/* Note: With ARCHIVE_EXTRACT_UNLINK, will remove any intermediate symlink. */
-#define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100)
-/* Default: Do not reject entries with '..' as path elements. */
-#define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200)
-/* Default: Create parent directories as needed. */
-#define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400)
-/* Default: Overwrite files, even if one on disk is newer. */
-#define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800)
-/* Detect blocks of 0 and write holes instead. */
-#define ARCHIVE_EXTRACT_SPARSE (0x1000)
-/* Default: Do not restore Mac extended metadata. */
-/* This has no effect except on Mac OS. */
-#define ARCHIVE_EXTRACT_MAC_METADATA (0x2000)
-/* Default: Use HFS+ compression if it was compressed. */
-/* This has no effect except on Mac OS v10.6 or later. */
-#define ARCHIVE_EXTRACT_NO_HFS_COMPRESSION (0x4000)
-/* Default: Do not use HFS+ compression if it was not compressed. */
-/* This has no effect except on Mac OS v10.6 or later. */
-#define ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED (0x8000)
-
-__LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
- int flags);
-__LA_DECL int archive_read_extract2(struct archive *, struct archive_entry *,
- struct archive * /* dest */);
-__LA_DECL void archive_read_extract_set_progress_callback(struct archive *,
- void (*_progress_func)(void *), void *_user_data);
-
-/* Record the dev/ino of a file that will not be written. This is
- * generally set to the dev/ino of the archive being read. */
-__LA_DECL void archive_read_extract_set_skip_file(struct archive *,
- __LA_INT64_T, __LA_INT64_T);
-
-/* Close the file and release most resources. */
-__LA_DECL int archive_read_close(struct archive *);
-/* Release all resources and destroy the object. */
-/* Note that archive_read_free will call archive_read_close for you. */
-__LA_DECL int archive_read_free(struct archive *);
-#if ARCHIVE_VERSION_NUMBER < 4000000
-/* Synonym for archive_read_free() for backwards compatibility. */
-__LA_DECL int archive_read_finish(struct archive *) __LA_DEPRECATED;
-#endif
-
-/*-
- * To create an archive:
- * 1) Ask archive_write_new for an archive writer object.
- * 2) Set any global properties. In particular, you should set
- * the compression and format to use.
- * 3) Call archive_write_open to open the file (most people
- * will use archive_write_open_file or archive_write_open_fd,
- * which provide convenient canned I/O callbacks for you).
- * 4) For each entry:
- * - construct an appropriate struct archive_entry structure
- * - archive_write_header to write the header
- * - archive_write_data to write the entry data
- * 5) archive_write_close to close the output
- * 6) archive_write_free to cleanup the writer and release resources
- */
-__LA_DECL struct archive *archive_write_new(void);
-__LA_DECL int archive_write_set_bytes_per_block(struct archive *,
- int bytes_per_block);
-__LA_DECL int archive_write_get_bytes_per_block(struct archive *);
-/* XXX This is badly misnamed; suggestions appreciated. XXX */
-__LA_DECL int archive_write_set_bytes_in_last_block(struct archive *,
- int bytes_in_last_block);
-__LA_DECL int archive_write_get_bytes_in_last_block(struct archive *);
-
-/* The dev/ino of a file that won't be archived. This is used
- * to avoid recursively adding an archive to itself. */
-__LA_DECL int archive_write_set_skip_file(struct archive *,
- __LA_INT64_T, __LA_INT64_T);
-
-#if ARCHIVE_VERSION_NUMBER < 4000000
-__LA_DECL int archive_write_set_compression_bzip2(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_compress(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_gzip(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_lzip(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_lzma(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_none(struct archive *)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_program(struct archive *,
- const char *cmd) __LA_DEPRECATED;
-__LA_DECL int archive_write_set_compression_xz(struct archive *)
- __LA_DEPRECATED;
-#endif
-
-/* A convenience function to set the filter based on the code. */
-__LA_DECL int archive_write_add_filter(struct archive *, int filter_code);
-__LA_DECL int archive_write_add_filter_by_name(struct archive *,
- const char *name);
-__LA_DECL int archive_write_add_filter_b64encode(struct archive *);
-__LA_DECL int archive_write_add_filter_bzip2(struct archive *);
-__LA_DECL int archive_write_add_filter_compress(struct archive *);
-__LA_DECL int archive_write_add_filter_grzip(struct archive *);
-__LA_DECL int archive_write_add_filter_gzip(struct archive *);
-__LA_DECL int archive_write_add_filter_lrzip(struct archive *);
-__LA_DECL int archive_write_add_filter_lzip(struct archive *);
-__LA_DECL int archive_write_add_filter_lzma(struct archive *);
-__LA_DECL int archive_write_add_filter_lzop(struct archive *);
-__LA_DECL int archive_write_add_filter_none(struct archive *);
-__LA_DECL int archive_write_add_filter_program(struct archive *,
- const char *cmd);
-__LA_DECL int archive_write_add_filter_uuencode(struct archive *);
-__LA_DECL int archive_write_add_filter_xz(struct archive *);
-
-
-/* A convenience function to set the format based on the code or name. */
-__LA_DECL int archive_write_set_format(struct archive *, int format_code);
-__LA_DECL int archive_write_set_format_by_name(struct archive *,
- const char *name);
-/* To minimize link pollution, use one or more of the following. */
-__LA_DECL int archive_write_set_format_7zip(struct archive *);
-__LA_DECL int archive_write_set_format_ar_bsd(struct archive *);
-__LA_DECL int archive_write_set_format_ar_svr4(struct archive *);
-__LA_DECL int archive_write_set_format_cpio(struct archive *);
-__LA_DECL int archive_write_set_format_cpio_newc(struct archive *);
-__LA_DECL int archive_write_set_format_gnutar(struct archive *);
-__LA_DECL int archive_write_set_format_iso9660(struct archive *);
-__LA_DECL int archive_write_set_format_mtree(struct archive *);
-__LA_DECL int archive_write_set_format_mtree_classic(struct archive *);
-/* TODO: int archive_write_set_format_old_tar(struct archive *); */
-__LA_DECL int archive_write_set_format_pax(struct archive *);
-__LA_DECL int archive_write_set_format_pax_restricted(struct archive *);
-__LA_DECL int archive_write_set_format_shar(struct archive *);
-__LA_DECL int archive_write_set_format_shar_dump(struct archive *);
-__LA_DECL int archive_write_set_format_ustar(struct archive *);
-__LA_DECL int archive_write_set_format_v7tar(struct archive *);
-__LA_DECL int archive_write_set_format_xar(struct archive *);
-__LA_DECL int archive_write_set_format_zip(struct archive *);
-__LA_DECL int archive_write_zip_set_compression_deflate(struct archive *);
-__LA_DECL int archive_write_zip_set_compression_store(struct archive *);
-__LA_DECL int archive_write_open(struct archive *, void *,
- archive_open_callback *, archive_write_callback *,
- archive_close_callback *);
-__LA_DECL int archive_write_open_fd(struct archive *, int _fd);
-__LA_DECL int archive_write_open_filename(struct archive *, const char *_file);
-__LA_DECL int archive_write_open_filename_w(struct archive *,
- const wchar_t *_file);
-/* A deprecated synonym for archive_write_open_filename() */
-__LA_DECL int archive_write_open_file(struct archive *, const char *_file)
- __LA_DEPRECATED;
-__LA_DECL int archive_write_open_FILE(struct archive *, FILE *);
-/* _buffSize is the size of the buffer, _used refers to a variable that
- * will be updated after each write into the buffer. */
-__LA_DECL int archive_write_open_memory(struct archive *,
- void *_buffer, size_t _buffSize, size_t *_used);
-
-/*
- * Note that the library will truncate writes beyond the size provided
- * to archive_write_header or pad if the provided data is short.
- */
-__LA_DECL int archive_write_header(struct archive *,
- struct archive_entry *);
-__LA_DECL __LA_SSIZE_T archive_write_data(struct archive *,
- const void *, size_t);
-
-/* This interface is currently only available for archive_write_disk handles. */
-__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *,
- const void *, size_t, __LA_INT64_T);
-
-__LA_DECL int archive_write_finish_entry(struct archive *);
-__LA_DECL int archive_write_close(struct archive *);
-/* Marks the archive as FATAL so that a subsequent free() operation
- * won't try to close() cleanly. Provides a fast abort capability
- * when the client discovers that things have gone wrong. */
-__LA_DECL int archive_write_fail(struct archive *);
-/* This can fail if the archive wasn't already closed, in which case
- * archive_write_free() will implicitly call archive_write_close(). */
-__LA_DECL int archive_write_free(struct archive *);
-#if ARCHIVE_VERSION_NUMBER < 4000000
-/* Synonym for archive_write_free() for backwards compatibility. */
-__LA_DECL int archive_write_finish(struct archive *) __LA_DEPRECATED;
-#endif
-
-/*
- * Set write options.
- */
-/* Apply option to the format only. */
-__LA_DECL int archive_write_set_format_option(struct archive *_a,
- const char *m, const char *o,
- const char *v);
-/* Apply option to the filter only. */
-__LA_DECL int archive_write_set_filter_option(struct archive *_a,
- const char *m, const char *o,
- const char *v);
-/* Apply option to both the format and the filter. */
-__LA_DECL int archive_write_set_option(struct archive *_a,
- const char *m, const char *o,
- const char *v);
-/* Apply option string to both the format and the filter. */
-__LA_DECL int archive_write_set_options(struct archive *_a,
- const char *opts);
-
-/*-
- * ARCHIVE_WRITE_DISK API
- *
- * To create objects on disk:
- * 1) Ask archive_write_disk_new for a new archive_write_disk object.
- * 2) Set any global properties. In particular, you probably
- * want to set the options.
- * 3) For each entry:
- * - construct an appropriate struct archive_entry structure
- * - archive_write_header to create the file/dir/etc on disk
- * - archive_write_data to write the entry data
- * 4) archive_write_free to cleanup the writer and release resources
- *
- * In particular, you can use this in conjunction with archive_read()
- * to pull entries out of an archive and create them on disk.
- */
-__LA_DECL struct archive *archive_write_disk_new(void);
-/* This file will not be overwritten. */
-__LA_DECL int archive_write_disk_set_skip_file(struct archive *,
- __LA_INT64_T, __LA_INT64_T);
-/* Set flags to control how the next item gets created.
- * This accepts a bitmask of ARCHIVE_EXTRACT_XXX flags defined above. */
-__LA_DECL int archive_write_disk_set_options(struct archive *,
- int flags);
-/*
- * The lookup functions are given uname/uid (or gname/gid) pairs and
- * return a uid (gid) suitable for this system. These are used for
- * restoring ownership and for setting ACLs. The default functions
- * are naive, they just return the uid/gid. These are small, so reasonable
- * for applications that don't need to preserve ownership; they
- * are probably also appropriate for applications that are doing
- * same-system backup and restore.
- */
-/*
- * The "standard" lookup functions use common system calls to lookup
- * the uname/gname, falling back to the uid/gid if the names can't be
- * found. They cache lookups and are reasonably fast, but can be very
- * large, so they are not used unless you ask for them. In
- * particular, these match the specifications of POSIX "pax" and old
- * POSIX "tar".
- */
-__LA_DECL int archive_write_disk_set_standard_lookup(struct archive *);
-/*
- * If neither the default (naive) nor the standard (big) functions suit
- * your needs, you can write your own and register them. Be sure to
- * include a cleanup function if you have allocated private data.
- */
-__LA_DECL int archive_write_disk_set_group_lookup(struct archive *,
- void * /* private_data */,
- __LA_INT64_T (*)(void *, const char *, __LA_INT64_T),
- void (* /* cleanup */)(void *));
-__LA_DECL int archive_write_disk_set_user_lookup(struct archive *,
- void * /* private_data */,
- __LA_INT64_T (*)(void *, const char *, __LA_INT64_T),
- void (* /* cleanup */)(void *));
-__LA_DECL __LA_INT64_T archive_write_disk_gid(struct archive *, const char *, __LA_INT64_T);
-__LA_DECL __LA_INT64_T archive_write_disk_uid(struct archive *, const char *, __LA_INT64_T);
-
-/*
- * ARCHIVE_READ_DISK API
- *
- * This is still evolving and somewhat experimental.
- */
-__LA_DECL struct archive *archive_read_disk_new(void);
-/* The names for symlink modes here correspond to an old BSD
- * command-line argument convention: -L, -P, -H */
-/* Follow all symlinks. */
-__LA_DECL int archive_read_disk_set_symlink_logical(struct archive *);
-/* Follow no symlinks. */
-__LA_DECL int archive_read_disk_set_symlink_physical(struct archive *);
-/* Follow symlink initially, then not. */
-__LA_DECL int archive_read_disk_set_symlink_hybrid(struct archive *);
-/* TODO: Handle Linux stat32/stat64 ugliness. */
-__LA_DECL int archive_read_disk_entry_from_file(struct archive *,
- struct archive_entry *, int /* fd */, const struct stat *);
-/* Look up gname for gid or uname for uid. */
-/* Default implementations are very, very stupid. */
-__LA_DECL const char *archive_read_disk_gname(struct archive *, __LA_INT64_T);
-__LA_DECL const char *archive_read_disk_uname(struct archive *, __LA_INT64_T);
-/* "Standard" implementation uses getpwuid_r, getgrgid_r and caches the
- * results for performance. */
-__LA_DECL int archive_read_disk_set_standard_lookup(struct archive *);
-/* You can install your own lookups if you like. */
-__LA_DECL int archive_read_disk_set_gname_lookup(struct archive *,
- void * /* private_data */,
- const char *(* /* lookup_fn */)(void *, __LA_INT64_T),
- void (* /* cleanup_fn */)(void *));
-__LA_DECL int archive_read_disk_set_uname_lookup(struct archive *,
- void * /* private_data */,
- const char *(* /* lookup_fn */)(void *, __LA_INT64_T),
- void (* /* cleanup_fn */)(void *));
-/* Start traversal. */
-__LA_DECL int archive_read_disk_open(struct archive *, const char *);
-__LA_DECL int archive_read_disk_open_w(struct archive *, const wchar_t *);
-/*
- * Request that current entry be visited. If you invoke it on every
- * directory, you'll get a physical traversal. This is ignored if the
- * current entry isn't a directory or a link to a directory. So, if
- * you invoke this on every returned path, you'll get a full logical
- * traversal.
- */
-__LA_DECL int archive_read_disk_descend(struct archive *);
-__LA_DECL int archive_read_disk_can_descend(struct archive *);
-__LA_DECL int archive_read_disk_current_filesystem(struct archive *);
-__LA_DECL int archive_read_disk_current_filesystem_is_synthetic(struct archive *);
-__LA_DECL int archive_read_disk_current_filesystem_is_remote(struct archive *);
-/* Request that the access time of the entry visited by travesal be restored. */
-__LA_DECL int archive_read_disk_set_atime_restored(struct archive *);
-/*
- * Set behavior. The "flags" argument selects optional behavior.
- */
-/* Request that the access time of the entry visited by travesal be restored.
- * This is the same as archive_read_disk_set_atime_restored. */
-#define ARCHIVE_READDISK_RESTORE_ATIME (0x0001)
-/* Default: Do not skip an entry which has nodump flags. */
-#define ARCHIVE_READDISK_HONOR_NODUMP (0x0002)
-/* Default: Skip a mac resource fork file whose prefix is "._" because of
- * using copyfile. */
-#define ARCHIVE_READDISK_MAC_COPYFILE (0x0004)
-/* Default: Do not traverse mount points. */
-#define ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS (0x0008)
-
-__LA_DECL int archive_read_disk_set_behavior(struct archive *,
- int flags);
-
-/*
- * Set archive_match object that will be used in archive_read_disk to
- * know whether an entry should be skipped. The callback function
- * _excluded_func will be invoked when an entry is skipped by the result
- * of archive_match.
- */
-__LA_DECL int archive_read_disk_set_matching(struct archive *,
- struct archive *_matching, void (*_excluded_func)
- (struct archive *, void *, struct archive_entry *),
- void *_client_data);
-__LA_DECL int archive_read_disk_set_metadata_filter_callback(struct archive *,
- int (*_metadata_filter_func)(struct archive *, void *,
- struct archive_entry *), void *_client_data);
-
-/*
- * Accessor functions to read/set various information in
- * the struct archive object:
- */
-
-/* Number of filters in the current filter pipeline. */
-/* Filter #0 is the one closest to the format, -1 is a synonym for the
- * last filter, which is always the pseudo-filter that wraps the
- * client callbacks. */
-__LA_DECL int archive_filter_count(struct archive *);
-__LA_DECL __LA_INT64_T archive_filter_bytes(struct archive *, int);
-__LA_DECL int archive_filter_code(struct archive *, int);
-__LA_DECL const char * archive_filter_name(struct archive *, int);
-
-#if ARCHIVE_VERSION_NUMBER < 4000000
-/* These don't properly handle multiple filters, so are deprecated and
- * will eventually be removed. */
-/* As of libarchive 3.0, this is an alias for archive_filter_bytes(a, -1); */
-__LA_DECL __LA_INT64_T archive_position_compressed(struct archive *)
- __LA_DEPRECATED;
-/* As of libarchive 3.0, this is an alias for archive_filter_bytes(a, 0); */
-__LA_DECL __LA_INT64_T archive_position_uncompressed(struct archive *)
- __LA_DEPRECATED;
-/* As of libarchive 3.0, this is an alias for archive_filter_name(a, 0); */
-__LA_DECL const char *archive_compression_name(struct archive *)
- __LA_DEPRECATED;
-/* As of libarchive 3.0, this is an alias for archive_filter_code(a, 0); */
-__LA_DECL int archive_compression(struct archive *)
- __LA_DEPRECATED;
-#endif
-
-__LA_DECL int archive_errno(struct archive *);
-__LA_DECL const char *archive_error_string(struct archive *);
-__LA_DECL const char *archive_format_name(struct archive *);
-__LA_DECL int archive_format(struct archive *);
-__LA_DECL void archive_clear_error(struct archive *);
-__LA_DECL void archive_set_error(struct archive *, int _err,
- const char *fmt, ...) __LA_PRINTF(3, 4);
-__LA_DECL void archive_copy_error(struct archive *dest,
- struct archive *src);
-__LA_DECL int archive_file_count(struct archive *);
-
-/*
- * ARCHIVE_MATCH API
- */
-__LA_DECL struct archive *archive_match_new(void);
-__LA_DECL int archive_match_free(struct archive *);
-
-/*
- * Test if archive_entry is excluded.
- * This is a convenience function. This is the same as calling all
- * archive_match_path_excluded, archive_match_time_excluded
- * and archive_match_owner_excluded.
- */
-__LA_DECL int archive_match_excluded(struct archive *,
- struct archive_entry *);
-
-/*
- * Test if pathname is excluded. The conditions are set by following functions.
- */
-__LA_DECL int archive_match_path_excluded(struct archive *,
- struct archive_entry *);
-/* Add exclusion pathname pattern. */
-__LA_DECL int archive_match_exclude_pattern(struct archive *, const char *);
-__LA_DECL int archive_match_exclude_pattern_w(struct archive *,
- const wchar_t *);
-/* Add exclusion pathname pattern from file. */
-__LA_DECL int archive_match_exclude_pattern_from_file(struct archive *,
- const char *, int _nullSeparator);
-__LA_DECL int archive_match_exclude_pattern_from_file_w(struct archive *,
- const wchar_t *, int _nullSeparator);
-/* Add inclusion pathname pattern. */
-__LA_DECL int archive_match_include_pattern(struct archive *, const char *);
-__LA_DECL int archive_match_include_pattern_w(struct archive *,
- const wchar_t *);
-/* Add inclusion pathname pattern from file. */
-__LA_DECL int archive_match_include_pattern_from_file(struct archive *,
- const char *, int _nullSeparator);
-__LA_DECL int archive_match_include_pattern_from_file_w(struct archive *,
- const wchar_t *, int _nullSeparator);
-/*
- * How to get statistic information for inclusion patterns.
- */
-/* Return the amount number of unmatched inclusion patterns. */
-__LA_DECL int archive_match_path_unmatched_inclusions(struct archive *);
-/* Return the pattern of unmatched inclusion with ARCHIVE_OK.
- * Return ARCHIVE_EOF if there is no inclusion pattern. */
-__LA_DECL int archive_match_path_unmatched_inclusions_next(
- struct archive *, const char **);
-__LA_DECL int archive_match_path_unmatched_inclusions_next_w(
- struct archive *, const wchar_t **);
-
-/*
- * Test if a file is excluded by its time stamp.
- * The conditions are set by following functions.
- */
-__LA_DECL int archive_match_time_excluded(struct archive *,
- struct archive_entry *);
-
-/*
- * Flags to tell a matching type of time stamps. These are used for
- * following functinos.
- */
-/* Time flag: mtime to be tested. */
-#define ARCHIVE_MATCH_MTIME (0x0100)
-/* Time flag: ctime to be tested. */
-#define ARCHIVE_MATCH_CTIME (0x0200)
-/* Comparison flag: Match the time if it is newer than. */
-#define ARCHIVE_MATCH_NEWER (0x0001)
-/* Comparison flag: Match the time if it is older than. */
-#define ARCHIVE_MATCH_OLDER (0x0002)
-/* Comparison flag: Match the time if it is equal to. */
-#define ARCHIVE_MATCH_EQUAL (0x0010)
-/* Set inclusion time. */
-__LA_DECL int archive_match_include_time(struct archive *, int _flag,
- time_t _sec, long _nsec);
-/* Set inclusion time by a date string. */
-__LA_DECL int archive_match_include_date(struct archive *, int _flag,
- const char *_datestr);
-__LA_DECL int archive_match_include_date_w(struct archive *, int _flag,
- const wchar_t *_datestr);
-/* Set inclusion time by a particluar file. */
-__LA_DECL int archive_match_include_file_time(struct archive *,
- int _flag, const char *_pathname);
-__LA_DECL int archive_match_include_file_time_w(struct archive *,
- int _flag, const wchar_t *_pathname);
-/* Add exclusion entry. */
-__LA_DECL int archive_match_exclude_entry(struct archive *,
- int _flag, struct archive_entry *);
-
-/*
- * Test if a file is excluded by its uid ,gid, uname or gname.
- * The conditions are set by following functions.
- */
-__LA_DECL int archive_match_owner_excluded(struct archive *,
- struct archive_entry *);
-/* Add inclusion uid, gid, uname and gname. */
-__LA_DECL int archive_match_include_uid(struct archive *, __LA_INT64_T);
-__LA_DECL int archive_match_include_gid(struct archive *, __LA_INT64_T);
-__LA_DECL int archive_match_include_uname(struct archive *, const char *);
-__LA_DECL int archive_match_include_uname_w(struct archive *,
- const wchar_t *);
-__LA_DECL int archive_match_include_gname(struct archive *, const char *);
-__LA_DECL int archive_match_include_gname_w(struct archive *,
- const wchar_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-/* These are meaningless outside of this header. */
-#undef __LA_DECL
-
-/* These need to remain defined because they're used in the
- * callback type definitions. XXX Fix this. This is ugly. XXX */
-/* #undef __LA_INT64_T */
-/* #undef __LA_SSIZE_T */
-
-#endif /* !ARCHIVE_H_INCLUDED */
diff --git a/include.new/archive_entry.h b/include.new/archive_entry.h
deleted file mode 100644
index a67371c..0000000
--- a/include.new/archive_entry.h
+++ /dev/null
@@ -1,615 +0,0 @@
-/*-
- * Copyright (c) 2003-2008 Tim Kientzle
- * 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(S) ``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(S) 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: releng/10.2/contrib/libarchive/libarchive/archive_entry.h 248616 2013-03-22 13:36:03Z mm $
- */
-
-#ifndef ARCHIVE_ENTRY_H_INCLUDED
-#define ARCHIVE_ENTRY_H_INCLUDED
-
-/* Note: Compiler will complain if this does not match archive.h! */
-#define ARCHIVE_VERSION_NUMBER 3001002
-
-/*
- * Note: archive_entry.h is for use outside of libarchive; the
- * configuration headers (config.h, archive_platform.h, etc.) are
- * purely internal. Do NOT use HAVE_XXX configuration macros to
- * control the behavior of this header! If you must conditionalize,
- * use predefined compiler and/or platform macros.
- */
-
-#include
-#include /* for wchar_t */
-#include
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#include
-#endif
-
-/* Get a suitable 64-bit integer type. */
-#if defined(_WIN32) && !defined(__CYGWIN__)
-# define __LA_INT64_T __int64
-#else
-#include
-# if defined(_SCO_DS)
-# define __LA_INT64_T long long
-# else
-# define __LA_INT64_T int64_t
-# endif
-#endif
-
-/* Get a suitable definition for mode_t */
-#if ARCHIVE_VERSION_NUMBER >= 3999000
-/* Switch to plain 'int' for libarchive 4.0. It's less broken than 'mode_t' */
-# define __LA_MODE_T int
-#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
-# define __LA_MODE_T unsigned short
-#else
-# define __LA_MODE_T mode_t
-#endif
-
-/*
- * On Windows, define LIBARCHIVE_STATIC if you're building or using a
- * .lib. The default here assumes you're building a DLL. Only
- * libarchive source should ever define __LIBARCHIVE_BUILD.
- */
-#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
-# ifdef __LIBARCHIVE_BUILD
-# ifdef __GNUC__
-# define __LA_DECL __attribute__((dllexport)) extern
-# else
-# define __LA_DECL __declspec(dllexport)
-# endif
-# else
-# ifdef __GNUC__
-# define __LA_DECL
-# else
-# define __LA_DECL __declspec(dllimport)
-# endif
-# endif
-#else
-/* Static libraries on all platforms and shared libraries on non-Windows. */
-# define __LA_DECL
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Description of an archive entry.
- *
- * You can think of this as "struct stat" with some text fields added in.
- *
- * TODO: Add "comment", "charset", and possibly other entries that are
- * supported by "pax interchange" format. However, GNU, ustar, cpio,
- * and other variants don't support these features, so they're not an
- * excruciatingly high priority right now.
- *
- * TODO: "pax interchange" format allows essentially arbitrary
- * key/value attributes to be attached to any entry. Supporting
- * such extensions may make this library useful for special
- * applications (e.g., a package manager could attach special
- * package-management attributes to each entry).
- */
-struct archive;
-struct archive_entry;
-
-/*
- * File-type constants. These are returned from archive_entry_filetype()
- * and passed to archive_entry_set_filetype().
- *
- * These values match S_XXX defines on every platform I've checked,
- * including Windows, AIX, Linux, Solaris, and BSD. They're
- * (re)defined here because platforms generally don't define the ones
- * they don't support. For example, Windows doesn't define S_IFLNK or
- * S_IFBLK. Instead of having a mass of conditional logic and system
- * checks to define any S_XXX values that aren't supported locally,
- * I've just defined a new set of such constants so that
- * libarchive-based applications can manipulate and identify archive
- * entries properly even if the hosting platform can't store them on
- * disk.
- *
- * These values are also used directly within some portable formats,
- * such as cpio. If you find a platform that varies from these, the
- * correct solution is to leave these alone and translate from these
- * portable values to platform-native values when entries are read from
- * or written to disk.
- */
-/*
- * In libarchive 4.0, we can drop the casts here.
- * They're needed to work around Borland C's broken mode_t.
- */
-#define AE_IFMT ((__LA_MODE_T)0170000)
-#define AE_IFREG ((__LA_MODE_T)0100000)
-#define AE_IFLNK ((__LA_MODE_T)0120000)
-#define AE_IFSOCK ((__LA_MODE_T)0140000)
-#define AE_IFCHR ((__LA_MODE_T)0020000)
-#define AE_IFBLK ((__LA_MODE_T)0060000)
-#define AE_IFDIR ((__LA_MODE_T)0040000)
-#define AE_IFIFO ((__LA_MODE_T)0010000)
-
-/*
- * Basic object manipulation
- */
-
-__LA_DECL struct archive_entry *archive_entry_clear(struct archive_entry *);
-/* The 'clone' function does a deep copy; all of the strings are copied too. */
-__LA_DECL struct archive_entry *archive_entry_clone(struct archive_entry *);
-__LA_DECL void archive_entry_free(struct archive_entry *);
-__LA_DECL struct archive_entry *archive_entry_new(void);
-
-/*
- * This form of archive_entry_new2() will pull character-set
- * conversion information from the specified archive handle. The
- * older archive_entry_new(void) form is equivalent to calling
- * archive_entry_new2(NULL) and will result in the use of an internal
- * default character-set conversion.
- */
-__LA_DECL struct archive_entry *archive_entry_new2(struct archive *);
-
-/*
- * Retrieve fields from an archive_entry.
- *
- * There are a number of implicit conversions among these fields. For
- * example, if a regular string field is set and you read the _w wide
- * character field, the entry will implicitly convert narrow-to-wide
- * using the current locale. Similarly, dev values are automatically
- * updated when you write devmajor or devminor and vice versa.
- *
- * In addition, fields can be "set" or "unset." Unset string fields
- * return NULL, non-string fields have _is_set() functions to test
- * whether they've been set. You can "unset" a string field by
- * assigning NULL; non-string fields have _unset() functions to
- * unset them.
- *
- * Note: There is one ambiguity in the above; string fields will
- * also return NULL when implicit character set conversions fail.
- * This is usually what you want.
- */
-__LA_DECL time_t archive_entry_atime(struct archive_entry *);
-__LA_DECL long archive_entry_atime_nsec(struct archive_entry *);
-__LA_DECL int archive_entry_atime_is_set(struct archive_entry *);
-__LA_DECL time_t archive_entry_birthtime(struct archive_entry *);
-__LA_DECL long archive_entry_birthtime_nsec(struct archive_entry *);
-__LA_DECL int archive_entry_birthtime_is_set(struct archive_entry *);
-__LA_DECL time_t archive_entry_ctime(struct archive_entry *);
-__LA_DECL long archive_entry_ctime_nsec(struct archive_entry *);
-__LA_DECL int archive_entry_ctime_is_set(struct archive_entry *);
-__LA_DECL dev_t archive_entry_dev(struct archive_entry *);
-__LA_DECL int archive_entry_dev_is_set(struct archive_entry *);
-__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *);
-__LA_DECL dev_t archive_entry_devminor(struct archive_entry *);
-__LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *);
-__LA_DECL void archive_entry_fflags(struct archive_entry *,
- unsigned long * /* set */,
- unsigned long * /* clear */);
-__LA_DECL const char *archive_entry_fflags_text(struct archive_entry *);
-__LA_DECL __LA_INT64_T archive_entry_gid(struct archive_entry *);
-__LA_DECL const char *archive_entry_gname(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *);
-__LA_DECL const char *archive_entry_hardlink(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *);
-__LA_DECL __LA_INT64_T archive_entry_ino(struct archive_entry *);
-__LA_DECL __LA_INT64_T archive_entry_ino64(struct archive_entry *);
-__LA_DECL int archive_entry_ino_is_set(struct archive_entry *);
-__LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *);
-__LA_DECL time_t archive_entry_mtime(struct archive_entry *);
-__LA_DECL long archive_entry_mtime_nsec(struct archive_entry *);
-__LA_DECL int archive_entry_mtime_is_set(struct archive_entry *);
-__LA_DECL unsigned int archive_entry_nlink(struct archive_entry *);
-__LA_DECL const char *archive_entry_pathname(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *);
-__LA_DECL __LA_MODE_T archive_entry_perm(struct archive_entry *);
-__LA_DECL dev_t archive_entry_rdev(struct archive_entry *);
-__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *);
-__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *);
-__LA_DECL const char *archive_entry_sourcepath(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_sourcepath_w(struct archive_entry *);
-__LA_DECL __LA_INT64_T archive_entry_size(struct archive_entry *);
-__LA_DECL int archive_entry_size_is_set(struct archive_entry *);
-__LA_DECL const char *archive_entry_strmode(struct archive_entry *);
-__LA_DECL const char *archive_entry_symlink(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *);
-__LA_DECL __LA_INT64_T archive_entry_uid(struct archive_entry *);
-__LA_DECL const char *archive_entry_uname(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *);
-
-/*
- * Set fields in an archive_entry.
- *
- * Note: Before libarchive 2.4, there were 'set' and 'copy' versions
- * of the string setters. 'copy' copied the actual string, 'set' just
- * stored the pointer. In libarchive 2.4 and later, strings are
- * always copied.
- */
-
-__LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long);
-__LA_DECL void archive_entry_unset_atime(struct archive_entry *);
-#if defined(_WIN32) && !defined(__CYGWIN__)
-__LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, BY_HANDLE_FILE_INFORMATION *);
-#endif
-__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, time_t, long);
-__LA_DECL void archive_entry_unset_birthtime(struct archive_entry *);
-__LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long);
-__LA_DECL void archive_entry_unset_ctime(struct archive_entry *);
-__LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_filetype(struct archive_entry *, unsigned int);
-__LA_DECL void archive_entry_set_fflags(struct archive_entry *,
- unsigned long /* set */, unsigned long /* clear */);
-/* Returns pointer to start of first invalid token, or NULL if none. */
-/* Note that all recognized tokens are processed, regardless. */
-__LA_DECL const char *archive_entry_copy_fflags_text(struct archive_entry *,
- const char *);
-__LA_DECL const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *,
- const wchar_t *);
-__LA_DECL void archive_entry_set_gid(struct archive_entry *, __LA_INT64_T);
-__LA_DECL void archive_entry_set_gname(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_gname(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_gname_w(struct archive_entry *, const wchar_t *);
-__LA_DECL int archive_entry_update_gname_utf8(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_set_hardlink(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_hardlink(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *);
-__LA_DECL int archive_entry_update_hardlink_utf8(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_set_ino(struct archive_entry *, __LA_INT64_T);
-__LA_DECL void archive_entry_set_ino64(struct archive_entry *, __LA_INT64_T);
-__LA_DECL void archive_entry_set_link(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_link(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *);
-__LA_DECL int archive_entry_update_link_utf8(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T);
-__LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long);
-__LA_DECL void archive_entry_unset_mtime(struct archive_entry *);
-__LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int);
-__LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_pathname(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_pathname_w(struct archive_entry *, const wchar_t *);
-__LA_DECL int archive_entry_update_pathname_utf8(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_set_perm(struct archive_entry *, __LA_MODE_T);
-__LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_size(struct archive_entry *, __LA_INT64_T);
-__LA_DECL void archive_entry_unset_size(struct archive_entry *);
-__LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_sourcepath_w(struct archive_entry *, const wchar_t *);
-__LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *);
-__LA_DECL int archive_entry_update_symlink_utf8(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_set_uid(struct archive_entry *, __LA_INT64_T);
-__LA_DECL void archive_entry_set_uname(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_uname(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_copy_uname_w(struct archive_entry *, const wchar_t *);
-__LA_DECL int archive_entry_update_uname_utf8(struct archive_entry *, const char *);
-/*
- * Routines to bulk copy fields to/from a platform-native "struct
- * stat." Libarchive used to just store a struct stat inside of each
- * archive_entry object, but this created issues when trying to
- * manipulate archives on systems different than the ones they were
- * created on.
- *
- * TODO: On Linux and other LFS systems, provide both stat32 and
- * stat64 versions of these functions and all of the macro glue so
- * that archive_entry_stat is magically defined to
- * archive_entry_stat32 or archive_entry_stat64 as appropriate.
- */
-__LA_DECL const struct stat *archive_entry_stat(struct archive_entry *);
-__LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat *);
-
-/*
- * Storage for Mac OS-specific AppleDouble metadata information.
- * Apple-format tar files store a separate binary blob containing
- * encoded metadata with ACL, extended attributes, etc.
- * This provides a place to store that blob.
- */
-
-__LA_DECL const void * archive_entry_mac_metadata(struct archive_entry *, size_t *);
-__LA_DECL void archive_entry_copy_mac_metadata(struct archive_entry *, const void *, size_t);
-
-/*
- * ACL routines. This used to simply store and return text-format ACL
- * strings, but that proved insufficient for a number of reasons:
- * = clients need control over uname/uid and gname/gid mappings
- * = there are many different ACL text formats
- * = would like to be able to read/convert archives containing ACLs
- * on platforms that lack ACL libraries
- *
- * This last point, in particular, forces me to implement a reasonably
- * complete set of ACL support routines.
- */
-
-/*
- * Permission bits.
- */
-#define ARCHIVE_ENTRY_ACL_EXECUTE 0x00000001
-#define ARCHIVE_ENTRY_ACL_WRITE 0x00000002
-#define ARCHIVE_ENTRY_ACL_READ 0x00000004
-#define ARCHIVE_ENTRY_ACL_READ_DATA 0x00000008
-#define ARCHIVE_ENTRY_ACL_LIST_DIRECTORY 0x00000008
-#define ARCHIVE_ENTRY_ACL_WRITE_DATA 0x00000010
-#define ARCHIVE_ENTRY_ACL_ADD_FILE 0x00000010
-#define ARCHIVE_ENTRY_ACL_APPEND_DATA 0x00000020
-#define ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY 0x00000020
-#define ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS 0x00000040
-#define ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS 0x00000080
-#define ARCHIVE_ENTRY_ACL_DELETE_CHILD 0x00000100
-#define ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES 0x00000200
-#define ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES 0x00000400
-#define ARCHIVE_ENTRY_ACL_DELETE 0x00000800
-#define ARCHIVE_ENTRY_ACL_READ_ACL 0x00001000
-#define ARCHIVE_ENTRY_ACL_WRITE_ACL 0x00002000
-#define ARCHIVE_ENTRY_ACL_WRITE_OWNER 0x00004000
-#define ARCHIVE_ENTRY_ACL_SYNCHRONIZE 0x00008000
-
-#define ARCHIVE_ENTRY_ACL_PERMS_POSIX1E \
- (ARCHIVE_ENTRY_ACL_EXECUTE \
- | ARCHIVE_ENTRY_ACL_WRITE \
- | ARCHIVE_ENTRY_ACL_READ)
-
-#define ARCHIVE_ENTRY_ACL_PERMS_NFS4 \
- (ARCHIVE_ENTRY_ACL_EXECUTE \
- | ARCHIVE_ENTRY_ACL_READ_DATA \
- | ARCHIVE_ENTRY_ACL_LIST_DIRECTORY \
- | ARCHIVE_ENTRY_ACL_WRITE_DATA \
- | ARCHIVE_ENTRY_ACL_ADD_FILE \
- | ARCHIVE_ENTRY_ACL_APPEND_DATA \
- | ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY \
- | ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS \
- | ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS \
- | ARCHIVE_ENTRY_ACL_DELETE_CHILD \
- | ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES \
- | ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES \
- | ARCHIVE_ENTRY_ACL_DELETE \
- | ARCHIVE_ENTRY_ACL_READ_ACL \
- | ARCHIVE_ENTRY_ACL_WRITE_ACL \
- | ARCHIVE_ENTRY_ACL_WRITE_OWNER \
- | ARCHIVE_ENTRY_ACL_SYNCHRONIZE)
-
-/*
- * Inheritance values (NFS4 ACLs only); included in permset.
- */
-#define ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT 0x02000000
-#define ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT 0x04000000
-#define ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT 0x08000000
-#define ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY 0x10000000
-#define ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS 0x20000000
-#define ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS 0x40000000
-
-#define ARCHIVE_ENTRY_ACL_INHERITANCE_NFS4 \
- (ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT \
- | ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT \
- | ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT \
- | ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY \
- | ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS \
- | ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS)
-
-/* We need to be able to specify combinations of these. */
-#define ARCHIVE_ENTRY_ACL_TYPE_ACCESS 256 /* POSIX.1e only */
-#define ARCHIVE_ENTRY_ACL_TYPE_DEFAULT 512 /* POSIX.1e only */
-#define ARCHIVE_ENTRY_ACL_TYPE_ALLOW 1024 /* NFS4 only */
-#define ARCHIVE_ENTRY_ACL_TYPE_DENY 2048 /* NFS4 only */
-#define ARCHIVE_ENTRY_ACL_TYPE_AUDIT 4096 /* NFS4 only */
-#define ARCHIVE_ENTRY_ACL_TYPE_ALARM 8192 /* NFS4 only */
-#define ARCHIVE_ENTRY_ACL_TYPE_POSIX1E (ARCHIVE_ENTRY_ACL_TYPE_ACCESS \
- | ARCHIVE_ENTRY_ACL_TYPE_DEFAULT)
-#define ARCHIVE_ENTRY_ACL_TYPE_NFS4 (ARCHIVE_ENTRY_ACL_TYPE_ALLOW \
- | ARCHIVE_ENTRY_ACL_TYPE_DENY \
- | ARCHIVE_ENTRY_ACL_TYPE_AUDIT \
- | ARCHIVE_ENTRY_ACL_TYPE_ALARM)
-
-/* Tag values mimic POSIX.1e */
-#define ARCHIVE_ENTRY_ACL_USER 10001 /* Specified user. */
-#define ARCHIVE_ENTRY_ACL_USER_OBJ 10002 /* User who owns the file. */
-#define ARCHIVE_ENTRY_ACL_GROUP 10003 /* Specified group. */
-#define ARCHIVE_ENTRY_ACL_GROUP_OBJ 10004 /* Group who owns the file. */
-#define ARCHIVE_ENTRY_ACL_MASK 10005 /* Modify group access (POSIX.1e only) */
-#define ARCHIVE_ENTRY_ACL_OTHER 10006 /* Public (POSIX.1e only) */
-#define ARCHIVE_ENTRY_ACL_EVERYONE 10107 /* Everyone (NFS4 only) */
-
-/*
- * Set the ACL by clearing it and adding entries one at a time.
- * Unlike the POSIX.1e ACL routines, you must specify the type
- * (access/default) for each entry. Internally, the ACL data is just
- * a soup of entries. API calls here allow you to retrieve just the
- * entries of interest. This design (which goes against the spirit of
- * POSIX.1e) is useful for handling archive formats that combine
- * default and access information in a single ACL list.
- */
-__LA_DECL void archive_entry_acl_clear(struct archive_entry *);
-__LA_DECL int archive_entry_acl_add_entry(struct archive_entry *,
- int /* type */, int /* permset */, int /* tag */,
- int /* qual */, const char * /* name */);
-__LA_DECL int archive_entry_acl_add_entry_w(struct archive_entry *,
- int /* type */, int /* permset */, int /* tag */,
- int /* qual */, const wchar_t * /* name */);
-
-/*
- * To retrieve the ACL, first "reset", then repeatedly ask for the
- * "next" entry. The want_type parameter allows you to request only
- * certain types of entries.
- */
-__LA_DECL int archive_entry_acl_reset(struct archive_entry *, int /* want_type */);
-__LA_DECL int archive_entry_acl_next(struct archive_entry *, int /* want_type */,
- int * /* type */, int * /* permset */, int * /* tag */,
- int * /* qual */, const char ** /* name */);
-__LA_DECL int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */,
- int * /* type */, int * /* permset */, int * /* tag */,
- int * /* qual */, const wchar_t ** /* name */);
-
-/*
- * Construct a text-format ACL. The flags argument is a bitmask that
- * can include any of the following:
- *
- * ARCHIVE_ENTRY_ACL_TYPE_ACCESS - Include POSIX.1e "access" entries.
- * ARCHIVE_ENTRY_ACL_TYPE_DEFAULT - Include POSIX.1e "default" entries.
- * ARCHIVE_ENTRY_ACL_TYPE_NFS4 - Include NFS4 entries.
- * ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID - Include extra numeric ID field in
- * each ACL entry. ('star' introduced this for POSIX.1e, this flag
- * also applies to NFS4.)
- * ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT - Include "default:" before each
- * default ACL entry, as used in old Solaris ACLs.
- */
-#define ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 1024
-#define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 2048
-__LA_DECL const wchar_t *archive_entry_acl_text_w(struct archive_entry *,
- int /* flags */);
-__LA_DECL const char *archive_entry_acl_text(struct archive_entry *,
- int /* flags */);
-
-/* Return a count of entries matching 'want_type' */
-__LA_DECL int archive_entry_acl_count(struct archive_entry *, int /* want_type */);
-
-/* Return an opaque ACL object. */
-/* There's not yet anything clients can actually do with this... */
-struct archive_acl;
-__LA_DECL struct archive_acl *archive_entry_acl(struct archive_entry *);
-
-/*
- * extended attributes
- */
-
-__LA_DECL void archive_entry_xattr_clear(struct archive_entry *);
-__LA_DECL void archive_entry_xattr_add_entry(struct archive_entry *,
- const char * /* name */, const void * /* value */,
- size_t /* size */);
-
-/*
- * To retrieve the xattr list, first "reset", then repeatedly ask for the
- * "next" entry.
- */
-
-__LA_DECL int archive_entry_xattr_count(struct archive_entry *);
-__LA_DECL int archive_entry_xattr_reset(struct archive_entry *);
-__LA_DECL int archive_entry_xattr_next(struct archive_entry *,
- const char ** /* name */, const void ** /* value */, size_t *);
-
-/*
- * sparse
- */
-
-__LA_DECL void archive_entry_sparse_clear(struct archive_entry *);
-__LA_DECL void archive_entry_sparse_add_entry(struct archive_entry *,
- __LA_INT64_T /* offset */, __LA_INT64_T /* length */);
-
-/*
- * To retrieve the xattr list, first "reset", then repeatedly ask for the
- * "next" entry.
- */
-
-__LA_DECL int archive_entry_sparse_count(struct archive_entry *);
-__LA_DECL int archive_entry_sparse_reset(struct archive_entry *);
-__LA_DECL int archive_entry_sparse_next(struct archive_entry *,
- __LA_INT64_T * /* offset */, __LA_INT64_T * /* length */);
-
-/*
- * Utility to match up hardlinks.
- *
- * The 'struct archive_entry_linkresolver' is a cache of archive entries
- * for files with multiple links. Here's how to use it:
- * 1. Create a lookup object with archive_entry_linkresolver_new()
- * 2. Tell it the archive format you're using.
- * 3. Hand each archive_entry to archive_entry_linkify().
- * That function will return 0, 1, or 2 entries that should
- * be written.
- * 4. Call archive_entry_linkify(resolver, NULL) until
- * no more entries are returned.
- * 5. Call archive_entry_linkresolver_free(resolver) to free resources.
- *
- * The entries returned have their hardlink and size fields updated
- * appropriately. If an entry is passed in that does not refer to
- * a file with multiple links, it is returned unchanged. The intention
- * is that you should be able to simply filter all entries through
- * this machine.
- *
- * To make things more efficient, be sure that each entry has a valid
- * nlinks value. The hardlink cache uses this to track when all links
- * have been found. If the nlinks value is zero, it will keep every
- * name in the cache indefinitely, which can use a lot of memory.
- *
- * Note that archive_entry_size() is reset to zero if the file
- * body should not be written to the archive. Pay attention!
- */
-struct archive_entry_linkresolver;
-
-/*
- * There are three different strategies for marking hardlinks.
- * The descriptions below name them after the best-known
- * formats that rely on each strategy:
- *
- * "Old cpio" is the simplest, it always returns any entry unmodified.
- * As far as I know, only cpio formats use this. Old cpio archives
- * store every link with the full body; the onus is on the dearchiver
- * to detect and properly link the files as they are restored.
- * "tar" is also pretty simple; it caches a copy the first time it sees
- * any link. Subsequent appearances are modified to be hardlink
- * references to the first one without any body. Used by all tar
- * formats, although the newest tar formats permit the "old cpio" strategy
- * as well. This strategy is very simple for the dearchiver,
- * and reasonably straightforward for the archiver.
- * "new cpio" is trickier. It stores the body only with the last
- * occurrence. The complication is that we might not
- * see every link to a particular file in a single session, so
- * there's no easy way to know when we've seen the last occurrence.
- * The solution here is to queue one link until we see the next.
- * At the end of the session, you can enumerate any remaining
- * entries by calling archive_entry_linkify(NULL) and store those
- * bodies. If you have a file with three links l1, l2, and l3,
- * you'll get the following behavior if you see all three links:
- * linkify(l1) => NULL (the resolver stores l1 internally)
- * linkify(l2) => l1 (resolver stores l2, you write l1)
- * linkify(l3) => l2, l3 (all links seen, you can write both).
- * If you only see l1 and l2, you'll get this behavior:
- * linkify(l1) => NULL
- * linkify(l2) => l1
- * linkify(NULL) => l2 (at end, you retrieve remaining links)
- * As the name suggests, this strategy is used by newer cpio variants.
- * It's noticeably more complex for the archiver, slightly more complex
- * for the dearchiver than the tar strategy, but makes it straightforward
- * to restore a file using any link by simply continuing to scan until
- * you see a link that is stored with a body. In contrast, the tar
- * strategy requires you to rescan the archive from the beginning to
- * correctly extract an arbitrary link.
- */
-
-__LA_DECL struct archive_entry_linkresolver *archive_entry_linkresolver_new(void);
-__LA_DECL void archive_entry_linkresolver_set_strategy(
- struct archive_entry_linkresolver *, int /* format_code */);
-__LA_DECL void archive_entry_linkresolver_free(struct archive_entry_linkresolver *);
-__LA_DECL void archive_entry_linkify(struct archive_entry_linkresolver *,
- struct archive_entry **, struct archive_entry **);
-__LA_DECL struct archive_entry *archive_entry_partial_links(
- struct archive_entry_linkresolver *res, unsigned int *links);
-
-#ifdef __cplusplus
-}
-#endif
-
-/* This is meaningless outside of this header. */
-#undef __LA_DECL
-
-#endif /* !ARCHIVE_ENTRY_H_INCLUDED */
diff --git a/include.new/arpa/ftp.h b/include.new/arpa/ftp.h
deleted file mode 100644
index 1d8d977..0000000
--- a/include.new/arpa/ftp.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.
- *
- * @(#)ftp.h 8.1 (Berkeley) 6/2/93
- *
- * $FreeBSD: releng/10.2/include/arpa/ftp.h 203965 2010-02-16 19:46:46Z imp $
- */
-
-#ifndef _ARPA_FTP_H_
-#define _ARPA_FTP_H_
-
-/* Definitions for FTP; see RFC-765. */
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-/*
- * Type codes
- */
-#define TYPE_A 1 /* ASCII */
-#define TYPE_E 2 /* EBCDIC */
-#define TYPE_I 3 /* image */
-#define TYPE_L 4 /* local byte size */
-
-#ifdef FTP_NAMES
-char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
-#endif
-
-/*
- * Form codes
- */
-#define FORM_N 1 /* non-print */
-#define FORM_T 2 /* telnet format effectors */
-#define FORM_C 3 /* carriage control (ASA) */
-#ifdef FTP_NAMES
-char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
-#endif
-
-/*
- * Structure codes
- */
-#define STRU_F 1 /* file (no record structure) */
-#define STRU_R 2 /* record structure */
-#define STRU_P 3 /* page structure */
-#ifdef FTP_NAMES
-char *strunames[] = {"0", "File", "Record", "Page" };
-#endif
-
-/*
- * Mode types
- */
-#define MODE_S 1 /* stream */
-#define MODE_B 2 /* block */
-#define MODE_C 3 /* compressed */
-#ifdef FTP_NAMES
-char *modenames[] = {"0", "Stream", "Block", "Compressed" };
-#endif
-
-/*
- * Record Tokens
- */
-#define REC_ESC '\377' /* Record-mode Escape */
-#define REC_EOR '\001' /* Record-mode End-of-Record */
-#define REC_EOF '\002' /* Record-mode End-of-File */
-
-/*
- * Block Header
- */
-#define BLK_EOR 0x80 /* Block is End-of-Record */
-#define BLK_EOF 0x40 /* Block is End-of-File */
-#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
-#define BLK_RESTART 0x10 /* Block is Restart Marker */
-
-#define BLK_BYTECOUNT 2 /* Bytes in this block */
-
-#endif /* !_FTP_H_ */
diff --git a/include.new/arpa/inet.h b/include.new/arpa/inet.h
deleted file mode 100644
index 7086a4a..0000000
--- a/include.new/arpa/inet.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * ++Copyright++ 1983, 1993
- * -
- * Copyright (c) 1983, 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.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * 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, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION 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--
- */
-
-/*%
- * @(#)inet.h 8.1 (Berkeley) 6/2/93
- * $Id: inet.h 103 2016-01-12 05:32:24Z reddawg $
- * $FreeBSD: releng/10.2/include/arpa/inet.h 270838 2014-08-30 10:16:25Z ume $
- */
-
-#ifndef _ARPA_INET_H_
-#define _ARPA_INET_H_
-
-/* External definitions for functions in inet(3). */
-
-#include
-#include
-
-/* Required for byteorder(3) functions. */
-#include
-
-#define INET_ADDRSTRLEN 16
-#define INET6_ADDRSTRLEN 46
-
-#ifndef _UINT16_T_DECLARED
-typedef __uint16_t uint16_t;
-#define _UINT16_T_DECLARED
-#endif
-
-#ifndef _UINT32_T_DECLARED
-typedef __uint32_t uint32_t;
-#define _UINT32_T_DECLARED
-#endif
-
-#ifndef _IN_ADDR_T_DECLARED
-typedef uint32_t in_addr_t;
-#define _IN_ADDR_T_DECLARED
-#endif
-
-#ifndef _IN_PORT_T_DECLARED
-typedef uint16_t in_port_t;
-#define _IN_PORT_T_DECLARED
-#endif
-
-#if __BSD_VISIBLE
-#ifndef _SIZE_T_DECLARED
-typedef __size_t size_t;
-#define _SIZE_T_DECLARED
-#endif
-#endif
-
-/*
- * XXX socklen_t is used by a POSIX.1-2001 interface, but not required by
- * POSIX.1-2001.
- */
-#ifndef _SOCKLEN_T_DECLARED
-typedef __socklen_t socklen_t;
-#define _SOCKLEN_T_DECLARED
-#endif
-
-#ifndef _STRUCT_IN_ADDR_DECLARED
-struct in_addr {
- in_addr_t s_addr;
-};
-#define _STRUCT_IN_ADDR_DECLARED
-#endif
-
-/* XXX all new diversions!! argh!! */
-#if __BSD_VISIBLE
-#define inet_addr __inet_addr
-#define inet_aton __inet_aton
-#define inet_lnaof __inet_lnaof
-#define inet_makeaddr __inet_makeaddr
-#define inet_neta __inet_neta
-#define inet_netof __inet_netof
-#define inet_network __inet_network
-#define inet_net_ntop __inet_net_ntop
-#define inet_net_pton __inet_net_pton
-#define inet_cidr_ntop __inet_cidr_ntop
-#define inet_cidr_pton __inet_cidr_pton
-#define inet_ntoa __inet_ntoa
-#define inet_ntoa_r __inet_ntoa_r
-#define inet_pton __inet_pton
-#define inet_ntop __inet_ntop
-#define inet_nsap_addr __inet_nsap_addr
-#define inet_nsap_ntoa __inet_nsap_ntoa
-#endif /* __BSD_VISIBLE */
-
-__BEGIN_DECLS
-#ifndef _BYTEORDER_PROTOTYPED
-#define _BYTEORDER_PROTOTYPED
-uint32_t htonl(uint32_t);
-uint16_t htons(uint16_t);
-uint32_t ntohl(uint32_t);
-uint16_t ntohs(uint16_t);
-#endif
-
-in_addr_t inet_addr(const char *);
-/*const*/ char *inet_ntoa(struct in_addr);
-const char *inet_ntop(int, const void * __restrict, char * __restrict,
- socklen_t);
-int inet_pton(int, const char * __restrict, void * __restrict);
-
-#if __BSD_VISIBLE
-int inet_aton(const char *, struct in_addr *);
-in_addr_t inet_lnaof(struct in_addr);
-struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
-char * inet_neta(in_addr_t, char *, size_t);
-in_addr_t inet_netof(struct in_addr);
-in_addr_t inet_network(const char *);
-char *inet_net_ntop(int, const void *, int, char *, size_t);
-int inet_net_pton(int, const char *, void *, size_t);
-char *inet_ntoa_r(struct in_addr, char *buf, socklen_t size);
-char *inet_cidr_ntop(int, const void *, int, char *, size_t);
-int inet_cidr_pton(int, const char *, void *, int *);
-unsigned inet_nsap_addr(const char *, unsigned char *, int);
-char *inet_nsap_ntoa(int, const unsigned char *, char *);
-#endif /* __BSD_VISIBLE */
-__END_DECLS
-
-#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
-
-#endif /* !_ARPA_INET_H_ */
-
-/*! \file */
diff --git a/include.new/arpa/nameser.h b/include.new/arpa/nameser.h
deleted file mode 100644
index fb22cf6..0000000
--- a/include.new/arpa/nameser.h
+++ /dev/null
@@ -1,680 +0,0 @@
-/*
- * 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 103 2016-01-12 05:32:24Z reddawg $
- * $FreeBSD: releng/10.2/include/arpa/nameser.h 270838 2014-08-30 10:16:25Z ume $
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-/*! \file */
-
-#define BIND_4_COMPAT
-
-#include
-#include
-#include
-
-/*%
- * 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 uint32_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. Equivilent 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;
- uint32_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) = ((uint32_t)t_cp[0] << 24) \
- | ((uint32_t)t_cp[1] << 16) \
- | ((uint32_t)t_cp[2] << 8) \
- | ((uint32_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 uint32_t t_l = (uint32_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
-#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
-#define ns_samedomain __ns_samedomain
-#if 0
-#define ns_subdomain __ns_subdomain
-#endif
-#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
-uint32_t ns_datetosecs(const char *cp, int *errp);
-#endif
-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
-int ns_samedomain(const char *, const char *);
-#if 0
-int ns_subdomain(const char *, const char *);
-#endif
-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, uint32_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
-#include
-#endif
-
-#endif /* !_ARPA_NAMESER_H_ */
-/*! \file */
diff --git a/include.new/arpa/nameser_compat.h b/include.new/arpa/nameser_compat.h
deleted file mode 100644
index 2be8233..0000000
--- a/include.new/arpa/nameser_compat.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* 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 103 2016-01-12 05:32:24Z reddawg $
- * $FreeBSD: releng/10.2/include/arpa/nameser_compat.h 270838 2014-08-30 10:16:25Z ume $
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-#define __BIND 19950621 /*%< (DEAD) interface version stamp. */
-
-#include
-
-#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
-
-/*%
- * 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
-#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
- /* 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_ */
-/*! \file */
diff --git a/include.new/arpa/telnet.h b/include.new/arpa/telnet.h
deleted file mode 100644
index bf01736..0000000
--- a/include.new/arpa/telnet.h
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Copyright (c) 1983, 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.
- *
- * @(#)telnet.h 8.2 (Berkeley) 12/15/93
- * $FreeBSD: releng/10.2/contrib/telnet/arpa/telnet.h 275508 2014-12-05 12:23:29Z ngie $
- */
-
-#ifndef _ARPA_TELNET_H_
-#define _ARPA_TELNET_H_
-
-/*
- * Definitions for the TELNET protocol.
- */
-#define IAC 255 /* interpret as command: */
-#define DONT 254 /* you are not to use option */
-#define DO 253 /* please, you use option */
-#define WONT 252 /* I won't use option */
-#define WILL 251 /* I will use option */
-#define SB 250 /* interpret as subnegotiation */
-#define GA 249 /* you may reverse the line */
-#define EL 248 /* erase the current line */
-#define EC 247 /* erase the current character */
-#define AYT 246 /* are you there */
-#define AO 245 /* abort output--but let prog finish */
-#define IP 244 /* interrupt process--permanently */
-#define BREAK 243 /* break */
-#define DM 242 /* data mark--for connect. cleaning */
-#define NOP 241 /* nop */
-#define SE 240 /* end sub negotiation */
-#define EOR 239 /* end of record (transparent mode) */
-#define ABORT 238 /* Abort process */
-#define SUSP 237 /* Suspend process */
-#define xEOF 236 /* End of file: EOF is already used... */
-
-#define SYNCH 242 /* for telfunc calls */
-
-#ifdef TELCMDS
-const char *telcmds[] = {
- "EOF", "SUSP", "ABORT", "EOR",
- "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
- "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
- 0
-};
-#else
-extern char *telcmds[];
-#endif
-
-#define TELCMD_FIRST xEOF
-#define TELCMD_LAST IAC
-#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
- (unsigned int)(x) >= TELCMD_FIRST)
-#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
-
-/* telnet options */
-#define TELOPT_BINARY 0 /* 8-bit data path */
-#define TELOPT_ECHO 1 /* echo */
-#define TELOPT_RCP 2 /* prepare to reconnect */
-#define TELOPT_SGA 3 /* suppress go ahead */
-#define TELOPT_NAMS 4 /* approximate message size */
-#define TELOPT_STATUS 5 /* give status */
-#define TELOPT_TM 6 /* timing mark */
-#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
-#define TELOPT_NAOL 8 /* negotiate about output line width */
-#define TELOPT_NAOP 9 /* negotiate about output page size */
-#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
-#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
-#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
-#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
-#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
-#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
-#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
-#define TELOPT_XASCII 17 /* extended ascic character set */
-#define TELOPT_LOGOUT 18 /* force logout */
-#define TELOPT_BM 19 /* byte macro */
-#define TELOPT_DET 20 /* data entry terminal */
-#define TELOPT_SUPDUP 21 /* supdup protocol */
-#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
-#define TELOPT_SNDLOC 23 /* send location */
-#define TELOPT_TTYPE 24 /* terminal type */
-#define TELOPT_EOR 25 /* end or record */
-#define TELOPT_TUID 26 /* TACACS user identification */
-#define TELOPT_OUTMRK 27 /* output marking */
-#define TELOPT_TTYLOC 28 /* terminal location number */
-#define TELOPT_3270REGIME 29 /* 3270 regime */
-#define TELOPT_X3PAD 30 /* X.3 PAD */
-#define TELOPT_NAWS 31 /* window size */
-#define TELOPT_TSPEED 32 /* terminal speed */
-#define TELOPT_LFLOW 33 /* remote flow control */
-#define TELOPT_LINEMODE 34 /* Linemode option */
-#define TELOPT_XDISPLOC 35 /* X Display Location */
-#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
-#define TELOPT_AUTHENTICATION 37/* Authenticate */
-#define TELOPT_ENCRYPT 38 /* Encryption option */
-#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
-#define TELOPT_TN3270E 40 /* RFC2355 - TN3270 Enhancements */
-#define TELOPT_CHARSET 42 /* RFC2066 - Charset */
-#define TELOPT_COMPORT 44 /* RFC2217 - Com Port Control */
-#define TELOPT_KERMIT 47 /* RFC2840 - Kermit */
-#define TELOPT_EXOPL 255 /* extended-options-list */
-
-#define COMPORT_SET_BAUDRATE 1 /* RFC2217 - Com Port Set Baud Rate */
-
-#define NTELOPTS (1+TELOPT_KERMIT)
-#ifdef TELOPTS
-const char *telopts[NTELOPTS+1] = {
- "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
- "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
- "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
- "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
- "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
- "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
- "TACACS UID", "OUTPUT MARKING", "TTYLOC",
- "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
- "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
- "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET",
- "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT",
- 0
-};
-#define TELOPT_FIRST TELOPT_BINARY
-#define TELOPT_LAST TELOPT_KERMIT
-#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
-#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
-#endif
-
-/* sub-option qualifiers */
-#define TELQUAL_IS 0 /* option is... */
-#define TELQUAL_SEND 1 /* send option */
-#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
-#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
-#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
-
-#define LFLOW_OFF 0 /* Disable remote flow control */
-#define LFLOW_ON 1 /* Enable remote flow control */
-#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
-#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
-
-/*
- * LINEMODE suboptions
- */
-
-#define LM_MODE 1
-#define LM_FORWARDMASK 2
-#define LM_SLC 3
-
-#define MODE_EDIT 0x01
-#define MODE_TRAPSIG 0x02
-#define MODE_ACK 0x04
-#define MODE_SOFT_TAB 0x08
-#define MODE_LIT_ECHO 0x10
-
-#define MODE_MASK 0x1f
-
-/* Not part of protocol, but needed to simplify things... */
-#define MODE_FLOW 0x0100
-#define MODE_ECHO 0x0200
-#define MODE_INBIN 0x0400
-#define MODE_OUTBIN 0x0800
-#define MODE_FORCE 0x1000
-
-#define SLC_SYNCH 1
-#define SLC_BRK 2
-#define SLC_IP 3
-#define SLC_AO 4
-#define SLC_AYT 5
-#define SLC_EOR 6
-#define SLC_ABORT 7
-#define SLC_EOF 8
-#define SLC_SUSP 9
-#define SLC_EC 10
-#define SLC_EL 11
-#define SLC_EW 12
-#define SLC_RP 13
-#define SLC_LNEXT 14
-#define SLC_XON 15
-#define SLC_XOFF 16
-#define SLC_FORW1 17
-#define SLC_FORW2 18
-#define SLC_MCL 19
-#define SLC_MCR 20
-#define SLC_MCWL 21
-#define SLC_MCWR 22
-#define SLC_MCBOL 23
-#define SLC_MCEOL 24
-#define SLC_INSRT 25
-#define SLC_OVER 26
-#define SLC_ECR 27
-#define SLC_EWR 28
-#define SLC_EBOL 29
-#define SLC_EEOL 30
-
-#define NSLC 30
-
-/*
- * For backwards compatibility, we define SLC_NAMES to be the
- * list of names if SLC_NAMES is not defined.
- */
-#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
- "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
- "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
- "MCL", "MCR", "MCWL", "MCWR", "MCBOL", \
- "MCEOL", "INSRT", "OVER", "ECR", "EWR", \
- "EBOL", "EEOL", \
- 0
-
-#ifdef SLC_NAMES
-const char *slc_names[] = {
- SLC_NAMELIST
-};
-#else
-extern char *slc_names[];
-#define SLC_NAMES SLC_NAMELIST
-#endif
-
-#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
-#define SLC_NAME(x) slc_names[x]
-
-#define SLC_NOSUPPORT 0
-#define SLC_CANTCHANGE 1
-#define SLC_VARIABLE 2
-#define SLC_DEFAULT 3
-#define SLC_LEVELBITS 0x03
-
-#define SLC_FUNC 0
-#define SLC_FLAGS 1
-#define SLC_VALUE 2
-
-#define SLC_ACK 0x80
-#define SLC_FLUSHIN 0x40
-#define SLC_FLUSHOUT 0x20
-
-#define OLD_ENV_VAR 1
-#define OLD_ENV_VALUE 0
-#define NEW_ENV_VAR 0
-#define NEW_ENV_VALUE 1
-#define ENV_ESC 2
-#define ENV_USERVAR 3
-
-/*
- * AUTHENTICATION suboptions
- */
-
-/*
- * Who is authenticating who ...
- */
-#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
-#define AUTH_WHO_SERVER 1 /* Server authenticating client */
-#define AUTH_WHO_MASK 1
-
-/*
- * amount of authentication done
- */
-#define AUTH_HOW_ONE_WAY 0
-#define AUTH_HOW_MUTUAL 2
-#define AUTH_HOW_MASK 2
-
-#define AUTHTYPE_NULL 0
-#define AUTHTYPE_KERBEROS_V4 1
-#define AUTHTYPE_KERBEROS_V5 2
-#define AUTHTYPE_SPX 3
-#define AUTHTYPE_MINK 4
-#define AUTHTYPE_SRA 6
-#define AUTHTYPE_CNT 7
-
-#define AUTHTYPE_TEST 99
-
-#ifdef AUTH_NAMES
-const char *authtype_names[] = {
- "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", NULL, "SRA",
- 0
-};
-#else
-extern char *authtype_names[];
-#endif
-
-#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
-#define AUTHTYPE_NAME(x) authtype_names[x]
-
-/*
- * ENCRYPTion suboptions
- */
-#define ENCRYPT_IS 0 /* I pick encryption type ... */
-#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
-#define ENCRYPT_REPLY 2 /* Initial setup response */
-#define ENCRYPT_START 3 /* Am starting to send encrypted */
-#define ENCRYPT_END 4 /* Am ending encrypted */
-#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
-#define ENCRYPT_REQEND 6 /* Request you end encrypting */
-#define ENCRYPT_ENC_KEYID 7
-#define ENCRYPT_DEC_KEYID 8
-#define ENCRYPT_CNT 9
-
-#define ENCTYPE_ANY 0
-#define ENCTYPE_DES_CFB64 1
-#define ENCTYPE_DES_OFB64 2
-#define ENCTYPE_CNT 3
-
-#ifdef ENCRYPT_NAMES
-const char *encrypt_names[] = {
- "IS", "SUPPORT", "REPLY", "START", "END",
- "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
- 0
-};
-const char *enctype_names[] = {
- "ANY", "DES_CFB64", "DES_OFB64",
- 0
-};
-#else
-extern char *encrypt_names[];
-extern char *enctype_names[];
-#endif
-
-
-#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
-#define ENCRYPT_NAME(x) encrypt_names[x]
-
-#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
-#define ENCTYPE_NAME(x) enctype_names[x]
-
-#endif /* !_TELNET_H_ */
diff --git a/include.new/arpa/tftp.h b/include.new/arpa/tftp.h
deleted file mode 100644
index 1c18e6c..0000000
--- a/include.new/arpa/tftp.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1983, 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.
- *
- * @(#)tftp.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: releng/10.2/include/arpa/tftp.h 250887 2013-05-21 21:20:10Z ed $
- */
-
-#ifndef _ARPA_TFTP_H_
-#define _ARPA_TFTP_H_
-
-#include
-
-/*
- * Trivial File Transfer Protocol (IEN-133)
- */
-#define SEGSIZE 512 /* data segment size */
-
-/*
- * Packet types.
- */
-#define RRQ 01 /* read request */
-#define WRQ 02 /* write request */
-#define DATA 03 /* data packet */
-#define ACK 04 /* acknowledgement */
-#define ERROR 05 /* error code */
-#define OACK 06 /* option acknowledgement */
-
-struct tftphdr {
- unsigned short th_opcode; /* packet type */
- union {
- unsigned short tu_block; /* block # */
- unsigned short tu_code; /* error code */
- char tu_stuff[1]; /* request packet stuff */
- } __packed th_u;
- char th_data[1]; /* data or error string */
-} __packed;
-
-#define th_block th_u.tu_block
-#define th_code th_u.tu_code
-#define th_stuff th_u.tu_stuff
-#define th_msg th_data
-
-/*
- * Error codes.
- */
-#define EUNDEF 0 /* not defined */
-#define ENOTFOUND 1 /* file not found */
-#define EACCESS 2 /* access violation */
-#define ENOSPACE 3 /* disk full or allocation exceeded */
-#define EBADOP 4 /* illegal TFTP operation */
-#define EBADID 5 /* unknown transfer ID */
-#define EEXISTS 6 /* file already exists */
-#define ENOUSER 7 /* no such user */
-#define EOPTNEG 8 /* option negotiation failed */
-
-#endif /* !_TFTP_H_ */
diff --git a/include.new/asn1-common.h b/include.new/asn1-common.h
deleted file mode 100644
index 4083ebc..0000000
--- a/include.new/asn1-common.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $Id$ */
-
-#include
-#include
-#include
-
-#ifndef __asn1_common_definitions__
-#define __asn1_common_definitions__
-
-typedef struct heim_integer {
- size_t length;
- void *data;
- int negative;
-} heim_integer;
-
-typedef struct heim_octet_string {
- size_t length;
- void *data;
-} heim_octet_string;
-
-typedef char *heim_general_string;
-typedef char *heim_utf8_string;
-typedef struct heim_octet_string heim_printable_string;
-typedef struct heim_octet_string heim_ia5_string;
-
-typedef struct heim_bmp_string {
- size_t length;
- uint16_t *data;
-} heim_bmp_string;
-
-typedef struct heim_universal_string {
- size_t length;
- uint32_t *data;
-} heim_universal_string;
-
-typedef char *heim_visible_string;
-
-typedef struct heim_oid {
- size_t length;
- unsigned *components;
-} heim_oid;
-
-typedef struct heim_bit_string {
- size_t length;
- void *data;
-} heim_bit_string;
-
-typedef struct heim_octet_string heim_any;
-typedef struct heim_octet_string heim_any_set;
-
-#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \
- do { \
- (BL) = length_##T((S)); \
- (B) = malloc((BL)); \
- if((B) == NULL) { \
- (R) = ENOMEM; \
- } else { \
- (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \
- (S), (L)); \
- if((R) != 0) { \
- free((B)); \
- (B) = NULL; \
- } \
- } \
- } while (0)
-
-#ifdef _WIN32
-#ifndef ASN1_LIB
-#define ASN1EXP __declspec(dllimport)
-#else
-#define ASN1EXP
-#endif
-#define ASN1CALL __stdcall
-#else
-#define ASN1EXP
-#define ASN1CALL
-#endif
-
-#endif
diff --git a/include.new/asn1_err.h b/include.new/asn1_err.h
deleted file mode 100644
index 8bd812b..0000000
--- a/include.new/asn1_err.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Generated from /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/asn1/asn1_err.et */
-/* $Id: asn1_err.h 103 2016-01-12 05:32:24Z reddawg $ */
-
-#ifndef __asn1_err_h__
-#define __asn1_err_h__
-
-struct et_list;
-
-void initialize_asn1_error_table_r(struct et_list **);
-
-void initialize_asn1_error_table(void);
-#define init_asn1_err_tbl initialize_asn1_error_table
-
-typedef enum asn1_error_number{
- ASN1_BAD_TIMEFORMAT = 1859794432,
- ASN1_MISSING_FIELD = 1859794433,
- ASN1_MISPLACED_FIELD = 1859794434,
- ASN1_TYPE_MISMATCH = 1859794435,
- ASN1_OVERFLOW = 1859794436,
- ASN1_OVERRUN = 1859794437,
- ASN1_BAD_ID = 1859794438,
- ASN1_BAD_LENGTH = 1859794439,
- ASN1_BAD_FORMAT = 1859794440,
- ASN1_PARSE_ERROR = 1859794441,
- ASN1_EXTRA_DATA = 1859794442,
- ASN1_BAD_CHARACTER = 1859794443,
- ASN1_MIN_CONSTRAINT = 1859794444,
- ASN1_MAX_CONSTRAINT = 1859794445,
- ASN1_EXACT_CONSTRAINT = 1859794446,
- ASN1_INDEF_OVERRUN = 1859794447,
- ASN1_INDEF_UNDERRUN = 1859794448,
- ASN1_GOT_BER = 1859794449,
- ASN1_INDEF_EXTRA_DATA = 1859794450
-} asn1_error_number;
-
-#define ERROR_TABLE_BASE_asn1 1859794432
-
-#define COM_ERR_BINDDOMAIN_asn1 "heim_com_err1859794432"
-
-#endif /* __asn1_err_h__ */
diff --git a/include.new/assert.h b/include.new/assert.h
deleted file mode 100644
index d1d3d7a..0000000
--- a/include.new/assert.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * Copyright (c) 1992, 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.
- * 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.
- *
- * @(#)assert.h 8.2 (Berkeley) 1/21/94
- * $FreeBSD: releng/10.2/include/assert.h 228955 2011-12-29 14:41:17Z ed $
- */
-
-#include
-
-/*
- * Unlike other ANSI header files, may usefully be included
- * multiple times, with and without NDEBUG defined.
- */
-
-#undef assert
-#undef _assert
-
-#ifdef NDEBUG
-#define assert(e) ((void)0)
-#define _assert(e) ((void)0)
-#else
-#define _assert(e) assert(e)
-
-#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
- __LINE__, #e))
-#endif /* NDEBUG */
-
-#ifndef _ASSERT_H_
-#define _ASSERT_H_
-
-/*
- * Static assertions. In principle we could define static_assert for
- * C++ older than C++11, but this breaks if _Static_assert is
- * implemented as a macro.
- *
- * C++ template parameters may contain commas, even if not enclosed in
- * parentheses, causing the _Static_assert macro to be invoked with more
- * than two parameters.
- */
-#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus)
-#define static_assert _Static_assert
-#endif
-
-__BEGIN_DECLS
-void __assert(const char *, const char *, int, const char *) __dead2;
-__END_DECLS
-
-#endif /* !_ASSERT_H_ */
diff --git a/include.new/base64.h b/include.new/base64.h
deleted file mode 100644
index dfae4c1..0000000
--- a/include.new/base64.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * 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 Institute 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 INSTITUTE 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 INSTITUTE 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$ */
-
-#ifndef _BASE64_H_
-#define _BASE64_H_
-
-#ifndef ROKEN_LIB_FUNCTION
-#ifdef _WIN32
-#define ROKEN_LIB_FUNCTION
-#define ROKEN_LIB_CALL __cdecl
-#else
-#define ROKEN_LIB_FUNCTION
-#define ROKEN_LIB_CALL
-#endif
-#endif
-
-ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-base64_encode(const void *, int, char **);
-
-ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-base64_decode(const char *, void *);
-
-#endif
diff --git a/include.new/bitstring.h b/include.new/bitstring.h
deleted file mode 100644
index 5c99a98..0000000
--- a/include.new/bitstring.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*-
- * Copyright (c) 2003 Poul-Henning Kamp
- * 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: releng/10.2/include/bitstring.h 116306 2003-06-13 19:40:13Z phk $
- */
-
-#ifndef _BITSTRING_H_
-#define _BITSTRING_H_
-
-#include
-
-#endif /* _BITSTRING_H_ */
-
diff --git a/include.new/bluetooth.h b/include.new/bluetooth.h
deleted file mode 100644
index 1db5d22..0000000
--- a/include.new/bluetooth.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * bluetooth.h
- */
-
-/*-
- * Copyright (c) 2001-2009 Maksim Yevmenkin
- * 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.
- *
- * $Id: bluetooth.h 103 2016-01-12 05:32:24Z reddawg $
- * $FreeBSD: releng/10.2/lib/libbluetooth/bluetooth.h 213042 2010-09-22 23:41:02Z emax $
- */
-
-#ifndef _BLUETOOTH_H_
-#define _BLUETOOTH_H_
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-__BEGIN_DECLS
-
-/*
- * Linux BlueZ compatibility
- */
-
-#define bacmp(ba1, ba2) memcmp((ba1), (ba2), sizeof(bdaddr_t))
-#define bacpy(dst, src) memcpy((dst), (src), sizeof(bdaddr_t))
-#define ba2str(ba, str) bt_ntoa((ba), (str))
-#define str2ba(str, ba) (bt_aton((str), (ba)) == 1? 0 : -1)
-#define htobs(d) htole16(d)
-#define htobl(d) htole32(d)
-#define btohs(d) le16toh(d)
-#define btohl(d) le32toh(d)
-
-/*
- * Interface to the outside world
- */
-
-struct hostent * bt_gethostbyname (char const *name);
-struct hostent * bt_gethostbyaddr (char const *addr, int len, int type);
-struct hostent * bt_gethostent (void);
-void bt_sethostent (int stayopen);
-void bt_endhostent (void);
-
-struct protoent * bt_getprotobyname (char const *name);
-struct protoent * bt_getprotobynumber (int proto);
-struct protoent * bt_getprotoent (void);
-void bt_setprotoent (int stayopen);
-void bt_endprotoent (void);
-
-char const * bt_ntoa (bdaddr_t const *ba, char *str);
-int bt_aton (char const *str, bdaddr_t *ba);
-
-/* bt_devXXXX() functions (inspired by NetBSD) */
-int bt_devaddr (char const *devname, bdaddr_t *addr);
-int bt_devname (char *devname, bdaddr_t const *addr);
-
-/*
- * Bluetooth HCI functions
- */
-
-#define HCI_DEVMAX 32 /* arbitrary */
-#define HCI_DEVNAME_SIZE NG_NODESIZ
-#define HCI_DEVFEATURES_SIZE NG_HCI_FEATURES_SIZE
-
-struct bt_devinfo
-{
- char devname[HCI_DEVNAME_SIZE];
-
- uint32_t state; /* device/implementation specific */
-
- bdaddr_t bdaddr;
- uint16_t _reserved0;
-
- uint8_t features[HCI_DEVFEATURES_SIZE];
-
- /* buffer info */
- uint16_t _reserved1;
- uint16_t cmd_free;
- uint16_t sco_size;
- uint16_t sco_pkts;
- uint16_t sco_free;
- uint16_t acl_size;
- uint16_t acl_pkts;
- uint16_t acl_free;
-
- /* stats */
- uint32_t cmd_sent;
- uint32_t evnt_recv;
- uint32_t acl_recv;
- uint32_t acl_sent;
- uint32_t sco_recv;
- uint32_t sco_sent;
- uint32_t bytes_recv;
- uint32_t bytes_sent;
-
- /* misc/specific */
- uint16_t link_policy_info;
- uint16_t packet_type_info;
- uint16_t role_switch_info;
- uint16_t debug;
-
- uint8_t _padding[20]; /* leave space for future additions */
-};
-
-struct bt_devreq
-{
- uint16_t opcode;
- uint8_t event;
- void *cparam;
- size_t clen;
- void *rparam;
- size_t rlen;
-};
-
-struct bt_devfilter {
- bitstr_t bit_decl(packet_mask, 8);
- bitstr_t bit_decl(event_mask, 256);
-};
-
-struct bt_devinquiry {
- bdaddr_t bdaddr;
- uint8_t pscan_rep_mode;
- uint8_t pscan_period_mode;
- uint8_t dev_class[3];
- uint16_t clock_offset;
- int8_t rssi;
- uint8_t data[240];
-};
-
-typedef int (bt_devenum_cb_t)(int, struct bt_devinfo const *, void *);
-
-int bt_devopen (char const *devname);
-int bt_devclose(int s);
-int bt_devsend (int s, uint16_t opcode, void *param, size_t plen);
-ssize_t bt_devrecv (int s, void *buf, size_t size, time_t to);
-int bt_devreq (int s, struct bt_devreq *r, time_t to);
-int bt_devfilter(int s, struct bt_devfilter const *newp,
- struct bt_devfilter *oldp);
-void bt_devfilter_pkt_set(struct bt_devfilter *filter, uint8_t type);
-void bt_devfilter_pkt_clr(struct bt_devfilter *filter, uint8_t type);
-int bt_devfilter_pkt_tst(struct bt_devfilter const *filter, uint8_t type);
-void bt_devfilter_evt_set(struct bt_devfilter *filter, uint8_t event);
-void bt_devfilter_evt_clr(struct bt_devfilter *filter, uint8_t event);
-int bt_devfilter_evt_tst(struct bt_devfilter const *filter, uint8_t event);
-int bt_devinquiry(char const *devname, time_t length, int num_rsp,
- struct bt_devinquiry **ii);
-int bt_devinfo (struct bt_devinfo *di);
-int bt_devenum (bt_devenum_cb_t *cb, void *arg);
-
-/*
- * bdaddr utility functions (from NetBSD)
- */
-
-static __inline int
-bdaddr_same(const bdaddr_t *a, const bdaddr_t *b)
-{
- return (a->b[0] == b->b[0] && a->b[1] == b->b[1] &&
- a->b[2] == b->b[2] && a->b[3] == b->b[3] &&
- a->b[4] == b->b[4] && a->b[5] == b->b[5]);
-}
-
-static __inline int
-bdaddr_any(const bdaddr_t *a)
-{
- return (a->b[0] == 0 && a->b[1] == 0 && a->b[2] == 0 &&
- a->b[3] == 0 && a->b[4] == 0 && a->b[5] == 0);
-}
-
-static __inline void
-bdaddr_copy(bdaddr_t *d, const bdaddr_t *s)
-{
- d->b[0] = s->b[0];
- d->b[1] = s->b[1];
- d->b[2] = s->b[2];
- d->b[3] = s->b[3];
- d->b[4] = s->b[4];
- d->b[5] = s->b[5];
-}
-
-__END_DECLS
-
-#endif /* ndef _BLUETOOTH_H_ */
-
diff --git a/include.new/bsdxml.h b/include.new/bsdxml.h
deleted file mode 100644
index 2f56665..0000000
--- a/include.new/bsdxml.h
+++ /dev/null
@@ -1,1039 +0,0 @@
-/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- See the file src/contrib/expat/COPYING for copying permission.
-*/
-
-#ifndef Expat_INCLUDED
-#define Expat_INCLUDED 1
-
-
-#include
-#include "bsdxml_external.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct XML_ParserStruct;
-typedef struct XML_ParserStruct *XML_Parser;
-
-/* Should this be defined using stdbool.h when C99 is available? */
-typedef unsigned char XML_Bool;
-#define XML_TRUE ((XML_Bool) 1)
-#define XML_FALSE ((XML_Bool) 0)
-
-/* The XML_Status enum gives the possible return values for several
- API functions. The preprocessor #defines are included so this
- stanza can be added to code that still needs to support older
- versions of Expat 1.95.x:
-
- #ifndef XML_STATUS_OK
- #define XML_STATUS_OK 1
- #define XML_STATUS_ERROR 0
- #endif
-
- Otherwise, the #define hackery is quite ugly and would have been
- dropped.
-*/
-enum XML_Status {
- XML_STATUS_ERROR = 0,
-#define XML_STATUS_ERROR XML_STATUS_ERROR
- XML_STATUS_OK = 1,
-#define XML_STATUS_OK XML_STATUS_OK
- XML_STATUS_SUSPENDED = 2
-#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
-};
-
-enum XML_Error {
- XML_ERROR_NONE,
- XML_ERROR_NO_MEMORY,
- XML_ERROR_SYNTAX,
- XML_ERROR_NO_ELEMENTS,
- XML_ERROR_INVALID_TOKEN,
- XML_ERROR_UNCLOSED_TOKEN,
- XML_ERROR_PARTIAL_CHAR,
- XML_ERROR_TAG_MISMATCH,
- XML_ERROR_DUPLICATE_ATTRIBUTE,
- XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
- XML_ERROR_PARAM_ENTITY_REF,
- XML_ERROR_UNDEFINED_ENTITY,
- XML_ERROR_RECURSIVE_ENTITY_REF,
- XML_ERROR_ASYNC_ENTITY,
- XML_ERROR_BAD_CHAR_REF,
- XML_ERROR_BINARY_ENTITY_REF,
- XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
- XML_ERROR_MISPLACED_XML_PI,
- XML_ERROR_UNKNOWN_ENCODING,
- XML_ERROR_INCORRECT_ENCODING,
- XML_ERROR_UNCLOSED_CDATA_SECTION,
- XML_ERROR_EXTERNAL_ENTITY_HANDLING,
- XML_ERROR_NOT_STANDALONE,
- XML_ERROR_UNEXPECTED_STATE,
- XML_ERROR_ENTITY_DECLARED_IN_PE,
- XML_ERROR_FEATURE_REQUIRES_XML_DTD,
- XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,
- /* Added in 1.95.7. */
- XML_ERROR_UNBOUND_PREFIX,
- /* Added in 1.95.8. */
- XML_ERROR_UNDECLARING_PREFIX,
- XML_ERROR_INCOMPLETE_PE,
- XML_ERROR_XML_DECL,
- XML_ERROR_TEXT_DECL,
- XML_ERROR_PUBLICID,
- XML_ERROR_SUSPENDED,
- XML_ERROR_NOT_SUSPENDED,
- XML_ERROR_ABORTED,
- XML_ERROR_FINISHED,
- XML_ERROR_SUSPEND_PE,
- /* Added in 2.0. */
- XML_ERROR_RESERVED_PREFIX_XML,
- XML_ERROR_RESERVED_PREFIX_XMLNS,
- XML_ERROR_RESERVED_NAMESPACE_URI
-};
-
-enum XML_Content_Type {
- XML_CTYPE_EMPTY = 1,
- XML_CTYPE_ANY,
- XML_CTYPE_MIXED,
- XML_CTYPE_NAME,
- XML_CTYPE_CHOICE,
- XML_CTYPE_SEQ
-};
-
-enum XML_Content_Quant {
- XML_CQUANT_NONE,
- XML_CQUANT_OPT,
- XML_CQUANT_REP,
- XML_CQUANT_PLUS
-};
-
-/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
- XML_CQUANT_NONE, and the other fields will be zero or NULL.
- If type == XML_CTYPE_MIXED, then quant will be NONE or REP and
- numchildren will contain number of elements that may be mixed in
- and children point to an array of XML_Content cells that will be
- all of XML_CTYPE_NAME type with no quantification.
-
- If type == XML_CTYPE_NAME, then the name points to the name, and
- the numchildren field will be zero and children will be NULL. The
- quant fields indicates any quantifiers placed on the name.
-
- CHOICE and SEQ will have name NULL, the number of children in
- numchildren and children will point, recursively, to an array
- of XML_Content cells.
-
- The EMPTY, ANY, and MIXED types will only occur at top level.
-*/
-
-typedef struct XML_cp XML_Content;
-
-struct XML_cp {
- enum XML_Content_Type type;
- enum XML_Content_Quant quant;
- XML_Char * name;
- unsigned int numchildren;
- XML_Content * children;
-};
-
-
-/* This is called for an element declaration. See above for
- description of the model argument. It's the caller's responsibility
- to free model when finished with it.
-*/
-typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData,
- const XML_Char *name,
- XML_Content *model);
-
-XMLPARSEAPI(void)
-XML_SetElementDeclHandler(XML_Parser parser,
- XML_ElementDeclHandler eldecl);
-
-/* The Attlist declaration handler is called for *each* attribute. So
- a single Attlist declaration with multiple attributes declared will
- generate multiple calls to this handler. The "default" parameter
- may be NULL in the case of the "#IMPLIED" or "#REQUIRED"
- keyword. The "isrequired" parameter will be true and the default
- value will be NULL in the case of "#REQUIRED". If "isrequired" is
- true and default is non-NULL, then this is a "#FIXED" default.
-*/
-typedef void (XMLCALL *XML_AttlistDeclHandler) (
- void *userData,
- const XML_Char *elname,
- const XML_Char *attname,
- const XML_Char *att_type,
- const XML_Char *dflt,
- int isrequired);
-
-XMLPARSEAPI(void)
-XML_SetAttlistDeclHandler(XML_Parser parser,
- XML_AttlistDeclHandler attdecl);
-
-/* The XML declaration handler is called for *both* XML declarations
- and text declarations. The way to distinguish is that the version
- parameter will be NULL for text declarations. The encoding
- parameter may be NULL for XML declarations. The standalone
- parameter will be -1, 0, or 1 indicating respectively that there
- was no standalone parameter in the declaration, that it was given
- as no, or that it was given as yes.
-*/
-typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData,
- const XML_Char *version,
- const XML_Char *encoding,
- int standalone);
-
-XMLPARSEAPI(void)
-XML_SetXmlDeclHandler(XML_Parser parser,
- XML_XmlDeclHandler xmldecl);
-
-
-typedef struct {
- void *(*malloc_fcn)(size_t size);
- void *(*realloc_fcn)(void *ptr, size_t size);
- void (*free_fcn)(void *ptr);
-} XML_Memory_Handling_Suite;
-
-/* Constructs a new parser; encoding is the encoding specified by the
- external protocol or NULL if there is none specified.
-*/
-XMLPARSEAPI(XML_Parser)
-XML_ParserCreate(const XML_Char *encoding);
-
-/* Constructs a new parser and namespace processor. Element type
- names and attribute names that belong to a namespace will be
- expanded; unprefixed attribute names are never expanded; unprefixed
- element type names are expanded only if there is a default
- namespace. The expanded name is the concatenation of the namespace
- URI, the namespace separator character, and the local part of the
- name. If the namespace separator is '\0' then the namespace URI
- and the local part will be concatenated without any separator.
- It is a programming error to use the separator '\0' with namespace
- triplets (see XML_SetReturnNSTriplet).
-*/
-XMLPARSEAPI(XML_Parser)
-XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
-
-
-/* Constructs a new parser using the memory management suite referred to
- by memsuite. If memsuite is NULL, then use the standard library memory
- suite. If namespaceSeparator is non-NULL it creates a parser with
- namespace processing as described above. The character pointed at
- will serve as the namespace separator.
-
- All further memory operations used for the created parser will come from
- the given suite.
-*/
-XMLPARSEAPI(XML_Parser)
-XML_ParserCreate_MM(const XML_Char *encoding,
- const XML_Memory_Handling_Suite *memsuite,
- const XML_Char *namespaceSeparator);
-
-/* Prepare a parser object to be re-used. This is particularly
- valuable when memory allocation overhead is disproportionatly high,
- such as when a large number of small documnents need to be parsed.
- All handlers are cleared from the parser, except for the
- unknownEncodingHandler. The parser's external state is re-initialized
- except for the values of ns and ns_triplets.
-
- Added in Expat 1.95.3.
-*/
-XMLPARSEAPI(XML_Bool)
-XML_ParserReset(XML_Parser parser, const XML_Char *encoding);
-
-/* atts is array of name/value pairs, terminated by 0;
- names and values are 0 terminated.
-*/
-typedef void (XMLCALL *XML_StartElementHandler) (void *userData,
- const XML_Char *name,
- const XML_Char **atts);
-
-typedef void (XMLCALL *XML_EndElementHandler) (void *userData,
- const XML_Char *name);
-
-
-/* s is not 0 terminated. */
-typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData,
- const XML_Char *s,
- int len);
-
-/* target and data are 0 terminated */
-typedef void (XMLCALL *XML_ProcessingInstructionHandler) (
- void *userData,
- const XML_Char *target,
- const XML_Char *data);
-
-/* data is 0 terminated */
-typedef void (XMLCALL *XML_CommentHandler) (void *userData,
- const XML_Char *data);
-
-typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData);
-typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData);
-
-/* This is called for any characters in the XML document for which
- there is no applicable handler. This includes both characters that
- are part of markup which is of a kind that is not reported
- (comments, markup declarations), or characters that are part of a
- construct which could be reported but for which no handler has been
- supplied. The characters are passed exactly as they were in the XML
- document except that they will be encoded in UTF-8 or UTF-16.
- Line boundaries are not normalized. Note that a byte order mark
- character is not passed to the default handler. There are no
- guarantees about how characters are divided between calls to the
- default handler: for example, a comment might be split between
- multiple calls.
-*/
-typedef void (XMLCALL *XML_DefaultHandler) (void *userData,
- const XML_Char *s,
- int len);
-
-/* This is called for the start of the DOCTYPE declaration, before
- any DTD or internal subset is parsed.
-*/
-typedef void (XMLCALL *XML_StartDoctypeDeclHandler) (
- void *userData,
- const XML_Char *doctypeName,
- const XML_Char *sysid,
- const XML_Char *pubid,
- int has_internal_subset);
-
-/* This is called for the start of the DOCTYPE declaration when the
- closing > is encountered, but after processing any external
- subset.
-*/
-typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);
-
-/* This is called for entity declarations. The is_parameter_entity
- argument will be non-zero if the entity is a parameter entity, zero
- otherwise.
-
- For internal entities (), value will
- be non-NULL and systemId, publicID, and notationName will be NULL.
- The value string is NOT nul-terminated; the length is provided in
- the value_length argument. Since it is legal to have zero-length
- values, do not use this argument to test for internal entities.
-
- For external entities, value will be NULL and systemId will be
- non-NULL. The publicId argument will be NULL unless a public
- identifier was provided. The notationName argument will have a
- non-NULL value only for unparsed entity declarations.
-
- Note that is_parameter_entity can't be changed to XML_Bool, since
- that would break binary compatibility.
-*/
-typedef void (XMLCALL *XML_EntityDeclHandler) (
- void *userData,
- const XML_Char *entityName,
- int is_parameter_entity,
- const XML_Char *value,
- int value_length,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId,
- const XML_Char *notationName);
-
-XMLPARSEAPI(void)
-XML_SetEntityDeclHandler(XML_Parser parser,
- XML_EntityDeclHandler handler);
-
-/* OBSOLETE -- OBSOLETE -- OBSOLETE
- This handler has been superceded by the EntityDeclHandler above.
- It is provided here for backward compatibility.
-
- This is called for a declaration of an unparsed (NDATA) entity.
- The base argument is whatever was set by XML_SetBase. The
- entityName, systemId and notationName arguments will never be
- NULL. The other arguments may be.
-*/
-typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) (
- void *userData,
- const XML_Char *entityName,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId,
- const XML_Char *notationName);
-
-/* This is called for a declaration of notation. The base argument is
- whatever was set by XML_SetBase. The notationName will never be
- NULL. The other arguments can be.
-*/
-typedef void (XMLCALL *XML_NotationDeclHandler) (
- void *userData,
- const XML_Char *notationName,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId);
-
-/* When namespace processing is enabled, these are called once for
- each namespace declaration. The call to the start and end element
- handlers occur between the calls to the start and end namespace
- declaration handlers. For an xmlns attribute, prefix will be
- NULL. For an xmlns="" attribute, uri will be NULL.
-*/
-typedef void (XMLCALL *XML_StartNamespaceDeclHandler) (
- void *userData,
- const XML_Char *prefix,
- const XML_Char *uri);
-
-typedef void (XMLCALL *XML_EndNamespaceDeclHandler) (
- void *userData,
- const XML_Char *prefix);
-
-/* This is called if the document is not standalone, that is, it has an
- external subset or a reference to a parameter entity, but does not
- have standalone="yes". If this handler returns XML_STATUS_ERROR,
- then processing will not continue, and the parser will return a
- XML_ERROR_NOT_STANDALONE error.
- If parameter entity parsing is enabled, then in addition to the
- conditions above this handler will only be called if the referenced
- entity was actually read.
-*/
-typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData);
-
-/* This is called for a reference to an external parsed general
- entity. The referenced entity is not automatically parsed. The
- application can parse it immediately or later using
- XML_ExternalEntityParserCreate.
-
- The parser argument is the parser parsing the entity containing the
- reference; it can be passed as the parser argument to
- XML_ExternalEntityParserCreate. The systemId argument is the
- system identifier as specified in the entity declaration; it will
- not be NULL.
-
- The base argument is the system identifier that should be used as
- the base for resolving systemId if systemId was relative; this is
- set by XML_SetBase; it may be NULL.
-
- The publicId argument is the public identifier as specified in the
- entity declaration, or NULL if none was specified; the whitespace
- in the public identifier will have been normalized as required by
- the XML spec.
-
- The context argument specifies the parsing context in the format
- expected by the context argument to XML_ExternalEntityParserCreate;
- context is valid only until the handler returns, so if the
- referenced entity is to be parsed later, it must be copied.
- context is NULL only when the entity is a parameter entity.
-
- The handler should return XML_STATUS_ERROR if processing should not
- continue because of a fatal error in the handling of the external
- entity. In this case the calling parser will return an
- XML_ERROR_EXTERNAL_ENTITY_HANDLING error.
-
- Note that unlike other handlers the first argument is the parser,
- not userData.
-*/
-typedef int (XMLCALL *XML_ExternalEntityRefHandler) (
- XML_Parser parser,
- const XML_Char *context,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId);
-
-/* This is called in two situations:
- 1) An entity reference is encountered for which no declaration
- has been read *and* this is not an error.
- 2) An internal entity reference is read, but not expanded, because
- XML_SetDefaultHandler has been called.
- Note: skipped parameter entities in declarations and skipped general
- entities in attribute values cannot be reported, because
- the event would be out of sync with the reporting of the
- declarations or attribute values
-*/
-typedef void (XMLCALL *XML_SkippedEntityHandler) (
- void *userData,
- const XML_Char *entityName,
- int is_parameter_entity);
-
-/* This structure is filled in by the XML_UnknownEncodingHandler to
- provide information to the parser about encodings that are unknown
- to the parser.
-
- The map[b] member gives information about byte sequences whose
- first byte is b.
-
- If map[b] is c where c is >= 0, then b by itself encodes the
- Unicode scalar value c.
-
- If map[b] is -1, then the byte sequence is malformed.
-
- If map[b] is -n, where n >= 2, then b is the first byte of an
- n-byte sequence that encodes a single Unicode scalar value.
-
- The data member will be passed as the first argument to the convert
- function.
-
- The convert function is used to convert multibyte sequences; s will
- point to a n-byte sequence where map[(unsigned char)*s] == -n. The
- convert function must return the Unicode scalar value represented
- by this byte sequence or -1 if the byte sequence is malformed.
-
- The convert function may be NULL if the encoding is a single-byte
- encoding, that is if map[b] >= -1 for all bytes b.
-
- When the parser is finished with the encoding, then if release is
- not NULL, it will call release passing it the data member; once
- release has been called, the convert function will not be called
- again.
-
- Expat places certain restrictions on the encodings that are supported
- using this mechanism.
-
- 1. Every ASCII character that can appear in a well-formed XML document,
- other than the characters
-
- $@\^`{}~
-
- must be represented by a single byte, and that byte must be the
- same byte that represents that character in ASCII.
-
- 2. No character may require more than 4 bytes to encode.
-
- 3. All characters encoded must have Unicode scalar values <=
- 0xFFFF, (i.e., characters that would be encoded by surrogates in
- UTF-16 are not allowed). Note that this restriction doesn't
- apply to the built-in support for UTF-8 and UTF-16.
-
- 4. No Unicode character may be encoded by more than one distinct
- sequence of bytes.
-*/
-typedef struct {
- int map[256];
- void *data;
- int (XMLCALL *convert)(void *data, const char *s);
- void (XMLCALL *release)(void *data);
-} XML_Encoding;
-
-/* This is called for an encoding that is unknown to the parser.
-
- The encodingHandlerData argument is that which was passed as the
- second argument to XML_SetUnknownEncodingHandler.
-
- The name argument gives the name of the encoding as specified in
- the encoding declaration.
-
- If the callback can provide information about the encoding, it must
- fill in the XML_Encoding structure, and return XML_STATUS_OK.
- Otherwise it must return XML_STATUS_ERROR.
-
- If info does not describe a suitable encoding, then the parser will
- return an XML_UNKNOWN_ENCODING error.
-*/
-typedef int (XMLCALL *XML_UnknownEncodingHandler) (
- void *encodingHandlerData,
- const XML_Char *name,
- XML_Encoding *info);
-
-XMLPARSEAPI(void)
-XML_SetElementHandler(XML_Parser parser,
- XML_StartElementHandler start,
- XML_EndElementHandler end);
-
-XMLPARSEAPI(void)
-XML_SetStartElementHandler(XML_Parser parser,
- XML_StartElementHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetEndElementHandler(XML_Parser parser,
- XML_EndElementHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetCharacterDataHandler(XML_Parser parser,
- XML_CharacterDataHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetProcessingInstructionHandler(XML_Parser parser,
- XML_ProcessingInstructionHandler handler);
-XMLPARSEAPI(void)
-XML_SetCommentHandler(XML_Parser parser,
- XML_CommentHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetCdataSectionHandler(XML_Parser parser,
- XML_StartCdataSectionHandler start,
- XML_EndCdataSectionHandler end);
-
-XMLPARSEAPI(void)
-XML_SetStartCdataSectionHandler(XML_Parser parser,
- XML_StartCdataSectionHandler start);
-
-XMLPARSEAPI(void)
-XML_SetEndCdataSectionHandler(XML_Parser parser,
- XML_EndCdataSectionHandler end);
-
-/* This sets the default handler and also inhibits expansion of
- internal entities. These entity references will be passed to the
- default handler, or to the skipped entity handler, if one is set.
-*/
-XMLPARSEAPI(void)
-XML_SetDefaultHandler(XML_Parser parser,
- XML_DefaultHandler handler);
-
-/* This sets the default handler but does not inhibit expansion of
- internal entities. The entity reference will not be passed to the
- default handler.
-*/
-XMLPARSEAPI(void)
-XML_SetDefaultHandlerExpand(XML_Parser parser,
- XML_DefaultHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetDoctypeDeclHandler(XML_Parser parser,
- XML_StartDoctypeDeclHandler start,
- XML_EndDoctypeDeclHandler end);
-
-XMLPARSEAPI(void)
-XML_SetStartDoctypeDeclHandler(XML_Parser parser,
- XML_StartDoctypeDeclHandler start);
-
-XMLPARSEAPI(void)
-XML_SetEndDoctypeDeclHandler(XML_Parser parser,
- XML_EndDoctypeDeclHandler end);
-
-XMLPARSEAPI(void)
-XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
- XML_UnparsedEntityDeclHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetNotationDeclHandler(XML_Parser parser,
- XML_NotationDeclHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetNamespaceDeclHandler(XML_Parser parser,
- XML_StartNamespaceDeclHandler start,
- XML_EndNamespaceDeclHandler end);
-
-XMLPARSEAPI(void)
-XML_SetStartNamespaceDeclHandler(XML_Parser parser,
- XML_StartNamespaceDeclHandler start);
-
-XMLPARSEAPI(void)
-XML_SetEndNamespaceDeclHandler(XML_Parser parser,
- XML_EndNamespaceDeclHandler end);
-
-XMLPARSEAPI(void)
-XML_SetNotStandaloneHandler(XML_Parser parser,
- XML_NotStandaloneHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetExternalEntityRefHandler(XML_Parser parser,
- XML_ExternalEntityRefHandler handler);
-
-/* If a non-NULL value for arg is specified here, then it will be
- passed as the first argument to the external entity ref handler
- instead of the parser object.
-*/
-XMLPARSEAPI(void)
-XML_SetExternalEntityRefHandlerArg(XML_Parser parser,
- void *arg);
-
-XMLPARSEAPI(void)
-XML_SetSkippedEntityHandler(XML_Parser parser,
- XML_SkippedEntityHandler handler);
-
-XMLPARSEAPI(void)
-XML_SetUnknownEncodingHandler(XML_Parser parser,
- XML_UnknownEncodingHandler handler,
- void *encodingHandlerData);
-
-/* This can be called within a handler for a start element, end
- element, processing instruction or character data. It causes the
- corresponding markup to be passed to the default handler.
-*/
-XMLPARSEAPI(void)
-XML_DefaultCurrent(XML_Parser parser);
-
-/* If do_nst is non-zero, and namespace processing is in effect, and
- a name has a prefix (i.e. an explicit namespace qualifier) then
- that name is returned as a triplet in a single string separated by
- the separator character specified when the parser was created: URI
- + sep + local_name + sep + prefix.
-
- If do_nst is zero, then namespace information is returned in the
- default manner (URI + sep + local_name) whether or not the name
- has a prefix.
-
- Note: Calling XML_SetReturnNSTriplet after XML_Parse or
- XML_ParseBuffer has no effect.
-*/
-
-XMLPARSEAPI(void)
-XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
-
-/* This value is passed as the userData argument to callbacks. */
-XMLPARSEAPI(void)
-XML_SetUserData(XML_Parser parser, void *userData);
-
-/* Returns the last value set by XML_SetUserData or NULL. */
-#define XML_GetUserData(parser) (*(void **)(parser))
-
-/* This is equivalent to supplying an encoding argument to
- XML_ParserCreate. On success XML_SetEncoding returns non-zero,
- zero otherwise.
- Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer
- has no effect and returns XML_STATUS_ERROR.
-*/
-XMLPARSEAPI(enum XML_Status)
-XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
-
-/* If this function is called, then the parser will be passed as the
- first argument to callbacks instead of userData. The userData will
- still be accessible using XML_GetUserData.
-*/
-XMLPARSEAPI(void)
-XML_UseParserAsHandlerArg(XML_Parser parser);
-
-/* If useDTD == XML_TRUE is passed to this function, then the parser
- will assume that there is an external subset, even if none is
- specified in the document. In such a case the parser will call the
- externalEntityRefHandler with a value of NULL for the systemId
- argument (the publicId and context arguments will be NULL as well).
- Note: For the purpose of checking WFC: Entity Declared, passing
- useDTD == XML_TRUE will make the parser behave as if the document
- had a DTD with an external subset.
- Note: If this function is called, then this must be done before
- the first call to XML_Parse or XML_ParseBuffer, since it will
- have no effect after that. Returns
- XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING.
- Note: If the document does not have a DOCTYPE declaration at all,
- then startDoctypeDeclHandler and endDoctypeDeclHandler will not
- be called, despite an external subset being parsed.
- Note: If XML_DTD is not defined when Expat is compiled, returns
- XML_ERROR_FEATURE_REQUIRES_XML_DTD.
-*/
-XMLPARSEAPI(enum XML_Error)
-XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
-
-
-/* Sets the base to be used for resolving relative URIs in system
- identifiers in declarations. Resolving relative identifiers is
- left to the application: this value will be passed through as the
- base argument to the XML_ExternalEntityRefHandler,
- XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base
- argument will be copied. Returns XML_STATUS_ERROR if out of memory,
- XML_STATUS_OK otherwise.
-*/
-XMLPARSEAPI(enum XML_Status)
-XML_SetBase(XML_Parser parser, const XML_Char *base);
-
-XMLPARSEAPI(const XML_Char *)
-XML_GetBase(XML_Parser parser);
-
-/* Returns the number of the attribute/value pairs passed in last call
- to the XML_StartElementHandler that were specified in the start-tag
- rather than defaulted. Each attribute/value pair counts as 2; thus
- this correspondds to an index into the atts array passed to the
- XML_StartElementHandler.
-*/
-XMLPARSEAPI(int)
-XML_GetSpecifiedAttributeCount(XML_Parser parser);
-
-/* Returns the index of the ID attribute passed in the last call to
- XML_StartElementHandler, or -1 if there is no ID attribute. Each
- attribute/value pair counts as 2; thus this correspondds to an
- index into the atts array passed to the XML_StartElementHandler.
-*/
-XMLPARSEAPI(int)
-XML_GetIdAttributeIndex(XML_Parser parser);
-
-#ifdef XML_ATTR_INFO
-/* Source file byte offsets for the start and end of attribute names and values.
- The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
- file an attribute value of "blah" will yield:
- info->valueEnd - info->valueStart = 4 bytes.
-*/
-typedef struct {
- XML_Index nameStart; /* Offset to beginning of the attribute name. */
- XML_Index nameEnd; /* Offset after the attribute name's last byte. */
- XML_Index valueStart; /* Offset to beginning of the attribute value. */
- XML_Index valueEnd; /* Offset after the attribute value's last byte. */
-} XML_AttrInfo;
-
-/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
- passed in last call to the XML_StartElementHandler that were specified
- in the start-tag rather than defaulted. Each attribute/value pair counts
- as 1; thus the number of entries in the array is
- XML_GetSpecifiedAttributeCount(parser) / 2.
-*/
-XMLPARSEAPI(const XML_AttrInfo *)
-XML_GetAttributeInfo(XML_Parser parser);
-#endif
-
-/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
- detected. The last call to XML_Parse must have isFinal true; len
- may be zero for this call (or any other).
-
- Though the return values for these functions has always been
- described as a Boolean value, the implementation, at least for the
- 1.95.x series, has always returned exactly one of the XML_Status
- values.
-*/
-XMLPARSEAPI(enum XML_Status)
-XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
-
-XMLPARSEAPI(void *)
-XML_GetBuffer(XML_Parser parser, int len);
-
-XMLPARSEAPI(enum XML_Status)
-XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
-
-/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return.
- Must be called from within a call-back handler, except when aborting
- (resumable = 0) an already suspended parser. Some call-backs may
- still follow because they would otherwise get lost. Examples:
- - endElementHandler() for empty elements when stopped in
- startElementHandler(),
- - endNameSpaceDeclHandler() when stopped in endElementHandler(),
- and possibly others.
-
- Can be called from most handlers, including DTD related call-backs,
- except when parsing an external parameter entity and resumable != 0.
- Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise.
- Possible error codes:
- - XML_ERROR_SUSPENDED: when suspending an already suspended parser.
- - XML_ERROR_FINISHED: when the parser has already finished.
- - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE.
-
- When resumable != 0 (true) then parsing is suspended, that is,
- XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED.
- Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer()
- return XML_STATUS_ERROR with error code XML_ERROR_ABORTED.
-
- *Note*:
- This will be applied to the current parser instance only, that is, if
- there is a parent parser then it will continue parsing when the
- externalEntityRefHandler() returns. It is up to the implementation of
- the externalEntityRefHandler() to call XML_StopParser() on the parent
- parser (recursively), if one wants to stop parsing altogether.
-
- When suspended, parsing can be resumed by calling XML_ResumeParser().
-*/
-XMLPARSEAPI(enum XML_Status)
-XML_StopParser(XML_Parser parser, XML_Bool resumable);
-
-/* Resumes parsing after it has been suspended with XML_StopParser().
- Must not be called from within a handler call-back. Returns same
- status codes as XML_Parse() or XML_ParseBuffer().
- Additional error code XML_ERROR_NOT_SUSPENDED possible.
-
- *Note*:
- This must be called on the most deeply nested child parser instance
- first, and on its parent parser only after the child parser has finished,
- to be applied recursively until the document entity's parser is restarted.
- That is, the parent parser will not resume by itself and it is up to the
- application to call XML_ResumeParser() on it at the appropriate moment.
-*/
-XMLPARSEAPI(enum XML_Status)
-XML_ResumeParser(XML_Parser parser);
-
-enum XML_Parsing {
- XML_INITIALIZED,
- XML_PARSING,
- XML_FINISHED,
- XML_SUSPENDED
-};
-
-typedef struct {
- enum XML_Parsing parsing;
- XML_Bool finalBuffer;
-} XML_ParsingStatus;
-
-/* Returns status of parser with respect to being initialized, parsing,
- finished, or suspended and processing the final buffer.
- XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus,
- XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED
-*/
-XMLPARSEAPI(void)
-XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status);
-
-/* Creates an XML_Parser object that can parse an external general
- entity; context is a '\0'-terminated string specifying the parse
- context; encoding is a '\0'-terminated string giving the name of
- the externally specified encoding, or NULL if there is no
- externally specified encoding. The context string consists of a
- sequence of tokens separated by formfeeds (\f); a token consisting
- of a name specifies that the general entity of the name is open; a
- token of the form prefix=uri specifies the namespace for a
- particular prefix; a token of the form =uri specifies the default
- namespace. This can be called at any point after the first call to
- an ExternalEntityRefHandler so longer as the parser has not yet
- been freed. The new parser is completely independent and may
- safely be used in a separate thread. The handlers and userData are
- initialized from the parser argument. Returns NULL if out of memory.
- Otherwise returns a new XML_Parser object.
-*/
-XMLPARSEAPI(XML_Parser)
-XML_ExternalEntityParserCreate(XML_Parser parser,
- const XML_Char *context,
- const XML_Char *encoding);
-
-enum XML_ParamEntityParsing {
- XML_PARAM_ENTITY_PARSING_NEVER,
- XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
- XML_PARAM_ENTITY_PARSING_ALWAYS
-};
-
-/* Controls parsing of parameter entities (including the external DTD
- subset). If parsing of parameter entities is enabled, then
- references to external parameter entities (including the external
- DTD subset) will be passed to the handler set with
- XML_SetExternalEntityRefHandler. The context passed will be 0.
-
- Unlike external general entities, external parameter entities can
- only be parsed synchronously. If the external parameter entity is
- to be parsed, it must be parsed during the call to the external
- entity ref handler: the complete sequence of
- XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and
- XML_ParserFree calls must be made during this call. After
- XML_ExternalEntityParserCreate has been called to create the parser
- for the external parameter entity (context must be 0 for this
- call), it is illegal to make any calls on the old parser until
- XML_ParserFree has been called on the newly created parser.
- If the library has been compiled without support for parameter
- entity parsing (ie without XML_DTD being defined), then
- XML_SetParamEntityParsing will return 0 if parsing of parameter
- entities is requested; otherwise it will return non-zero.
- Note: If XML_SetParamEntityParsing is called after XML_Parse or
- XML_ParseBuffer, then it has no effect and will always return 0.
-*/
-XMLPARSEAPI(int)
-XML_SetParamEntityParsing(XML_Parser parser,
- enum XML_ParamEntityParsing parsing);
-
-/* Sets the hash salt to use for internal hash calculations.
- Helps in preventing DoS attacks based on predicting hash
- function behavior. This must be called before parsing is started.
- Returns 1 if successful, 0 when called after parsing has started.
-*/
-XMLPARSEAPI(int)
-XML_SetHashSalt(XML_Parser parser,
- unsigned long hash_salt);
-
-/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
- XML_GetErrorCode returns information about the error.
-*/
-XMLPARSEAPI(enum XML_Error)
-XML_GetErrorCode(XML_Parser parser);
-
-/* These functions return information about the current parse
- location. They may be called from any callback called to report
- some parse event; in this case the location is the location of the
- first of the sequence of characters that generated the event. When
- called from callbacks generated by declarations in the document
- prologue, the location identified isn't as neatly defined, but will
- be within the relevant markup. When called outside of the callback
- functions, the position indicated will be just past the last parse
- event (regardless of whether there was an associated callback).
-
- They may also be called after returning from a call to XML_Parse
- or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then
- the location is the location of the character at which the error
- was detected; otherwise the location is the location of the last
- parse event, as described above.
-*/
-XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
-XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
-XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);
-
-/* Return the number of bytes in the current event.
- Returns 0 if the event is in an internal entity.
-*/
-XMLPARSEAPI(int)
-XML_GetCurrentByteCount(XML_Parser parser);
-
-/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
- the integer pointed to by offset to the offset within this buffer
- of the current parse position, and sets the integer pointed to by size
- to the size of this buffer (the number of input bytes). Otherwise
- returns a NULL pointer. Also returns a NULL pointer if a parse isn't
- active.
-
- NOTE: The character pointer returned should not be used outside
- the handler that makes the call.
-*/
-XMLPARSEAPI(const char *)
-XML_GetInputContext(XML_Parser parser,
- int *offset,
- int *size);
-
-/* For backwards compatibility with previous versions. */
-#define XML_GetErrorLineNumber XML_GetCurrentLineNumber
-#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
-#define XML_GetErrorByteIndex XML_GetCurrentByteIndex
-
-/* Frees the content model passed to the element declaration handler */
-XMLPARSEAPI(void)
-XML_FreeContentModel(XML_Parser parser, XML_Content *model);
-
-/* Exposing the memory handling functions used in Expat */
-XMLPARSEAPI(void *)
-XML_MemMalloc(XML_Parser parser, size_t size);
-
-XMLPARSEAPI(void *)
-XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
-
-XMLPARSEAPI(void)
-XML_MemFree(XML_Parser parser, void *ptr);
-
-/* Frees memory used by the parser. */
-XMLPARSEAPI(void)
-XML_ParserFree(XML_Parser parser);
-
-/* Returns a string describing the error. */
-XMLPARSEAPI(const XML_LChar *)
-XML_ErrorString(enum XML_Error code);
-
-/* Return a string containing the version number of this expat */
-XMLPARSEAPI(const XML_LChar *)
-XML_ExpatVersion(void);
-
-typedef struct {
- int major;
- int minor;
- int micro;
-} XML_Expat_Version;
-
-/* Return an XML_Expat_Version structure containing numeric version
- number information for this version of expat.
-*/
-XMLPARSEAPI(XML_Expat_Version)
-XML_ExpatVersionInfo(void);
-
-/* Added in Expat 1.95.5. */
-enum XML_FeatureEnum {
- XML_FEATURE_END = 0,
- XML_FEATURE_UNICODE,
- XML_FEATURE_UNICODE_WCHAR_T,
- XML_FEATURE_DTD,
- XML_FEATURE_CONTEXT_BYTES,
- XML_FEATURE_MIN_SIZE,
- XML_FEATURE_SIZEOF_XML_CHAR,
- XML_FEATURE_SIZEOF_XML_LCHAR,
- XML_FEATURE_NS,
- XML_FEATURE_LARGE_SIZE,
- XML_FEATURE_ATTR_INFO
- /* Additional features must be added to the end of this enum. */
-};
-
-typedef struct {
- enum XML_FeatureEnum feature;
- const XML_LChar *name;
- long int value;
-} XML_Feature;
-
-XMLPARSEAPI(const XML_Feature *)
-XML_GetFeatureList(void);
-
-
-/* Expat follows the GNU/Linux convention of odd number minor version for
- beta/development releases and even number minor version for stable
- releases. Micro is bumped with each release, and set to 0 with each
- change to major or minor version.
-*/
-#define XML_MAJOR_VERSION 2
-#define XML_MINOR_VERSION 1
-#define XML_MICRO_VERSION 0
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* not Expat_INCLUDED */
diff --git a/include.new/bsdxml_external.h b/include.new/bsdxml_external.h
deleted file mode 100644
index 2c03284..0000000
--- a/include.new/bsdxml_external.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- See the file COPYING for copying permission.
-*/
-
-#ifndef Expat_External_INCLUDED
-#define Expat_External_INCLUDED 1
-
-/* External API definitions */
-
-#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
-#define XML_USE_MSC_EXTENSIONS 1
-#endif
-
-/* Expat tries very hard to make the API boundary very specifically
- defined. There are two macros defined to control this boundary;
- each of these can be defined before including this header to
- achieve some different behavior, but doing so it not recommended or
- tested frequently.
-
- XMLCALL - The calling convention to use for all calls across the
- "library boundary." This will default to cdecl, and
- try really hard to tell the compiler that's what we
- want.
-
- XMLIMPORT - Whatever magic is needed to note that a function is
- to be imported from a dynamically loaded library
- (.dll, .so, or .sl, depending on your platform).
-
- The XMLCALL macro was added in Expat 1.95.7. The only one which is
- expected to be directly useful in client code is XMLCALL.
-
- Note that on at least some Unix versions, the Expat library must be
- compiled with the cdecl calling convention as the default since
- system headers may assume the cdecl convention.
-*/
-#ifndef XMLCALL
-#if defined(_MSC_VER)
-#define XMLCALL __cdecl
-#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
-#define XMLCALL __attribute__((cdecl))
-#else
-/* For any platform which uses this definition and supports more than
- one calling convention, we need to extend this definition to
- declare the convention used on that platform, if it's possible to
- do so.
-
- If this is the case for your platform, please file a bug report
- with information on how to identify your platform via the C
- pre-processor and how to specify the same calling convention as the
- platform's malloc() implementation.
-*/
-#define XMLCALL
-#endif
-#endif /* not defined XMLCALL */
-
-
-#if !defined(XML_STATIC) && !defined(XMLIMPORT)
-#ifndef XML_BUILDING_EXPAT
-/* using Expat from an application */
-
-#ifdef XML_USE_MSC_EXTENSIONS
-#define XMLIMPORT __declspec(dllimport)
-#endif
-
-#endif
-#endif /* not defined XML_STATIC */
-
-
-/* If we didn't define it above, define it away: */
-#ifndef XMLIMPORT
-#define XMLIMPORT
-#endif
-
-
-#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef XML_UNICODE_WCHAR_T
-#define XML_UNICODE
-#endif
-
-#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
-#ifdef XML_UNICODE_WCHAR_T
-typedef wchar_t XML_Char;
-typedef wchar_t XML_LChar;
-#else
-typedef unsigned short XML_Char;
-typedef char XML_LChar;
-#endif /* XML_UNICODE_WCHAR_T */
-#else /* Information is UTF-8 encoded. */
-typedef char XML_Char;
-typedef char XML_LChar;
-#endif /* XML_UNICODE */
-
-#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
-#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
-typedef __int64 XML_Index;
-typedef unsigned __int64 XML_Size;
-#else
-typedef long long XML_Index;
-typedef unsigned long long XML_Size;
-#endif
-#else
-typedef long XML_Index;
-typedef unsigned long XML_Size;
-#endif /* XML_LARGE_SIZE */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* not Expat_External_INCLUDED */
diff --git a/include.new/bsm/audit.h b/include.new/bsm/audit.h
deleted file mode 100644
index 853d2b7..0000000
--- a/include.new/bsm/audit.h
+++ /dev/null
@@ -1,328 +0,0 @@
-/*-
- * Copyright (c) 2005-2009 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit.h#10
- * $FreeBSD: releng/10.2/sys/bsm/audit.h 195740 2009-07-17 14:02:20Z rwatson $
- */
-
-#ifndef _BSM_AUDIT_H
-#define _BSM_AUDIT_H
-
-#include
-#include
-
-#define AUDIT_RECORD_MAGIC 0x828a0f1b
-#define MAX_AUDIT_RECORDS 20
-#define MAXAUDITDATA (0x8000 - 1)
-#define MAX_AUDIT_RECORD_SIZE MAXAUDITDATA
-#define MIN_AUDIT_FILE_SIZE (512 * 1024)
-
-/*
- * Minimum noumber of free blocks on the filesystem containing the audit
- * log necessary to avoid a hard log rotation. DO NOT SET THIS VALUE TO 0
- * as the kernel does an unsigned compare, plus we want to leave a few blocks
- * free so userspace can terminate the log, etc.
- */
-#define AUDIT_HARD_LIMIT_FREE_BLOCKS 4
-
-/*
- * Triggers for the audit daemon.
- */
-#define AUDIT_TRIGGER_MIN 1
-#define AUDIT_TRIGGER_LOW_SPACE 1 /* Below low watermark. */
-#define AUDIT_TRIGGER_ROTATE_KERNEL 2 /* Kernel requests rotate. */
-#define AUDIT_TRIGGER_READ_FILE 3 /* Re-read config file. */
-#define AUDIT_TRIGGER_CLOSE_AND_DIE 4 /* Terminate audit. */
-#define AUDIT_TRIGGER_NO_SPACE 5 /* Below min free space. */
-#define AUDIT_TRIGGER_ROTATE_USER 6 /* User requests rotate. */
-#define AUDIT_TRIGGER_INITIALIZE 7 /* User initialize of auditd. */
-#define AUDIT_TRIGGER_EXPIRE_TRAILS 8 /* User expiration of trails. */
-#define AUDIT_TRIGGER_MAX 8
-
-/*
- * The special device filename (FreeBSD).
- */
-#define AUDITDEV_FILENAME "audit"
-#define AUDIT_TRIGGER_FILE ("/dev/" AUDITDEV_FILENAME)
-
-/*
- * Pre-defined audit IDs
- */
-#define AU_DEFAUDITID (uid_t)(-1)
-#define AU_DEFAUDITSID 0
-#define AU_ASSIGN_ASID -1
-
-/*
- * IPC types.
- */
-#define AT_IPC_MSG ((u_char)1) /* Message IPC id. */
-#define AT_IPC_SEM ((u_char)2) /* Semaphore IPC id. */
-#define AT_IPC_SHM ((u_char)3) /* Shared mem IPC id. */
-
-/*
- * Audit conditions.
- */
-#define AUC_UNSET 0
-#define AUC_AUDITING 1
-#define AUC_NOAUDIT 2
-#define AUC_DISABLED -1
-
-/*
- * auditon(2) commands.
- */
-#define A_OLDGETPOLICY 2
-#define A_OLDSETPOLICY 3
-#define A_GETKMASK 4
-#define A_SETKMASK 5
-#define A_OLDGETQCTRL 6
-#define A_OLDSETQCTRL 7
-#define A_GETCWD 8
-#define A_GETCAR 9
-#define A_GETSTAT 12
-#define A_SETSTAT 13
-#define A_SETUMASK 14
-#define A_SETSMASK 15
-#define A_OLDGETCOND 20
-#define A_OLDSETCOND 21
-#define A_GETCLASS 22
-#define A_SETCLASS 23
-#define A_GETPINFO 24
-#define A_SETPMASK 25
-#define A_SETFSIZE 26
-#define A_GETFSIZE 27
-#define A_GETPINFO_ADDR 28
-#define A_GETKAUDIT 29
-#define A_SETKAUDIT 30
-#define A_SENDTRIGGER 31
-#define A_GETSINFO_ADDR 32
-#define A_GETPOLICY 33
-#define A_SETPOLICY 34
-#define A_GETQCTRL 35
-#define A_SETQCTRL 36
-#define A_GETCOND 37
-#define A_SETCOND 38
-
-/*
- * Audit policy controls.
- */
-#define AUDIT_CNT 0x0001
-#define AUDIT_AHLT 0x0002
-#define AUDIT_ARGV 0x0004
-#define AUDIT_ARGE 0x0008
-#define AUDIT_SEQ 0x0010
-#define AUDIT_WINDATA 0x0020
-#define AUDIT_USER 0x0040
-#define AUDIT_GROUP 0x0080
-#define AUDIT_TRAIL 0x0100
-#define AUDIT_PATH 0x0200
-#define AUDIT_SCNT 0x0400
-#define AUDIT_PUBLIC 0x0800
-#define AUDIT_ZONENAME 0x1000
-#define AUDIT_PERZONE 0x2000
-
-/*
- * Default audit queue control parameters.
- */
-#define AQ_HIWATER 100
-#define AQ_MAXHIGH 10000
-#define AQ_LOWATER 10
-#define AQ_BUFSZ MAXAUDITDATA
-#define AQ_MAXBUFSZ 1048576
-
-/*
- * Default minimum percentage free space on file system.
- */
-#define AU_FS_MINFREE 20
-
-/*
- * Type definitions used indicating the length of variable length addresses
- * in tokens containing addresses, such as header fields.
- */
-#define AU_IPv4 4
-#define AU_IPv6 16
-
-__BEGIN_DECLS
-
-typedef uid_t au_id_t;
-typedef pid_t au_asid_t;
-typedef u_int16_t au_event_t;
-typedef u_int16_t au_emod_t;
-typedef uint32_t au_class_t;
-typedef u_int64_t au_asflgs_t __attribute__ ((aligned (8)));
-
-struct au_tid {
- dev_t port;
- uint32_t machine;
-};
-typedef struct au_tid au_tid_t;
-
-struct au_tid_addr {
- dev_t at_port;
- uint32_t at_type;
- uint32_t at_addr[4];
-};
-typedef struct au_tid_addr au_tid_addr_t;
-
-struct au_mask {
- unsigned int am_success; /* Success bits. */
- unsigned int am_failure; /* Failure bits. */
-};
-typedef struct au_mask au_mask_t;
-
-struct auditinfo {
- au_id_t ai_auid; /* Audit user ID. */
- au_mask_t ai_mask; /* Audit masks. */
- au_tid_t ai_termid; /* Terminal ID. */
- au_asid_t ai_asid; /* Audit session ID. */
-};
-typedef struct auditinfo auditinfo_t;
-
-struct auditinfo_addr {
- au_id_t ai_auid; /* Audit user ID. */
- au_mask_t ai_mask; /* Audit masks. */
- au_tid_addr_t ai_termid; /* Terminal ID. */
- au_asid_t ai_asid; /* Audit session ID. */
- au_asflgs_t ai_flags; /* Audit session flags. */
-};
-typedef struct auditinfo_addr auditinfo_addr_t;
-
-struct auditpinfo {
- pid_t ap_pid; /* ID of target process. */
- au_id_t ap_auid; /* Audit user ID. */
- au_mask_t ap_mask; /* Audit masks. */
- au_tid_t ap_termid; /* Terminal ID. */
- au_asid_t ap_asid; /* Audit session ID. */
-};
-typedef struct auditpinfo auditpinfo_t;
-
-struct auditpinfo_addr {
- pid_t ap_pid; /* ID of target process. */
- au_id_t ap_auid; /* Audit user ID. */
- au_mask_t ap_mask; /* Audit masks. */
- au_tid_addr_t ap_termid; /* Terminal ID. */
- au_asid_t ap_asid; /* Audit session ID. */
- au_asflgs_t ap_flags; /* Audit session flags. */
-};
-typedef struct auditpinfo_addr auditpinfo_addr_t;
-
-struct au_session {
- auditinfo_addr_t *as_aia_p; /* Ptr to full audit info. */
- au_mask_t as_mask; /* Process Audit Masks. */
-};
-typedef struct au_session au_session_t;
-
-/*
- * Contents of token_t are opaque outside of libbsm.
- */
-typedef struct au_token token_t;
-
-/*
- * Kernel audit queue control parameters:
- * Default: Maximum:
- * aq_hiwater: AQ_HIWATER (100) AQ_MAXHIGH (10000)
- * aq_lowater: AQ_LOWATER (10)
-mach_port_name_t audit_session_self(void);
-au_asid_t audit_session_join(mach_port_name_t port);
-#endif /* __APPLE_API_PRIVATE */
-
-#endif /* defined(_KERNEL) || defined(KERNEL) */
-
-__END_DECLS
-
-#endif /* !_BSM_AUDIT_H */
diff --git a/include.new/bsm/audit_domain.h b/include.new/bsm/audit_domain.h
deleted file mode 100644
index 1332e94..0000000
--- a/include.new/bsm/audit_domain.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * Copyright (c) 2008 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_domain.h#2
- * $FreeBSD: releng/10.2/sys/bsm/audit_domain.h 191273 2009-04-19 16:17:13Z rwatson $
- */
-
-#ifndef _BSM_AUDIT_DOMAIN_H_
-#define _BSM_AUDIT_DOMAIN_H_
-
-/*
- * BSM protocol domain constants - protocol domains defined in Solaris.
- */
-#define BSM_PF_UNSPEC 0
-#define BSM_PF_LOCAL 1
-#define BSM_PF_INET 2
-#define BSM_PF_IMPLINK 3
-#define BSM_PF_PUP 4
-#define BSM_PF_CHAOS 5
-#define BSM_PF_NS 6
-#define BSM_PF_NBS 7 /* Solaris-specific. */
-#define BSM_PF_ECMA 8
-#define BSM_PF_DATAKIT 9
-#define BSM_PF_CCITT 10
-#define BSM_PF_SNA 11
-#define BSM_PF_DECnet 12
-#define BSM_PF_DLI 13
-#define BSM_PF_LAT 14
-#define BSM_PF_HYLINK 15
-#define BSM_PF_APPLETALK 16
-#define BSM_PF_NIT 17 /* Solaris-specific. */
-#define BSM_PF_802 18 /* Solaris-specific. */
-#define BSM_PF_OSI 19
-#define BSM_PF_X25 20 /* Solaris/Linux-specific. */
-#define BSM_PF_OSINET 21 /* Solaris-specific. */
-#define BSM_PF_GOSIP 22 /* Solaris-specific. */
-#define BSM_PF_IPX 23
-#define BSM_PF_ROUTE 24
-#define BSM_PF_LINK 25
-#define BSM_PF_INET6 26
-#define BSM_PF_KEY 27
-#define BSM_PF_NCA 28 /* Solaris-specific. */
-#define BSM_PF_POLICY 29 /* Solaris-specific. */
-#define BSM_PF_INET_OFFLOAD 30 /* Solaris-specific. */
-
-/*
- * BSM protocol domain constants - protocol domains not defined in Solaris.
- */
-#define BSM_PF_NETBIOS 500 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_ISO 501 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_XTP 502 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_COIP 503 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_CNT 504 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_RTIP 505 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_SIP 506 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_PIP 507 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_ISDN 508 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_E164 509 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_NATM 510 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_ATM 511 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_NETGRAPH 512 /* FreeBSD/Darwin-specific. */
-#define BSM_PF_SLOW 513 /* FreeBSD-specific. */
-#define BSM_PF_SCLUSTER 514 /* FreeBSD-specific. */
-#define BSM_PF_ARP 515 /* FreeBSD-specific. */
-#define BSM_PF_BLUETOOTH 516 /* FreeBSD-specific. */
- /* 517: unallocated. */
-#define BSM_PF_AX25 518 /* Linux-specific. */
-#define BSM_PF_ROSE 519 /* Linux-specific. */
-#define BSM_PF_NETBEUI 520 /* Linux-specific. */
-#define BSM_PF_SECURITY 521 /* Linux-specific. */
-#define BSM_PF_PACKET 522 /* Linux-specific. */
-#define BSM_PF_ASH 523 /* Linux-specific. */
-#define BSM_PF_ECONET 524 /* Linux-specific. */
-#define BSM_PF_ATMSVC 525 /* Linux-specific. */
-#define BSM_PF_IRDA 526 /* Linux-specific. */
-#define BSM_PF_PPPOX 527 /* Linux-specific. */
-#define BSM_PF_WANPIPE 528 /* Linux-specific. */
-#define BSM_PF_LLC 529 /* Linux-specific. */
-#define BSM_PF_CAN 530 /* Linux-specific. */
-#define BSM_PF_TIPC 531 /* Linux-specific. */
-#define BSM_PF_IUCV 532 /* Linux-specific. */
-#define BSM_PF_RXRPC 533 /* Linux-specific. */
-#define BSM_PF_PHONET 534 /* Linux-specific. */
-
-/*
- * Used when there is no mapping from a local to BSM protocol domain.
- */
-#define BSM_PF_UNKNOWN 700 /* OpenBSM-specific. */
-
-#endif /* !_BSM_AUDIT_DOMAIN_H_ */
diff --git a/include.new/bsm/audit_errno.h b/include.new/bsm/audit_errno.h
deleted file mode 100644
index 661320f..0000000
--- a/include.new/bsm/audit_errno.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*-
- * Copyright (c) 2008 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_errno.h#7
- * $FreeBSD: releng/10.2/sys/bsm/audit_errno.h 243751 2012-12-01 13:46:37Z rwatson $
- */
-
-#ifndef _BSM_AUDIT_ERRNO_H_
-#define _BSM_AUDIT_ERRNO_H_
-
-/*
- * For the purposes of portable encoding, we convert between local error
- * numbers and Solaris error numbers (as well as some extensions for error
- * numbers that don't exist in Solaris). Although the first 35 or so
- * constants are the same across all OS's, we don't handle that in any
- * special way.
- *
- * When adding constants here, also add them to bsm_errno.c.
- */
-#define BSM_ERRNO_ESUCCESS 0
-#define BSM_ERRNO_EPERM 1
-#define BSM_ERRNO_ENOENT 2
-#define BSM_ERRNO_ESRCH 3
-#define BSM_ERRNO_EINTR 4
-#define BSM_ERRNO_EIO 5
-#define BSM_ERRNO_ENXIO 6
-#define BSM_ERRNO_E2BIG 7
-#define BSM_ERRNO_ENOEXEC 8
-#define BSM_ERRNO_EBADF 9
-#define BSM_ERRNO_ECHILD 10
-#define BSM_ERRNO_EAGAIN 11
-#define BSM_ERRNO_ENOMEM 12
-#define BSM_ERRNO_EACCES 13
-#define BSM_ERRNO_EFAULT 14
-#define BSM_ERRNO_ENOTBLK 15
-#define BSM_ERRNO_EBUSY 16
-#define BSM_ERRNO_EEXIST 17
-#define BSM_ERRNO_EXDEV 18
-#define BSM_ERRNO_ENODEV 19
-#define BSM_ERRNO_ENOTDIR 20
-#define BSM_ERRNO_EISDIR 21
-#define BSM_ERRNO_EINVAL 22
-#define BSM_ERRNO_ENFILE 23
-#define BSM_ERRNO_EMFILE 24
-#define BSM_ERRNO_ENOTTY 25
-#define BSM_ERRNO_ETXTBSY 26
-#define BSM_ERRNO_EFBIG 27
-#define BSM_ERRNO_ENOSPC 28
-#define BSM_ERRNO_ESPIPE 29
-#define BSM_ERRNO_EROFS 30
-#define BSM_ERRNO_EMLINK 31
-#define BSM_ERRNO_EPIPE 32
-#define BSM_ERRNO_EDOM 33
-#define BSM_ERRNO_ERANGE 34
-#define BSM_ERRNO_ENOMSG 35
-#define BSM_ERRNO_EIDRM 36
-#define BSM_ERRNO_ECHRNG 37 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EL2NSYNC 38 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EL3HLT 39 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EL3RST 40 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ELNRNG 41 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EUNATCH 42 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ENOCSI 43 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EL2HLT 44 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EDEADLK 45
-#define BSM_ERRNO_ENOLCK 46
-#define BSM_ERRNO_ECANCELED 47
-#define BSM_ERRNO_ENOTSUP 48
-#define BSM_ERRNO_EDQUOT 49
-#define BSM_ERRNO_EBADE 50 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EBADR 51 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EXFULL 52 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ENOANO 53 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EBADRQC 54 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EBADSLT 55 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EDEADLOCK 56 /* Solaris-specific. */
-#define BSM_ERRNO_EBFONT 57 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EOWNERDEAD 58 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ENOTRECOVERABLE 59 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ENOSTR 60 /* Solaris/Darwin/Linux-specific. */
-#define BSM_ERRNO_ENODATA 61 /* Solaris/Darwin/Linux-specific. */
-#define BSM_ERRNO_ETIME 62 /* Solaris/Darwin/Linux-specific. */
-#define BSM_ERRNO_ENOSR 63 /* Solaris/Darwin/Linux-specific. */
-#define BSM_ERRNO_ENONET 64 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ENOPKG 65 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EREMOTE 66
-#define BSM_ERRNO_ENOLINK 67
-#define BSM_ERRNO_EADV 68 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ESRMNT 69 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ECOMM 70 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EPROTO 71
-#define BSM_ERRNO_ELOCKUNMAPPED 72 /* Solaris-specific. */
-#define BSM_ERRNO_ENOTACTIVE 73 /* Solaris-specific. */
-#define BSM_ERRNO_EMULTIHOP 74
-#define BSM_ERRNO_EBADMSG 77
-#define BSM_ERRNO_ENAMETOOLONG 78
-#define BSM_ERRNO_EOVERFLOW 79
-#define BSM_ERRNO_ENOTUNIQ 80 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EBADFD 81 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EREMCHG 82 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ELIBACC 83 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ELIBBAD 84 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ELIBSCN 85 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ELIBMAX 86 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ELIBEXEC 87 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_EILSEQ 88
-#define BSM_ERRNO_ENOSYS 89
-#define BSM_ERRNO_ELOOP 90
-#define BSM_ERRNO_ERESTART 91
-#define BSM_ERRNO_ESTRPIPE 92 /* Solaris/Linux-specific. */
-#define BSM_ERRNO_ENOTEMPTY 93
-#define BSM_ERRNO_EUSERS 94
-#define BSM_ERRNO_ENOTSOCK 95
-#define BSM_ERRNO_EDESTADDRREQ 96
-#define BSM_ERRNO_EMSGSIZE 97
-#define BSM_ERRNO_EPROTOTYPE 98
-#define BSM_ERRNO_ENOPROTOOPT 99
-#define BSM_ERRNO_EPROTONOSUPPORT 120
-#define BSM_ERRNO_ESOCKTNOSUPPORT 121
-#define BSM_ERRNO_EOPNOTSUPP 122
-#define BSM_ERRNO_EPFNOSUPPORT 123
-#define BSM_ERRNO_EAFNOSUPPORT 124
-#define BSM_ERRNO_EADDRINUSE 125
-#define BSM_ERRNO_EADDRNOTAVAIL 126
-#define BSM_ERRNO_ENETDOWN 127
-#define BSM_ERRNO_ENETUNREACH 128
-#define BSM_ERRNO_ENETRESET 129
-#define BSM_ERRNO_ECONNABORTED 130
-#define BSM_ERRNO_ECONNRESET 131
-#define BSM_ERRNO_ENOBUFS 132
-#define BSM_ERRNO_EISCONN 133
-#define BSM_ERRNO_ENOTCONN 134
-#define BSM_ERRNO_ESHUTDOWN 143
-#define BSM_ERRNO_ETOOMANYREFS 144
-#define BSM_ERRNO_ETIMEDOUT 145
-#define BSM_ERRNO_ECONNREFUSED 146
-#define BSM_ERRNO_EHOSTDOWN 147
-#define BSM_ERRNO_EHOSTUNREACH 148
-#define BSM_ERRNO_EALREADY 149
-#define BSM_ERRNO_EINPROGRESS 150
-#define BSM_ERRNO_ESTALE 151
-
-/*
- * OpenBSM constants for error numbers not defined in Solaris. In the event
- * that these errors are added to Solaris, we will deprecate the OpenBSM
- * numbers in the same way we do for audit event constants.
- *
- * ELAST doesn't get a constant in the BSM space.
- */
-#define BSM_ERRNO_EPROCLIM 190 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EBADRPC 191 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_ERPCMISMATCH 192 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EPROGUNAVAIL 193 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EPROGMISMATCH 194 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EPROCUNAVAIL 195 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EFTYPE 196 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EAUTH 197 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_ENEEDAUTH 198 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_ENOATTR 199 /* FreeBSD/Darwin-specific. */
-#define BSM_ERRNO_EDOOFUS 200 /* FreeBSD-specific. */
-#define BSM_ERRNO_EJUSTRETURN 201 /* FreeBSD-specific. */
-#define BSM_ERRNO_ENOIOCTL 202 /* FreeBSD-specific. */
-#define BSM_ERRNO_EDIRIOCTL 203 /* FreeBSD-specific. */
-#define BSM_ERRNO_EPWROFF 204 /* Darwin-specific. */
-#define BSM_ERRNO_EDEVERR 205 /* Darwin-specific. */
-#define BSM_ERRNO_EBADEXEC 206 /* Darwin-specific. */
-#define BSM_ERRNO_EBADARCH 207 /* Darwin-specific. */
-#define BSM_ERRNO_ESHLIBVERS 208 /* Darwin-specific. */
-#define BSM_ERRNO_EBADMACHO 209 /* Darwin-specific. */
-#define BSM_ERRNO_EPOLICY 210 /* Darwin-specific. */
-#define BSM_ERRNO_EDOTDOT 211 /* Linux-specific. */
-#define BSM_ERRNO_EUCLEAN 212 /* Linux-specific. */
-#define BSM_ERRNO_ENOTNAM 213 /* Linux(Xenix?)-specific. */
-#define BSM_ERRNO_ENAVAIL 214 /* Linux(Xenix?)-specific. */
-#define BSM_ERRNO_EISNAM 215 /* Linux(Xenix?)-specific. */
-#define BSM_ERRNO_EREMOTEIO 216 /* Linux-specific. */
-#define BSM_ERRNO_ENOMEDIUM 217 /* Linux-specific. */
-#define BSM_ERRNO_EMEDIUMTYPE 218 /* Linux-specific. */
-#define BSM_ERRNO_ENOKEY 219 /* Linux-specific. */
-#define BSM_ERRNO_EKEYEXPIRED 220 /* Linux-specific. */
-#define BSM_ERRNO_EKEYREVOKED 221 /* Linux-specific. */
-#define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. */
-#define BSM_ERRNO_ENOTCAPABLE 223 /* FreeBSD-specific. */
-#define BSM_ERRNO_ECAPMODE 224 /* FreeBSD-specific. */
-
-/*
- * In the event that OpenBSM doesn't have a file representation of a local
- * error number, use this.
- */
-#define BSM_ERRNO_UNKNOWN 250 /* OpenBSM-specific. */
-
-#endif /* !_BSM_AUDIT_ERRNO_H_ */
diff --git a/include.new/bsm/audit_fcntl.h b/include.new/bsm/audit_fcntl.h
deleted file mode 100644
index 7922410..0000000
--- a/include.new/bsm/audit_fcntl.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*-
- * Copyright (c) 2009 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_fcntl.h#2
- * $FreeBSD: releng/10.2/sys/bsm/audit_fcntl.h 191147 2009-04-16 20:17:32Z rwatson $
- */
-
-#ifndef _BSM_AUDIT_FCNTL_H_
-#define _BSM_AUDIT_FCNTL_H_
-
-/*
- * Shared and Solaris-specific: (0-99).
- */
-#define BSM_F_DUPFD 0
-#define BSM_F_GETFD 1
-#define BSM_F_SETFD 2
-#define BSM_F_GETFL 3
-#define BSM_F_SETFL 4
-#define BSM_F_O_GETLK 5 /* Solaris-specific. */
-#define BSM_F_SETLK 6
-#define BSM_F_SETLKW 7
-#define BSM_F_CHKFL 8 /* Solaris-specific. */
-#define BSM_F_DUP2FD 9 /* FreeBSD/Solaris-specific. */
-#define BSM_F_ALLOCSP 10 /* Solaris-specific. */
-#define BSM_F_FREESP 11 /* Solaris-specific. */
-
-#define BSM_F_ISSTREAM 13 /* Solaris-specific. */
-#define BSM_F_GETLK 14
-#define BSM_F_PRIV 15 /* Solaris-specific. */
-#define BSM_F_NPRIV 16 /* Solaris-specific. */
-#define BSM_F_QUOTACTL 17 /* Solaris-specific. */
-#define BSM_F_BLOCKS 18 /* Solaris-specific. */
-#define BSM_F_BLKSIZE 19 /* Solaris-specific. */
-
-#define BSM_F_GETOWN 23
-#define BSM_F_SETOWN 24
-#define BSM_F_REVOKE 25 /* Solaris-specific. */
-#define BSM_F_HASREMOTELOCKS 26 /* Solaris-specific. */
-#define BSM_F_FREESP64 27 /* Solaris-specific. */
-#define BSM_F_ALLOCSP64 28 /* Solaris-specific. */
-
-#define BSM_F_GETLK64 33 /* Solaris-specific. */
-#define BSM_F_SETLK64 34 /* Solaris-specific. */
-#define BSM_F_SETLKW64 35 /* Solaris-specific. */
-
-#define BSM_F_SHARE 40 /* Solaris-specific. */
-#define BSM_F_UNSHARE 41 /* Solaris-specific. */
-#define BSM_F_SETLK_NBMAND 42 /* Solaris-specific. */
-#define BSM_F_SHARE_NBMAND 43 /* Solaris-specific. */
-#define BSM_F_SETLK64_NBMAND 44 /* Solaris-specific. */
-#define BSM_F_GETXFL 45 /* Solaris-specific. */
-#define BSM_F_BADFD 46 /* Solaris-specific. */
-
-/*
- * FreeBSD-specific (100-199).
- */
-#define BSM_F_OGETLK 107 /* FreeBSD-specific. */
-#define BSM_F_OSETLK 108 /* FreeBSD-specific. */
-#define BSM_F_OSETLKW 109 /* FreeBSD-specific. */
-
-#define BSM_F_SETLK_REMOTE 114 /* FreeBSD-specific. */
-
-/*
- * Linux-specific (200-299).
- */
-#define BSM_F_SETSIG 210 /* Linux-specific. */
-#define BSM_F_GETSIG 211 /* Linux-specific. */
-
-/*
- * Darwin-specific (300-399).
- */
-#define BSM_F_CHKCLEAN 341 /* Darwin-specific. */
-#define BSM_F_PREALLOCATE 342 /* Darwin-specific. */
-#define BSM_F_SETSIZE 343 /* Darwin-specific. */
-#define BSM_F_RDADVISE 344 /* Darwin-specific. */
-#define BSM_F_RDAHEAD 345 /* Darwin-specific. */
-#define BSM_F_READBOOTSTRAP 346 /* Darwin-specific. */
-#define BSM_F_WRITEBOOTSTRAP 347 /* Darwin-specific. */
-#define BSM_F_NOCACHE 348 /* Darwin-specific. */
-#define BSM_F_LOG2PHYS 349 /* Darwin-specific. */
-#define BSM_F_GETPATH 350 /* Darwin-specific. */
-#define BSM_F_FULLFSYNC 351 /* Darwin-specific. */
-#define BSM_F_PATHPKG_CHECK 352 /* Darwin-specific. */
-#define BSM_F_FREEZE_FS 353 /* Darwin-specific. */
-#define BSM_F_THAW_FS 354 /* Darwin-specific. */
-#define BSM_F_GLOBAL_NOCACHE 355 /* Darwin-specific. */
-#define BSM_F_OPENFROM 356 /* Darwin-specific. */
-#define BSM_F_UNLINKFROM 357 /* Darwin-specific. */
-#define BSM_F_CHECK_OPENEVT 358 /* Darwin-specific. */
-#define BSM_F_ADDSIGS 359 /* Darwin-specific. */
-#define BSM_F_MARKDEPENDENCY 360 /* Darwin-specific. */
-
-/*
- * Darwin file system specific (400-499).
- */
-#define BSM_F_FS_SPECIFIC_0 400 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_1 401 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_2 402 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_3 403 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_4 404 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_5 405 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_6 406 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_7 407 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_8 408 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_9 409 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_10 410 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_11 411 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_12 412 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_13 413 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_14 414 /* Darwin-fs-specific. */
-#define BSM_F_FS_SPECIFIC_15 415 /* Darwin-fs-specific. */
-
-
-#define BSM_F_UNKNOWN 0xFFFF
-
-#endif /* !_BSM_AUDIT_FCNTL_H_ */
diff --git a/include.new/bsm/audit_internal.h b/include.new/bsm/audit_internal.h
deleted file mode 100644
index 61fc712..0000000
--- a/include.new/bsm/audit_internal.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * Copyright (c) 2005-2008 Apple Inc.
- * Copyright (c) 2005 SPARTA, Inc.
- * All rights reserved.
- *
- * This code was developed in part by Robert N. M. Watson, Senior Principal
- * Scientist, SPARTA, 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.
- * 3. Neither the name of Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_internal.h#6
- * $FreeBSD: releng/10.2/sys/bsm/audit_internal.h 243751 2012-12-01 13:46:37Z rwatson $
- */
-
-#ifndef _AUDIT_INTERNAL_H
-#define _AUDIT_INTERNAL_H
-
-#if defined(__linux__) && !defined(__unused)
-#define __unused
-#endif
-
-/*
- * audit_internal.h contains private interfaces that are shared by user space
- * and the kernel for the purposes of assembling audit records. Applications
- * should not include this file or use the APIs found within, or it may be
- * broken with future releases of OpenBSM, which may delete, modify, or
- * otherwise break these interfaces or the assumptions they rely on.
- */
-struct au_token {
- u_char *t_data;
- size_t len;
- TAILQ_ENTRY(au_token) tokens;
-};
-
-struct au_record {
- char used; /* Record currently in use? */
- int desc; /* Descriptor for record. */
- TAILQ_HEAD(, au_token) token_q; /* Queue of BSM tokens. */
- u_char *data;
- size_t len;
- LIST_ENTRY(au_record) au_rec_q;
-};
-typedef struct au_record au_record_t;
-
-
-/*
- * We could determined the header and trailer sizes by defining appropriate
- * structures. We hold off that approach until we have a consistent way of
- * using structures for all tokens. This is not straightforward since these
- * token structures may contain pointers of whose contents we do not know the
- * size (e.g text tokens).
- */
-#define AUDIT_HEADER_EX_SIZE(a) ((a)->ai_termid.at_type+18+sizeof(uint32_t))
-#define AUDIT_HEADER_SIZE 18
-#define MAX_AUDIT_HEADER_SIZE (5*sizeof(uint32_t)+18)
-#define AUDIT_TRAILER_SIZE 7
-
-/*
- * BSM token streams store fields in big endian byte order, so as to be
- * portable; when encoding and decoding, we must convert byte orders for
- * typed values.
- */
-#define ADD_U_CHAR(loc, val) \
- do { \
- *(loc) = (val); \
- (loc) += sizeof(u_char); \
- } while(0)
-
-
-#define ADD_U_INT16(loc, val) \
- do { \
- be16enc((loc), (val)); \
- (loc) += sizeof(u_int16_t); \
- } while(0)
-
-#define ADD_U_INT32(loc, val) \
- do { \
- be32enc((loc), (val)); \
- (loc) += sizeof(uint32_t); \
- } while(0)
-
-#define ADD_U_INT64(loc, val) \
- do { \
- be64enc((loc), (val)); \
- (loc) += sizeof(u_int64_t); \
- } while(0)
-
-#define ADD_MEM(loc, data, size) \
- do { \
- memcpy((loc), (data), (size)); \
- (loc) += size; \
- } while(0)
-
-#define ADD_STRING(loc, data, size) ADD_MEM(loc, data, size)
-
-#endif /* !_AUDIT_INTERNAL_H_ */
diff --git a/include.new/bsm/audit_kevents.h b/include.new/bsm/audit_kevents.h
deleted file mode 100644
index b132e64..0000000
--- a/include.new/bsm/audit_kevents.h
+++ /dev/null
@@ -1,809 +0,0 @@
-/*-
- * Copyright (c) 2005-2009 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#7
- * $FreeBSD: releng/10.2/sys/bsm/audit_kevents.h 255219 2013-09-05 00:09:56Z pjd $
- */
-
-#ifndef _BSM_AUDIT_KEVENTS_H_
-#define _BSM_AUDIT_KEVENTS_H_
-
-/*
- * The reserved event numbers for kernel events are 1...2047 and 43001..44900.
- */
-#define AUE_IS_A_KEVENT(e) (((e) > 0 && (e) < 2048) || \
- ((e) > 43000 && (e) < 45000))
-
-/*
- * Values marked as AUE_NULL are not required to be audited as per CAPP.
- *
- * Some conflicts exist in the assignment of name to event number mappings
- * between BSM implementations. In general, we prefer the OpenSolaris
- * definition as we consider Solaris BSM to be authoritative. _DARWIN_ has
- * been inserted for the Darwin variants. If necessary, other tags will be
- * added in the future.
- */
-#define AUE_NULL 0
-#define AUE_EXIT 1
-#define AUE_FORK 2
-#define AUE_FORKALL AUE_FORK /* Solaris-specific. */
-#define AUE_OPEN 3
-#define AUE_CREAT 4
-#define AUE_LINK 5
-#define AUE_UNLINK 6
-#define AUE_DELETE AUE_UNLINK /* Darwin-specific. */
-#define AUE_EXEC 7
-#define AUE_CHDIR 8
-#define AUE_MKNOD 9
-#define AUE_CHMOD 10
-#define AUE_CHOWN 11
-#define AUE_UMOUNT 12
-#define AUE_JUNK 13 /* Solaris-specific. */
-#define AUE_ACCESS 14
-#define AUE_KILL 15
-#define AUE_STAT 16
-#define AUE_LSTAT 17
-#define AUE_ACCT 18
-#define AUE_MCTL 19 /* Solaris-specific. */
-#define AUE_REBOOT 20 /* XXX: Darwin conflict. */
-#define AUE_SYMLINK 21
-#define AUE_READLINK 22
-#define AUE_EXECVE 23
-#define AUE_CHROOT 24
-#define AUE_VFORK 25
-#define AUE_SETGROUPS 26
-#define AUE_SETPGRP 27
-#define AUE_SWAPON 28
-#define AUE_SETHOSTNAME 29 /* XXX: Darwin conflict. */
-#define AUE_FCNTL 30
-#define AUE_SETPRIORITY 31 /* XXX: Darwin conflict. */
-#define AUE_CONNECT 32
-#define AUE_ACCEPT 33
-#define AUE_BIND 34
-#define AUE_SETSOCKOPT 35
-#define AUE_VTRACE 36 /* Solaris-specific. */
-#define AUE_SETTIMEOFDAY 37 /* XXX: Darwin conflict. */
-#define AUE_FCHOWN 38
-#define AUE_FCHMOD 39
-#define AUE_SETREUID 40
-#define AUE_SETREGID 41
-#define AUE_RENAME 42
-#define AUE_TRUNCATE 43 /* XXX: Darwin conflict. */
-#define AUE_FTRUNCATE 44 /* XXX: Darwin conflict. */
-#define AUE_FLOCK 45 /* XXX: Darwin conflict. */
-#define AUE_SHUTDOWN 46
-#define AUE_MKDIR 47
-#define AUE_RMDIR 48
-#define AUE_UTIMES 49
-#define AUE_ADJTIME 50
-#define AUE_SETRLIMIT 51
-#define AUE_KILLPG 52
-#define AUE_NFS_SVC 53 /* XXX: Darwin conflict. */
-#define AUE_STATFS 54
-#define AUE_FSTATFS 55
-#define AUE_UNMOUNT 56 /* XXX: Darwin conflict. */
-#define AUE_ASYNC_DAEMON 57
-#define AUE_NFS_GETFH 58 /* XXX: Darwin conflict. */
-#define AUE_SETDOMAINNAME 59
-#define AUE_QUOTACTL 60 /* XXX: Darwin conflict. */
-#define AUE_EXPORTFS 61
-#define AUE_MOUNT 62
-#define AUE_SEMSYS 63
-#define AUE_MSGSYS 64
-#define AUE_SHMSYS 65
-#define AUE_BSMSYS 66 /* Solaris-specific. */
-#define AUE_RFSSYS 67 /* Solaris-specific. */
-#define AUE_FCHDIR 68
-#define AUE_FCHROOT 69
-#define AUE_VPIXSYS 70 /* Solaris-specific. */
-#define AUE_PATHCONF 71
-#define AUE_OPEN_R 72
-#define AUE_OPEN_RC 73
-#define AUE_OPEN_RT 74
-#define AUE_OPEN_RTC 75
-#define AUE_OPEN_W 76
-#define AUE_OPEN_WC 77
-#define AUE_OPEN_WT 78
-#define AUE_OPEN_WTC 79
-#define AUE_OPEN_RW 80
-#define AUE_OPEN_RWC 81
-#define AUE_OPEN_RWT 82
-#define AUE_OPEN_RWTC 83
-#define AUE_MSGCTL 84
-#define AUE_MSGCTL_RMID 85
-#define AUE_MSGCTL_SET 86
-#define AUE_MSGCTL_STAT 87
-#define AUE_MSGGET 88
-#define AUE_MSGRCV 89
-#define AUE_MSGSND 90
-#define AUE_SHMCTL 91
-#define AUE_SHMCTL_RMID 92
-#define AUE_SHMCTL_SET 93
-#define AUE_SHMCTL_STAT 94
-#define AUE_SHMGET 95
-#define AUE_SHMAT 96
-#define AUE_SHMDT 97
-#define AUE_SEMCTL 98
-#define AUE_SEMCTL_RMID 99
-#define AUE_SEMCTL_SET 100
-#define AUE_SEMCTL_STAT 101
-#define AUE_SEMCTL_GETNCNT 102
-#define AUE_SEMCTL_GETPID 103
-#define AUE_SEMCTL_GETVAL 104
-#define AUE_SEMCTL_GETALL 105
-#define AUE_SEMCTL_GETZCNT 106
-#define AUE_SEMCTL_SETVAL 107
-#define AUE_SEMCTL_SETALL 108
-#define AUE_SEMGET 109
-#define AUE_SEMOP 110
-#define AUE_CORE 111 /* Solaris-specific, currently. */
-#define AUE_CLOSE 112
-#define AUE_SYSTEMBOOT 113 /* Solaris-specific. */
-#define AUE_ASYNC_DAEMON_EXIT 114 /* Solaris-specific. */
-#define AUE_NFSSVC_EXIT 115 /* Solaris-specific. */
-#define AUE_WRITEL 128 /* Solaris-specific. */
-#define AUE_WRITEVL 129 /* Solaris-specific. */
-#define AUE_GETAUID 130
-#define AUE_SETAUID 131
-#define AUE_GETAUDIT 132
-#define AUE_SETAUDIT 133
-#define AUE_GETUSERAUDIT 134 /* Solaris-specific. */
-#define AUE_SETUSERAUDIT 135 /* Solaris-specific. */
-#define AUE_AUDITSVC 136 /* Solaris-specific. */
-#define AUE_AUDITUSER 137 /* Solaris-specific. */
-#define AUE_AUDITON 138
-#define AUE_AUDITON_GTERMID 139 /* Solaris-specific. */
-#define AUE_AUDITON_STERMID 140 /* Solaris-specific. */
-#define AUE_AUDITON_GPOLICY 141
-#define AUE_AUDITON_SPOLICY 142
-#define AUE_AUDITON_GQCTRL 145
-#define AUE_AUDITON_SQCTRL 146
-#define AUE_GETKERNSTATE 147 /* Solaris-specific. */
-#define AUE_SETKERNSTATE 148 /* Solaris-specific. */
-#define AUE_GETPORTAUDIT 149 /* Solaris-specific. */
-#define AUE_AUDITSTAT 150 /* Solaris-specific. */
-#define AUE_REVOKE 151
-#define AUE_MAC 152 /* Solaris-specific. */
-#define AUE_ENTERPROM 153 /* Solaris-specific. */
-#define AUE_EXITPROM 154 /* Solaris-specific. */
-#define AUE_IFLOAT 155 /* Solaris-specific. */
-#define AUE_PFLOAT 156 /* Solaris-specific. */
-#define AUE_UPRIV 157 /* Solaris-specific. */
-#define AUE_IOCTL 158
-#define AUE_SOCKET 183
-#define AUE_SENDTO 184
-#define AUE_PIPE 185
-#define AUE_SOCKETPAIR 186 /* XXX: Darwin conflict. */
-#define AUE_SEND 187
-#define AUE_SENDMSG 188
-#define AUE_RECV 189
-#define AUE_RECVMSG 190
-#define AUE_RECVFROM 191
-#define AUE_READ 192
-#define AUE_GETDENTS 193
-#define AUE_LSEEK 194
-#define AUE_WRITE 195
-#define AUE_WRITEV 196
-#define AUE_NFS 197 /* Solaris-specific. */
-#define AUE_READV 198
-#define AUE_OSTAT 199 /* Solaris-specific. */
-#define AUE_SETUID 200 /* XXXRW: Solaris old setuid? */
-#define AUE_STIME 201 /* XXXRW: Solaris old stime? */
-#define AUE_UTIME 202 /* XXXRW: Solaris old utime? */
-#define AUE_NICE 203 /* XXXRW: Solaris old nice? */
-#define AUE_OSETPGRP 204 /* Solaris-specific. */
-#define AUE_SETGID 205
-#define AUE_READL 206 /* Solaris-specific. */
-#define AUE_READVL 207 /* Solaris-specific. */
-#define AUE_FSTAT 208
-#define AUE_DUP2 209
-#define AUE_MMAP 210
-#define AUE_AUDIT 211
-#define AUE_PRIOCNTLSYS 212 /* Solaris-specific. */
-#define AUE_MUNMAP 213
-#define AUE_SETEGID 214
-#define AUE_SETEUID 215
-#define AUE_PUTMSG 216 /* Solaris-specific. */
-#define AUE_GETMSG 217 /* Solaris-specific. */
-#define AUE_PUTPMSG 218 /* Solaris-specific. */
-#define AUE_GETPMSG 219 /* Solaris-specific. */
-#define AUE_AUDITSYS 220 /* Solaris-specific. */
-#define AUE_AUDITON_GETKMASK 221
-#define AUE_AUDITON_SETKMASK 222
-#define AUE_AUDITON_GETCWD 223
-#define AUE_AUDITON_GETCAR 224
-#define AUE_AUDITON_GETSTAT 225
-#define AUE_AUDITON_SETSTAT 226
-#define AUE_AUDITON_SETUMASK 227
-#define AUE_AUDITON_SETSMASK 228
-#define AUE_AUDITON_GETCOND 229
-#define AUE_AUDITON_SETCOND 230
-#define AUE_AUDITON_GETCLASS 231
-#define AUE_AUDITON_SETCLASS 232
-#define AUE_FUSERS 233 /* Solaris-specific; also UTSSYS? */
-#define AUE_STATVFS 234
-#define AUE_XSTAT 235 /* Solaris-specific. */
-#define AUE_LXSTAT 236 /* Solaris-specific. */
-#define AUE_LCHOWN 237
-#define AUE_MEMCNTL 238 /* Solaris-specific. */
-#define AUE_SYSINFO 239 /* Solaris-specific. */
-#define AUE_XMKNOD 240 /* Solaris-specific. */
-#define AUE_FORK1 241
-#define AUE_MODCTL 242 /* Solaris-specific. */
-#define AUE_MODLOAD 243
-#define AUE_MODUNLOAD 244
-#define AUE_MODCONFIG 245 /* Solaris-specific. */
-#define AUE_MODADDMAJ 246 /* Solaris-specific. */
-#define AUE_SOCKACCEPT 247 /* Solaris-specific. */
-#define AUE_SOCKCONNECT 248 /* Solaris-specific. */
-#define AUE_SOCKSEND 249 /* Solaris-specific. */
-#define AUE_SOCKRECEIVE 250 /* Solaris-specific. */
-#define AUE_ACLSET 251
-#define AUE_FACLSET 252
-#define AUE_DOORFS 253 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_CALL 254 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_RETURN 255 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_CREATE 256 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_REVOKE 257 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_INFO 258 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_CRED 259 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_BIND 260 /* Solaris-specific. */
-#define AUE_DOORFS_DOOR_UNBIND 261 /* Solaris-specific. */
-#define AUE_P_ONLINE 262 /* Solaris-specific. */
-#define AUE_PROCESSOR_BIND 263 /* Solaris-specific. */
-#define AUE_INST_SYNC 264 /* Solaris-specific. */
-#define AUE_SOCKCONFIG 265 /* Solaris-specific. */
-#define AUE_SETAUDIT_ADDR 266
-#define AUE_GETAUDIT_ADDR 267
-#define AUE_UMOUNT2 268 /* Solaris-specific. */
-#define AUE_FSAT 269 /* Solaris-specific. */
-#define AUE_OPENAT_R 270
-#define AUE_OPENAT_RC 271
-#define AUE_OPENAT_RT 272
-#define AUE_OPENAT_RTC 273
-#define AUE_OPENAT_W 274
-#define AUE_OPENAT_WC 275
-#define AUE_OPENAT_WT 276
-#define AUE_OPENAT_WTC 277
-#define AUE_OPENAT_RW 278
-#define AUE_OPENAT_RWC 279
-#define AUE_OPENAT_RWT 280
-#define AUE_OPENAT_RWTC 281
-#define AUE_RENAMEAT 282
-#define AUE_FSTATAT 283
-#define AUE_FCHOWNAT 284
-#define AUE_FUTIMESAT 285
-#define AUE_UNLINKAT 286
-#define AUE_CLOCK_SETTIME 287
-#define AUE_NTP_ADJTIME 288
-#define AUE_SETPPRIV 289 /* Solaris-specific. */
-#define AUE_MODDEVPLCY 290 /* Solaris-specific. */
-#define AUE_MODADDPRIV 291 /* Solaris-specific. */
-#define AUE_CRYPTOADM 292 /* Solaris-specific. */
-#define AUE_CONFIGKSSL 293 /* Solaris-specific. */
-#define AUE_BRANDSYS 294 /* Solaris-specific. */
-#define AUE_PF_POLICY_ADDRULE 295 /* Solaris-specific. */
-#define AUE_PF_POLICY_DELRULE 296 /* Solaris-specific. */
-#define AUE_PF_POLICY_CLONE 297 /* Solaris-specific. */
-#define AUE_PF_POLICY_FLIP 298 /* Solaris-specific. */
-#define AUE_PF_POLICY_FLUSH 299 /* Solaris-specific. */
-#define AUE_PF_POLICY_ALGS 300 /* Solaris-specific. */
-#define AUE_PORTFS 301 /* Solaris-specific. */
-
-/*
- * Events added for Apple Darwin that potentially collide with future Solaris
- * BSM events. These are assigned AUE_DARWIN prefixes, and are deprecated in
- * new trails. Systems generating these events should switch to the new
- * identifiers that avoid colliding with the Solaris identifier space.
- */
-#define AUE_DARWIN_GETFSSTAT 301
-#define AUE_DARWIN_PTRACE 302
-#define AUE_DARWIN_CHFLAGS 303
-#define AUE_DARWIN_FCHFLAGS 304
-#define AUE_DARWIN_PROFILE 305
-#define AUE_DARWIN_KTRACE 306
-#define AUE_DARWIN_SETLOGIN 307
-#define AUE_DARWIN_REBOOT 308
-#define AUE_DARWIN_REVOKE 309
-#define AUE_DARWIN_UMASK 310
-#define AUE_DARWIN_MPROTECT 311
-#define AUE_DARWIN_SETPRIORITY 312
-#define AUE_DARWIN_SETTIMEOFDAY 313
-#define AUE_DARWIN_FLOCK 314
-#define AUE_DARWIN_MKFIFO 315
-#define AUE_DARWIN_POLL 316
-#define AUE_DARWIN_SOCKETPAIR 317
-#define AUE_DARWIN_FUTIMES 318
-#define AUE_DARWIN_SETSID 319
-#define AUE_DARWIN_SETPRIVEXEC 320 /* Darwin-specific. */
-#define AUE_DARWIN_NFSSVC 321
-#define AUE_DARWIN_GETFH 322
-#define AUE_DARWIN_QUOTACTL 323
-#define AUE_DARWIN_ADDPROFILE 324 /* Darwin-specific. */
-#define AUE_DARWIN_KDEBUGTRACE 325 /* Darwin-specific. */
-#define AUE_DARWIN_KDBUGTRACE AUE_KDEBUGTRACE
-#define AUE_DARWIN_FSTAT 326
-#define AUE_DARWIN_FPATHCONF 327
-#define AUE_DARWIN_GETDIRENTRIES 328
-#define AUE_DARWIN_TRUNCATE 329
-#define AUE_DARWIN_FTRUNCATE 330
-#define AUE_DARWIN_SYSCTL 331
-#define AUE_DARWIN_MLOCK 332
-#define AUE_DARWIN_MUNLOCK 333
-#define AUE_DARWIN_UNDELETE 334
-#define AUE_DARWIN_GETATTRLIST 335 /* Darwin-specific. */
-#define AUE_DARWIN_SETATTRLIST 336 /* Darwin-specific. */
-#define AUE_DARWIN_GETDIRENTRIESATTR 337 /* Darwin-specific. */
-#define AUE_DARWIN_EXCHANGEDATA 338 /* Darwin-specific. */
-#define AUE_DARWIN_SEARCHFS 339 /* Darwin-specific. */
-#define AUE_DARWIN_MINHERIT 340
-#define AUE_DARWIN_SEMCONFIG 341
-#define AUE_DARWIN_SEMOPEN 342
-#define AUE_DARWIN_SEMCLOSE 343
-#define AUE_DARWIN_SEMUNLINK 344
-#define AUE_DARWIN_SHMOPEN 345
-#define AUE_DARWIN_SHMUNLINK 346
-#define AUE_DARWIN_LOADSHFILE 347 /* Darwin-specific. */
-#define AUE_DARWIN_RESETSHFILE 348 /* Darwin-specific. */
-#define AUE_DARWIN_NEWSYSTEMSHREG 349 /* Darwin-specific. */
-#define AUE_DARWIN_PTHREADKILL 350 /* Darwin-specific. */
-#define AUE_DARWIN_PTHREADSIGMASK 351 /* Darwin-specific. */
-#define AUE_DARWIN_AUDITCTL 352
-#define AUE_DARWIN_RFORK 353
-#define AUE_DARWIN_LCHMOD 354
-#define AUE_DARWIN_SWAPOFF 355
-#define AUE_DARWIN_INITPROCESS 356 /* Darwin-specific. */
-#define AUE_DARWIN_MAPFD 357 /* Darwin-specific. */
-#define AUE_DARWIN_TASKFORPID 358 /* Darwin-specific. */
-#define AUE_DARWIN_PIDFORTASK 359 /* Darwin-specific. */
-#define AUE_DARWIN_SYSCTL_NONADMIN 360
-#define AUE_DARWIN_COPYFILE 361 /* Darwin-specific. */
-
-/*
- * Audit event identifiers added as part of OpenBSM, generally corresponding
- * to events in FreeBSD, Darwin, and Linux that were not present in Solaris.
- * These often duplicate events added to the Solaris set by Darwin, but use
- * event identifiers in a higher range in order to avoid colliding with
- * future Solaris additions.
- *
- * If an event in this section is later added to Solaris, we prefer the
- * Solaris event identifier, and add _OPENBSM_ to the OpenBSM-specific
- * identifier so that old trails can still be processed, but new trails use
- * the Solaris identifier.
- */
-#define AUE_GETFSSTAT 43001
-#define AUE_PTRACE 43002
-#define AUE_CHFLAGS 43003
-#define AUE_FCHFLAGS 43004
-#define AUE_PROFILE 43005
-#define AUE_KTRACE 43006
-#define AUE_SETLOGIN 43007
-#define AUE_OPENBSM_REVOKE 43008 /* Solaris event now preferred. */
-#define AUE_UMASK 43009
-#define AUE_MPROTECT 43010
-#define AUE_MKFIFO 43011
-#define AUE_POLL 43012
-#define AUE_FUTIMES 43013
-#define AUE_SETSID 43014
-#define AUE_SETPRIVEXEC 43015 /* Darwin-specific. */
-#define AUE_ADDPROFILE 43016 /* Darwin-specific. */
-#define AUE_KDEBUGTRACE 43017 /* Darwin-specific. */
-#define AUE_KDBUGTRACE AUE_KDEBUGTRACE
-#define AUE_OPENBSM_FSTAT 43018 /* Solaris event now preferred. */
-#define AUE_FPATHCONF 43019
-#define AUE_GETDIRENTRIES 43020
-#define AUE_SYSCTL 43021
-#define AUE_MLOCK 43022
-#define AUE_MUNLOCK 43023
-#define AUE_UNDELETE 43024
-#define AUE_GETATTRLIST 43025 /* Darwin-specific. */
-#define AUE_SETATTRLIST 43026 /* Darwin-specific. */
-#define AUE_GETDIRENTRIESATTR 43027 /* Darwin-specific. */
-#define AUE_EXCHANGEDATA 43028 /* Darwin-specific. */
-#define AUE_SEARCHFS 43029 /* Darwin-specific. */
-#define AUE_MINHERIT 43030
-#define AUE_SEMCONFIG 43031
-#define AUE_SEMOPEN 43032
-#define AUE_SEMCLOSE 43033
-#define AUE_SEMUNLINK 43034
-#define AUE_SHMOPEN 43035
-#define AUE_SHMUNLINK 43036
-#define AUE_LOADSHFILE 43037 /* Darwin-specific. */
-#define AUE_RESETSHFILE 43038 /* Darwin-specific. */
-#define AUE_NEWSYSTEMSHREG 43039 /* Darwin-specific. */
-#define AUE_PTHREADKILL 43040 /* Darwin-specific. */
-#define AUE_PTHREADSIGMASK 43041 /* Darwin-specific. */
-#define AUE_AUDITCTL 43042
-#define AUE_RFORK 43043
-#define AUE_LCHMOD 43044
-#define AUE_SWAPOFF 43045
-#define AUE_INITPROCESS 43046 /* Darwin-specific. */
-#define AUE_MAPFD 43047 /* Darwin-specific. */
-#define AUE_TASKFORPID 43048 /* Darwin-specific. */
-#define AUE_PIDFORTASK 43049 /* Darwin-specific. */
-#define AUE_SYSCTL_NONADMIN 43050
-#define AUE_COPYFILE 43051 /* Darwin-specific. */
-
-/*
- * Events added to OpenBSM for FreeBSD and Linux; may also be used by Darwin
- * in the future.
- */
-#define AUE_LUTIMES 43052
-#define AUE_LCHFLAGS 43053 /* FreeBSD-specific. */
-#define AUE_SENDFILE 43054 /* BSD/Linux-specific. */
-#define AUE_USELIB 43055 /* Linux-specific. */
-#define AUE_GETRESUID 43056
-#define AUE_SETRESUID 43057
-#define AUE_GETRESGID 43058
-#define AUE_SETRESGID 43059
-#define AUE_WAIT4 43060 /* FreeBSD-specific. */
-#define AUE_LGETFH 43061 /* FreeBSD-specific. */
-#define AUE_FHSTATFS 43062 /* FreeBSD-specific. */
-#define AUE_FHOPEN 43063 /* FreeBSD-specific. */
-#define AUE_FHSTAT 43064 /* FreeBSD-specific. */
-#define AUE_JAIL 43065 /* FreeBSD-specific. */
-#define AUE_EACCESS 43066 /* FreeBSD-specific. */
-#define AUE_KQUEUE 43067 /* FreeBSD-specific. */
-#define AUE_KEVENT 43068 /* FreeBSD-specific. */
-#define AUE_FSYNC 43069
-#define AUE_NMOUNT 43070 /* FreeBSD-specific. */
-#define AUE_BDFLUSH 43071 /* Linux-specific. */
-#define AUE_SETFSUID 43072 /* Linux-specific. */
-#define AUE_SETFSGID 43073 /* Linux-specific. */
-#define AUE_PERSONALITY 43074 /* Linux-specific. */
-#define AUE_SCHED_GETSCHEDULER 43075 /* POSIX.1b. */
-#define AUE_SCHED_SETSCHEDULER 43076 /* POSIX.1b. */
-#define AUE_PRCTL 43077 /* Linux-specific. */
-#define AUE_GETCWD 43078 /* FreeBSD/Linux-specific. */
-#define AUE_CAPGET 43079 /* Linux-specific. */
-#define AUE_CAPSET 43080 /* Linux-specific. */
-#define AUE_PIVOT_ROOT 43081 /* Linux-specific. */
-#define AUE_RTPRIO 43082 /* FreeBSD-specific. */
-#define AUE_SCHED_GETPARAM 43083 /* POSIX.1b. */
-#define AUE_SCHED_SETPARAM 43084 /* POSIX.1b. */
-#define AUE_SCHED_GET_PRIORITY_MAX 43085 /* POSIX.1b. */
-#define AUE_SCHED_GET_PRIORITY_MIN 43086 /* POSIX.1b. */
-#define AUE_SCHED_RR_GET_INTERVAL 43087 /* POSIX.1b. */
-#define AUE_ACL_GET_FILE 43088 /* FreeBSD. */
-#define AUE_ACL_SET_FILE 43089 /* FreeBSD. */
-#define AUE_ACL_GET_FD 43090 /* FreeBSD. */
-#define AUE_ACL_SET_FD 43091 /* FreeBSD. */
-#define AUE_ACL_DELETE_FILE 43092 /* FreeBSD. */
-#define AUE_ACL_DELETE_FD 43093 /* FreeBSD. */
-#define AUE_ACL_CHECK_FILE 43094 /* FreeBSD. */
-#define AUE_ACL_CHECK_FD 43095 /* FreeBSD. */
-#define AUE_ACL_GET_LINK 43096 /* FreeBSD. */
-#define AUE_ACL_SET_LINK 43097 /* FreeBSD. */
-#define AUE_ACL_DELETE_LINK 43098 /* FreeBSD. */
-#define AUE_ACL_CHECK_LINK 43099 /* FreeBSD. */
-#define AUE_SYSARCH 43100 /* FreeBSD. */
-#define AUE_EXTATTRCTL 43101 /* FreeBSD. */
-#define AUE_EXTATTR_GET_FILE 43102 /* FreeBSD. */
-#define AUE_EXTATTR_SET_FILE 43103 /* FreeBSD. */
-#define AUE_EXTATTR_LIST_FILE 43104 /* FreeBSD. */
-#define AUE_EXTATTR_DELETE_FILE 43105 /* FreeBSD. */
-#define AUE_EXTATTR_GET_FD 43106 /* FreeBSD. */
-#define AUE_EXTATTR_SET_FD 43107 /* FreeBSD. */
-#define AUE_EXTATTR_LIST_FD 43108 /* FreeBSD. */
-#define AUE_EXTATTR_DELETE_FD 43109 /* FreeBSD. */
-#define AUE_EXTATTR_GET_LINK 43110 /* FreeBSD. */
-#define AUE_EXTATTR_SET_LINK 43111 /* FreeBSD. */
-#define AUE_EXTATTR_LIST_LINK 43112 /* FreeBSD. */
-#define AUE_EXTATTR_DELETE_LINK 43113 /* FreeBSD. */
-#define AUE_KENV 43114 /* FreeBSD. */
-#define AUE_JAIL_ATTACH 43115 /* FreeBSD. */
-#define AUE_SYSCTL_WRITE 43116 /* FreeBSD. */
-#define AUE_IOPERM 43117 /* Linux. */
-#define AUE_READDIR 43118 /* Linux. */
-#define AUE_IOPL 43119 /* Linux. */
-#define AUE_VM86 43120 /* Linux. */
-#define AUE_MAC_GET_PROC 43121 /* FreeBSD/Darwin. */
-#define AUE_MAC_SET_PROC 43122 /* FreeBSD/Darwin. */
-#define AUE_MAC_GET_FD 43123 /* FreeBSD/Darwin. */
-#define AUE_MAC_GET_FILE 43124 /* FreeBSD/Darwin. */
-#define AUE_MAC_SET_FD 43125 /* FreeBSD/Darwin. */
-#define AUE_MAC_SET_FILE 43126 /* FreeBSD/Darwin. */
-#define AUE_MAC_SYSCALL 43127 /* FreeBSD. */
-#define AUE_MAC_GET_PID 43128 /* FreeBSD/Darwin. */
-#define AUE_MAC_GET_LINK 43129 /* FreeBSD/Darwin. */
-#define AUE_MAC_SET_LINK 43130 /* FreeBSD/Darwin. */
-#define AUE_MAC_EXECVE 43131 /* FreeBSD/Darwin. */
-#define AUE_GETPATH_FROMFD 43132 /* FreeBSD. */
-#define AUE_GETPATH_FROMADDR 43133 /* FreeBSD. */
-#define AUE_MQ_OPEN 43134 /* FreeBSD. */
-#define AUE_MQ_SETATTR 43135 /* FreeBSD. */
-#define AUE_MQ_TIMEDRECEIVE 43136 /* FreeBSD. */
-#define AUE_MQ_TIMEDSEND 43137 /* FreeBSD. */
-#define AUE_MQ_NOTIFY 43138 /* FreeBSD. */
-#define AUE_MQ_UNLINK 43139 /* FreeBSD. */
-#define AUE_LISTEN 43140 /* FreeBSD/Darwin/Linux. */
-#define AUE_MLOCKALL 43141 /* FreeBSD. */
-#define AUE_MUNLOCKALL 43142 /* FreeBSD. */
-#define AUE_CLOSEFROM 43143 /* FreeBSD. */
-#define AUE_FEXECVE 43144 /* FreeBSD. */
-#define AUE_FACCESSAT 43145 /* FreeBSD. */
-#define AUE_FCHMODAT 43146 /* FreeBSD. */
-#define AUE_LINKAT 43147 /* FreeBSD. */
-#define AUE_MKDIRAT 43148 /* FreeBSD. */
-#define AUE_MKFIFOAT 43149 /* FreeBSD. */
-#define AUE_MKNODAT 43150 /* FreeBSD. */
-#define AUE_READLINKAT 43151 /* FreeBSD. */
-#define AUE_SYMLINKAT 43152 /* FreeBSD. */
-#define AUE_MAC_GETFSSTAT 43153 /* Darwin. */
-#define AUE_MAC_GET_MOUNT 43154 /* Darwin. */
-#define AUE_MAC_GET_LCID 43155 /* Darwin. */
-#define AUE_MAC_GET_LCTX 43156 /* Darwin. */
-#define AUE_MAC_SET_LCTX 43157 /* Darwin. */
-#define AUE_MAC_MOUNT 43158 /* Darwin. */
-#define AUE_GETLCID 43159 /* Darwin. */
-#define AUE_SETLCID 43160 /* Darwin. */
-#define AUE_TASKNAMEFORPID 43161 /* Darwin. */
-#define AUE_ACCESS_EXTENDED 43162 /* Darwin. */
-#define AUE_CHMOD_EXTENDED 43163 /* Darwin. */
-#define AUE_FCHMOD_EXTENDED 43164 /* Darwin. */
-#define AUE_FSTAT_EXTENDED 43165 /* Darwin. */
-#define AUE_LSTAT_EXTENDED 43166 /* Darwin. */
-#define AUE_MKDIR_EXTENDED 43167 /* Darwin. */
-#define AUE_MKFIFO_EXTENDED 43168 /* Darwin. */
-#define AUE_OPEN_EXTENDED 43169 /* Darwin. */
-#define AUE_OPEN_EXTENDED_R 43170 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RC 43171 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RT 43172 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RTC 43173 /* Darwin. */
-#define AUE_OPEN_EXTENDED_W 43174 /* Darwin. */
-#define AUE_OPEN_EXTENDED_WC 43175 /* Darwin. */
-#define AUE_OPEN_EXTENDED_WT 43176 /* Darwin. */
-#define AUE_OPEN_EXTENDED_WTC 43177 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RW 43178 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RWC 43179 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RWT 43180 /* Darwin. */
-#define AUE_OPEN_EXTENDED_RWTC 43181 /* Darwin. */
-#define AUE_STAT_EXTENDED 43182 /* Darwin. */
-#define AUE_UMASK_EXTENDED 43183 /* Darwin. */
-#define AUE_OPENAT 43184 /* FreeBSD. */
-#define AUE_POSIX_OPENPT 43185 /* FreeBSD. */
-#define AUE_CAP_NEW 43186 /* TrustedBSD. */
-#define AUE_CAP_RIGHTS_GET 43187 /* TrustedBSD. */
-#define AUE_CAP_GETRIGHTS AUE_CAP_RIGHTS_GET
-#define AUE_CAP_ENTER 43188 /* TrustedBSD. */
-#define AUE_CAP_GETMODE 43189 /* TrustedBSD. */
-#define AUE_POSIX_SPAWN 43190 /* Darwin. */
-#define AUE_FSGETPATH 43191 /* Darwin. */
-#define AUE_PREAD 43192 /* Darwin/FreeBSD. */
-#define AUE_PWRITE 43193 /* Darwin/FreeBSD. */
-#define AUE_FSCTL 43194 /* Darwin. */
-#define AUE_FFSCTL 43195 /* Darwin. */
-#define AUE_LPATHCONF 43196 /* FreeBSD. */
-#define AUE_PDFORK 43197 /* FreeBSD. */
-#define AUE_PDKILL 43198 /* FreeBSD. */
-#define AUE_PDGETPID 43199 /* FreeBSD. */
-#define AUE_PDWAIT 43200 /* FreeBSD. */
-#define AUE_WAIT6 43201 /* FreeBSD. */
-#define AUE_CAP_RIGHTS_LIMIT 43202 /* TrustedBSD. */
-#define AUE_CAP_IOCTLS_LIMIT 43203 /* TrustedBSD. */
-#define AUE_CAP_IOCTLS_GET 43204 /* TrustedBSD. */
-#define AUE_CAP_FCNTLS_LIMIT 43205 /* TrustedBSD. */
-#define AUE_CAP_FCNTLS_GET 43206 /* TrustedBSD. */
-#define AUE_BINDAT 43207 /* TrustedBSD. */
-#define AUE_CONNECTAT 43208 /* TrustedBSD. */
-#define AUE_CHFLAGSAT 43209 /* FreeBSD-specific. */
-
-/*
- * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the
- * normal Solaris BSM identifiers. _O_ refers to it being an old, or compat
- * interface. In most cases, Darwin has never implemented these system calls
- * but picked up the fields in their system call table from their FreeBSD
- * import. Happily, these have different names than the AUE_O* definitions
- * in Solaris BSM.
- */
-#define AUE_O_CREAT AUE_OPEN_RWTC /* Darwin */
-#define AUE_O_EXECVE AUE_NULL /* Darwin */
-#define AUE_O_SBREAK AUE_NULL /* Darwin */
-#define AUE_O_LSEEK AUE_NULL /* Darwin */
-#define AUE_O_MOUNT AUE_NULL /* Darwin */
-#define AUE_O_UMOUNT AUE_NULL /* Darwin */
-#define AUE_O_STAT AUE_STAT /* Darwin */
-#define AUE_O_LSTAT AUE_LSTAT /* Darwin */
-#define AUE_O_FSTAT AUE_FSTAT /* Darwin */
-#define AUE_O_GETPAGESIZE AUE_NULL /* Darwin */
-#define AUE_O_VREAD AUE_NULL /* Darwin */
-#define AUE_O_VWRITE AUE_NULL /* Darwin */
-#define AUE_O_MMAP AUE_MMAP /* Darwin */
-#define AUE_O_VADVISE AUE_NULL /* Darwin */
-#define AUE_O_VHANGUP AUE_NULL /* Darwin */
-#define AUE_O_VLIMIT AUE_NULL /* Darwin */
-#define AUE_O_WAIT AUE_NULL /* Darwin */
-#define AUE_O_GETHOSTNAME AUE_NULL /* Darwin */
-#define AUE_O_SETHOSTNAME AUE_SYSCTL /* Darwin */
-#define AUE_O_GETDOPT AUE_NULL /* Darwin */
-#define AUE_O_SETDOPT AUE_NULL /* Darwin */
-#define AUE_O_ACCEPT AUE_NULL /* Darwin */
-#define AUE_O_SEND AUE_SENDMSG /* Darwin */
-#define AUE_O_RECV AUE_RECVMSG /* Darwin */
-#define AUE_O_VTIMES AUE_NULL /* Darwin */
-#define AUE_O_SIGVEC AUE_NULL /* Darwin */
-#define AUE_O_SIGBLOCK AUE_NULL /* Darwin */
-#define AUE_O_SIGSETMASK AUE_NULL /* Darwin */
-#define AUE_O_SIGSTACK AUE_NULL /* Darwin */
-#define AUE_O_RECVMSG AUE_RECVMSG /* Darwin */
-#define AUE_O_SENDMSG AUE_SENDMSG /* Darwin */
-#define AUE_O_VTRACE AUE_NULL /* Darwin */
-#define AUE_O_RESUBA AUE_NULL /* Darwin */
-#define AUE_O_RECVFROM AUE_RECVFROM /* Darwin */
-#define AUE_O_SETREUID AUE_SETREUID /* Darwin */
-#define AUE_O_SETREGID AUE_SETREGID /* Darwin */
-#define AUE_O_GETDIRENTRIES AUE_GETDIRENTRIES /* Darwin */
-#define AUE_O_TRUNCATE AUE_TRUNCATE /* Darwin */
-#define AUE_O_FTRUNCATE AUE_FTRUNCATE /* Darwin */
-#define AUE_O_GETPEERNAME AUE_NULL /* Darwin */
-#define AUE_O_GETHOSTID AUE_NULL /* Darwin */
-#define AUE_O_SETHOSTID AUE_NULL /* Darwin */
-#define AUE_O_GETRLIMIT AUE_NULL /* Darwin */
-#define AUE_O_SETRLIMIT AUE_SETRLIMIT /* Darwin */
-#define AUE_O_KILLPG AUE_KILL /* Darwin */
-#define AUE_O_SETQUOTA AUE_NULL /* Darwin */
-#define AUE_O_QUOTA AUE_NULL /* Darwin */
-#define AUE_O_GETSOCKNAME AUE_NULL /* Darwin */
-#define AUE_O_GETDIREENTRIES AUE_GETDIREENTRIES /* Darwin */
-#define AUE_O_ASYNCDAEMON AUE_NULL /* Darwin */
-#define AUE_O_GETDOMAINNAME AUE_NULL /* Darwin */
-#define AUE_O_SETDOMAINNAME AUE_SYSCTL /* Darwin */
-#define AUE_O_PCFS_MOUNT AUE_NULL /* Darwin */
-#define AUE_O_EXPORTFS AUE_NULL /* Darwin */
-#define AUE_O_USTATE AUE_NULL /* Darwin */
-#define AUE_O_WAIT3 AUE_NULL /* Darwin */
-#define AUE_O_RPAUSE AUE_NULL /* Darwin */
-#define AUE_O_GETDENTS AUE_NULL /* Darwin */
-
-/*
- * Possible desired future values based on review of BSD/Darwin system calls.
- */
-#define AUE_ATGETMSG AUE_NULL
-#define AUE_ATPUTMSG AUE_NULL
-#define AUE_ATSOCKET AUE_NULL
-#define AUE_ATPGETREQ AUE_NULL
-#define AUE_ATPGETRSP AUE_NULL
-#define AUE_ATPSNDREQ AUE_NULL
-#define AUE_ATPSNDRSP AUE_NULL
-#define AUE_BSDTHREADCREATE AUE_NULL
-#define AUE_BSDTHREADTERMINATE AUE_NULL
-#define AUE_BSDTHREADREGISTER AUE_NULL
-#define AUE_CHUD AUE_NULL
-#define AUE_CSOPS AUE_NULL
-#define AUE_DUP AUE_NULL
-#define AUE_FDATASYNC AUE_NULL
-#define AUE_FGETATTRLIST AUE_NULL
-#define AUE_FGETXATTR AUE_NULL
-#define AUE_FLISTXATTR AUE_NULL
-#define AUE_FREMOVEXATTR AUE_NULL
-#define AUE_FSETATTRLIST AUE_NULL
-#define AUE_FSETXATTR AUE_NULL
-#define AUE_FSTATFS64 AUE_NULL
-#define AUE_FSTATV AUE_NULL
-#define AUE_FSTAT64 AUE_NULL
-#define AUE_FSTAT64_EXTENDED AUE_NULL
-#define AUE_GCCONTROL AUE_NULL
-#define AUE_GETDIRENTRIES64 AUE_NULL
-#define AUE_GETDTABLESIZE AUE_NULL
-#define AUE_GETEGID AUE_NULL
-#define AUE_GETEUID AUE_NULL
-#define AUE_GETFSSTAT64 AUE_NULL
-#define AUE_GETGID AUE_NULL
-#define AUE_GETGROUPS AUE_NULL
-#define AUE_GETITIMER AUE_NULL
-#define AUE_GETLOGIN AUE_NULL
-#define AUE_GETPEERNAME AUE_NULL
-#define AUE_GETPGID AUE_NULL
-#define AUE_GETPGRP AUE_NULL
-#define AUE_GETPID AUE_NULL
-#define AUE_GETPPID AUE_NULL
-#define AUE_GETPRIORITY AUE_NULL
-#define AUE_GETRLIMIT AUE_NULL
-#define AUE_GETRUSAGE AUE_NULL
-#define AUE_GETSGROUPS AUE_NULL
-#define AUE_GETSID AUE_NULL
-#define AUE_GETSOCKNAME AUE_NULL
-#define AUE_GETTIMEOFDAY AUE_NULL
-#define AUE_GETTID AUE_NULL
-#define AUE_GETUID AUE_NULL
-#define AUE_GETSOCKOPT AUE_NULL
-#define AUE_GETWGROUPS AUE_NULL
-#define AUE_GETXATTR AUE_NULL
-#define AUE_IDENTITYSVC AUE_NULL
-#define AUE_INITGROUPS AUE_NULL
-#define AUE_IOPOLICYSYS AUE_NULL
-#define AUE_ISSETUGID AUE_NULL
-#define AUE_LIOLISTIO AUE_NULL
-#define AUE_LISTXATTR AUE_NULL
-#define AUE_LSTATV AUE_NULL
-#define AUE_LSTAT64 AUE_NULL
-#define AUE_LSTAT64_EXTENDED AUE_NULL
-#define AUE_MADVISE AUE_NULL
-#define AUE_MINCORE AUE_NULL
-#define AUE_MKCOMPLEX AUE_NULL
-#define AUE_MODWATCH AUE_NULL
-#define AUE_MSGCL AUE_NULL
-#define AUE_MSYNC AUE_NULL
-#define AUE_PREADV AUE_NULL
-#define AUE_PROCINFO AUE_NULL
-#define AUE_PTHREADCANCELED AUE_NULL
-#define AUE_PTHREADCHDIR AUE_NULL
-#define AUE_PTHREADCONDBROADCAST AUE_NULL
-#define AUE_PTHREADCONDDESTORY AUE_NULL
-#define AUE_PTHREADCONDINIT AUE_NULL
-#define AUE_PTHREADCONDSIGNAL AUE_NULL
-#define AUE_PTHREADCONDWAIT AUE_NULL
-#define AUE_PTHREADFCHDIR AUE_NULL
-#define AUE_PTHREADMARK AUE_NULL
-#define AUE_PTHREADMUTEXDESTROY AUE_NULL
-#define AUE_PTHREADMUTEXINIT AUE_NULL
-#define AUE_PTHREADMUTEXTRYLOCK AUE_NULL
-#define AUE_PTHREADMUTEXUNLOCK AUE_NULL
-#define AUE_PWRITEV AUE_NULL
-#define AUE_REMOVEXATTR AUE_NULL
-#define AUE_SBRK AUE_NULL
-#define AUE_SELECT AUE_NULL
-#define AUE_SEMDESTROY AUE_NULL
-#define AUE_SEMGETVALUE AUE_NULL
-#define AUE_SEMINIT AUE_NULL
-#define AUE_SEMPOST AUE_NULL
-#define AUE_SEMTRYWAIT AUE_NULL
-#define AUE_SEMWAIT AUE_NULL
-#define AUE_SEMWAITSIGNAL AUE_NULL
-#define AUE_SETITIMER AUE_NULL
-#define AUE_SETSGROUPS AUE_NULL
-#define AUE_SETTID AUE_NULL
-#define AUE_SETTIDWITHPID AUE_NULL
-#define AUE_SETWGROUPS AUE_NULL
-#define AUE_SETXATTR AUE_NULL
-#define AUE_SHAREDREGIONCHECK AUE_NULL
-#define AUE_SHAREDREGIONMAP AUE_NULL
-#define AUE_SIGACTION AUE_NULL
-#define AUE_SIGALTSTACK AUE_NULL
-#define AUE_SIGPENDING AUE_NULL
-#define AUE_SIGPROCMASK AUE_NULL
-#define AUE_SIGRETURN AUE_NULL
-#define AUE_SIGSUSPEND AUE_NULL
-#define AUE_SIGWAIT AUE_NULL
-#define AUE_SSTK AUE_NULL
-#define AUE_STACKSNAPSHOT AUE_NULL
-#define AUE_STATFS64 AUE_NULL
-#define AUE_STATV AUE_NULL
-#define AUE_STAT64 AUE_NULL
-#define AUE_STAT64_EXTENDED AUE_NULL
-#define AUE_SYNC AUE_NULL
-#define AUE_SYSCALL AUE_NULL
-#define AUE_TABLE AUE_NULL
-#define AUE_VMPRESSUREMONITOR AUE_NULL
-#define AUE_WAITEVENT AUE_NULL
-#define AUE_WAITID AUE_NULL
-#define AUE_WATCHEVENT AUE_NULL
-#define AUE_WORKQOPEN AUE_NULL
-#define AUE_WORKQOPS AUE_NULL
-
-#endif /* !_BSM_AUDIT_KEVENTS_H_ */
diff --git a/include.new/bsm/audit_record.h b/include.new/bsm/audit_record.h
deleted file mode 100644
index c2fc3b6..0000000
--- a/include.new/bsm/audit_record.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/*-
- * Copyright (c) 2005-2009 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_record.h#10
- * $FreeBSD: releng/10.2/sys/bsm/audit_record.h 255219 2013-09-05 00:09:56Z pjd $
- */
-
-#ifndef _BSM_AUDIT_RECORD_H_
-#define _BSM_AUDIT_RECORD_H_
-
-#include /* struct timeval */
-#include /* cap_rights_t */
-
-/*
- * Token type identifiers.
- */
-#define AUT_INVALID 0x00
-#define AUT_OTHER_FILE32 0x11
-#define AUT_OHEADER 0x12
-#define AUT_TRAILER 0x13
-#define AUT_HEADER32 0x14
-#define AUT_HEADER32_EX 0x15
-#define AUT_DATA 0x21
-#define AUT_IPC 0x22
-#define AUT_PATH 0x23
-#define AUT_SUBJECT32 0x24
-#define AUT_XATPATH 0x25
-#define AUT_PROCESS32 0x26
-#define AUT_RETURN32 0x27
-#define AUT_TEXT 0x28
-#define AUT_OPAQUE 0x29
-#define AUT_IN_ADDR 0x2a
-#define AUT_IP 0x2b
-#define AUT_IPORT 0x2c
-#define AUT_ARG32 0x2d
-#define AUT_SOCKET 0x2e
-#define AUT_SEQ 0x2f
-#define AUT_ACL 0x30
-#define AUT_ATTR 0x31
-#define AUT_IPC_PERM 0x32
-#define AUT_LABEL 0x33
-#define AUT_GROUPS 0x34
-#define AUT_ACE 0x35
-#define AUT_PRIV 0x38
-#define AUT_UPRIV 0x39
-#define AUT_LIAISON 0x3a
-#define AUT_NEWGROUPS 0x3b
-#define AUT_EXEC_ARGS 0x3c
-#define AUT_EXEC_ENV 0x3d
-#define AUT_ATTR32 0x3e
-#define AUT_UNAUTH 0x3f
-#define AUT_XATOM 0x40
-#define AUT_XOBJ 0x41
-#define AUT_XPROTO 0x42
-#define AUT_XSELECT 0x43
-#define AUT_XCOLORMAP 0x44
-#define AUT_XCURSOR 0x45
-#define AUT_XFONT 0x46
-#define AUT_XGC 0x47
-#define AUT_XPIXMAP 0x48
-#define AUT_XPROPERTY 0x49
-#define AUT_XWINDOW 0x4a
-#define AUT_XCLIENT 0x4b
-#define AUT_CMD 0x51
-#define AUT_EXIT 0x52
-#define AUT_ZONENAME 0x60
-#define AUT_HOST 0x70
-#define AUT_ARG64 0x71
-#define AUT_RETURN64 0x72
-#define AUT_ATTR64 0x73
-#define AUT_HEADER64 0x74
-#define AUT_SUBJECT64 0x75
-#define AUT_PROCESS64 0x77
-#define AUT_OTHER_FILE64 0x78
-#define AUT_HEADER64_EX 0x79
-#define AUT_SUBJECT32_EX 0x7a
-#define AUT_PROCESS32_EX 0x7b
-#define AUT_SUBJECT64_EX 0x7c
-#define AUT_PROCESS64_EX 0x7d
-#define AUT_IN_ADDR_EX 0x7e
-#define AUT_SOCKET_EX 0x7f
-
-/*
- * Pre-64-bit BSM, 32-bit tokens weren't explicitly named as '32'. We have
- * compatibility defines.
- */
-#define AUT_HEADER AUT_HEADER32
-#define AUT_ARG AUT_ARG32
-#define AUT_RETURN AUT_RETURN32
-#define AUT_SUBJECT AUT_SUBJECT32
-#define AUT_PROCESS AUT_PROCESS32
-#define AUT_OTHER_FILE AUT_OTHER_FILE32
-
-/*
- * The values for the following token ids are not defined by BSM.
- *
- * XXXRW: Not sure how to handle these in OpenBSM yet, but I'll give them
- * names more consistent with Sun's BSM. These originally came from Apple's
- * BSM.
- */
-#define AUT_SOCKINET32 0x80 /* XXX */
-#define AUT_SOCKINET128 0x81 /* XXX */
-#define AUT_SOCKUNIX 0x82 /* XXX */
-
-#define AUT_RIGHTS 0x83
-
-/* print values for the arbitrary token */
-#define AUP_BINARY 0
-#define AUP_OCTAL 1
-#define AUP_DECIMAL 2
-#define AUP_HEX 3
-#define AUP_STRING 4
-
-/* data-types for the arbitrary token */
-#define AUR_BYTE 0
-#define AUR_CHAR AUR_BYTE
-#define AUR_SHORT 1
-#define AUR_INT32 2
-#define AUR_INT AUR_INT32
-#define AUR_INT64 3
-
-/* ... and their sizes */
-#define AUR_BYTE_SIZE sizeof(u_char)
-#define AUR_CHAR_SIZE AUR_BYTE_SIZE
-#define AUR_SHORT_SIZE sizeof(uint16_t)
-#define AUR_INT32_SIZE sizeof(uint32_t)
-#define AUR_INT_SIZE AUR_INT32_SIZE
-#define AUR_INT64_SIZE sizeof(uint64_t)
-
-/* Modifiers for the header token */
-#define PAD_NOTATTR 0x4000 /* nonattributable event */
-#define PAD_FAILURE 0x8000 /* fail audit event */
-
-#define AUDIT_MAX_GROUPS 16
-
-/*
- * A number of BSM versions are floating around and defined. Here are
- * constants for them. OpenBSM uses the same token types, etc, used in the
- * Solaris BSM version, but has a separate version number in order to
- * identify a potentially different event identifier name space.
- */
-#define AUDIT_HEADER_VERSION_OLDDARWIN 1 /* In retrospect, a mistake. */
-#define AUDIT_HEADER_VERSION_SOLARIS 2
-#define AUDIT_HEADER_VERSION_TSOL25 3
-#define AUDIT_HEADER_VERSION_TSOL 4
-#define AUDIT_HEADER_VERSION_OPENBSM10 10
-#define AUDIT_HEADER_VERSION_OPENBSM11 11
-#define AUDIT_HEADER_VERSION_OPENBSM AUDIT_HEADER_VERSION_OPENBSM11
-
-#define AUT_TRAILER_MAGIC 0xb105
-
-/* BSM library calls */
-
-__BEGIN_DECLS
-
-struct in_addr;
-struct in6_addr;
-struct ip;
-struct ipc_perm;
-struct kevent;
-struct sockaddr;
-struct sockaddr_in;
-struct sockaddr_in6;
-struct sockaddr_un;
-#if defined(_KERNEL) || defined(KERNEL)
-struct vnode_au_info;
-#endif
-
-int au_open(void);
-int au_write(int d, token_t *m);
-int au_close(int d, int keep, short event);
-int au_close_buffer(int d, short event, u_char *buffer, size_t *buflen);
-int au_close_token(token_t *tok, u_char *buffer, size_t *buflen);
-
-token_t *au_to_file(const char *file, struct timeval tm);
-
-token_t *au_to_header32_tm(int rec_size, au_event_t e_type, au_emod_t e_mod,
- struct timeval tm);
-token_t *au_to_header32_ex_tm(int rec_size, au_event_t e_type, au_emod_t e_mod,
- struct timeval tm, struct auditinfo_addr *aia);
-token_t *au_to_header64_tm(int rec_size, au_event_t e_type, au_emod_t e_mod,
- struct timeval tm);
-#if !defined(KERNEL) && !defined(_KERNEL)
-token_t *au_to_header(int rec_size, au_event_t e_type, au_emod_t e_mod);
-token_t *au_to_header_ex(int rec_size, au_event_t e_type, au_emod_t e_mod);
-token_t *au_to_header32(int rec_size, au_event_t e_type, au_emod_t e_mod);
-token_t *au_to_header64(int rec_size, au_event_t e_type, au_emod_t e_mod);
-token_t *au_to_header32_ex(int rec_size, au_event_t e_type, au_emod_t e_mod);
-#endif
-
-token_t *au_to_me(void);
-token_t *au_to_arg(char n, const char *text, uint32_t v);
-token_t *au_to_arg32(char n, const char *text, uint32_t v);
-token_t *au_to_arg64(char n, const char *text, uint64_t v);
-
-#if defined(_KERNEL) || defined(KERNEL)
-token_t *au_to_attr(struct vnode_au_info *vni);
-token_t *au_to_attr32(struct vnode_au_info *vni);
-token_t *au_to_attr64(struct vnode_au_info *vni);
-#endif
-
-token_t *au_to_data(char unit_print, char unit_type, char unit_count,
- const char *p);
-token_t *au_to_exit(int retval, int err);
-token_t *au_to_groups(int *groups);
-token_t *au_to_newgroups(uint16_t n, gid_t *groups);
-token_t *au_to_in_addr(struct in_addr *internet_addr);
-token_t *au_to_in_addr_ex(struct in6_addr *internet_addr);
-token_t *au_to_ip(struct ip *ip);
-token_t *au_to_ipc(char type, int id);
-token_t *au_to_ipc_perm(struct ipc_perm *perm);
-token_t *au_to_iport(uint16_t iport);
-token_t *au_to_opaque(const char *data, uint16_t bytes);
-token_t *au_to_path(const char *path);
-token_t *au_to_privset(char *privtypestr, char *privstr);
-token_t *au_to_process(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
-token_t *au_to_process32(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
-token_t *au_to_process64(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
-token_t *au_to_process_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
-token_t *au_to_process32_ex(au_id_t auid, uid_t euid, gid_t egid,
- uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid,
- au_tid_addr_t *tid);
-token_t *au_to_process64_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
-token_t *au_to_rights(cap_rights_t *rightsp);
-token_t *au_to_return(char status, uint32_t ret);
-token_t *au_to_return32(char status, uint32_t ret);
-token_t *au_to_return64(char status, uint64_t ret);
-token_t *au_to_seq(long audit_count);
-token_t *au_to_socket_ex(u_short so_domain, u_short so_type,
- struct sockaddr *sa_local, struct sockaddr *sa_remote);
-token_t *au_to_sock_inet(struct sockaddr_in *so);
-token_t *au_to_sock_inet32(struct sockaddr_in *so);
-token_t *au_to_sock_inet128(struct sockaddr_in6 *so);
-token_t *au_to_sock_unix(struct sockaddr_un *so);
-token_t *au_to_subject(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
-token_t *au_to_subject32(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
-token_t *au_to_subject64(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
-token_t *au_to_subject_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
-token_t *au_to_subject32_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
-token_t *au_to_subject64_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
- gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
-#if defined(_KERNEL) || defined(KERNEL)
-token_t *au_to_exec_args(char *args, int argc);
-token_t *au_to_exec_env(char *envs, int envc);
-#else
-token_t *au_to_exec_args(char **argv);
-token_t *au_to_exec_env(char **envp);
-#endif
-token_t *au_to_text(const char *text);
-token_t *au_to_kevent(struct kevent *kev);
-token_t *au_to_trailer(int rec_size);
-token_t *au_to_upriv(char sorf, char *priv);
-token_t *au_to_zonename(const char *zonename);
-
-/*
- * BSM library routines for converting between local and BSM constant spaces.
- */
-int au_bsm_to_domain(u_short bsm_domain, int *local_domainp);
-int au_bsm_to_errno(u_char bsm_error, int *errorp);
-int au_bsm_to_fcntl_cmd(u_short bsm_fcntl_cmd, int *local_fcntl_cmdp);
-int au_bsm_to_socket_type(u_short bsm_socket_type,
- int *local_socket_typep);
-u_short au_domain_to_bsm(int local_domain);
-u_char au_errno_to_bsm(int local_errno);
-u_short au_fcntl_cmd_to_bsm(int local_fcntl_command);
-u_short au_socket_type_to_bsm(int local_socket_type);
-
-__END_DECLS
-
-#endif /* ! _BSM_AUDIT_RECORD_H_ */
diff --git a/include.new/bsm/audit_socket_type.h b/include.new/bsm/audit_socket_type.h
deleted file mode 100644
index b932e10..0000000
--- a/include.new/bsm/audit_socket_type.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c) 2008 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_socket_type.h#1
- * $FreeBSD: releng/10.2/sys/bsm/audit_socket_type.h 187214 2009-01-14 10:44:16Z rwatson $
- */
-
-#ifndef _BSM_AUDIT_SOCKET_TYPE_H_
-#define _BSM_AUDIT_SOCKET_TYPE_H_
-
-/*
- * BSM socket type constants.
- */
-#define BSM_SOCK_DGRAM 1
-#define BSM_SOCK_STREAM 2
-#define BSM_SOCK_RAW 4
-#define BSM_SOCK_RDM 5
-#define BSM_SOCK_SEQPACKET 6
-
-#define BSM_SOCK_UNKNOWN 500
-
-#endif /* !_BSM_AUDIT_SOCKET_TYPE_H_ */
diff --git a/include.new/bsm/audit_uevents.h b/include.new/bsm/audit_uevents.h
deleted file mode 100644
index f71797b..0000000
--- a/include.new/bsm/audit_uevents.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*-
- * Copyright (c) 2004-2008 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_uevents.h#11 $
- */
-
-#ifndef _BSM_AUDIT_UEVENTS_H_
-#define _BSM_AUDIT_UEVENTS_H_
-
-/*
- * Solaris userspace events.
- */
-#define AUE_at_create 6144
-#define AUE_at_delete 6145
-#define AUE_at_perm 6146
-#define AUE_cron_invoke 6147
-#define AUE_crontab_create 6148
-#define AUE_crontab_delete 6149
-#define AUE_crontab_perm 6150
-#define AUE_inetd_connect 6151
-#define AUE_login 6152
-#define AUE_logout 6153
-#define AUE_telnet 6154
-#define AUE_rlogin 6155
-#define AUE_mountd_mount 6156
-#define AUE_mountd_umount 6157
-#define AUE_rshd 6158
-#define AUE_su 6159
-#define AUE_halt 6160
-#define AUE_reboot 6161
-#define AUE_rexecd 6162
-#define AUE_passwd 6163
-#define AUE_rexd 6164
-#define AUE_ftpd 6165
-#define AUE_init 6166
-#define AUE_uadmin 6167
-#define AUE_shutdown 6168
-#define AUE_poweroff 6169
-#define AUE_crontab_mod 6170
-#define AUE_ftpd_logout 6171
-#define AUE_ssh 6172
-#define AUE_role_login 6173
-#define AUE_prof_cmd 6180
-#define AUE_filesystem_add 6181
-#define AUE_filesystem_delete 6182
-#define AUE_filesystem_modify 6183
-#define AUE_allocate_succ 6200
-#define AUE_allocate_fail 6201
-#define AUE_deallocate_succ 6202
-#define AUE_deallocate_fail 6203
-#define AUE_listdevice_succ 6205
-#define AUE_listdevice_fail 6206
-#define AUE_create_user 6207
-#define AUE_modify_user 6208
-#define AUE_delete_user 6209
-#define AUE_disable_user 6210
-#define AUE_enable_user 6211
-#define AUE_newgrp_login 6212
-#define AUE_admin_authentication 6213
-#define AUE_kadmind_auth 6214
-#define AUE_kadmind_unauth 6215
-#define AUE_krb5kdc_as_req 6216
-#define AUE_krb5kdc_tgs_req 6217
-#define AUE_krb5kdc_tgs_req_2ndtktmm 6218
-#define AUE_krb5kdc_tgs_req_alt_tgt 6219
-
-/*
- * Historic Darwin use of the low event numbering space, which collided with
- * the Solaris event space. Now obsoleted and new, higher, event numbers
- * assigned to make it easier to interpret Solaris events using the OpenBSM
- * tools.
- */
-#define AUE_DARWIN_audit_startup 6171
-#define AUE_DARWIN_audit_shutdown 6172
-#define AUE_DARWIN_sudo 6300
-#define AUE_DARWIN_modify_password 6501
-#define AUE_DARWIN_create_group 6511
-#define AUE_DARWIN_delete_group 6512
-#define AUE_DARWIN_modify_group 6513
-#define AUE_DARWIN_add_to_group 6514
-#define AUE_DARWIN_remove_from_group 6515
-#define AUE_DARWIN_revoke_obj 6521
-#define AUE_DARWIN_lw_login 6600
-#define AUE_DARWIN_lw_logout 6601
-#define AUE_DARWIN_auth_user 7000
-#define AUE_DARWIN_ssconn 7001
-#define AUE_DARWIN_ssauthorize 7002
-#define AUE_DARWIN_ssauthint 7003
-
-/*
- * Historic/third-party appliation allocations of event idenfiers.
- */
-#define AUE_openssh 32800
-
-/*
- * OpenBSM-managed application event space.
- */
-#define AUE_audit_startup 45000 /* Darwin-specific. */
-#define AUE_audit_shutdown 45001 /* Darwin-specific. */
-#define AUE_modify_password 45014 /* Darwin-specific. */
-#define AUE_create_group 45015 /* Darwin-specific. */
-#define AUE_delete_group 45016 /* Darwin-specific. */
-#define AUE_modify_group 45017 /* Darwin-specific. */
-#define AUE_add_to_group 45018 /* Darwin-specific. */
-#define AUE_remove_from_group 45019 /* Darwin-specific. */
-#define AUE_revoke_obj 45020 /* Darwin-specific. */
-#define AUE_lw_login 45021 /* Darwin-specific. */
-#define AUE_lw_logout 45022 /* Darwin-specific. */
-#define AUE_auth_user 45023 /* Darwin-specific. */
-#define AUE_ssconn 45024 /* Darwin-specific. */
-#define AUE_ssauthorize 45025 /* Darwin-specific. */
-#define AUE_ssauthint 45026 /* Darwin-specific. */
-#define AUE_calife 45027 /* OpenBSM-allocated. */
-#define AUE_sudo 45028 /* OpenBSM-allocated. */
-#define AUE_audit_recovery 45029 /* OpenBSM-allocated. */
-#define AUE_ssauthmech 45030 /* Darwin-specific. */
-
-#endif /* !_BSM_AUDIT_UEVENTS_H_ */
diff --git a/include.new/bsm/libbsm.h b/include.new/bsm/libbsm.h
deleted file mode 100644
index b678a23..0000000
--- a/include.new/bsm/libbsm.h
+++ /dev/null
@@ -1,1342 +0,0 @@
-/*-
- * Copyright (c) 2004-2009 Apple Inc.
- * 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 Apple Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- *
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#50 $
- */
-
-#ifndef _LIBBSM_H_
-#define _LIBBSM_H_
-
-/*
- * NB: definitions, etc., marked with "OpenSSH compatibility" were introduced
- * solely to allow OpenSSH to compile; Darwin/Apple code should not use them.
- */
-
-#include
-#include
-
-#include /* Required for audit.h. */
-#include /* Required for clock_t on Linux. */
-
-#include
-#include
-
-#include
-
-#ifdef __APPLE__
-#include /* audit_token_t */
-#endif
-
-/*
- * Size parsed token vectors for execve(2) arguments and environmental
- * variables. Note: changing these sizes affects the ABI of the token
- * structure, and as the token structure is often placed in the caller stack,
- * this is undesirable.
- */
-#define AUDIT_MAX_ARGS 128
-#define AUDIT_MAX_ENV 128
-
-/*
- * Arguments to au_preselect(3).
- */
-#define AU_PRS_USECACHE 0
-#define AU_PRS_REREAD 1
-
-#define AU_PRS_SUCCESS 1
-#define AU_PRS_FAILURE 2
-#define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE)
-
-#define AUDIT_EVENT_FILE "/etc/security/audit_event"
-#define AUDIT_CLASS_FILE "/etc/security/audit_class"
-#define AUDIT_CONTROL_FILE "/etc/security/audit_control"
-#define AUDIT_USER_FILE "/etc/security/audit_user"
-
-#define DIR_CONTROL_ENTRY "dir"
-#define DIST_CONTROL_ENTRY "dist"
-#define FILESZ_CONTROL_ENTRY "filesz"
-#define FLAGS_CONTROL_ENTRY "flags"
-#define HOST_CONTROL_ENTRY "host"
-#define MINFREE_CONTROL_ENTRY "minfree"
-#define NA_CONTROL_ENTRY "naflags"
-#define POLICY_CONTROL_ENTRY "policy"
-#define EXPIRE_AFTER_CONTROL_ENTRY "expire-after"
-
-#define AU_CLASS_NAME_MAX 8
-#define AU_CLASS_DESC_MAX 72
-#define AU_EVENT_NAME_MAX 30
-#define AU_EVENT_DESC_MAX 50
-#define AU_USER_NAME_MAX 50
-#define AU_LINE_MAX 256
-#define MAX_AUDITSTRING_LEN 256
-#define BSM_TEXTBUFSZ MAX_AUDITSTRING_LEN /* OpenSSH compatibility */
-
-/*
- * Arguments to au_close(3).
- */
-#define AU_TO_NO_WRITE 0 /* Abandon audit record. */
-#define AU_TO_WRITE 1 /* Commit audit record. */
-
-/*
- * Output format flags for au_print_flags_tok().
- */
-#define AU_OFLAG_NONE 0x0000 /* Default form. */
-#define AU_OFLAG_RAW 0x0001 /* Raw, numeric form. */
-#define AU_OFLAG_SHORT 0x0002 /* Short form. */
-#define AU_OFLAG_XML 0x0004 /* XML form. */
-#define AU_OFLAG_NORESOLVE 0x0008 /* No user/group name resolution. */
-
-__BEGIN_DECLS
-struct au_event_ent {
- au_event_t ae_number;
- char *ae_name;
- char *ae_desc;
- au_class_t ae_class;
-};
-typedef struct au_event_ent au_event_ent_t;
-
-struct au_class_ent {
- char *ac_name;
- au_class_t ac_class;
- char *ac_desc;
-};
-typedef struct au_class_ent au_class_ent_t;
-
-struct au_user_ent {
- char *au_name;
- au_mask_t au_always;
- au_mask_t au_never;
-};
-typedef struct au_user_ent au_user_ent_t;
-__END_DECLS
-
-#define ADD_TO_MASK(m, c, sel) do { \
- if (sel & AU_PRS_SUCCESS) \
- (m)->am_success |= c; \
- if (sel & AU_PRS_FAILURE) \
- (m)->am_failure |= c; \
-} while (0)
-
-#define SUB_FROM_MASK(m, c, sel) do { \
- if (sel & AU_PRS_SUCCESS) \
- (m)->am_success &= ((m)->am_success ^ c); \
- if (sel & AU_PRS_FAILURE) \
- (m)->am_failure &= ((m)->am_failure ^ c); \
-} while (0)
-
-#define ADDMASK(m, v) do { \
- (m)->am_success |= (v)->am_success; \
- (m)->am_failure |= (v)->am_failure; \
-} while(0)
-
-#define SUBMASK(m, v) do { \
- (m)->am_success &= ((m)->am_success ^ (v)->am_success); \
- (m)->am_failure &= ((m)->am_failure ^ (v)->am_failure); \
-} while(0)
-
-__BEGIN_DECLS
-
-typedef struct au_tid32 {
- uint32_t port;
- uint32_t addr;
-} au_tid32_t;
-
-typedef struct au_tid64 {
- u_int64_t port;
- uint32_t addr;
-} au_tid64_t;
-
-typedef struct au_tidaddr32 {
- uint32_t port;
- uint32_t type;
- uint32_t addr[4];
-} au_tidaddr32_t;
-
-typedef struct au_tidaddr64 {
- u_int64_t port;
- uint32_t type;
- uint32_t addr[4];
-} au_tidaddr64_t;
-
-/*
- * argument # 1 byte
- * argument value 4 bytes/8 bytes (32-bit/64-bit value)
- * text length 2 bytes
- * text N bytes + 1 terminating NULL byte
- */
-typedef struct {
- u_char no;
- uint32_t val;
- u_int16_t len;
- char *text;
-} au_arg32_t;
-
-typedef struct {
- u_char no;
- u_int64_t val;
- u_int16_t len;
- char *text;
-} au_arg64_t;
-
-/*
- * how to print 1 byte
- * basic unit 1 byte
- * unit count 1 byte
- * data items (depends on basic unit)
- */
-typedef struct {
- u_char howtopr;
- u_char bu;
- u_char uc;
- u_char *data;
-} au_arb_t;
-
-/*
- * file access mode 4 bytes
- * owner user ID 4 bytes
- * owner group ID 4 bytes
- * file system ID 4 bytes
- * node ID 8 bytes
- * device 4 bytes/8 bytes (32-bit/64-bit)
- */
-typedef struct {
- uint32_t mode;
- uint32_t uid;
- uint32_t gid;
- uint32_t fsid;
- u_int64_t nid;
- uint32_t dev;
-} au_attr32_t;
-
-typedef struct {
- uint32_t mode;
- uint32_t uid;
- uint32_t gid;
- uint32_t fsid;
- u_int64_t nid;
- u_int64_t dev;
-} au_attr64_t;
-
-/*
- * count 4 bytes
- * text count null-terminated string(s)
- */
-typedef struct {
- uint32_t count;
- char *text[AUDIT_MAX_ARGS];
-} au_execarg_t;
-
-/*
- * count 4 bytes
- * text count null-terminated string(s)
- */
-typedef struct {
- uint32_t count;
- char *text[AUDIT_MAX_ENV];
-} au_execenv_t;
-
-/*
- * status 4 bytes
- * return value 4 bytes
- */
-typedef struct {
- uint32_t status;
- uint32_t ret;
-} au_exit_t;
-
-/*
- * seconds of time 4 bytes
- * milliseconds of time 4 bytes
- * file name length 2 bytes
- * file pathname N bytes + 1 terminating NULL byte
- */
-typedef struct {
- uint32_t s;
- uint32_t ms;
- u_int16_t len;
- char *name;
-} au_file_t;
-
-
-/*
- * number groups 2 bytes
- * group list N * 4 bytes
- */
-typedef struct {
- u_int16_t no;
- uint32_t list[AUDIT_MAX_GROUPS];
-} au_groups_t;
-
-/*
- * record byte count 4 bytes
- * version # 1 byte [2]
- * event type 2 bytes
- * event modifier 2 bytes
- * seconds of time 4 bytes/8 bytes (32-bit/64-bit value)
- * milliseconds of time 4 bytes/8 bytes (32-bit/64-bit value)
- */
-typedef struct {
- uint32_t size;
- u_char version;
- u_int16_t e_type;
- u_int16_t e_mod;
- uint32_t s;
- uint32_t ms;
-} au_header32_t;
-
-/*
- * record byte count 4 bytes
- * version # 1 byte [2]
- * event type 2 bytes
- * event modifier 2 bytes
- * address type/length 1 byte (XXX: actually, 4 bytes)
- * machine address 4 bytes/16 bytes (IPv4/IPv6 address)
- * seconds of time 4 bytes/8 bytes (32/64-bits)
- * nanoseconds of time 4 bytes/8 bytes (32/64-bits)
- */
-typedef struct {
- uint32_t size;
- u_char version;
- u_int16_t e_type;
- u_int16_t e_mod;
- uint32_t ad_type;
- uint32_t addr[4];
- uint32_t s;
- uint32_t ms;
-} au_header32_ex_t;
-
-typedef struct {
- uint32_t size;
- u_char version;
- u_int16_t e_type;
- u_int16_t e_mod;
- u_int64_t s;
- u_int64_t ms;
-} au_header64_t;
-
-typedef struct {
- uint32_t size;
- u_char version;
- u_int16_t e_type;
- u_int16_t e_mod;
- uint32_t ad_type;
- uint32_t addr[4];
- u_int64_t s;
- u_int64_t ms;
-} au_header64_ex_t;
-
-/*
- * internet address 4 bytes
- */
-typedef struct {
- uint32_t addr;
-} au_inaddr_t;
-
-/*
- * type 4 bytes
- * internet address 16 bytes
- */
-typedef struct {
- uint32_t type;
- uint32_t addr[4];
-} au_inaddr_ex_t;
-
-/*
- * version and ihl 1 byte
- * type of service 1 byte
- * length 2 bytes
- * id 2 bytes
- * offset 2 bytes
- * ttl 1 byte
- * protocol 1 byte
- * checksum 2 bytes
- * source address 4 bytes
- * destination address 4 bytes
- */
-typedef struct {
- u_char version;
- u_char tos;
- u_int16_t len;
- u_int16_t id;
- u_int16_t offset;
- u_char ttl;
- u_char prot;
- u_int16_t chksm;
- uint32_t src;
- uint32_t dest;
-} au_ip_t;
-
-/*
- * object ID type 1 byte
- * object ID 4 bytes
- */
-typedef struct {
- u_char type;
- uint32_t id;
-} au_ipc_t;
-
-/*
- * owner user ID 4 bytes
- * owner group ID 4 bytes
- * creator user ID 4 bytes
- * creator group ID 4 bytes
- * access mode 4 bytes
- * slot sequence # 4 bytes
- * key 4 bytes
- */
-typedef struct {
- uint32_t uid;
- uint32_t gid;
- uint32_t puid;
- uint32_t pgid;
- uint32_t mode;
- uint32_t seq;
- uint32_t key;
-} au_ipcperm_t;
-
-/*
- * port IP address 2 bytes
- */
-typedef struct {
- u_int16_t port;
-} au_iport_t;
-
-/*
- * length 2 bytes
- * data length bytes
- */
-typedef struct {
- u_int16_t size;
- char *data;
-} au_opaque_t;
-
-/*
- * path length 2 bytes
- * path N bytes + 1 terminating NULL byte
- */
-typedef struct {
- u_int16_t len;
- char *path;
-} au_path_t;
-
-/*
- * audit ID 4 bytes
- * effective user ID 4 bytes
- * effective group ID 4 bytes
- * real user ID 4 bytes
- * real group ID 4 bytes
- * process ID 4 bytes
- * session ID 4 bytes
- * terminal ID
- * port ID 4 bytes/8 bytes (32-bit/64-bit value)
- * machine address 4 bytes
- */
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tid32_t tid;
-} au_proc32_t;
-
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tid64_t tid;
-} au_proc64_t;
-
-/*
- * audit ID 4 bytes
- * effective user ID 4 bytes
- * effective group ID 4 bytes
- * real user ID 4 bytes
- * real group ID 4 bytes
- * process ID 4 bytes
- * session ID 4 bytes
- * terminal ID
- * port ID 4 bytes/8 bytes (32-bit/64-bit value)
- * type 4 bytes
- * machine address 16 bytes
- */
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tidaddr32_t tid;
-} au_proc32ex_t;
-
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tidaddr64_t tid;
-} au_proc64ex_t;
-
-/*
- * error status 1 byte
- * return value 4 bytes/8 bytes (32-bit/64-bit value)
- */
-typedef struct {
- u_char status;
- uint32_t ret;
-} au_ret32_t;
-
-typedef struct {
- u_char err;
- u_int64_t val;
-} au_ret64_t;
-
-/*
- * sequence number 4 bytes
- */
-typedef struct {
- uint32_t seqno;
-} au_seq_t;
-
-/*
- * socket type 2 bytes
- * local port 2 bytes
- * local Internet address 4 bytes
- * remote port 2 bytes
- * remote Internet address 4 bytes
- */
-typedef struct {
- u_int16_t type;
- u_int16_t l_port;
- uint32_t l_addr;
- u_int16_t r_port;
- uint32_t r_addr;
-} au_socket_t;
-
-/*
- * socket type 2 bytes
- * local port 2 bytes
- * address type/length 4 bytes
- * local Internet address 4 bytes/16 bytes (IPv4/IPv6 address)
- * remote port 4 bytes
- * address type/length 4 bytes
- * remote Internet address 4 bytes/16 bytes (IPv4/IPv6 address)
- */
-typedef struct {
- u_int16_t domain;
- u_int16_t type;
- u_int16_t atype;
- u_int16_t l_port;
- uint32_t l_addr[4];
- uint32_t r_port;
- uint32_t r_addr[4];
-} au_socket_ex32_t;
-
-/*
- * socket family 2 bytes
- * local port 2 bytes
- * socket address 4 bytes/16 bytes (IPv4/IPv6 address)
- */
-typedef struct {
- u_int16_t family;
- u_int16_t port;
- uint32_t addr[4];
-} au_socketinet_ex32_t;
-
-typedef struct {
- u_int16_t family;
- u_int16_t port;
- uint32_t addr;
-} au_socketinet32_t;
-
-/*
- * socket family 2 bytes
- * path 104 bytes
- */
-typedef struct {
- u_int16_t family;
- char path[104];
-} au_socketunix_t;
-
-/*
- * audit ID 4 bytes
- * effective user ID 4 bytes
- * effective group ID 4 bytes
- * real user ID 4 bytes
- * real group ID 4 bytes
- * process ID 4 bytes
- * session ID 4 bytes
- * terminal ID
- * port ID 4 bytes/8 bytes (32-bit/64-bit value)
- * machine address 4 bytes
- */
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tid32_t tid;
-} au_subject32_t;
-
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tid64_t tid;
-} au_subject64_t;
-
-/*
- * audit ID 4 bytes
- * effective user ID 4 bytes
- * effective group ID 4 bytes
- * real user ID 4 bytes
- * real group ID 4 bytes
- * process ID 4 bytes
- * session ID 4 bytes
- * terminal ID
- * port ID 4 bytes/8 bytes (32-bit/64-bit value)
- * type 4 bytes
- * machine address 16 bytes
- */
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tidaddr32_t tid;
-} au_subject32ex_t;
-
-typedef struct {
- uint32_t auid;
- uint32_t euid;
- uint32_t egid;
- uint32_t ruid;
- uint32_t rgid;
- uint32_t pid;
- uint32_t sid;
- au_tidaddr64_t tid;
-} au_subject64ex_t;
-
-/*
- * text length 2 bytes
- * text N bytes + 1 terminating NULL byte
- */
-typedef struct {
- u_int16_t len;
- char *text;
-} au_text_t;
-
-/*
- * upriv status 1 byte
- * privstr len 2 bytes
- * privstr N bytes + 1 (\0 byte)
- */
-typedef struct {
- u_int8_t sorf;
- u_int16_t privstrlen;
- char *priv;
-} au_priv_t;
-
-/*
-* privset
-* privtstrlen 2 bytes
-* privtstr N Bytes + 1
-* privstrlen 2 bytes
-* privstr N Bytes + 1
-*/
-typedef struct {
- u_int16_t privtstrlen;
- char *privtstr;
- u_int16_t privstrlen;
- char *privstr;
-} au_privset_t;
-
-/*
- * zonename length 2 bytes
- * zonename text N bytes + 1 NULL terminator
- */
-typedef struct {
- u_int16_t len;
- char *zonename;
-} au_zonename_t;
-
-typedef struct {
- uint32_t ident;
- u_int16_t filter;
- u_int16_t flags;
- uint32_t fflags;
- uint32_t data;
-} au_kevent_t;
-
-typedef struct {
- u_int16_t length;
- char *data;
-} au_invalid_t;
-
-/*
- * trailer magic number 2 bytes
- * record byte count 4 bytes
- */
-typedef struct {
- u_int16_t magic;
- uint32_t count;
-} au_trailer_t;
-
-struct tokenstr {
- u_char id;
- u_char *data;
- size_t len;
- union {
- au_arg32_t arg32;
- au_arg64_t arg64;
- au_arb_t arb;
- au_attr32_t attr32;
- au_attr64_t attr64;
- au_execarg_t execarg;
- au_execenv_t execenv;
- au_exit_t exit;
- au_file_t file;
- au_groups_t grps;
- au_header32_t hdr32;
- au_header32_ex_t hdr32_ex;
- au_header64_t hdr64;
- au_header64_ex_t hdr64_ex;
- au_inaddr_t inaddr;
- au_inaddr_ex_t inaddr_ex;
- au_ip_t ip;
- au_ipc_t ipc;
- au_ipcperm_t ipcperm;
- au_iport_t iport;
- au_opaque_t opaque;
- au_path_t path;
- au_proc32_t proc32;
- au_proc32ex_t proc32_ex;
- au_proc64_t proc64;
- au_proc64ex_t proc64_ex;
- au_ret32_t ret32;
- au_ret64_t ret64;
- au_seq_t seq;
- au_socket_t socket;
- au_socket_ex32_t socket_ex32;
- au_socketinet_ex32_t sockinet_ex32;
- au_socketunix_t sockunix;
- au_subject32_t subj32;
- au_subject32ex_t subj32_ex;
- au_subject64_t subj64;
- au_subject64ex_t subj64_ex;
- au_text_t text;
- au_kevent_t kevent;
- au_invalid_t invalid;
- au_trailer_t trail;
- au_zonename_t zonename;
- au_priv_t priv;
- au_privset_t privset;
- } tt; /* The token is one of the above types */
-};
-
-typedef struct tokenstr tokenstr_t;
-
-int audit_submit(short au_event, au_id_t auid,
- char status, int reterr, const char *fmt, ...);
-
-/*
- * Functions relating to querying audit class information.
- */
-void setauclass(void);
-void endauclass(void);
-struct au_class_ent *getauclassent(void);
-struct au_class_ent *getauclassent_r(au_class_ent_t *class_int);
-struct au_class_ent *getauclassnam(const char *name);
-struct au_class_ent *getauclassnam_r(au_class_ent_t *class_int,
- const char *name);
-struct au_class_ent *getauclassnum(au_class_t class_number);
-struct au_class_ent *getauclassnum_r(au_class_ent_t *class_int,
- au_class_t class_number);
-
-/*
- * Functions relating to querying audit control information.
- */
-void setac(void);
-void endac(void);
-int getacdir(char *name, int len);
-int getacdist(void);
-int getacexpire(int *andflg, time_t *age, size_t *size);
-int getacfilesz(size_t *size_val);
-int getacflg(char *auditstr, int len);
-int getachost(char *auditstr, size_t len);
-int getacmin(int *min_val);
-int getacna(char *auditstr, int len);
-int getacpol(char *auditstr, size_t len);
-int getauditflagsbin(char *auditstr, au_mask_t *masks);
-int getauditflagschar(char *auditstr, au_mask_t *masks,
- int verbose);
-int au_preselect(au_event_t event, au_mask_t *mask_p,
- int sorf, int flag);
-ssize_t au_poltostr(int policy, size_t maxsize, char *buf);
-int au_strtopol(const char *polstr, int *policy);
-
-/*
- * Functions relating to querying audit event information.
- */
-void setauevent(void);
-void endauevent(void);
-struct au_event_ent *getauevent(void);
-struct au_event_ent *getauevent_r(struct au_event_ent *e);
-struct au_event_ent *getauevnam(const char *name);
-struct au_event_ent *getauevnam_r(struct au_event_ent *e,
- const char *name);
-struct au_event_ent *getauevnum(au_event_t event_number);
-struct au_event_ent *getauevnum_r(struct au_event_ent *e,
- au_event_t event_number);
-au_event_t *getauevnonam(const char *event_name);
-au_event_t *getauevnonam_r(au_event_t *ev,
- const char *event_name);
-
-/*
- * Functions relating to querying audit user information.
- */
-void setauuser(void);
-void endauuser(void);
-struct au_user_ent *getauuserent(void);
-struct au_user_ent *getauuserent_r(struct au_user_ent *u);
-struct au_user_ent *getauusernam(const char *name);
-struct au_user_ent *getauusernam_r(struct au_user_ent *u,
- const char *name);
-int au_user_mask(char *username, au_mask_t *mask_p);
-int getfauditflags(au_mask_t *usremask,
- au_mask_t *usrdmask, au_mask_t *lastmask);
-
-/*
- * Functions for reading and printing records and tokens from audit trails.
- */
-int au_read_rec(FILE *fp, u_char **buf);
-int au_fetch_tok(tokenstr_t *tok, u_char *buf, int len);
-//XXX The following interface has different prototype from BSM
-void au_print_tok(FILE *outfp, tokenstr_t *tok,
- char *del, char raw, char sfrm);
-void au_print_flags_tok(FILE *outfp, tokenstr_t *tok,
- char *del, int oflags);
-void au_print_tok_xml(FILE *outfp, tokenstr_t *tok,
- char *del, char raw, char sfrm);
-
-/*
- * Functions relating to XML output.
- */
-void au_print_xml_header(FILE *outfp);
-void au_print_xml_footer(FILE *outfp);
-
-/*
- * BSM library routines for converting between local and BSM constant spaces.
- * (Note: some of these are replicated in audit_record.h for the benefit of
- * the FreeBSD and Mac OS X kernels)
- */
-int au_bsm_to_domain(u_short bsm_domain, int *local_domainp);
-int au_bsm_to_errno(u_char bsm_error, int *errorp);
-int au_bsm_to_fcntl_cmd(u_short bsm_fcntl_cmd, int *local_fcntl_cmdp);
-int au_bsm_to_socket_type(u_short bsm_socket_type,
- int *local_socket_typep);
-u_short au_domain_to_bsm(int local_domain);
-u_char au_errno_to_bsm(int local_errno);
-u_short au_fcntl_cmd_to_bsm(int local_fcntl_command);
-u_short au_socket_type_to_bsm(int local_socket_type);
-
-const char *au_strerror(u_char bsm_error);
-__END_DECLS
-
-/*
- * The remaining APIs are associated with Apple's BSM implementation, in
- * particular as relates to Mach IPC auditing and triggers passed via Mach
- * IPC.
- */
-#ifdef __APPLE__
-#include
-
-/**************************************************************************
- **************************************************************************
- ** The following definitions, functions, etc., are NOT officially
- ** supported: they may be changed or removed in the future. Do not use
- ** them unless you are prepared to cope with that eventuality.
- **************************************************************************
- **************************************************************************/
-
-#ifdef __APPLE_API_PRIVATE
-#define __BSM_INTERNAL_NOTIFY_KEY "com.apple.audit.change"
-#endif /* __APPLE_API_PRIVATE */
-
-/*
- * au_get_state() return values
- * XXX use AUC_* values directly instead (); AUDIT_OFF and
- * AUDIT_ON are deprecated and WILL be removed.
- */
-#ifdef __APPLE_API_PRIVATE
-#define AUDIT_OFF AUC_NOAUDIT
-#define AUDIT_ON AUC_AUDITING
-#endif /* __APPLE_API_PRIVATE */
-#endif /* !__APPLE__ */
-
-/*
- * Error return codes for audit_set_terminal_id(), audit_write() and its
- * brethren. We have 255 (not including kAUNoErr) to play with.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-enum {
- kAUNoErr = 0,
- kAUBadParamErr = -66049,
- kAUStatErr,
- kAUSysctlErr,
- kAUOpenErr,
- kAUMakeSubjectTokErr,
- kAUWriteSubjectTokErr,
- kAUWriteCallerTokErr,
- kAUMakeReturnTokErr,
- kAUWriteReturnTokErr,
- kAUCloseErr,
- kAUMakeTextTokErr,
- kAULastErr
-};
-
-#ifdef __APPLE__
-/*
- * Error return codes for au_get_state() and/or its private support
- * functions. These codes are designed to be compatible with the
- * NOTIFY_STATUS_* codes defined in but non-overlapping.
- * Any changes to notify(3) may cause these values to change in future.
- *
- * AU_UNIMPL should never happen unless you've changed your system software
- * without rebooting. Shame on you.
- */
-#ifdef __APPLE_API_PRIVATE
-#define AU_UNIMPL NOTIFY_STATUS_FAILED + 1 /* audit unimplemented */
-#endif /* __APPLE_API_PRIVATE */
-#endif /* !__APPLE__ */
-
-__BEGIN_DECLS
-/*
- * XXX This prototype should be in audit_record.h
- *
- * au_free_token()
- *
- * @summary - au_free_token() deallocates a token_t created by any of
- * the au_to_*() BSM API functions.
- *
- * The BSM API generally manages deallocation of token_t objects. However,
- * if au_write() is passed a bad audit descriptor, the token_t * parameter
- * will be left untouched. In that case, the caller can deallocate the
- * token_t using au_free_token() if desired. This is, in fact, what
- * audit_write() does, in keeping with the existing memory management model
- * of the BSM API.
- *
- * @param tok - A token_t * generated by one of the au_to_*() BSM API
- * calls. For convenience, tok may be NULL, in which case
- * au_free_token() returns immediately.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-void au_free_token(token_t *tok);
-
-/*
- * Lightweight check to determine if auditing is enabled. If a client
- * wants to use this to govern whether an entire series of audit calls
- * should be made--as in the common case of a caller building a set of
- * tokens, then writing them--it should cache the audit status in a local
- * variable. This call always returns the current state of auditing.
- *
- * @return - AUC_AUDITING or AUC_NOAUDIT if no error occurred.
- * Otherwise the function can return any of the errno values defined for
- * setaudit(2), or AU_UNIMPL if audit does not appear to be supported by
- * the system.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int au_get_state(void);
-
-/*
- * Initialize the audit notification. If it has not already been initialized
- * it will automatically on the first call of au_get_state().
- */
-uint32_t au_notify_initialize(void);
-
-/*
- * Cancel audit notification and free the resources associated with it.
- * Responsible code that no longer needs to use au_get_state() should call
- * this.
- */
-int au_notify_terminate(void);
-__END_DECLS
-
-/* OpenSSH compatibility */
-int cannot_audit(int);
-
-__BEGIN_DECLS
-/*
- * audit_set_terminal_id()
- *
- * @summary - audit_set_terminal_id() fills in an au_tid_t struct, which is
- * used in audit session initialization by processes like /usr/bin/login.
- *
- * @param tid - A pointer to an au_tid_t struct.
- *
- * @return - kAUNoErr on success; kAUBadParamErr if tid is NULL, kAUStatErr
- * or kAUSysctlErr if one of the underlying system calls fails (a message
- * is sent to the system log in those cases).
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_set_terminal_id(au_tid_t *tid);
-
-/*
- * BEGIN au_write() WRAPPERS
- *
- * The following calls all wrap the existing BSM API. They use the
- * provided subject information, if any, to construct the subject token
- * required for every log message. They use the provided return/error
- * value(s), if any, to construct the success/failure indication required
- * for every log message. They only permit one "miscellaneous" token,
- * which should contain the event-specific logging information mandated by
- * CAPP.
- *
- * All these calls assume the caller has previously determined that
- * auditing is enabled by calling au_get_state().
- */
-
-/*
- * audit_write()
- *
- * @summary - audit_write() is the basis for the other audit_write_*()
- * calls. Performs a basic write of an audit record (subject, additional
- * info, success/failure). Note that this call only permits logging one
- * caller-specified token; clients needing to log more flexibly must use
- * the existing BSM API (au_open(), et al.) directly.
- *
- * Note on memory management: audit_write() guarantees that the token_t *s
- * passed to it will be deallocated whether or not the underlying write to
- * the audit log succeeded. This addresses an inconsistency in the
- * underlying BSM API in which token_t *s are usually but not always
- * deallocated.
- *
- * @param event_code - The code for the event being logged. This should
- * be one of the AUE_ values in /usr/include/bsm/audit_uevents.h.
- *
- * @param subject - A token_t * generated by au_to_subject(),
- * au_to_subject32(), au_to_subject64(), or au_to_me(). If no subject is
- * required, subject should be NULL.
- *
- * @param misctok - A token_t * generated by one of the au_to_*() BSM API
- * calls. This should correspond to the additional information required by
- * CAPP for the event being audited. If no additional information is
- * required, misctok should be NULL.
- *
- * @param retval - The return value to be logged for this event. This
- * should be 0 (zero) for success, otherwise the value is event-specific.
- *
- * @param errcode - Any error code associated with the return value (e.g.,
- * errno or h_errno). If there was no error, errcode should be 0 (zero).
- *
- * @return - The status of the call: 0 (zero) on success, else one of the
- * kAU*Err values defined above.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_write(short event_code, token_t *subject, token_t *misctok,
- char retval, int errcode);
-
-/*
- * audit_write_success()
- *
- * @summary - audit_write_success() records an auditable event that did not
- * encounter an error. The interface is designed to require as little
- * direct use of the au_to_*() API as possible. It builds a subject token
- * from the information passed in and uses that to invoke audit_write().
- * A subject, as defined by CAPP, is a process acting on the user's behalf.
- *
- * If the subject information is the same as the current process, use
- * au_write_success_self().
- *
- * @param event_code - The code for the event being logged. This should
- * be one of the AUE_ values in /usr/include/bsm/audit_uevents.h.
- *
- * @param misctok - A token_t * generated by one of the au_to_*() BSM API
- * calls. This should correspond to the additional information required by
- * CAPP for the event being audited. If no additional information is
- * required, misctok should be NULL.
- *
- * @param auid - The subject's audit ID.
- *
- * @param euid - The subject's effective user ID.
- *
- * @param egid - The subject's effective group ID.
- *
- * @param ruid - The subject's real user ID.
- *
- * @param rgid - The subject's real group ID.
- *
- * @param pid - The subject's process ID.
- *
- * @param sid - The subject's session ID.
- *
- * @param tid - The subject's terminal ID.
- *
- * @return - The status of the call: 0 (zero) on success, else one of the
- * kAU*Err values defined above.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_write_success(short event_code, token_t *misctok, au_id_t auid,
- uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid,
- au_asid_t sid, au_tid_t *tid);
-
-/*
- * audit_write_success_self()
- *
- * @summary - Similar to audit_write_success(), but used when the subject
- * (process) is owned and operated by the auditable user him/herself.
- *
- * @param event_code - The code for the event being logged. This should
- * be one of the AUE_ values in /usr/include/bsm/audit_uevents.h.
- *
- * @param misctok - A token_t * generated by one of the au_to_*() BSM API
- * calls. This should correspond to the additional information required by
- * CAPP for the event being audited. If no additional information is
- * required, misctok should be NULL.
- *
- * @return - The status of the call: 0 (zero) on success, else one of the
- * kAU*Err values defined above.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_write_success_self(short event_code, token_t *misctok);
-
-/*
- * audit_write_failure()
- *
- * @summary - audit_write_failure() records an auditable event that
- * encountered an error. The interface is designed to require as little
- * direct use of the au_to_*() API as possible. It builds a subject token
- * from the information passed in and uses that to invoke audit_write().
- * A subject, as defined by CAPP, is a process acting on the user's behalf.
- *
- * If the subject information is the same as the current process, use
- * au_write_failure_self().
- *
- * @param event_code - The code for the event being logged. This should
- * be one of the AUE_ values in /usr/include/bsm/audit_uevents.h.
- *
- * @param errmsg - A text message providing additional information about
- * the event being audited.
- *
- * @param errret - A numerical value providing additional information about
- * the error. This is intended to store the value of errno or h_errno if
- * it's relevant. This can be 0 (zero) if no additional information is
- * available.
- *
- * @param auid - The subject's audit ID.
- *
- * @param euid - The subject's effective user ID.
- *
- * @param egid - The subject's effective group ID.
- *
- * @param ruid - The subject's real user ID.
- *
- * @param rgid - The subject's real group ID.
- *
- * @param pid - The subject's process ID.
- *
- * @param sid - The subject's session ID.
- *
- * @param tid - The subject's terminal ID.
- *
- * @return - The status of the call: 0 (zero) on success, else one of the
- * kAU*Err values defined above.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_write_failure(short event_code, char *errmsg, int errret,
- au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid,
- pid_t pid, au_asid_t sid, au_tid_t *tid);
-
-/*
- * audit_write_failure_self()
- *
- * @summary - Similar to audit_write_failure(), but used when the subject
- * (process) is owned and operated by the auditable user him/herself.
- *
- * @param event_code - The code for the event being logged. This should
- * be one of the AUE_ values in /usr/include/bsm/audit_uevents.h.
- *
- * @param errmsg - A text message providing additional information about
- * the event being audited.
- *
- * @param errret - A numerical value providing additional information about
- * the error. This is intended to store the value of errno or h_errno if
- * it's relevant. This can be 0 (zero) if no additional information is
- * available.
- *
- * @return - The status of the call: 0 (zero) on success, else one of the
- * kAU*Err values defined above.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_write_failure_self(short event_code, char *errmsg, int errret);
-
-/*
- * audit_write_failure_na()
- *
- * @summary - audit_write_failure_na() records errors during login. Such
- * errors are implicitly non-attributable (i.e., not ascribable to any user).
- *
- * @param event_code - The code for the event being logged. This should
- * be one of the AUE_ values in /usr/include/bsm/audit_uevents.h.
- *
- * @param errmsg - A text message providing additional information about
- * the event being audited.
- *
- * @param errret - A numerical value providing additional information about
- * the error. This is intended to store the value of errno or h_errno if
- * it's relevant. This can be 0 (zero) if no additional information is
- * available.
- *
- * @param euid - The subject's effective user ID.
- *
- * @param egid - The subject's effective group ID.
- *
- * @param pid - The subject's process ID.
- *
- * @param tid - The subject's terminal ID.
- *
- * @return - The status of the call: 0 (zero) on success, else one of the
- * kAU*Err values defined above.
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-int audit_write_failure_na(short event_code, char *errmsg, int errret,
- uid_t euid, gid_t egid, pid_t pid, au_tid_t *tid);
-
-/* END au_write() WRAPPERS */
-
-#ifdef __APPLE__
-/*
- * audit_token_to_au32()
- *
- * @summary - Extract information from an audit_token_t, used to identify
- * Mach tasks and senders of Mach messages as subjects to the audit system.
- * audit_tokent_to_au32() is the only method that should be used to parse
- * an audit_token_t, since its internal representation may change over
- * time. A pointer parameter may be NULL if that information is not
- * needed.
- *
- * @param atoken - the audit token containing the desired information
- *
- * @param auidp - Pointer to a uid_t; on return will be set to the task or
- * sender's audit user ID
- *
- * @param euidp - Pointer to a uid_t; on return will be set to the task or
- * sender's effective user ID
- *
- * @param egidp - Pointer to a gid_t; on return will be set to the task or
- * sender's effective group ID
- *
- * @param ruidp - Pointer to a uid_t; on return will be set to the task or
- * sender's real user ID
- *
- * @param rgidp - Pointer to a gid_t; on return will be set to the task or
- * sender's real group ID
- *
- * @param pidp - Pointer to a pid_t; on return will be set to the task or
- * sender's process ID
- *
- * @param asidp - Pointer to an au_asid_t; on return will be set to the
- * task or sender's audit session ID
- *
- * @param tidp - Pointer to an au_tid_t; on return will be set to the task
- * or sender's terminal ID
- *
- * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
- */
-void audit_token_to_au32(
- audit_token_t atoken,
- uid_t *auidp,
- uid_t *euidp,
- gid_t *egidp,
- uid_t *ruidp,
- gid_t *rgidp,
- pid_t *pidp,
- au_asid_t *asidp,
- au_tid_t *tidp);
-#endif /* !__APPLE__ */
-
-/*
- * Wrapper functions to auditon(2).
- */
-int audit_get_car(char *path, size_t sz);
-int audit_get_class(au_evclass_map_t *evc_map, size_t sz);
-int audit_set_class(au_evclass_map_t *evc_map, size_t sz);
-int audit_get_cond(int *cond);
-int audit_set_cond(int *cond);
-int audit_get_cwd(char *path, size_t sz);
-int audit_get_fsize(au_fstat_t *fstat, size_t sz);
-int audit_set_fsize(au_fstat_t *fstat, size_t sz);
-int audit_get_kmask(au_mask_t *kmask, size_t sz);
-int audit_set_kmask(au_mask_t *kmask, size_t sz);
-int audit_get_kaudit(auditinfo_addr_t *aia, size_t sz);
-int audit_set_kaudit(auditinfo_addr_t *aia, size_t sz);
-int audit_set_pmask(auditpinfo_t *api, size_t sz);
-int audit_get_pinfo(auditpinfo_t *api, size_t sz);
-int audit_get_pinfo_addr(auditpinfo_addr_t *apia, size_t sz);
-int audit_get_policy(int *policy);
-int audit_set_policy(int *policy);
-int audit_get_qctrl(au_qctrl_t *qctrl, size_t sz);
-int audit_set_qctrl(au_qctrl_t *qctrl, size_t sz);
-int audit_get_sinfo_addr(auditinfo_addr_t *aia, size_t sz);
-int audit_get_stat(au_stat_t *stats, size_t sz);
-int audit_set_stat(au_stat_t *stats, size_t sz);
-int audit_send_trigger(int *trigger);
-
-__END_DECLS
-
-#endif /* !_LIBBSM_H_ */
diff --git a/include.new/bsnmp/asn1.h b/include.new/bsnmp/asn1.h
deleted file mode 100644
index cf9a727..0000000
--- a/include.new/bsnmp/asn1.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- *
- * 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 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 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.
- *
- * $Begemot: bsnmp/lib/asn1.h,v 1.20 2005/10/05 16:43:11 brandt_h Exp $
- *
- * ASN.1 for SNMP
- */
-#ifndef asn1_h_
-#define asn1_h_
-
-#include
-
-struct asn_buf {
- union {
- u_char *ptr;
- const u_char *cptr;
- } asn_u;
- size_t asn_len;
-};
-#define asn_cptr asn_u.cptr
-#define asn_ptr asn_u.ptr
-
-/* these restrictions are in the SMI */
-#define ASN_MAXID 0xffffffff
-#define ASN_MAXOIDLEN 128
-
-/* the string needed for this (with trailing zero) */
-#define ASN_OIDSTRLEN (ASN_MAXOIDLEN * (10 + 1) - 1 + 1)
-
-/* type of subidentifiers */
-typedef uint32_t asn_subid_t;
-
-struct asn_oid {
- u_int len;
- asn_subid_t subs[ASN_MAXOIDLEN];
-};
-
-enum asn_err {
- /* conversion was ok */
- ASN_ERR_OK = 0,
- /* conversion failed and stopped */
- ASN_ERR_FAILED = 1 | 0x1000,
- /* length field bad, value skipped */
- ASN_ERR_BADLEN = 2,
- /* out of buffer, stopped */
- ASN_ERR_EOBUF = 3 | 0x1000,
- /* length ok, but value is out of range */
- ASN_ERR_RANGE = 4,
- /* not the expected tag, stopped */
- ASN_ERR_TAG = 5 | 0x1000,
-};
-#define ASN_ERR_STOPPED(E) (((E) & 0x1000) != 0)
-
-/* type for the length field of encoded values. The length is restricted
- * to 65535, but using uint16_t would give conversion warnings on gcc */
-typedef uint32_t asn_len_t; /* could be also uint16_t */
-
-/* maximal length of a long length field without the length of the length */
-#define ASN_MAXLEN 65535
-#define ASN_MAXLENLEN 2 /* number of bytes in a length */
-
-/* maximum size of an octet string as per SMIv2 */
-#define ASN_MAXOCTETSTRING 65535
-
-extern void (*asn_error)(const struct asn_buf *, const char *, ...);
-
-enum asn_err asn_get_header(struct asn_buf *, u_char *, asn_len_t *);
-enum asn_err asn_put_header(struct asn_buf *, u_char, asn_len_t);
-
-enum asn_err asn_put_temp_header(struct asn_buf *, u_char, u_char **);
-enum asn_err asn_commit_header(struct asn_buf *, u_char *, size_t *);
-
-enum asn_err asn_get_integer_raw(struct asn_buf *, asn_len_t, int32_t *);
-enum asn_err asn_get_integer(struct asn_buf *, int32_t *);
-enum asn_err asn_put_integer(struct asn_buf *, int32_t);
-
-enum asn_err asn_get_octetstring_raw(struct asn_buf *, asn_len_t, u_char *, u_int *);
-enum asn_err asn_get_octetstring(struct asn_buf *, u_char *, u_int *);
-enum asn_err asn_put_octetstring(struct asn_buf *, const u_char *, u_int);
-
-enum asn_err asn_get_null_raw(struct asn_buf *b, asn_len_t);
-enum asn_err asn_get_null(struct asn_buf *);
-enum asn_err asn_put_null(struct asn_buf *);
-
-enum asn_err asn_put_exception(struct asn_buf *, u_int);
-
-enum asn_err asn_get_objid_raw(struct asn_buf *, asn_len_t, struct asn_oid *);
-enum asn_err asn_get_objid(struct asn_buf *, struct asn_oid *);
-enum asn_err asn_put_objid(struct asn_buf *, const struct asn_oid *);
-
-enum asn_err asn_get_sequence(struct asn_buf *, asn_len_t *);
-
-enum asn_err asn_get_ipaddress_raw(struct asn_buf *, asn_len_t, u_char *);
-enum asn_err asn_get_ipaddress(struct asn_buf *, u_char *);
-enum asn_err asn_put_ipaddress(struct asn_buf *, const u_char *);
-
-enum asn_err asn_get_uint32_raw(struct asn_buf *, asn_len_t, uint32_t *);
-enum asn_err asn_put_uint32(struct asn_buf *, u_char, uint32_t);
-
-enum asn_err asn_get_counter64_raw(struct asn_buf *, asn_len_t, uint64_t *);
-enum asn_err asn_put_counter64(struct asn_buf *, uint64_t);
-
-enum asn_err asn_get_timeticks(struct asn_buf *, uint32_t *);
-enum asn_err asn_put_timeticks(struct asn_buf *, uint32_t);
-
-enum asn_err asn_skip(struct asn_buf *, asn_len_t);
-enum asn_err asn_pad(struct asn_buf *, asn_len_t);
-
-/*
- * Utility functions for OIDs
- */
-/* get a sub-OID from the middle of another OID */
-void asn_slice_oid(struct asn_oid *, const struct asn_oid *, u_int, u_int);
-
-/* append an OID to another one */
-void asn_append_oid(struct asn_oid *, const struct asn_oid *);
-
-/* compare two OIDs */
-int asn_compare_oid(const struct asn_oid *, const struct asn_oid *);
-
-/* check whether the first is a suboid of the second one */
-int asn_is_suboid(const struct asn_oid *, const struct asn_oid *);
-
-/* format an OID into a user buffer of size ASN_OIDSTRLEN */
-char *asn_oid2str_r(const struct asn_oid *, char *);
-
-/* format an OID into a private static buffer */
-char *asn_oid2str(const struct asn_oid *);
-
-enum {
- ASN_TYPE_BOOLEAN = 0x01,
- ASN_TYPE_INTEGER = 0x02,
- ASN_TYPE_BITSTRING = 0x03,
- ASN_TYPE_OCTETSTRING = 0x04,
- ASN_TYPE_NULL = 0x05,
- ASN_TYPE_OBJID = 0x06,
- ASN_TYPE_SEQUENCE = 0x10,
-
- ASN_TYPE_CONSTRUCTED = 0x20,
- ASN_CLASS_UNIVERSAL = 0x00,
- ASN_CLASS_APPLICATION = 0x40,
- ASN_CLASS_CONTEXT = 0x80,
- ASN_CLASS_PRIVATE = 0xc0,
- ASN_TYPE_MASK = 0x1f,
-
- ASN_APP_IPADDRESS = 0x00,
- ASN_APP_COUNTER = 0x01,
- ASN_APP_GAUGE = 0x02,
- ASN_APP_TIMETICKS = 0x03,
- ASN_APP_OPAQUE = 0x04, /* not implemented */
- ASN_APP_COUNTER64 = 0x06,
-
- ASN_EXCEPT_NOSUCHOBJECT = 0x00,
- ASN_EXCEPT_NOSUCHINSTANCE = 0x01,
- ASN_EXCEPT_ENDOFMIBVIEW = 0x02,
-};
-
-#endif
diff --git a/include.new/bsnmp/bridge_snmp.h b/include.new/bsnmp/bridge_snmp.h
deleted file mode 100644
index 31d23fb..0000000
--- a/include.new/bsnmp/bridge_snmp.h
+++ /dev/null
@@ -1,357 +0,0 @@
-/*-
- * Copyright (c) 2006 Shteryana Shopova
- * 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.
- *
- * Bridge MIB implementation for SNMPd.
- *
- * $FreeBSD: releng/10.2/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h 171791 2007-08-08 19:27:50Z syrinx $
- */
-
-#ifndef SNMP_BRIDGE_H
-#define SNMP_BRIDGE_H
-
-#define SNMP_BRIDGE_ID_LEN 8
-
-typedef uint8_t port_id[2];
-typedef u_char bridge_id[SNMP_BRIDGE_ID_LEN];
-
-#define SNMP_BRIDGE_MAX_PRIORITY 65535
-
-#define SNMP_BRIDGE_MIN_AGE_TIME 10
-#define SNMP_BRIDGE_MAX_AGE_TIME 1000000
-
-#define SNMP_BRIDGE_MIN_TXHC 1
-#define SNMP_BRIDGE_MAX_TXHC 10
-
-#define SNMP_BRIDGE_MIN_MAGE 600
-#define SNMP_BRIDGE_MAX_MAGE 4000
-
-#define SNMP_BRIDGE_MIN_HTIME 100
-#define SNMP_BRIDGE_MAX_HTIME 1000
-
-#define SNMP_BRIDGE_MIN_FDELAY 400
-#define SNMP_BRIDGE_MAX_FDELAY 3000
-
-#define SNMP_PORT_PATHCOST_OBSOLETE 65535
-#define SNMP_PORT_MIN_PATHCOST 0
-#define SNMP_PORT_MAX_PATHCOST 200000000
-#define SNMP_PORT_PATHCOST_AUTO 0
-
-#define SNMP_BRIDGE_DATA_MAXAGE 10
-#define SNMP_BRIDGE_DATA_MAXAGE_MIN 1
-#define SNMP_BRIDGE_DATA_MAXAGE_MAX 300
-
-/* By default poll kernel data every 5 minutes. */
-#define SNMP_BRIDGE_POLL_INTERVAL (5 * 60)
-#define SNMP_BRIDGE_POLL_INTERVAL_MIN 1
-#define SNMP_BRIDGE_POLL_INTERVAL_MAX 3600
-
-/* Poll for a topology change once every 30 seconds. */
-#define SNMP_BRIDGE_TC_POLL_INTERVAL 30
-
-struct bridge_if *bridge_get_default(void);
-
-void bridge_set_default(struct bridge_if *bif);
-
-const char *bridge_get_default_name(void);
-
-int bridge_get_data_maxage(void);
-
-/*
- * Bridge Addresses Table.
- */
-struct tp_entry {
- uint32_t sysindex; /* The bridge if sysindex. */
- int32_t port_no;
- enum TpFdbStatus status;
- uint8_t tp_addr[ETHER_ADDR_LEN];
- uint8_t flags;
- TAILQ_ENTRY(tp_entry) tp_e;
-};
-
-/*
- * Bridge ports.
- * The bridge port system interface index is used for a
- * port number. Transparent bridging statistics and STP
- * information for a port are also contained here.
- */
-struct bridge_port {
- /* dot1dBase subtree objects. */
- uint32_t sysindex; /* The bridge interface sysindex. */
- int32_t port_no; /* The bridge member system index. */
- int32_t if_idx; /* SNMP ifIndex from mibII. */
- int8_t span_enable; /* Span flag set - private MIB. */
- struct asn_oid circuit; /* Unused. */
- uint32_t dly_ex_drops; /* Drops on output. */
- uint32_t dly_mtu_drops; /* MTU exceeded drops. */
- int32_t status; /* The entry status. */
- enum TruthValue priv_set; /* The private flag. */
-
- /* dot1dStp subtree objects. */
- int32_t path_cost;
- int32_t priority;
- int32_t design_cost;
- uint32_t fwd_trans;
- char p_name[IFNAMSIZ]; /* Not in BRIDGE-MIB. */
- enum StpPortState state;
- enum dot1dStpPortEnable enable;
- port_id design_port;
- bridge_id design_root;
- bridge_id design_bridge;
-
- /* rstpMib extensions. */
- int32_t admin_path_cost;
- enum TruthValue proto_migr;
- enum TruthValue admin_edge;
- enum TruthValue oper_edge;
- enum TruthValue oper_ptp;
- enum StpPortAdminPointToPointType admin_ptp;
-
- /* dot1dTp subtree objects. */
- int32_t max_info;
- int32_t in_frames;
- int32_t out_frames;
- int32_t in_drops;
-
- uint8_t flags;
- TAILQ_ENTRY(bridge_port) b_p;
-};
-
-/*
- * A bridge interface.
- * The system interface index of the bridge is not required neither by the
- * standard BRIDGE-MIB nor by the private BEGEMOT-BRIDGE-MIB, but is used
- * as key for looking up the other info for this bridge.
- */
-struct bridge_if {
- /* dot1dBase subtree objects. */
- uint32_t sysindex; /* The system interface index. */
- int32_t num_ports; /* Number of ports. */
- enum BaseType br_type; /* Bridge type. */
- enum RowStatus if_status; /* Bridge status. */
- char bif_name[IFNAMSIZ]; /* Bridge interface name. */
- struct ether_addr br_addr; /* Bridge address. */
- struct bridge_port *f_bp; /* This bridge's first entry
- * in the base ports TAILQ. */
- /* dot1dStp subtree objects. */
- int32_t priority;
- int32_t root_cost;
- int32_t root_port;
- int32_t max_age; /* Current max age. */
- int32_t hello_time; /* Current hello time. */
- int32_t fwd_delay; /* Current forward delay. */
- int32_t hold_time;
- int32_t bridge_max_age; /* Configured max age. */
- int32_t bridge_hello_time; /* Configured hello time. */
- int32_t bridge_fwd_delay; /* Configured forward delay. */
- int32_t tx_hold_count;
- uint32_t top_changes;
- enum dot1dStpVersion stp_version;
- enum dot1dStpProtocolSpecification prot_spec;
- struct timeval last_tc_time;
- bridge_id design_root;
-
- /* dot1dTp subtree objects. */
- int32_t lrnt_drops; /* Dropped addresses. */
- int32_t age_time; /* Address entry timeout. */
- int32_t num_addrs; /* Current # of addresses in cache. */
- int32_t max_addrs; /* Max # of addresses in cache. */
- struct tp_entry *f_tpa; /* This bridge's first entry in
- * the tp addresses TAILQ. */
-
- time_t entry_age;
- time_t ports_age;
- time_t addrs_age;
- TAILQ_ENTRY(bridge_if) b_if;
-};
-
-void bridge_ifs_fini(void);
-
-struct bridge_if *bridge_if_find_ifs(uint32_t sysindex);
-
-struct bridge_if *bridge_if_find_ifname(const char *b_name);
-
-const char *bridge_if_find_name(uint32_t sysindex);
-
-int bridge_compare_sysidx(uint32_t i1, uint32_t i2);
-
-int bridge_attach_newif(struct mibif *ifp);
-
-struct bridge_if *bridge_first_bif(void);
-
-struct bridge_if *bridge_next_bif(struct bridge_if *b_pr);
-
-void bridge_remove_bif(struct bridge_if *bif);
-
-void bridge_update_all_ports(void);
-
-void bridge_update_all_addrs(void);
-
-void bridge_update_all_ifs(void);
-
-void bridge_update_all(void *arg);
-
-void bridge_update_tc_time(void *arg);
-
-void bridge_ifs_dump(void);
-
-/* Bridge ports. */
-void bridge_ports_update_listage(void);
-
-void bridge_ports_fini(void);
-
-void bridge_members_free(struct bridge_if *bif);
-
-struct bridge_port *bridge_new_port(struct mibif *mif, struct bridge_if *bif);
-
-void bridge_port_remove(struct bridge_port *bp, struct bridge_if *bif);
-
-struct bridge_port *bridge_port_bif_first(struct bridge_if *bif);
-
-struct bridge_port *bridge_port_bif_next(struct bridge_port *bp);
-
-struct bridge_port *bridge_port_find(int32_t if_idx, struct bridge_if *bif);
-
-void bridge_port_getinfo_mibif(struct mibif *m_if, struct bridge_port *bp);
-
-int bridge_getinfo_bif_ports(struct bridge_if *bif);
-
-int bridge_update_memif(struct bridge_if *bif);
-
-void bridge_ports_dump(struct bridge_if *bif);
-
-/* Bridge addresses. */
-void bridge_addrs_update_listage(void);
-
-void bridge_addrs_fini(void);
-
-void bridge_addrs_free(struct bridge_if *bif);
-
-struct tp_entry *bridge_new_addrs(uint8_t *mac, struct bridge_if *bif);
-
-void bridge_addrs_remove(struct tp_entry *te, struct bridge_if *bif);
-
-struct tp_entry *bridge_addrs_find(uint8_t *mac, struct bridge_if *bif);
-
-struct tp_entry *bridge_addrs_bif_first(struct bridge_if *bif);
-
-struct tp_entry *bridge_addrs_bif_next(struct tp_entry *te);
-
-int bridge_getinfo_bif_addrs(struct bridge_if *bif);
-
-int bridge_update_addrs(struct bridge_if *bif);
-
-void bridge_addrs_dump(struct bridge_if *bif);
-
-/* Bridge PF. */
-
-void bridge_pf_dump(void);
-
-/* System specific. */
-
-/* Open the socket for the ioctls. */
-int bridge_ioctl_init(void);
-
-/* Load bridge kernel module. */
-int bridge_kmod_load(void);
-
-/* Get the bridge interface information. */
-int bridge_getinfo_bif(struct bridge_if *bif);
-
-/* Get the bridge interface STP parameters. */
-int bridge_get_op_param(struct bridge_if *bif);
-
-/* Set the bridge priority. */
-int bridge_set_priority(struct bridge_if *bif, int32_t priority);
-
-/* Set the bridge max age. */
-int bridge_set_maxage(struct bridge_if *bif, int32_t max_age);
-
-/* Set the bridge hello time.*/
-int bridge_set_hello_time(struct bridge_if *bif, int32_t hello_time);
-
-/* Set the bridge forward delay.*/
-int bridge_set_forward_delay(struct bridge_if *bif, int32_t fwd_delay);
-
-/* Set the bridge address cache max age. */
-int bridge_set_aging_time(struct bridge_if *bif, int32_t age_time);
-
-/* Set the max number of entries in the bridge address cache. */
-int bridge_set_max_cache(struct bridge_if *bif, int32_t max_cache);
-
-/* Set the bridge TX hold count. */
-int bridge_set_tx_hold_count(struct bridge_if *bif, int32_t tx_hc);
-
-/* Set the bridge STP protocol version. */
-int bridge_set_stp_version(struct bridge_if *bif, int32_t stp_proto);
-
-/* Set the bridge interface status to up/down. */
-int bridge_set_if_up(const char* b_name, int8_t up);
-
-/* Create a bridge interface. */
-int bridge_create(const char *b_name);
-
-/* Destroy a bridge interface. */
-int bridge_destroy(const char *b_name);
-
-/* Fetch the bridge mac address. */
-u_char *bridge_get_basemac(const char *bif_name, u_char *mac, size_t mlen);
-
-/* Set a bridge member priority. */
-int bridge_port_set_priority(const char *bif_name, struct bridge_port *bp,
- int32_t priority);
-
-/* Set a bridge member STP-enabled flag. */
-int bridge_port_set_stp_enable(const char *bif_name, struct bridge_port *bp,
- uint32_t enable);
-
-/* Set a bridge member STP path cost. */
-int bridge_port_set_path_cost(const char *bif_name, struct bridge_port *bp,
- int32_t path_cost);
-
-/* Set admin point-to-point link. */
-int bridge_port_set_admin_ptp(const char *bif_name, struct bridge_port *bp,
- uint32_t admin_ptp);
-
-/* Set admin edge. */
-int bridge_port_set_admin_edge(const char *bif_name, struct bridge_port *bp,
- uint32_t enable);
-
-/* Set 'private' flag. */
-int bridge_port_set_private(const char *bif_name, struct bridge_port *bp,
- uint32_t priv_set);
-
-/* Add a bridge member port. */
-int bridge_port_addm(struct bridge_port *bp, const char *b_name);
-
-/* Delete a bridge member port. */
-int bridge_port_delm(struct bridge_port *bp, const char *b_name);
-
-/* Get the current value from the module for bridge PF control. */
-int32_t bridge_get_pfval(uint8_t which);
-
-/* Get/Set a bridge PF control. */
-int32_t bridge_do_pfctl(int32_t bridge_ctl, enum snmp_op op, int32_t *val);
-
-#endif /* SNMP_BRIDGE_H */
diff --git a/include.new/bsnmp/snmp.h b/include.new/bsnmp/snmp.h
deleted file mode 100644
index 631d2f2..0000000
--- a/include.new/bsnmp/snmp.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- *
- * Copyright (c) 2010 The FreeBSD Foundation
- * All rights reserved.
- *
- * Portions of this software were developed by Shteryana Sotirova Shopova
- * 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 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 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.
- *
- * $Begemot: bsnmp/lib/snmp.h,v 1.30 2004/08/06 08:46:54 brandt Exp $
- *
- * Header file for SNMP functions.
- */
-#ifndef snmp_h_
-#define snmp_h_
-
-#include
-
-#define SNMP_COMMUNITY_MAXLEN 128
-#define SNMP_MAX_BINDINGS 100
-#define SNMP_CONTEXT_NAME_SIZ (32 + 1)
-#define SNMP_ENGINE_ID_SIZ 32
-#define SNMP_TIME_WINDOW 150
-
-enum snmp_syntax {
- SNMP_SYNTAX_NULL = 0,
- SNMP_SYNTAX_INTEGER, /* == INTEGER32 */
- SNMP_SYNTAX_OCTETSTRING,
- SNMP_SYNTAX_OID,
- SNMP_SYNTAX_IPADDRESS,
- SNMP_SYNTAX_COUNTER,
- SNMP_SYNTAX_GAUGE, /* == UNSIGNED32 */
- SNMP_SYNTAX_TIMETICKS,
-
- /* v2 additions */
- SNMP_SYNTAX_COUNTER64,
- SNMP_SYNTAX_NOSUCHOBJECT, /* exception */
- SNMP_SYNTAX_NOSUCHINSTANCE, /* exception */
- SNMP_SYNTAX_ENDOFMIBVIEW, /* exception */
-};
-
-struct snmp_value {
- struct asn_oid var;
- enum snmp_syntax syntax;
- union snmp_values {
- int32_t integer; /* also integer32 */
- struct {
- u_int len;
- u_char *octets;
- } octetstring;
- struct asn_oid oid;
- u_char ipaddress[4];
- uint32_t uint32; /* also gauge32, counter32,
- unsigned32, timeticks */
- uint64_t counter64;
- } v;
-};
-
-enum snmp_version {
- SNMP_Verr = 0,
- SNMP_V1 = 1,
- SNMP_V2c = 2,
- SNMP_V3,
-};
-
-#define SNMP_MPM_SNMP_V1 0
-#define SNMP_MPM_SNMP_V2c 1
-#define SNMP_MPM_SNMP_V3 3
-
-#define SNMP_ADM_STR32_SIZ (32 + 1)
-#define SNMP_AUTH_KEY_SIZ 40
-#define SNMP_PRIV_KEY_SIZ 32
-#define SNMP_USM_AUTH_SIZE 12
-#define SNMP_USM_PRIV_SIZE 8
-#define SNMP_AUTH_HMACMD5_KEY_SIZ 16
-#define SNMP_AUTH_HMACSHA_KEY_SIZ 20
-#define SNMP_PRIV_AES_KEY_SIZ 16
-#define SNMP_PRIV_DES_KEY_SIZ 8
-
-
-enum snmp_secmodel {
- SNMP_SECMODEL_ANY = 0,
- SNMP_SECMODEL_SNMPv1 = 1,
- SNMP_SECMODEL_SNMPv2c = 2,
- SNMP_SECMODEL_USM = 3,
- SNMP_SECMODEL_UNKNOWN
-};
-
-enum snmp_usm_level {
- SNMP_noAuthNoPriv = 1,
- SNMP_authNoPriv = 2,
- SNMP_authPriv = 3
-};
-
-enum snmp_authentication {
- SNMP_AUTH_NOAUTH = 0,
- SNMP_AUTH_HMAC_MD5,
- SNMP_AUTH_HMAC_SHA
-};
-
-enum snmp_privacy {
- SNMP_PRIV_NOPRIV = 0,
- SNMP_PRIV_DES = 1,
- SNMP_PRIV_AES
-};
-
-struct snmp_engine {
- uint8_t engine_id[SNMP_ENGINE_ID_SIZ];
- uint32_t engine_len;
- int32_t engine_boots;
- int32_t engine_time;
- int32_t max_msg_size;
-};
-
-struct snmp_user {
- char sec_name[SNMP_ADM_STR32_SIZ];
- enum snmp_authentication auth_proto;
- enum snmp_privacy priv_proto;
- uint8_t auth_key[SNMP_AUTH_KEY_SIZ];
- uint8_t priv_key[SNMP_PRIV_KEY_SIZ];
-};
-
-struct snmp_pdu {
- char community[SNMP_COMMUNITY_MAXLEN + 1];
- enum snmp_version version;
- u_int type;
-
- /* SNMPv3 PDU header fields */
- int32_t identifier;
- uint8_t flags;
- int32_t security_model;
- struct snmp_engine engine;
-
- /* Associated USM user parameters */
- struct snmp_user user;
- uint8_t msg_digest[SNMP_USM_AUTH_SIZE];
- uint8_t msg_salt[SNMP_USM_PRIV_SIZE];
-
- /* View-based Access Model */
- /* XXX: put in separate structure - conflicts with struct snmp_context */
- uint32_t context_engine_len;
- uint8_t context_engine[SNMP_ENGINE_ID_SIZ];
- char context_name[SNMP_CONTEXT_NAME_SIZ];
-
- /* trap only */
- struct asn_oid enterprise;
- u_char agent_addr[4];
- int32_t generic_trap;
- int32_t specific_trap;
- uint32_t time_stamp;
-
- /* others */
- int32_t request_id;
- int32_t error_status;
- int32_t error_index;
-
- /* fixes for encoding */
- size_t outer_len;
- size_t scoped_len;
- u_char *outer_ptr;
- u_char *digest_ptr;
- u_char *encrypted_ptr;
- u_char *scoped_ptr;
- u_char *pdu_ptr;
- u_char *vars_ptr;
-
-
- struct snmp_value bindings[SNMP_MAX_BINDINGS];
- u_int nbindings;
-};
-#define snmp_v1_pdu snmp_pdu
-
-#define SNMP_PDU_GET 0
-#define SNMP_PDU_GETNEXT 1
-#define SNMP_PDU_RESPONSE 2
-#define SNMP_PDU_SET 3
-#define SNMP_PDU_TRAP 4 /* v1 */
-#define SNMP_PDU_GETBULK 5 /* v2 */
-#define SNMP_PDU_INFORM 6 /* v2 */
-#define SNMP_PDU_TRAP2 7 /* v2 */
-#define SNMP_PDU_REPORT 8 /* v2 */
-
-#define SNMP_ERR_NOERROR 0
-#define SNMP_ERR_TOOBIG 1
-#define SNMP_ERR_NOSUCHNAME 2 /* v1 */
-#define SNMP_ERR_BADVALUE 3 /* v1 */
-#define SNMP_ERR_READONLY 4 /* v1 */
-#define SNMP_ERR_GENERR 5
-#define SNMP_ERR_NO_ACCESS 6 /* v2 */
-#define SNMP_ERR_WRONG_TYPE 7 /* v2 */
-#define SNMP_ERR_WRONG_LENGTH 8 /* v2 */
-#define SNMP_ERR_WRONG_ENCODING 9 /* v2 */
-#define SNMP_ERR_WRONG_VALUE 10 /* v2 */
-#define SNMP_ERR_NO_CREATION 11 /* v2 */
-#define SNMP_ERR_INCONS_VALUE 12 /* v2 */
-#define SNMP_ERR_RES_UNAVAIL 13 /* v2 */
-#define SNMP_ERR_COMMIT_FAILED 14 /* v2 */
-#define SNMP_ERR_UNDO_FAILED 15 /* v2 */
-#define SNMP_ERR_AUTH_ERR 16 /* v2 */
-#define SNMP_ERR_NOT_WRITEABLE 17 /* v2 */
-#define SNMP_ERR_INCONS_NAME 18 /* v2 */
-
-#define SNMP_TRAP_COLDSTART 0
-#define SNMP_TRAP_WARMSTART 1
-#define SNMP_TRAP_LINKDOWN 2
-#define SNMP_TRAP_LINKUP 3
-#define SNMP_TRAP_AUTHENTICATION_FAILURE 4
-#define SNMP_TRAP_EGP_NEIGHBOR_LOSS 5
-#define SNMP_TRAP_ENTERPRISE 6
-
-enum snmp_code {
- SNMP_CODE_OK = 0,
- SNMP_CODE_FAILED,
- SNMP_CODE_BADVERS,
- SNMP_CODE_BADLEN,
- SNMP_CODE_BADENC,
- SNMP_CODE_OORANGE,
- SNMP_CODE_BADSECLEVEL,
- SNMP_CODE_NOTINTIME,
- SNMP_CODE_BADUSER,
- SNMP_CODE_BADENGINE,
- SNMP_CODE_BADDIGEST,
- SNMP_CODE_EDECRYPT
-};
-
-#define SNMP_MSG_AUTH_FLAG 0x1
-#define SNMP_MSG_PRIV_FLAG 0x2
-#define SNMP_MSG_REPORT_FLAG 0x4
-#define SNMP_MSG_AUTODISCOVER 0x80
-
-void snmp_value_free(struct snmp_value *);
-int snmp_value_parse(const char *, enum snmp_syntax, union snmp_values *);
-int snmp_value_copy(struct snmp_value *, const struct snmp_value *);
-
-void snmp_pdu_free(struct snmp_pdu *);
-void snmp_pdu_init_secparams(struct snmp_pdu *);
-enum snmp_code snmp_pdu_decode(struct asn_buf *b, struct snmp_pdu *pdu, int32_t *);
-enum snmp_code snmp_pdu_decode_header(struct asn_buf *, struct snmp_pdu *);
-enum snmp_code snmp_pdu_decode_scoped(struct asn_buf *, struct snmp_pdu *, int32_t *);
-enum snmp_code snmp_pdu_encode(struct snmp_pdu *, struct asn_buf *);
-enum snmp_code snmp_pdu_decode_secmode(struct asn_buf *, struct snmp_pdu *);
-
-int snmp_pdu_snoop(const struct asn_buf *);
-
-void snmp_pdu_dump(const struct snmp_pdu *pdu);
-
-enum snmp_code snmp_passwd_to_keys(struct snmp_user *, char *);
-enum snmp_code snmp_get_local_keys(struct snmp_user *, uint8_t *, uint32_t);
-enum snmp_code snmp_calc_keychange(struct snmp_user *, uint8_t *);
-
-extern void (*snmp_error)(const char *, ...);
-extern void (*snmp_printf)(const char *, ...);
-
-#define TRUTH_MK(F) ((F) ? 1 : 2)
-#define TRUTH_GET(T) (((T) == 1) ? 1 : 0)
-#define TRUTH_OK(T) ((T) == 1 || (T) == 2)
-
-#endif
diff --git a/include.new/bsnmp/snmp_atm.h b/include.new/bsnmp/snmp_atm.h
deleted file mode 100644
index 50784cc..0000000
--- a/include.new/bsnmp/snmp_atm.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2001-2002
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- * Copyright (c) 2003-2004
- * Hartmut Brandt
- * All rights reserved.
- *
- * Author: Hartmut Brandt
- *
- * 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 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 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.
- *
- * $Begemot: libunimsg/snmp_atm/snmp_atm.h,v 1.2 2004/08/06 17:30:40 brandt Exp $
- */
-#ifndef _BSNMP_SNMP_ATM_H
-#define _BSNMP_SNMP_ATM_H
-
-enum atmif_notify {
- ATMIF_NOTIFY_DESTROY, /* interface has been destroyed */
- ATMIF_NOTIFY_CARRIER, /* carriere change */
- ATMIF_NOTIFY_VCC /* VCC change */
-};
-
-enum atmif_carrier_state {
- ATMIF_CARRIER_ON = 1,
- ATMIF_CARRIER_OFF = 2,
- ATMIF_CARRIER_UNKNOWN = 3,
- ATMIF_CARRIER_NONE = 4
-};
-
-enum atmif_suni_mode {
- ATMIF_SUNI_MODE_SONET = 1,
- ATMIF_SUNI_MODE_SDH = 2,
- ATMIF_SUNI_MODE_UNKNOWN = 3
-};
-
-/* forward declaration */
-struct atmif;
-typedef void (*atmif_event_f)(struct atmif *, enum atmif_notify, uintptr_t,
- void *);
-
-struct atmif_mib {
- u_int version; /* currently 0 */
-
- u_int device; /* type of hardware (system specific) */
- u_int serial; /* card serial number (device specific) */
- u_int hw_version; /* card version (device specific) */
- u_int sw_version; /* firmware version (device specific) */
- u_int media; /* physical media (see MIB) */
-
- u_char esi[6]; /* end system identifier (MAC) */
- u_int pcr; /* supported peak cell rate */
- u_int vpi_bits; /* number of used bits in VPI field */
- u_int vci_bits; /* number of used bits in VCI field */
- u_int max_vpcs; /* maximum number of VPCs */
- u_int max_vccs; /* maximum number of VCCs */
-};
-
-struct atmif {
- struct mibif *ifp; /* common interface data */
- struct atmif_mib *mib; /* ATM MIB */
- enum atmif_carrier_state carrier;
- enum atmif_suni_mode mode; /* SUNI mode SDH or SONET */
-};
-
-/* find an ATM interface by name */
-struct atmif *atm_find_if_name(const char *);
-
-/* get the interface from the interface index */
-struct atmif *atm_find_if(u_int);
-
-/* register for notifications */
-void *atm_notify_aif(struct atmif *, const struct lmodule *mod,
- atmif_event_f, void *);
-void atm_unnotify_aif(void *);
-
-/* return the If for a system-specific node number */
-struct atmif *atm_node2if(u_int);
-
-/* return the node id for the if */
-u_int atm_if2node(struct atmif *);
-
-#endif
diff --git a/include.new/bsnmp/snmp_mibII.h b/include.new/bsnmp/snmp_mibII.h
deleted file mode 100644
index 91e552e..0000000
--- a/include.new/bsnmp/snmp_mibII.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- *
- * 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 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 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.
- *
- * $Begemot: bsnmp/snmp_mibII/snmp_mibII.h,v 1.18 2006/02/14 09:04:19 brandt_h Exp $
- *
- * Implementation of the interfaces and IP groups of MIB-II.
- */
-#ifndef snmp_mibII_h_
-#define snmp_mibII_h_
-
-/* forward declaration */
-struct mibif;
-
-enum mibif_notify {
- MIBIF_NOTIFY_DESTROY
-};
-
-typedef void (*mibif_notify_f)(struct mibif *, enum mibif_notify, void *);
-
-/*
- * Interfaces. This structure describes one interface as seen in the MIB.
- * Interfaces are indexed by ifindex. This is not the same as the index
- * used by the system because of the rules in RFC-2863 section 3.1.5. This
- * RFC requires, that an ifindex is not to be re-used for ANOTHER dynamically
- * interfaces once the interface was deleted. The system's ifindex is in
- * sysindex. Mapping is via the mapping table below.
- */
-struct mibif {
- TAILQ_ENTRY(mibif) link;
- u_int flags;
- u_int index; /* the logical ifindex */
- u_int sysindex;
- char name[IFNAMSIZ];
- char descr[256];
- struct ifmibdata mib;
- uint64_t mibtick;
- void *specmib;
- size_t specmiblen;
- u_char *physaddr;
- u_int physaddrlen;
- int has_connector;
- int trap_enable;
- uint64_t counter_disc;
-
- /*
- * This is needed to handle interface type specific information
- * in sub-modules. It contains a function pointer which handles
- * notifications and a data pointer to arbitrary data.
- * Should be set via the mibif_notify function.
- */
- mibif_notify_f xnotify;
- void *xnotify_data;
- const struct lmodule *xnotify_mod;
-
- /* to be set by ifType specific modules. This is ifSpecific. */
- struct asn_oid spec_oid;
-
- /* private data - don't touch */
- void *private;
-};
-
-/*
- * Interface IP-address table.
- */
-struct mibifa {
- TAILQ_ENTRY(mibifa) link;
- struct in_addr inaddr;
- struct in_addr inmask;
- struct in_addr inbcast;
- struct asn_oid index; /* index for table search */
- u_int ifindex;
- u_int flags;
-};
-
-/*
- * Interface receive addresses. Interface link-level multicast, broadcast
- * and hardware addresses are handled automatically.
- */
-struct mibrcvaddr {
- TAILQ_ENTRY(mibrcvaddr) link;
- struct asn_oid index;
- u_int ifindex;
- u_char addr[ASN_MAXOIDLEN];
- size_t addrlen;
- u_int flags;
-};
-enum {
- MIBRCVADDR_VOLATILE = 0x00000001,
- MIBRCVADDR_BCAST = 0x00000002,
- MIBRCVADDR_HW = 0x00000004,
-};
-
-/* network socket */
-extern int mib_netsock;
-
-/* set an interface name to dynamic mode */
-void mib_if_set_dyn(const char *);
-
-/* re-read the systems interface list */
-void mib_refresh_iflist(void);
-
-/* find interface by index */
-struct mibif *mib_find_if(u_int);
-struct mibif *mib_find_if_sys(u_int);
-struct mibif *mib_find_if_name(const char *);
-
-/* iterate through all interfaces */
-struct mibif *mib_first_if(void);
-struct mibif *mib_next_if(const struct mibif *);
-
-/* register for interface creations */
-int mib_register_newif(int (*)(struct mibif *), const struct lmodule *);
-void mib_unregister_newif(const struct lmodule *);
-
-/* get fresh MIB data */
-int mib_fetch_ifmib(struct mibif *);
-
-/* change the ADMIN status of an interface and refresh the MIB */
-int mib_if_admin(struct mibif *, int up);
-
-/* find interface address by address */
-struct mibifa *mib_find_ifa(struct in_addr);
-
-/* find first/next address for a given interface */
-struct mibifa *mib_first_ififa(const struct mibif *);
-struct mibifa *mib_next_ififa(struct mibifa *);
-
-/* create/delete stacking entries */
-int mib_ifstack_create(const struct mibif *lower, const struct mibif *upper);
-void mib_ifstack_delete(const struct mibif *lower, const struct mibif *upper);
-
-/* find receive address */
-struct mibrcvaddr *mib_find_rcvaddr(u_int, const u_char *, size_t);
-
-/* create/delete receive addresses */
-struct mibrcvaddr *mib_rcvaddr_create(struct mibif *, const u_char *, size_t);
-void mib_rcvaddr_delete(struct mibrcvaddr *);
-
-/* register for interface notification */
-void *mibif_notify(struct mibif *, const struct lmodule *, mibif_notify_f,
- void *);
-void mibif_unnotify(void *);
-
-#endif
diff --git a/include.new/bsnmp/snmp_netgraph.h b/include.new/bsnmp/snmp_netgraph.h
deleted file mode 100644
index 780c5b4..0000000
--- a/include.new/bsnmp/snmp_netgraph.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- *
- * Redistribution of this software and documentation 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 or documentation 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 AND DOCUMENTATION IS PROVIDED BY FRAUNHOFER FOKUS
- * AND ITS 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
- * FRAUNHOFER FOKUS OR ITS 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: releng/10.2/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.h 122405 2003-11-10 09:17:34Z harti $
- *
- * Netgraph interface for SNMPd. Exported stuff.
- */
-#ifndef SNMP_NETGRAPH_H_
-#define SNMP_NETGRAPH_H_
-
-#include
-
-extern ng_ID_t snmp_node;
-extern u_char *snmp_nodename;
-
-typedef void ng_cookie_f(const struct ng_mesg *, const char *, ng_ID_t, void *);
-typedef void ng_hook_f(const char *, const u_char *, size_t, void *);
-
-void *ng_register_cookie(const struct lmodule *, uint32_t cookie,
- ng_ID_t, ng_cookie_f *, void *);
-void ng_unregister_cookie(void *reg);
-
-void *ng_register_hook(const struct lmodule *, const char *,
- ng_hook_f *, void *);
-void ng_unregister_hook(void *reg);
-
-void ng_unregister_module(const struct lmodule *);
-
-int ng_output(const char *path, u_int cookie, u_int opcode,
- const void *arg, size_t arglen);
-int ng_output_node(const char *node, u_int cookie, u_int opcode,
- const void *arg, size_t arglen);
-int ng_output_id(ng_ID_t node, u_int cookie, u_int opcode,
- const void *arg, size_t arglen);
-
-struct ng_mesg *ng_dialog(const char *path, u_int cookie, u_int opcode,
- const void *arg, size_t arglen);
-struct ng_mesg *ng_dialog_node(const char *node, u_int cookie, u_int opcode,
- const void *arg, size_t arglen);
-struct ng_mesg *ng_dialog_id(ng_ID_t id, u_int cookie, u_int opcode,
- const void *arg, size_t arglen);
-
-int ng_send_data(const char *hook, const void *sndbuf, size_t sndlen);
-
-ng_ID_t ng_mkpeer_id(ng_ID_t, const char *name, const char *type,
- const char *hook, const char *peerhook);
-int ng_connect_node(const char *node, const char *ourhook, const char *peerhook);
-int ng_connect_id(ng_ID_t id, const char *ourhook, const char *peerhook);
-int ng_connect2_id(ng_ID_t id, ng_ID_t peer, const char *ourhook,
- const char *peerhook);
-int ng_connect2_tee_id(ng_ID_t id, ng_ID_t peer, const char *ourhook,
- const char *peerhook);
-int ng_rmhook(const char *ourhook);
-int ng_rmhook_id(ng_ID_t, const char *);
-int ng_rmhook_tee_id(ng_ID_t, const char *);
-int ng_shutdown_id(ng_ID_t);
-
-ng_ID_t ng_next_node_id(ng_ID_t node, const char *type, const char *hook);
-ng_ID_t ng_node_id(const char *path);
-ng_ID_t ng_node_id_node(const char *node);
-ng_ID_t ng_node_name(ng_ID_t, char *);
-ng_ID_t ng_node_type(ng_ID_t, char *);
-int ng_peer_hook_id(ng_ID_t, const char *, char *);
-
-#endif
diff --git a/include.new/bsnmp/snmpagent.h b/include.new/bsnmp/snmpagent.h
deleted file mode 100644
index 66019c9..0000000
--- a/include.new/bsnmp/snmpagent.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- *
- * 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 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 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.
- *
- * $Begemot: bsnmp/lib/snmpagent.h,v 1.13 2004/08/06 08:46:56 brandt Exp $
- *
- * Header file for SNMP functions. This requires snmp.h to be included.
- */
-#ifndef snmp_agent_h_
-#define snmp_agent_h_
-
-struct snmp_dependency;
-
-enum snmp_ret {
- /* OK, generate a response */
- SNMP_RET_OK = 0,
- /* Error, ignore packet (no response) */
- SNMP_RET_IGN = 1,
- /* Error, generate response from original packet */
- SNMP_RET_ERR = 2
-};
-
-/* Semi-Opaque object for SET operations */
-struct snmp_context {
- u_int var_index;
- struct snmp_scratch *scratch;
- struct snmp_dependency *dep;
- void *data; /* user data */
- enum snmp_ret code; /* return code */
-};
-
-struct snmp_scratch {
- void *ptr1;
- void *ptr2;
- uint32_t int1;
- uint32_t int2;
-};
-
-enum snmp_depop {
- SNMP_DEPOP_COMMIT,
- SNMP_DEPOP_ROLLBACK,
- SNMP_DEPOP_FINISH
-};
-
-typedef int (*snmp_depop_t)(struct snmp_context *, struct snmp_dependency *,
- enum snmp_depop);
-
-struct snmp_dependency {
- struct asn_oid obj;
- struct asn_oid idx;
-};
-
-/*
- * The TREE
- */
-enum snmp_node_type {
- SNMP_NODE_LEAF = 1,
- SNMP_NODE_COLUMN
-};
-
-enum snmp_op {
- SNMP_OP_GET = 1,
- SNMP_OP_GETNEXT,
- SNMP_OP_SET,
- SNMP_OP_COMMIT,
- SNMP_OP_ROLLBACK,
-};
-
-typedef int (*snmp_op_t)(struct snmp_context *, struct snmp_value *,
- u_int, u_int, enum snmp_op);
-
-struct snmp_node {
- struct asn_oid oid;
- const char *name; /* name of the leaf */
- enum snmp_node_type type; /* type of this node */
- enum snmp_syntax syntax;
- snmp_op_t op;
- u_int flags;
- uint32_t index; /* index data */
- void *data; /* application data */
- void *tree_data; /* application data */
-};
-extern struct snmp_node *tree;
-extern u_int tree_size;
-
-#define SNMP_NODE_CANSET 0x0001 /* SET allowed */
-
-#define SNMP_INDEXES_MAX 7
-#define SNMP_INDEX_SHIFT 4
-#define SNMP_INDEX_MASK 0xf
-#define SNMP_INDEX_COUNT(V) ((V) & SNMP_INDEX_MASK)
-#define SNMP_INDEX(V,I) \
- (((V) >> (((I) + 1) * SNMP_INDEX_SHIFT)) & SNMP_INDEX_MASK)
-
-enum {
- SNMP_TRACE_GET = 0x00000001,
- SNMP_TRACE_GETNEXT = 0x00000002,
- SNMP_TRACE_SET = 0x00000004,
- SNMP_TRACE_DEPEND = 0x00000008,
- SNMP_TRACE_FIND = 0x00000010,
-};
-/* trace flag for the following functions */
-extern u_int snmp_trace;
-
-/* called to write the trace */
-extern void (*snmp_debug)(const char *fmt, ...);
-
-enum snmp_ret snmp_get(struct snmp_pdu *pdu, struct asn_buf *resp_b,
- struct snmp_pdu *resp, void *);
-enum snmp_ret snmp_getnext(struct snmp_pdu *pdu, struct asn_buf *resp_b,
- struct snmp_pdu *resp, void *);
-enum snmp_ret snmp_getbulk(struct snmp_pdu *pdu, struct asn_buf *resp_b,
- struct snmp_pdu *resp, void *);
-enum snmp_ret snmp_set(struct snmp_pdu *pdu, struct asn_buf *resp_b,
- struct snmp_pdu *resp, void *);
-
-enum snmp_ret snmp_make_errresp(const struct snmp_pdu *, struct asn_buf *,
- struct asn_buf *);
-
-struct snmp_dependency *snmp_dep_lookup(struct snmp_context *,
- const struct asn_oid *, const struct asn_oid *, size_t, snmp_depop_t);
-
-struct snmp_context *snmp_init_context(void);
-int snmp_dep_commit(struct snmp_context *);
-int snmp_dep_rollback(struct snmp_context *);
-void snmp_dep_finish(struct snmp_context *);
-
-#endif
diff --git a/include.new/bsnmp/snmpclient.h b/include.new/bsnmp/snmpclient.h
deleted file mode 100644
index 619f726..0000000
--- a/include.new/bsnmp/snmpclient.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- * Kendy Kutzner
- *
- * 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 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 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.
- *
- * $Begemot: bsnmp/lib/snmpclient.h,v 1.19 2005/05/23 11:10:14 brandt_h Exp $
- */
-#ifndef _BSNMP_SNMPCLIENT_H
-#define _BSNMP_SNMPCLIENT_H
-
-#include
-#include
-#include
-#include
-#include
-
-
-#define SNMP_STRERROR_LEN 200
-
-#define SNMP_LOCAL_PATH "/tmp/snmpXXXXXXXXXXXXXX"
-
-/*
- * transport methods
- */
-#define SNMP_TRANS_UDP 0
-#define SNMP_TRANS_LOC_DGRAM 1
-#define SNMP_TRANS_LOC_STREAM 2
-
-/* type of callback function for responses
- * this callback function is responsible for free() any memory associated with
- * any of the PDUs. Therefor it may call snmp_pdu_free() */
-typedef void (*snmp_send_cb_f)(struct snmp_pdu *, struct snmp_pdu *, void *);
-
-/* type of callback function for timeouts */
-typedef void (*snmp_timeout_cb_f)(void * );
-
-/* timeout start function */
-typedef void *(*snmp_timeout_start_f)(struct timeval *timeout,
- snmp_timeout_cb_f callback, void *);
-
-/* timeout stop function */
-typedef void (*snmp_timeout_stop_f)(void *timeout_id);
-
-/*
- * Client context.
- */
-struct snmp_client {
- enum snmp_version version;
- int trans; /* which transport to use */
-
- /* these two are read-only for the application */
- char *cport; /* port number as string */
- char *chost; /* host name or IP address as string */
-
- char read_community[SNMP_COMMUNITY_MAXLEN + 1];
- char write_community[SNMP_COMMUNITY_MAXLEN + 1];
-
- /* SNMPv3 specific fields */
- int32_t identifier;
- int32_t security_model;
- struct snmp_engine engine;
- struct snmp_user user;
-
- /* SNMPv3 Access control - VACM*/
- uint32_t clen;
- uint8_t cengine[SNMP_ENGINE_ID_SIZ];
- char cname[SNMP_CONTEXT_NAME_SIZ];
-
- struct timeval timeout;
- u_int retries;
-
- int dump_pdus;
-
- size_t txbuflen;
- size_t rxbuflen;
-
- int fd;
-
- int32_t next_reqid;
- int32_t max_reqid;
- int32_t min_reqid;
-
- char error[SNMP_STRERROR_LEN];
-
- snmp_timeout_start_f timeout_start;
- snmp_timeout_stop_f timeout_stop;
-
- char local_path[sizeof(SNMP_LOCAL_PATH)];
-};
-
-/* the global context */
-extern struct snmp_client snmp_client;
-
-/* initizialies a snmp_client structure */
-void snmp_client_init(struct snmp_client *);
-
-/* initialize fields */
-int snmp_client_set_host(struct snmp_client *, const char *);
-int snmp_client_set_port(struct snmp_client *, const char *);
-
-/* open connection to snmp server (hostname or portname can be NULL) */
-int snmp_open(const char *_hostname, const char *_portname,
- const char *_read_community, const char *_write_community);
-
-/* close connection */
-void snmp_close(void);
-
-/* initialize a snmp_pdu structure */
-void snmp_pdu_create(struct snmp_pdu *, u_int _op);
-
-/* add pairs of (struct asn_oid *, enum snmp_syntax) to an existing pdu */
-int snmp_add_binding(struct snmp_pdu *, ...);
-
-/* check wheater the answer is valid or not */
-int snmp_pdu_check(const struct snmp_pdu *_req, const struct snmp_pdu *_resp);
-
-int32_t snmp_pdu_send(struct snmp_pdu *_pdu, snmp_send_cb_f _func, void *_arg);
-
-/* append an index to an oid */
-int snmp_oid_append(struct asn_oid *_oid, const char *_fmt, ...);
-
-/* receive a packet */
-int snmp_receive(int _blocking);
-
-/*
- * This structure is used to describe an SNMP table that is to be fetched.
- * The C-structure that is produced by the fetch function must start with
- * a TAILQ_ENTRY and an u_int64_t.
- */
-struct snmp_table {
- /* base OID of the table */
- struct asn_oid table;
- /* type OID of the LastChange variable for the table if any */
- struct asn_oid last_change;
- /* maximum number of iterations if table has changed */
- u_int max_iter;
- /* size of the C-structure */
- size_t entry_size;
- /* number of index fields */
- u_int index_size;
- /* bit mask of required fields */
- uint64_t req_mask;
-
- /* indexes and columns to fetch. Ended by a NULL syntax entry */
- struct snmp_table_entry {
- /* the column sub-oid, ignored for index fields */
- asn_subid_t subid;
- /* the syntax of the column or index */
- enum snmp_syntax syntax;
- /* offset of the field into the C-structure. For octet strings
- * this points to an u_char * followed by a size_t */
- off_t offset;
-#if defined(__GNUC__) && __GNUC__ < 3
- } entries[0];
-#else
- } entries[];
-#endif
-};
-
-/* callback type for table fetch */
-typedef void (*snmp_table_cb_f)(void *_list, void *_arg, int _res);
-
-/* fetch a table. The argument points to a TAILQ_HEAD */
-int snmp_table_fetch(const struct snmp_table *descr, void *);
-int snmp_table_fetch_async(const struct snmp_table *, void *,
- snmp_table_cb_f, void *);
-
-/* send a request and wait for the response */
-int snmp_dialog(struct snmp_pdu *_req, struct snmp_pdu *_resp);
-
-/* discover an authorative snmpEngineId */
-int snmp_discover_engine(char *);
-
-/* parse a server specification */
-int snmp_parse_server(struct snmp_client *, const char *);
-
-#endif /* _BSNMP_SNMPCLIENT_H */
diff --git a/include.new/bsnmp/snmpmod.h b/include.new/bsnmp/snmpmod.h
deleted file mode 100644
index 4abc460..0000000
--- a/include.new/bsnmp/snmpmod.h
+++ /dev/null
@@ -1,625 +0,0 @@
-/*
- * Copyright (c) 2001-2003
- * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
- * All rights reserved.
- *
- * Author: Harti Brandt
- *
- * Copyright (c) 2010 The FreeBSD Foundation
- * All rights reserved.
- *
- * Portions of this software were developed by Shteryana Sotirova Shopova
- * 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 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 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.
- *
- * $Begemot: bsnmp/snmpd/snmpmod.h,v 1.32 2006/02/14 09:04:20 brandt_h Exp $
- *
- * SNMP daemon data and functions exported to modules.
- */
-#ifndef snmpmod_h_
-#define snmpmod_h_
-
-#include
-#include
-#include
-#include
-#include
-#include "asn1.h"
-#include "snmp.h"
-#include "snmpagent.h"
-
-#define MAX_MOD_ARGS 16
-
-/*
- * These macros help to handle object lists for SNMP tables. They use
- * tail queues to hold the objects in ascending order in the list.
- * ordering can be done either on an integer/unsigned field, an asn_oid
- * or an ordering function.
- */
-#define INSERT_OBJECT_OID_LINK_INDEX(PTR, LIST, LINK, INDEX) do { \
- __typeof (PTR) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if (asn_compare_oid(&_lelem->INDEX, &(PTR)->INDEX) > 0) \
- break; \
- if (_lelem == NULL) \
- TAILQ_INSERT_TAIL((LIST), (PTR), LINK); \
- else \
- TAILQ_INSERT_BEFORE(_lelem, (PTR), LINK); \
- } while (0)
-
-#define INSERT_OBJECT_INT_LINK_INDEX(PTR, LIST, LINK, INDEX) do { \
- __typeof (PTR) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if ((asn_subid_t)_lelem->INDEX > (asn_subid_t)(PTR)->INDEX)\
- break; \
- if (_lelem == NULL) \
- TAILQ_INSERT_TAIL((LIST), (PTR), LINK); \
- else \
- TAILQ_INSERT_BEFORE(_lelem, (PTR), LINK); \
- } while (0)
-
-#define INSERT_OBJECT_FUNC_LINK(PTR, LIST, LINK, FUNC) do { \
- __typeof (PTR) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if ((FUNC)(_lelem, (PTR)) > 0) \
- break; \
- if (_lelem == NULL) \
- TAILQ_INSERT_TAIL((LIST), (PTR), LINK); \
- else \
- TAILQ_INSERT_BEFORE(_lelem, (PTR), LINK); \
- } while (0)
-
-#define INSERT_OBJECT_FUNC_LINK_REV(PTR, LIST, HEAD, LINK, FUNC) do { \
- __typeof (PTR) _lelem; \
- \
- TAILQ_FOREACH_REVERSE(_lelem, (LIST), HEAD, LINK) \
- if ((FUNC)(_lelem, (PTR)) < 0) \
- break; \
- if (_lelem == NULL) \
- TAILQ_INSERT_HEAD((LIST), (PTR), LINK); \
- else \
- TAILQ_INSERT_AFTER((LIST), _lelem, (PTR), LINK); \
- } while (0)
-
-#define FIND_OBJECT_OID_LINK_INDEX(LIST, OID, SUB, LINK, INDEX) ({ \
- __typeof (TAILQ_FIRST(LIST)) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if (index_compare(OID, SUB, &_lelem->INDEX) == 0) \
- break; \
- (_lelem); \
- })
-
-#define NEXT_OBJECT_OID_LINK_INDEX(LIST, OID, SUB, LINK, INDEX) ({ \
- __typeof (TAILQ_FIRST(LIST)) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if (index_compare(OID, SUB, &_lelem->INDEX) < 0) \
- break; \
- (_lelem); \
- })
-
-#define FIND_OBJECT_INT_LINK_INDEX(LIST, OID, SUB, LINK, INDEX) ({ \
- __typeof (TAILQ_FIRST(LIST)) _lelem; \
- \
- if ((OID)->len - SUB != 1) \
- _lelem = NULL; \
- else \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if ((OID)->subs[SUB] == (asn_subid_t)_lelem->INDEX)\
- break; \
- (_lelem); \
- })
-
-#define NEXT_OBJECT_INT_LINK_INDEX(LIST, OID, SUB, LINK, INDEX) ({ \
- __typeof (TAILQ_FIRST(LIST)) _lelem; \
- \
- if ((OID)->len - SUB == 0) \
- _lelem = TAILQ_FIRST(LIST); \
- else \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if ((OID)->subs[SUB] < (asn_subid_t)_lelem->INDEX)\
- break; \
- (_lelem); \
- })
-
-#define FIND_OBJECT_FUNC_LINK(LIST, OID, SUB, LINK, FUNC) ({ \
- __typeof (TAILQ_FIRST(LIST)) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if ((FUNC)(OID, SUB, _lelem) == 0) \
- break; \
- (_lelem); \
- })
-
-#define NEXT_OBJECT_FUNC_LINK(LIST, OID, SUB, LINK, FUNC) ({ \
- __typeof (TAILQ_FIRST(LIST)) _lelem; \
- \
- TAILQ_FOREACH(_lelem, (LIST), LINK) \
- if ((FUNC)(OID, SUB, _lelem) < 0) \
- break; \
- (_lelem); \
- })
-
-/*
- * Macros for the case where the index field is called 'index'
- */
-#define INSERT_OBJECT_OID_LINK(PTR, LIST, LINK) \
- INSERT_OBJECT_OID_LINK_INDEX(PTR, LIST, LINK, index)
-
-#define INSERT_OBJECT_INT_LINK(PTR, LIST, LINK) do { \
- INSERT_OBJECT_INT_LINK_INDEX(PTR, LIST, LINK, index)
-
-#define FIND_OBJECT_OID_LINK(LIST, OID, SUB, LINK) \
- FIND_OBJECT_OID_LINK_INDEX(LIST, OID, SUB, LINK, index)
-
-#define NEXT_OBJECT_OID_LINK(LIST, OID, SUB, LINK) \
- NEXT_OBJECT_OID_LINK_INDEX(LIST, OID, SUB, LINK, index)
-
-#define FIND_OBJECT_INT_LINK(LIST, OID, SUB, LINK) \
- FIND_OBJECT_INT_LINK_INDEX(LIST, OID, SUB, LINK, index)
-
-#define NEXT_OBJECT_INT_LINK(LIST, OID, SUB, LINK) \
- NEXT_OBJECT_INT_LINK_INDEX(LIST, OID, SUB, LINK, index)
-
-/*
- * Macros for the case where the index field is called 'index' and the
- * link field 'link'.
- */
-#define INSERT_OBJECT_OID(PTR, LIST) \
- INSERT_OBJECT_OID_LINK_INDEX(PTR, LIST, link, index)
-
-#define INSERT_OBJECT_INT(PTR, LIST) \
- INSERT_OBJECT_INT_LINK_INDEX(PTR, LIST, link, index)
-
-#define INSERT_OBJECT_FUNC_REV(PTR, LIST, HEAD, FUNC) \
- INSERT_OBJECT_FUNC_LINK_REV(PTR, LIST, HEAD, link, FUNC)
-
-#define FIND_OBJECT_OID(LIST, OID, SUB) \
- FIND_OBJECT_OID_LINK_INDEX(LIST, OID, SUB, link, index)
-
-#define FIND_OBJECT_INT(LIST, OID, SUB) \
- FIND_OBJECT_INT_LINK_INDEX(LIST, OID, SUB, link, index)
-
-#define FIND_OBJECT_FUNC(LIST, OID, SUB, FUNC) \
- FIND_OBJECT_FUNC_LINK(LIST, OID, SUB, link, FUNC)
-
-#define NEXT_OBJECT_OID(LIST, OID, SUB) \
- NEXT_OBJECT_OID_LINK_INDEX(LIST, OID, SUB, link, index)
-
-#define NEXT_OBJECT_INT(LIST, OID, SUB) \
- NEXT_OBJECT_INT_LINK_INDEX(LIST, OID, SUB, link, index)
-
-#define NEXT_OBJECT_FUNC(LIST, OID, SUB, FUNC) \
- NEXT_OBJECT_FUNC_LINK(LIST, OID, SUB, link, FUNC)
-
-struct lmodule;
-
-/* The tick when the program was started. This is the absolute time of
- * the start in 100th of a second. */
-extern uint64_t start_tick;
-
-/* The tick when the current packet was received. This is the absolute
- * time in 100th of second. */
-extern uint64_t this_tick;
-
-/* Get the current absolute time in 100th of a second. */
-uint64_t get_ticks(void);
-
-/*
- * Return code for proxy function
- */
-enum snmpd_proxy_err {
- /* proxy code will process the PDU */
- SNMPD_PROXY_OK,
- /* proxy code does not process PDU */
- SNMPD_PROXY_REJ,
- /* drop this PDU */
- SNMPD_PROXY_DROP,
- /* drop because of bad community */
- SNMPD_PROXY_BADCOMM,
- /* drop because of bad community use */
- SNMPD_PROXY_BADCOMMUSE
-};
-
-/*
- * Input handling
- */
-enum snmpd_input_err {
- /* proceed with packet */
- SNMPD_INPUT_OK,
- /* fatal error in packet, ignore it */
- SNMPD_INPUT_FAILED,
- /* value encoding has wrong length in a SET operation */
- SNMPD_INPUT_VALBADLEN,
- /* value encoding is out of range */
- SNMPD_INPUT_VALRANGE,
- /* value has bad encoding */
- SNMPD_INPUT_VALBADENC,
- /* need more data (truncated packet) */
- SNMPD_INPUT_TRUNC,
- /* unknown community */
- SNMPD_INPUT_BAD_COMM,
-};
-
-/*
- * Every loadable module must have one of this structures with
- * the external name 'config'.
- */
-struct snmp_module {
- /* a comment describing what this module implements */
- const char *comment;
-
- /* the initialization function */
- int (*init)(struct lmodule *, int argc, char *argv[]);
-
- /* the finalisation function */
- int (*fini)(void);
-
- /* the idle function */
- void (*idle)(void);
-
- /* the dump function */
- void (*dump)(void);
-
- /* re-configuration function */
- void (*config)(void);
-
- /* start operation */
- void (*start)(void);
-
- /* proxy a PDU */
- enum snmpd_proxy_err (*proxy)(struct snmp_pdu *, void *,
- const struct asn_oid *, const struct sockaddr *, socklen_t,
- enum snmpd_input_err, int32_t, int);
-
- /* the tree this module is going to server */
- const struct snmp_node *tree;
- u_int tree_size;
-
- /* function called, when another module was unloaded/loaded */
- void (*loading)(const struct lmodule *, int);
-};
-
-/*
- * Stuff exported to modules
- */
-
-/*
- * The system group.
- */
-struct systemg {
- u_char *descr;
- struct asn_oid object_id;
- u_char *contact;
- u_char *name;
- u_char *location;
- uint32_t services;
- uint32_t or_last_change;
-};
-extern struct systemg systemg;
-
-/*
- * Community support.
- *
- * We have 2 fixed communities for SNMP read and write access. Modules
- * can create their communities dynamically. They are deleted automatically
- * if the module is unloaded.
- */
-#define COMM_INITIALIZE 0
-#define COMM_READ 1
-#define COMM_WRITE 2
-
-u_int comm_define(u_int, const char *descr, struct lmodule *, const char *str);
-const char * comm_string(u_int);
-
-/* community for current packet */
-extern u_int community;
-
-/*
- * SNMP User-based Security Model data. Modified via the snmp_usm(3) module.
- */
-struct snmpd_usmstat {
- uint32_t unsupported_seclevels;
- uint32_t not_in_time_windows;
- uint32_t unknown_users;
- uint32_t unknown_engine_ids;
- uint32_t wrong_digests;
- uint32_t decrypt_errors;
-};
-
-extern struct snmpd_usmstat snmpd_usmstats;
-struct snmpd_usmstat *bsnmpd_get_usm_stats(void);
-void bsnmpd_reset_usm_stats(void);
-
-struct usm_user {
- struct snmp_user suser;
- uint8_t user_engine_id[SNMP_ENGINE_ID_SIZ];
- uint32_t user_engine_len;
- char user_public[SNMP_ADM_STR32_SIZ];
- uint32_t user_public_len;
- int32_t status;
- int32_t type;
- SLIST_ENTRY(usm_user) up;
-};
-
-SLIST_HEAD(usm_userlist, usm_user);
-struct usm_user *usm_first_user(void);
-struct usm_user *usm_next_user(struct usm_user *);
-struct usm_user *usm_find_user(uint8_t *, uint32_t, char *);
-struct usm_user *usm_new_user(uint8_t *, uint32_t, char *);
-void usm_delete_user(struct usm_user *);
-void usm_flush_users(void);
-
-/* USM user for current packet */
-extern struct usm_user *usm_user;
-
-/*
- * SNMP View-based Access Control Model data. Modified via the snmp_vacm(3) module.
- */
-struct vacm_group;
-
-struct vacm_user {
- /* Security user name from USM */
- char secname[SNMP_ADM_STR32_SIZ];
- int32_t sec_model;
- /* Back pointer to user assigned group name */
- struct vacm_group *group;
- int32_t type;
- int32_t status;
- SLIST_ENTRY(vacm_user) vvu;
- SLIST_ENTRY(vacm_user) vvg;
-};
-
-SLIST_HEAD(vacm_userlist, vacm_user);
-
-struct vacm_group {
- char groupname[SNMP_ADM_STR32_SIZ];
- struct vacm_userlist group_users;
- SLIST_ENTRY(vacm_group) vge;
-};
-
-SLIST_HEAD(vacm_grouplist, vacm_group);
-
-struct vacm_access {
- /* The group name is index, not a column in the table */
- struct vacm_group *group;
- char ctx_prefix[SNMP_ADM_STR32_SIZ];
- int32_t sec_model;
- int32_t sec_level;
- int32_t ctx_match;
- struct vacm_view *read_view;
- struct vacm_view *write_view;
- struct vacm_view *notify_view;
- int32_t type;
- int32_t status;
- TAILQ_ENTRY(vacm_access) vva;
-};
-
-TAILQ_HEAD(vacm_accesslist, vacm_access);
-
-struct vacm_view {
- char viewname[SNMP_ADM_STR32_SIZ]; /* key */
- struct asn_oid subtree; /* key */
- uint8_t mask[16];
- uint8_t exclude;
- int32_t type;
- int32_t status;
- SLIST_ENTRY(vacm_view) vvl;
-};
-
-SLIST_HEAD(vacm_viewlist, vacm_view);
-
-struct vacm_context {
- /* The ID of the module that registered this context */
- int32_t regid;
- char ctxname[SNMP_ADM_STR32_SIZ];
- SLIST_ENTRY(vacm_context) vcl;
-};
-
-SLIST_HEAD(vacm_contextlist, vacm_context);
-
-void vacm_groups_init(void);
-struct vacm_user *vacm_first_user(void);
-struct vacm_user *vacm_next_user(struct vacm_user *);
-struct vacm_user *vacm_new_user(int32_t, char *);
-int vacm_delete_user(struct vacm_user *);
-int vacm_user_set_group(struct vacm_user *, u_char *, u_int);
-struct vacm_access *vacm_first_access_rule(void);
-struct vacm_access *vacm_next_access_rule(struct vacm_access *);
-struct vacm_access *vacm_new_access_rule(char *, char *, int32_t, int32_t);
-int vacm_delete_access_rule(struct vacm_access *);
-struct vacm_view *vacm_first_view(void);
-struct vacm_view *vacm_next_view(struct vacm_view *);
-struct vacm_view *vacm_new_view(char *, struct asn_oid *);
-int vacm_delete_view(struct vacm_view *);
-struct vacm_context *vacm_first_context(void);
-struct vacm_context *vacm_next_context(struct vacm_context *);
-struct vacm_context *vacm_add_context(char *, int32_t);
-void vacm_flush_contexts(int32_t);
-
-/*
- * RFC 3413 SNMP Management Target & Notification MIB
- */
-
-struct snmpd_target_stats {
- uint32_t unavail_contexts;
- uint32_t unknown_contexts;
-};
-
-#define SNMP_UDP_ADDR_SIZ 6
-#define SNMP_TAG_SIZ (255 + 1)
-
-struct target_address {
- char name[SNMP_ADM_STR32_SIZ];
- uint8_t address[SNMP_UDP_ADDR_SIZ];
- int32_t timeout;
- int32_t retry;
- char taglist[SNMP_TAG_SIZ];
- char paramname[SNMP_ADM_STR32_SIZ];
- int32_t type;
- int32_t socket;
- int32_t status;
- SLIST_ENTRY(target_address) ta;
-};
-
-SLIST_HEAD(target_addresslist, target_address);
-
-struct target_param {
- char name[SNMP_ADM_STR32_SIZ];
- int32_t mpmodel;
- int32_t sec_model;
- char secname[SNMP_ADM_STR32_SIZ];
- enum snmp_usm_level sec_level;
- int32_t type;
- int32_t status;
- SLIST_ENTRY(target_param) tp;
-};
-
-SLIST_HEAD(target_paramlist, target_param);
-
-struct target_notify {
- char name[SNMP_ADM_STR32_SIZ];
- char taglist[SNMP_TAG_SIZ];
- int32_t notify_type;
- int32_t type;
- int32_t status;
- SLIST_ENTRY(target_notify) tn;
-};
-
-SLIST_HEAD(target_notifylist, target_notify);
-
-extern struct snmpd_target_stats snmpd_target_stats;
-struct snmpd_target_stats *bsnmpd_get_target_stats(void);
-struct target_address *target_first_address(void);
-struct target_address *target_next_address(struct target_address *);
-struct target_address *target_new_address(char *);
-int target_activate_address(struct target_address *);
-int target_delete_address(struct target_address *);
-struct target_param *target_first_param(void);
-struct target_param *target_next_param(struct target_param *);
-struct target_param *target_new_param(char *);
-int target_delete_param(struct target_param *);
-struct target_notify *target_first_notify(void);
-struct target_notify *target_next_notify(struct target_notify *);
-struct target_notify *target_new_notify(char *);
-int target_delete_notify (struct target_notify *);
-void target_flush_all(void);
-
-/*
- * Well known OIDs
- */
-extern const struct asn_oid oid_zeroDotZero;
-
-/* SNMPv3 Engine Discovery */
-extern const struct asn_oid oid_usmUnknownEngineIDs;
-extern const struct asn_oid oid_usmNotInTimeWindows;
-
-/*
- * Request ID ranges.
- *
- * A module can request a range of request ids and associate them with a
- * type field. All ranges are deleted if a module is unloaded.
- */
-u_int reqid_allocate(int size, struct lmodule *);
-int32_t reqid_next(u_int type);
-int32_t reqid_base(u_int type);
-int reqid_istype(int32_t reqid, u_int type);
-u_int reqid_type(int32_t reqid);
-
-/*
- * Timers.
- */
-void *timer_start(u_int, void (*)(void *), void *, struct lmodule *);
-void *timer_start_repeat(u_int, u_int, void (*)(void *), void *,
- struct lmodule *);
-void timer_stop(void *);
-
-/*
- * File descriptors
- */
-void *fd_select(int, void (*)(int, void *), void *, struct lmodule *);
-void fd_deselect(void *);
-void fd_suspend(void *);
-int fd_resume(void *);
-
-/*
- * Object resources
- */
-u_int or_register(const struct asn_oid *, const char *, struct lmodule *);
-void or_unregister(u_int);
-
-/*
- * Buffers
- */
-void *buf_alloc(int tx);
-size_t buf_size(int tx);
-
-/* decode PDU and find community */
-enum snmpd_input_err snmp_input_start(const u_char *, size_t, const char *,
- struct snmp_pdu *, int32_t *, size_t *);
-
-/* process the pdu. returns either _OK or _FAILED */
-enum snmpd_input_err snmp_input_finish(struct snmp_pdu *, const u_char *,
- size_t, u_char *, size_t *, const char *, enum snmpd_input_err, int32_t,
- void *);
-
-void snmp_output(struct snmp_pdu *, u_char *, size_t *, const char *);
-void snmp_send_port(void *, const struct asn_oid *, struct snmp_pdu *,
- const struct sockaddr *, socklen_t);
-enum snmp_code snmp_pdu_auth_access(struct snmp_pdu *, int32_t *);
-
-/* sending traps */
-void snmp_send_trap(const struct asn_oid *, ...);
-
-/*
- * Action support
- */
-int string_save(struct snmp_value *, struct snmp_context *, ssize_t, u_char **);
-void string_commit(struct snmp_context *);
-void string_rollback(struct snmp_context *, u_char **);
-int string_get(struct snmp_value *, const u_char *, ssize_t);
-int string_get_max(struct snmp_value *, const u_char *, ssize_t, size_t);
-void string_free(struct snmp_context *);
-
-int ip_save(struct snmp_value *, struct snmp_context *, u_char *);
-void ip_rollback(struct snmp_context *, u_char *);
-void ip_commit(struct snmp_context *);
-int ip_get(struct snmp_value *, u_char *);
-
-int oid_save(struct snmp_value *, struct snmp_context *, struct asn_oid *);
-void oid_rollback(struct snmp_context *, struct asn_oid *);
-void oid_commit(struct snmp_context *);
-int oid_get(struct snmp_value *, const struct asn_oid *);
-
-int index_decode(const struct asn_oid *oid, u_int sub, u_int code, ...);
-int index_compare(const struct asn_oid *, u_int, const struct asn_oid *);
-int index_compare_off(const struct asn_oid *, u_int, const struct asn_oid *,
- u_int);
-void index_append(struct asn_oid *, u_int, const struct asn_oid *);
-void index_append_off(struct asn_oid *, u_int, const struct asn_oid *, u_int);
-
-#endif
diff --git a/include.new/bzlib.h b/include.new/bzlib.h
deleted file mode 100644
index 8277123..0000000
--- a/include.new/bzlib.h
+++ /dev/null
@@ -1,282 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Public header file for the library. ---*/
-/*--- bzlib.h ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
- This file is part of bzip2/libbzip2, a program and library for
- lossless, block-sorting data compression.
-
- bzip2/libbzip2 version 1.0.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward
-
- Please read the WARNING, DISCLAIMER and PATENTS sections in the
- README file.
-
- This program is released under the terms of the license contained
- in the file LICENSE.
- ------------------------------------------------------------------ */
-
-
-#ifndef _BZLIB_H
-#define _BZLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BZ_RUN 0
-#define BZ_FLUSH 1
-#define BZ_FINISH 2
-
-#define BZ_OK 0
-#define BZ_RUN_OK 1
-#define BZ_FLUSH_OK 2
-#define BZ_FINISH_OK 3
-#define BZ_STREAM_END 4
-#define BZ_SEQUENCE_ERROR (-1)
-#define BZ_PARAM_ERROR (-2)
-#define BZ_MEM_ERROR (-3)
-#define BZ_DATA_ERROR (-4)
-#define BZ_DATA_ERROR_MAGIC (-5)
-#define BZ_IO_ERROR (-6)
-#define BZ_UNEXPECTED_EOF (-7)
-#define BZ_OUTBUFF_FULL (-8)
-#define BZ_CONFIG_ERROR (-9)
-
-typedef
- struct {
- char *next_in;
- unsigned int avail_in;
- unsigned int total_in_lo32;
- unsigned int total_in_hi32;
-
- char *next_out;
- unsigned int avail_out;
- unsigned int total_out_lo32;
- unsigned int total_out_hi32;
-
- void *state;
-
- void *(*bzalloc)(void *,int,int);
- void (*bzfree)(void *,void *);
- void *opaque;
- }
- bz_stream;
-
-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
-#ifndef BZ_NO_STDIO
-/* Need a definitition for FILE */
-#include
-#endif
-
-#ifdef _WIN32
-# include
-# ifdef small
- /* windows.h define small to char */
-# undef small
-# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
-# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
-# endif
-#else
-# define BZ_API(func) func
-# define BZ_EXTERN extern
-#endif
-
-
-/*-- Core (low-level) library functions --*/
-
-BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
- bz_stream* strm,
- int blockSize100k,
- int verbosity,
- int workFactor
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzCompress) (
- bz_stream* strm,
- int action
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
- bz_stream* strm
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
- bz_stream *strm,
- int verbosity,
- int small
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
- bz_stream* strm
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
- bz_stream *strm
- );
-
-
-
-/*-- High(er) level library functions --*/
-
-#ifndef BZ_NO_STDIO
-#define BZ_MAX_UNUSED 5000
-
-typedef void BZFILE;
-
-BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
- int* bzerror,
- FILE* f,
- int verbosity,
- int small,
- void* unused,
- int nUnused
- );
-
-BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
- int* bzerror,
- BZFILE* b
- );
-
-BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
- int* bzerror,
- BZFILE* b,
- void** unused,
- int* nUnused
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzRead) (
- int* bzerror,
- BZFILE* b,
- void* buf,
- int len
- );
-
-BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
- int* bzerror,
- FILE* f,
- int blockSize100k,
- int verbosity,
- int workFactor
- );
-
-BZ_EXTERN void BZ_API(BZ2_bzWrite) (
- int* bzerror,
- BZFILE* b,
- void* buf,
- int len
- );
-
-BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
- int* bzerror,
- BZFILE* b,
- int abandon,
- unsigned int* nbytes_in,
- unsigned int* nbytes_out
- );
-
-BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
- int* bzerror,
- BZFILE* b,
- int abandon,
- unsigned int* nbytes_in_lo32,
- unsigned int* nbytes_in_hi32,
- unsigned int* nbytes_out_lo32,
- unsigned int* nbytes_out_hi32
- );
-#endif
-
-
-/*-- Utility functions --*/
-
-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
- char* dest,
- unsigned int* destLen,
- char* source,
- unsigned int sourceLen,
- int blockSize100k,
- int verbosity,
- int workFactor
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
- char* dest,
- unsigned int* destLen,
- char* source,
- unsigned int sourceLen,
- int small,
- int verbosity
- );
-
-
-/*--
- Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
- to support better zlib compatibility.
- This code is not _officially_ part of libbzip2 (yet);
- I haven't tested it, documented it, or considered the
- threading-safeness of it.
- If this code breaks, please contact both Yoshioka and me.
---*/
-
-BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
- void
- );
-
-#ifndef BZ_NO_STDIO
-BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
- const char *path,
- const char *mode
- );
-
-BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
- int fd,
- const char *mode
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzread) (
- BZFILE* b,
- void* buf,
- int len
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzwrite) (
- BZFILE* b,
- void* buf,
- int len
- );
-
-BZ_EXTERN int BZ_API(BZ2_bzflush) (
- BZFILE* b
- );
-
-BZ_EXTERN void BZ_API(BZ2_bzclose) (
- BZFILE* b
- );
-
-BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
- BZFILE *b,
- int *errnum
- );
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/*-------------------------------------------------------------*/
-/*--- end bzlib.h ---*/
-/*-------------------------------------------------------------*/
diff --git a/include.new/c++/3.4/algorithm b/include.new/c++/3.4/algorithm
deleted file mode 100644
index 40e6246..0000000
--- a/include.new/c++/3.4/algorithm
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- C++ -*-
-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-/** @file algorithm
- * This is a Standard C++ Library header. You should @c #include this header
- * in your programs, rather than any of the "st[dl]_*.h" implementation files.
- */
-
-#ifndef _GLIBCXX_ALGORITHM
-#define _GLIBCXX_ALGORITHM 1
-
-#pragma GCC system_header
-
-#include
-#include
-#include
-#include
-
-#endif /* _GLIBCXX_ALGORITHM */
diff --git a/include.new/c++/3.4/backward/algo.h b/include.new/c++/3.4/backward/algo.h
deleted file mode 100644
index 6f24835..0000000
--- a/include.new/c++/3.4/backward/algo.h
+++ /dev/null
@@ -1,149 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALGO_H
-#define _BACKWARD_ALGO_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "tempbuf.h"
-#include "iterator.h"
-#include
-#include
-#include
-#include
-
-// Names from
-using std::for_each;
-using std::find;
-using std::find_if;
-using std::adjacent_find;
-using std::count;
-using std::count_if;
-using std::search;
-using std::search_n;
-using std::swap_ranges;
-using std::transform;
-using std::replace;
-using std::replace_if;
-using std::replace_copy;
-using std::replace_copy_if;
-using std::generate;
-using std::generate_n;
-using std::remove;
-using std::remove_if;
-using std::remove_copy;
-using std::remove_copy_if;
-using std::unique;
-using std::unique_copy;
-using std::reverse;
-using std::reverse_copy;
-using std::rotate;
-using std::rotate_copy;
-using std::random_shuffle;
-using std::partition;
-using std::stable_partition;
-using std::sort;
-using std::stable_sort;
-using std::partial_sort;
-using std::partial_sort_copy;
-using std::nth_element;
-using std::lower_bound;
-using std::upper_bound;
-using std::equal_range;
-using std::binary_search;
-using std::merge;
-using std::inplace_merge;
-using std::includes;
-using std::set_union;
-using std::set_intersection;
-using std::set_difference;
-using std::set_symmetric_difference;
-using std::min_element;
-using std::max_element;
-using std::next_permutation;
-using std::prev_permutation;
-using std::find_first_of;
-using std::find_end;
-
-// Names from stl_heap.h
-using std::push_heap;
-using std::pop_heap;
-using std::make_heap;
-using std::sort_heap;
-
-// Names from stl_numeric.h
-using std::accumulate;
-using std::inner_product;
-using std::partial_sum;
-using std::adjacent_difference;
-
-// Names from ext/algorithm
-using __gnu_cxx::random_sample;
-using __gnu_cxx::random_sample_n;
-using __gnu_cxx::is_sorted;
-using __gnu_cxx::is_heap;
-using __gnu_cxx::count; // Extension returning void
-using __gnu_cxx::count_if; // Extension returning void
-
-// Names from ext/numeric
-using __gnu_cxx::power;
-using __gnu_cxx::iota;
-
-#endif /* _BACKWARD_ALGO_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/algobase.h b/include.new/c++/3.4/backward/algobase.h
deleted file mode 100644
index 86028a0..0000000
--- a/include.new/c++/3.4/backward/algobase.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALGOBASE_H
-#define _BACKWARD_ALGOBASE_H 1
-
-#include "backward_warning.h"
-#include "pair.h"
-#include "iterator.h"
-#include
-#include
-#include
-#include
-
-// Names from stl_algobase.h
-using std::iter_swap;
-using std::swap;
-using std::min;
-using std::max;
-using std::copy;
-using std::copy_backward;
-using std::fill;
-using std::fill_n;
-using std::mismatch;
-using std::equal;
-using std::lexicographical_compare;
-
-// Names from stl_uninitialized.h
-using std::uninitialized_copy;
-using std::uninitialized_fill;
-using std::uninitialized_fill_n;
-
-// Names from ext/algorithm
-using __gnu_cxx::copy_n;
-using __gnu_cxx::lexicographical_compare_3way;
-
-// Names from ext/memory
-using __gnu_cxx::uninitialized_copy_n;
-
-#endif /* _BACKWARD_ALGOBASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/alloc.h b/include.new/c++/3.4/backward/alloc.h
deleted file mode 100644
index d3c3c73..0000000
--- a/include.new/c++/3.4/backward/alloc.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996-1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALLOC_H
-#define _BACKWARD_ALLOC_H 1
-
-#include "backward_warning.h"
-#include
-#include
-
-using std::allocator;
-
-#endif
diff --git a/include.new/c++/3.4/backward/backward_warning.h b/include.new/c++/3.4/backward/backward_warning.h
deleted file mode 100644
index 9e13777..0000000
--- a/include.new/c++/3.4/backward/backward_warning.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_BACKWARD_WARNING_H
-#define _BACKWARD_BACKWARD_WARNING_H 1
-
-#ifdef __DEPRECATED
-#warning This file includes at least one deprecated or antiquated header. \
-Please consider using one of the 32 headers found in section 17.4.1.2 of the \
-C++ standard. Examples include substituting the header for the \
-header for C++ includes, or instead of the deprecated header \
-. To disable this warning use -Wno-deprecated.
-#endif
-
-#endif
diff --git a/include.new/c++/3.4/backward/bvector.h b/include.new/c++/3.4/backward/bvector.h
deleted file mode 100644
index 9245792..0000000
--- a/include.new/c++/3.4/backward/bvector.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_BVECTOR_H
-#define _BACKWARD_BVECTOR_H 1
-
-#include "backward_warning.h"
-#include
-
-typedef std::vector > bit_vector;
-
-#endif /* _BACKWARD_BVECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/complex.h b/include.new/c++/3.4/backward/complex.h
deleted file mode 100644
index dfc6714..0000000
--- a/include.new/c++/3.4/backward/complex.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_COMPLEX_H
-#define _BACKWARD_COMPLEX_H 1
-
-#include "backward_warning.h"
-#include
-
-using std::complex;
-typedef complex float_complex;
-typedef complex double_complex;
-typedef complex long_double_complex;
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/defalloc.h b/include.new/c++/3.4/backward/defalloc.h
deleted file mode 100644
index 76ea52a..0000000
--- a/include.new/c++/3.4/backward/defalloc.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-// Inclusion of this file is DEPRECATED. This is the original HP
-// default allocator. It is provided only for backward compatibility.
-// This file WILL BE REMOVED in a future release.
-//
-// DO NOT USE THIS FILE unless you have an old container implementation
-// that requires an allocator with the HP-style interface.
-//
-// Standard-conforming allocators have a very different interface. The
-// standard default allocator is declared in the header .
-
-#ifndef _BACKWARD_DEFALLOC_H
-#define _BACKWARD_DEFALLOC_H 1
-
-#include "backward_warning.h"
-#include "new.h"
-#include
-#include
-#include
-#include "iostream.h"
-#include "algobase.h"
-
-
-template
-inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
- set_new_handler(0);
- _Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
- if (__tmp == 0) {
- cerr << "out of memory" << endl;
- exit(1);
- }
- return __tmp;
-}
-
-
-template
-inline void deallocate(_Tp* __buffer) {
- ::operator delete(__buffer);
-}
-
-template
-class allocator {
-public:
- typedef _Tp value_type;
- typedef _Tp* pointer;
- typedef const _Tp* const_pointer;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- pointer allocate(size_type __n) {
- return ::allocate((difference_type)__n, (pointer)0);
- }
- void deallocate(pointer __p) { ::deallocate(__p); }
- pointer address(reference __x) { return (pointer)&__x; }
- const_pointer const_address(const_reference __x) {
- return (const_pointer)&__x;
- }
- size_type init_page_size() {
- return max(size_type(1), size_type(4096/sizeof(_Tp)));
- }
- size_type max_size() const {
- return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp)));
- }
-};
-
-class allocator {
-public:
- typedef void* pointer;
-};
-
-
-
-#endif /* _BACKWARD_DEFALLOC_H */
diff --git a/include.new/c++/3.4/backward/deque.h b/include.new/c++/3.4/backward/deque.h
deleted file mode 100644
index 36c7479..0000000
--- a/include.new/c++/3.4/backward/deque.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_DEQUE_H
-#define _BACKWARD_DEQUE_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include
-
-using std::deque;
-
-#endif /* _BACKWARD_DEQUE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/fstream.h b/include.new/c++/3.4/backward/fstream.h
deleted file mode 100644
index 6dfd514..0000000
--- a/include.new/c++/3.4/backward/fstream.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_FSTREAM_H
-#define _BACKWARD_FSTREAM_H 1
-
-#include "backward_warning.h"
-#include
-
-using std::filebuf;
-using std::ifstream;
-using std::ofstream;
-using std::fstream;
-using std::streampos;
-
-#ifdef _GLIBCXX_USE_WCHAR_T
-using std::wfilebuf;
-using std::wifstream;
-using std::wofstream;
-using std::wfstream;
-using std::wstreampos;
-#endif
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/function.h b/include.new/c++/3.4/backward/function.h
deleted file mode 100644
index 9fc8719..0000000
--- a/include.new/c++/3.4/backward/function.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_FUNCTION_H
-#define _BACKWARD_FUNCTION_H 1
-
-#include "backward_warning.h"
-#include
-#include
-#include
-#include
-
-// Names from stl_function.h
-using std::unary_function;
-using std::binary_function;
-using std::plus;
-using std::minus;
-using std::multiplies;
-using std::divides;
-using std::modulus;
-using std::negate;
-using std::equal_to;
-using std::not_equal_to;
-using std::greater;
-using std::less;
-using std::greater_equal;
-using std::less_equal;
-using std::logical_and;
-using std::logical_or;
-using std::logical_not;
-using std::unary_negate;
-using std::binary_negate;
-using std::not1;
-using std::not2;
-using std::binder1st;
-using std::binder2nd;
-using std::bind1st;
-using std::bind2nd;
-using std::pointer_to_unary_function;
-using std::pointer_to_binary_function;
-using std::ptr_fun;
-using std::mem_fun_t;
-using std::const_mem_fun_t;
-using std::mem_fun_ref_t;
-using std::const_mem_fun_ref_t;
-using std::mem_fun1_t;
-using std::const_mem_fun1_t;
-using std::mem_fun1_ref_t;
-using std::const_mem_fun1_ref_t;
-using std::mem_fun;
-using std::mem_fun_ref;
-
-// Names from ext/functional
-using __gnu_cxx::identity_element;
-using __gnu_cxx::unary_compose;
-using __gnu_cxx::binary_compose;
-using __gnu_cxx::compose1;
-using __gnu_cxx::compose2;
-using __gnu_cxx::identity;
-using __gnu_cxx::select1st;
-using __gnu_cxx::select2nd;
-using __gnu_cxx::project1st;
-using __gnu_cxx::project2nd;
-using __gnu_cxx::constant_void_fun;
-using __gnu_cxx::constant_unary_fun;
-using __gnu_cxx::constant_binary_fun;
-using __gnu_cxx::constant0;
-using __gnu_cxx::constant1;
-using __gnu_cxx::constant2;
-using __gnu_cxx::subtractive_rng;
-using __gnu_cxx::mem_fun1;
-using __gnu_cxx::mem_fun1_ref;
-
-#endif /* _BACKWARD_FUNCTION_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/hash_map.h b/include.new/c++/3.4/backward/hash_map.h
deleted file mode 100644
index bc9c148..0000000
--- a/include.new/c++/3.4/backward/hash_map.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_HASH_MAP_H
-#define _BACKWARD_HASH_MAP_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-using __gnu_cxx::hash_map;
-using __gnu_cxx::hash_multimap;
-
-#endif /* _BACKWARD_HASH_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/hash_set.h b/include.new/c++/3.4/backward/hash_set.h
deleted file mode 100644
index 89307de..0000000
--- a/include.new/c++/3.4/backward/hash_set.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_HASH_SET_H
-#define _BACKWARD_HASH_SET_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-using __gnu_cxx::hash_set;
-using __gnu_cxx::hash_multiset;
-
-#endif /* _BACKWARD_HASH_SET_H */
-
diff --git a/include.new/c++/3.4/backward/hashtable.h b/include.new/c++/3.4/backward/hashtable.h
deleted file mode 100644
index abedd55..0000000
--- a/include.new/c++/3.4/backward/hashtable.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _BACKWARD_HASHTABLE_H
-#define _BACKWARD_HASHTABLE_H 1
-
-#include "backward_warning.h"
-#include
-#include "algo.h"
-#include "alloc.h"
-#include "vector.h"
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-
-#endif /* _BACKWARD_HASHTABLE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/heap.h b/include.new/c++/3.4/backward/heap.h
deleted file mode 100644
index 2f19545..0000000
--- a/include.new/c++/3.4/backward/heap.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_HEAP_H
-#define _BACKWARD_HEAP_H 1
-
-#include "backward_warning.h"
-#include
-#include
-
-using std::push_heap;
-using std::pop_heap;
-using std::make_heap;
-using std::sort_heap;
-
-#endif /* _BACKWARD_HEAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/iomanip.h b/include.new/c++/3.4/backward/iomanip.h
deleted file mode 100644
index 160dbeb..0000000
--- a/include.new/c++/3.4/backward/iomanip.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_IOMANIP_H
-#define _BACKWARD_IOMANIP_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-#include
-
-// These are from as per [27.4].
-using std::boolalpha;
-using std::noboolalpha;
-using std::showbase;
-using std::noshowbase;
-using std::showpoint;
-using std::noshowpoint;
-using std::showpos;
-using std::noshowpos;
-using std::skipws;
-using std::noskipws;
-using std::uppercase;
-using std::nouppercase;
-using std::internal;
-using std::left;
-using std::right;
-using std::dec;
-using std::hex;
-using std::oct;
-using std::fixed;
-using std::scientific;
-
-// These are from as per [27.6]. Manipulators from
-// and (e.g., endl) are made available via .
-using std::resetiosflags;
-using std::setiosflags;
-using std::setbase;
-using std::setfill;
-using std::setprecision;
-using std::setw;
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/iostream.h b/include.new/c++/3.4/backward/iostream.h
deleted file mode 100644
index 5a5ccea..0000000
--- a/include.new/c++/3.4/backward/iostream.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_IOSTREAM_H
-#define _BACKWARD_IOSTREAM_H 1
-
-#include "backward_warning.h"
-#include
-
-using std::iostream;
-using std::ostream;
-using std::istream;
-using std::ios;
-using std::streambuf;
-
-using std::cout;
-using std::cin;
-using std::cerr;
-using std::clog;
-#ifdef _GLIBCXX_USE_WCHAR_T
-using std::wcout;
-using std::wcin;
-using std::wcerr;
-using std::wclog;
-#endif
-
-using std::ws;
-using std::endl;
-using std::ends;
-using std::flush;
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/istream.h b/include.new/c++/3.4/backward/istream.h
deleted file mode 100644
index 707b575..0000000
--- a/include.new/c++/3.4/backward/istream.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_ISTREAM_H
-#define _BACKWARD_ISTREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
-
-
-
-
-
diff --git a/include.new/c++/3.4/backward/iterator.h b/include.new/c++/3.4/backward/iterator.h
deleted file mode 100644
index 8316a83..0000000
--- a/include.new/c++/3.4/backward/iterator.h
+++ /dev/null
@@ -1,191 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ITERATOR_H
-#define _BACKWARD_ITERATOR_H 1
-
-#include "backward_warning.h"
-#include "function.h"
-#include
-#include "iostream.h"
-#include
-
-#include
-#include
-
-#include // For 3-parameter distance extension
-
-// Names from stl_iterator.h
-using std::input_iterator_tag;
-using std::output_iterator_tag;
-using std::forward_iterator_tag;
-using std::bidirectional_iterator_tag;
-using std::random_access_iterator_tag;
-
-#if 0
-using std::iterator;
-#endif
-
-// The base classes input_iterator, output_iterator, forward_iterator,
-// bidirectional_iterator, and random_access_iterator are not part of
-// the C++ standard. (They have been replaced by struct iterator.)
-// They are included for backward compatibility with the HP STL.
-template
- struct input_iterator {
- typedef input_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-struct output_iterator {
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-};
-
-template
- struct forward_iterator {
- typedef forward_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-template
- struct bidirectional_iterator {
- typedef bidirectional_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-template
- struct random_access_iterator {
- typedef random_access_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-using std::iterator_traits;
-
-template
- inline typename iterator_traits<_Iter>::iterator_category
- iterator_category(const _Iter& __i)
- { return __iterator_category(__i); }
-
-template
- inline typename iterator_traits<_Iter>::difference_type*
- distance_type(const _Iter&)
- { return static_cast::difference_type*>(0); }
-
-template
- inline typename iterator_traits<_Iter>::value_type*
- value_type(const _Iter& __i)
- { return static_cast::value_type*>(0); }
-
-using std::distance;
-using __gnu_cxx::distance; // 3-parameter extension
-using std::advance;
-
-using std::insert_iterator;
-using std::front_insert_iterator;
-using std::back_insert_iterator;
-using std::inserter;
-using std::front_inserter;
-using std::back_inserter;
-
-using std::reverse_iterator;
-
-using std::istream_iterator;
-using std::ostream_iterator;
-
-// Names from stl_construct.h
-template
- inline void
- construct(_T1* __p, const _T2& __value)
- { std::_Construct(__p, __value); }
-
-template
- inline void
- construct(_T1* __p)
- { std::_Construct(__p); }
-
-template
- inline void
- destroy(_Tp* __pointer)
- { std::_Destroy(__pointer); }
-
-template
- inline void
- destroy(_ForwardIterator __first, _ForwardIterator __last)
- { std::_Destroy(__first, __last); }
-
-
-// Names from stl_raw_storage_iter.h
-using std::raw_storage_iterator;
-
-#endif /* _BACKWARD_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/list.h b/include.new/c++/3.4/backward/list.h
deleted file mode 100644
index 00c11a6..0000000
--- a/include.new/c++/3.4/backward/list.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_LIST_H
-#define _BACKWARD_LIST_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include
-
-using std::list;
-
-#endif /* _BACKWARD_LIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/include.new/c++/3.4/backward/map.h b/include.new/c++/3.4/backward/map.h
deleted file mode 100644
index 56d5c69..0000000
--- a/include.new/c++/3.4/backward/map.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MAP_H
-#define _BACKWARD_MAP_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include