2 dnl Copyright (c) 1994, 1995, 1996, 1997
3 dnl The Regents of the University of California. All rights reserved.
5 dnl Process this file with autoconf to produce a configure script.
11 # http://ftp.gnu.org/gnu/config/README
13 # for the URLs to use to fetch new versions of config.guess and
19 AC_INIT(pcap, m4_esyscmd_s([cat VERSION]))
20 AC_CONFIG_SRCDIR(pcap.c)
21 AC_SUBST(PACKAGE_NAME)
25 AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
27 # Try to enable as many C99 features as we can.
28 # At minimum, we want C++/C99-style // comments.
31 if test "$ac_cv_prog_cc_c99" = "no"; then
32 AC_MSG_WARN([The C compiler does not support C99; there may be compiler errors])
34 AC_LBL_C_INIT(V_CCOPT, V_INCLS)
39 # Try to arrange for large file support.
45 dnl Even if <net/bpf.h> were, on all OSes that support BPF, fixed to
46 dnl include <sys/ioccom.h>, and we were to drop support for older
47 dnl releases without that fix, so that pcap-bpf.c doesn't need to
48 dnl include <sys/ioccom.h>, the test program in "AC_LBL_FIXINCLUDES"
49 dnl in "aclocal.m4" uses it, so we would still have to test for it
50 dnl and set "HAVE_SYS_IOCCOM_H" if we have it, otherwise
51 dnl "AC_LBL_FIXINCLUDES" wouldn't work on some platforms such as Solaris.
53 AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h limits.h)
54 AC_CHECK_HEADERS(netpacket/packet.h)
55 AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
56 #include <sys/socket.h>
58 if test "$ac_cv_header_net_pfvar_h" = yes; then
60 # Check for various PF actions.
62 AC_MSG_CHECKING(whether net/pfvar.h defines PF_NAT through PF_NORDR)
64 [#include <sys/types.h>
65 #include <sys/socket.h>
67 #include <net/pfvar.h>],
68 [return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;],
71 AC_DEFINE(HAVE_PF_NAT_THROUGH_PF_NORDR, 1,
72 [define if net/pfvar.h defines PF_NAT through PF_NORDR])
79 AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,,
81 #include <sys/socket.h>
89 AC_CHECK_FUNCS(strerror)
90 AC_CHECK_FUNC(strerror_r,
93 # We have strerror_r; if we define _GNU_SOURCE, is it a
94 # POSIX-compliant strerror_r() or a GNU strerror_r()?
96 AC_MSG_CHECKING(whether strerror_r is GNU-style)
103 /* Define it GNU-style; that will cause an error if it's not GNU-style */
104 extern char *strerror_r(int, char *, size_t);
116 AC_DEFINE(HAVE_GNU_STRERROR_R,,
117 [Define to 1 if you have a GNU-style `strerror_r' function.])
121 AC_DEFINE(HAVE_POSIX_STRERROR_R,,
122 [Define to 1 if you have a POSIX-style `strerror_r' function.])
127 # We don't have strerror_r; do we have strerror_s?
129 AC_CHECK_FUNCS(strerror_s)
133 # Thanks, IBM, for not providing vsyslog() in AIX!
135 AC_CHECK_FUNCS(vsyslog)
140 # we have snprintf() and vsnprintf(), and have asprintf() and
143 # we have snprintf() and vsnprintf(), but don't have asprintf()
146 # we have neither snprintf() nor vsnprintf(), and don't have
147 # asprintf() or vasprintf(), either.
149 # We assume that if we have asprintf() we have vasprintf(), as well
150 # as snprintf() and vsnprintf(), and that if we have snprintf() we
153 # For the first case, we don't need any replacement routines.
154 # For the second case, we need replacement asprintf()/vasprintf()
156 # For the third case, we need replacement snprintf()/vsnprintf() and
157 # asprintf()/vasprintf() routines.
160 AC_CHECK_FUNCS(vsnprintf snprintf,,
163 AC_CHECK_FUNCS(vasprintf asprintf,,
165 if test $needsnprintf = yes; then
167 # We assume we have none of them; missing/snprintf.c supplies
170 AC_LIBOBJ([snprintf])
171 elif test $needasprintf = yes; then
173 # We assume we have snprintf()/vsnprintf() but lack
174 # asprintf()/vasprintf(); missing/asprintf.c supplies
175 # the latter (using vsnprintf()).
177 AC_LIBOBJ([asprintf])
181 AC_CHECK_FUNCS(strlcat,,
183 if test $needstrlcat = yes; then
188 AC_CHECK_FUNCS(strlcpy,,
190 if test $needstrlcpy = yes; then
195 AC_CHECK_FUNCS(strtok_r,,
197 if test $needstrtok_r = yes; then
198 AC_LIBOBJ([strtok_r])
202 # Do we have ffs(), and is it declared in <strings.h>?
205 if test "$ac_cv_func_ffs" = yes; then
207 # We have ffs(); is it declared in <strings.h>?
209 # This test fails if we don't have <strings.h> or if we do
210 # but it doesn't declare ffs().
214 AC_DEFINE(STRINGS_H_DECLARES_FFS,,
215 [Define to 1 if strings.h declares `ffs'])
223 # Do this before checking for ether_hostton(), as it's a
224 # "getaddrinfo()-ish function".
229 # Check for reentrant versions of getnetbyname_r(), as provided by
230 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
231 # If we don't find one, we just use getnetbyname(), which uses
232 # thread-specific data on many platforms, but doesn't use it on
233 # NetBSD or OpenBSD, and may not use it on older versions of other
236 # Only do the check if we have a declaration of getnetbyname_r();
237 # without it, we can't check which API it has. (We assume that
238 # if there's a declaration, it has a prototype, so that the API
241 AC_CHECK_DECL(getnetbyname_r,
243 AC_MSG_CHECKING([for the Linux getnetbyname_r()])
245 [#include <netdb.h>],
247 struct netent netent_buf;
249 struct netent *resultp;
252 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
256 AC_DEFINE(HAVE_LINUX_GETNETBYNAME_R, 1,
257 [define if we have the Linux getnetbyname_r()])
262 AC_MSG_CHECKING([for Solaris/IRIX getnetbyname_r()])
264 [#include <netdb.h>],
266 struct netent netent_buf;
269 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
273 AC_DEFINE(HAVE_SOLARIS_IRIX_GETNETBYNAME_R, 1,
274 [define if we have the Solaris/IRIX getnetbyname_r()])
279 AC_MSG_CHECKING([for AIX getnetbyname_r()])
281 [#include <netdb.h>],
283 struct netent netent_buf;
284 struct netent_data net_data;
286 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
290 AC_DEFINE(HAVE_AIX_GETNETBYNAME_R, 1,
291 [define if we have the AIX getnetbyname_r()])
298 ],,[#include <netdb.h>])
301 # Check for reentrant versions of getprotobyname_r(), as provided by
302 # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
303 # If we don't find one, we just use getprotobyname(), which uses
304 # thread-specific data on many platforms, but doesn't use it on
305 # NetBSD or OpenBSD, and may not use it on older versions of other
308 # Only do the check if we have a declaration of getprotobyname_r();
309 # without it, we can't check which API it has. (We assume that
310 # if there's a declaration, it has a prototype, so that the API
313 AC_CHECK_DECL(getprotobyname_r,
315 AC_MSG_CHECKING([for the Linux getprotobyname_r()])
317 [#include <netdb.h>],
319 struct protoent protoent_buf;
321 struct protoent *resultp;
323 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
327 AC_DEFINE(HAVE_LINUX_GETPROTOBYNAME_R, 1,
328 [define if we have the Linux getprotobyname_r()])
333 AC_MSG_CHECKING([for Solaris/IRIX getprotobyname_r()])
335 [#include <netdb.h>],
337 struct protoent protoent_buf;
340 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
344 AC_DEFINE(HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R, 1,
345 [define if we have the Solaris/IRIX getprotobyname_r()])
350 AC_MSG_CHECKING([for AIX getprotobyname_r()])
352 [#include <netdb.h>],
354 struct protoent protoent_buf;
355 struct protoent_data proto_data;
357 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
361 AC_DEFINE(HAVE_AIX_GETPROTOBYNAME_R, 1,
362 [define if we have the AIX getprotobyname_r()])
369 ],,[#include <netdb.h>])
372 # You are in a twisty little maze of UN*Xes, all different.
373 # Some might not have ether_hostton().
374 # Some might have it and declare it in <net/ethernet.h>.
375 # Some might have it and declare it in <netinet/ether.h>
376 # Some might have it and declare it in <sys/ethernet.h>.
377 # Some might have it and declare it in <arpa/inet.h>.
378 # Some might have it and declare it in <netinet/if_ether.h>.
379 # Some might have it and not declare it in any header file.
381 # Before you is a C compiler.
383 AC_CHECK_FUNCS(ether_hostton)
384 if test "$ac_cv_func_ether_hostton" = yes; then
386 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
388 # This test fails if we don't have <net/ethernet.h> or if we do
389 # but it doesn't declare ether_hostton().
391 AC_CHECK_DECL(ether_hostton,
393 AC_DEFINE(NET_ETHERNET_H_DECLARES_ETHER_HOSTTON,,
394 [Define to 1 if net/ethernet.h declares `ether_hostton'])
397 #include <net/ethernet.h>
402 if test "$ac_cv_have_decl_ether_hostton" != yes; then
404 # No, how about <netinet/ether.h>, as on Linux?
406 # This test fails if we don't have <netinet/ether.h>
407 # or if we do but it doesn't declare ether_hostton().
409 # Unset ac_cv_have_decl_ether_hostton so we don't
410 # treat the previous failure as a cached value and
411 # suppress the next test.
413 unset ac_cv_have_decl_ether_hostton
414 AC_CHECK_DECL(ether_hostton,
416 AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_HOSTTON,,
417 [Define to 1 if netinet/ether.h declares `ether_hostton'])
420 #include <netinet/ether.h>
426 if test "$ac_cv_have_decl_ether_hostton" != yes; then
428 # No, how about <sys/ethernet.h>, as on Solaris 10
431 # This test fails if we don't have <sys/ethernet.h>
432 # or if we do but it doesn't declare ether_hostton().
434 # Unset ac_cv_have_decl_ether_hostton so we don't
435 # treat the previous failure as a cached value and
436 # suppress the next test.
438 unset ac_cv_have_decl_ether_hostton
439 AC_CHECK_DECL(ether_hostton,
441 AC_DEFINE(SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON,,
442 [Define to 1 if sys/ethernet.h declares `ether_hostton'])
445 #include <sys/ethernet.h>
451 if test "$ac_cv_have_decl_ether_hostton" != yes; then
453 # No, how about <arpa/inet.h>, as in AIX?
455 # This test fails if we don't have <arpa/inet.h>
456 # (if we have ether_hostton(), we should have
457 # networking, and if we have networking, we should
458 # have <arapa/inet.h>) or if we do but it doesn't
459 # declare ether_hostton().
461 # Unset ac_cv_have_decl_ether_hostton so we don't
462 # treat the previous failure as a cached value and
463 # suppress the next test.
465 unset ac_cv_have_decl_ether_hostton
466 AC_CHECK_DECL(ether_hostton,
468 AC_DEFINE(ARPA_INET_H_DECLARES_ETHER_HOSTTON,,
469 [Define to 1 if arpa/inet.h declares `ether_hostton'])
472 #include <arpa/inet.h>
478 if test "$ac_cv_have_decl_ether_hostton" != yes; then
480 # No, how about <netinet/if_ether.h>?
481 # On some platforms, it requires <net/if.h> and
482 # <netinet/in.h>, and we always include it with
483 # both of them, so test it with both of them.
485 # This test fails if we don't have <netinet/if_ether.h>
486 # and the headers we include before it, or if we do but
487 # <netinet/if_ether.h> doesn't declare ether_hostton().
489 # Unset ac_cv_have_decl_ether_hostton so we don't
490 # treat the previous failure as a cached value and
491 # suppress the next test.
493 unset ac_cv_have_decl_ether_hostton
494 AC_CHECK_DECL(ether_hostton,
496 AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON,,
497 [Define to 1 if netinet/if_ether.h declares `ether_hostton'])
500 #include <sys/types.h>
501 #include <sys/socket.h>
503 #include <netinet/in.h>
504 #include <netinet/if_ether.h>
508 # After all that, is ether_hostton() declared?
510 if test "$ac_cv_have_decl_ether_hostton" = yes; then
514 AC_DEFINE(HAVE_DECL_ETHER_HOSTTON, 1,
515 [Define to 1 if you have the declaration of `ether_hostton'])
518 # No, we'll have to declare it ourselves.
519 # Do we have "struct ether_addr" if we include
520 # <netinet/if_ether.h>?
522 AC_CHECK_TYPES(struct ether_addr,,,
524 #include <sys/types.h>
525 #include <sys/socket.h>
527 #include <netinet/in.h>
528 #include <netinet/if_ether.h>
534 # For various things that might use pthreads.
536 AC_CHECK_HEADER(pthread.h,
539 # OK, we have pthread.h. Do we have pthread_create in the
542 AC_CHECK_FUNC(pthread_create,
547 ac_lbl_have_pthreads="found"
551 # No - do we have it in -lpthreads?
553 AC_CHECK_LIB(pthreads, pthread_create,
556 # Yes - add -lpthreads.
558 ac_lbl_have_pthreads="found"
559 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
563 # No - do we have it in -lpthread?
565 AC_CHECK_LIB(pthread, pthread_create,
568 # Yes - add -lpthread.
570 ac_lbl_have_pthreads="found"
571 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
577 ac_lbl_have_pthreads="not found"
584 # We didn't find pthread.h.
586 ac_lbl_have_pthreads="not found"
590 dnl to pacify those who hate protochain insn
591 AC_MSG_CHECKING(if --disable-protochain option is specified)
592 AC_ARG_ENABLE(protochain,
593 AC_HELP_STRING([--disable-protochain],[disable \"protochain\" insn]))
594 case "x$enable_protochain" in
595 xyes) enable_protochain=enabled ;;
596 xno) enable_protochain=disabled ;;
597 x) enable_protochain=enabled ;;
600 if test "$enable_protochain" = "disabled"; then
601 AC_DEFINE(NO_PROTOCHAIN,1,[do not use protochain])
603 AC_MSG_RESULT(${enable_protochain})
606 # valgrindtest directly uses the native capture mechanism, but
607 # only tests with BPF and PF_PACKET sockets; only enable it if
608 # we have BPF or PF_PACKET sockets.
613 # SITA support is mutually exclusive with native capture support;
614 # "--with-sita" selects SITA support.
617 AC_HELP_STRING([--with-sita],[include SITA support]),
619 if test ! "x$withval" = "xno" ; then
620 AC_DEFINE(SITA,1,[include ACN support])
621 AC_MSG_NOTICE(Enabling SITA ACN support)
627 AC_HELP_STRING([--with-pcap=TYPE],[use packet capture TYPE]))
628 if test ! -z "$with_pcap" ; then
632 # Check for a bunch of headers for various packet
633 # capture mechanisms.
635 AC_CHECK_HEADERS(net/bpf.h)
636 if test "$ac_cv_header_net_bpf_h" = yes; then
638 # Does it define BIOCSETIF?
639 # I.e., is it a header for an LBL/BSD-style capture
640 # mechanism, or is it just a header for a BPF filter
641 # engine? Some versions of Arch Linux, for example,
642 # have a net/bpf.h that doesn't define BIOCSETIF;
643 # as it's a Linux, it should use packet sockets,
648 # sys/types.h, because FreeBSD 10's net/bpf.h
649 # requires that various BSD-style integer types
652 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
653 # doesn't include it but does use struct timeval
654 # in ioctl definitions;
656 # sys/ioctl.h and, if we have it, sys/ioccom.h,
657 # because net/bpf.h defines ioctls;
659 # net/if.h, because it defines some structures
660 # used in ioctls defined by net/bpf.h;
662 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
663 # defines some structure fields as being
666 # and net/bpf.h doesn't necessarily include all
667 # of those headers itself.
669 AC_MSG_CHECKING(if net/bpf.h defines BIOCSETIF)
670 AC_CACHE_VAL(ac_cv_lbl_bpf_h_defines_biocsetif,
673 #include <sys/types.h>
674 #include <sys/time.h>
675 #include <sys/ioctl.h>
676 #include <sys/socket.h>
677 #ifdef HAVE_SYS_IOCCOM_H
678 #include <sys/ioccom.h>
683 [u_int i = BIOCSETIF;],
684 ac_cv_lbl_bpf_h_defines_biocsetif=yes,
685 ac_cv_lbl_bpf_h_defines_biocsetif=no))
686 AC_MSG_RESULT($ac_cv_lbl_bpf_h_defines_biocsetif)
688 AC_CHECK_HEADERS(net/pfilt.h net/enet.h)
689 AC_CHECK_HEADERS(net/nit.h sys/net/nit.h)
690 AC_CHECK_HEADERS(linux/socket.h net/raw.h sys/dlpi.h)
692 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
695 # Check this before DLPI, so that we pick BPF on
696 # Solaris 11 and later.
701 # We have BPF, so build valgrindtest with "make test"
702 # on macOS and FreeBSD (add your OS once there's a
707 freebsd*|darwin*|linux*)
708 VALGRINDTEST_SRC=valgrindtest.c
711 elif test "$ac_cv_header_linux_socket_h" = yes; then
713 # No prizes for guessing this one.
718 # XXX - this won't work with older kernels that have
719 # SOCK_PACKET sockets but not PF_PACKET sockets.
721 VALGRINDTEST_SRC=valgrindtest.c
722 elif test "$ac_cv_header_net_pfilt_h" = yes; then
724 # DEC OSF/1, Digital UNIX, Tru64 UNIX
727 elif test "$ac_cv_header_net_enet_h" = yes; then
729 # Stanford Enetfilter.
732 elif test "$ac_cv_header_net_nit_h" = yes; then
734 # SunOS 4.x STREAMS NIT.
737 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
739 # Pre-SunOS 4.x non-STREAMS NIT.
742 elif test "$ac_cv_header_net_raw_h" = yes; then
747 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
749 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
754 # Nothing we support.
757 AC_MSG_WARN(cannot determine packet capture interface)
758 AC_MSG_WARN((see the INSTALL doc for more info))
761 AC_MSG_CHECKING(packet capture type)
762 AC_MSG_RESULT($V_PCAP)
763 AC_SUBST(VALGRINDTEST_SRC)
766 # Do capture-mechanism-dependent tests.
771 # Needed for common functions used by pcap-[dlpi,libdlpi].c
776 # Checks for some header files.
778 AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
781 # Checks to see if Solaris has the public libdlpi(3LIB) library.
782 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
783 # public libdlpi(3LIB) version. Before libdlpi was made public, a
784 # private version also existed, which did not have the same APIs.
785 # Due to a gcc bug, the default search path for 32-bit libraries does
786 # not include /lib, we add it explicitly here.
787 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
788 # Also, due to the bug above applications that link to libpcap with
789 # libdlpi will have to add "-L/lib" option to "configure".
791 saved_ldflags=$LDFLAGS
792 LDFLAGS="$LIBS -L/lib"
793 AC_CHECK_LIB(dlpi, dlpi_walk,
797 AC_DEFINE(HAVE_LIBDLPI,1,[if libdlpi exists])
800 LDFLAGS=$saved_ldflags
803 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
806 AC_MSG_CHECKING(whether <sys/dlpi.h> is usable)
807 AC_CACHE_VAL(ac_cv_sys_dlpi_usable,
810 #include <sys/types.h>
811 #include <sys/time.h>
812 #include <sys/dlpi.h>
814 [int i = DL_PROMISC_PHYS;],
815 ac_cv_sys_dlpi_usable=yes,
816 ac_cv_sys_dlpi_usable=no))
817 AC_MSG_RESULT($ac_cv_sys_dlpi_usable)
818 if test $ac_cv_sys_dlpi_usable = no ; then
819 AC_MSG_ERROR(<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI)
823 # Check to see if Solaris has the dl_passive_req_t struct defined
825 # This check is for DLPI support for passive modes.
826 # See dlpi(7P) for more details.
828 AC_CHECK_TYPES(dl_passive_req_t,,,
830 #include <sys/types.h>
831 #include <sys/dlpi.h>
837 # Do we have the wireless extensions?
839 AC_CHECK_HEADERS(linux/wireless.h, [], [],
841 #include <sys/socket.h>
842 #include <linux/if.h>
843 #include <linux/types.h>
850 AC_HELP_STRING([--without-libnl],[disable libnl support @<:@default=yes, on Linux, if present@:>@]),
851 with_libnl=$withval,with_libnl=if_available)
853 if test x$with_libnl != xno ; then
856 incdir=-I/usr/include/libnl3
858 case "$with_libnl" in
864 if test -d $withval; then
865 libnldir=-L${withval}/lib/.libs
866 incdir=-I${withval}/include
872 # Try libnl 3.x first.
874 AC_CHECK_LIB(nl-3, nl_socket_alloc,
877 # Yes, we have libnl 3.x.
879 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
880 AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
881 AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x])
882 AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
883 AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
884 V_INCLS="$V_INCLS ${incdir}"
886 ],[], ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 )
888 if test x$have_any_nl = xno ; then
892 AC_CHECK_LIB(nl, nl_socket_alloc,
895 # Yes, we have libnl 2.x.
897 LIBS="${libnldir} -lnl-genl -lnl $LIBS"
898 AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
899 AC_DEFINE(HAVE_LIBNL_2_x,1,[if libnl exists and is version 2.x])
900 AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
901 AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
906 if test x$have_any_nl = xno ; then
908 # No, we don't; do we have libnl 1.x?
910 AC_CHECK_LIB(nl, nl_handle_alloc,
915 LIBS="${libnldir} -lnl $LIBS"
916 AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
921 if test x$have_any_nl = xno ; then
923 # No, we don't have libnl at all.
925 if test x$with_libnl = xyes ; then
926 AC_MSG_ERROR([libnl support requested but libnl not found])
931 AC_CHECK_HEADERS(linux/ethtool.h,,,
934 #include <linux/types.h>
938 # Check to see if struct tpacket_stats is defined in
939 # <linux/if_packet.h>. If so, then pcap-linux.c can use this
940 # to report proper statistics.
944 AC_CHECK_TYPES(struct tpacket_stats,,,
946 #include <linux/if_packet.h>
950 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
952 # NOTE: any failure means we conclude that it doesn't have that
953 # member, so if we don't have tpacket_auxdata, we conclude it
954 # doesn't have that member (which is OK, as either we won't be
955 # using code that would use that member, or we wouldn't compile
957 AC_CHECK_MEMBERS([struct tpacket_auxdata.tp_vlan_tci],,,
959 #include <sys/types.h>
960 #include <linux/if_packet.h>
966 # Check whether we have the *BSD-style ioctls.
968 AC_CHECK_HEADERS(net/if_media.h)
971 # Check whether we have struct BPF_TIMEVAL.
973 AC_CHECK_TYPES(struct BPF_TIMEVAL,,,
975 #include <sys/types.h>
976 #include <sys/ioctl.h>
977 #ifdef HAVE_SYS_IOCCOM_H
978 #include <sys/ioccom.h>
986 # --with-pcap=dag is the only way to get here, and it means
987 # "DAG support but nothing else"
989 V_DEFS="$V_DEFS -DDAG_ONLY"
995 # --with-pcap=septel is the only way to get here, and it means
996 # "Septel support but nothing else"
998 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
1004 # --with-pcap=snf is the only way to get here, and it means
1005 # "SNF support but nothing else"
1007 V_DEFS="$V_DEFS -DSNF_ONLY"
1015 AC_MSG_ERROR($V_PCAP is not a valid pcap type)
1020 dnl Now figure out how we get a list of interfaces and addresses,
1021 dnl if we support capturing. Don't bother if we don't support
1024 if test "$V_PCAP" != null
1026 AC_CHECK_FUNC(getifaddrs,[
1028 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
1029 # as well, just in case some platform is really weird.
1031 AC_CHECK_HEADER(ifaddrs.h,[
1033 # We have the header, so we use "getifaddrs()" to
1034 # get the list of interfaces.
1036 V_FINDALLDEVS=fad-getad.c
1039 # We don't have the header - give up.
1040 # XXX - we could also fall back on some other
1041 # mechanism, but, for now, this'll catch this
1042 # problem so that we can at least try to figure
1043 # out something to do on systems with "getifaddrs()"
1044 # but without "ifaddrs.h", if there is something
1045 # we can do on those systems.
1047 AC_MSG_ERROR([Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>.])
1051 # Well, we don't have "getifaddrs()", at least not with the
1052 # libraries with which we've decided we need to link
1053 # libpcap with, so we have to use some other mechanism.
1055 # Note that this may happen on Solaris, which has
1056 # getifaddrs(), but in -lsocket, not in -lxnet, so we
1057 # won't find it if we link with -lxnet, which we want
1058 # to do for other reasons.
1060 # For now, we use either the SIOCGIFCONF ioctl or the
1061 # SIOCGLIFCONF ioctl, preferring the latter if we have
1062 # it; the latter is a Solarisism that first appeared
1063 # in Solaris 8. (Solaris's getifaddrs() appears to
1064 # be built atop SIOCGLIFCONF; using it directly
1065 # avoids a not-all-that-useful middleman.)
1067 AC_MSG_CHECKING(whether we have SIOCGLIFCONF)
1068 AC_CACHE_VAL(ac_cv_lbl_have_siocglifconf,
1070 [#include <sys/param.h>
1071 #include <sys/file.h>
1072 #include <sys/ioctl.h>
1073 #include <sys/socket.h>
1074 #include <sys/sockio.h>],
1075 [ioctl(0, SIOCGLIFCONF, (char *)0);],
1076 ac_cv_lbl_have_siocglifconf=yes,
1077 ac_cv_lbl_have_siocglifconf=no))
1078 AC_MSG_RESULT($ac_cv_lbl_have_siocglifconf)
1079 if test $ac_cv_lbl_have_siocglifconf = yes ; then
1080 V_FINDALLDEVS=fad-glifc.c
1082 V_FINDALLDEVS=fad-gifc.c
1088 dnl check for hardware timestamp support
1091 AC_CHECK_HEADERS([linux/net_tstamp.h])
1094 AC_MSG_NOTICE(no hardware timestamp support implemented for $host_os)
1098 AC_ARG_ENABLE([packet-ring],
1099 [AC_HELP_STRING([--enable-packet-ring],[enable packet ring support on Linux @<:@default=yes@:>@])],
1100 ,enable_packet_ring=yes)
1102 if test "x$enable_packet_ring" != "xno" ; then
1103 AC_DEFINE(PCAP_SUPPORT_PACKET_RING, 1, [use packet ring capture support on Linux if available])
1104 AC_SUBST(PCAP_SUPPORT_PACKET_RING)
1108 # Check for socklen_t.
1110 AC_CHECK_TYPES(socklen_t,,,
1112 #include <sys/types.h>
1113 #include <sys/socket.h>
1117 AC_HELP_STRING([--enable-ipv6],[build IPv6-capable version @<:@default=yes@:>@]),
1120 if test "$enable_ipv6" != "no"; then
1122 # We've already made sure we have getaddrinfo above in
1123 # AC_LBL_LIBRARY_NET.
1125 AC_DEFINE(INET6,1,[IPv6])
1128 # Check for Endace DAG card support.
1130 AC_HELP_STRING([--with-dag@<:@=DIR@:>@],[include Endace DAG support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1132 if test "$withval" = no
1134 # User doesn't want DAG support.
1136 elif test "$withval" = yes
1138 # User wants DAG support but hasn't specified a directory.
1141 # User wants DAG support and has specified a directory, so use the provided value.
1146 if test "$V_PCAP" = dag; then
1147 # User requested DAG-only libpcap, so we'd better have
1150 elif test "xxx_only" = yes; then
1151 # User requested something-else-only pcap, so they don't
1156 # Use DAG API if present, otherwise don't
1162 AC_ARG_WITH([dag-includes],
1163 AC_HELP_STRING([--with-dag-includes=IDIR],[Endace DAG include directory, if not DIR/include]),
1165 # User wants DAG support and has specified a header directory, so use the provided value.
1167 dag_include_dir=$withval
1170 AC_ARG_WITH([dag-libraries],
1171 AC_HELP_STRING([--with-dag-libraries=LDIR],[Endace DAG library directory, if not DIR/lib]),
1173 # User wants DAG support and has specified a library directory, so use the provided value.
1175 dag_lib_dir=$withval
1178 if test "$want_dag" != no; then
1180 # If necessary, set default paths for DAG API headers and libraries.
1181 if test -z "$dag_root"; then
1185 if test -z "$dag_include_dir"; then
1186 dag_include_dir="$dag_root/include"
1189 if test -z "$dag_lib_dir"; then
1190 dag_lib_dir="$dag_root/lib"
1193 V_INCLS="$V_INCLS -I$dag_include_dir"
1195 AC_CHECK_HEADERS([dagapi.h])
1197 if test "$ac_cv_header_dagapi_h" = yes; then
1199 if test $V_PCAP != dag ; then
1200 SSRC="$SSRC pcap-dag.c"
1203 # Check for various DAG API functions.
1204 # Don't need to save and restore LIBS to prevent -ldag being
1205 # included if there's a found-action (arg 3).
1206 saved_ldflags=$LDFLAGS
1207 LDFLAGS="-L$dag_lib_dir"
1208 AC_CHECK_LIB([dag], [dag_attach_stream],
1210 [AC_MSG_ERROR(DAG library lacks streams support)])
1211 AC_CHECK_LIB([dag], [dag_attach_stream64], [dag_large_streams="1"], [dag_large_streams="0"])
1212 AC_CHECK_LIB([dag],[dag_get_erf_types], [
1213 AC_DEFINE(HAVE_DAG_GET_ERF_TYPES, 1, [define if you have dag_get_erf_types()])])
1214 AC_CHECK_LIB([dag],[dag_get_stream_erf_types], [
1215 AC_DEFINE(HAVE_DAG_GET_STREAM_ERF_TYPES, 1, [define if you have dag_get_stream_erf_types()])])
1217 LDFLAGS=$saved_ldflags
1220 # We assume that if we have libdag we have libdagconf,
1221 # as they're installed at the same time from the same
1224 LIBS="$LIBS -ldag -ldagconf"
1225 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
1227 if test "$dag_large_streams" = 1; then
1228 AC_DEFINE(HAVE_DAG_LARGE_STREAMS_API, 1, [define if you have large streams capable DAG API])
1229 AC_CHECK_LIB([vdag],[vdag_set_device_info], [ac_dag_have_vdag="1"], [ac_dag_have_vdag="0"])
1230 if test "$ac_dag_have_vdag" = 1; then
1231 AC_DEFINE(HAVE_DAG_VDAG, 1, [define if you have vdag_set_device_info()])
1232 if test "$ac_lbl_have_pthreads" != "found"; then
1233 AC_MSG_ERROR([DAG requires pthreads, but we didn't find them])
1235 LIBS="$LIBS $PTHREAD_LIBS"
1239 AC_DEFINE(HAVE_DAG_API, 1, [define if you have the DAG API])
1242 if test "$V_PCAP" = dag; then
1243 # User requested "dag" capture type but we couldn't
1244 # find the DAG API support.
1245 AC_MSG_ERROR([DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support])
1248 if test "$want_dag" = yes; then
1249 # User wanted DAG support but we couldn't find it.
1250 AC_MSG_ERROR([DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support])
1256 AC_HELP_STRING([--with-septel@<:@=DIR@:>@],[include Septel support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1258 if test "$withval" = no
1261 elif test "$withval" = yes
1267 septel_root=$withval
1270 if test "$V_PCAP" = septel; then
1271 # User requested Septel-only libpcap, so we'd better have
1274 elif test "xxx_only" = yes; then
1275 # User requested something-else-only pcap, so they don't
1276 # want Septel support.
1280 # Use Septel API if present, otherwise don't
1282 want_septel=ifpresent
1286 ac_cv_lbl_septel_api=no
1287 if test "$with_septel" != no; then
1289 AC_MSG_CHECKING([whether we have Septel API headers])
1291 # If necessary, set default paths for Septel API headers and libraries.
1292 if test -z "$septel_root"; then
1293 septel_root=$srcdir/../septel
1296 septel_tools_dir="$septel_root"
1297 septel_include_dir="$septel_root/INC"
1299 if test -r "$septel_include_dir/msg.h"; then
1300 ac_cv_lbl_septel_api=yes
1303 if test "$ac_cv_lbl_septel_api" = yes; then
1304 AC_MSG_RESULT([yes ($septel_include_dir)])
1306 V_INCLS="$V_INCLS -I$septel_include_dir"
1307 ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
1308 ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
1310 if test "$V_PCAP" != septel ; then
1311 SSRC="$SSRC pcap-septel.c"
1314 AC_DEFINE(HAVE_SEPTEL_API, 1, [define if you have the Septel API])
1318 if test "$V_PCAP" = septel; then
1319 # User requested "septel" capture type but
1320 # we couldn't find the Septel API support.
1321 AC_MSG_ERROR([Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support])
1324 if test "$want_septel" = yes; then
1325 # User wanted Septel support but we couldn't find it.
1326 AC_MSG_ERROR([Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support])
1331 # Check for Myricom SNF support.
1333 AC_HELP_STRING([--with-snf@<:@=DIR@:>@],[include Myricom SNF support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1335 if test "$withval" = no
1337 # User explicitly doesn't want SNF
1339 elif test "$withval" = yes
1341 # User wants SNF support but hasn't specified a directory.
1344 # User wants SNF support with a specified directory.
1349 if test "$V_PCAP" = snf; then
1350 # User requested Sniffer-only libpcap, so we'd better have
1353 elif test "xxx_only" = yes; then
1354 # User requested something-else-only pcap, so they don't
1359 # Use Sniffer API if present, otherwise don't
1365 AC_ARG_WITH([snf-includes],
1366 AC_HELP_STRING([--with-snf-includes=IDIR],[Myricom SNF include directory, if not DIR/include]),
1368 # User wants SNF with specific header directory
1370 snf_include_dir=$withval
1373 AC_ARG_WITH([snf-libraries],
1374 AC_HELP_STRING([--with-snf-libraries=LDIR],[Myricom SNF library directory, if not DIR/lib]),
1376 # User wants SNF with specific lib directory
1378 snf_lib_dir=$withval
1381 ac_cv_lbl_snf_api=no
1382 if test "$with_snf" != no; then
1384 AC_MSG_CHECKING(whether we have Myricom Sniffer API)
1386 # If necessary, set default paths for Sniffer headers and libraries.
1387 if test -z "$snf_root"; then
1391 if test -z "$snf_include_dir"; then
1392 snf_include_dir="$snf_root/include"
1395 if test -z "$snf_lib_dir"; then
1396 snf_lib_dir="$snf_root/lib"
1399 if test -f "$snf_include_dir/snf.h"; then
1400 # We found a header; make sure we can link with the library
1401 saved_ldflags=$LDFLAGS
1402 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
1403 AC_CHECK_LIB([snf], [snf_init], [ac_cv_lbl_snf_api="yes"])
1404 LDFLAGS="$saved_ldflags"
1405 if test "$ac_cv_lbl_snf_api" = no; then
1406 AC_MSG_ERROR(SNF API cannot correctly be linked; check config.log)
1410 if test "$ac_cv_lbl_snf_api" = yes; then
1411 AC_MSG_RESULT([yes ($snf_root)])
1413 V_INCLS="$V_INCLS -I$snf_include_dir"
1415 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
1417 if test "$V_PCAP" != snf ; then
1418 SSRC="$SSRC pcap-snf.c"
1421 AC_DEFINE(HAVE_SNF_API, 1, [define if you have the Myricom SNF API])
1425 if test "$want_snf" = yes; then
1426 # User requested "snf" capture type but
1427 # we couldn't find the Sniffer API support.
1428 AC_MSG_ERROR([Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support])
1431 if test "$want_snf" = yes; then
1432 AC_MSG_ERROR([Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support])
1437 # Check for Riverbed TurboCap support.
1438 AC_ARG_WITH([turbocap],
1439 AC_HELP_STRING([--with-turbocap@<:@=DIR@:>@],[include Riverbed TurboCap support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1441 if test "$withval" = no
1443 # User explicitly doesn't want TurboCap
1445 elif test "$withval" = yes
1447 # User wants TurboCap support but hasn't specified a directory.
1450 # User wants TurboCap support with a specified directory.
1452 turbocap_root=$withval
1455 if test "xxx_only" = yes; then
1456 # User requested something-else-only pcap, so they don't
1457 # want TurboCap support.
1461 # Use TurboCap API if present, otherwise don't
1463 want_turbocap=ifpresent
1467 ac_cv_lbl_turbocap_api=no
1468 if test "$want_turbocap" != no; then
1470 AC_MSG_CHECKING(whether TurboCap is supported)
1472 save_CFLAGS="$CFLAGS"
1474 if test ! -z "$turbocap_root"; then
1475 TURBOCAP_CFLAGS="-I$turbocap_root/include"
1476 TURBOCAP_LIBS="-L$turbocap_root/lib"
1477 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
1485 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
1487 (void)TcInstanceCreateByName("foo", &i);
1489 ac_cv_lbl_turbocap_api=yes)
1491 CFLAGS="$save_CFLAGS"
1492 if test $ac_cv_lbl_turbocap_api = yes; then
1495 SSRC="$SSRC pcap-tc.c"
1496 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
1497 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
1499 AC_DEFINE(HAVE_TC_API, 1, [define if you have the TurboCap API])
1503 if test "$want_turbocap" = yes; then
1504 # User wanted Turbo support but we couldn't find it.
1505 AC_MSG_ERROR([TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support])
1511 dnl Allow the user to enable remote capture.
1512 dnl It's off by default, as that increases the attack surface of
1513 dnl libpcap, exposing it to malicious servers.
1515 AC_MSG_CHECKING([whether to enable remote packet capture])
1516 AC_ARG_ENABLE(remote,
1517 [ --enable-remote enable remote packet capture @<:@default=no@:>@
1518 --disable-remote disable remote packet capture],,
1520 case "$enableval" in
1521 yes) AC_MSG_RESULT(yes)
1522 AC_WARN([Remote packet capture may expose libpcap-based applications])
1523 AC_WARN([to attacks by malicious remote capture servers!])
1525 # rpcapd requires pthreads on UN*X.
1527 if test "$ac_lbl_have_pthreads" != "found"; then
1528 AC_MSG_ERROR([rpcapd requires pthreads, but we didn't find them])
1531 # It also requires crypt().
1532 # Do we have it in the system libraries?
1534 AC_CHECK_FUNC(crypt,,
1537 # No. Do we have it in -lcrypt?
1539 AC_CHECK_LIB(crypt, crypt,
1542 # Yes; add -lcrypt to the libraries for rpcapd.
1544 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
1547 AC_MSG_ERROR([rpcapd requires crypt(), but we didn't find it])
1552 # OK, we have crypt(). Do we have getspnam()?
1554 AC_CHECK_FUNCS(getspnam)
1557 # Check for various members of struct msghdr.
1559 AC_CHECK_MEMBERS([struct msghdr.msg_control],,,
1561 #include "ftmacros.h"
1562 #include <sys/socket.h>
1564 AC_CHECK_MEMBERS([struct msghdr.msg_flags],,,
1566 #include "ftmacros.h"
1567 #include <sys/socket.h>
1570 AC_DEFINE(ENABLE_REMOTE,,
1571 [Define to 1 if remote packet capture is to be supported])
1572 SSRC="$SSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c"
1573 BUILD_RPCAPD=build-rpcapd
1574 INSTALL_RPCAPD=install-rpcapd
1576 *) AC_MSG_RESULT(no)
1580 AC_MSG_CHECKING(whether to build optimizer debugging code)
1581 AC_ARG_ENABLE(optimizer-dbg,
1582 AC_HELP_STRING([--enable-optimizer-dbg],[build optimizer debugging code]))
1583 if test "$enable_optimizer_dbg" = "yes"; then
1584 AC_DEFINE(BDEBUG,1,[Enable optimizer debugging])
1586 AC_MSG_RESULT(${enable_optimizer_dbg-no})
1588 AC_MSG_CHECKING(whether to build parser debugging code)
1589 AC_ARG_ENABLE(yydebug,
1590 AC_HELP_STRING([--enable-yydebug],[build parser debugging code]))
1591 if test "$enable_yydebug" = "yes"; then
1592 AC_DEFINE(YYDEBUG,1,[Enable parser debugging])
1594 AC_MSG_RESULT(${enable_yydebug-no})
1600 if test "$LEX" = ":"; then
1601 AC_MSG_ERROR([Neither flex nor lex was found.])
1605 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
1606 # and supports processing our scanner.l.
1608 AC_CACHE_CHECK([for capable lex], tcpdump_cv_capable_lex,
1609 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
1610 tcpdump_cv_capable_lex=yes
1612 tcpdump_cv_capable_lex=insufficient
1614 if test $tcpdump_cv_capable_lex = insufficient ; then
1615 AC_MSG_ERROR([$LEX is insufficient to compile libpcap.
1616 libpcap requires Flex 2.5.31 or later, or a compatible version of lex.])
1620 # Look for yacc/bison/byacc.
1625 # Make sure it supports the -p flag and supports processing our
1628 AC_CACHE_CHECK([for capable yacc/bison], tcpdump_cv_capable_yacc,
1629 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
1630 tcpdump_cv_capable_yacc=yes
1632 tcpdump_cv_capable_yacc=insufficient
1634 if test $tcpdump_cv_capable_yacc = insufficient ; then
1635 AC_MSG_ERROR([$YACC is insufficient to compile libpcap.
1636 libpcap requires Bison, a newer version of Berkeley YACC with support
1637 for reentrant parsers, or another YACC compatible with them.])
1641 # Do various checks for various OSes and versions of those OSes.
1643 # Assume, by default, no support for shared libraries and V7/BSD
1644 # convention for man pages (devices in section 4, file formats in
1645 # section 5, miscellaneous info in section 7, administrative commands
1646 # and daemons in section 8). Individual cases can override this.
1652 MAN_ADMIN_COMMANDS=8
1656 dnl Workaround to enable certain features
1657 AC_DEFINE(_SUN,1,[define on AIX to get certain functions])
1660 # AIX makes it fun to build shared and static libraries,
1661 # because they're *both* ".a" archive libraries. We
1662 # build the static library for the benefit of the traditional
1663 # scheme of building libpcap and tcpdump in subdirectories of
1664 # the same directory, with tcpdump statically linked with the
1665 # libpcap in question, but we also build a shared library as
1666 # "libpcap.shareda" and install *it*, rather than the static
1667 # library, as "libpcap.a".
1675 # If we're using DLPI, applications will need to
1676 # use /lib/pse.exp if present, as we use the
1679 pseexe="/lib/pse.exp"
1680 AC_MSG_CHECKING(for $pseexe)
1681 if test -f $pseexe ; then
1689 # If we're using BPF, we need "-lodm" and "-lcfg", as
1690 # we use them to load the BPF module.
1699 V_CCOPT="$V_CCOPT -fno-common"
1700 AC_ARG_ENABLE(universal,
1701 AC_HELP_STRING([--disable-universal],[don't build universal on macOS]))
1702 if test "$enable_universal" != "no"; then
1707 # Pre-Tiger. Build only for 32-bit PowerPC; no
1708 # need for any special compiler or linker flags.
1712 darwin8.[[0123]]|darwin8.[[0123]].*)
1714 # Tiger, prior to Intel support. Build
1715 # libraries and executables for 32-bit PowerPC
1716 # and 64-bit PowerPC, with 32-bit PowerPC first.
1717 # (I'm guessing that's what Apple does.)
1719 # (The double brackets are needed because
1720 # autotools/m4 use brackets as a quoting
1721 # character; the double brackets turn into
1722 # single brackets in the generated configure
1725 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
1726 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
1727 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
1728 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
1731 darwin8.[[456]]|darwin.[[456]].*)
1733 # Tiger, subsequent to Intel support but prior
1734 # to x86-64 support. Build libraries and
1735 # executables for 32-bit PowerPC, 64-bit
1736 # PowerPC, and 32-bit x86, with 32-bit PowerPC
1737 # first. (I'm guessing that's what Apple does.)
1739 # (The double brackets are needed because
1740 # autotools/m4 use brackets as a quoting
1741 # character; the double brackets turn into
1742 # single brackets in the generated configure
1745 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
1746 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
1747 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
1748 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
1753 # All other Tiger, so subsequent to x86-64
1754 # support. Build libraries and executables for
1755 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
1756 # and x86-64, with 32-bit PowerPC first. (I'm
1757 # guessing that's what Apple does.)
1759 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
1760 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
1761 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
1762 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
1767 # Leopard. Build libraries for 32-bit PowerPC,
1768 # 64-bit PowerPC, 32-bit x86, and x86-64, with
1769 # 32-bit PowerPC first, and build executables
1770 # for 32-bit x86 and 32-bit PowerPC, with 32-bit
1771 # x86 first. (That's what Apple does.)
1773 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
1774 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
1775 V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
1776 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
1781 # Snow Leopard. Build libraries for x86-64,
1782 # 32-bit x86, and 32-bit PowerPC, with x86-64
1783 # first, and build executables for x86-64 and
1784 # 32-bit x86, with x86-64 first. (That's what
1785 # Apple does, even though Snow Leopard doesn't
1786 # run on PPC, so PPC libpcap runs under Rosetta,
1787 # and Rosetta doesn't support BPF ioctls, so PPC
1788 # programs can't do live captures.)
1790 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
1791 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
1792 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
1793 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
1798 # Post-Snow Leopard. Build libraries for x86-64
1799 # and 32-bit x86, with x86-64 first, and build
1800 # executables only for x86-64. (That's what
1801 # Apple does.) This requires no special flags
1803 # XXX - update if and when Apple drops support
1804 # for 32-bit x86 code and if and when Apple adds
1805 # ARM-based Macs. (You're on your own for iOS
1808 # XXX - check whether we *can* build for
1809 # i386 and, if not, suggest that the user
1810 # install the /usr/include headers if they
1811 # want to build fat.
1813 AC_MSG_CHECKING(whether building for 32-bit x86 is supported)
1814 save_CFLAGS="$CFLAGS"
1815 CFLAGS="$CFLAGS -arch i386"
1821 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386"
1822 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386"
1826 V_LIB_CCOPT_FAT="-arch x86_64"
1827 V_LIB_LDFLAGS_FAT="-arch x86_64"
1832 # Mojave; you need to install the
1833 # /usr/include headers to get
1834 # 32-bit x86 builds to work.
1836 AC_MSG_WARN([Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package])
1841 # Pre-Mojave; the command-line
1842 # tools should be sufficient to
1843 # enable 32-bit x86 builds.
1845 AC_MSG_WARN([Compiling for 32-bit x86 gives an error; try installing the command-line tools])
1849 CFLAGS="$save_CFLAGS"
1856 AC_DEFINE(HAVE_HPUX9,1,[on HP-UX 9.x])
1859 # Use System V conventions for man pages.
1861 MAN_ADMIN_COMMANDS=1m
1869 # Use System V conventions for man pages.
1871 MAN_ADMIN_COMMANDS=1m
1879 # Use System V conventions for man pages.
1881 MAN_ADMIN_COMMANDS=1m
1887 dnl HPUX 10.20 and above is similar to HPUX 9, but
1888 dnl not the same....
1890 dnl XXX - DYEXT should be set to "sl" if this is building
1891 dnl for 32-bit PA-RISC, but should be left as "so" for
1892 dnl 64-bit PA-RISC or, I suspect, IA-64.
1893 AC_DEFINE(HAVE_HPUX10_20_OR_LATER,1,[on HP-UX 10.20 or later])
1894 if test "`uname -m`" = "ia64"; then
1901 # "-b" builds a shared library; "+h" sets the soname.
1907 # Use System V conventions for man pages.
1915 # Use IRIX conventions for man pages; they're the same as the
1916 # System V conventions, except that they use section 8 for
1917 # administrative commands and daemons.
1923 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|midipix*)
1927 # Compiler assumed to be GCC; run-time linker may require a -R
1930 if test "$libdir" != "/usr/lib"; then
1931 V_RFLAGS=-Wl,-R$libdir
1939 # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
1940 # Use Tru64 UNIX conventions for man pages; they're the same as
1941 # the System V conventions except that they use section 8 for
1942 # administrative commands and daemons.
1950 AC_MSG_CHECKING(if SINIX compiler defines sinix)
1951 AC_CACHE_VAL(ac_cv_cc_sinix_defined,
1955 ac_cv_cc_sinix_defined=yes,
1956 ac_cv_cc_sinix_defined=no))
1957 AC_MSG_RESULT($ac_cv_cc_sinix_defined)
1958 if test $ac_cv_cc_sinix_defined = no ; then
1959 AC_DEFINE(sinix,1,[on sinix])
1964 AC_DEFINE(HAVE_SOLARIS,1,[On solaris])
1969 # Make sure errno is thread-safe, in case we're called in
1970 # a multithreaded program. We don't guarantee that two
1971 # threads can use the *same* pcap_t safely, but the
1972 # current version does guarantee that you can use different
1973 # pcap_t's in different threads, and even that pcap_compile()
1974 # is thread-safe (it wasn't thread-safe in some older versions).
1976 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
1978 case "`uname -r`" in
1985 # Use System V conventions for man pages.
1987 MAN_ADMIN_COMMANDS=1m
1995 AC_ARG_ENABLE(shared,
1996 AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=yes, if support available@:>@]))
1997 test "x$enable_shared" = "xno" && DYEXT="none"
2000 AC_CHECK_TOOL([AR], [ar])
2005 AC_LBL_DEVEL(V_CCOPT)
2008 # Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
2010 AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,
2012 #include <sys/types.h>
2013 #include <sys/socket.h>
2017 # Check to see if there's a sockaddr_storage structure.
2019 AC_CHECK_TYPES(struct sockaddr_storage,,,
2021 #include <sys/types.h>
2022 #include <sys/socket.h>
2026 # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
2027 # dl_module_id_1 member.
2029 # NOTE: any failure means we conclude that it doesn't have that member,
2030 # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
2031 # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
2032 # it doesn't have that member (which is OK, as either we won't be
2033 # using code that would use that member, or we wouldn't compile in
2036 AC_CHECK_MEMBERS([dl_hp_ppa_info_t.dl_module_id_1],,,
2038 #include <sys/types.h>
2039 #include <sys/dlpi.h>
2040 #include <sys/dlpi_ext.h>
2043 AC_LBL_UNALIGNED_ACCESS
2046 AC_SUBST(V_LIB_CCOPT_FAT)
2047 AC_SUBST(V_LIB_LDFLAGS_FAT)
2048 AC_SUBST(V_PROG_CCOPT_FAT)
2049 AC_SUBST(V_PROG_LDFLAGS_FAT)
2051 AC_SUBST(V_FINDALLDEVS)
2055 AC_SUBST(V_SHLIB_CCOPT)
2056 AC_SUBST(V_SHLIB_CMD)
2057 AC_SUBST(V_SHLIB_OPT)
2058 AC_SUBST(V_SONAME_OPT)
2059 AC_SUBST(V_RPATH_OPT)
2062 AC_SUBST(ADDLARCHIVEOBJS)
2065 AC_SUBST(MAN_DEVICES)
2066 AC_SUBST(MAN_FILE_FORMATS)
2067 AC_SUBST(MAN_MISC_INFO)
2068 AC_SUBST(MAN_ADMIN_COMMANDS)
2069 AC_SUBST(PTHREAD_LIBS)
2070 AC_SUBST(BUILD_RPCAPD)
2071 AC_SUBST(INSTALL_RPCAPD)
2072 AC_SUBST(RPCAPD_LIBS)
2073 AC_SUBST(EXTRA_NETWORK_LIBS)
2075 AC_ARG_ENABLE([usb],
2076 [AC_HELP_STRING([--enable-usb],[enable USB capture support @<:@default=yes, if support available@:>@])],
2080 if test "xxx_only" = yes; then
2081 # User requested something-else-only pcap, so they don't
2086 if test "x$enable_usb" != "xno" ; then
2087 dnl check for USB sniffing support
2088 AC_MSG_CHECKING(for USB sniffing support)
2091 AC_DEFINE(PCAP_SUPPORT_USB, 1, [target host supports USB sniffing])
2092 USB_SRC=pcap-usb-linux.c
2094 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
2095 if test $? -ne 0 ; then
2096 ac_usb_dev_name="usbmon"
2098 AC_DEFINE_UNQUOTED(LINUX_USB_MON_DEV, "/dev/$ac_usb_dev_name", [path for device for USB sniffing])
2099 AC_MSG_NOTICE(Device for USB sniffing is /dev/$ac_usb_dev_name)
2101 # Do we have a version of <linux/compiler.h> available?
2102 # If so, we might need it for <linux/usbdevice_fs.h>.
2104 AC_CHECK_HEADERS(linux/compiler.h)
2105 if test "$ac_cv_header_linux_compiler_h" = yes; then
2107 # Yes - include it when testing for <linux/usbdevice_fs.h>.
2109 AC_CHECK_HEADERS(linux/usbdevice_fs.h,,,[#include <linux/compiler.h>])
2111 AC_CHECK_HEADERS(linux/usbdevice_fs.h)
2113 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
2115 # OK, does it define bRequestType? Older versions of the kernel
2116 # define fields with names like "requesttype, "request", and
2117 # "value", rather than "bRequestType", "bRequest", and
2120 AC_CHECK_MEMBERS([struct usbdevfs_ctrltransfer.bRequestType],,,
2123 #ifdef HAVE_LINUX_COMPILER_H
2124 #include <linux/compiler.h>
2126 #include <linux/usbdevice_fs.h>
2132 # This just uses BPF in FreeBSD 8.4 and later; we don't need
2133 # to check for anything special for capturing.
2135 AC_MSG_RESULT([yes, in FreeBSD 8.4 and later])
2143 AC_SUBST(PCAP_SUPPORT_USB)
2146 dnl check for netfilter sniffing support
2147 if test "xxx_only" != yes; then
2148 AC_MSG_CHECKING(whether the platform could support netfilter sniffing)
2153 # Life's too short to deal with trying to get this to compile
2154 # if you don't get the right types defined with
2155 # __KERNEL_STRICT_NAMES getting defined by some other include.
2157 # Check whether the includes Just Work. If not, don't turn on
2158 # netfilter support.
2160 AC_MSG_CHECKING(whether we can compile the netfilter support)
2161 AC_CACHE_VAL(ac_cv_netfilter_can_compile,
2164 #include <sys/socket.h>
2165 #include <netinet/in.h>
2166 #include <linux/types.h>
2168 #include <linux/netlink.h>
2169 #include <linux/netfilter.h>
2170 #include <linux/netfilter/nfnetlink.h>
2171 #include <linux/netfilter/nfnetlink_log.h>
2172 #include <linux/netfilter/nfnetlink_queue.h>],
2174 ac_cv_netfilter_can_compile=yes,
2175 ac_cv_netfilter_can_compile=no))
2176 AC_MSG_RESULT($ac_cv_netfilter_can_compile)
2177 if test $ac_cv_netfilter_can_compile = yes ; then
2178 AC_DEFINE(PCAP_SUPPORT_NETFILTER, 1,
2179 [target host supports netfilter sniffing])
2180 NETFILTER_SRC=pcap-netfilter-linux.c
2188 AC_SUBST(PCAP_SUPPORT_NETFILTER)
2189 AC_SUBST(NETFILTER_SRC)
2191 AC_ARG_ENABLE([netmap],
2192 [AC_HELP_STRING([--enable-netmap],[enable netmap support @<:@default=yes, if support available@:>@])],
2194 [enable_netmap=yes])
2196 if test "x$enable_netmap" != "xno" ; then
2198 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
2199 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
2200 # is defined, for example, as it includes a non-existent malloc.h
2203 AC_MSG_CHECKING(whether we can compile the netmap support)
2204 AC_CACHE_VAL(ac_cv_net_netmap_user_can_compile,
2207 #define NETMAP_WITH_LIBS
2208 #include <net/netmap_user.h>],
2210 ac_cv_net_netmap_user_can_compile=yes,
2211 ac_cv_net_netmap_user_can_compile=no))
2212 AC_MSG_RESULT($ac_cv_net_netmap_user_can_compile)
2213 if test $ac_cv_net_netmap_user_can_compile = yes ; then
2214 AC_DEFINE(PCAP_SUPPORT_NETMAP, 1,
2215 [target host supports netmap])
2216 NETMAP_SRC=pcap-netmap.c
2218 AC_SUBST(PCAP_SUPPORT_NETMAP)
2219 AC_SUBST(NETMAP_SRC)
2223 AC_ARG_ENABLE([bluetooth],
2224 [AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=yes, if support available@:>@])],
2226 [enable_bluetooth=ifsupportavailable])
2228 if test "xxx_only" = yes; then
2229 # User requested something-else-only pcap, so they don't
2230 # want Bluetooth support.
2234 if test "x$enable_bluetooth" != "xno" ; then
2235 dnl check for Bluetooth sniffing support
2238 AC_CHECK_HEADER(bluetooth/bluetooth.h,
2241 # We have bluetooth.h, so we support Bluetooth
2244 AC_DEFINE(PCAP_SUPPORT_BT, 1, [target host supports Bluetooth sniffing])
2245 BT_SRC=pcap-bt-linux.c
2246 AC_MSG_NOTICE(Bluetooth sniffing is supported)
2247 ac_lbl_bluetooth_available=yes
2250 # OK, does struct sockaddr_hci have an hci_channel
2253 AC_CHECK_MEMBERS([struct sockaddr_hci.hci_channel],
2256 # Yes; is HCI_CHANNEL_MONITOR defined?
2258 AC_MSG_CHECKING(if HCI_CHANNEL_MONITOR is defined)
2259 AC_CACHE_VAL(ac_cv_lbl_hci_channel_monitor_is_defined,
2262 #include <bluetooth/bluetooth.h>
2263 #include <bluetooth/hci.h>
2266 u_int i = HCI_CHANNEL_MONITOR;
2270 AC_DEFINE(PCAP_SUPPORT_BT_MONITOR,,
2271 [target host supports Bluetooth Monitor])
2272 BT_MONITOR_SRC=pcap-bt-monitor-linux.c
2279 #include <bluetooth/bluetooth.h>
2280 #include <bluetooth/hci.h>
2285 # We don't have bluetooth.h, so we don't support
2286 # Bluetooth sniffing.
2288 if test "x$enable_bluetooth" = "xyes" ; then
2289 AC_MSG_ERROR(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
2291 AC_MSG_NOTICE(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
2296 if test "x$enable_bluetooth" = "xyes" ; then
2297 AC_MSG_ERROR(no Bluetooth sniffing support implemented for $host_os)
2299 AC_MSG_NOTICE(no Bluetooth sniffing support implemented for $host_os)
2303 AC_SUBST(PCAP_SUPPORT_BT)
2305 AC_SUBST(BT_MONITOR_SRC)
2308 AC_ARG_ENABLE([dbus],
2309 [AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=yes, if support available@:>@])],
2311 [enable_dbus=ifavailable])
2313 if test "xxx_only" = yes; then
2314 # User requested something-else-only pcap, so they don't
2315 # want D-Bus support.
2319 if test "x$enable_dbus" != "xno"; then
2320 if test "x$enable_dbus" = "xyes"; then
2325 # We don't support D-Bus sniffing on macOS; see
2327 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
2329 # The user requested it, so fail.
2331 AC_MSG_ERROR([Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS])
2338 # We don't support D-Bus sniffing on macOS; see
2340 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
2342 # The user dind't explicitly request it, so just
2343 # silently refuse to enable it.
2351 if test "x$enable_dbus" != "xno"; then
2352 AC_CHECK_PROG([PKGCONFIG], [pkg-config], [pkg-config], [no])
2353 if test "x$PKGCONFIG" != "xno"; then
2354 AC_MSG_CHECKING([for D-Bus])
2355 if "$PKGCONFIG" dbus-1; then
2356 AC_MSG_RESULT([yes])
2357 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
2358 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
2359 save_CFLAGS="$CFLAGS"
2361 CFLAGS="$CFLAGS $DBUS_CFLAGS"
2362 LIBS="$LIBS $DBUS_LIBS"
2363 AC_MSG_CHECKING(whether the D-Bus library defines dbus_connection_read_write)
2365 [#include <string.h>
2368 #include <sys/time.h>
2370 #include <dbus/dbus.h>],
2371 [return dbus_connection_read_write(NULL, 0);],
2373 AC_MSG_RESULT([yes])
2374 AC_DEFINE(PCAP_SUPPORT_DBUS, 1, [support D-Bus sniffing])
2375 DBUS_SRC=pcap-dbus.c
2376 V_INCLS="$V_INCLS $DBUS_CFLAGS"
2380 if test "x$enable_dbus" = "xyes"; then
2381 AC_MSG_ERROR([--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()])
2385 CFLAGS="$save_CFLAGS"
2388 if test "x$enable_dbus" = "xyes"; then
2389 AC_MSG_ERROR([--enable-dbus was given, but the dbus-1 package is not installed])
2393 AC_SUBST(PCAP_SUPPORT_DBUS)
2397 AC_ARG_ENABLE([rdma],
2398 [AC_HELP_STRING([--enable-rdma],[enable RDMA capture support @<:@default=yes, if support available@:>@])],
2400 [enable_rdma=ifavailable])
2402 if test "xxx_only" = yes; then
2403 # User requested something-else-only pcap, so they don't
2404 # want RDMA support.
2408 if test "x$enable_rdma" != "xno"; then
2409 AC_CHECK_LIB(ibverbs, ibv_get_device_list, [
2410 AC_CHECK_HEADER(infiniband/verbs.h, [
2412 # ibv_create_flow may be defined as a static inline
2413 # function in infiniband/verbs.h, so we can't
2416 # Too bad autoconf has no AC_SYMBOL_EXISTS()
2417 # macro that works like CMake's check_symbol_exists()
2418 # function, to check do a compile check like
2419 # this (they do a clever trick to avoid having
2420 # to know the function's signature).
2422 AC_MSG_CHECKING(whether libibverbs defines ibv_create_flow)
2425 #include <infiniband/verbs.h>
2428 (void) ibv_create_flow((struct ibv_qp *) NULL,
2429 (struct ibv_flow_attr *) NULL);
2432 AC_MSG_RESULT([yes])
2433 AC_DEFINE(PCAP_SUPPORT_RDMASNIFF, , [target host supports RDMA sniffing])
2434 RDMA_SRC=pcap-rdmasniff.c
2435 LIBS="-libverbs $LIBS"
2443 AC_SUBST(PCAP_SUPPORT_RDMASNIFF)
2449 AC_CONFIG_HEADER(config.h)
2451 AC_OUTPUT_COMMANDS([if test -f .devel; then
2452 echo timestamp > stamp-h
2453 cat $srcdir/Makefile-devel-adds >> Makefile
2456 AC_OUTPUT(Makefile pcap-filter.manmisc pcap-linktype.manmisc
2457 pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap
2458 pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap
2459 pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap
2460 pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap
2461 pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap
2462 pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap
2463 rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile