1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Upgrade libdnet to 1.18.0, plus Nmap's changes

Nmap's changes have been moved from the NMAP_MODIFICATIONS file to the
Github repo at https://github.com/nmap/libdnet

The NMAP_MODIFICATIONS file instead will document only the changes made
to strip unused parts of the libdnet source prior to inclusion in Nmap.
This commit is contained in:
dmiller
2025-03-31 19:30:47 +00:00
parent 4ab57093da
commit 210d6c0847
97 changed files with 43932 additions and 16696 deletions

56
libdnet-stripped/.gitignore vendored Normal file
View File

@@ -0,0 +1,56 @@
# Generated objects
*.o
*.lo
*.la
# Backups
**~
# Local tarballs and Pyrex
Pyrex-0*
libdnet-*.tar.gz
# Python Cache
**/__pycache__/
# Local Python virtual environment
.virtualenv/
# From configure
config.log
config.status
dnet-config
include/config.h
include/stamp-h1
libtool
python/setup.py
# Generated Makefiles
Makefile
include/Makefile
include/dnet/Makefile
man/Makefile
python/Makefile
src/Makefile
test/Makefile
test/check/Makefile
test/dnet/Makefile
# Generated libs/binaries from make
autom4te.cache/
src/.libs/
test/dnet/.libs/
test/dnet/dnet
test/check/.libs/
test/check/*.log
test/check/*.trs
test/check/check_addr
test/check/check_arp
test/check/check_blob
test/check/check_eth
test/check/check_fw
test/check/check_intf
test/check/check_ip
test/check/check_rand
test/check/check_route
python/test-suite.log

View File

@@ -0,0 +1,379 @@
cmake_minimum_required(VERSION 3.14)
project(dnet VERSION 1.18.0 LANGUAGES C)
find_package(TCL)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckStructHasMember)
include(CheckSymbolExists)
include(CheckTypeSize)
include(CheckCSourceCompiles)
include(GNUInstallDirs)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS True)
option(BUILD_SHARED_LIBS "Build in shared lib mode" OFF)
foreach (header stdio.h stdlib.h string.h inttypes.h)
string(TOUPPER HAVE_${header} var)
string(REGEX REPLACE "\\.|/" "_" var ${var})
check_include_file(${header} ${var})
endforeach ()
if (MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
check_include_file(winsock2.h HAVE_WINSOCK2_H)
set(HAVE_LIBWS2_32 ${HAVE_WINSOCK2_H})
check_c_source_compiles("
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <Iphlpapi.h>
int main() { return 0; }"
HAVE_IPHLPAPI_H)
set(HAVE_LIBIPHLPAPI ${HAVE_IPHLPAPI_H})
set(CMAKE_REQUIRED_LIBRARIES "ws2_32")
check_symbol_exists(inet_pton WS2tcpip.h HAVE_INET_PTON)
set(CMAKE_REQUIRED_LIBRARIES )
endif()
if(UNIX)
foreach (header strings.h
unistd.h sys/bufmod.h sys/dlpi.h sys/dlpihdr.h sys/dlpi_ext.h
sys/ioctl.h sys/mib.h sys/ndd_var.h sys/socket.h sys/sockio.h
sys/time.h sys/stat.h net/if.h net/if_var.h
net/if_dl.h net/pfilt.h
net/radix.h net/raw.h net/route.h netinet/in_var.h
linux/if_tun.h netinet/ip_fw.h linux/ip_fw.h
linux/ip_fwchains.h linux/netfilter_ipv4/ipchains_core.h
ip_fil_compat.h netinet/ip_fil_compat.h ip_compat.h
netinet/ip_compat.h ip_fil.h netinet/ip_fil.h
hpsecurity.h stropts.h dlfcn.h fcntl.h)
string(TOUPPER HAVE_${header} var)
string(REGEX REPLACE "\\.|/" "_" var ${var})
check_include_file(${header} ${var})
endforeach ()
check_include_files("sys/types.h;net/bpf.h" HAVE_NET_BPF_H)
check_include_files("sys/types.h;net/if_arp.h" HAVE_NET_IF_ARP_H)
check_include_files("sys/types.h;net/if_tun.h" HAVE_NET_IF_TUN_H)
check_include_files("sys/types.h;net/if.h;net/pfvar.h" HAVE_NET_PFVAR_H)
check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYS_SYSCTL_H)
endif()
set(CMAKE_REQUIRED_LIBRARIES )
foreach (func err strlcat strlcpy strse)
string(TOUPPER HAVE_${func} var)
check_function_exists(${func} ${var})
endforeach ()
if (UNIX)
set(CMAKE_REQUIRED_LIBRARIES "nm")
check_function_exists(open_mib HAVE_OPEN_MIB)
set(CMAKE_REQUIRED_LIBRARIES )
CHECK_STRUCT_HAS_MEMBER("struct arpreq" arp_dev net/if_arp.h HAVE_ARPREQ_ARP_DEV LANGUAGE C)
CHECK_STRUCT_HAS_MEMBER("struct sockaddr" sa_len sys/socket.h HAVE_SOCKADDR_SA_LEN LANGUAGE C)
CHECK_STRUCT_HAS_MEMBER("struct rt_msghdr" rtm_msglen "sys/socket.h;net/if.h;net/route.h" HAVE_ROUTE_RT_MSGHDR LANGUAGE C)
set(CMAKE_EXTRA_INCLUDE_FILES "netinet/in.h")
check_type_size("struct sockaddr_in6" HAVE_SOCKADDR_IN6 LANGUAGE C)
set(CMAKE_EXTRA_INCLUDE_FILES )
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
file(STRINGS /proc/sys/kernel/ostype PROCFS)
message(STATUS "${PROCFS}")
if (${PROCFS} STREQUAL "Linux")
set(HAVE_LINUX_PROCFS True)
endif()
endif()
check_include_file(inet/mib2.h HAVE_STREAMS_MIB2)
check_symbol_exists(ETH_P_ALL linux/if_ether.h HAVE_LINUX_PF_PACKET)
check_symbol_exists(RTSTR_SEND net/route.h HAVE_STREAMS_ROUTE)
check_symbol_exists(SIOCGARP sys/ioctl.h HAVE_IOCTL_ARP)
string(TOLOWER ${CMAKE_SYSTEM_NAME} CMAKE_SYSTEM_NAME_LOWER)
string(REGEX MATCH "bsd" BSD ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "darwin" DARWIN ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "osf" OSF ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "unixware" UNIXWARE ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "openbsd" OPENBSD ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "solaris" SOLARIS ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "irix" IRIX ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "freebsd5" FREEBSD5 ${CMAKE_SYSTEM_NAME_LOWER})
string(REGEX MATCH "kfreebsd" KFREEBSD ${CMAKE_SYSTEM_NAME_LOWER})
if (BSD OR DARWIN OR OSF OR UNIXWARE)
set(HAVE_RAWIP_HOST_OFFLEN True)
endif()
if (OPENBSD)
set(HAVE_RAWIP_HOST_OFFLEN False)
endif()
if (SOLARIS OR IRIX)
set(HAVE_RAWIP_COOKED True)
endif()
set(CMAKE_REQUIRED_LIBRARIES )
foreach (func err strlcat strlcpy strse)
string(TOUPPER HAVE_${func} var)
check_function_exists(${func} ${var})
endforeach ()
set(CMAKE_REQUIRED_LIBRARIES nsl socket)
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
if (NOT HAVE_GETHOSTBYNAME)
unset(HAVE_GETHOSTBYNAME CACHE)
set(CMAKE_REQUIRED_LIBRARIES nsl)
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
if (NOT HAVE_GETHOSTBYNAME)
unset(HAVE_GETHOSTBYNAME CACHE)
set(CMAKE_REQUIRED_LIBRARIES)
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
endif()
endif()
set(CMAKE_REQUIRED_LIBRARIES )
check_function_exists(gethostbyaddr HAVE_GETHOSTBYADDR)
check_function_exists(gethostname HAVE_GETHOSTNAME)
endif (UNIX)
check_function_exists(inet_ntoa HAVE_INET_NTOA)
check_function_exists(memset HAVE_MEMSET)
check_function_exists(select HAVE_SELECT)
check_function_exists(socket HAVE_SOCKET)
check_function_exists(strerror HAVE_STRERROR)
check_function_exists(strsep HAVE_STRSEP)
set(CMAKE_REQUIRED_LIBRARIES str)
check_function_exists(putmsg HAVE_PUTMSG)
set(CMAKE_REQUIRED_LIBRARIES )
set(PACKAGE ${PROJECT_NAME})
set(PACKAGE_BUGREPORT)
set(PACKAGE_NAME ${PROJECT_NAME})
set(PACKAGE_STRING "${PROJECT_NAME} ${CMAKE_PROJECT_VERSION}")
set(PACKAGE_TARNAME ${PROJECT_NAME})
set(PACKAGE_URL)
set(PACKAGE_VERSION ${CMAKE_PROJECT_VERSION})
set(VERSION ${CMAKE_PROJECT_VERSION})
configure_file(config.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
set(PLATFORM_SOURCES)
if (NOT HAVE_STRLCAT)
list(APPEND PLATFORM_SOURCES src/strlcat.c)
endif()
if (NOT HAVE_STRLCPY)
list(APPEND PLATFORM_SOURCES src/strlcpy.c)
endif()
if (NOT HAVE_STRSEP)
list(APPEND PLATFORM_SOURCES src/strsep.c)
endif()
if (HAVE_ROUTE_RT_MSGHDR)
list(APPEND PLATFORM_SOURCES src/arp-bsd.c)
elseif (HAVE_IOCTL_ARP)
list(APPEND PLATFORM_SOURCES src/arp-ioctl.c)
elseif (HAVE_IPHLPAPI_H)
list(APPEND PLATFORM_SOURCES src/arp-win32.c)
else()
list(APPEND PLATFORM_SOURCES src/arp-none.c)
endif()
if (HAVE_IPHLPAPI_H)
# no npcap support
# list(APPEND PLATFORM_SOURCES src/eth-win32.c)
elseif(HAVE_NET_PFILT_H)
list(APPEND PLATFORM_SOURCES src/eth-pfilt.c)
elseif(HAVE_LINUX_PF_PACKET)
list(APPEND PLATFORM_SOURCES src/eth-linux.c)
elseif(HAVE_NET_BPF_H)
list(APPEND PLATFORM_SOURCES src/eth-bsd.c)
elseif(HAVE_NET_RAW_H)
list(APPEND PLATFORM_SOURCES src/eth-snoop.c)
elseif(HAVE_SYS_NDD_VAR_H)
list(APPEND PLATFORM_SOURCES src/eth-ndd.c)
elseif(HAVE_SYS_DLPI_H OR HAVE_SYS_DLPIHDR_H)
list(APPEND PLATFORM_SOURCES src/eth-dlpi.c)
else()
list(APPEND PLATFORM_SOURCES src/eth-none.c)
endif()
if (HAVE_IPHLPAPI_H)
list(APPEND PLATFORM_SOURCES src/fw-pktfilter.c)
elseif(HAVE_NET_PFVAR_H)
list(APPEND PLATFORM_SOURCES src/fw-pf.c)
elseif(HAVE_NETINET_IP_FW_H)
if (FREEBSD5 OR KFREEBSD)
list(APPEND PLATFORM_SOURCES src/fw-none.c)
else()
list(APPEND PLATFORM_SOURCES src/fw-ipfw.c)
endif()
elseif(HAVE_IP_FIL_H)
list(APPEND PLATFORM_SOURCES src/fw-ipf.c)
elseif(HAVE_LINUX_IP_FW_H OR HAVE_LINUX_IP_FWCHAINS_H OR HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H)
list(APPEND PLATFORM_SOURCES src/fw-ipchains.c)
else()
list(APPEND PLATFORM_SOURCES src/fw-none.c)
endif()
if (HAVE_IPHLPAPI_H)
list(APPEND PLATFORM_SOURCES src/intf-win32.c)
else()
list(APPEND PLATFORM_SOURCES src/intf.c)
endif()
if (HAVE_IPHLPAPI_H)
list(APPEND PLATFORM_SOURCES src/ip-win32.c)
elseif(HAVE_RAWIP_COOKED)
list(APPEND PLATFORM_SOURCES src/ip-cooked.c)
else()
list(APPEND PLATFORM_SOURCES src/ip.c)
endif()
if (HAVE_IPHLPAPI_H)
list(APPEND PLATFORM_SOURCES src/route-win32.c)
elseif(HAVE_ROUTE_RT_MSGHDR)
list(APPEND PLATFORM_SOURCES src/route-bsd.c)
elseif(HAVE_LINUX_PROCFS)
list(APPEND PLATFORM_SOURCES src/route-linux.c)
elseif(HAVE_HPSECURITY_H)
list(APPEND PLATFORM_SOURCES src/route-hpux.c)
else()
list(APPEND PLATFORM_SOURCES src/route-none.c)
endif()
if(HAVE_LINUX_PROCFS)
list(APPEND PLATFORM_SOURCES src/ndisc-linux.c)
else()
list(APPEND PLATFORM_SOURCES src/ndisc-none.c)
endif()
find_file(HAVE_DEV_TUN
NAMES /dev/tun0
DOC "Check for tun0")
if(HAVE_LINUX_IF_TUN_H)
list(APPEND PLATFORM_SOURCES src/tun-linux.c)
elseif(HAVE_NET_IF_TUN_H)
if(HAVE_STROPTS_H)
list(APPEND PLATFORM_SOURCES src/tun-solaris.c)
else()
list(APPEND PLATFORM_SOURCES src/tun-bsd.c)
endif()
elseif(HAVE_DEV_TUN)
list(APPEND PLATFORM_SOURCES src/tun-bsd.c)
else()
list(APPEND PLATFORM_SOURCES src/tun-none.c)
endif()
add_library(${PROJECT_NAME}
src/addr-util.c
src/addr.c
src/blob.c
src/err.c
src/ip-util.c
src/ip6.c
src/rand.c
${PLATFORM_SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/dnet>
)
set(DNET_HEADERS
include/dnet/addr.h
include/dnet/arp.h
include/dnet/blob.h
include/dnet/eth.h
include/dnet/fw.h
include/dnet/icmp.h
include/dnet/intf.h
include/dnet/ip.h
include/dnet/ip6.h
include/dnet/ndisc.h
include/dnet/os.h
include/dnet/rand.h
include/dnet/route.h
include/dnet/sctp.h
include/dnet/tcp.h
include/dnet/tun.h
include/dnet/udp.h
)
set(DNET_HEADERS1
include/dnet.h
include/err.h
include/queue.h
${CMAKE_CURRENT_BINARY_DIR}/config.h
)
set_target_properties(
${PROJECT_NAME}
PROPERTIES
PUBLIC_HEADER "${DNET_HEADERS}"
)
if (MSVC)
target_link_libraries(${PROJECT_NAME} PUBLIC Iphlpapi ws2_32)
endif()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${PROJECT_NAME} COMPONENT devel
)
install(FILES ${DNET_HEADERS1}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
COMPONENT devel)
install(EXPORT ${PROJECT_NAME}Targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
COMPONENT devel
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
@ONLY
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config-version.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
@ONLY
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/
COMPONENT devel
)
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
if(${CMAKE_VERSION} VERSION_GREATER "3.5")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
endif()
endif()
include(CPack)

View File

@@ -1,6 +1,10 @@
*BSD, MacOS X, Linux
--------------------
Make sure you have `pkg-config` installed.
Install Check (https://libcheck.github.io/check/) for additional checks
during build time.
./configure && make
@@ -56,4 +60,4 @@ To build a Microsoft Visual C++ native library and Python module
cd ../src && lib /out:dnet.lib *.obj
# $Id: INSTALL 590 2005-02-15 07:38:19Z dugsong $
# $Id$

View File

@@ -1,4 +1,4 @@
## $Id: Makefile.am 618 2006-01-15 06:42:19Z dugsong $
## $Id$
include $(top_srcdir)/Makefile.am.common
@@ -6,12 +6,14 @@ SUBDIRS = include src
bin_SCRIPTS = dnet-config
EXTRA_DIST = LICENSE Makefile.am.common acconfig.h
EXTRA_DIST = LICENSE Makefile.am.common acconfig.h libdnet.spec
CLEANFILES = dnet-config
aux_dir = config
AUX_DIST = $(aux_dir)/acinclude.m4
ACLOCAL_AMFLAGS = -I config
AUX_DIST = $(ac_aux_dir)/acinclude.m4 \
$(ac_aux_dir)/config.guess \
$(ac_aux_dir)/config.sub \
$(ac_aux_dir)/install-sh \
$(ac_aux_dir)/ltmain.sh \
$(ac_aux_dir)/missing \
$(ac_aux_dir)/mkinstalldirs

View File

@@ -1,6 +1,7 @@
## $Id: Makefile.am.common 623 2006-01-19 06:09:27Z dugsong $
## $Id$
AUTOMAKE_OPTIONS = foreign no-dependencies
AM_CPPFLAGS = -I$(top_srcdir)/include
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,9 +15,65 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -32,55 +88,163 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../config.guess \
$(srcdir)/../config.sub $(srcdir)/../install-sh \
$(srcdir)/../ltmain.sh $(srcdir)/../missing \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/dnet-config.in $(top_srcdir)/Makefile.am.common \
$(top_srcdir)/configure INSTALL THANKS TODO acconfig.h
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES = dnet-config
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(bindir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__depfiles_maybe =
am__maybe_remake_depfiles =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/dnet-config.in \
$(top_srcdir)/Makefile.am.common $(top_srcdir)/config/compile \
$(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing \
$(top_srcdir)/config/mkinstalldirs INSTALL README.md THANKS \
TODO acconfig.h config/compile config/config.guess \
config/config.sub config/install-sh config/ltmain.sh \
config/missing config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -89,21 +253,24 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHECKINC = @CHECKINC@
CHECKLIB = @CHECKLIB@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -118,8 +285,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
@@ -132,21 +301,22 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TCLINC = @TCLINC@
TCLLIB = @TCLLIB@
STRLCPY_HEADER = @STRLCPY_HEADER@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -179,7 +349,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -187,6 +356,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -196,71 +366,94 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include
SUBDIRS = include src
bin_SCRIPTS = dnet-config
EXTRA_DIST = LICENSE Makefile.am.common acconfig.h
EXTRA_DIST = LICENSE Makefile.am.common acconfig.h libdnet.spec
CLEANFILES = dnet-config
aux_dir = config
AUX_DIST = $(aux_dir)/acinclude.m4
ACLOCAL_AMFLAGS = -I config
AUX_DIST = $(ac_aux_dir)/acinclude.m4 \
$(ac_aux_dir)/config.guess \
$(ac_aux_dir)/config.sub \
$(ac_aux_dir)/install-sh \
$(ac_aux_dir)/ltmain.sh \
$(ac_aux_dir)/missing \
$(ac_aux_dir)/mkinstalldirs
all: all-recursive
.SUFFIXES:
am--refresh:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
cd $(srcdir) && $(AUTOMAKE) --foreign \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/Makefile.am.common $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
dnet-config: $(top_builddir)/config.status $(srcdir)/dnet-config.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
mostlyclean-libtool:
-rm -f *.lo
@@ -269,25 +462,28 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -295,65 +491,20 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -365,45 +516,65 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d $(distdir) || mkdir $(distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -419,66 +590,94 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
$(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
$(am__post_remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -486,29 +685,37 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -526,14 +733,24 @@ distcheck: dist
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@@ -567,10 +784,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@@ -578,6 +800,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -598,6 +821,8 @@ dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
@@ -606,18 +831,28 @@ install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-binSCRIPTS
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -640,14 +875,14 @@ ps-am:
uninstall-am: uninstall-binSCRIPTS
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
distclean distclean-generic distclean-libtool distclean-tags \
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-binSCRIPTS \
install-data install-data-am install-dvi install-dvi-am \
@@ -657,8 +892,10 @@ uninstall-am: uninstall-binSCRIPTS
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-binSCRIPTS
tags tags-am uninstall uninstall-am uninstall-binSCRIPTS
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,3 @@
libdnet
-------
@@ -8,6 +7,13 @@ arp(4) cache and route(4) table lookup and manipulation, network
firewalling, network interface lookup and manipulation, IP tunnelling,
and raw IP packet and Ethernet frame transmission.
WWW: http://libdnet.sourceforge.net/
Reporting issues
----------------
$Id: README 578 2005-02-14 21:00:17Z dugsong $
Before reporting an issue, please make sure you check the 'devel' branch
to see if it's already fixed. This is the current WIP and contains already
a lot of fixes, but for compatibilty reasons, it's not yet included
in the main branch.
WWW: https://github.com/ofalk/libdnet

View File

@@ -1,4 +1,4 @@
# $Id: THANKS 596 2005-02-17 02:58:11Z dugsong $
# $Id$
many thanks to all the folks who have contributed to libdnet:
@@ -77,6 +77,9 @@ Niels Provos <provos@monkey.org>
Andrew Reiter <arr@watson.org>
help with ipfw braindeath
Daniel Roethlisberger <daniel@roe.ch>
initial SCTP support
John S <sjohns@users.sourceforge.net>
VPATH build bug report
@@ -104,3 +107,8 @@ Christophe Ternat <christophe.ternat@rstpacket.org>
xs <xs@nitric.net>
NetBSD testing
Kris Katterjohn <katterjohn@gmail.com>
void dereferencing and ifloop NetBSD fixes
David Fifield <david@bamsoftware.com>
Many fixes from Nmap developers

View File

@@ -76,4 +76,4 @@ need reliable, legit HP-UX, Unixware, and AIX accounts with root
access to finish the ports to those platforms. i'd be happy to port to
other platforms also, given similar (temporary) access.
$Id: TODO 582 2005-02-14 21:56:59Z dugsong $
$Id$

View File

@@ -8,25 +8,25 @@
#endif
#ifdef __svr4__
# define BSD_COMP 1
# define BSD_COMP 1
#endif
#if defined(__osf__) && !defined(_SOCKADDR_LEN)
# define _SOCKADDR_LEN 1
# define _SOCKADDR_LEN 1
#endif
#ifndef HAVE_INET_PTON
int inet_pton(int, const char *, void *);
int inet_pton(int, const char *, void *);
#endif
#ifndef HAVE_STRLCAT
int strlcat(char *, const char *, int);
#endif
#ifndef HAVE_STRLCPY
int strlcpy(char *, const char *, int);
int strlcpy(char *, const char *, int);
#endif
#ifndef HAVE_STRSEP
char *strsep(char **, const char *);
#endif
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
char *strsep(char **, const char *);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
SET(PACKAGE_VERSION @PROJECT_VERSION@)
IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
SET(PACKAGE_VERSION_EXACT "true")
ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
SET(PACKAGE_VERSION_COMPATIBLE "true")
ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
SET(PACKAGE_VERSION_UNSUITABLE "true")
ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
IF (PACKAGE_VERSION_UNSUITABLE)
MESSAGE("VERSION CHECK FAILED FOR ${PACKAGE_FIND_NAME}. WANTED ${PACKAGE_FIND_VERSION}, HAVE ${PACKAGE_VERSION}")
ENDIF(PACKAGE_VERSION_UNSUITABLE)

View File

@@ -0,0 +1,5 @@
SET(prefix "@CMAKE_INSTALL_PREFIX@")
SET(exec_prefix "@CMAKE_INSTALL_PREFIX@")
SET(dnet_FOUND "TRUE")
include("${CMAKE_CURRENT_LIST_DIR}/dnetTargets.cmake")

View File

@@ -0,0 +1,302 @@
/* include/config.h.in. Generated from configure.ac by autoheader. */
/* Define if arpreq struct has arp_dev. */
#cmakedefine HAVE_ARPREQ_ARP_DEV
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the `err' function. */
#cmakedefine HAVE_ERR
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define to 1 if you have the <hpsecurity.h> header file. */
#cmakedefine HAVE_HPSECURITY_H
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define if you have arp(7) ioctls. */
#cmakedefine HAVE_IOCTL_ARP
/* Define to 1 if you have the <Iphlpapi.h> header file. */
#cmakedefine HAVE_IPHLPAPI_H
/* Define to 1 if you have the <ip_compat.h> header file. */
#cmakedefine HAVE_IP_COMPAT_H
/* Define to 1 if you have the <ip_fil_compat.h> header file. */
#cmakedefine HAVE_IP_FIL_COMPAT_H
/* Define to 1 if you have the <ip_fil.h> header file. */
#cmakedefine HAVE_IP_FIL_H
/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */
#cmakedefine HAVE_LIBIPHLPAPI
/* Define to 1 if you have the `nm' library (-lnm). */
#cmakedefine HAVE_LIBNM
/* Define to 1 if you have the `nsl' library (-lnsl). */
#cmakedefine HAVE_LIBNSL
/* Define to 1 if you have the `resolv' library (-lresolv). */
#cmakedefine HAVE_LIBRESOLV
/* Define to 1 if you have the `socket' library (-lsocket). */
#cmakedefine HAVE_LIBSOCKET
/* Define to 1 if you have the `str' library (-lstr). */
#cmakedefine HAVE_LIBSTR
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
#cmakedefine HAVE_LIBWS2_32
/* Define to 1 if you have the <linux/if_tun.h> header file. */
#cmakedefine HAVE_LINUX_IF_TUN_H
/* Define to 1 if you have the <linux/ip_fwchains.h> header file. */
#cmakedefine HAVE_LINUX_IP_FWCHAINS_H
/* Define to 1 if you have the <linux/ip_fw.h> header file. */
#cmakedefine HAVE_LINUX_IP_FW_H
/* Define to 1 if you have the <linux/netfilter_ipv4/ipchains_core.h> header
file. */
#cmakedefine HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H
/* Define if you have Linux PF_PACKET sockets. */
#cmakedefine HAVE_LINUX_PF_PACKET
/* Define if you have the Linux /proc filesystem. */
#cmakedefine HAVE_LINUX_PROCFS
/* Define to 1 if you have the <netinet/in_var.h> header file. */
#cmakedefine HAVE_NETINET_IN_VAR_H
/* Define to 1 if you have the <netinet/ip_compat.h> header file. */
#cmakedefine HAVE_NETINET_IP_COMPAT_H
/* Define to 1 if you have the <netinet/ip_fil_compat.h> header file. */
#cmakedefine HAVE_NETINET_IP_FIL_COMPAT_H
/* Define to 1 if you have the <netinet/ip_fil.h> header file. */
#cmakedefine HAVE_NETINET_IP_FIL_H
/* Define to 1 if you have the <netinet/ip_fw.h> header file. */
#cmakedefine HAVE_NETINET_IP_FW_H
/* Define to 1 if you have the <net/bpf.h> header file. */
#cmakedefine HAVE_NET_BPF_H
/* Define to 1 if you have the <net/if_arp.h> header file. */
#cmakedefine HAVE_NET_IF_ARP_H
/* Define to 1 if you have the <net/if_dl.h> header file. */
#cmakedefine HAVE_NET_IF_DL_H
/* Define to 1 if you have the <net/if.h> header file. */
#cmakedefine HAVE_NET_IF_H
/* Define to 1 if you have the <net/if_tun.h> header file. */
#cmakedefine HAVE_NET_IF_TUN_H
/* Define to 1 if you have the <net/if_var.h> header file. */
#cmakedefine HAVE_NET_IF_VAR_H
/* Define to 1 if you have the <net/pfilt.h> header file. */
#cmakedefine HAVE_NET_PFILT_H
/* Define to 1 if you have the <net/pfvar.h> header file. */
#cmakedefine HAVE_NET_PFVAR_H
/* Define to 1 if you have the <net/radix.h> header file. */
#cmakedefine HAVE_NET_RADIX_H
/* Define to 1 if you have the <net/raw.h> header file. */
#cmakedefine HAVE_NET_RAW_H
/* Define to 1 if you have the <net/route.h> header file. */
#cmakedefine HAVE_NET_ROUTE_H
/* Define if you have cooked raw IP sockets. */
#cmakedefine HAVE_RAWIP_COOKED
/* Define if raw IP sockets require host byte ordering for ip_off, ip_len. */
#cmakedefine HAVE_RAWIP_HOST_OFFLEN
/* Define if <net/route.h> has rt_msghdr struct. */
#cmakedefine HAVE_ROUTE_RT_MSGHDR
/* Define if <netinet/in.h> has sockaddr_in6 struct. */
#cmakedefine HAVE_SOCKADDR_IN6
/* Define if sockaddr struct has sa_len. */
#cmakedefine HAVE_SOCKADDR_SA_LEN
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#cmakedefine HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define if you have SNMP MIB2 STREAMS. */
#cmakedefine HAVE_STREAMS_MIB2
/* Define if you have route(7) STREAMS. */
#cmakedefine HAVE_STREAMS_ROUTE
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the `strlcat' function. */
#cmakedefine HAVE_STRLCAT
/* Define to 1 if you have the `strlcpy' function. */
#cmakedefine HAVE_STRLCPY
/* Define to 1 if you have the <stropts.h> header file. */
#cmakedefine HAVE_STROPTS_H
/* Define to 1 if you have the `strsep' function. */
#cmakedefine HAVE_STRSEP
/* Define to 1 if you have the <sys/bufmod.h> header file. */
#cmakedefine HAVE_SYS_BUFMOD_H
/* Define to 1 if you have the <sys/dlpihdr.h> header file. */
#cmakedefine HAVE_SYS_DLPIHDR_H
/* Define to 1 if you have the <sys/dlpi_ext.h> header file. */
#cmakedefine HAVE_SYS_DLPI_EXT_H
/* Define to 1 if you have the <sys/dlpi.h> header file. */
#cmakedefine HAVE_SYS_DLPI_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#cmakedefine HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/mib.h> header file. */
#cmakedefine HAVE_SYS_MIB_H
/* Define to 1 if you have the <sys/ndd_var.h> header file. */
#cmakedefine HAVE_SYS_NDD_VAR_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/sockio.h> header file. */
#cmakedefine HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#cmakedefine HAVE_SYS_SYSCTL_H
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define to 1 if you have the <winsock2.h> header file. */
#cmakedefine HAVE_WINSOCK2_H
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#cmakedefine LT_OBJDIR
/* Name of package */
#cmakedefine PACKAGE "@PACKAGE@"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#cmakedefine STDC_HEADERS
/* Version number of package */
#cmakedefine VERSION "@VERSION@"
/* Define for faster code generation. */
#cmakedefine WIN32_LEAN_AND_MEAN
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#cmakedefine inline
#endif
/* Define as a signed integer type capable of holding a process identifier. */
#cmakedefine pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#cmakedefine size_t
/* Use MingW32's internal snprintf */
#cmakedefine snprintf
#include <sys/types.h>
#ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# include <windows.h>
#endif
#ifdef __svr4__
# define BSD_COMP 1
#endif
#if defined(__osf__) && !defined(_SOCKADDR_LEN)
# define _SOCKADDR_LEN 1
#endif
/* Define to 1 if you have the `inet_pton' function. */
#cmakedefine HAVE_INET_PTON
#ifndef HAVE_INET_PTON
int inet_pton(int, const char *, void *);
#endif
#ifndef HAVE_STRLCAT
int strlcat(char *, const char *, int);
#endif
#ifndef HAVE_STRLCPY
int strlcpy(char *, const char *, int);
#endif
#ifndef HAVE_STRSEP
char *strsep(char **, const char *);
#endif

348
libdnet-stripped/config/compile Executable file
View File

@@ -0,0 +1,348 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

1748
libdnet-stripped/config/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1884
libdnet-stripped/config/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,541 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# 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
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# Set DOITPROG to "echo" to test this script.
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_mkdir=
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

6397
libdnet-stripped/config/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

215
libdnet-stripped/config/missing Executable file
View File

@@ -0,0 +1,215 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
case $1 in
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=https://www.perl.org/
flex_URL=https://github.com/westes/flex
gnu_software_URL=https://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -0,0 +1,162 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2020-07-26.22; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the 'mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because '.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "umask 22"
umask 22
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
echo "umask 22"
umask 22
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp=$pathcomp/
done
if test ! -z "$dirmode"; then
echo "chmod $dirmode $file"
chmod "$dirmode" "$file" || errstatus=$?
fi
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -0,0 +1,153 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
#
# This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
usage_error ()
{
echo "$0: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
test-driver --test-name NAME --log-file PATH --trs-file PATH
[--expect-failure {yes|no}] [--color-tests {yes|no}]
[--enable-hard-errors {yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
See the GNU Automake documentation for information.
END
}
test_name= # Used for reporting.
log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=no
color_tests=no
enable_hard_errors=yes
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "test-driver $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
*) break;;
esac
shift
done
missing_opts=
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
if test x"$missing_opts" != x; then
usage_error "the following mandatory options are missing:$missing_opts"
fi
if test $# -eq 0; then
usage_error "missing argument"
fi
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='' # Red.
grn='' # Green.
lgn='' # Light green.
blu='' # Blue.
mgn='' # Magenta.
std='' # No color.
else
red= grn= lgn= blu= mgn= std=
fi
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
trap "st=129; $do_exit" 1
trap "st=130; $do_exit" 2
trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
# Test script is run here. We create the file first, then append to it,
# to ameliorate tests themselves also writing to the log file. Our tests
# don't, but others can (automake bug#35762).
: >"$log_file"
"$@" >>"$log_file" 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
tweaked_estatus=1
else
tweaked_estatus=$estatus
fi
case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
# Report the test outcome and exit status in the logs, so that one can
# know whether the test passed or failed simply by looking at the '.log'
# file, without the need of also peaking into the corresponding '.trs'
# file (automake bug#11814).
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
# Register the test result, and other relevant metadata.
echo ":test-result: $res" > $trs_file
echo ":global-test-result: $res" >> $trs_file
echo ":recheck: $recheck" >> $trs_file
echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1,26 @@
dnl
dnl configure.in
dnl
dnl Copyright (c) 2000 Dug Song <dugsong@monkey.org>
dnl Copyright (c) 2023-2024 Oliver Falk <oliver@linux-kernel.at>
dnl
dnl $Id: configure.in 638 2007-01-20 11:39:21Z dugsong $
dnl $Id$
AC_INIT(include/dnet.h)
AC_INIT([libdnet],[1.18.0])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(config)
AC_SUBST(ac_aux_dir)
AM_INIT_AUTOMAKE(libdnet, 1.12)
AM_CONFIG_HEADER(include/config.h)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS(include/config.h)
LT_PREREQ([2.2])
LT_INIT
dnl XXX - stop the insanity!@#$
AM_MAINTAINER_MODE
dnl Check for system type.
dnl XXX - we do this to qualify our later feature checks, since some
dnl systems claim to support multiple features, but are quite b0rked.
AC_CANONICAL_HOST
dnl XXX - spoof AC_CYGWIN
case "$host_os" in
*cygwin*) CYGWIN=yes;;
*) CYGWIN=no;;
@@ -31,44 +34,23 @@ fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_LIBTOOL_DLOPEN
AC_DISABLE_SHARED
AM_PROG_LIBTOOL
_LT_SET_OPTION([LT_INIT],[dlopen])
m4_warn([obsolete],[_LT_SET_OPTION([LT_INIT],[dlopen])
m4_warn([obsolete],[_LT_SET_OPTION([LT_INIT],[dlopen])
m4_warn([obsolete],[_LT_SET_OPTION([LT_INIT],[dlopen])
m4_warn([obsolete],[_LT_SET_OPTION([LT_INIT],[dlopen])
m4_warn([obsolete],[AC_LIBTOOL_DLOPEN: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
dnl Checks for Python.
dnl XXX - use AM_PATH_PYTHON after automake upgrade
AC_MSG_CHECKING(for Python)
AC_ARG_WITH(python,
[ --with-python=DIR build Python module (using python in DIR)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
PYTHON="python"
;;
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT($withval)
for subdir in . bin; do
if test -x $withval/$subdir/python; then
owd=`pwd`
if cd $withval/$subdir; then withval=`pwd`; cd $owd; fi
PYTHON="$withval/python"
break
fi
done
if test "x$PYTHON" = "x"; then
AC_ERROR(python not found in $withval)
fi
;;
esac
])
AC_SUBST(PYTHON)
AC_SUBST(TCLINC)
AC_SUBST(TCLLIB)
AM_CONDITIONAL(PYTHON, [test "x$PYTHON" != "x"])
AM_CONDITIONAL(TCL, [test "x$TCLINC" != "x"])
LT_INIT
dnl XXX - stupid IRIX cpp
if test -r /usr/include/sgidefs.h ; then
@@ -120,45 +102,7 @@ if test "$CYGWIN" != yes ; then
AC_CHECK_LIB(nm, open_mib)
fi
dnl Checks for Check.
AC_MSG_CHECKING(for Check)
AC_ARG_WITH(check,
[ --with-check=DIR use Check (http://check.sf.net) in DIR],
[ case "$withval" in
yes|no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT($withval)
if test -f $withval/include/check.h -a -f $withval/lib/libcheck.a; then
owd=`pwd`
if cd $withval; then withval=`pwd`; cd $owd; fi
CHECKINC="-I$withval/include"
CHECKLIB="-L$withval/lib -lcheck"
elif test -f $withval/src/check.h -a -f $withval/src/libcheck.a; then
owd=`pwd`
if cd $withval; then withval=`pwd`; cd $owd; fi
CHECKINC="-I$withval/src"
CHECKLIB="-L$withval/src -lcheck"
else
AC_ERROR(check.h or libcheck.a not found in $withval)
fi
;;
esac ],
[ if test -f ${prefix}/include/check.h -a -f ${prefix}/lib/libcheck.a; then
CHECKINC="-I${prefix}/include"
CHECKLIB="-L${prefix}/lib -lcheck"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
])
AC_SUBST(CHECKINC)
AC_SUBST(CHECKLIB)
AM_CONDITIONAL(HAVE_CHECK, test "x$CHECKLIB" != "x")
dnl Checks for header files.
AC_HEADER_STDC
if test "$CYGWIN" = yes ; then
AC_CHECK_HEADERS(Iphlpapi.h winsock2.h)
else
@@ -183,6 +127,13 @@ AC_INCLUDES_DEFAULT
#endif
])
fi
AC_CHECK_HEADERS(bsd/string.h)
if test "$ac_cv_header_bsd_string_h" = yes; then
STRLCPY_HEADER="bsd/string.h"
else
STRLCPY_HEADER="string.h"
fi
AC_SUBST(STRLCPY_HEADER)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -203,8 +154,6 @@ AC_PROG_GCC_TRADITIONAL
if test "$GCC" = yes ; then
CFLAGS="$CFLAGS -Wall"
fi
AC_CHECK_TYPES([socklen_t], [], [], [AC_INCLUDES_DEFAULT
#include <sys/socket.h>])
dnl Checks for library functions.
AC_FUNC_MEMCMP
@@ -285,6 +234,13 @@ else
AC_LIBOBJ([route-none])
fi
dnl Check for ndisc interface.
if test "$ac_cv_dnet_linux_procfs" = yes ; then
AC_LIBOBJ([ndisc-linux])
else
AC_LIBOBJ([ndisc-none])
fi
dnl Check for tun interface.
if test "$ac_cv_header_linux_if_tun_h" = yes ; then
AC_LIBOBJ([tun-linux])
@@ -305,6 +261,7 @@ else
AC_LIBOBJ([tun-none])
fi
AC_OUTPUT([Makefile dnet-config include/Makefile include/dnet/Makefile
src/Makefile],
[chmod 755 dnet-config])
AC_CONFIG_FILES([Makefile dnet-config include/Makefile include/dnet/Makefile
src/Makefile])
AC_CONFIG_COMMANDS([default],[chmod 755 dnet-config],[])
AC_OUTPUT

View File

@@ -1,18 +1,23 @@
#!/bin/sh
#
# $Id: dnet-config.in 91 2001-10-19 01:29:00Z dugsong $
# $Id$
prefix=@prefix@
exec_prefix=@prefix@
includedir=@includedir@
libdir=@libdir@
usage()
{
cat <<EOF
Usage: dnet-config [OPTIONS]
Options:
[--version]
[--libs]
[--cflags]
[--prefix[=DIR]] change libxml prefix [default $prefix]
[--exec-prefix[=DIR]] change libxml exec prefix [default $exec_prefix]
[--libs] print library linking information
[--cflags] print pre-processor and compiler flags
[--help] display this help and exit
[--version] output version information
EOF
exit $1
}
@@ -21,6 +26,9 @@ if test $# -eq 0; then
usage 1 1>&2
fi
cflags=false
libs=false
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@@ -28,8 +36,27 @@ while test $# -gt 0; do
esac
case $1 in
--prefix=*)
prefix=$optarg
includedir=$prefix/include
libdir=$prefix/lib
;;
--prefix)
echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
libdir=$exec_prefix/lib
;;
--exec-prefix)
echo_exec_prefix=yes
;;
--version)
echo @VERSION@
exit 0
;;
--help)
usage 0
;;
--cflags)
echo_cflags=yes
@@ -44,11 +71,22 @@ while test $# -gt 0; do
shift
done
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
echo -I@includedir@
if test "$includedir" != /usr/include ; then
echo -I$includedir
fi
fi
if test "$echo_libs" = "yes"; then
echo -L@libdir@ -ldnet @LIBS@
echo -L$libdir -ldnet @LIBS@
fi
exit 0

View File

@@ -1,4 +1,4 @@
## $Id: Makefile.am 294 2002-02-20 19:05:08Z dugsong $
## $Id$
include $(top_srcdir)/Makefile.am.common

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,9 +15,65 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -32,46 +88,137 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/Makefile.am.common
subdir = include
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__depfiles_maybe =
am__maybe_remake_depfiles =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(includedir)"
includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(include_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/Makefile.am.common \
$(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -80,21 +227,24 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHECKINC = @CHECKINC@
CHECKLIB = @CHECKLIB@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -109,8 +259,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
@@ -123,21 +275,22 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TCLINC = @TCLINC@
TCLLIB = @TCLLIB@
STRLCPY_HEADER = @STRLCPY_HEADER@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -170,7 +323,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -178,6 +330,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -187,6 +340,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include
include_HEADERS = dnet.h
SUBDIRS = dnet
@@ -199,23 +353,23 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign include/Makefile
.PRECIOUS: Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign include/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/Makefile.am.common $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -224,18 +378,17 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status include/config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
@@ -249,39 +402,46 @@ clean-libtool:
-rm -rf .libs _libs
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
done
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -289,65 +449,20 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -359,43 +474,56 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -411,29 +539,41 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -456,16 +596,22 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -484,6 +630,8 @@ dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
@@ -492,18 +640,28 @@ install-data-am: install-includeHEADERS
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -524,23 +682,25 @@ ps-am:
uninstall-am: uninstall-includeHEADERS
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean distclean-generic \
distclean-hdr distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-generic distclean-hdr \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am \
install-includeHEADERS install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-includeHEADERS
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-includeHEADERS
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -1,4 +1,4 @@
/* include/config.h.in. Generated from configure.in by autoheader. */
/* include/config.h.in. Generated from configure.ac by autoheader. */
/* Define if arpreq struct has arp_dev. */
#undef HAVE_ARPREQ_ARP_DEV
@@ -6,6 +6,9 @@
/* Define if you have the Berkeley Packet Filter. */
#undef HAVE_BSD_BPF
/* Define to 1 if you have the <bsd/string.h> header file. */
#undef HAVE_BSD_STRING_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -15,6 +18,9 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if <sys/kinfo.h> has getkerninfo. */
#undef HAVE_GETKERNINFO
/* Define to 1 if you have the <hpsecurity.h> header file. */
#undef HAVE_HPSECURITY_H
@@ -76,15 +82,12 @@
/* Define if you have the Linux /proc filesystem. */
#undef HAVE_LINUX_PROCFS
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netinet/in6_var.h> header file. */
#undef HAVE_NETINET_IN6_VAR_H
/* Define to 1 if you have the <netinet/in_var.h> header file. */
#undef HAVE_NETINET_IN_VAR_H
/* Define to 1 if you have the <netinet/in6_var.h> header file. */
#undef HAVE_NETINET_IN6_VAR_H
/* Define to 1 if you have the <netinet/ip_compat.h> header file. */
#undef HAVE_NETINET_IP_COMPAT_H
@@ -133,9 +136,6 @@
/* Define if you have cooked raw IP sockets. */
#undef HAVE_RAWIP_COOKED
/* Define if <sys/kinfo.h> has getkerninfo. */
#undef HAVE_GETKERNINFO
/* Define if raw IP sockets require host byte ordering for ip_off, ip_len. */
#undef HAVE_RAWIP_HOST_OFFLEN
@@ -148,12 +148,12 @@
/* Define if sockaddr struct has sa_len. */
#undef HAVE_SOCKADDR_SA_LEN
/* Define to 1 if the system has the type `socklen_t'. */
#undef HAVE_SOCKLEN_T
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -223,8 +223,7 @@
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */
@@ -242,10 +241,15 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Version number of package */
@@ -263,7 +267,7 @@
#undef inline
#endif
/* Define to `int' if <sys/types.h> does not define. */
/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
@@ -280,25 +284,25 @@
#endif
#ifdef __svr4__
# define BSD_COMP 1
# define BSD_COMP 1
#endif
#if defined(__osf__) && !defined(_SOCKADDR_LEN)
# define _SOCKADDR_LEN 1
# define _SOCKADDR_LEN 1
#endif
#ifndef HAVE_INET_PTON
int inet_pton(int, const char *, void *);
int inet_pton(int, const char *, void *);
#endif
#ifndef HAVE_STRLCAT
int strlcat(char *, const char *, int);
#endif
#ifndef HAVE_STRLCPY
size_t strlcpy(char *, const char *, int);
int strlcpy(char *, const char *, int);
#endif
#ifndef HAVE_STRSEP
char *strsep(char **, const char *);
#endif
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
char *strsep(char **, const char *);
#endif

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: dnet.h 529 2004-09-10 03:10:01Z dugsong $
* $Id$
*/
#ifndef DNET_H
@@ -16,6 +16,7 @@
#include <dnet/ip6.h>
#include <dnet/addr.h>
#include <dnet/arp.h>
#include <dnet/ndisc.h>
#include <dnet/icmp.h>
#include <dnet/icmpv6.h>
#include <dnet/tcp.h>

View File

@@ -1,8 +1,8 @@
## $Id: Makefile.am 525 2004-09-10 02:35:51Z dugsong $
## $Id$
include $(top_srcdir)/Makefile.am.common
dnetincludedir = $(includedir)/dnet
dnetinclude_HEADERS = addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h \
ip6.h os.h rand.h route.h tcp.h tun.h udp.h sctp.h
ip6.h os.h rand.h route.h tcp.h tun.h udp.h sctp.h ndisc.h

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,9 +15,65 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -32,35 +88,94 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(dnetinclude_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common
subdir = include/dnet
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
DIST_COMMON = $(srcdir)/Makefile.am $(dnetinclude_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__depfiles_maybe =
am__maybe_remake_depfiles =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(dnetincludedir)"
dnetincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(dnetinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
$(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -69,21 +184,24 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHECKINC = @CHECKINC@
CHECKLIB = @CHECKLIB@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -98,8 +216,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
@@ -112,21 +232,22 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TCLINC = @TCLINC@
TCLLIB = @TCLLIB@
STRLCPY_HEADER = @STRLCPY_HEADER@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -159,7 +280,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -167,6 +287,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -176,10 +297,11 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include
dnetincludedir = $(includedir)/dnet
dnetinclude_HEADERS = addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h \
ip6.h os.h rand.h route.h tcp.h tun.h udp.h sctp.h
ip6.h os.h rand.h route.h tcp.h tun.h udp.h sctp.h ndisc.h
all: all-am
@@ -188,23 +310,23 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/dnet/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign include/dnet/Makefile
.PRECIOUS: Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/dnet/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign include/dnet/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/Makefile.am.common $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -213,6 +335,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -221,70 +344,81 @@ clean-libtool:
-rm -rf .libs _libs
install-dnetincludeHEADERS: $(dnetinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(dnetincludedir)" || $(MKDIR_P) "$(DESTDIR)$(dnetincludedir)"
@list='$(dnetinclude_HEADERS)'; for p in $$list; do \
@list='$(dnetinclude_HEADERS)'; test -n "$(dnetincludedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dnetincludedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dnetincludedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(dnetincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(dnetincludedir)/$$f'"; \
$(dnetincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(dnetincludedir)/$$f"; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(dnetincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(dnetincludedir)" || exit $$?; \
done
uninstall-dnetincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(dnetinclude_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(dnetincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(dnetincludedir)/$$f"; \
done
@list='$(dnetinclude_HEADERS)'; test -n "$(dnetincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(dnetincludedir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -300,13 +434,17 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -327,16 +465,22 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -355,6 +499,8 @@ dvi-am:
html: html-am
html-am:
info: info-am
info-am:
@@ -363,18 +509,28 @@ install-data-am: install-dnetincludeHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -397,18 +553,22 @@ uninstall-am: uninstall-dnetincludeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dnetincludeHEADERS install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-dnetincludeHEADERS
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool cscopelist-am ctags ctags-am distclean \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dnetincludeHEADERS \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-dnetincludeHEADERS
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: addr.h 404 2003-02-27 03:44:55Z dugsong $
* $Id$
*/
#ifndef DNET_ADDR_H

View File

@@ -4,9 +4,8 @@
* Address Resolution Protocol.
* RFC 826
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
* Copyright (c) 2023-2024 Oliver Falk <oliver@linux-kernel.at>
*
* $Id: arp.h 416 2003-03-16 17:39:18Z dugsong $
*/
#ifndef DNET_ARP_H
@@ -16,9 +15,9 @@
#define ARP_ETHIP_LEN 20 /* base ARP message length */
#ifndef __GNUC__
#ifndef __attribute__
# define __attribute__(x)
#endif
# ifndef __attribute__
# define __attribute__(x)
# endif
# pragma pack(1)
#endif
@@ -38,7 +37,6 @@ struct arp_hdr {
*/
#define ARP_HRD_ETH 0x0001 /* ethernet hardware */
#define ARP_HRD_IEEE802 0x0006 /* IEEE 802 hardware */
#define ARP_HRD_INFINIBAND 0x0020 /* InfiniBand */
#define ARP_HRD_APPLETALK 0x0309 /* AppleTalk DDP */
#define ARP_HDR_IEEE80211 0x0321 /* IEEE 802.11 */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: blob.h 334 2002-04-05 03:06:44Z dugsong $
* $Id$
*/
#ifndef DNET_BLOB_H

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: eth.h 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#ifndef DNET_ETH_H
@@ -68,8 +68,6 @@ int eth_set(eth_t *e, const eth_addr_t *ea);
ssize_t eth_send(eth_t *e, const void *buf, size_t len);
eth_t *eth_close(eth_t *e);
int eth_get_pcap_devname(const char *ifname, char *pcapdev, int pcapdevlen);
char *eth_ntop(const eth_addr_t *eth, char *dst, size_t len);
int eth_pton(const char *src, eth_addr_t *dst);
char *eth_ntoa(const eth_addr_t *eth);

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: fw.h 394 2002-12-14 04:02:36Z dugsong $
* $Id$
*/
#ifndef DNET_FW_H

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: icmp.h 416 2003-03-16 17:39:18Z dugsong $
* $Id$
*/
#ifndef DNET_ICMP_H
@@ -16,9 +16,9 @@
#define ICMP_LEN_MIN 8 /* minimum ICMP message size, with header */
#ifndef __GNUC__
#ifndef __attribute__
# define __attribute__(x)
#endif
# ifndef __attribute__
# define __attribute__(x)
# endif
# pragma pack(1)
#endif

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: intf.h 478 2004-01-13 07:41:09Z dugsong $
* $Id$
*/
#ifndef DNET_INTF_H
@@ -62,11 +62,12 @@ int intf_get(intf_t *i, struct intf_entry *entry);
int intf_get_index(intf_t *intf, struct intf_entry *entry, int af, unsigned int index);
int intf_get_src(intf_t *i, struct intf_entry *entry, struct addr *src);
int intf_get_dst(intf_t *i, struct intf_entry *entry, struct addr *dst);
int intf_get_pcap_devname(const char *intf_name, char *pcapdev, int pcapdevlen);
int intf_get_pcap_devname_cached(const char *intf_name, char *pcapdev, int pcapdevlen, int refresh);
int intf_set(intf_t *i, const struct intf_entry *entry);
int intf_loop(intf_t *i, intf_handler callback, void *arg);
intf_t *intf_close(intf_t *i);
#ifdef _WIN32
int intf_get_pcap_devname(const char *intf_name, char *pcapdev, int pcapdevlen);
#endif
__END_DECLS
#endif /* DNET_INTF_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: ip.h 594 2005-02-16 22:02:45Z dugsong $
* $Id$
*/
#ifndef DNET_IP_H
@@ -25,9 +25,9 @@
typedef uint32_t ip_addr_t;
#ifndef __GNUC__
#ifndef __attribute__
# define __attribute__(x)
#endif
# ifndef __attribute__
# define __attribute__(x)
# endif
# pragma pack(1)
#endif

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: ip6.h 486 2004-02-23 10:01:15Z dugsong $
* $Id$
*/
#ifndef DNET_IP6_H
@@ -25,9 +25,9 @@ typedef struct ip6_addr {
} ip6_addr_t;
#ifndef __GNUC__
#ifndef __attribute__
# define __attribute__(x)
#endif
# ifndef __attribute__
# define __attribute__(x)
# endif
# pragma pack(1)
#endif
@@ -164,8 +164,8 @@ struct ip6_ext_hdr {
#define ip6_pack_hdr(hdr, fc, fl, plen, nxt, hlim, src, dst) do { \
struct ip6_hdr *ip6 = (struct ip6_hdr *)(hdr); \
ip6->ip6_flow = htonl(((uint32_t)(fc) << 20) | \
(0x000fffff & (fl))); \
ip6->ip6_flow = htonl(((uint32_t)(fc) << 20) | \
(0x000fffff & (fl))); \
ip6->ip6_vfc = (IP6_VERSION | ((fc) >> 4)); \
ip6->ip6_plen = htons((plen)); \
ip6->ip6_nxt = (nxt); ip6->ip6_hlim = (hlim); \
@@ -179,6 +179,9 @@ int ip6_pton(const char *src, ip6_addr_t *dst);
char *ip6_ntoa(const ip6_addr_t *ip6);
#define ip6_aton ip6_pton
ssize_t ip6_add_option(void *buf, size_t len,
int proto, const void *optbuf, size_t optlen);
void ip6_checksum(void *buf, size_t len);
__END_DECLS

View File

@@ -0,0 +1,35 @@
/*
* ndisc.c
*
* Kernel arp/ndisc table operations.
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
*/
#ifndef DNET_NDISC_H
#define DNET_NDISC_H
/*
* NDISC cache entry
*/
struct ndisc_entry {
int intf_index;
struct addr ndisc_pa; /* protocol address */
struct addr ndisc_ha; /* hardware address */
};
typedef struct ndisc_handle ndisc_t;
typedef int (*ndisc_handler)(const struct ndisc_entry *entry, void *arg);
__BEGIN_DECLS
ndisc_t *ndisc_open(void);
int ndisc_add(ndisc_t *n, const struct ndisc_entry *entry);
int ndisc_delete(ndisc_t *n, const struct ndisc_entry *entry);
int ndisc_get(ndisc_t *n, struct ndisc_entry *entry);
int ndisc_loop(ndisc_t *n, ndisc_handler callback, void *arg);
ndisc_t *ndisc_close(ndisc_t *r);
__END_DECLS
#endif /* DNET_NDISC_H */

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: os.h 583 2005-02-15 05:31:00Z dugsong $
* $Id$
*/
#ifndef DNET_OS_H

View File

@@ -6,7 +6,7 @@
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
* Copyright (c) 1996 David Mazieres <dm@lcs.mit.edu>
*
* $Id: rand.h 340 2002-04-07 19:01:25Z dugsong $
* $Id$
*/
#ifndef DNET_RAND_H

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: route.h 260 2002-02-04 04:03:45Z dugsong $
* $Id$
*/
#ifndef DNET_ROUTE_H
@@ -28,7 +28,10 @@ typedef int (*route_handler)(const struct route_entry *entry, void *arg);
__BEGIN_DECLS
route_t *route_open(void);
int route_add(route_t *r, const struct route_entry *entry);
int route_add_dev(route_t *r, const struct route_entry *entry, const char* dev);
int route6_add(route_t *r, const struct route_entry *entry, int intf_index);
int route_delete(route_t *r, const struct route_entry *entry);
int route6_delete(route_t *r, const struct route_entry *entry, int intf_index);
int route_get(route_t *r, struct route_entry *entry);
int route_loop(route_t *r, route_handler callback, void *arg);
route_t *route_close(route_t *r);

View File

@@ -5,7 +5,6 @@
*
* Copyright (c) 2008-2009 Daniel Roethlisberger <daniel@roe.ch>
*
* $Id: sctp.h 653 2009-07-05 21:00:00Z daniel@roe.ch $
*/
#ifndef DNET_SCTP_H

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: tcp.h 487 2004-02-23 10:02:11Z dugsong $
* $Id$
*/
#ifndef DNET_TCP_H
@@ -17,9 +17,9 @@
#define TCP_HDR_LEN_MAX (TCP_HDR_LEN + TCP_OPT_LEN_MAX)
#ifndef __GNUC__
#ifndef __attribute__
# define __attribute__(x)
#endif
# ifndef __attribute__
# define __attribute__(x)
# endif
# pragma pack(1)
#endif

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: tun.h 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#ifndef DNET_TUN_H

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: udp.h 330 2002-04-02 05:05:39Z dugsong $
* $Id$
*/
#ifndef DNET_UDP_H

View File

@@ -1,139 +1,132 @@
/* include/dnet_winconfig.h -- Windows configuration #defines. It is modified
from the config.h generated by configure on other platforms. */
/* include/config.h.in. Generated from configure.ac by autoheader. */
/* Define if arpreq struct has arp_dev. */
#define HAVE_ARPREQ_ARP_DEV 1
/* #undef HAVE_ARPREQ_ARP_DEV */
/* Define if you have the Berkeley Packet Filter. */
/* #undef HAVE_BSD_BPF */
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `err' function. */
/* #undef HAVE_ERR */
/* Define if you have the `err' function. */
#define HAVE_ERR 1
/* Define to 1 if you have the <fcntl.h> header file. */
/* #undef HAVE_FCNTL_H */
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <hpsecurity.h> header file. */
/* Define to 1 if you have the <hpsecurity.h> header file. */
/* #undef HAVE_HPSECURITY_H */
/* Define if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H
/* Define if you have arp(7) ioctls. */
#define HAVE_IOCTL_ARP 1
/* #undef HAVE_IOCTL_ARP */
/* Define if you have the <Iphlpapi.h> header file. */
/* #undef HAVE_IPHLPAPI_H */
/* Define to 1 if you have the <Iphlpapi.h> header file. */
#define HAVE_IPHLPAPI_H
/* Define if you have the <ip_compat.h> header file. */
/* Define to 1 if you have the <ip_compat.h> header file. */
/* #undef HAVE_IP_COMPAT_H */
/* Define if you have the <ip_fil_compat.h> header file. */
/* Define to 1 if you have the <ip_fil_compat.h> header file. */
/* #undef HAVE_IP_FIL_COMPAT_H */
/* Define if you have the <ip_fil.h> header file. */
/* Define to 1 if you have the <ip_fil.h> header file. */
/* #undef HAVE_IP_FIL_H */
/* Define if you have the `iphlpapi' library (-liphlpapi). */
/* #undef HAVE_LIBIPHLPAPI */
/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */
#define HAVE_LIBIPHLPAPI
/* Define if you have the `nm' library (-lnm). */
/* Define to 1 if you have the <pcap.h> header file. */
#define HAVE_PCAP_H
/* Define to 1 if you have the `nm' library (-lnm). */
/* #undef HAVE_LIBNM */
/* Define if you have the `nsl' library (-lnsl). */
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */
/* Define if you have the `resolv' library (-lresolv). */
/* Define to 1 if you have the `resolv' library (-lresolv). */
/* #undef HAVE_LIBRESOLV */
/* Define if you have the `socket' library (-lsocket). */
/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */
/* Define if you have the `str' library (-lstr). */
/* Define to 1 if you have the `str' library (-lstr). */
/* #undef HAVE_LIBSTR */
/* Define if you have the `ws2_32' library (-lws2_32). */
/* #undef HAVE_LIBWS2_32 */
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
#define HAVE_LIBWS2_32
/* Define if you have the <linux/if_tun.h> header file. */
#define HAVE_LINUX_IF_TUN_H 1
/* Define to 1 if you have the <linux/if_tun.h> header file. */
/* #undef HAVE_LINUX_IF_TUN_H */
/* Define if you have the <linux/ip_fwchains.h> header file. */
/* Define to 1 if you have the <linux/ip_fwchains.h> header file. */
/* #undef HAVE_LINUX_IP_FWCHAINS_H */
/* Define if you have the <linux/ip_fw.h> header file. */
/* Define to 1 if you have the <linux/ip_fw.h> header file. */
/* #undef HAVE_LINUX_IP_FW_H */
/* Define if you have the <linux/netfilter_ipv4/ipchains_core.h> header file.
*/
#define HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H 1
/* Define to 1 if you have the <linux/netfilter_ipv4/ipchains_core.h> header
file. */
/* #undef HAVE_LINUX_NETFILTER_IPV4_IPCHAINS_CORE_H */
/* Define if you have Linux PF_PACKET sockets. */
#define HAVE_LINUX_PF_PACKET 1
/* #undef HAVE_LINUX_PF_PACKET */
/* Define if you have the Linux /proc filesystem. */
#define HAVE_LINUX_PROCFS 1
/* #undef HAVE_LINUX_PROCFS */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <netinet/in_var.h> header file. */
/* Define to 1 if you have the <netinet/in_var.h> header file. */
/* #undef HAVE_NETINET_IN_VAR_H */
/* Define if you have the <netinet/ip_compat.h> header file. */
/* Define to 1 if you have the <netinet/ip_compat.h> header file. */
/* #undef HAVE_NETINET_IP_COMPAT_H */
/* Define if you have the <netinet/ip_fil_compat.h> header file. */
/* Define to 1 if you have the <netinet/ip_fil_compat.h> header file. */
/* #undef HAVE_NETINET_IP_FIL_COMPAT_H */
/* Define if you have the <netinet/ip_fil.h> header file. */
/* Define to 1 if you have the <netinet/ip_fil.h> header file. */
/* #undef HAVE_NETINET_IP_FIL_H */
/* Define if you have the <netinet/ip_fw.h> header file. */
/* Define to 1 if you have the <netinet/ip_fw.h> header file. */
/* #undef HAVE_NETINET_IP_FW_H */
/* Define if you have the <net/bpf.h> header file. */
/* Define to 1 if you have the <net/bpf.h> header file. */
/* #undef HAVE_NET_BPF_H */
/* Define if you have the <net/if_arp.h> header file. */
#define HAVE_NET_IF_ARP_H 1
/* Define to 1 if you have the <net/if_arp.h> header file. */
/* #undef HAVE_NET_IF_ARP_H */
/* Define if you have the <net/if_dl.h> header file. */
/* Define to 1 if you have the <net/if_dl.h> header file. */
/* #undef HAVE_NET_IF_DL_H */
/* Define if you have the <net/if.h> header file. */
// #define HAVE_NET_IF_H 1
/* Define to 1 if you have the <net/if.h> header file. */
/* #undef HAVE_NET_IF_H */
/* Define if you have the <net/if_tun.h> header file. */
/* Define to 1 if you have the <net/if_tun.h> header file. */
/* #undef HAVE_NET_IF_TUN_H */
/* Define if you have the <net/if_var.h> header file. */
/* Define to 1 if you have the <net/if_var.h> header file. */
/* #undef HAVE_NET_IF_VAR_H */
/* Define if you have the <net/pfilt.h> header file. */
/* Define to 1 if you have the <net/pfilt.h> header file. */
/* #undef HAVE_NET_PFILT_H */
/* Define if you have the <net/pfvar.h> header file. */
/* Define to 1 if you have the <net/pfvar.h> header file. */
/* #undef HAVE_NET_PFVAR_H */
/* Define if you have the <net/radix.h> header file. */
/* Define to 1 if you have the <net/radix.h> header file. */
/* #undef HAVE_NET_RADIX_H */
/* Define if you have the <net/raw.h> header file. */
/* Define to 1 if you have the <net/raw.h> header file. */
/* #undef HAVE_NET_RAW_H */
/* Define if you have the <net/route.h> header file. */
#define HAVE_NET_ROUTE_H 1
/* Define to 1 if you have the <net/route.h> header file. */
/* #undef HAVE_NET_ROUTE_H */
/* Define if you have cooked raw IP sockets. */
/* #undef HAVE_RAWIP_COOKED */
/* Define if <sys/kinfo.h> has getkerninfo. */
/* #undef HAVE_GETKERNINFO */
/* Define if raw IP sockets require host byte ordering for ip_off, ip_len. */
/* #undef HAVE_RAWIP_HOST_OFFLEN */
@@ -141,16 +134,19 @@
/* #undef HAVE_ROUTE_RT_MSGHDR */
/* Define if <netinet/in.h> has sockaddr_in6 struct. */
#define HAVE_SOCKADDR_IN6 1
/* #undef HAVE_SOCKADDR_IN6 */
/* Define if sockaddr struct has sa_len. */
/* #undef HAVE_SOCKADDR_SA_LEN */
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H
/* Define if you have SNMP MIB2 STREAMS. */
/* #undef HAVE_STREAMS_MIB2 */
@@ -158,74 +154,100 @@
/* Define if you have route(7) STREAMS. */
/* #undef HAVE_STREAMS_ROUTE */
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <strings.h> header file. */
/* #undef HAVE_STRINGS_H */
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H
/* Define if you have the `strlcpy' function. */
/* Define to 1 if you have the `strlcat' function. */
/* #undef HAVE_STRLCAT */
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */
/* Define if you have the <stropts.h> header file. */
#define HAVE_STROPTS_H 1
/* Define to 1 if you have the <stropts.h> header file. */
/* #undef HAVE_STROPTS_H */
/* Define if you have the `strsep' function. */
#define HAVE_STRSEP 1
/* Define to 1 if you have the `strsep' function. */
/* #undef HAVE_STRSEP */
/* Define if you have the <sys/bufmod.h> header file. */
/* Define to 1 if you have the <sys/bufmod.h> header file. */
/* #undef HAVE_SYS_BUFMOD_H */
/* Define if you have the <sys/dlpihdr.h> header file. */
/* Define to 1 if you have the <sys/dlpihdr.h> header file. */
/* #undef HAVE_SYS_DLPIHDR_H */
/* Define if you have the <sys/dlpi_ext.h> header file. */
/* Define to 1 if you have the <sys/dlpi_ext.h> header file. */
/* #undef HAVE_SYS_DLPI_EXT_H */
/* Define if you have the <sys/dlpi.h> header file. */
/* Define to 1 if you have the <sys/dlpi.h> header file. */
/* #undef HAVE_SYS_DLPI_H */
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
/* Define if you have the <sys/mib.h> header file. */
/* Define to 1 if you have the <sys/mib.h> header file. */
/* #undef HAVE_SYS_MIB_H */
/* Define if you have the <sys/ndd_var.h> header file. */
/* Define to 1 if you have the <sys/ndd_var.h> header file. */
/* #undef HAVE_SYS_NDD_VAR_H */
/* Define if you have the <sys/socket.h> header file. */
/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
/* Define if you have the <sys/sockio.h> header file. */
/* Define to 1 if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
/* #undef HAVE_SYS_STAT_H */
/* Define if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
/* #undef HAVE_SYS_TYPES_H */
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
/* Define if you have the <winsock2.h> header file. */
/* Define to 1 if you have the <winsock2.h> header file. */
#define HAVE_WINSOCK2_H
/* Name of package */
#define PACKAGE "libdnet"
/* Define to the sub-directory where libtool stores uninstalled libraries. */
/* #undef LT_OBJDIR */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Name of package */
#define PACKAGE "dnet"
/* Define to the address where bug reports for this package should be sent. */
/* #undef PACKAGE_BUGREPORT */
/* Define to the full name of this package. */
#define PACKAGE_NAME "dnet"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "dnet 1.18.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "dnet"
/* Define to the home page for this package. */
/* #undef PACKAGE_URL */
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.18.0"
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
/* #undef STDC_HEADERS */
/* Version number of package */
#define VERSION "1.12"
#define VERSION "1.18.0"
/* Define for faster code generation. */
#define WIN32_LEAN_AND_MEAN
@@ -233,14 +255,16 @@
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `int' if <sys/types.h> does not define. */
/* Define as a signed integer type capable of holding a process identifier. */
/* #undef pid_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Use MingW32's internal snprintf */
@@ -250,30 +274,32 @@
#ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# include <ws2tcpip.h>
# include <windows.h>
#endif
#ifdef __svr4__
# define BSD_COMP 1
# define BSD_COMP 1
#endif
#if defined(__osf__) && !defined(_SOCKADDR_LEN)
# define _SOCKADDR_LEN 1
# define _SOCKADDR_LEN 1
#endif
/* Define to 1 if you have the `inet_pton' function. */
#define HAVE_INET_PTON
#ifndef HAVE_INET_PTON
int inet_pton(int, const char *, void *);
#endif
#ifndef HAVE_STRLCAT
int strlcat(char *, const char *, int);
#endif
#ifndef HAVE_STRLCPY
int strlcpy(char *, const char *, int);
int strlcpy(char *, const char *, int);
#endif
#ifndef HAVE_STRSEP
char *strsep(char **, const char *);
char *strsep(char **, const char *);
#endif
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
/* Without this, Windows will give us all sorts of crap about using functions
like strcpy() even if they are done safely */
#define _CRT_SECURE_NO_DEPRECATE 1

238
libdnet-stripped/libdnet-stripped.vcxproj Executable file → Normal file
View File

@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -9,20 +12,40 @@
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="MinSizeRel|Win32">
<Configuration>MinSizeRel</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="RelWithDebInfo|Win32">
<Configuration>RelWithDebInfo</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>libdnet-stripped</ProjectName>
<ProjectGuid>{5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}</ProjectGuid>
<RootNamespace>dnet</RootNamespace>
<Keyword>Win32Proj</Keyword>
<Platform>Win32</Platform>
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
@@ -30,87 +53,196 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">dnet.dir\Debug\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">dnet</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">dnet.dir\Release\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">dnet</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
<OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.\MinSizeRel\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">dnet.dir\MinSizeRel\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">dnet</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.lib</TargetExt>
<OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.\RelWithDebInfo\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">dnet.dir\RelWithDebInfo\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">dnet</TargetName>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.lib</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions>/D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;..\..\nmap-mswin32-aux\Npcap\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_LIB;BPF_MAJOR_VERSION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<MinimalRebuild></MinimalRebuild>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<SupportJustMyCode></SupportJustMyCode>
<UseFullPaths>false</UseFullPaths>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR="Debug"</PreprocessorDefinitions>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR=\"Debug\"</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Lib>
<OutputFile>$(OutDir)libdnet-stripped.lib</OutputFile>
<AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions>/D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>include;..\..\nmap-mswin32-aux\Npcap\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_LIB;BPF_MAJOR_VERSION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>
</PrecompiledHeader>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<MinimalRebuild></MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SupportJustMyCode></SupportJustMyCode>
<UseFullPaths>false</UseFullPaths>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR="Release"</PreprocessorDefinitions>
<ObjectFileName>$(IntDir)</ObjectFileName>
<DebugInformationFormat>
</DebugInformationFormat>
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR=\"Release\"</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Lib>
<OutputFile>$(OutDir)libdnet-stripped.lib</OutputFile>
<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<MinimalRebuild></MinimalRebuild>
<Optimization>MinSpace</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SupportJustMyCode></SupportJustMyCode>
<UseFullPaths>false</UseFullPaths>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR="MinSizeRel"</PreprocessorDefinitions>
<ObjectFileName>$(IntDir)</ObjectFileName>
<DebugInformationFormat>
</DebugInformationFormat>
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR=\"MinSizeRel\"</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Lib>
<AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ExceptionHandling>
</ExceptionHandling>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<MinimalRebuild></MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<SupportJustMyCode></SupportJustMyCode>
<UseFullPaths>false</UseFullPaths>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR="RelWithDebInfo"</PreprocessorDefinitions>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;CMAKE_INTDIR=\"RelWithDebInfo\"</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
<AdditionalIncludeDirectories>..\..\nmap-mswin32-aux\Npcap\Include;.\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Lib>
<AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\addr-util.c" />
<ClCompile Include="src\addr.c" />
<ClCompile Include="src\arp-win32.c" />
<ClCompile Include="src\blob.c" />
<ClCompile Include="src\err.c" />
<ClCompile Include="src\eth-win32.c" />
<ClCompile Include="src\intf-win32.c" />
<ClCompile Include="src\ip-util.c" />
<ClCompile Include="src\ip-win32.c" />
<ClCompile Include="src\ip6.c" />
<ClCompile Include="src\route-win32.c" />
<ClCompile Include="src\rand.c" />
<ClCompile Include="src\strlcat.c" />
<ClCompile Include="src\strlcpy.c" />
<ClCompile Include="src\strsep.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\dnet\addr.h" />
<ClInclude Include="include\dnet\arp.h" />
<ClInclude Include="include\dnet.h" />
<ClInclude Include="include\err.h" />
<ClInclude Include="include\dnet\eth.h" />
<ClInclude Include="include\dnet\icmp.h" />
<ClInclude Include="include\dnet\intf.h" />
<ClInclude Include="include\dnet\ip.h" />
<ClInclude Include="include\dnet\ip6.h" />
<ClInclude Include="include\dnet\os.h" />
<ClInclude Include="include\queue.h" />
<ClInclude Include="include\dnet\route.h" />
<ClInclude Include="include\dnet\tcp.h" />
<ClInclude Include="include\dnet\udp.h" />
<ClInclude Include="include\dnet\sctp.h" />
<ClCompile Include="src\arp-win32.c" />
<ClCompile Include="src\eth-win32.c" />
<ClCompile Include="src\fw-pktfilter.c" />
<ClCompile Include="src\intf-win32.c" />
<ClCompile Include="src\ip-win32.c" />
<ClCompile Include="src\route-win32.c" />
<ClCompile Include="src\ndisc-none.c" />
<ClCompile Include="src\tun-none.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -0,0 +1,110 @@
Summary: Simple portable interface to lowlevel networking routines
Name: libdnet
Version: 1.18.0
Release: 1%{?dist}
License: BSD
URL: https://github.com/ofalk/%{name}
Source: https://github.com/ofalk/%{master}/archive/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: python3-Cython
%description
libdnet provides a simplified, portable interface to several
low-level networking routines, including network address
manipulation, kernel arp(4) cache and route(4) table lookup and
manipulation, network firewalling (IP filter, ipfw, ipchains,
pf, ...), network interface lookup and manipulation, raw IP
packet and Ethernet frame, and data transmission.
%package devel
Summary: Header files for libdnet library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
%{summary}.
%package progs
Summary: Sample applications to use with libdnet
Requires: %{name}%{?_isa} = %{version}-%{release}
%description progs
%{summary}.
%package -n python%{python3_pkgversion}-libdnet
%{?python_provide:%python_provide python%{python3_pkgversion}-libdnet}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python bindings for libdnet
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: python%{python3_pkgversion}-devel
%description -n python%{python3_pkgversion}-libdnet
%{summary}.
%prep
%setup -q -n %{name}-%{version}
%build
autoreconf -i
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --disable-static --with-python
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build
%install
export PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitearch}
%make_install
pushd python
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
popd
%ldconfig_scriptlets
%files
%license LICENSE
%doc THANKS TODO
%{_libdir}/*.so.*
%files devel
%{_bindir}/*
%{_libdir}/*.so
%{_libdir}/*.la
%{_includedir}/*
%{_mandir}/man3/*.3*
%files progs
%{_sbindir}/*
%{_mandir}/man8/*.8*
%files -n python%{python3_pkgversion}-libdnet
%{python3_sitearch}/*
%changelog
* Tue Feb 27 2024 Oliver Falk <oliver@linux-kernel.at> - 1.18.0-1
- Release 1.18.0
* Thu Oct 12 2023 Oliver Falk <oliver@linux-kernel.at> - 1.17.0-1
- Release 1.17.0
* Fri Apr 07 2023 Oliver Falk <oliver@linux-kernel.at> - 1.16.4-1
- Release 1.16.4
* Wed Jan 11 2023 Oliver Falk <oliver@linux-kernel.at> - 1.16.3-1
- Release 1.16.3
* Tue Jan 03 2023 Oliver Falk <oliver@linux-kernel.at> - 1.16.2-1
- Release 1.16.2
* Mon May 02 2022 Oliver Falk <oliver@linux-kernel.at> - 1.16.1-1
- Release 1.16.1
# vim:ts=4:

View File

@@ -4,15 +4,14 @@ dnl
dnl usage: AC_DNET_SOCKADDR_SA_LEN
dnl results: HAVE_SOCKADDR_SA_LEN (defined)
dnl
AC_DEFUN(AC_DNET_SOCKADDR_SA_LEN,
AC_DEFUN([AC_DNET_SOCKADDR_SA_LEN],
[AC_MSG_CHECKING(for sa_len in sockaddr struct)
AC_CACHE_VAL(ac_cv_dnet_sockaddr_has_sa_len,
AC_TRY_COMPILE([
# ifndef _SOCKADDR_LEN
# define _SOCKADDR_LEN 1
# endif
# include <sys/types.h>
# include <sys/socket.h>],
AC_TRY_COMPILE([#ifndef _SOCKADDR_LEN
#define _SOCKADDR_LEN 1
#endif
#include <sys/types.h>
#include <sys/socket.h>],
[u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
ac_cv_dnet_sockaddr_has_sa_len=yes,
ac_cv_dnet_sockaddr_has_sa_len=no))
@@ -28,20 +27,19 @@ dnl
dnl usage: AC_DNET_SOCKADDR_IN6
dnl results: HAVE_SOCKADDR_IN6
dnl
AC_DEFUN(AC_DNET_SOCKADDR_IN6,
AC_DEFUN([AC_DNET_SOCKADDR_IN6],
[AC_MSG_CHECKING(for sockaddr_in6 struct in <netinet/in.h>)
AC_CACHE_VAL(ac_cv_dnet_netinet_in_h_has_sockaddr_in6,
AC_TRY_COMPILE([
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>],
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>],
[struct sockaddr_in6 sin6; sin6.sin6_family = AF_INET6;],
ac_cv_dnet_netinet_in_h_has_sockaddr_in6=yes,
ac_cv_dnet_netinet_in_h_has_sockaddr_in6=no))
ac_cv_dnet_netinet_in_h_has_sockaddr_in6=yes,
ac_cv_dnet_netinet_in_h_has_sockaddr_in6=no))
AC_MSG_RESULT($ac_cv_dnet_netinet_in_h_has_sockaddr_in6)
if test $ac_cv_dnet_netinet_in_h_has_sockaddr_in6 = yes ; then
AC_DEFINE(HAVE_SOCKADDR_IN6, 1,
[Define if <netinet/in.h> has sockaddr_in6 struct.])
AC_DEFINE(HAVE_SOCKADDR_IN6, 1,
[Define if <netinet/in.h> has sockaddr_in6 struct.])
fi])
dnl
@@ -50,20 +48,19 @@ dnl
dnl usage: AC_DNET_ARPREQ_ARP_DEV
dnl results: HAVE_ARPREQ_ARP_DEV (defined)
dnl
AC_DEFUN(AC_DNET_ARPREQ_ARP_DEV,
AC_DEFUN([AC_DNET_ARPREQ_ARP_DEV],
[AC_MSG_CHECKING(for arp_dev in arpreq struct)
AC_CACHE_VAL(ac_cv_dnet_arpreq_has_arp_dev,
AC_TRY_COMPILE([
# include <sys/types.h>
# include <sys/socket.h>
# include <net/if_arp.h>],
[void *p = ((struct arpreq *)0)->arp_dev],
ac_cv_dnet_arpreq_has_arp_dev=yes,
ac_cv_dnet_arpreq_has_arp_dev=no))
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <net/if_arp.h>],
[void *p = ((struct arpreq *)0)->arp_dev],
ac_cv_dnet_arpreq_has_arp_dev=yes,
ac_cv_dnet_arpreq_has_arp_dev=no))
AC_MSG_RESULT($ac_cv_dnet_arpreq_has_arp_dev)
if test $ac_cv_dnet_arpreq_has_arp_dev = yes ; then
AC_DEFINE(HAVE_ARPREQ_ARP_DEV, 1,
[Define if arpreq struct has arp_dev.])
AC_DEFINE(HAVE_ARPREQ_ARP_DEV, 1,
[Define if arpreq struct has arp_dev.])
fi])
dnl
@@ -72,21 +69,20 @@ dnl
dnl usage: AC_DNET_ROUTE_RT_MSGHDR
dnl results: HAVE_ROUTE_RT_MSGHDR
dnl
AC_DEFUN(AC_DNET_ROUTE_RT_MSGHDR,
AC_DEFUN([AC_DNET_ROUTE_RT_MSGHDR],
[AC_MSG_CHECKING(for rt_msghdr struct in <net/route.h>)
AC_CACHE_VAL(ac_cv_dnet_route_h_has_rt_msghdr,
AC_TRY_COMPILE([
# include <sys/types.h>
# include <sys/socket.h>
# include <net/if.h>
# include <net/route.h>],
[struct rt_msghdr rtm; rtm.rtm_msglen = 0;],
ac_cv_dnet_route_h_has_rt_msghdr=yes,
ac_cv_dnet_route_h_has_rt_msghdr=no))
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/route.h>],
[struct rt_msghdr rtm; rtm.rtm_msglen = 0;],
ac_cv_dnet_route_h_has_rt_msghdr=yes,
ac_cv_dnet_route_h_has_rt_msghdr=no))
AC_MSG_RESULT($ac_cv_dnet_route_h_has_rt_msghdr)
if test $ac_cv_dnet_route_h_has_rt_msghdr = yes ; then
AC_DEFINE(HAVE_ROUTE_RT_MSGHDR, 1,
[Define if <net/route.h> has rt_msghdr struct.])
AC_DEFINE(HAVE_ROUTE_RT_MSGHDR, 1,
[Define if <net/route.h> has rt_msghdr struct.])
fi])
dnl
@@ -95,18 +91,18 @@ dnl
dnl usage: AC_DNET_BSD_BPF
dnl results: HAVE_BSD_BPF
dnl
AC_DEFUN(AC_DNET_BSD_BPF,
AC_DEFUN([AC_DNET_BSD_BPF],
[AC_MSG_CHECKING(for Berkeley Packet Filter)
AC_CACHE_VAL(ac_cv_dnet_bsd_bpf,
if test -c /dev/bpf0 ; then
ac_cv_dnet_bsd_bpf=yes
else
ac_cv_dnet_bsd_bpf=no
fi)
if test -c /dev/bpf ; then
ac_cv_dnet_bsd_bpf=yes
else
ac_cv_dnet_bsd_bpf=no
fi)
AC_MSG_RESULT($ac_cv_dnet_bsd_bpf)
if test $ac_cv_dnet_bsd_bpf = yes ; then
AC_DEFINE(HAVE_BSD_BPF, 1,
[Define if you have the Berkeley Packet Filter.])
AC_DEFINE(HAVE_BSD_BPF, 1,
[Define if you have the Berkeley Packet Filter.])
fi])
dnl
@@ -115,18 +111,18 @@ dnl
dnl usage: AC_DNET_LINUX_PROCFS
dnl results: HAVE_LINUX_PROCFS
dnl
AC_DEFUN(AC_DNET_LINUX_PROCFS,
AC_DEFUN([AC_DNET_LINUX_PROCFS],
[AC_MSG_CHECKING(for Linux proc filesystem)
AC_CACHE_VAL(ac_cv_dnet_linux_procfs,
if test "x`cat /proc/sys/kernel/ostype 2>&-`" = "xLinux" ; then
ac_cv_dnet_linux_procfs=yes
else
ac_cv_dnet_linux_procfs=no
fi)
if test "x`cat /proc/sys/kernel/ostype 2>&-`" = "xLinux" ; then
ac_cv_dnet_linux_procfs=yes
else
ac_cv_dnet_linux_procfs=no
fi)
AC_MSG_RESULT($ac_cv_dnet_linux_procfs)
if test $ac_cv_dnet_linux_procfs = yes ; then
AC_DEFINE(HAVE_LINUX_PROCFS, 1,
[Define if you have the Linux /proc filesystem.])
AC_DEFINE(HAVE_LINUX_PROCFS, 1,
[Define if you have the Linux /proc filesystem.])
fi])
dnl
@@ -138,19 +134,17 @@ dnl
dnl This is a Linux-specific check, even though other operating systems
dnl (OpenSolaris) may have the PF_PACKET interface. The eth-linux.c code
dnl activated by this check is specific to Linux.
AC_DEFUN(AC_DNET_LINUX_PF_PACKET,
[AC_CHECK_DECL([ETH_P_ALL],
ac_cv_dnet_linux_pf_packet=yes,
ac_cv_dnet_linux_pf_packet=no,
[
#include <netpacket/packet.h>
#include <linux/if_ether.h>
])
AC_MSG_CHECKING(for Linux PF_PACKET sockets)
AC_DEFUN([AC_DNET_LINUX_PF_PACKET],
[AC_MSG_CHECKING(for Linux PF_PACKET sockets)
AC_TRY_COMPILE([#include <netpacket/packet.h>
#include <linux/if_ether.h>],
[int foo() { return ETH_P_ALL; }],
ac_cv_dnet_linux_pf_packet=yes,
ac_cv_dnet_linux_pf_packet=no)
AC_MSG_RESULT($ac_cv_dnet_linux_pf_packet)
if test $ac_cv_dnet_linux_pf_packet = yes ; then
AC_DEFINE(HAVE_LINUX_PF_PACKET, 1,
[Define if you have Linux PF_PACKET sockets.])
AC_DEFINE(HAVE_LINUX_PF_PACKET, 1,
[Define if you have Linux PF_PACKET sockets.])
fi])
dnl
@@ -159,14 +153,14 @@ dnl
dnl usage: AC_DNET_STREAMS_MIB2
dnl results: HAVE_STREAMS_MIB2
dnl
AC_DEFUN(AC_DNET_STREAMS_MIB2,
AC_DEFUN([AC_DNET_STREAMS_MIB2],
[AC_MSG_CHECKING(for SNMP MIB2 STREAMS)
AC_CACHE_VAL(ac_cv_dnet_streams_mib2,[
if test -f /usr/include/inet/mib2.h -a '(' -c /dev/ip -o -c /dev/arp ')' ; then
ac_cv_dnet_streams_mib2=yes
else
ac_cv_dnet_streams_mib2=no
fi])
ac_cv_dnet_streams_mib2=yes
else
ac_cv_dnet_streams_mib2=no
fi])
AC_MSG_RESULT($ac_cv_dnet_streams_mib2)
if test $ac_cv_dnet_streams_mib2 = yes ; then
AC_DEFINE(HAVE_STREAMS_MIB2, 1,
@@ -179,14 +173,14 @@ dnl
dnl usage: AC_DNET_STREAMS_ROUTE
dnl results: HAVE_STREAMS_ROUTE
dnl
AC_DEFUN(AC_DNET_STREAMS_ROUTE,
AC_DEFUN([AC_DNET_STREAMS_ROUTE],
[AC_MSG_CHECKING(for route(7) STREAMS)
AC_CACHE_VAL(ac_cv_dnet_streams_route,
if grep RTSTR_SEND /usr/include/net/route.h >/dev/null 2>&1 ; then
ac_cv_dnet_streams_route=yes
else
ac_cv_dnet_streams_route=no
fi)
if grep RTSTR_SEND /usr/include/net/route.h >/dev/null 2>&1 ; then
ac_cv_dnet_streams_route=yes
else
ac_cv_dnet_streams_route=no
fi)
AC_MSG_RESULT($ac_cv_dnet_streams_route)
if test $ac_cv_dnet_streams_route = yes ; then
AC_DEFINE(HAVE_STREAMS_ROUTE, 1,
@@ -199,21 +193,19 @@ dnl
dnl usage: AC_DNET_IOCTL_ARP
dnl results: HAVE_IOCTL_ARP
dnl
AC_DEFUN(AC_DNET_IOCTL_ARP,
AC_DEFUN([AC_DNET_IOCTL_ARP],
[AC_MSG_CHECKING(for arp(7) ioctls)
AC_CACHE_VAL(ac_cv_dnet_ioctl_arp,
AC_EGREP_CPP(werd, [
# include <sys/types.h>
# define BSD_COMP
# include <sys/ioctl.h>
# ifdef SIOCGARP
werd
# endif],
ac_cv_dnet_ioctl_arp=yes,
ac_cv_dnet_ioctl_arp=no))
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <sys/types.h>
#define BSD_COMP
#include <sys/ioctl.h>]],
[[int foo = SIOCGARP;]])],
ac_cv_dnet_ioctl_arp=yes,
ac_cv_dnet_ioctl_arp=no))
case "$host_os" in
irix*)
ac_cv_dnet_ioctl_arp=no ;;
irix*)
ac_cv_dnet_ioctl_arp=no ;;
esac
AC_MSG_RESULT($ac_cv_dnet_ioctl_arp)
if test $ac_cv_dnet_ioctl_arp = yes ; then
@@ -227,17 +219,17 @@ dnl
dnl usage: AC_DNET_RAWIP_HOST_OFFLEN
dnl results: HAVE_RAWIP_HOST_OFFLEN
dnl
AC_DEFUN(AC_DNET_RAWIP_HOST_OFFLEN,
AC_DEFUN([AC_DNET_RAWIP_HOST_OFFLEN],
[AC_MSG_CHECKING([for raw IP sockets ip_{len,off} host byte ordering])
AC_CACHE_VAL(ac_cv_dnet_rawip_host_offlen, [
case "$host_os" in
*openbsd*)
ac_cv_dnet_rawip_host_offlen=no ;;
*bsd*|*darwin*|*osf*|*unixware*)
ac_cv_dnet_rawip_host_offlen=yes ;;
*)
ac_cv_dnet_rawip_host_offlen=no ;;
esac])
case "$host_os" in
*openbsd*)
ac_cv_dnet_rawip_host_offlen=no ;;
*bsd*|*darwin*|*osf*|*unixware*)
ac_cv_dnet_rawip_host_offlen=yes ;;
*)
ac_cv_dnet_rawip_host_offlen=no ;;
esac])
AC_MSG_RESULT($ac_cv_dnet_rawip_host_offlen)
if test $ac_cv_dnet_rawip_host_offlen = yes ; then
AC_DEFINE(HAVE_RAWIP_HOST_OFFLEN, 1,
@@ -250,15 +242,15 @@ dnl
dnl usage: AC_DNET_RAWIP_COOKED
dnl results: HAVE_RAWIP_COOKED
dnl
AC_DEFUN(AC_DNET_RAWIP_COOKED,
AC_DEFUN([AC_DNET_RAWIP_COOKED],
[AC_MSG_CHECKING(for cooked raw IP sockets)
AC_CACHE_VAL(ac_cv_dnet_rawip_cooked, [
case "$host_os" in
solaris*|irix*)
ac_cv_dnet_rawip_cooked=yes ;;
*)
ac_cv_dnet_rawip_cooked=no ;;
esac])
case "$host_os" in
solaris*|irix*)
ac_cv_dnet_rawip_cooked=yes ;;
*)
ac_cv_dnet_rawip_cooked=no ;;
esac])
AC_MSG_RESULT($ac_cv_dnet_rawip_cooked)
if test $ac_cv_dnet_rawip_cooked = yes ; then
AC_DEFINE(HAVE_RAWIP_COOKED, 1,
@@ -271,7 +263,7 @@ dnl
dnl usage: AC_DNET_GETKERNINFO
dnl results: HAVE_GETKERNINFO
dnl
AC_DEFUN(AC_DNET_GETKERNINFO,
AC_DEFUN([AC_DNET_GETKERNINFO],
[AC_MSG_CHECKING(for getkerninfo)
AC_CACHE_VAL(ac_cv_dnet_getkerninfo,
AC_TRY_COMPILE([
@@ -320,7 +312,7 @@ dnl The check for libresolv is in case you are attempting to link
dnl statically and happen to have a libresolv.a lying around (and no
dnl libnsl.a).
dnl
AC_DEFUN(AC_LBL_LIBRARY_NET, [
AC_DEFUN([AC_LBL_LIBRARY_NET], [
# Most operating systems have gethostbyname() in the default searched
# libraries (i.e. libc):
AC_CHECK_FUNC(gethostbyname, ,
@@ -339,5 +331,4 @@ AC_DEFUN(AC_LBL_LIBRARY_NET, [
AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", ,
-lnsl)))
# DLPI needs putmsg under HPUX so test for -lstr while we're at it
AC_CHECK_LIB(str, putmsg)
])
AC_CHECK_LIB(str, putmsg)])

8400
libdnet-stripped/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

437
libdnet-stripped/m4/ltoptions.m4 vendored Normal file
View File

@@ -0,0 +1,437 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 8 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option '$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
[_LT_WITH_AIX_SONAME([aix])])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [1], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the 'win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the 'shared' and
# 'disable-shared' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the 'static' and
# 'disable-static' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the 'fast-install'
# and 'disable-fast-install' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the 'fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the 'disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
AC_ARG_WITH([aix-soname],
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
[case $withval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
;;
esac
lt_cv_with_aix_soname=$with_aix_soname],
[AC_CACHE_VAL([lt_cv_with_aix_soname],
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
with_aix_soname=$lt_cv_with_aix_soname])
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
# the AIX toolchain works better with OBJECT_MODE set (default 32).
if test 64 = "${OBJECT_MODE-32}"; then
shared_archive_member_spec=shr_64
else
shared_archive_member_spec=shr
fi
fi
;;
*)
with_aix_soname=aix
;;
esac
_LT_DECL([], [shared_archive_member_spec], [0],
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
])# _LT_WITH_AIX_SONAME
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[pic_mode=m4_default([$1], [default])])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the 'pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

124
libdnet-stripped/m4/ltsugar.m4 vendored Normal file
View File

@@ -0,0 +1,124 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59, which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

24
libdnet-stripped/m4/ltversion.m4 vendored Normal file
View File

@@ -0,0 +1,24 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
# Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# @configure_input@
# serial 4245 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4.7])
m4_define([LT_PACKAGE_REVISION], [2.4.7])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.7'
macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

99
libdnet-stripped/m4/lt~obsolete.m4 vendored Normal file
View File

@@ -0,0 +1,99 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])

View File

@@ -1,11 +1,13 @@
## $Id: Makefile.am 625 2006-01-19 06:11:01Z dugsong $
## $Id$
include $(top_srcdir)/Makefile.am.common
lib_LTLIBRARIES = libdnet.la
EXTRA_DIST = crc32ct.h
libdnet_la_SOURCES = addr-util.c addr.c blob.c ip-util.c ip6.c rand.c
libdnet_la_LIBADD = @LTLIBOBJS@
libdnet_la_LDFLAGS = -version-info 1:1:0
libdnet_la_LDFLAGS = -version-info 1:2:0

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,9 +15,65 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -32,58 +88,129 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common arp-bsd.c arp-ioctl.c \
arp-none.c arp-win32.c err.c eth-bsd.c eth-dlpi.c eth-linux.c \
eth-ndd.c eth-none.c eth-pfilt.c eth-snoop.c eth-win32.c \
fw-none.c intf-win32.c intf.c ip-cooked.c ip-win32.c ip.c \
memcmp.c route-bsd.c route-hpux.c route-linux.c route-none.c \
route-win32.c strlcpy.c strsep.c tun-bsd.c \
tun-linux.c tun-none.c tun-solaris.c
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libdnet_la_DEPENDENCIES = @LTLIBOBJS@
am_libdnet_la_OBJECTS = addr-util.lo addr.lo blob.lo ip-util.lo ip6.lo \
rand.lo
libdnet_la_OBJECTS = $(am_libdnet_la_OBJECTS)
libdnet_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libdnet_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libdnet_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp =
am__depfiles_maybe =
am__maybe_remake_depfiles =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libdnet_la_SOURCES)
DIST_SOURCES = $(libdnet_la_SOURCES)
ETAGS = etags
CTAGS = ctags
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
$(top_srcdir)/config/mkinstalldirs arp-bsd.c arp-ioctl.c \
arp-none.c arp-win32.c err.c eth-bsd.c eth-dlpi.c eth-linux.c \
eth-ndd.c eth-none.c eth-pfilt.c eth-snoop.c eth-win32.c \
fw-none.c intf-win32.c intf.c ip-cooked.c ip-win32.c ip.c \
memcmp.c ndisc-linux.c ndisc-none.c route-bsd.c route-hpux.c \
route-linux.c route-none.c route-win32.c strlcpy.c strsep.c \
tun-bsd.c tun-linux.c tun-none.c tun-solaris.c
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -92,21 +219,24 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHECKINC = @CHECKINC@
CHECKLIB = @CHECKLIB@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -121,8 +251,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
@@ -135,21 +267,22 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TCLINC = @TCLINC@
TCLLIB = @TCLLIB@
STRLCPY_HEADER = @STRLCPY_HEADER@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -182,7 +315,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -190,6 +322,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -199,11 +332,13 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include
lib_LTLIBRARIES = libdnet.la
EXTRA_DIST = crc32ct.h
libdnet_la_SOURCES = addr-util.c addr.c blob.c ip-util.c ip6.c rand.c
libdnet_la_LIBADD = @LTLIBOBJS@
libdnet_la_LDFLAGS = -version-info 1:1:0
libdnet_la_LDFLAGS = -version-info 1:2:0
all: all-am
.SUFFIXES:
@@ -212,23 +347,23 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/Makefile.am.common $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -237,35 +372,45 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
list2="$$list2 $$p"; \
else :; fi; \
done
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libdnet.la: $(libdnet_la_OBJECTS) $(libdnet_la_DEPENDENCIES)
$(libdnet_la_LINK) -rpath $(libdir) $(libdnet_la_OBJECTS) $(libdnet_la_LIBADD) $(LIBS)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libdnet.la: $(libdnet_la_OBJECTS) $(libdnet_la_DEPENDENCIES) $(EXTRA_libdnet_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdnet_la_LINK) -rpath $(libdir) $(libdnet_la_OBJECTS) $(libdnet_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -274,13 +419,13 @@ distclean-compile:
-rm -f *.tab.c
.c.o:
$(COMPILE) -c $<
$(AM_V_CC)$(COMPILE) -c -o $@ $<
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
$(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -288,54 +433,61 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -351,13 +503,17 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -378,16 +534,22 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -408,6 +570,8 @@ dvi-am:
html: html-am
html-am:
info: info-am
info-am:
@@ -416,18 +580,28 @@ install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -451,19 +625,22 @@ uninstall-am: uninstall-libLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-libLTLIBRARIES install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-libLTLIBRARIES
tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: addr-util.c 539 2005-01-23 07:36:54Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -174,28 +170,23 @@ ip_pton(const char *p, ip_addr_t *ip)
char *
ip6_ntop(const ip6_addr_t *ip6, char *dst, size_t len)
{
uint16_t data[IP6_ADDR_LEN / 2];
struct { int base, len; } best, cur;
char *p = dst;
int i;
uint16_t *ip6_data;
cur.len = best.len = 0;
if (len < 46)
return (NULL);
/* Copy into 16-bit array. */
for (i = 0; i < IP6_ADDR_LEN / 2; i++) {
data[i] = ip6->data[2 * i] << 8;
data[i] |= ip6->data[2 * i + 1];
}
best.base = cur.base = -1;
/*
* Algorithm borrowed from Vixie's inet_pton6()
*/
for (i = 0; i < IP6_ADDR_LEN; i += 2) {
if (data[i / 2] == 0) {
ip6_data = (uint16_t *)&ip6->data[i];
if (*ip6_data == 0) {
if (cur.base == -1) {
cur.base = i;
cur.len = 0;
@@ -222,12 +213,13 @@ ip6_ntop(const ip6_addr_t *ip6, char *dst, size_t len)
i += best.len;
} else if (i == 12 && best.base == 0 &&
(best.len == 10 || (best.len == 8 &&
data[5] == 0xffff))) {
if (ip_ntop((ip_addr_t *)&data[6], p,
*(ip6_data = (uint16_t *)&ip6->data[10]) == 0xffff))) {
if (ip_ntop((ip_addr_t *)&ip6->data[12], p,
len - (p - dst)) == NULL)
return (NULL);
return (dst);
} else p += sprintf(p, "%x:", data[i / 2]);
} else p += sprintf(p, "%x:",
ntohs(*(ip6_data = (uint16_t *)&ip6->data[i])));
}
if (best.base + 2 + best.len == IP6_ADDR_LEN) {
*p = '\0';

View File

@@ -5,14 +5,10 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: addr.c 610 2005-06-26 18:23:26Z dugsong $
* $Id$
*/
#ifdef WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <sys/types.h>
#ifdef HAVE_NET_IF_H
@@ -171,7 +167,6 @@ addr_ntop(const struct addr *src, char *dst, size_t size)
int
addr_pton(const char *src, struct addr *dst)
{
struct hostent *hp;
char *ep, tmp[300];
long bits = -1;
int i;
@@ -209,10 +204,6 @@ addr_pton(const char *src, struct addr *dst)
} else if (ip6_pton(tmp, &dst->addr_ip6) == 0) {
dst->addr_type = ADDR_TYPE_IP6;
dst->addr_bits = IP6_ADDR_BITS;
} else if ((hp = gethostbyname(tmp)) != NULL) {
memcpy(&dst->addr_ip, hp->h_addr, IP_ADDR_LEN);
dst->addr_type = ADDR_TYPE_IP;
dst->addr_bits = IP_ADDR_BITS;
} else {
errno = EINVAL;
return (-1);
@@ -255,11 +246,11 @@ addr_ntos(const struct addr *a, struct sockaddr *sa)
# ifdef HAVE_SOCKADDR_SA_LEN
so->sdl.sdl_len = sizeof(so->sdl);
# endif
# ifdef AF_LINK
# ifdef AF_LINK
so->sdl.sdl_family = AF_LINK;
# else
so->sdl.sdl_family = AF_UNSPEC;
# endif
#endif
so->sdl.sdl_alen = ETH_ADDR_LEN;
memcpy(LLADDR(&so->sdl), &a->addr_eth, ETH_ADDR_LEN);
#else

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: arp-bsd.c 539 2005-01-23 07:36:54Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: arp-ioctl.c 554 2005-02-09 22:31:00Z dugsong $
* $Id$
*/
#include "config.h"
@@ -210,7 +210,7 @@ arp_loop(arp_t *a, arp_handler callback, void *arg)
{
FILE *fp;
struct arp_entry entry;
char buf[BUFSIZ], ipbuf[100], macbuf[100], maskbuf[100], devbuf[100];
char buf[BUFSIZ], ipbuf[101], macbuf[101], maskbuf[101], devbuf[101];
int i, type, flags, ret;
if ((fp = fopen(PROC_ARP_FILE, "r")) == NULL)
@@ -218,7 +218,7 @@ arp_loop(arp_t *a, arp_handler callback, void *arg)
ret = 0;
while (fgets(buf, sizeof(buf), fp) != NULL) {
i = sscanf(buf, "%s 0x%x 0x%x %99s %99s %99s\n",
i = sscanf(buf, "%s 0x%x 0x%x %100s %100s %100s\n",
ipbuf, &type, &flags, macbuf, maskbuf, devbuf);
if (i < 4 || (flags & ATF_COM) == 0)

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: arp-none.c 252 2002-02-02 04:15:57Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: arp-win32.c 539 2005-01-23 07:36:54Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <ws2tcpip.h>
#include <iphlpapi.h>
@@ -150,7 +146,6 @@ arp_loop(arp_t *arp, arp_handler callback, void *arg)
}
return (0);
}
arp_t *
arp_close(arp_t *arp)
{

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: blob.c 615 2006-01-08 16:06:49Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <ctype.h>
#include <stdarg.h>
@@ -194,17 +190,23 @@ blob_fmt(blob_t *b, int pack, const char *fmt, va_list *ap)
int
blob_pack(blob_t *b, const char *fmt, ...)
{
int retval;
va_list ap;
va_start(ap, fmt);
return (blob_fmt(b, 1, fmt, &ap));
retval = blob_fmt(b, 1, fmt, &ap);
va_end(ap);
return retval;
}
int
blob_unpack(blob_t *b, const char *fmt, ...)
{
int retval;
va_list ap;
va_start(ap, fmt);
return (blob_fmt(b, 0, fmt, &ap));
retval = blob_fmt(b, 0, fmt, &ap);
va_end(ap);
return retval;
}
int

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: eth-bsd.c 630 2006-02-02 04:17:39Z dugsong $
* $Id$
*/
#include "config.h"
@@ -40,13 +40,12 @@ eth_t *
eth_open(const char *device)
{
struct ifreq ifr;
char file[32];
eth_t *e;
int i;
if ((e = calloc(1, sizeof(*e))) != NULL) {
for (i = 0; i < 128; i++) {
snprintf(file, sizeof(file), "/dev/bpf%d", i);
char file[32] = "/dev/bpf";
for (i = 0; i <= 128; i++) {
/* This would be O_WRONLY, but Mac OS X 10.6 has a bug
where that prevents other users of the interface
from seeing incoming traffic, even in other
@@ -54,6 +53,7 @@ eth_open(const char *device)
e->fd = open(file, O_RDWR);
if (e->fd != -1 || errno != EBUSY)
break;
snprintf(file, sizeof(file), "/dev/bpf%d", i);
}
if (e->fd < 0)
return (eth_close(e));

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: eth-dlpi.c 560 2005-02-10 16:48:36Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: eth-linux.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: eth-ndd.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: eth-none.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: eth-pfilt.c 563 2005-02-10 17:06:36Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: eth-snoop.c 548 2005-01-30 06:01:57Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,18 +3,16 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: eth-win32.c 613 2005-09-26 02:46:57Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
/* XXX - VC++ 6.0 bogosity */
#define sockaddr_storage sockaddr
#include <Packet32.h>
#undef sockaddr_storage
#include <Ntddndis.h>
#include <errno.h>
#include <stdlib.h>
@@ -22,8 +20,6 @@
#include "dnet.h"
#include <winsock2.h>
#include "pcap.h"
#include <Packet32.h>
#include <Ntddndis.h>
/* From Npcap's Loopback.h */
/*
@@ -44,8 +40,8 @@ typedef struct _DLT_NULL_HEADER
* */
#define DLTNULLTYPE_IP 0x00000002 /* IP protocol */
#define DLTNULLTYPE_IPV6 0x00000018 /* IPv6 */
/* END Loopback.h */
/* END Loopback.h */
struct eth_handle {
LPADAPTER lpa;
LPPACKET pkt;
@@ -56,13 +52,14 @@ eth_t *
eth_open(const char *device)
{
eth_t *eth;
char pcapdev[128];
char pcapdev[ADAPTER_NAME_LENGTH];
if (eth_get_pcap_devname(device, pcapdev, sizeof(pcapdev)) != 0)
if (intf_get_pcap_devname(device, pcapdev, sizeof(pcapdev)) != 0)
return (NULL);
if ((eth = calloc(1, sizeof(*eth))) == NULL)
return (NULL);
eth->lpa = PacketOpenAdapter(pcapdev);
if (eth->lpa == NULL) {
eth_close(eth);
@@ -75,37 +72,36 @@ eth_open(const char *device)
return NULL;
}
if (!PacketGetNetType(eth->lpa, &eth->type)) {
eth_close(eth);
return NULL;
}
eth_close(eth);
return NULL;
}
return (eth);
}
ssize_t
eth_send(eth_t *eth, const void *buf, size_t len)
{
/* 14-byte Ethernet header, but DLT_NULL is a 4-byte header. Skip over the difference */
DLT_NULL_HEADER *hdr = (DLT_NULL_HEADER *)((uint8_t *)buf + ETH_HDR_LEN - DLT_NULL_HDR_LEN);
if (eth->type.LinkType == NdisMediumNull) {
switch (ntohs(((struct eth_hdr *)buf)->eth_type)) {
case ETH_TYPE_IP:
hdr->null_type = DLTNULLTYPE_IP;
break;
case ETH_TYPE_IPV6:
hdr->null_type = DLTNULLTYPE_IPV6;
break;
default:
hdr->null_type = 0;
break;
}
PacketInitPacket(eth->pkt, (void *)((uint8_t *)buf + ETH_HDR_LEN - DLT_NULL_HDR_LEN), (UINT) (len - ETH_HDR_LEN + DLT_NULL_HDR_LEN));
PacketSendPacket(eth->lpa, eth->pkt, TRUE);
}
else {
PacketInitPacket(eth->pkt, (void *)buf, (UINT) len);
PacketSendPacket(eth->lpa, eth->pkt, TRUE);
}
/* 14-byte Ethernet header, but DLT_NULL is a 4-byte header. Skip over the difference */
DLT_NULL_HEADER *hdr = (DLT_NULL_HEADER *)((uint8_t *)buf + ETH_HDR_LEN - DLT_NULL_HDR_LEN);
if (eth->type.LinkType == NdisMediumNull) {
switch (ntohs(((struct eth_hdr *)buf)->eth_type)) {
case ETH_TYPE_IP:
hdr->null_type = DLTNULLTYPE_IP;
break;
case ETH_TYPE_IPV6:
hdr->null_type = DLTNULLTYPE_IPV6;
break;
default:
hdr->null_type = 0;
break;
}
PacketInitPacket(eth->pkt, (void *)((uint8_t *)buf + ETH_HDR_LEN - DLT_NULL_HDR_LEN), (UINT) (len - ETH_HDR_LEN + DLT_NULL_HDR_LEN));
}
else {
PacketInitPacket(eth->pkt, (void *)buf, (UINT) len);
}
PacketSendPacket(eth->lpa, eth->pkt, TRUE);
return (ssize_t)(len);
}
@@ -155,9 +151,3 @@ eth_set(eth_t *eth, const eth_addr_t *ea)
return (-1);
}
int
eth_get_pcap_devname(const char *intf_name, char *pcapdev, int pcapdevlen)
{
return intf_get_pcap_devname(intf_name, pcapdev, pcapdevlen);
}

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: fw-none.c 208 2002-01-20 21:23:28Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -1,18 +1,14 @@
/*
* intf-win32.c
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
* Copyright (c) 2023-2024 Oliver Falk <oliver@linux-kernel.at>
*
* $Id: intf-win32.c 632 2006-08-10 04:36:52Z dugsong $
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <iphlpapi.h>
#include <pcap.h>
#include <ctype.h>
#include <errno.h>
@@ -21,12 +17,6 @@
#include <string.h>
#include "dnet.h"
#include "pcap.h"
#include <Packet32.h>
#include <Ntddndis.h>
int g_has_npcap_loopback = 0;
#define _DEVICE_PREFIX "\\Device\\"
struct ifcombo {
struct {
@@ -39,7 +29,7 @@ struct ifcombo {
/* XXX - ipifcons.h incomplete, use IANA ifTypes MIB */
#define MIB_IF_TYPE_TUNNEL 131
#define MIB_IF_TYPE_MAX MAX_IF_TYPE
#define MIB_IF_TYPE_MAX MAX_IF_TYPE /* According to ipifcons.h */
struct intf_handle {
struct ifcombo ifcombo[MIB_IF_TYPE_MAX];
@@ -52,20 +42,26 @@ _ifcombo_name(int type)
char *name = NULL;
switch (type) {
case IF_TYPE_ETHERNET_CSMACD:
case MIB_IF_TYPE_ETHERNET:
case IF_TYPE_IEEE80211:
name = "eth";
break;
case IF_TYPE_ISO88025_TOKENRING:
case MIB_IF_TYPE_TOKENRING:
name = "tr";
break;
case IF_TYPE_PPP:
case MIB_IF_TYPE_FDDI:
name = "fddi";
break;
case MIB_IF_TYPE_PPP:
name = "ppp";
break;
case IF_TYPE_SOFTWARE_LOOPBACK:
case MIB_IF_TYPE_LOOPBACK:
name = "lo";
break;
case IF_TYPE_TUNNEL:
case MIB_IF_TYPE_SLIP:
name = "sl";
break;
case MIB_IF_TYPE_TUNNEL:
name = "tun";
break;
default:
@@ -84,16 +80,34 @@ _ifcombo_type(const char *device)
type = INTF_TYPE_ETH;
} else if (strncmp(device, "tr", 2) == 0) {
type = INTF_TYPE_TOKENRING;
} else if (strncmp(device, "fddi", 4) == 0) {
type = INTF_TYPE_FDDI;
} else if (strncmp(device, "ppp", 3) == 0) {
type = INTF_TYPE_PPP;
} else if (strncmp(device, "lo", 2) == 0) {
type = INTF_TYPE_LOOPBACK;
} else if (strncmp(device, "sl", 2) == 0) {
type = INTF_TYPE_SLIP;
} else if (strncmp(device, "tun", 3) == 0) {
type = INTF_TYPE_TUN;
}
return (type);
}
/* Map an MIB_IFROW.dwType interface type into an internal interface
type. The internal types are never exposed to users of this library;
they exist only for the sake of ordering interface types within an
intf_handle, which has an array of ifcombo structures ordered by
type. Entries in an intf_handle must not be stored or accessed by a
raw MIB_IFROW.dwType number because they will not be able to be found
by a device name such as "unk0" if the device name does not map
exactly to the dwType. */
static int
_if_type_canonicalize(int type)
{
return _ifcombo_type(_ifcombo_name(type));
}
static void
_ifcombo_add(struct ifcombo *ifc, DWORD ipv4_idx, DWORD ipv6_idx)
{
@@ -120,19 +134,6 @@ _ifcombo_add(struct ifcombo *ifc, DWORD ipv4_idx, DWORD ipv6_idx)
ifc->cnt++;
}
/* Map an MIB interface type into an internal interface type. The
internal types are never exposed to users of this library; they exist
only for the sake of ordering interface types within an intf_handle,
which has an array of ifcombo structures ordered by type. Entries in
an intf_handle must not be stored or accessed by a raw MIB type
number because they will not be able to be found by a device name
such as "net0" if the device name does not map exactly to the type. */
static int
_if_type_canonicalize(int type)
{
return _ifcombo_type(_ifcombo_name(type));
}
static void
_adapter_address_to_entry(intf_t *intf, IP_ADAPTER_ADDRESSES *a,
struct intf_entry *entry)
@@ -142,16 +143,17 @@ _adapter_address_to_entry(intf_t *intf, IP_ADAPTER_ADDRESSES *a,
int type;
IP_ADAPTER_UNICAST_ADDRESS *addr;
/* The total length of the entry may be passed inside entry.
Remember it and clear the entry. */
/* The total length of the entry may be passed in inside entry.
Remember it and clear the entry. */
u_int intf_len = entry->intf_len;
memset(entry, 0, sizeof(*entry));
/* Restore the length. */
entry->intf_len = intf_len;
type = _if_type_canonicalize(a->IfType);
for (i = 0; i < intf->ifcombo[type].cnt; i++) {
if (intf->ifcombo[type].idx[i].ipv4 == a->IfIndex &&
intf->ifcombo[type].idx[i].ipv6 == a->Ipv6IfIndex) {
if (intf->ifcombo[type].idx[i] == a->IfIndex &&
intf->ifcombo[type].idx[i].ipv6 == a->Ipv6IfIndex) {
break;
}
}
@@ -164,7 +166,7 @@ _adapter_address_to_entry(intf_t *intf, IP_ADAPTER_ADDRESSES *a,
entry->intf_flags = 0;
if (a->OperStatus == IfOperStatusUp)
entry->intf_flags |= INTF_FLAG_UP;
if (a->IfType == IF_TYPE_SOFTWARE_LOOPBACK)
if (a->IfType == MIB_IF_TYPE_LOOPBACK)
entry->intf_flags |= INTF_FLAG_LOOPBACK;
else
entry->intf_flags |= INTF_FLAG_MULTICAST;
@@ -223,41 +225,28 @@ _adapter_address_to_entry(intf_t *intf, IP_ADAPTER_ADDRESSES *a,
entry->intf_alias_num++;
}
}
entry->intf_len = (u_int) ((u_char *)ap - (u_char *)entry);
entry->intf_len = (u_char *)ap - (u_char *)entry;
}
#define NPCAP_SERVICE_REGISTRY_KEY "SYSTEM\\CurrentControlSet\\Services\\npcap"
/* The name of the Npcap loopback adapter is stored in the npcap service's
* Registry key in the LoopbackAdapter value. For legacy loopback support, this
* is a name like "NPF_{GUID}", but for newer Npcap the name is "NPF_Loopback"
*/
int intf_get_loopback_name(char *buffer, int buf_size)
int _intf_has_npcap_loopback(void)
{
HKEY hKey;
DWORD type;
int size = buf_size;
DWORD type, value;
int res = 0;
memset(buffer, 0, buf_size);
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, NPCAP_SERVICE_REGISTRY_KEY "\\Parameters", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
if (RegQueryValueExA(hKey, "LoopbackAdapter", 0, &type, (LPBYTE)buffer, &size) == ERROR_SUCCESS && type == REG_SZ)
if (RegQueryValueExA(hKey, "LoopbackAdapter", 0, &type, (LPBYTE)&value, sizeof(value)) == ERROR_SUCCESS && type == REG_DWORD)
{
res = 1;
}
else
{
res = 0;
res = value ? 1 : 0;
}
RegCloseKey(hKey);
}
else
{
res = 0;
}
return res;
}
@@ -265,72 +254,27 @@ int intf_get_loopback_name(char *buffer, int buf_size)
static IP_ADAPTER_ADDRESSES*
_update_tables_for_npcap_loopback(IP_ADAPTER_ADDRESSES *p)
{
IP_ADAPTER_ADDRESSES *a_prev = NULL;
IP_ADAPTER_ADDRESSES *a;
IP_ADAPTER_ADDRESSES *a_original_loopback_prev = NULL;
IP_ADAPTER_ADDRESSES *a_original_loopback = NULL;
IP_ADAPTER_ADDRESSES *a_npcap_loopback = NULL;
static char npcap_loopback_name[1024] = {0};
static int has_npcap_loopback = -1;
/* Don't bother hitting the registry every time. Not ideal for long-running
* processes, but works for Nmap. */
if (npcap_loopback_name[0] == '\0')
g_has_npcap_loopback = intf_get_loopback_name(npcap_loopback_name, 1024);
else if (g_has_npcap_loopback == 0)
return p;
if (has_npcap_loopback < 0) {
has_npcap_loopback = _intf_has_npcap_loopback();
if (!p)
if (!has_npcap_loopback)
return p;
/* Loop through the addresses looking for the dummy loopback interface from Windows. */
for (a = p; a != NULL; a = a->Next) {
if (a->IfType == IF_TYPE_SOFTWARE_LOOPBACK) {
/* Dummy loopback. Keep track of it. */
a_original_loopback = a;
a_original_loopback_prev = a_prev;
/* Overwrite the AdapterName from the system's own loopback adapter with
* the NPF_Loopback name. This is what we use to open the adapter with
* Packet.dll later. */
a->AdapterName = "NPF_Loopback";
break;
}
else if (strcmp(a->AdapterName, npcap_loopback_name + strlen(_DEVICE_PREFIX) - 1) == 0) {
/* Legacy loopback adapter. The modern one doesn't show up in GetAdaptersAddresses. */
a_npcap_loopback = a;
}
a_prev = a;
}
/* If there's no loopback on this system, something's wrong. Windows is
* supposed to create this. */
if (!a_original_loopback)
return p;
g_has_npcap_loopback = 1;
/* If we didn't find the legacy adapter, use the modern adapter name. */
if (!a_npcap_loopback) {
/* Overwrite the name we got from the Registry, in case it's a broken legacy
* install, in which case we'll never find the legacy adapter anyway. */
strlcpy(npcap_loopback_name, _DEVICE_PREFIX "NPF_Loopback", 1024);
/* Overwrite the AdapterName from the system's own loopback adapter with
* the NPF_Loopback name. This is what we use to open the adapter with
* Packet.dll later. */
a_original_loopback->AdapterName = npcap_loopback_name + sizeof(_DEVICE_PREFIX) - 1;
return p;
}
else {
/* Legacy loopback adapter was found. Copy some key info from the system's
* loopback adapter. */
a_npcap_loopback->IfType = a_original_loopback->IfType;
a_npcap_loopback->FirstUnicastAddress = a_original_loopback->FirstUnicastAddress;
a_npcap_loopback->FirstPrefix = a_original_loopback->FirstPrefix;
memset(a_npcap_loopback->PhysicalAddress, 0, ETH_ADDR_LEN);
/* Unlink the original loopback adapter from the list. We'll use Npcap's instead. */
if (a_original_loopback_prev) {
a_original_loopback_prev->Next = a_original_loopback_prev->Next->Next;
return p;
}
else if (a_original_loopback == p) {
return a_original_loopback->Next;
}
else {
return p;
}
}
return p;
}
static int
@@ -368,8 +312,7 @@ _refresh_tables(intf_t *intf)
free(p);
return (-1);
}
p = _update_tables_for_npcap_loopback(p);
intf->iftable = p;
intf->iftable = _update_tables_for_npcap_loopback(p);
/*
* Map "unfriendly" win32 interface indices to ours.
@@ -388,7 +331,7 @@ _refresh_tables(intf_t *intf)
static IP_ADAPTER_ADDRESSES *
_find_adapter_address(intf_t *intf, const char *device)
{
{
IP_ADAPTER_ADDRESSES *a;
char *p = (char *)device;
int n, type = _ifcombo_type(device);
@@ -494,9 +437,28 @@ intf_get_src(intf_t *intf, struct intf_entry *entry, struct addr *src)
int
intf_get_dst(intf_t *intf, struct intf_entry *entry, struct addr *dst)
{
errno = ENOSYS;
SetLastError(ERROR_NOT_SUPPORTED);
return (-1);
DWORD dwIndex;
struct sockaddr sa = {0};
IP_ADAPTER_ADDRESSES *a;
if (0 != addr_ntos(dst, &sa)) {
errno = EINVAL;
return (-1);
}
if (GetBestInterfaceEx(&sa, &dwIndex) != NO_ERROR)
return (-1);
if (_refresh_tables(intf) < 0)
return (-1);
a = _find_adapter_address_by_index(intf, sa.sa_family, dwIndex);
if (a == NULL)
return (-1);
_adapter_address_to_entry(intf, a, entry);
return (0);
}
int
@@ -507,6 +469,23 @@ intf_set(intf_t *intf, const struct intf_entry *entry)
* but what about the rest of the configuration? :-(
* {Add,Delete}IPAddress for 2000/XP only
*/
#if 0
/* Set interface address. XXX - 2000/XP only? */
if (entry->intf_addr.addr_type == ADDR_TYPE_IP) {
ULONG ctx = 0, inst = 0;
UINT ip, mask;
memcpy(&ip, &entry->intf_addr.addr_ip, IP_ADDR_LEN);
addr_btom(entry->intf_addr.addr_bits, &mask, IP_ADDR_LEN);
if (AddIPAddress(ip, mask,
_find_ifindex(intf, entry->intf_name),
&ctx, &inst) != NO_ERROR) {
return (-1);
}
return (0);
}
#endif
errno = ENOSYS;
SetLastError(ERROR_NOT_SUPPORTED);
return (-1);

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: intf.c 616 2006-01-09 07:09:49Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <sys/param.h>
#include <sys/types.h>
@@ -28,6 +24,9 @@
# define IP_MULTICAST
#endif
#include <net/if.h>
#ifdef HAVE_NET_IF_DL_H
# include <net/if_dl.h>
#endif
#ifdef HAVE_NET_IF_VAR_H
# include <net/if_var.h>
#endif
@@ -81,12 +80,13 @@
/* XXX - superset of ifreq, for portable SIOC{A,D}IFADDR */
struct dnet_ifaliasreq {
char ifra_name[IFNAMSIZ];
#if defined(__OpenBSD__)
union {
struct sockaddr ifrau_addr;
int ifrau_align;
} ifra_ifrau;
#ifndef ifra_addr
#define ifra_addr ifra_ifrau.ifrau_addr
int ifrau_align;
} ifra_ifrau;
#else
struct sockaddr ifra_addr;
#endif
struct sockaddr ifra_brdaddr;
struct sockaddr ifra_mask;
@@ -103,6 +103,21 @@ struct intf_handle {
u_char ifcbuf[4192];
};
/* TODO: move to .h */
union sockunion {
#ifdef HAVE_NET_IF_DL_H
struct sockaddr_dl sdl;
#endif
struct sockaddr_in sin;
#ifdef HAVE_SOCKADDR_IN6
struct sockaddr_in6 sin6;
#endif
struct sockaddr sa;
#ifdef AF_RAW
struct sockaddr_raw sr;
#endif
};
static int
intf_flags_to_iff(u_short flags, int iff)
{
@@ -158,13 +173,13 @@ intf_open(void)
return (intf_close(intf));
setsockopt(intf->fd, SOL_SOCKET, SO_BROADCAST,
(const char *) &one, sizeof(one));
(const char *) &one, sizeof(one));
#if defined(SIOCGLIFCONF) || defined(SIOCGIFNETMASK_IN6) || defined(SIOCGIFNETMASK6)
if ((intf->fd6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
# ifdef EPROTONOSUPPORT
if (errno != EPROTONOSUPPORT)
# endif
#endif
return (intf_close(intf));
}
#endif
@@ -202,23 +217,25 @@ _intf_delete_addrs(intf_t *intf, struct intf_entry *entry)
static int
_intf_delete_aliases(intf_t *intf, struct intf_entry *entry)
{
int i;
size_t i;
#if defined(SIOCDIFADDR) && !defined(__linux__) /* XXX - see Linux below */
struct dnet_ifaliasreq ifra;
memset(&ifra, 0, sizeof(ifra));
strlcpy(ifra.ifra_name, entry->intf_name, sizeof(ifra.ifra_name));
for (i = 0; i < (int)entry->intf_alias_num; i++) {
for (i = 0; i < entry->intf_alias_num; i++) {
addr_ntos(&entry->intf_alias_addrs[i], &ifra.ifra_addr);
ioctl(intf->fd, SIOCDIFADDR, &ifra);
}
#else
unsigned char n;
struct ifreq ifr;
for (i = 0; i < entry->intf_alias_num; i++) {
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s:%d",
entry->intf_name, i + 1);
n = i + 1;
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%.11s:%u",
entry->intf_name, n);
# ifdef SIOCLIFREMOVEIF
/* XXX - overloading Solaris lifreq with ifreq */
ioctl(intf->fd, SIOCLIFREMOVEIF, &ifr);
@@ -235,7 +252,7 @@ _intf_delete_aliases(intf_t *intf, struct intf_entry *entry)
static int
_intf_add_aliases(intf_t *intf, const struct intf_entry *entry)
{
int i;
size_t i;
#ifdef SIOCAIFADDR
struct dnet_ifaliasreq ifra;
struct addr bcast;
@@ -260,13 +277,13 @@ _intf_add_aliases(intf_t *intf, const struct intf_entry *entry)
}
#else
struct ifreq ifr;
int n = 1;
unsigned char n = 1;
for (i = 0; i < entry->intf_alias_num; i++) {
if (entry->intf_alias_addrs[i].addr_type != ADDR_TYPE_IP)
continue;
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s:%d",
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%.11s:%u",
entry->intf_name, n++);
# ifdef SIOCLIFADDIF
if (ioctl(intf->fd, SIOCLIFADDIF, &ifr) < 0)
@@ -318,7 +335,7 @@ intf_set(intf_t *intf, const struct intf_entry *entry)
}
/* Set interface address. */
if (entry->intf_addr.addr_type == ADDR_TYPE_IP) {
#if defined(BSD) && !defined(__OPENBSD__)
#if defined(BSD) && !defined(__OpenBSD__)
/* XXX - why must this happen before SIOCSIFADDR? */
if (addr_btos(entry->intf_addr.addr_bits,
&ifr.ifr_addr) == 0) {
@@ -493,7 +510,7 @@ _intf_get_noalias(intf_t *intf, struct intf_entry *entry)
return (-1);
strlcpy(ifr.ifr_name, entry->intf_name, sizeof(ifr.ifr_name));
/* Get interface flags. */
if (ioctl(intf->fd, SIOCGIFFLAGS, &ifr) < 0)
return (-1);
@@ -562,9 +579,9 @@ _intf_get_noalias(intf_t *intf, struct intf_entry *entry)
if (ioctl(intf->fd, SIOCGIFHWADDR, &ifr) < 0)
return (-1);
if (addr_ston(&ifr.ifr_addr, &entry->intf_link_addr) < 0) {
/* Likely we got an unsupported address type. Just use NONE for now. */
entry->intf_link_addr.addr_type = ADDR_TYPE_NONE;
entry->intf_link_addr.addr_bits = 0;
/* Likely we got an unsupported address type. Just use NONE for now. */
entry->intf_link_addr.addr_type = ADDR_TYPE_NONE;
entry->intf_link_addr.addr_bits = 0;
}
#elif defined(SIOCRPHYSADDR)
/* Tru64 */
@@ -712,12 +729,10 @@ _intf_get_aliases(intf_t *intf, struct intf_entry *entry)
if (strcmp(ifr->ifr_name, entry->intf_name) != 0) {
if (p) *p = ':';
continue;
continue;
}
/* Fix the name back up */
if (p) *p = ':';
if (p) *p = ':'; /* Fix the name back up */
if (addr_ston(&ifr->ifr_addr, ap) < 0)
continue;
@@ -729,7 +744,8 @@ _intf_get_aliases(intf_t *intf, struct intf_entry *entry)
if (ap->addr_ip == entry->intf_addr.addr_ip ||
ap->addr_ip == entry->intf_dst_addr.addr_ip)
continue;
strlcpy(tmpifr.ifr_name, ifr->ifr_name, sizeof(tmpifr.ifr_name));
strlcpy(tmpifr.ifr_name, ifr->ifr_name,
sizeof(tmpifr.ifr_name));
if (ioctl(intf->fd, SIOCGIFNETMASK, &tmpifr) == 0)
addr_stob(&tmpifr.ifr_addr, &ap->addr_bits);
}
@@ -774,7 +790,7 @@ _intf_get_aliases(intf_t *intf, struct intf_entry *entry)
u_int idx, bits, scope, flags;
if ((f = fopen(PROC_INET6_FILE, "r")) != NULL) {
while (ap < lap &&
while ((ap +1) < lap &&
fgets(buf, sizeof(buf), f) != NULL) {
/* scan up to INTF_NAME_LEN-1 bytes to reserve space for null terminator */
sscanf(buf, "%04s%04s%04s%04s%04s%04s%04s%04s %x %02x %02x %02x %15s\n",
@@ -812,6 +828,18 @@ intf_get(intf_t *intf, struct intf_entry *entry)
return (_intf_get_aliases(intf, entry));
}
static int
get_max_bits(const struct addr *a)
{
if (a->addr_type == ADDR_TYPE_IP) {
return IP_ADDR_BITS;
} else if (a->addr_type == ADDR_TYPE_IP6) {
return IP6_ADDR_BITS;
} else {
return 0;
}
}
/* Look up an interface from an index, such as a sockaddr_in6.sin6_scope_id. */
int
intf_get_index(intf_t *intf, struct intf_entry *entry, int af, unsigned int index)
@@ -831,28 +859,34 @@ static int
_match_intf_src(const struct intf_entry *entry, void *arg)
{
struct intf_entry *save = (struct intf_entry *)arg;
int matched = 0, cnt;
if (entry->intf_addr.addr_type == ADDR_TYPE_IP &&
entry->intf_addr.addr_ip == save->intf_addr.addr_ip)
matched = 1;
int len = save->intf_len < entry->intf_len ? save->intf_len : entry->intf_len;
int i;
for (cnt = 0; !matched && cnt < (int) entry->intf_alias_num; cnt++) {
if (entry->intf_alias_addrs[cnt].addr_type != ADDR_TYPE_IP)
continue;
if (entry->intf_alias_addrs[cnt].addr_ip == save->intf_addr.addr_ip)
matched = 1;
struct addr a, saved_addr;
saved_addr = save->intf_addr;
saved_addr.addr_bits = get_max_bits(&saved_addr);
a = entry->intf_addr;
a.addr_bits = get_max_bits(&a);
if (addr_cmp(&a, &saved_addr) == 0) {
memcpy(save, entry, len);
return 1;
}
if (matched) {
/* XXX - truncated result if entry is too small. */
if (save->intf_len < entry->intf_len)
memcpy(save, entry, save->intf_len);
else
memcpy(save, entry, entry->intf_len);
return (1);
for (i = 0; i < (int)entry->intf_alias_num; i++) {
a = entry->intf_alias_addrs[i];
a.addr_bits = get_max_bits(&a);
if (addr_cmp(&a, &saved_addr) == 0) {
memcpy(save, entry, len);
save->intf_addr = entry->intf_alias_addrs[i];
return 1;
}
}
return (0);
return 0;
}
int
@@ -870,24 +904,27 @@ intf_get_src(intf_t *intf, struct intf_entry *entry, struct addr *src)
int
intf_get_dst(intf_t *intf, struct intf_entry *entry, struct addr *dst)
{
struct sockaddr_in sin;
union sockunion sun;
socklen_t n;
if (dst->addr_type != ADDR_TYPE_IP) {
int fd;
if (dst->addr_type != ADDR_TYPE_IP && dst->addr_type != ADDR_TYPE_IP6) {
errno = EINVAL;
return (-1);
}
addr_ntos(dst, (struct sockaddr *)&sin);
sin.sin_port = htons(666);
if (connect(intf->fd, (struct sockaddr *)&sin, sizeof(sin)) < 0)
addr_ntos(dst, (struct sockaddr *)&sun);
sun.sin.sin_port = htons(666);
fd = dst->addr_type == ADDR_TYPE_IP6 ? intf->fd6 : intf->fd;
if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) < 0)
return (-1);
n = sizeof(sin);
if (getsockname(intf->fd, (struct sockaddr *)&sin, &n) < 0)
n = sizeof(sun);
if (getsockname(fd, (struct sockaddr *)&sun, &n) < 0)
return (-1);
addr_ston((struct sockaddr *)&sin, &entry->intf_addr);
addr_ston((struct sockaddr *)&sun, &entry->intf_addr);
if (intf_loop(intf, _match_intf_src, entry) != 1)
return (-1);
@@ -957,8 +994,10 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
struct lifreq *lifr, *llifr, *plifr;
char *p, ebuf[BUFSIZ];
int ret;
#ifdef IFF_IPMP
struct lifreq lifrflags;
memset(&lifrflags, 0, sizeof(struct lifreq));
#endif
entry = (struct intf_entry *)ebuf;
@@ -970,17 +1009,17 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
#endif
intf->lifc.lifc_buf = (caddr_t)intf->ifcbuf;
intf->lifc.lifc_len = sizeof(intf->ifcbuf);
if (ioctl(intf->fd, SIOCGLIFCONF, &intf->lifc) < 0)
return (-1);
llifr = (struct lifreq *)&intf->lifc.lifc_buf[intf->lifc.lifc_len];
for (lifr = intf->lifc.lifc_req; lifr < llifr; lifr = NEXTLIFR(lifr)) {
/* XXX - Linux, Solaris ifaliases */
if ((p = strchr(lifr->lifr_name, ':')) != NULL)
*p = '\0';
for (plifr = intf->lifc.lifc_req; plifr < lifr; plifr = NEXTLIFR(lifr)) {
if (strcmp(lifr->lifr_name, plifr->lifr_name) == 0)
break;
@@ -996,6 +1035,7 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
/* Repair the alias name back up */
if (p) *p = ':';
#ifdef IFF_IPMP
/* Ignore IPMP interfaces. These are virtual interfaces made up
* of physical interfaces. IPMP interfaces do not support things
* like packet sniffing; it is necessary to use one of the
@@ -1009,17 +1049,16 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
;
else
return (-1);
#ifdef IFF_IPMP
if (lifrflags.lifr_flags & IFF_IPMP) {
continue;
}
#endif
if (_intf_get_noalias(intf, entry) < 0)
return (-1);
if (_intf_get_aliases(intf, entry) < 0)
return (-1);
if ((ret = (*callback)(entry, arg)) != 0)
return (ret);
}
@@ -1043,7 +1082,8 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
return (-1);
pifr = NULL;
lifr = (struct ifreq *)&intf->ifc.ifc_buf[intf->ifc.ifc_len];
lifr = (struct ifreq *)intf->ifc.ifc_buf +
(intf->ifc.ifc_len / sizeof(*lifr));
for (ifr = intf->ifc.ifc_req; ifr < lifr; ifr = NEXTIFR(ifr)) {
/* XXX - Linux, Solaris ifaliases */
@@ -1052,7 +1092,7 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
if (pifr != NULL && strcmp(ifr->ifr_name, pifr->ifr_name) == 0) {
if (p) *p = ':';
continue;
continue;
}
memset(ebuf, 0, sizeof(ebuf));
@@ -1060,9 +1100,8 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg)
sizeof(entry->intf_name));
entry->intf_len = sizeof(ebuf);
/* Repair the alias name back up */
/* Repair the alias name back up. */
if (p) *p = ':';
if (_intf_get_noalias(intf, entry) < 0)
return (-1);
if (_intf_get_aliases(intf, entry) < 0)

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: ip-cooked.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#ifndef _WIN32
#include <netinet/in.h>

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: ip-util.c 595 2005-02-17 02:55:56Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <errno.h>
#include <stdlib.h>
@@ -64,7 +60,7 @@ ip_add_option(void *buf, size_t len, int proto,
hl = tcp->th_off << 2;
p = (u_char *)tcp + hl;
}
datalen = (int) (ntohs(ip->ip_len) - (p - (u_char *)buf));
datalen = ntohs(ip->ip_len) - (p - (u_char *)buf);
/* Compute padding to next word boundary. */
if ((padlen = 4 - (optlen % 4)) == 4)
@@ -94,13 +90,13 @@ ip_add_option(void *buf, size_t len, int proto,
optlen += padlen;
if (proto == IP_PROTO_IP)
ip->ip_hl = (int) ((p - (u_char *)ip) >> 2);
ip->ip_hl = (p - (u_char *)ip) >> 2;
else if (proto == IP_PROTO_TCP)
tcp->th_off = (int) ((p - (u_char *)tcp) >> 2);
tcp->th_off = (p - (u_char *)tcp) >> 2;
ip->ip_len = htons((u_short) (ntohs(ip->ip_len) + optlen));
ip->ip_len = htons(ntohs(ip->ip_len) + optlen);
return (ssize_t)(optlen);
return (optlen);
}
void
@@ -131,7 +127,7 @@ ip_checksum(void *buf, size_t len)
if (len >= TCP_HDR_LEN) {
tcp->th_sum = 0;
sum = ip_cksum_add(tcp, len, 0) +
htons((u_short)(ip->ip_p + len));
htons(ip->ip_p + len);
sum = ip_cksum_add(&ip->ip_src, 8, sum);
tcp->th_sum = ip_cksum_carry(sum);
}
@@ -141,7 +137,7 @@ ip_checksum(void *buf, size_t len)
if (len >= UDP_HDR_LEN) {
udp->uh_sum = 0;
sum = ip_cksum_add(udp, len, 0) +
htons((u_short)(ip->ip_p + len));
htons(ip->ip_p + len);
sum = ip_cksum_add(&ip->ip_src, 8, sum);
udp->uh_sum = ip_cksum_carry(sum);
if (!udp->uh_sum)
@@ -171,7 +167,7 @@ ip_cksum_add(const void *buf, size_t len, int cksum)
uint16_t *sp = (uint16_t *)buf;
int n, sn;
sn = (int) len / 2;
sn = len / 2;
n = (sn + 15) / 16;
/* XXX - unroll loop using Duff's device. */

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: ip-win32.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <ws2tcpip.h>
@@ -59,9 +55,9 @@ ip_send(ip_t *ip, const void *buf, size_t len)
ip->sin.sin_addr.s_addr = hdr->ip_src;
if ((len = sendto(ip->fd, (const char *)buf, (int)len, 0,
if ((len = sendto(ip->fd, (const char *)buf, len, 0,
(struct sockaddr *)&ip->sin, sizeof(ip->sin))) != SOCKET_ERROR)
return (ssize_t)(len);
return (len);
return (-1);
}

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: ip.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,16 +3,14 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: ip6.c 539 2005-01-23 07:36:54Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include "dnet.h"
#include <string.h>
#include <errno.h>
#define IP6_IS_EXT(n) \
((n) == IP_PROTO_HOPOPTS || (n) == IP_PROTO_DSTOPTS || \
@@ -41,7 +39,7 @@ ip6_checksum(void *buf, size_t len)
if (len >= TCP_HDR_LEN) {
tcp->th_sum = 0;
sum = ip_cksum_add(tcp, len, 0) + htons(nxt + (u_short)len);
sum = ip_cksum_add(tcp, len, 0) + htons(nxt + len);
sum = ip_cksum_add(&ip6->ip6_src, 32, sum);
tcp->th_sum = ip_cksum_carry(sum);
}
@@ -50,7 +48,7 @@ ip6_checksum(void *buf, size_t len)
if (len >= UDP_HDR_LEN) {
udp->uh_sum = 0;
sum = ip_cksum_add(udp, len, 0) + htons(nxt + (u_short)len);
sum = ip_cksum_add(udp, len, 0) + htons(nxt + len);
sum = ip_cksum_add(&ip6->ip6_src, 32, sum);
if ((udp->uh_sum = ip_cksum_carry(sum)) == 0)
udp->uh_sum = 0xffff;
@@ -60,7 +58,7 @@ ip6_checksum(void *buf, size_t len)
if (len >= ICMP_HDR_LEN) {
icmp->icmp_cksum = 0;
sum = ip_cksum_add(icmp, len, 0) + htons(nxt + (u_short)len);
sum = ip_cksum_add(icmp, len, 0) + htons(nxt + len);
sum = ip_cksum_add(&ip6->ip6_src, 32, sum);
icmp->icmp_cksum = ip_cksum_carry(sum);
}
@@ -74,3 +72,57 @@ ip6_checksum(void *buf, size_t len)
}
}
}
ssize_t
ip6_add_option(void *buf, size_t len, int proto,
const void *optbuf, size_t optlen)
{
struct ip6_hdr *ip6;
struct tcp_hdr *tcp = NULL;
u_char *p;
int hl, datalen, padlen;
if (proto != IP_PROTO_TCP) {
errno = EINVAL;
return (-1);
}
ip6 = (struct ip6_hdr *)buf;
p = (u_char *)buf + IP6_HDR_LEN;
tcp = (struct tcp_hdr *)p;
hl = tcp->th_off << 2;
p = (u_char *)tcp + hl;
datalen = ntohs(ip6->ip6_plen) + IP6_HDR_LEN - (p - (u_char *)buf);
/* Compute padding to next word boundary. */
if ((padlen = 4 - (optlen % 4)) == 4)
padlen = 0;
/* XXX - IP_HDR_LEN_MAX == TCP_HDR_LEN_MAX */
if (hl + optlen + padlen > IP_HDR_LEN_MAX ||
ntohs(ip6->ip6_plen) + IP6_HDR_LEN + optlen + padlen > len) {
errno = EINVAL;
return (-1);
}
/* Shift any existing data. */
if (datalen) {
memmove(p + optlen + padlen, p, datalen);
}
/* XXX - IP_OPT_NOP == TCP_OPT_NOP */
if (padlen) {
memset(p, IP_OPT_NOP, padlen);
p += padlen;
}
memmove(p, optbuf, optlen);
p += optlen;
optlen += padlen;
tcp->th_off = (p - (u_char *)tcp) >> 2;
ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) + optlen);
return (optlen);
}

View File

@@ -0,0 +1,196 @@
/*
* ndisc-linux.c
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
*/
#include "config.h"
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <asm/types.h>
#include <netinet/in.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <net/route.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "dnet.h"
struct ndisc_handle
{
int nlfd;
int seq;
};
ndisc_t *
ndisc_open(void)
{
struct sockaddr_nl snl;
ndisc_t *n;
if ((n = calloc(1, sizeof(*n))) != NULL) {
n->nlfd = -1;
if ((n->nlfd = socket(AF_NETLINK, SOCK_RAW,
NETLINK_ROUTE)) < 0)
return (ndisc_close(n));
memset(&snl, 0, sizeof(snl));
snl.nl_family = AF_NETLINK;
if (bind(n->nlfd, (struct sockaddr *)&snl, sizeof(snl)) < 0)
return (ndisc_close(n));
}
return (n);
}
static int
netlink_addattr(struct nlmsghdr *n, int type, const void *data, int data_len)
{
int len = RTA_LENGTH(data_len);
struct rtattr *rta;
rta = (struct rtattr *)((uint8_t*)n + NLMSG_ALIGN(n->nlmsg_len));
rta->rta_type = type;
rta->rta_len = len;
memcpy(RTA_DATA(rta), data, data_len);
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
return 0;
}
int
ndisc_modify(ndisc_t *n, const struct ndisc_entry *entry, int type, int flags)
{
struct nlmsghdr *nmsg;
struct ndmsg *ndm;
struct sockaddr_nl snl;
struct iovec iov;
struct msghdr msg;
u_char buf[512];
int i, af, alen;
switch (entry->ndisc_pa.addr_type) {
case ADDR_TYPE_IP:
af = AF_INET;
alen = IP_ADDR_LEN;
break;
case ADDR_TYPE_IP6:
af = AF_INET6;
alen = IP6_ADDR_LEN;
break;
default:
errno = EINVAL;
return (-1);
}
memset(buf, 0, sizeof(buf));
nmsg = (struct nlmsghdr *)buf;
nmsg->nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg));
nmsg->nlmsg_flags = NLM_F_REQUEST | flags;
nmsg->nlmsg_type = type;
nmsg->nlmsg_seq = ++n->seq;
nmsg->nlmsg_flags |= NLM_F_ACK;
ndm = (struct ndmsg *)(nmsg + 1);
ndm->ndm_family = af;
ndm->ndm_state = NUD_PERMANENT;
ndm->ndm_ifindex = entry->intf_index;
netlink_addattr(nmsg, NDA_DST, &entry->ndisc_pa.addr_data8[0],
alen);
if (type == RTM_NEWNEIGH) {
netlink_addattr(nmsg, NDA_LLADDR,
&entry->ndisc_ha.addr_data8[0], ETH_ADDR_LEN);
}
memset(&snl, 0, sizeof(snl));
snl.nl_family = AF_NETLINK;
iov.iov_base = nmsg;
iov.iov_len = nmsg->nlmsg_len;
memset(&msg, 0, sizeof(msg));
msg.msg_name = &snl;
msg.msg_namelen = sizeof(snl);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
if (sendmsg(n->nlfd, &msg, 0) < 0)
return (-1);
iov.iov_base = buf;
iov.iov_len = sizeof(buf);
if ((i = recvmsg(n->nlfd, &msg, 0)) <= 0)
return (-1);
if (nmsg->nlmsg_len < (int)sizeof(*nmsg) || nmsg->nlmsg_len > i ||
nmsg->nlmsg_seq != n->seq) {
errno = EINVAL;
return (-1);
}
if (nmsg->nlmsg_type == NLMSG_ERROR) {
struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(nmsg);
errno = -err->error;
if (errno == 0) {
return 0;
}
return (-1);
}
return (-1);
}
int
ndisc_add(ndisc_t *n, const struct ndisc_entry *entry)
{
return ndisc_modify(n, entry, RTM_NEWNEIGH, NLM_F_CREATE | NLM_F_EXCL);
}
int
ndisc_delete(ndisc_t *n, const struct ndisc_entry *entry)
{
return ndisc_modify(n, entry, RTM_DELNEIGH, 0);
}
int
ndisc_get(ndisc_t *n, struct ndisc_entry *entry)
{
/* TBD */
errno = ENOSYS;
return (-1);
}
int
ndisc_loop(ndisc_t *n, ndisc_handler callback, void *arg)
{
/* TBD */
errno = ENOSYS;
return (-1);
}
ndisc_t *
ndisc_close(ndisc_t *n)
{
if (n != NULL) {
if (n->nlfd >= 0)
close(n->nlfd);
free(n);
}
return (NULL);
}

View File

@@ -0,0 +1,55 @@
/*
* ndisc-linux.c
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
*/
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "dnet.h"
ndisc_t *
ndisc_open(void)
{
errno = ENOSYS;
return (NULL);
}
int
ndisc_add(ndisc_t *n, const struct ndisc_entry *entry)
{
errno = ENOSYS;
return (-1);
}
int
ndisc_delete(ndisc_t *n, const struct ndisc_entry *entry)
{
errno = ENOSYS;
return (-1);
}
int
ndisc_get(ndisc_t *n, struct ndisc_entry *entry)
{
errno = ENOSYS;
return (-1);
}
int
ndisc_loop(ndisc_t *n, ndisc_handler callback, void *arg)
{
errno = ENOSYS;
return (-1);
}
ndisc_t *
ndisc_close(ndisc_t *n)
{
return (NULL);
}

View File

@@ -5,18 +5,22 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
* Copyright (c) 1996 David Mazieres <dm@lcs.mit.edu>
* Copyright (c) 2023-2024 Oliver Falk <oliver@linux-kernel.at>
*
* $Id: rand.c 587 2005-02-15 06:37:07Z dugsong $
*/
#include "config.h"
#ifdef _WIN32
/* XXX */
# undef _WIN32_WINNT
# define _WIN32_WINNT _WIN32_WINNT_WIN7
# include <bcrypt.h>
# pragma comment(lib, "bcrypt.lib")
# ifndef _WIN32_WINNT
# define _WIN32_WINNT _WIN32_WINNT_WIN7
# endif
# if _WIN32_WINNT >= _WIN32_WINNT_VISTA
# include <bcrypt.h>
# pragma comment(lib, "bcrypt.lib")
# else
# include <wincrypt.h>
# endif
# define inline __inline
#else
# include <sys/types.h>
@@ -70,15 +74,29 @@ rand_open(void)
rand_t *r;
u_char seed[256];
#ifdef _WIN32
# if _WIN32_WINNT >= _WIN32_WINNT_VISTA
if (STATUS_SUCCESS != BCryptGenRandom(NULL, seed, sizeof(seed), BCRYPT_USE_SYSTEM_PREFERRED_RNG))
return NULL;
# else
HCRYPTPROV hcrypt = 0;
CryptAcquireContext(&hcrypt, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT);
CryptGenRandom(hcrypt, sizeof(seed), seed);
CryptReleaseContext(hcrypt, 0);
#endif
#else
struct timeval *tv = (struct timeval *)seed;
int fd;
if ((fd = open("/dev/arandom", O_RDONLY)) != -1 ||
(fd = open("/dev/urandom", O_RDONLY)) != -1) {
read(fd, seed + sizeof(*tv), sizeof(seed) - sizeof(*tv));
/* This is ugly, as we may end up with nothing in buffer, but
* that's very unlikely, anyway, wrappping the read in a conditional
* avoids compiler warning about unused variable */
if(read(fd, seed + sizeof(*tv), sizeof(seed) - sizeof(*tv))) {
// NOOP
}
close(fd);
}
gettimeofday(tv, NULL);

View File

@@ -4,7 +4,7 @@
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
* Copyright (c) 1999 Masaki Hirabaru <masaki@merit.edu>
*
* $Id: route-bsd.c 555 2005-02-10 05:18:38Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: route-hpux.c 483 2004-01-14 04:52:11Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: route-linux.c 619 2006-01-15 07:33:29Z dugsong $
* $Id$
*/
#include "config.h"
@@ -40,6 +40,7 @@
struct route_handle {
int fd;
int fd6;
int nlfd;
};
@@ -50,10 +51,13 @@ route_open(void)
route_t *r;
if ((r = calloc(1, sizeof(*r))) != NULL) {
r->fd = r->nlfd = -1;
r->fd = r->fd6 = r->nlfd = -1;
if ((r->fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return (route_close(r));
if ((r->fd6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
return (route_close(r));
if ((r->nlfd = socket(AF_NETLINK, SOCK_RAW,
NETLINK_ROUTE)) < 0)
@@ -91,6 +95,67 @@ route_add(route_t *r, const struct route_entry *entry)
return (ioctl(r->fd, SIOCADDRT, &rt));
}
int
route_add_dev(route_t *r, const struct route_entry *entry, const char* dev)
{
struct rtentry rt;
struct addr dst;
memset(&rt, 0, sizeof(rt));
rt.rt_flags = RTF_UP;
rt.rt_dev = (char*)dev;
if (ADDR_ISHOST(&entry->route_dst)) {
rt.rt_flags |= RTF_HOST;
memcpy(&dst, &entry->route_dst, sizeof(dst));
} else
addr_net(&entry->route_dst, &dst);
if (entry->route_gw.addr_ip != 0) {
rt.rt_flags |= RTF_GATEWAY;
}
if (addr_ntos(&dst, &rt.rt_dst) < 0 ||
addr_ntos(&entry->route_gw, &rt.rt_gateway) < 0 ||
addr_btos(entry->route_dst.addr_bits, &rt.rt_genmask) < 0)
return (-1);
int ret = (ioctl(r->fd, SIOCADDRT, &rt));
return ret;
}
int
route6_add(route_t *r, const struct route_entry *entry, int intf_index)
{
struct in6_rtmsg rt;
struct addr dst;
memset(&rt, 0, sizeof(rt));
rt.rtmsg_flags = RTF_UP;
if (ADDR_ISHOST(&entry->route_dst)) {
rt.rtmsg_flags |= RTF_HOST;
memcpy(&dst, &entry->route_dst, sizeof(dst));
} else {
addr_net(&entry->route_dst, &dst);
}
rt.rtmsg_dst_len = entry->route_dst.addr_bits;
rt.rtmsg_ifindex = intf_index;
rt.rtmsg_metric = 1;
memcpy(&rt.rtmsg_dst, &dst.addr_ip6, sizeof(rt.rtmsg_dst));
if (!IN6_IS_ADDR_UNSPECIFIED(&entry->route_gw.addr_ip6)) {
rt.rtmsg_flags |= RTF_GATEWAY;
memcpy(&rt.rtmsg_gateway, &entry->route_gw.addr_ip6,
sizeof(rt.rtmsg_gateway));
}
int ret = (ioctl(r->fd6, SIOCADDRT, &rt));
return ret;
}
int
route_delete(route_t *r, const struct route_entry *entry)
{
@@ -113,6 +178,32 @@ route_delete(route_t *r, const struct route_entry *entry)
return (ioctl(r->fd, SIOCDELRT, &rt));
}
int
route6_delete(route_t *r, const struct route_entry *entry, int intf_index)
{
struct in6_rtmsg rt;
struct addr dst;
memset(&rt, 0, sizeof(rt));
rt.rtmsg_flags = RTF_UP;
if (ADDR_ISHOST(&entry->route_dst)) {
rt.rtmsg_flags |= RTF_HOST;
memcpy(&dst, &entry->route_dst, sizeof(dst));
} else
addr_net(&entry->route_dst, &dst);
rt.rtmsg_dst_len = entry->route_dst.addr_bits;
rt.rtmsg_ifindex = intf_index;
rt.rtmsg_metric = 1;
memcpy(&rt.rtmsg_dst, &dst, sizeof(rt.rtmsg_dst));
memcpy(&rt.rtmsg_gateway, &entry->route_gw, sizeof(rt.rtmsg_gateway));
int ret = (ioctl(r->fd6, SIOCDELRT, &rt));
return ret;
}
int
route_get(route_t *r, struct route_entry *entry)
{
@@ -302,6 +393,8 @@ route_close(route_t *r)
if (r != NULL) {
if (r->fd >= 0)
close(r->fd);
if (r->fd6 >= 0)
close(r->fd6);
if (r->nlfd >= 0)
close(r->nlfd);
free(r);

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id: route-none.c 260 2002-02-04 04:03:45Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -3,14 +3,10 @@
*
* Copyright (c) 2002 Dug Song <dugsong@monkey.org>
*
* $Id: route-win32.c 589 2005-02-15 07:11:32Z dugsong $
* $Id$
*/
#ifdef _WIN32
#include "dnet_winconfig.h"
#else
#include "config.h"
#endif
#include <ws2tcpip.h>
#include <iphlpapi.h>
@@ -138,11 +134,11 @@ route_get(route_t *route, struct route_entry *entry)
static int
route_loop_getipforwardtable(route_t *r, route_handler callback, void *arg)
{
struct route_entry entry;
struct route_entry entry;
intf_t *intf;
ULONG len;
int i, ret;
for (len = sizeof(r->ipftable[0]); ; ) {
if (r->ipftable)
free(r->ipftable);
@@ -182,7 +178,7 @@ route_loop_getipforwardtable(route_t *r, route_handler callback, void *arg)
AF_INET, r->ipftable->table[i].dwForwardIfIndex) == 0) {
strlcpy(entry.intf_name, intf_entry.intf_name, sizeof(entry.intf_name));
}
if ((ret = (*callback)(&entry, arg)) != 0)
break;
}
@@ -239,7 +235,7 @@ route_loop_getipforwardtable2(GETIPFORWARDTABLE2 GetIpForwardTable2,
entry.metric = metric;
else
entry.metric = INT_MAX;
if ((ret = (*callback)(&entry, arg)) != 0)
break;
}

View File

@@ -0,0 +1,73 @@
/* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <string.h>
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
* If retval >= siz, truncation occurred.
*/
size_t
strlcat(dst, src, siz)
char *dst;
const char *src;
size_t siz;
{
register char *d = dst;
register const char *s = src;
register size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
n = siz - dlen;
if (n == 0)
return(dlen + strlen(s));
while (*s != '\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
*d = '\0';
return(dlen + (s - src)); /* count does not include NUL */
}

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: tun-bsd.c 573 2005-02-10 23:50:04Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: tun-linux.c 612 2005-09-12 02:18:06Z dugsong $
* $Id$
*/
#include "config.h"
@@ -79,10 +79,10 @@ ssize_t
tun_send(tun_t *tun, const void *buf, size_t size)
{
struct iovec iov[2];
uint32_t type = ETH_TYPE_IP;
uint32_t etype = htonl(ETH_TYPE_IP);
iov[0].iov_base = &type;
iov[0].iov_len = sizeof(type);
iov[0].iov_base = &etype;
iov[0].iov_len = sizeof(etype);
iov[1].iov_base = (void *)buf;
iov[1].iov_len = size;

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: tun-none.c 548 2005-01-30 06:01:57Z dugsong $
* $Id$
*/
#include "config.h"

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 2001 Dug Song <dugsong@monkey.org>
*
* $Id: tun-solaris.c 547 2005-01-25 21:30:40Z dugsong $
* $Id$
*/
#include "config.h"