- endian checks (use WORDS_BIGENDIAN)
- fallback def for IPPROTO_{AH,ESP}
- sa_len issues
- do not use bittypes.h, respect AC_LBL_CHECK_TYPES
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.210 1999-10-30 05:11:06 itojun Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.211 1999-10-30 07:36:34 itojun Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
version.o: version.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
version.o: version.c
+ $(CC) $(CFLAGS) -c version.c
+
version.c: $(srcdir)/VERSION
@rm -f $@
sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
version.c: $(srcdir)/VERSION
@rm -f $@
sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.65 1999-10-30 05:11:06 itojun Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.66 1999-10-30 07:36:35 itojun Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
$1="-O"
$2=""
if test "${srcdir}" != "." ; then
$1="-O"
$2=""
if test "${srcdir}" != "." ; then
fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
continue;
fi
lastdir=$dir
continue;
fi
lastdir=$dir
- if test -r $dir/pcap.c ; then
+ if test -r $dir/libpcap.a ; then
libpcap=$dir/libpcap.a
d=$dir
dnl continue and select the last one that exists
libpcap=$dir/libpcap.a
d=$dir
dnl continue and select the last one that exists
+ if test -r $d/pcap.h; then
+ elif test -r $srcdir/../libpcap/pcap.h; then
+ $2="-I$d -I$srcdir/../libpcap $$2"
+ else
+ AC_MSG_ERROR(cannot find pcap.h, see INSTALL)
+ fi
AC_MSG_RESULT($libpcap)
fi
LIBS="$libpcap $LIBS"
AC_MSG_RESULT($libpcap)
fi
LIBS="$libpcap $LIBS"
AC_MSG_CHECKING(for AAAA)
AC_CACHE_VAL($1,
AC_TRY_COMPILE([
AC_MSG_CHECKING(for AAAA)
AC_CACHE_VAL($1,
AC_TRY_COMPILE([
# include <arpa/nameser.h>],
[int a = T_AAAA],
$1=yes,
# include <arpa/nameser.h>],
[int a = T_AAAA],
$1=yes,
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* YIPS @(#)$Id: isakmp.h,v 1.1 1999-10-30 05:11:09 itojun Exp $ */
+/* YIPS @(#)$Id: isakmp.h,v 1.2 1999-10-30 07:36:36 itojun Exp $ */
cookie_t i_ck; /* Initiator Cookie */
cookie_t r_ck; /* Responder Cookie */
u_int8_t np; /* Next Payload Type */
cookie_t i_ck; /* Initiator Cookie */
cookie_t r_ck; /* Responder Cookie */
u_int8_t np; /* Next Payload Type */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int8_t v_min:4, /* MnVer */
- v_maj:4; /* MjVer */
-#else
+#if defined(WORDS_BIGENDIAN) || (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN))
u_int8_t v_maj:4, /* MnVer */
v_min:4; /* MjVer */
u_int8_t v_maj:4, /* MnVer */
v_min:4; /* MjVer */
+#else
+ u_int8_t v_min:4, /* MnVer */
+ v_maj:4; /* MjVer */
#endif
u_int8_t etype; /* Exchange Type */
u_int8_t flags; /* Flags */
#endif
u_int8_t etype; /* Exchange Type */
u_int8_t flags; /* Flags */
#include "cdecl_ext.h"
#endif
#include "cdecl_ext.h"
#endif
#ifndef HAVE_U_INT32_T
#include "bittypes.h"
#endif
#ifndef HAVE_U_INT32_T
#include "bittypes.h"
#endif
#ifndef HAVE_SOCKADDR_STORAGE
#include "sockstorage.h"
#ifndef HAVE_SOCKADDR_STORAGE
#include "sockstorage.h"
#ifndef lint
static const char rcsid[] =
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.71 1999-10-30 05:30:20 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.72 1999-10-30 07:36:37 itojun Exp $ (LBL)";
#endif
#include <sys/param.h>
#endif
#include <sys/param.h>
+#ifndef IPPROTO_AH
+#define IPPROTO_AH 51
+#endif
case IPPROTO_AH:
nh = *cp;
advance = ah_print(cp, (const u_char *)ip);
case IPPROTO_AH:
nh = *cp;
advance = ah_print(cp, (const u_char *)ip);
len -= advance;
goto again;
len -= advance;
goto again;
+#ifndef IPPROTO_ESP
+#define IPPROTO_ESP 50
+#endif
case IPPROTO_ESP:
{
int enh;
case IPPROTO_ESP:
{
int enh;
#ifndef lint
static const char rcsid[] =
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.5 1999-10-30 05:37:35 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.6 1999-10-30 07:36:37 itojun Exp $ (LBL)";
#endif
#include <string.h>
#endif
#include <string.h>
sizeof(cookiecache[ninitiator].raddr));
sin = (struct sockaddr_in *)&cookiecache[ninitiator].iaddr;
sizeof(cookiecache[ninitiator].raddr));
sin = (struct sockaddr_in *)&cookiecache[ninitiator].iaddr;
+#ifdef HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
sin = (struct sockaddr_in *)&cookiecache[ninitiator].raddr;
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
sin = (struct sockaddr_in *)&cookiecache[ninitiator].raddr;
+#ifdef HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst));
break;
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst));
break;
ip6 = (struct ip6_hdr *)bp2;
sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].iaddr;
ip6 = (struct ip6_hdr *)bp2;
sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].iaddr;
+#ifdef HAVE_SOCKADDR_SA_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
sin6->sin6_len = sizeof(struct sockaddr_in6);
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].raddr;
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].raddr;
+#ifdef HAVE_SOCKADDR_SA_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
sin6->sin6_len = sizeof(struct sockaddr_in6);
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
break;
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
break;
switch (ip->ip_v) {
case 4:
sin = (struct sockaddr_in *)&ss;
switch (ip->ip_v) {
case 4:
sin = (struct sockaddr_in *)&ss;
+#ifdef HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_len = sizeof(struct sockaddr_in);
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
break;
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
break;
case 6:
ip6 = (struct ip6_hdr *)bp2;
sin6 = (struct sockaddr_in6 *)&ss;
case 6:
ip6 = (struct ip6_hdr *)bp2;
sin6 = (struct sockaddr_in6 *)&ss;
+#ifdef HAVE_SOCKADDR_SA_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
sin6->sin6_len = sizeof(struct sockaddr_in6);
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
break;
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
break;
#ifndef lint
static const char rcsid[] =
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.9 1999-10-30 05:11:19 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.10 1999-10-30 07:36:38 itojun Exp $ (LBL)";
#endif
#include <sys/param.h>
#endif
#include <sys/param.h>
#include <netinet6/pim6.h>
#else
struct pim {
#include <netinet6/pim6.h>
#else
struct pim {
-#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
+#if defined(WORDS_BIGENDIAN) || (defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN))
u_char pim_type:4, /* the PIM message type, currently they are:
* Hello, Register, Register-Stop, Join/Prune,
* Bootstrap, Assert, Graft (PIM-DM only),
u_char pim_type:4, /* the PIM message type, currently they are:
* Hello, Register, Register-Stop, Join/Prune,
* Bootstrap, Assert, Graft (PIM-DM only),
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.132 1999-10-30 05:11:23 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.133 1999-10-30 07:36:39 itojun Exp $ (LBL)";
putchar('\n');
while (nshorts >= 0) {
putchar('\n');
while (nshorts >= 0) {
- snprintf(line+20+i*5, 7, "%02x%02x ", cp[0], cp[1]);
+ sprintf(line+20+i*5, "%02x%02x ", cp[0], cp[1]);
if(isprint(cp[0])) {
line[62+i*2]=cp[0];
if(isprint(cp[0])) {
line[62+i*2]=cp[0];