]> The Tcpdump Group git mirrors - libpcap/blob - configure.ac
Don't test for capture devices, test for header files.
[libpcap] / configure.ac
1 dnl
2 dnl Copyright (c) 1994, 1995, 1996, 1997
3 dnl The Regents of the University of California. All rights reserved.
4 dnl
5 dnl Process this file with autoconf to produce a configure script.
6 dnl
7
8 #
9 # See
10 #
11 # http://ftp.gnu.org/gnu/config/README
12 #
13 # for the URLs to use to fetch new versions of config.guess and
14 # config.sub.
15 #
16
17 AC_PREREQ(2.61)
18 AC_INIT(pcap.c)
19
20 AC_CANONICAL_SYSTEM
21
22 AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
23 AC_PROG_CC
24 AC_LBL_C_INIT(V_CCOPT, V_INCLS)
25 AC_LBL_SHLIBS_INIT
26 AC_LBL_C_INLINE
27 AC_C___ATTRIBUTE__
28 if test "$ac_cv___attribute__" = "yes"; then
29 AC_C___ATTRIBUTE___UNUSED
30 fi
31
32 #
33 # Try to arrange for large file support.
34 #
35 AC_SYS_LARGEFILE
36 AC_FUNC_FSEEKO
37
38 dnl
39 dnl Even if <net/bpf.h> were, on all OSes that support BPF, fixed to
40 dnl include <sys/ioccom.h>, and we were to drop support for older
41 dnl releases without that fix, so that pcap-bpf.c doesn't need to
42 dnl include <sys/ioccom.h>, the test program in "AC_LBL_FIXINCLUDES"
43 dnl in "aclocal.m4" uses it, so we would still have to test for it
44 dnl and set "HAVE_SYS_IOCCOM_H" if we have it, otherwise
45 dnl "AC_LBL_FIXINCLUDES" wouldn't work on some platforms such as Solaris.
46 dnl
47 AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h limits.h)
48 AC_CHECK_HEADERS(netpacket/packet.h)
49 AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
50 #include <sys/socket.h>
51 #include <net/if.h>])
52 if test "$ac_cv_header_net_pfvar_h" = yes; then
53 #
54 # Check for various PF actions.
55 #
56 AC_MSG_CHECKING(whether net/pfvar.h defines PF_NAT through PF_NORDR)
57 AC_TRY_COMPILE(
58 [#include <sys/types.h>
59 #include <sys/socket.h>
60 #include <net/if.h>
61 #include <net/pfvar.h>],
62 [return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;],
63 [
64 AC_MSG_RESULT(yes)
65 AC_DEFINE(HAVE_PF_NAT_THROUGH_PF_NORDR, 1,
66 [define if net/pfvar.h defines PF_NAT through PF_NORDR])
67 ],
68 AC_MSG_RESULT(no))
69 fi
70 AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
71 #include <sys/socket.h>])
72 if test "$ac_cv_header_netinet_if_ether_h" != yes; then
73 #
74 # The simple test didn't work.
75 # Do we need to include <net/if.h> first?
76 # Unset ac_cv_header_netinet_if_ether_h so we don't
77 # treat the previous failure as a cached value and
78 # suppress the next test.
79 #
80 AC_MSG_NOTICE([Rechecking with some additional includes])
81 unset ac_cv_header_netinet_if_ether_h
82 AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
83 #include <sys/socket.h>
84 #include <netinet/in.h>
85 struct mbuf;
86 struct rtentry;
87 #include <net/if.h>])
88 fi
89
90 case "$host_os" in
91 linux*|uclinux*)
92 AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,,
93 [
94 #include <sys/socket.h>
95 #include <linux/if.h>
96 ])
97 ;;
98 esac
99
100 AC_LBL_FIXINCLUDES
101
102 AC_CHECK_FUNCS(strerror strlcpy strlcat)
103
104 needsnprintf=no
105 AC_CHECK_FUNCS(vsnprintf snprintf,,
106 [needsnprintf=yes])
107 if test $needsnprintf = yes; then
108 AC_LIBOBJ([snprintf])
109 fi
110
111 needstrtok_r=no
112 AC_CHECK_FUNCS(strtok_r,,
113 [needstrtok_r=yes])
114 if test $needstrtok_r = yes; then
115 AC_LIBOBJ([strtok_r])
116 fi
117
118 #
119 # Do this before checking for ether_hostton(), as it's a
120 # "gethostbyname() -ish function".
121 #
122 AC_LBL_LIBRARY_NET
123
124 #
125 # You are in a twisty little maze of UN*Xes, all different.
126 # Some might not have ether_hostton().
127 # Some might have it, but not declare it in any header file.
128 # Some might have it, but declare it in <netinet/if_ether.h>.
129 # Some might have it, but declare it in <netinet/ether.h>
130 # (And some might have it but document it as something declared in
131 # <netinet/ethernet.h>, although <netinet/if_ether.h> appears to work.)
132 #
133 # Before you is a C compiler.
134 #
135 AC_CHECK_FUNCS(ether_hostton)
136 if test "$ac_cv_func_ether_hostton" = yes; then
137 #
138 # OK, we have ether_hostton(). Do we have <netinet/if_ether.h>?
139 #
140 if test "$ac_cv_header_netinet_if_ether_h" = yes; then
141 #
142 # Yes. Does it declare ether_hostton()?
143 #
144 AC_CHECK_DECL(ether_hostton,
145 [
146 AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON,,
147 [Define to 1 if netinet/if_ether.h declares `ether_hostton'])
148 ],,
149 [
150 #include <sys/types.h>
151 #include <sys/socket.h>
152 #include <netinet/in.h>
153 #include <arpa/inet.h>
154 struct mbuf;
155 struct rtentry;
156 #include <net/if.h>
157 #include <netinet/if_ether.h>
158 ])
159 fi
160 #
161 # Did that succeed?
162 #
163 if test "$ac_cv_have_decl_ether_hostton" != yes; then
164 #
165 # No, how about <netinet/ether.h>, as on Linux?
166 #
167 AC_CHECK_HEADERS(netinet/ether.h)
168 if test "$ac_cv_header_netinet_ether_h" = yes; then
169 #
170 # We have it - does it declare ether_hostton()?
171 # Unset ac_cv_have_decl_ether_hostton so we don't
172 # treat the previous failure as a cached value and
173 # suppress the next test.
174 #
175 unset ac_cv_have_decl_ether_hostton
176 AC_CHECK_DECL(ether_hostton,
177 [
178 AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_HOSTTON,,
179 [Define to 1 if netinet/ether.h declares `ether_hostton'])
180 ],,
181 [
182 #include <netinet/ether.h>
183 ])
184 fi
185 fi
186 #
187 # Is ether_hostton() declared?
188 #
189 if test "$ac_cv_have_decl_ether_hostton" != yes; then
190 #
191 # No, we'll have to declare it ourselves.
192 # Do we have "struct ether_addr"?
193 #
194 AC_CHECK_TYPES(struct ether_addr,,,
195 [
196 #include <sys/types.h>
197 #include <sys/socket.h>
198 #include <netinet/in.h>
199 #include <arpa/inet.h>
200 struct mbuf;
201 struct rtentry;
202 #include <net/if.h>
203 #include <netinet/if_ether.h>
204 ])
205 AC_DEFINE(HAVE_DECL_ETHER_HOSTTON, 0,
206 [Define to 1 if you have the declaration of `ether_hostton', and to 0 if you
207 don't.])
208 else
209 AC_DEFINE(HAVE_DECL_ETHER_HOSTTON, 1,
210 [Define to 1 if you have the declaration of `ether_hostton', and to 0 if you
211 don't.])
212 fi
213 fi
214
215 dnl to pacify those who hate protochain insn
216 AC_MSG_CHECKING(if --disable-protochain option is specified)
217 AC_ARG_ENABLE(protochain,
218 AC_HELP_STRING([--disable-protochain],[disable \"protochain\" insn]))
219 case "x$enable_protochain" in
220 xyes) enable_protochain=enabled ;;
221 xno) enable_protochain=disabled ;;
222 x) enable_protochain=enabled ;;
223 esac
224
225 if test "$enable_protochain" = "disabled"; then
226 AC_DEFINE(NO_PROTOCHAIN,1,[do not use protochain])
227 fi
228 AC_MSG_RESULT(${enable_protochain})
229
230 #
231 # valgrindtest directly uses the native capture mechanism, but
232 # only tests with BPF and PF_PACKET sockets; only enable it if
233 # we have BPF or PF_PACKET sockets.
234 #
235 VALGRINDTEST=
236
237 #
238 # SITA support is mutually exclusive with native capture support;
239 # "--with-sita" selects SITA support.
240 #
241 AC_ARG_WITH(sita,
242 AC_HELP_STRING([--with-sita],[include SITA support]),
243 [
244 if test ! "x$withval" = "xno" ; then
245 AC_DEFINE(SITA,1,[include ACN support])
246 AC_MSG_NOTICE(Enabling SITA ACN support)
247 V_PCAP=sita
248 fi
249 ],
250 [
251 dnl
252 dnl Not all versions of test support -c (character special) but it's a
253 dnl better way of testing since the device might be protected. So we
254 dnl check in our normal order using -r and then check the for the /dev
255 dnl guys again using -c.
256 dnl
257 dnl XXX This could be done for cross-compiling, but for now it's not.
258 dnl
259 if test -z "$with_pcap" && test "$cross_compiling" = yes; then
260 AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...)
261 fi
262 AC_ARG_WITH(pcap,
263 AC_HELP_STRING([--with-pcap=TYPE],[use packet capture TYPE]))
264 if test ! -z "$with_pcap" ; then
265 V_PCAP="$withval"
266 else
267 #
268 # Check for a bunch of headers for various packet
269 # capture mechanisms.
270 #
271 AC_CHECK_HEADERS(net/bpf.h net/pfilt.h net/enet.h)
272 AC_CHECK_HEADERS(net/nit.h sys/net/nit.h)
273 AC_CHECK_HEADERS(linux/socket.h net/raw.h sys/dlpi.h)
274
275 if test "$ac_cv_header_net_bpf_h" = yes; then
276 #
277 # BPF.
278 # Check this before DLPI, so that we pick BPF on
279 # Solaris 11 and later.
280 #
281 V_PCAP=bpf
282
283 #
284 # We have BPF, so build valgrindtest with "make test"
285 # on macOS, FreeBSD, and Linux (add your OS once
286 # there's a valgrind for it).
287 #
288 case "$host_os" in
289
290 freebsd*|darwin*|linux*)
291 VALGRINDTEST=valgrindtest
292 ;;
293 esac
294 elif test "$ac_cv_header_net_pfilt_h" = yes; then
295 #
296 # DEC OSF/1, Digital UNIX, Tru64 UNIX
297 #
298 V_PCAP=pf
299 elif test "$ac_cv_header_net_enet_h" = yes; then
300 #
301 # Stanford Enetfilter.
302 #
303 V_PCAP=enet
304 elif test "$ac_header_net_nit_h" = yes; then
305 #
306 # SunOS 4.x STREAMS NIT.
307 #
308 V_PCAP=snit
309 elif test "$ac_header_sys_net_nit_h" = yes; then
310 #
311 # Pre-SunOS 4.x non-STREAMS NIT.
312 #
313 V_PCAP=nit
314 elif test "$ac_header_linux_socket_h" = yes; then
315 #
316 # No prizes for guessing this one.
317 #
318 V_PCAP=linux
319
320 #
321 # XXX - this won't work with older kernels that have
322 # SOCK_PACKET sockets but not PF_PACKET sockets.
323 #
324 VALGRINDTEST=valgrindtest
325 elif test "$ac_header_net_raw_h" = yes; then
326 #
327 # IRIX snoop.
328 #
329 V_PCAP=snoop
330 elif test "$ac_header_sys_dlpi_h" = yes; then
331 #
332 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
333 #
334 V_PCAP=dlpi
335 else
336 #
337 # Nothing we support.
338 #
339 V_PCAP=null
340 fi
341 fi
342 AC_MSG_CHECKING(packet capture type)
343 AC_MSG_RESULT($V_PCAP)
344 AC_SUBST(VALGRINDTEST)
345
346 #
347 # Do capture-mechanism-dependent tests.
348 #
349 case "$V_PCAP" in
350 dlpi)
351 #
352 # Needed for common functions used by pcap-[dlpi,libdlpi].c
353 #
354 SSRC="dlpisubs.c"
355
356 #
357 # Checks for some header files.
358 #
359 AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
360
361 #
362 # Checks to see if Solaris has the public libdlpi(3LIB) library.
363 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
364 # public libdlpi(3LIB) version. Before libdlpi was made public, a
365 # private version also existed, which did not have the same APIs.
366 # Due to a gcc bug, the default search path for 32-bit libraries does
367 # not include /lib, we add it explicitly here.
368 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
369 # Also, due to the bug above applications that link to libpcap with
370 # libdlpi will have to add "-L/lib" option to "configure".
371 #
372 saved_ldflags=$LDFLAGS
373 LDFLAGS="$LIBS -L/lib"
374 AC_CHECK_LIB(dlpi, dlpi_walk,
375 [
376 LIBS="-ldlpi $LIBS"
377 V_PCAP=libdlpi
378 AC_DEFINE(HAVE_LIBDLPI,1,[if libdlpi exists])
379 ],
380 V_PCAP=dlpi)
381 LDFLAGS=$saved_ldflags
382
383 #
384 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
385 # versions of DLPI.
386 #
387 AC_MSG_CHECKING(whether <sys/dlpi.h> is usable)
388 AC_CACHE_VAL(ac_cv_sys_dlpi_usable,
389 AC_TRY_COMPILE(
390 [
391 #include <sys/types.h>
392 #include <sys/time.h>
393 #include <sys/dlpi.h>
394 ],
395 [int i = DL_PROMISC_PHYS;],
396 ac_cv_sys_dlpi_usable=yes,
397 ac_cv_sys_dlpi_usable=no))
398 AC_MSG_RESULT($ac_cv_sys_dlpi_usable)
399 if test $ac_cv_sys_dlpi_usable = no ; then
400 AC_MSG_ERROR(<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI)
401 fi
402
403 #
404 # Check whether we have a /dev/dlpi device or have multiple devices.
405 #
406 AC_MSG_CHECKING(for /dev/dlpi device)
407 if test -c /dev/dlpi ; then
408 AC_MSG_RESULT(yes)
409 AC_DEFINE(HAVE_DEV_DLPI, 1, [define if you have a /dev/dlpi])
410 else
411 AC_MSG_RESULT(no)
412 dir="/dev/dlpi"
413 AC_MSG_CHECKING(for $dir directory)
414 if test -d $dir ; then
415 AC_MSG_RESULT(yes)
416 AC_DEFINE_UNQUOTED(PCAP_DEV_PREFIX, "$dir", [/dev/dlpi directory])
417 else
418 AC_MSG_RESULT(no)
419 fi
420 fi
421
422 #
423 # This check is for Solaris with DLPI support for passive modes.
424 # See dlpi(7P) for more details.
425 #
426 AC_LBL_DL_PASSIVE_REQ_T
427 ;;
428
429 linux)
430 #
431 # Do we have the wireless extensions?
432 #
433 AC_CHECK_HEADERS(linux/wireless.h, [], [],
434 [
435 #include <sys/socket.h>
436 #include <linux/if.h>
437 #include <linux/types.h>
438 ])
439
440 #
441 # Do we have libnl?
442 #
443 AC_ARG_WITH(libnl,
444 AC_HELP_STRING([--without-libnl],[disable libnl support @<:@default=yes, on Linux, if present@:>@]),
445 with_libnl=$withval,,)
446
447 if test x$with_libnl != xno ; then
448 have_any_nl="no"
449
450 incdir=-I/usr/include/libnl3
451 libnldir=
452 if test x$withval != x ; then
453 libnldir=-L${withval}/lib/.libs
454 incdir=-I${withval}/include
455 fi
456
457 #
458 # Try libnl 3.x first.
459 #
460 AC_CHECK_LIB(nl-3, nl_socket_alloc,
461 [
462 #
463 # Yes, we have libnl 3.x.
464 #
465 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
466 AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
467 AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x])
468 AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
469 AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
470 V_INCLS="$V_INCLS ${incdir}"
471 have_any_nl="yes"
472 ],[], ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 )
473
474 if test x$have_any_nl = xno ; then
475 #
476 # Try libnl 2.x
477 #
478 AC_CHECK_LIB(nl, nl_socket_alloc,
479 [
480 #
481 # Yes, we have libnl 2.x.
482 #
483 LIBS="${libnldir} -lnl-genl -lnl $LIBS"
484 AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
485 AC_DEFINE(HAVE_LIBNL_2_x,1,[if libnl exists and is version 2.x])
486 AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
487 AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
488 have_any_nl="yes"
489 ])
490 fi
491
492 if test x$have_any_nl = xno ; then
493 #
494 # No, we don't; do we have libnl 1.x?
495 #
496 AC_CHECK_LIB(nl, nl_handle_alloc,
497 [
498 #
499 # Yes.
500 #
501 LIBS="${libnldir} -lnl $LIBS"
502 AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
503 have_any_nl="yes"
504 ])
505 fi
506
507 if test x$have_any_nl = xno ; then
508 #
509 # No, we don't have libnl at all.
510 #
511 if test x$with_libnl = xyes ; then
512 AC_MSG_ERROR([libnl support requested but libnl not found])
513 fi
514 fi
515 fi
516
517 AC_CHECK_HEADERS(linux/ethtool.h,,,
518 [
519 AC_INCLUDES_DEFAULT
520 #include <linux/types.h>
521 ])
522 AC_LBL_TPACKET_STATS
523 AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI
524 ;;
525
526 bpf)
527 #
528 # Check whether we have the *BSD-style ioctls.
529 #
530 AC_CHECK_HEADERS(net/if_media.h)
531
532 #
533 # Check whether we have struct BPF_TIMEVAL.
534 #
535 AC_CHECK_TYPES(struct BPF_TIMEVAL,,,
536 [
537 #include <sys/types.h>
538 #include <sys/ioctl.h>
539 #ifdef HAVE_SYS_IOCCOM_H
540 #include <sys/ioccom.h>
541 #endif
542 #include <net/bpf.h>
543 ])
544 ;;
545
546 dag)
547 #
548 # --with-pcap=dag is the only way to get here, and it means
549 # "DAG support but nothing else"
550 #
551 V_DEFS="$V_DEFS -DDAG_ONLY"
552 xxx_only=yes
553 ;;
554
555 septel)
556 #
557 # --with-pcap=septel is the only way to get here, and it means
558 # "Septel support but nothing else"
559 #
560 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
561 xxx_only=yes
562 ;;
563
564 snf)
565 #
566 # --with-pcap=snf is the only way to get here, and it means
567 # "SNF support but nothing else"
568 #
569 V_DEFS="$V_DEFS -DSNF_ONLY"
570 xxx_only=yes
571 ;;
572
573 null)
574 AC_MSG_WARN(cannot determine packet capture interface)
575 AC_MSG_WARN((see the INSTALL doc for more info))
576 ;;
577
578 *)
579 AC_MSG_ERROR($V_PCAP is not a valid pcap type)
580 ;;
581 esac
582
583 dnl
584 dnl Now figure out how we get a list of interfaces and addresses,
585 dnl if we support capturing. Don't bother if we don't support
586 dnl capturing.
587 dnl
588 if test "$V_PCAP" != null
589 then
590 AC_CHECK_FUNC(getifaddrs,[
591 #
592 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
593 # as well, just in case some platform is really weird.
594 #
595 AC_CHECK_HEADER(ifaddrs.h,[
596 #
597 # We have the header, so we use "getifaddrs()" to
598 # get the list of interfaces.
599 #
600 V_FINDALLDEVS=fad-getad.c
601 ],[
602 #
603 # We don't have the header - give up.
604 # XXX - we could also fall back on some other
605 # mechanism, but, for now, this'll catch this
606 # problem so that we can at least try to figure
607 # out something to do on systems with "getifaddrs()"
608 # but without "ifaddrs.h", if there is something
609 # we can do on those systems.
610 #
611 AC_MSG_ERROR([Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>.])
612 ])
613 ],[
614 #
615 # Well, we don't have "getifaddrs()", so we have to use
616 # some other mechanism; determine what that mechanism is.
617 #
618 # The first thing we use is the type of capture mechanism,
619 # which is somewhat of a proxy for the OS we're using.
620 #
621 case "$V_PCAP" in
622
623 dlpi|libdlpi)
624 #
625 # This might be Solaris 8 or later, with
626 # SIOCGLIFCONF, or it might be some other OS
627 # or some older version of Solaris, with
628 # just SIOCGIFCONF.
629 #
630 AC_MSG_CHECKING(whether we have SIOCGLIFCONF)
631 AC_CACHE_VAL(ac_cv_lbl_have_siocglifconf,
632 AC_TRY_COMPILE(
633 [#include <sys/param.h>
634 #include <sys/file.h>
635 #include <sys/ioctl.h>
636 #include <sys/socket.h>
637 #include <sys/sockio.h>],
638 [ioctl(0, SIOCGLIFCONF, (char *)0);],
639 ac_cv_lbl_have_siocglifconf=yes,
640 ac_cv_lbl_have_siocglifconf=no))
641 AC_MSG_RESULT($ac_cv_lbl_have_siocglifconf)
642 if test $ac_cv_lbl_have_siocglifconf = yes ; then
643 V_FINDALLDEVS=fad-glifc.c
644 else
645 V_FINDALLDEVS=fad-gifc.c
646 fi
647 ;;
648
649 *)
650 #
651 # Assume we just have SIOCGIFCONF.
652 # (XXX - on at least later Linux kernels, there's
653 # another mechanism, and we should be using that
654 # instead.)
655 #
656 V_FINDALLDEVS=fad-gifc.c
657 ;;
658 esac])
659 fi
660 ])
661
662 AC_MSG_CHECKING(for socklen_t)
663 AC_TRY_COMPILE([
664 #include <sys/types.h>
665 #include <sys/socket.h>
666 ],
667 [ socklen_t x; ],
668 have_socklen_t=yes,
669 have_socklen_t=no)
670 if test "x$have_socklen_t" = "xyes"; then
671 AC_DEFINE(HAVE_SOCKLEN_T, 1, [define if socklen_t is defined])
672 fi
673 AC_MSG_RESULT($have_socklen_t)
674
675 AC_ARG_ENABLE(ipv6,
676 AC_HELP_STRING([--enable-ipv6],[build IPv6-capable version @<:@default=yes, if getaddrinfo available@:>@]),
677 [],
678 [enable_ipv6=ifavailable])
679 if test "$enable_ipv6" != "no"; then
680 AC_CHECK_FUNC(getaddrinfo,
681 [
682 AC_DEFINE(INET6,1,[IPv6])
683 ],
684 [
685 if test "$enable_ipv6" != "ifavailable"; then
686 AC_MSG_FAILURE([--enable-ipv6 was given, but getaddrinfo isn't available])
687 fi
688 ])
689 fi
690
691 AC_MSG_CHECKING(whether to build optimizer debugging code)
692 AC_ARG_ENABLE(optimizer-dbg,
693 AC_HELP_STRING([--enable-optimizer-dbg],[build optimizer debugging code]))
694 if test "$enable_optimizer_dbg" = "yes"; then
695 AC_DEFINE(BDEBUG,1,[Enable optimizer debugging])
696 fi
697 AC_MSG_RESULT(${enable_optimizer_dbg-no})
698
699 AC_MSG_CHECKING(whether to build parser debugging code)
700 AC_ARG_ENABLE(yydebug,
701 AC_HELP_STRING([--enable-yydebug],[build parser debugging code]))
702 if test "$enable_yydebug" = "yes"; then
703 AC_DEFINE(YYDEBUG,1,[Enable parser debugging])
704 fi
705 AC_MSG_RESULT(${enable_yydebug-no})
706
707 # Check for Endace DAG card support.
708 AC_ARG_WITH([dag],
709 AC_HELP_STRING([--with-dag@<:@=DIR@:>@],[include Endace DAG support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
710 [
711 if test "$withval" = no
712 then
713 # User doesn't want DAG support.
714 want_dag=no
715 elif test "$withval" = yes
716 then
717 # User wants DAG support but hasn't specified a directory.
718 want_dag=yes
719 else
720 # User wants DAG support and has specified a directory, so use the provided value.
721 want_dag=yes
722 dag_root=$withval
723 fi
724 ],[
725 if test "$V_PCAP" = dag; then
726 # User requested DAG-only libpcap, so we'd better have
727 # the DAG API.
728 want_dag=yes
729 elif test "xxx_only" = yes; then
730 # User requested something-else-only pcap, so they don't
731 # want DAG support.
732 want_dag=no
733 else
734 #
735 # Use DAG API if present, otherwise don't
736 #
737 want_dag=ifpresent
738 fi
739 ])
740
741 AC_ARG_WITH([dag-includes],
742 AC_HELP_STRING([--with-dag-includes=IDIR],[Endace DAG include directory, if not DIR/include]),
743 [
744 # User wants DAG support and has specified a header directory, so use the provided value.
745 want_dag=yes
746 dag_include_dir=$withval
747 ],[])
748
749 AC_ARG_WITH([dag-libraries],
750 AC_HELP_STRING([--with-dag-libraries=LDIR],[Endace DAG library directory, if not DIR/lib]),
751 [
752 # User wants DAG support and has specified a library directory, so use the provided value.
753 want_dag=yes
754 dag_lib_dir=$withval
755 ],[])
756
757 ac_cv_lbl_dag_api=no
758 if test "$want_dag" != no; then
759
760 AC_MSG_CHECKING([whether we have DAG API headers])
761
762 # If necessary, set default paths for DAG API headers and libraries.
763 if test -z "$dag_root"; then
764 dag_root=/usr/local
765 fi
766
767 if test -z "$dag_include_dir"; then
768 dag_include_dir="$dag_root/include"
769 fi
770
771 if test -z "$dag_lib_dir"; then
772 dag_lib_dir="$dag_root/lib"
773 fi
774
775 if test -z "$dag_tools_dir"; then
776 dag_tools_dir="$dag_root/tools"
777 fi
778
779 if test -r $dag_include_dir/dagapi.h; then
780 ac_cv_lbl_dag_api=yes
781 fi
782
783 if test "$ac_cv_lbl_dag_api" = yes; then
784 AC_MSG_RESULT([yes ($dag_include_dir)])
785
786 V_INCLS="$V_INCLS -I$dag_include_dir"
787
788 if test $V_PCAP != dag ; then
789 SSRC="$SSRC pcap-dag.c"
790 fi
791
792 # See if we can find a general version string.
793 # Don't need to save and restore LIBS to prevent -ldag being
794 # included if there's a found-action (arg 3).
795 saved_ldflags=$LDFLAGS
796 LDFLAGS="-L$dag_lib_dir"
797 AC_CHECK_LIB([dag], [dag_attach_stream64], [dag_large_streams="1"], [dag_large_streams="0"])
798 AC_CHECK_LIB([dag],[dag_get_erf_types], [
799 AC_DEFINE(HAVE_DAG_GET_ERF_TYPES, 1, [define if you have dag_get_erf_types()])])
800 AC_CHECK_LIB([dag],[dag_get_stream_erf_types], [
801 AC_DEFINE(HAVE_DAG_GET_STREAM_ERF_TYPES, 1, [define if you have dag_get_stream_erf_types()])])
802
803 LDFLAGS=$saved_ldflags
804
805 if test "$dag_large_streams" = 1; then
806 AC_DEFINE(HAVE_DAG_LARGE_STREAMS_API, 1, [define if you have large streams capable DAG API])
807 LIBS="$LIBS -ldag"
808 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
809
810 AC_CHECK_LIB([vdag],[vdag_set_device_info], [ac_dag_have_vdag="1"], [ac_dag_have_vdag="0"])
811 if test "$ac_dag_have_vdag" = 1; then
812 AC_DEFINE(HAVE_DAG_VDAG, 1, [define if you have vdag_set_device_info()])
813 LIBS="$LIBS -lpthread"
814 fi
815 fi
816
817 AC_DEFINE(HAVE_DAG_API, 1, [define if you have the DAG API])
818 else
819 AC_MSG_RESULT(no)
820
821 if test "$V_PCAP" = dag; then
822 # User requested "dag" capture type but we couldn't
823 # find the DAG API support.
824 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])
825 fi
826
827 if test "$want_dag" = yes; then
828 # User wanted DAG support but we couldn't find it.
829 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])
830 fi
831 fi
832 fi
833
834 AC_ARG_WITH(septel,
835 AC_HELP_STRING([--with-septel@<:@=DIR@:>@],[include Septel support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
836 [
837 if test "$withval" = no
838 then
839 want_septel=no
840 elif test "$withval" = yes
841 then
842 want_septel=yes
843 septel_root=
844 else
845 want_septel=yes
846 septel_root=$withval
847 fi
848 ],[
849 if test "$V_PCAP" = septel; then
850 # User requested Septel-only libpcap, so we'd better have
851 # the Septel API.
852 want_septel=yes
853 elif test "xxx_only" = yes; then
854 # User requested something-else-only pcap, so they don't
855 # want Septel support.
856 want_septel=no
857 else
858 #
859 # Use Septel API if present, otherwise don't
860 #
861 want_septel=ifpresent
862 fi
863 ])
864
865 ac_cv_lbl_septel_api=no
866 if test "$with_septel" != no; then
867
868 AC_MSG_CHECKING([whether we have Septel API headers])
869
870 # If necessary, set default paths for Septel API headers and libraries.
871 if test -z "$septel_root"; then
872 septel_root=$srcdir/../septel
873 fi
874
875 septel_tools_dir="$septel_root"
876 septel_include_dir="$septel_root/INC"
877
878 if test -r "$septel_include_dir/msg.h"; then
879 ac_cv_lbl_septel_api=yes
880 fi
881
882 if test "$ac_cv_lbl_septel_api" = yes; then
883 AC_MSG_RESULT([yes ($septel_include_dir)])
884
885 V_INCLS="$V_INCLS -I$septel_include_dir"
886 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"
887 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"
888
889 if test "$V_PCAP" != septel ; then
890 SSRC="$SSRC pcap-septel.c"
891 fi
892
893 AC_DEFINE(HAVE_SEPTEL_API, 1, [define if you have the Septel API])
894 else
895 AC_MSG_RESULT(no)
896
897 if test "$V_PCAP" = septel; then
898 # User requested "septel" capture type but
899 # we couldn't find the Septel API support.
900 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])
901 fi
902
903 if test "$want_septel" = yes; then
904 # User wanted Septel support but we couldn't find it.
905 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])
906 fi
907 fi
908 fi
909
910 # Check for Myricom SNF support.
911 AC_ARG_WITH([snf],
912 AC_HELP_STRING([--with-snf@<:@=DIR@:>@],[include Myricom SNF support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
913 [
914 if test "$withval" = no
915 then
916 # User explicitly doesn't want SNF
917 want_snf=no
918 elif test "$withval" = yes
919 then
920 # User wants SNF support but hasn't specified a directory.
921 want_snf=yes
922 else
923 # User wants SNF support with a specified directory.
924 want_snf=yes
925 snf_root=$withval
926 fi
927 ],[
928 if test "$V_PCAP" = snf; then
929 # User requested Sniffer-only libpcap, so we'd better have
930 # the Sniffer API.
931 want_snf=yes
932 elif test "xxx_only" = yes; then
933 # User requested something-else-only pcap, so they don't
934 # want SNF support.
935 want_snf=no
936 else
937 #
938 # Use Sniffer API if present, otherwise don't
939 #
940 want_snf=ifpresent
941 fi
942 ])
943
944 AC_ARG_WITH([snf-includes],
945 AC_HELP_STRING([--with-snf-includes=IDIR],[Myricom SNF include directory, if not DIR/include]),
946 [
947 # User wants SNF with specific header directory
948 want_snf=yes
949 snf_include_dir=$withval
950 ],[])
951
952 AC_ARG_WITH([snf-libraries],
953 AC_HELP_STRING([--with-snf-libraries=LDIR],[Myricom SNF library directory, if not DIR/lib]),
954 [
955 # User wants SNF with specific lib directory
956 want_snf=yes
957 snf_lib_dir=$withval
958 ],[])
959
960 ac_cv_lbl_snf_api=no
961 if test "$with_snf" != no; then
962
963 AC_MSG_CHECKING(whether we have Myricom Sniffer API)
964
965 # If necessary, set default paths for Sniffer headers and libraries.
966 if test -z "$snf_root"; then
967 snf_root=/opt/snf
968 fi
969
970 if test -z "$snf_include_dir"; then
971 snf_include_dir="$snf_root/include"
972 fi
973
974 if test -z "$snf_lib_dir"; then
975 snf_lib_dir="$snf_root/lib"
976 fi
977
978 if test -f "$snf_include_dir/snf.h"; then
979 # We found a header; make sure we can link with the library
980 saved_ldflags=$LDFLAGS
981 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
982 AC_CHECK_LIB([snf], [snf_init], [ac_cv_lbl_snf_api="yes"])
983 LDFLAGS="$saved_ldflags"
984 if test "$ac_cv_lbl_snf_api" = no; then
985 AC_MSG_ERROR(SNF API cannot correctly be linked; check config.log)
986 fi
987 fi
988
989 if test "$ac_cv_lbl_snf_api" = yes; then
990 AC_MSG_RESULT([yes ($snf_root)])
991
992 V_INCLS="$V_INCLS -I$snf_include_dir"
993 LIBS="$LIBS -lsnf"
994 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
995
996 if test "$V_PCAP" != snf ; then
997 SSRC="$SSRC pcap-snf.c"
998 fi
999
1000 AC_DEFINE(HAVE_SNF_API, 1, [define if you have the Myricom SNF API])
1001 else
1002 AC_MSG_RESULT(no)
1003
1004 if test "$want_snf" = yes; then
1005 # User requested "snf" capture type but
1006 # we couldn't find the Sniffer API support.
1007 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])
1008 fi
1009
1010 if test "$want_snf" = yes; then
1011 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])
1012 fi
1013 fi
1014 fi
1015
1016 # Check for Riverbed TurboCap support.
1017 AC_ARG_WITH([turbocap],
1018 AC_HELP_STRING([--with-turbocap@<:@=DIR@:>@],[include Riverbed TurboCap support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1019 [
1020 if test "$withval" = no
1021 then
1022 # User explicitly doesn't want TurboCap
1023 want_turbocap=no
1024 elif test "$withval" = yes
1025 then
1026 # User wants TurboCap support but hasn't specified a directory.
1027 want_turbocap=yes
1028 else
1029 # User wants TurboCap support with a specified directory.
1030 want_turbocap=yes
1031 turbocap_root=$withval
1032 fi
1033 ],[
1034 if test "xxx_only" = yes; then
1035 # User requested something-else-only pcap, so they don't
1036 # want TurboCap support.
1037 want_turbocap=no
1038 else
1039 #
1040 # Use TurboCap API if present, otherwise don't
1041 #
1042 want_turbocap=ifpresent
1043 fi
1044 ])
1045
1046 ac_cv_lbl_turbocap_api=no
1047 if test "$want_turbocap" != no; then
1048
1049 AC_MSG_CHECKING(whether TurboCap is supported)
1050
1051 save_CFLAGS="$CFLAGS"
1052 save_LIBS="$LIBS"
1053 if test ! -z "$turbocap_root"; then
1054 TURBOCAP_CFLAGS="-I$turbocap_root/include"
1055 TURBOCAP_LIBS="-L$turbocap_root/lib"
1056 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
1057 fi
1058
1059 AC_TRY_COMPILE(
1060 [
1061 #include <TcApi.h>
1062 ],
1063 [
1064 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
1065 TC_INSTANCE i;
1066 (void)TcInstanceCreateByName("foo", &i);
1067 ],
1068 ac_cv_lbl_turbocap_api=yes)
1069
1070 CFLAGS="$save_CFLAGS"
1071 if test $ac_cv_lbl_turbocap_api = yes; then
1072 AC_MSG_RESULT(yes)
1073
1074 SSRC="$SSRC pcap-tc.c"
1075 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
1076 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
1077
1078 AC_DEFINE(HAVE_TC_API, 1, [define if you have the TurboCap API])
1079 else
1080 AC_MSG_RESULT(no)
1081
1082 if test "$want_turbocap" = yes; then
1083 # User wanted Turbo support but we couldn't find it.
1084 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])
1085 fi
1086 fi
1087 fi
1088
1089 #
1090 # Look for {f}lex.
1091 #
1092 AC_PROG_LEX
1093 if test "$LEX" = ":"; then
1094 AC_MSG_ERROR([Neither flex nor lex was found.])
1095 fi
1096
1097 #
1098 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
1099 # and supports processing our scanner.l.
1100 #
1101 AC_CACHE_CHECK([for capable lex], tcpdump_cv_capable_lex,
1102 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
1103 tcpdump_cv_capable_lex=yes
1104 else
1105 tcpdump_cv_capable_lex=insufficient
1106 fi)
1107 if test $tcpdump_cv_capable_lex = insufficient ; then
1108 AC_MSG_ERROR([$LEX is insufficient to compile libpcap.
1109 libpcap requires Flex 2.5.31 or later, or a compatible version of lex.])
1110 fi
1111
1112 #
1113 # Look for yacc/bison/byacc.
1114 #
1115 AC_PROG_YACC
1116
1117 #
1118 # Make sure it supports the -p flag and supports processing our
1119 # grammar.y.
1120 #
1121 AC_CACHE_CHECK([for capable yacc/bison], tcpdump_cv_capable_yacc,
1122 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
1123 tcpdump_cv_capable_yacc=yes
1124 else
1125 tcpdump_cv_capable_yacc=insufficient
1126 fi)
1127 if test $tcpdump_cv_capable_yacc = insufficient ; then
1128 AC_MSG_ERROR([$YACC is insufficient to compile libpcap.
1129 libpcap requires Bison, Berkeley YACC, or another YACC compatible with them.])
1130 fi
1131
1132 dnl
1133 dnl Allow the user to enable remote capture.
1134 dnl It's off by default, as that increases the attack surface of
1135 dnl libpcap, exposing it to malicious servers.
1136 dnl
1137 AC_MSG_CHECKING([whether to enable remote packet capture])
1138 AC_ARG_ENABLE(remote,
1139 [ --enable-remote enable remote packet capture @<:@default=no@:>@
1140 --disable-remote disable remote packet capture],,
1141 enableval=no)
1142 case "$enableval" in
1143 yes) AC_MSG_RESULT(yes)
1144 AC_WARN([Remote packet capture may expose libpcap-based applications])
1145 AC_WARN([to attacks by malicious remote capture servers!])
1146 AC_DEFINE(HAVE_REMOTE,,
1147 [Define to 1 if remote packet capture is to be supported])
1148 SSRC="$SSRC pcap-new.c pcap-rpcap.c sockutils.c"
1149 RPCAPD=rpcapd
1150 INSTALL_RPCAPD=install-rpcapd
1151 ;;
1152 *) AC_MSG_RESULT(no)
1153 ;;
1154 esac
1155
1156 #
1157 # Assume, by default, no support for shared libraries and V7/BSD convention
1158 # for man pages (file formats in section 5, miscellaneous info in section 7).
1159 # Individual cases can override this.
1160 #
1161 DYEXT="none"
1162 MAN_FILE_FORMATS=5
1163 MAN_MISC_INFO=7
1164 MAN_USERMOD_SECTION=8
1165 case "$host_os" in
1166
1167 aix*)
1168 dnl Workaround to enable certain features
1169 AC_DEFINE(_SUN,1,[define on AIX to get certain functions])
1170
1171 #
1172 # AIX makes it fun to build shared and static libraries,
1173 # because they're *both* ".a" archive libraries. We
1174 # build the static library for the benefit of the traditional
1175 # scheme of building libpcap and tcpdump in subdirectories of
1176 # the same directory, with tcpdump statically linked with the
1177 # libpcap in question, but we also build a shared library as
1178 # "libpcap.shareda" and install *it*, rather than the static
1179 # library, as "libpcap.a".
1180 #
1181 DYEXT="shareda"
1182
1183 case "$V_PCAP" in
1184
1185 dlpi)
1186 #
1187 # If we're using DLPI, applications will need to
1188 # use /lib/pse.exp if present, as we use the
1189 # STREAMS routines.
1190 #
1191 pseexe="/lib/pse.exp"
1192 AC_MSG_CHECKING(for $pseexe)
1193 if test -f $pseexe ; then
1194 AC_MSG_RESULT(yes)
1195 LIBS="-I:$pseexe"
1196 fi
1197 ;;
1198
1199 bpf)
1200 #
1201 # If we're using BPF, we need "-lodm" and "-lcfg", as
1202 # we use them to load the BPF module.
1203 #
1204 LIBS="-lodm -lcfg"
1205 ;;
1206 esac
1207 ;;
1208
1209 darwin*)
1210 DYEXT="dylib"
1211 V_CCOPT="$V_CCOPT -fno-common"
1212 AC_ARG_ENABLE(universal,
1213 AC_HELP_STRING([--disable-universal],[don't build universal on macOS]))
1214 if test "$enable_universal" != "no"; then
1215 case "$host_os" in
1216
1217 darwin[0-7].*)
1218 #
1219 # Pre-Tiger. Build only for 32-bit PowerPC; no
1220 # need for any special compiler or linker flags.
1221 #
1222 ;;
1223
1224 darwin8.[0123]*)
1225 #
1226 # Tiger, prior to Intel support. Build for 32-bit
1227 # PowerPC and 64-bit PowerPC, with 32-bit PowerPC
1228 # first. (I'm guessing that's what Apple does.)
1229 #
1230 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64"
1231 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64"
1232 ;;
1233
1234 darwin8.[456]*)
1235 #
1236 # Tiger, subsequent to Intel support but prior to
1237 # x86-64 support. Build for 32-bit PowerPC, 64-bit
1238 # PowerPC, and x86, with 32-bit PowerPC first.
1239 # (I'm guessing that's what Apple does.)
1240 #
1241 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386"
1242 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386"
1243 ;;
1244
1245 darwin8.*)
1246 #
1247 # All other Tiger, so subsequent to x86-64
1248 # support. Build for 32-bit PowerPC, 64-bit
1249 # PowerPC, x86, and x86-64, and with 32-bit PowerPC
1250 # first. (I'm guessing that's what Apple does.)
1251 #
1252 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
1253 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
1254 ;;
1255
1256 darwin9.*)
1257 #
1258 # Leopard. Build for 32-bit PowerPC, 64-bit
1259 # PowerPC, x86, and x86-64, with 32-bit PowerPC
1260 # first. (That's what Apple does.)
1261 #
1262 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
1263 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
1264 ;;
1265
1266 darwin10.*)
1267 #
1268 # Snow Leopard. Build for x86-64, x86, and
1269 # 32-bit PowerPC, with x86-64 first. (That's
1270 # what Apple does, even though Snow Leopard
1271 # doesn't run on PPC, so PPC libpcap runs under
1272 # Rosetta, and Rosetta doesn't support BPF
1273 # ioctls, so PPC programs can't do live
1274 # captures.)
1275 #
1276 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386 -arch ppc"
1277 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386 -arch ppc"
1278 ;;
1279
1280 darwin*)
1281 #
1282 # Post-Snow Leopard. Build for x86-64 and
1283 # x86, with x86-64 first. (That's probably what
1284 # Apple does, given that Rosetta is gone.)
1285 # XXX - update if and when Apple drops support
1286 # for 32-bit x86 code.
1287 #
1288 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
1289 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
1290 ;;
1291 esac
1292 fi
1293 ;;
1294
1295 hpux9*)
1296 AC_DEFINE(HAVE_HPUX9,1,[on HP-UX 9.x])
1297
1298 #
1299 # Use System V conventions for man pages.
1300 #
1301 MAN_FILE_FORMATS=4
1302 MAN_MISC_INFO=5
1303 ;;
1304
1305 hpux10.0*)
1306
1307 #
1308 # Use System V conventions for man pages.
1309 #
1310 MAN_FILE_FORMATS=4
1311 MAN_MISC_INFO=5
1312 ;;
1313
1314 hpux10.1*)
1315
1316 #
1317 # Use System V conventions for man pages.
1318 #
1319 MAN_FILE_FORMATS=4
1320 MAN_MISC_INFO=5
1321 ;;
1322
1323 hpux*)
1324 dnl HPUX 10.20 and above is similar to HPUX 9, but
1325 dnl not the same....
1326 dnl
1327 dnl XXX - DYEXT should be set to "sl" if this is building
1328 dnl for 32-bit PA-RISC, but should be left as "so" for
1329 dnl 64-bit PA-RISC or, I suspect, IA-64.
1330 AC_DEFINE(HAVE_HPUX10_20_OR_LATER,1,[on HP-UX 10.20 or later])
1331 if test "`uname -m`" = "ia64"; then
1332 DYEXT="so"
1333 else
1334 DYEXT="sl"
1335 fi
1336
1337 #
1338 # "-b" builds a shared library; "+h" sets the soname.
1339 #
1340 SHLIB_OPT="-b"
1341 SONAME_OPT="+h"
1342
1343 #
1344 # Use System V conventions for man pages.
1345 #
1346 MAN_FILE_FORMATS=4
1347 MAN_MISC_INFO=5
1348 ;;
1349
1350 irix*)
1351 #
1352 # Use System V conventions for man pages.
1353 #
1354 MAN_FILE_FORMATS=4
1355 MAN_MISC_INFO=5
1356 ;;
1357
1358 linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*)
1359 DYEXT="so"
1360
1361 #
1362 # Compiler assumed to be GCC; run-time linker may require a -R
1363 # flag.
1364 #
1365 if test "$libdir" != "/usr/lib"; then
1366 V_RFLAGS=-Wl,-R$libdir
1367 fi
1368 ;;
1369
1370 osf*)
1371 DYEXT="so"
1372
1373 #
1374 # Use System V conventions for man pages.
1375 #
1376 MAN_FILE_FORMATS=4
1377 MAN_MISC_INFO=5
1378 ;;
1379
1380 sinix*)
1381 AC_MSG_CHECKING(if SINIX compiler defines sinix)
1382 AC_CACHE_VAL(ac_cv_cc_sinix_defined,
1383 AC_TRY_COMPILE(
1384 [],
1385 [int i = sinix;],
1386 ac_cv_cc_sinix_defined=yes,
1387 ac_cv_cc_sinix_defined=no))
1388 AC_MSG_RESULT($ac_cv_cc_sinix_defined)
1389 if test $ac_cv_cc_sinix_defined = no ; then
1390 AC_DEFINE(sinix,1,[on sinix])
1391 fi
1392 ;;
1393
1394 solaris*)
1395 AC_DEFINE(HAVE_SOLARIS,1,[On solaris])
1396
1397 DYEXT="so"
1398
1399 case "`uname -r`" in
1400
1401 5.12)
1402 ;;
1403
1404 *)
1405 #
1406 # Use System V conventions for man pages.
1407 #
1408 MAN_USERMOD_SECTION=1m
1409 MAN_FILE_FORMATS=4
1410 MAN_MISC_INFO=5
1411 esac
1412 ;;
1413 esac
1414
1415 AC_ARG_ENABLE(shared,
1416 AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=yes, if support available@:>@]))
1417 test "x$enable_shared" = "xno" && DYEXT="none"
1418
1419 AC_PROG_RANLIB
1420 AC_CHECK_TOOL([AR], [ar])
1421
1422 AC_PROG_LN_S
1423 AC_SUBST(LN_S)
1424
1425 AC_LBL_DEVEL(V_CCOPT)
1426
1427 AC_LBL_SOCKADDR_SA_LEN
1428
1429 AC_LBL_SOCKADDR_STORAGE
1430
1431 AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1
1432
1433 AC_LBL_UNALIGNED_ACCESS
1434
1435 rm -f net
1436 ln -s ${srcdir}/bpf/net net
1437
1438 AC_SUBST(V_CCOPT)
1439 AC_SUBST(V_DEFS)
1440 AC_SUBST(V_FINDALLDEVS)
1441 AC_SUBST(V_INCLS)
1442 AC_SUBST(V_LEX)
1443 AC_SUBST(V_PCAP)
1444 AC_SUBST(V_SHLIB_CMD)
1445 AC_SUBST(V_SHLIB_OPT)
1446 AC_SUBST(V_SONAME_OPT)
1447 AC_SUBST(V_RPATH_OPT)
1448 AC_SUBST(V_YACC)
1449 AC_SUBST(ADDLOBJS)
1450 AC_SUBST(ADDLARCHIVEOBJS)
1451 AC_SUBST(SSRC)
1452 AC_SUBST(DYEXT)
1453 AC_SUBST(MAN_FILE_FORMATS)
1454 AC_SUBST(MAN_MISC_INFO)
1455 AC_SUBST(MAN_USERMOD_SECTION)
1456 AC_SUBST(RPCAPD)
1457 AC_SUBST(INSTALL_RPCAPD)
1458
1459 AC_ARG_ENABLE([usb],
1460 [AC_HELP_STRING([--enable-usb],[enable nusb support @<:@default=yes, if support available@:>@])],
1461 [],
1462 [enable_usb=yes])
1463
1464 if test "xxx_only" = yes; then
1465 # User requested something-else-only pcap, so they don't
1466 # want USB support.
1467 enable_usb=no
1468 fi
1469
1470 if test "x$enable_usb" != "xno" ; then
1471 dnl check for USB sniffing support
1472 AC_MSG_CHECKING(for USB sniffing support)
1473 case "$host_os" in
1474 linux*)
1475 AC_DEFINE(PCAP_SUPPORT_USB, 1, [target host supports USB sniffing])
1476 USB_SRC=pcap-usb-linux.c
1477 AC_MSG_RESULT(yes)
1478 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
1479 if test $? -ne 0 ; then
1480 ac_usb_dev_name="usbmon"
1481 fi
1482 AC_DEFINE_UNQUOTED(LINUX_USB_MON_DEV, "/dev/$ac_usb_dev_name", [path for device for USB sniffing])
1483 AC_MSG_NOTICE(Device for USB sniffing is /dev/$ac_usb_dev_name)
1484 #
1485 # Do we have a version of <linux/compiler.h> available?
1486 # If so, we might need it for <linux/usbdevice_fs.h>.
1487 #
1488 AC_CHECK_HEADERS(linux/compiler.h)
1489 if test "$ac_cv_header_linux_compiler_h" = yes; then
1490 #
1491 # Yes - include it when testing for <linux/usbdevice_fs.h>.
1492 #
1493 AC_CHECK_HEADERS(linux/usbdevice_fs.h,,,[#include <linux/compiler.h>])
1494 else
1495 AC_CHECK_HEADERS(linux/usbdevice_fs.h)
1496 fi
1497 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
1498 #
1499 # OK, does it define bRequestType? Older versions of the kernel
1500 # define fields with names like "requesttype, "request", and
1501 # "value", rather than "bRequestType", "bRequest", and
1502 # "wValue".
1503 #
1504 AC_MSG_CHECKING(if usbdevfs_ctrltransfer struct has bRequestType member)
1505 AC_CACHE_VAL(ac_cv_usbdevfs_ctrltransfer_has_bRequestType,
1506 AC_TRY_COMPILE([
1507 AC_INCLUDES_DEFAULT
1508 #ifdef HAVE_LINUX_COMPILER_H
1509 #include <linux/compiler.h>
1510 #endif
1511 #include <linux/usbdevice_fs.h>],
1512 [u_int i = sizeof(((struct usbdevfs_ctrltransfer *)0)->bRequestType)],
1513 ac_cv_usbdevfs_ctrltransfer_has_bRequestType=yes,
1514 ac_cv_usbdevfs_ctrltransfer_has_bRequestType=no))
1515 AC_MSG_RESULT($ac_cv_usbdevfs_ctrltransfer_has_bRequestType)
1516 if test $ac_cv_usbdevfs_ctrltransfer_has_bRequestType = yes ; then
1517 AC_DEFINE(HAVE_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE,1,
1518 [if struct usbdevfs_ctrltransfer has bRequestType])
1519 fi
1520 fi
1521 ;;
1522 freebsd*)
1523 #
1524 # This just uses BPF in FreeBSD 8.4 and later; we don't need
1525 # to check for anything special for capturing.
1526 #
1527 AC_MSG_RESULT([yes, in FreeBSD 8.4 and later])
1528 ;;
1529
1530 *)
1531 AC_MSG_RESULT(no)
1532 ;;
1533 esac
1534 fi
1535 AC_SUBST(PCAP_SUPPORT_USB)
1536 AC_SUBST(USB_SRC)
1537
1538 dnl check for netfilter sniffing support
1539 if test "xxx_only" != yes; then
1540 AC_MSG_CHECKING(whether the platform could support netfilter sniffing)
1541 case "$host_os" in
1542 linux*)
1543 AC_MSG_RESULT(yes)
1544 #
1545 # Life's too short to deal with trying to get this to compile
1546 # if you don't get the right types defined with
1547 # __KERNEL_STRICT_NAMES getting defined by some other include.
1548 #
1549 # Check whether the includes Just Work. If not, don't turn on
1550 # netfilter support.
1551 #
1552 AC_MSG_CHECKING(whether we can compile the netfilter support)
1553 AC_CACHE_VAL(ac_cv_netfilter_can_compile,
1554 AC_TRY_COMPILE([
1555 AC_INCLUDES_DEFAULT
1556 #include <sys/socket.h>
1557 #include <netinet/in.h>
1558 #include <linux/types.h>
1559
1560 #include <linux/netlink.h>
1561 #include <linux/netfilter.h>
1562 #include <linux/netfilter/nfnetlink.h>
1563 #include <linux/netfilter/nfnetlink_log.h>
1564 #include <linux/netfilter/nfnetlink_queue.h>],
1565 [],
1566 ac_cv_netfilter_can_compile=yes,
1567 ac_cv_netfilter_can_compile=no))
1568 AC_MSG_RESULT($ac_cv_netfilter_can_compile)
1569 if test $ac_cv_netfilter_can_compile = yes ; then
1570 AC_DEFINE(PCAP_SUPPORT_NETFILTER, 1,
1571 [target host supports netfilter sniffing])
1572 NETFILTER_SRC=pcap-netfilter-linux.c
1573 fi
1574 ;;
1575 *)
1576 AC_MSG_RESULT(no)
1577 ;;
1578 esac
1579 fi
1580 AC_SUBST(PCAP_SUPPORT_NETFILTER)
1581 AC_SUBST(NETFILTER_SRC)
1582
1583 AC_ARG_ENABLE([netmap],
1584 [AC_HELP_STRING([--enable-netmap],[enable netmap support @<:@default=yes, if support available@:>@])],
1585 [],
1586 [enable_netmap=yes])
1587
1588 if test "x$enable_netmap" != "xno" ; then
1589 dnl check for netmap support
1590 AC_CHECK_HEADER(net/netmap_user.h,
1591 [ AC_DEFINE(PCAP_SUPPORT_NETMAP, 1, [target host supports netmap])
1592 NETMAP_SRC=pcap-netmap.c
1593 AC_MSG_NOTICE(netmap is supported)],
1594 AC_MSG_NOTICE(netmap is not supported),
1595 AC_INCLUDES_DEFAULT
1596 )
1597 AC_SUBST(PCAP_SUPPORT_NETMAP)
1598 AC_SUBST(NETMAP_SRC)
1599 fi
1600
1601
1602 AC_ARG_ENABLE([bluetooth],
1603 [AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=yes, if support available@:>@])],
1604 [],
1605 [enable_bluetooth=ifsupportavailable])
1606
1607 if test "xxx_only" = yes; then
1608 # User requested something-else-only pcap, so they don't
1609 # want Bluetooth support.
1610 enable_bluetooth=no
1611 fi
1612
1613 if test "x$enable_bluetooth" != "xno" ; then
1614 dnl check for Bluetooth sniffing support
1615 case "$host_os" in
1616 linux*)
1617 AC_CHECK_HEADER(bluetooth/bluetooth.h,
1618 [
1619 AC_DEFINE(PCAP_SUPPORT_BT, 1, [target host supports Bluetooth sniffing])
1620 BT_SRC=pcap-bt-linux.c
1621 AC_MSG_NOTICE(Bluetooth sniffing is supported)
1622
1623 #
1624 # OK, does struct sockaddr_hci have an hci_channel
1625 # member?
1626 #
1627 AC_MSG_CHECKING(if struct sockaddr_hci has hci_channel member)
1628 AC_CACHE_VAL(ac_cv_lbl_sockaddr_hci_has_hci_channel,
1629 AC_TRY_COMPILE(
1630 [
1631 #include <bluetooth/bluetooth.h>
1632 #include <bluetooth/hci.h>
1633 ],
1634 [u_int i = sizeof(((struct sockaddr_hci *)0)->hci_channel)],
1635 ac_cv_lbl_sockaddr_hci_has_hci_channel=yes,
1636 ac_cv_lbl_sockaddr_hci_has_hci_channel=no))
1637 AC_MSG_RESULT($ac_cv_lbl_sockaddr_hci_has_hci_channel)
1638 if test $ac_cv_lbl_sockaddr_hci_has_hci_channel = yes ; then
1639 AC_DEFINE(SOCKADDR_HCI_HAS_HCI_CHANNEL,,
1640 [if struct sockaddr_hci has hci_channel member])
1641
1642 #
1643 # OK, is HCI_CHANNEL_MONITOR defined?
1644 #
1645 AC_MSG_CHECKING(if HCI_CHANNEL_MONITOR is defined)
1646 AC_CACHE_VAL(ac_cv_lbl_hci_channel_monitor_is_defined,
1647 AC_TRY_COMPILE(
1648 [
1649 #include <bluetooth/bluetooth.h>
1650 #include <bluetooth/hci.h>
1651 ],
1652 [u_int i = HCI_CHANNEL_MONITOR],
1653 ac_cv_lbl_hci_channel_monitor_is_defined=yes,
1654 ac_cv_lbl_hci_channel_monitor_is_defined=no))
1655 AC_MSG_RESULT($ac_cv_lbl_hci_channel_monitor_is_defined)
1656 if test $ac_cv_lbl_hci_channel_monitor_is_defined = yes ; then
1657 AC_DEFINE(PCAP_SUPPORT_BT_MONITOR,,
1658 [target host supports Bluetooth Monitor])
1659 BT_MONITOR_SRC=pcap-bt-monitor-linux.c
1660 fi
1661 fi
1662 ac_lbl_bluetooth_available=yes
1663 ],
1664 ac_lbl_bluetooth_available=no
1665 )
1666 if test "x$ac_lbl_bluetooth_available" == "xno" ; then
1667 if test "x$enable_bluetooth" = "xyes" ; then
1668 AC_MSG_ERROR(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
1669 else
1670 AC_MSG_NOTICE(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
1671 fi
1672 fi
1673 ;;
1674 *)
1675 if test "x$enable_bluetooth" = "xyes" ; then
1676 AC_MSG_ERROR(no Bluetooth sniffing support implemented for $host_os)
1677 else
1678 AC_MSG_NOTICE(no Bluetooth sniffing support implemented for $host_os)
1679 fi
1680 ;;
1681 esac
1682 AC_SUBST(PCAP_SUPPORT_BT)
1683 AC_SUBST(BT_SRC)
1684 AC_SUBST(BT_MONITOR_SRC)
1685 fi
1686
1687 AC_ARG_ENABLE([dbus],
1688 [AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=yes, if support available@:>@])],
1689 [],
1690 [enable_dbus=ifavailable])
1691
1692 if test "xxx_only" = yes; then
1693 # User requested something-else-only pcap, so they don't
1694 # want D-Bus support.
1695 enable_dbus=no
1696 fi
1697
1698 if test "x$enable_dbus" != "xno"; then
1699 if test "x$enable_dbus" = "xyes"; then
1700 case "$host_os" in
1701
1702 darwin*)
1703 #
1704 # We don't support D-Bus sniffing on macOS; see
1705 #
1706 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
1707 #
1708 # The user requested it, so fail.
1709 #
1710 AC_MSG_ERROR([Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS])
1711 esac
1712 else
1713 case "$host_os" in
1714
1715 darwin*)
1716 #
1717 # We don't support D-Bus sniffing on macOS; see
1718 #
1719 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
1720 #
1721 # The user dind't explicitly request it, so just
1722 # silently refuse to enable it.
1723 #
1724 enable_dbus="no"
1725 ;;
1726 esac
1727 fi
1728 fi
1729
1730 if test "x$enable_dbus" != "xno"; then
1731 AC_CHECK_PROG([PKGCONFIG], [pkg-config], [pkg-config], [no])
1732 if test "x$PKGCONFIG" != "xno"; then
1733 AC_MSG_CHECKING([for D-Bus])
1734 if "$PKGCONFIG" dbus-1; then
1735 AC_MSG_RESULT([yes])
1736 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
1737 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
1738 save_CFLAGS="$CFLAGS"
1739 save_LIBS="$LIBS"
1740 CFLAGS="$CFLAGS $DBUS_CFLAGS"
1741 LIBS="$LIBS $DBUS_LIBS"
1742 AC_MSG_CHECKING(whether the D-Bus library defines dbus_connection_read_write)
1743 AC_TRY_LINK(
1744 [#include <string.h>
1745
1746 #include <time.h>
1747 #include <sys/time.h>
1748
1749 #include <dbus/dbus.h>],
1750 [return dbus_connection_read_write(NULL, 0);],
1751 [
1752 AC_MSG_RESULT([yes])
1753 AC_DEFINE(PCAP_SUPPORT_DBUS, 1, [support D-Bus sniffing])
1754 DBUS_SRC=pcap-dbus.c
1755 V_INCLS="$V_INCLS $DBUS_CFLAGS"
1756 ],
1757 [
1758 AC_MSG_RESULT([no])
1759 if test "x$enable_dbus" = "xyes"; then
1760 AC_MSG_ERROR([--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()])
1761 fi
1762 LIBS="$save_LIBS"
1763 ])
1764 CFLAGS="$save_CFLAGS"
1765 else
1766 AC_MSG_RESULT([no])
1767 if test "x$enable_dbus" = "xyes"; then
1768 AC_MSG_ERROR([--enable-dbus was given, but the dbus-1 package is not installed])
1769 fi
1770 fi
1771 fi
1772 AC_SUBST(PCAP_SUPPORT_DBUS)
1773 AC_SUBST(DBUS_SRC)
1774 fi
1775
1776 dnl check for hardware timestamp support
1777 case "$host_os" in
1778 linux*)
1779 AC_CHECK_HEADERS([linux/net_tstamp.h])
1780 ;;
1781 *)
1782 AC_MSG_NOTICE(no hardware timestamp support implemented for $host_os)
1783 ;;
1784 esac
1785
1786 dnl The packet ring capture facility of Linux, described in
1787 dnl Documentation/networking/packet_mmap.txt, is not 32/64-bit compatible before
1788 dnl version 2.6.27. A 32-bit kernel requires a 32-bit userland, and likewise for
1789 dnl 64-bit. The effect of this is that a 32-bit libpcap binary will not run
1790 dnl correctly on a 64-bit kernel (the binary will use the wrong offsets into a
1791 dnl kernel struct). This problem was solved in Linux 2.6.27. Use
1792 dnl --disable-packet-ring whenever a 32-bit application must run on a 64-bit
1793 dnl target host, and either the build host or the target host run Linux 2.6.26
1794 dnl or earlier.
1795 AC_ARG_ENABLE([packet-ring],
1796 [AC_HELP_STRING([--enable-packet-ring],[enable Linux packet ring support @<:@default=yes@:>@])],
1797 ,enable_packet_ring=yes)
1798
1799 if test "x$enable_packet_ring" != "xno" ; then
1800 AC_DEFINE(PCAP_SUPPORT_PACKET_RING, 1, [use Linux packet ring capture if available])
1801 AC_SUBST(PCAP_SUPPORT_PACKET_RING)
1802 fi
1803
1804 AC_ARG_ENABLE([rdma],
1805 [AC_HELP_STRING([--enable-rdma],[enable RDMA capture support @<:@default=yes, if support available@:>@])],
1806 [],
1807 [enable_rdmasniff=ifavailable])
1808
1809 if test "xxx_only" = yes; then
1810 # User requested something-else-only pcap, so they don't
1811 # want RDMA support.
1812 enable_rdmasniff=no
1813 fi
1814
1815 if test "x$enable_rdmasniff" != "xno"; then
1816 AC_CHECK_LIB(ibverbs, ibv_get_device_list, [
1817 AC_CHECK_HEADER(infiniband/verbs.h, [
1818 AC_MSG_CHECKING(whether libibverbs defines ibv_create_flow)
1819 AC_TRY_LINK(
1820 [
1821 #include <infiniband/verbs.h>
1822 ],
1823 [
1824 (void) ibv_create_flow((struct ibv_qp *) NULL,
1825 (struct ibv_flow_attr *) NULL);
1826 ],
1827 [
1828 AC_MSG_RESULT([yes])
1829 AC_DEFINE(PCAP_SUPPORT_RDMASNIFF, , [target host supports RDMA sniffing])
1830 RDMA_SRC=pcap-rdmasniff.c
1831 LIBS="-libverbs $LIBS"
1832 ],
1833 [
1834 AC_MSG_RESULT([no])
1835 ]
1836 )
1837 ])
1838 ])
1839 AC_SUBST(PCAP_SUPPORT_RDMASNIFF)
1840 AC_SUBST(RDMA_SRC)
1841 fi
1842
1843 AC_PROG_INSTALL
1844
1845 AC_CONFIG_HEADER(config.h)
1846
1847 AC_OUTPUT_COMMANDS([if test -f .devel; then
1848 echo timestamp > stamp-h
1849 cat Makefile-devel-adds >> Makefile
1850 make depend
1851 fi])
1852 AC_OUTPUT(Makefile pcap-filter.manmisc pcap-linktype.manmisc
1853 pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap
1854 pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap
1855 pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap
1856 pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap
1857 pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap
1858 pcap_set_tstamp_type.3pcap rpcapd/Makefile)
1859 exit 0