Ethereal-dev: [ethereal-dev] BSD/OS and sundry patches...
The attached patch addresses these issues:
- UCD SNMP installed in a non-standard location isn't supported. The
patch adds
a check to see if it's installed in $UCDSNMPHOME or $prefix. The
usage of an
environment variable is a crock but Works For Me<sm>. An option
--ucd-snmp-dir
would be preferable, but I never figured out how to do that :-)
- if libpcap.a is installed in $prefix/lib, configure fails to pick it
up.
- The MAC address byteswapping code doesn't compile on BSD/OS (probably
fixed in
0.7.3, this patch is relative to 0.7.2).
Cheers,
-- Bert
--
Bert Driehuis -- driehuis@xxxxxxxxxxxxx -- +31-20-3116119
The grand leap of the whale up the Fall of Niagara is esteemed, by all
who have seen it, as one of the finest spectacles in nature.
-- Benjamin Franklin.
diff -rc2 ethereal-0.7.2/acinclude.m4 ./acinclude.m4
*** ethereal-0.7.2/acinclude.m4 Tue Jul 13 04:52:46 1999
--- ./acinclude.m4 Wed Sep 1 00:09:20 1999
***************
*** 169,173 ****
AC_MSG_CHECKING(for extraneous pcap header directories)
found_pcap_dir=""
! for pcap_dir in /usr/include/pcap /usr/local/include/pcap
do
if test -d $pcap_dir ; then
--- 169,173 ----
AC_MSG_CHECKING(for extraneous pcap header directories)
found_pcap_dir=""
! for pcap_dir in /usr/include/pcap /usr/local/include/pcap $prefix/include
do
if test -d $pcap_dir ; then
***************
*** 180,184 ****
if test "$found_pcap_dir" != "" ; then
! AC_MSG_RESULT(found --$found_pcap_dir added to LIBS)
else
AC_MSG_RESULT(not found)
--- 180,184 ----
if test "$found_pcap_dir" != "" ; then
! AC_MSG_RESULT(found --$found_pcap_dir added to LIBS and CFLAGS)
else
AC_MSG_RESULT(not found)
***************
*** 189,192 ****
--- 189,217 ----
AC_CHECK_HEADER(pcap.h,, AC_MSG_ERROR(Header file pcap.h not found.))
AC_CHECK_LIB(pcap, pcap_open_offline,, AC_MSG_ERROR(Library libpcap not found.))
+ ])
+
+
+ #
+ # AC_ETHEREAL_UCDSNMP_CHECK
+ #
+ AC_DEFUN(AC_ETHEREAL_UCDSNMP_CHECK,
+ [
+ AC_MSG_CHECKING(for nostandard ucd-snmp install dir)
+ found_ucdsnmp_dir=""
+ for ucdsnmp_dir in $UCDSNMPHOME $prefix
+ do
+ if test -d $ucdsnmp_dir/include ; then
+ LIBS="$LIBS -L$ucdsnmp_dir/lib"
+ CFLAGS="$CFLAGS -I$ucdsnmp_dir/include"
+ CPPFLAGS="$CPPFLAGS -I$ucdsnmp_dir/include"
+ found_ucdsnmp_dir=" $found_ucdsnmp_dir -L$ucdsnmp_dir/lib"
+ fi
+ done
+
+ if test "$found_ucdsnmp_dir" != "" ; then
+ AC_MSG_RESULT(found --$found_ucdsnmp_dir added to LIBS and CFLAGS)
+ else
+ AC_MSG_RESULT(not found)
+ fi
])
diff -rc2 ethereal-0.7.2/configure.in ./configure.in
*** ethereal-0.7.2/configure.in Wed Aug 11 18:42:51 1999
--- ./configure.in Tue Aug 31 23:59:08 1999
***************
*** 101,104 ****
--- 101,105 ----
else
AC_MSG_RESULT(yes)
+ AC_ETHEREAL_UCDSNMP_CHECK
AC_CHECK_HEADERS(ucd-snmp/snmp.h snmp/snmp.h)
AC_CHECK_LIB(snmp, asn_parse_header,
diff -rc2 ethereal-0.7.2/packet-fddi.c ./packet-fddi.c
*** ethereal-0.7.2/packet-fddi.c Sun Aug 1 06:28:08 1999
--- ./packet-fddi.c Tue Aug 31 23:26:53 1999
***************
*** 79,83 ****
/* On some systems, the FDDI MAC addresses are bit-swapped. */
! #if !defined(ultrix) && !defined(__alpha) && !defined(__bsdi)
#define BIT_SWAPPED_MAC_ADDRS
#endif
--- 79,83 ----
/* On some systems, the FDDI MAC addresses are bit-swapped. */
! #if !defined(ultrix) && !defined(__alpha) && !defined(__bsdi__)
#define BIT_SWAPPED_MAC_ADDRS
#endif
***************
*** 137,140 ****
--- 137,141 ----
swap_mac_addr(u_char *swapped_addr, const u_char *orig_addr)
{
+ #ifdef BIT_SWAPPED_MAC_ADDRS
int i;
***************
*** 142,147 ****
swapped_addr[i] = swaptab[orig_addr[i]];
}
}
-
void
--- 143,148 ----
swapped_addr[i] = swaptab[orig_addr[i]];
}
+ #endif
}
void