Skip to content

Commit

Permalink
Support for libdlpi, and for enabling "passive mode" on Solaris systems
Browse files Browse the repository at this point in the history
that support it, from Sagun Shakya.
  • Loading branch information
yuguy committed Mar 13, 2008
1 parent b322103 commit cb44cb0
Show file tree
Hide file tree
Showing 11 changed files with 1,159 additions and 412 deletions.
3 changes: 3 additions & 0 deletions FILES
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ config.h.in
config.sub
configure
configure.in
dlpisubs.c
dlpisubs.h
etherent.c
ethertype.h
fad-getad.c
Expand Down Expand Up @@ -94,6 +96,7 @@ pcap-dos.c
pcap-dos.h
pcap-enet.c
pcap-int.h
pcap-libdlpi.c
pcap-linux.c
pcap-namedb.h
pcap-nit.c
Expand Down
5 changes: 4 additions & 1 deletion INSTALL.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.24 2008-01-06 21:14:16 guy Exp $ (LBL)
@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.25 2008-03-13 18:13:57 guy Exp $ (LBL)

To build libpcap, run "./configure" (a shell script). The configure
script will determine your system attributes and generate an
Expand Down Expand Up @@ -327,6 +327,8 @@ config.h.in - autoconf input
config.sub - autoconf support
configure - configure script (run this first)
configure.in - configure script source
dlpisubs.c - DLPI-related functions for pcap-dlpi.c and pcap-libdlpi.c
dlpisubs.h - DLPI-related function declarations
etherent.c - /etc/ethers support routines
ethertype.h - Ethernet protocol types and names definitions
fad-getad.c - pcap_findalldevs() for systems with getifaddrs()
Expand Down Expand Up @@ -370,6 +372,7 @@ pcap-dos.c - MS-DOS capture support
pcap-dos.h - headers for MS-DOS capture support
pcap-enet.c - enet support
pcap-int.h - internal libpcap definitions
pcap-libdlpi.c - Data Link Provider Interface support for systems with libdlpi
pcap-linux.c - Linux packet socket support
pcap-namedb.h - header for backwards compatibility
pcap-nit.c - SunOS Network Interface Tap support
Expand Down
29 changes: 28 additions & 1 deletion aclocal.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.88 2008-02-06 11:18:57 guy Exp $ (LBL)
dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.89 2008-03-13 18:13:57 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
Expand Down Expand Up @@ -903,3 +903,30 @@ AC_DEFUN(AC_LBL_TPACKET_STATS,
if test $ac_cv_lbl_tpacket_stats = yes; then
AC_DEFINE(HAVE_TPACKET_STATS,1,[if if_packet.h has tpacket_stats defined])
fi])

dnl
dnl Checks to see if Solaris has the dl_passive_req_t struct defined
dnl in <sys/dlpi.h>.
dnl
dnl usage:
dnl
dnl AC_LBL_DL_PASSIVE_REQ_T
dnl
dnl results:
dnl
dnl HAVE_DLPI_PASSIVE (defined)
dnl
AC_DEFUN(AC_LBL_DL_PASSIVE_REQ_T,
[AC_MSG_CHECKING(if dl_passive_req_t struct exists)
AC_CACHE_VAL(ac_cv_lbl_has_dl_passive_req_t,
AC_TRY_COMPILE([
# include <sys/types.h>
# include <sys/dlpi.h>],
[u_int i = sizeof(dl_passive_req_t)],
ac_cv_lbl_has_dl_passive_req_t=yes,
ac_cv_lbl_has_dl_passive_req_t=no))
AC_MSG_RESULT($ac_cv_lbl_has_dl_passive_req_t)
if test $ac_cv_lbl_has_dl_passive_req_t = yes ; then
AC_DEFINE(HAVE_DLPI_PASSIVE,1,[if passive_req_t primitive
exists])
fi])
6 changes: 6 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
/* define if you have a /dev/dlpi */
#undef HAVE_DEV_DLPI

/* if passive_req_t primitive exists */
#undef HAVE_DLPI_PASSIVE

/* Define to 1 if you have the `ether_hostton' function. */
#undef HAVE_ETHER_HOSTTON

Expand All @@ -50,6 +53,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* if libdlpi exists */
#undef HAVE_LIBDLPI

/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H

Expand Down
Loading

0 comments on commit cb44cb0

Please sign in to comment.