Index: ethereal/.cvsignore
diff -c /dev/null ethereal/.cvsignore:1.2
*** /dev/null	Mon Mar  8 12:39:54 1999
--- ethereal/.cvsignore	Wed Jan  6 13:52:20 1999
***************
*** 0 ****
--- 1,8 ----
+ Makefile
+ config.cache
+ config.h
+ config.log
+ config.status
+ ethereal
+ rdps
+ stamp-h
Index: ethereal/Makefile.am
diff -c ethereal/Makefile.am:1.1.1.1 ethereal/Makefile.am:1.3
*** ethereal/Makefile.am:1.1.1.1	Wed Jan  6 12:34:36 1999
--- ethereal/Makefile.am	Sun Mar  7 17:08:08 1999
***************
*** 27,32 ****
--- 27,34 ----
  	packet-llc.c   \
  	packet-lpd.c   \
  	packet-ip.c    \
+ 	packet-icmpv6.c \
+ 	packet-ipsec.c \
  	packet-ipv6.c  \
  	packet-ipx.c   \
  	packet-nbipx.c \
Index: ethereal/Makefile.in
diff -c ethereal/Makefile.in:1.1.1.1 ethereal/Makefile.in:1.4
*** ethereal/Makefile.in:1.1.1.1	Wed Jan  6 12:34:36 1999
--- ethereal/Makefile.in	Sun Mar  7 17:08:09 1999
***************
*** 102,107 ****
--- 102,109 ----
  	packet-llc.c   \
  	packet-lpd.c   \
  	packet-ip.c    \
+ 	packet-ipsec.c  \
+ 	packet-icmpv6.c  \
  	packet-ipv6.c  \
  	packet-ipx.c   \
  	packet-nbipx.c \
***************
*** 185,191 ****
  filter.o follow.o menu.o packet.o packet-aarp.o packet-arp.o \
  packet-atalk.o packet-bootp.o packet-cdp.o packet-data.o packet-dns.o \
  packet-eth.o packet-fddi.o packet-giop.o packet-llc.o packet-lpd.o \
! packet-ip.o packet-ipv6.o packet-ipx.o packet-nbipx.o packet-nbns.o \
  packet-ncp.o packet-null.o packet-osi.o packet-ospf.o packet-ppp.o \
  packet-raw.o packet-rip.o packet-tcp.o packet-tr.o packet-trmac.o \
  packet-udp.o packet-vines.o prefs.o print.o ps.o resolv.o util.o
--- 187,193 ----
  filter.o follow.o menu.o packet.o packet-aarp.o packet-arp.o \
  packet-atalk.o packet-bootp.o packet-cdp.o packet-data.o packet-dns.o \
  packet-eth.o packet-fddi.o packet-giop.o packet-llc.o packet-lpd.o \
! packet-ip.o packet-ipsec.o packet-icmpv6.o packet-ipv6.o packet-ipx.o packet-nbipx.o packet-nbns.o \
  packet-ncp.o packet-null.o packet-osi.o packet-ospf.o packet-ppp.o \
  packet-raw.o packet-rip.o packet-tcp.o packet-tr.o packet-trmac.o \
  packet-udp.o packet-vines.o prefs.o print.o ps.o resolv.o util.o
***************
*** 474,537 ****
  	  (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
  	    || exit 1; \
  	done
- capture.o: capture.c config.h ethereal.h packet.h file.h capture.h \
- 	etypes.h util.h prefs.h
- column.o: column.c config.h ethereal.h prefs.h column.h
- ethereal.o: ethereal.c config.h ethereal.h capture.h packet.h file.h \
- 	menu.h etypes.h prefs.h column.h print.h resolv.h follow.h \
- 	util.h
- ethertype.o: ethertype.c config.h ethereal.h packet.h etypes.h
- file.o: file.c config.h ethereal.h menu.h packet.h file.h util.h
- filter.o: filter.c config.h ethereal.h filter.h packet.h file.h menu.h \
- 	prefs.h
- follow.o: follow.c config.h ethereal.h packet.h follow.h
- menu.o: menu.c config.h ethereal.h menu.h capture.h packet.h prefs.h \
- 	print.h follow.h
- packet-aarp.o: packet-aarp.c config.h ethereal.h packet.h etypes.h
- packet-arp.o: packet-arp.c config.h ethereal.h packet.h etypes.h
- packet-atalk.o: packet-atalk.c config.h ethereal.h packet.h etypes.h \
- 	resolv.h
- packet-bootp.o: packet-bootp.c config.h ethereal.h packet.h etypes.h
- packet-cdp.o: packet-cdp.c config.h ethereal.h packet.h
- packet-data.o: packet-data.c config.h ethereal.h packet.h
- packet-dns.o: packet-dns.c config.h ethereal.h packet.h packet-dns.h
- packet-eth.o: packet-eth.c config.h ethereal.h packet.h etypes.h \
- 	resolv.h
- packet-fddi.o: packet-fddi.c config.h ethereal.h packet.h resolv.h
- packet-giop.o: packet-giop.c config.h ethereal.h packet.h
- packet-ip.o: packet-ip.c config.h ethereal.h packet.h etypes.h resolv.h \
- 	util.h
- packet-ipv6.o: packet-ipv6.c config.h ethereal.h packet.h packet-ipv6.h \
- 	etypes.h
- packet-ipx.o: packet-ipx.c config.h ethereal.h packet.h packet-ipx.h
- packet-llc.o: packet-llc.c config.h ethereal.h packet.h etypes.h
- packet-lpd.o: packet-lpd.c config.h ethereal.h packet.h etypes.h
- packet-nbipx.o: packet-nbipx.c config.h ethereal.h packet.h packet-ipx.h
- packet-nbns.o: packet-nbns.c config.h ethereal.h packet.h packet-dns.h
- packet-ncp.o: packet-ncp.c config.h ethereal.h packet.h packet-ipx.h \
- 	packet-ncp.h
- packet-null.o: packet-null.c config.h ethereal.h packet.h
- packet-osi.o: packet-osi.c config.h ethereal.h packet.h
- packet-ospf.o: packet-ospf.c config.h ethereal.h packet.h packet-ospf.h
- packet-ppp.o: packet-ppp.c config.h ethereal.h packet.h
- packet-raw.o: packet-raw.c config.h ethereal.h packet.h
- packet-rip.o: packet-rip.c config.h ethereal.h packet.h packet-rip.h
- packet-tcp.o: packet-tcp.c config.h ethereal.h packet.h resolv.h \
- 	follow.h util.h
- packet-tr.o: packet-tr.c config.h ethereal.h packet.h etypes.h
- packet-trmac.o: packet-trmac.c config.h ethereal.h packet.h etypes.h
- packet-udp.o: packet-udp.c config.h ethereal.h packet.h resolv.h
- packet-vines.o: packet-vines.c config.h ethereal.h packet.h etypes.h \
- 	packet-vines.h
- packet.o: packet.c config.h ethereal.h packet.h etypes.h file.h
- prefs.o: prefs.c config.h ethereal.h packet.h file.h prefs.h column.h \
- 	print.h filter.h util.h
- print.o: print.c config.h ethereal.h packet.h prefs.h print.h ps.h
- ps.o: ps.c ps.h
- resolv.o: resolv.c config.h ethereal.h packet.h resolv.h
- util.o: util.c config.h packet.h util.h image/icon-excl.xpm \
- 	image/icon-ethereal.xpm
- 
  info: info-recursive
  dvi: dvi-recursive
  check: all-am
--- 476,481 ----
Index: ethereal/aclocal.m4
diff -c ethereal/aclocal.m4:1.1.1.1 ethereal/aclocal.m4:1.2
*** ethereal/aclocal.m4:1.1.1.1	Wed Jan  6 12:34:36 1999
--- ethereal/aclocal.m4	Wed Jan  6 13:52:22 1999
***************
*** 244,253 ****
  main ()
  {
    int major, minor, micro;
  
    system ("touch conf.gtktest");
  
!   if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
       printf("%s, bad version string\n", "$min_gtk_version");
       exit(1);
     }
--- 244,256 ----
  main ()
  {
    int major, minor, micro;
+   char *tmp_version;
  
    system ("touch conf.gtktest");
  
!   /* HP/UX 9 (%@#!) writes to sscanf strings */
!   tmp_version = g_strdup("$min_gtk_version");
!   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
       printf("%s, bad version string\n", "$min_gtk_version");
       exit(1);
     }
Index: ethereal/config.h
diff -c ethereal/config.h:1.1.1.1 ethereal/config.h:removed
*** ethereal/config.h:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/config.h	Mon Mar  8 12:39:58 1999
***************
*** 1,52 ****
- /* config.h.  Generated automatically by configure.  */
- /* config.h.in.  Generated automatically from configure.in by autoheader.  */
- 
- /* Define if you have the ANSI C header files.  */
- #define STDC_HEADERS 1
- 
- /* Define if your processor stores words with the most significant
-    byte first (like Motorola and SPARC, unlike Intel and VAX).  */
- /* #undef WORDS_BIGENDIAN */
- 
- #define PACKAGE "ethereal"
- 
- #define VERSION "0.5.1"
- 
- /* #undef HAVE_SA_LEN */
- 
- #define DATAFILE_DIR "/usr/local/etc"
- 
- /* #undef NEED_SNPRINTF_H */
- 
- /* Define this to use the wiretap library */
- /* #undef WITH_WIRETAP */
- 
- /* Define if you have the <fcntl.h> header file.  */
- #define HAVE_FCNTL_H 1
- 
- /* Define if you have the <netinet/in.h> header file.  */
- #define HAVE_NETINET_IN_H 1
- 
- /* Define if you have the <stdarg.h> header file.  */
- #define HAVE_STDARG_H 1
- 
- /* Define if you have the <strings.h> header file.  */
- #define HAVE_STRINGS_H 1
- 
- /* Define if you have the <sys/ioctl.h> header file.  */
- #define HAVE_SYS_IOCTL_H 1
- 
- /* Define if you have the <sys/sockio.h> header file.  */
- /* #undef HAVE_SYS_SOCKIO_H */
- 
- /* Define if you have the <sys/time.h> header file.  */
- #define HAVE_SYS_TIME_H 1
- 
- /* Define if you have the <sys/types.h> header file.  */
- #define HAVE_SYS_TYPES_H 1
- 
- /* Define if you have the <unistd.h> header file.  */
- #define HAVE_UNISTD_H 1
- 
- /* Define if you have the pcap library (-lpcap).  */
- #define HAVE_LIBPCAP 1
--- 0 ----
Index: ethereal/configure
diff -c ethereal/configure:1.1.1.1 ethereal/configure:1.2
*** ethereal/configure:1.1.1.1	Wed Jan  6 12:34:36 1999
--- ethereal/configure	Wed Jan  6 13:52:23 1999
***************
*** 1516,1528 ****
  
  
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1521: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1526 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 1516,1660 ----
  
  
  
+ 	v6type=unknown
+ 	v6lib=none
+ 
+ 	echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
+ echo "configure:1524: checking ipv6 stack type" >&5
+ 	for i in v6d toshiba kame inria zeta linux; do
+ 		case $i in
+ 		v6d)
+ 			cat > conftest.$ac_ext <<EOF
+ #line 1529 "configure"
+ #include "confdefs.h"
+ dnl
+ #include </usr/local/v6/include/sys/types.h>
+ #ifdef __V6D__
+ yes
+ #endif
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   egrep "yes" >/dev/null 2>&1; then
+   rm -rf conftest*
+   v6type=$i; v6lib=v6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-I/usr/local/v6/include $CFLAGS"
+ fi
+ rm -f conftest*
+ 
+ 			;;
+ 		toshiba)
+ 			cat > conftest.$ac_ext <<EOF
+ #line 1549 "configure"
+ #include "confdefs.h"
+ dnl
+ #include <sys/param.h>
+ #ifdef _TOSHIBA_INET6
+ yes
+ #endif
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   egrep "yes" >/dev/null 2>&1; then
+   rm -rf conftest*
+   v6type=$i; v6lib=inet6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-DINET6 $CFLAGS"
+ fi
+ rm -f conftest*
+ 
+ 			;;
+ 		kame)
+ 			cat > conftest.$ac_ext <<EOF
+ #line 1569 "configure"
+ #include "confdefs.h"
+ dnl
+ #include <netinet/in.h>
+ #ifdef __KAME__
+ yes
+ #endif
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   egrep "yes" >/dev/null 2>&1; then
+   rm -rf conftest*
+   v6type=$i; v6lib=inet6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-DINET6 $CFLAGS"
+ fi
+ rm -f conftest*
+ 
+ 			;;
+ 		inria)
+ 			cat > conftest.$ac_ext <<EOF
+ #line 1589 "configure"
+ #include "confdefs.h"
+ dnl
+ #include <netinet/in.h>
+ #ifdef IPV6_INRIA_VERSION
+ yes
+ #endif
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   egrep "yes" >/dev/null 2>&1; then
+   rm -rf conftest*
+   v6type=$i; CFLAGS="-DINET6 $CFLAGS"
+ fi
+ rm -f conftest*
+ 
+ 			;;
+ 		zeta)
+ 			cat > conftest.$ac_ext <<EOF
+ #line 1607 "configure"
+ #include "confdefs.h"
+ dnl
+ #include <sys/param.h>
+ #ifdef _ZETA_MINAMI_INET6
+ yes
+ #endif
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   egrep "yes" >/dev/null 2>&1; then
+   rm -rf conftest*
+   v6type=$i; v6lib=inet6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-DINET6 $CFLAGS"
+ fi
+ rm -f conftest*
+ 
+ 			;;
+ 		linux)
+ 			if test -d /usr/inet6; then
+ 				v6type=$i
+ 				v6lib=inet6
+ 				v6libdir=/usr/inet6
+ 				CFLAGS="-DINET6 $CFLAGS"
+ 			fi
+ 			;;
+ 		esac
+ 		if test "$v6type" != "unknown"; then
+ 			break
+ 		fi
+ 	done
+ 
+ 	if test "$v6lib" != "none"; then
+ 		for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
+ 			if test -d $dir -a -f $dir/lib$v6lib.a; then
+ 				LIBS="-L$dir -l$v6lib $LIBS"
+ 				break
+ 			fi
+ 		done
+ 		enable_ipv6="yes"
+ 	else
+ 		enable_ipv6="no"
+ 	fi
+ 	echo "$ac_t"""$v6type, $enable_ipv6"" 1>&6
+ 
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1653: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1658 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 1530,1536 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1662,1668 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1547,1553 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1551 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 1679,1685 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1683 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 1565,1571 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1569 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 1697,1703 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1701 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 1586,1592 ****
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1590 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1718,1724 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1722 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1597,1603 ****
  exit (0); }
  
  EOF
! if { (eval echo configure:1601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 1729,1735 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 1624,1640 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1628: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1633 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1756,1772 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1760: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1765 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1665,1681 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1669: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1674 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1797,1813 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1801: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1806 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1708,1719 ****
  # for get_interface_list().
  
  echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
! echo "configure:1712: checking for sa_len in struct sockaddr" >&5
  if eval "test \"`echo '$''{'ac_cv_ethereal_struct_sa_len'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1717 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/socket.h>
--- 1840,1851 ----
  # for get_interface_list().
  
  echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
! echo "configure:1844: checking for sa_len in struct sockaddr" >&5
  if eval "test \"`echo '$''{'ac_cv_ethereal_struct_sa_len'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1849 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/socket.h>
***************
*** 1721,1727 ****
  struct sockaddr s; s.sa_len;
  ; return 0; }
  EOF
! if { (eval echo configure:1725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_ethereal_struct_sa_len=yes
  else
--- 1853,1859 ----
  struct sockaddr s; s.sa_len;
  ; return 0; }
  EOF
! if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_ethereal_struct_sa_len=yes
  else
***************
*** 1744,1757 ****
  
  # We must know our byte order
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:1748: checking whether byte ordering is bigendian" >&5
  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_bigendian=unknown
  # See if sys/param.h defines the BYTE_ORDER macro.
  cat > conftest.$ac_ext <<EOF
! #line 1755 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 1876,1889 ----
  
  # We must know our byte order
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:1880: checking whether byte ordering is bigendian" >&5
  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_bigendian=unknown
  # See if sys/param.h defines the BYTE_ORDER macro.
  cat > conftest.$ac_ext <<EOF
! #line 1887 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 1762,1772 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    # It does; now see whether it defined to BIG_ENDIAN or not.
  cat > conftest.$ac_ext <<EOF
! #line 1770 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 1894,1904 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    # It does; now see whether it defined to BIG_ENDIAN or not.
  cat > conftest.$ac_ext <<EOF
! #line 1902 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 1777,1783 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
--- 1909,1915 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
***************
*** 1797,1803 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 1801 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
--- 1929,1935 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 1933 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
***************
*** 1810,1816 ****
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_bigendian=no
  else
--- 1942,1948 ----
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_bigendian=no
  else
***************
*** 1836,1848 ****
  
  if test $ac_cv_prog_gcc = yes; then
      echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
! echo "configure:1840: checking whether ${CC-cc} needs -traditional" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
      ac_pattern="Autoconf.*'x'"
    cat > conftest.$ac_ext <<EOF
! #line 1846 "configure"
  #include "confdefs.h"
  #include <sgtty.h>
  Autoconf TIOCGETP
--- 1968,1980 ----
  
  if test $ac_cv_prog_gcc = yes; then
      echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
! echo "configure:1972: checking whether ${CC-cc} needs -traditional" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
      ac_pattern="Autoconf.*'x'"
    cat > conftest.$ac_ext <<EOF
! #line 1978 "configure"
  #include "confdefs.h"
  #include <sgtty.h>
  Autoconf TIOCGETP
***************
*** 1860,1866 ****
  
    if test $ac_cv_prog_gcc_traditional = no; then
      cat > conftest.$ac_ext <<EOF
! #line 1864 "configure"
  #include "confdefs.h"
  #include <termio.h>
  Autoconf TCGETA
--- 1992,1998 ----
  
    if test $ac_cv_prog_gcc_traditional = no; then
      cat > conftest.$ac_ext <<EOF
! #line 1996 "configure"
  #include "confdefs.h"
  #include <termio.h>
  Autoconf TCGETA
***************
*** 1882,1893 ****
  fi
  
  echo $ac_n "checking for socket""... $ac_c" 1>&6
! echo "configure:1886: checking for socket" >&5
  if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1891 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char socket(); below.  */
--- 2014,2025 ----
  fi
  
  echo $ac_n "checking for socket""... $ac_c" 1>&6
! echo "configure:2018: checking for socket" >&5
  if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2023 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char socket(); below.  */
***************
*** 1910,1916 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_socket=yes"
  else
--- 2042,2048 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_socket=yes"
  else
***************
*** 1936,1947 ****
  SNPRINTF_C=""
  SNPRINTF_O=""
  echo $ac_n "checking for snprintf""... $ac_c" 1>&6
! echo "configure:1940: checking for snprintf" >&5
  if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1945 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char snprintf(); below.  */
--- 2068,2079 ----
  SNPRINTF_C=""
  SNPRINTF_O=""
  echo $ac_n "checking for snprintf""... $ac_c" 1>&6
! echo "configure:2072: checking for snprintf" >&5
  if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2077 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char snprintf(); below.  */
***************
*** 1964,1970 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_snprintf=yes"
  else
--- 2096,2102 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_snprintf=yes"
  else
Index: ethereal/configure.in
diff -c ethereal/configure.in:1.1.1.1 ethereal/configure.in:1.2
*** ethereal/configure.in:1.1.1.1	Wed Jan  6 12:34:36 1999
--- ethereal/configure.in	Wed Jan  6 13:52:24 1999
***************
*** 94,99 ****
--- 94,183 ----
  AC_SUBST(LIBWIRETAP_A)
  AC_SUBST(WIRETAP_DIR)
  
+ dnl guess IPv6 stack type.
+ dnl if test "$enable_ipv6" != "no"; then
+ 	v6type=unknown
+ 	v6lib=none
+ 
+ 	AC_MSG_CHECKING([ipv6 stack type])
+ 	for i in v6d toshiba kame inria zeta linux; do
+ 		case $i in
+ 		v6d)
+ 			AC_EGREP_CPP(yes, [dnl
+ #include </usr/local/v6/include/sys/types.h>
+ #ifdef __V6D__
+ yes
+ #endif],
+ 				[v6type=$i; v6lib=v6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-I/usr/local/v6/include $CFLAGS"])
+ 			;;
+ 		toshiba)
+ 			AC_EGREP_CPP(yes, [dnl
+ #include <sys/param.h>
+ #ifdef _TOSHIBA_INET6
+ yes
+ #endif],
+ 				[v6type=$i; v6lib=inet6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-DINET6 $CFLAGS"])
+ 			;;
+ 		kame)
+ 			AC_EGREP_CPP(yes, [dnl
+ #include <netinet/in.h>
+ #ifdef __KAME__
+ yes
+ #endif],
+ 				[v6type=$i; v6lib=inet6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-DINET6 $CFLAGS"])
+ 			;;
+ 		inria)
+ 			AC_EGREP_CPP(yes, [dnl
+ #include <netinet/in.h>
+ #ifdef IPV6_INRIA_VERSION
+ yes
+ #endif],
+ 				[v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
+ 			;;
+ 		zeta)
+ 			AC_EGREP_CPP(yes, [dnl
+ #include <sys/param.h>
+ #ifdef _ZETA_MINAMI_INET6
+ yes
+ #endif],
+ 				[v6type=$i; v6lib=inet6;
+ 				v6libdir=/usr/local/v6/lib;
+ 				CFLAGS="-DINET6 $CFLAGS"])
+ 			;;
+ 		linux)
+ 			if test -d /usr/inet6; then
+ 				v6type=$i
+ 				v6lib=inet6
+ 				v6libdir=/usr/inet6
+ 				CFLAGS="-DINET6 $CFLAGS"
+ 			fi
+ 			;;
+ 		esac
+ 		if test "$v6type" != "unknown"; then
+ 			break
+ 		fi
+ 	done
+ 
+ 	if test "$v6lib" != "none"; then
+ 		for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
+ 			if test -d $dir -a -f $dir/lib$v6lib.a; then
+ 				LIBS="-L$dir -l$v6lib $LIBS"
+ 				break
+ 			fi
+ 		done
+ 		enable_ipv6="yes"
+ 	else
+ 		enable_ipv6="no"
+ 	fi
+ 	AC_MSG_RESULT(["$v6type, $enable_ipv6"])
+ dnl fi
+ 
  dnl Checks for header files.
  AC_HEADER_STDC
  AC_CHECK_HEADERS(fcntl.h strings.h sys/ioctl.h sys/time.h unistd.h stdarg.h)
Index: ethereal/packet-icmpv6.c
diff -c /dev/null ethereal/packet-icmpv6.c:1.3
*** /dev/null	Mon Mar  8 12:40:02 1999
--- ethereal/packet-icmpv6.c	Mon Mar  8 12:19:33 1999
***************
*** 0 ****
--- 1,470 ----
+ /* packet-icmpv6.c
+  * Routines for ICMPv6 packet disassembly 
+  *
+  * $Id: packet-icmpv6.c,v 1.3 1999/03/08 03:19:33 itojun Exp $
+  *
+  * Ethereal - Network traffic analyzer
+  * By Gerald Combs <gerald@zing.org>
+  * Copyright 1998 Gerald Combs
+  *
+  * 
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License
+  * as published by the Free Software Foundation; either version 2
+  * of the License, or (at your option) any later version.
+  * 
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  * 
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, write to the Free Software
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+  */
+ 
+ #ifdef HAVE_CONFIG_H
+ # include "config.h"
+ #endif
+ 
+ #include <gtk/gtk.h>
+ 
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ 
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ 
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+ 
+ #include "ethereal.h"
+ #include "packet.h"
+ #include "packet-ipv6.h"
+ #include "etypes.h"
+ #include "resolv.h"
+ #include "util.h"
+ 
+ #ifndef offsetof
+ #define	offsetof(type, member)	((size_t)(&((type *)0)->member))
+ #endif
+ 
+ static void
+ dissect_icmpv6opt(const u_char *pd, int offset, frame_data *fd, GtkTree *tree)
+ {
+     GtkWidget *icmp6opt_tree, *ti;
+     GtkWidget *field_tree, *tf;
+     struct nd_opt_hdr *opt;
+     int len;
+     char *typename;
+ 
+     if (!tree)
+ 	return;
+ 
+ again:
+     if (!(fd->cap_len > offset))
+ 	return;
+ 
+     opt = (struct nd_opt_hdr *)&pd[offset];
+     len = opt->nd_opt_len << 3;
+ 
+     /* !!! specify length */
+     ti = add_item_to_tree(GTK_WIDGET(tree), offset, len, "ICMPv6 options");
+     icmp6opt_tree = gtk_tree_new();
+     add_subtree(ti, icmp6opt_tree, ETT_ICMPv6OPT);
+ 
+     switch (opt->nd_opt_type) {
+     case ND_OPT_SOURCE_LINKADDR:
+ 	typename = "Source link-layer address";
+ 	break;
+     case ND_OPT_TARGET_LINKADDR:
+ 	typename = "Target link-layer address";
+ 	break;
+     case ND_OPT_PREFIX_INFORMATION:
+ 	typename = "Prefix information";
+ 	break;
+     case ND_OPT_REDIRECTED_HEADER:
+ 	typename = "Redirected header";
+ 	break;
+     case ND_OPT_MTU:
+ 	typename = "MTU";
+ 	break;
+     default:
+ 	typename = "Unknown";
+ 	break;
+     }
+ 
+     add_item_to_tree(icmp6opt_tree,
+ 	offset + offsetof(struct nd_opt_hdr, nd_opt_type), 1,
+ 	"Type: %s (0x%02x)", typename, opt->nd_opt_type);
+     add_item_to_tree(icmp6opt_tree,
+ 	offset + offsetof(struct nd_opt_hdr, nd_opt_len), 1,
+ 	"Length: %d bytes (0x%02x)", opt->nd_opt_len << 3, opt->nd_opt_len);
+ 
+     /* decode... */
+     switch (opt->nd_opt_type) {
+     case ND_OPT_SOURCE_LINKADDR:
+     case ND_OPT_TARGET_LINKADDR:
+       {
+ 	char *t;
+ 	const char *p;
+ 	int len, i;
+ 	len = (opt->nd_opt_len << 3) - sizeof(*opt);
+ 	t = (char *)malloc(len * 3);
+ 	memset(t, 0, len * 3);
+ 	p = &pd[offset + sizeof(*opt)];
+ 	for (i = 0; i < len; i++) {
+ 	    if (i)
+ 		t[i * 3 - 1] = ':';
+ 	    sprintf(&t[i * 3], "%02x", p[i] & 0xff);
+ 	}
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + sizeof(*opt), len, "Link-layer address: %s", t);
+ 	break;
+       }
+     case ND_OPT_PREFIX_INFORMATION:
+       {
+ 	struct nd_opt_prefix_info *pi = (struct nd_opt_prefix_info *)opt;
+ 	int flagoff;
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + offsetof(struct nd_opt_prefix_info, nd_opt_pi_prefix_len),
+ 	    1, "Prefix length: %d", pi->nd_opt_pi_prefix_len);
+ 
+ 	flagoff = offsetof(struct nd_opt_prefix_info, nd_opt_pi_flags_reserved);
+ 	tf = add_item_to_tree(icmp6opt_tree, flagoff, 1, "Flags: 0x%02x",
+ 	    (u_int32_t)ntohl(pi->nd_opt_pi_flags_reserved));
+ 	field_tree = gtk_tree_new();
+ 	add_subtree(tf, field_tree, ETT_ICMPv6FLAG);
+ 	add_item_to_tree(field_tree, flagoff, 1, "%s",
+ 	    decode_boolean_bitfield(pi->nd_opt_pi_flags_reserved,
+ 		    0x80, 8, "Onlink", "Not onlink"));
+ 	add_item_to_tree(field_tree, flagoff, 1, "%s",
+ 	    decode_boolean_bitfield(pi->nd_opt_pi_flags_reserved,
+ 		    0x40, 8, "Auto", "Not auto"));
+ 
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + offsetof(struct nd_opt_prefix_info, nd_opt_pi_valid_time),
+ 	    4, "Valid lifetime: 0x%08x", pi->nd_opt_pi_valid_time);
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + offsetof(struct nd_opt_prefix_info, nd_opt_pi_preferred_time),
+ 	    4, "Preferred lifetime: 0x%08x", pi->nd_opt_pi_preferred_time);
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + offsetof(struct nd_opt_prefix_info, nd_opt_pi_prefix),
+ 	    16, "Prefix: %s", ip6_to_str(&pi->nd_opt_pi_prefix));
+ 	break;
+       }
+     case ND_OPT_REDIRECTED_HEADER:
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + 8, (opt->nd_opt_len << 3) - 8, "Redirected packet");
+ 	/* tiny sanity check */
+ 	if ((pd[offset + 8] & 0xf0) == 0x60)
+ 	    dissect_ipv6(pd, offset + 8, fd, (GtkTree *)icmp6opt_tree);
+ 	else
+ 	    dissect_data(pd, offset + 8, fd, (GtkTree *)icmp6opt_tree);
+ 	break;
+     case ND_OPT_MTU:
+       {
+ 	struct nd_opt_mtu *pi = (struct nd_opt_mtu *)opt;
+ 	add_item_to_tree(icmp6opt_tree,
+ 	    offset + offsetof(struct nd_opt_mtu, nd_opt_mtu_mtu), 4,
+ 	    "MTU: %d", pi->nd_opt_mtu_mtu);
+ 	break;
+       }
+     }
+ 
+     offset += (opt->nd_opt_len << 3);
+     goto again;
+ }
+ 
+ void
+ dissect_icmpv6(const u_char *pd, int offset, frame_data *fd, GtkTree *tree)
+ {
+     GtkWidget *icmp6_tree, *ti;
+     GtkWidget *field_tree, *tf;
+     struct icmp6_hdr *dp;
+     char *codename, *typename;
+     int len;
+ 
+     dp = (struct icmp6_hdr *)&pd[offset];
+     codename = typename = "unknown";
+     len = sizeof(*dp);
+     switch (dp->icmp6_type) {
+     case ICMP6_DST_UNREACH:
+ 	typename = "unreachable";
+ 	switch (dp->icmp6_code) {
+ 	case ICMP6_DST_UNREACH_NOROUTE:
+ 	    codename = "route unreachable";
+ 	    break;
+ 	case ICMP6_DST_UNREACH_ADMIN:
+ 	    codename = "administratively prohibited";
+ 	    break;
+ 	case ICMP6_DST_UNREACH_NOTNEIGHBOR:
+ 	    codename = "not a neighbor";
+ 	    break;
+ 	case ICMP6_DST_UNREACH_ADDR:
+ 	    codename = "address unreachable";
+ 	    break;
+ 	case ICMP6_DST_UNREACH_NOPORT:
+ 	    codename = "port unreachable";
+ 	    break;
+ 	}
+ 	break;
+     case ICMP6_PACKET_TOO_BIG:
+ 	typename = "too big";
+ 	codename = NULL;
+ 	break;
+     case ICMP6_TIME_EXCEEDED:
+ 	typename = "time exceeded";
+ 	switch (dp->icmp6_code) {
+ 	case ICMP6_TIME_EXCEED_TRANSIT:
+ 	    codename = "in-transit";
+ 	    break;
+ 	case ICMP6_TIME_EXCEED_REASSEMBLY:
+ 	    codename = "reassembly";
+ 	    break;
+ 	}
+     case ICMP6_PARAM_PROB:
+ 	typename = "parameter problem";
+ 	switch (dp->icmp6_code) {
+ 	case ICMP6_PARAMPROB_HEADER:
+ 	    codename = "header";
+ 	    break;
+ 	case ICMP6_PARAMPROB_NEXTHEADER:
+ 	    codename = "next header";
+ 	    break;
+ 	case ICMP6_PARAMPROB_OPTION:
+ 	    codename = "option";
+ 	    break;
+ 	}
+     case ICMP6_ECHO_REQUEST:
+ 	typename = "echo request";
+ 	codename = NULL;
+ 	break;
+     case ICMP6_ECHO_REPLY:
+ 	typename = "echo reply";
+ 	codename = NULL;
+ 	break;
+     case ICMP6_MEMBERSHIP_QUERY:
+ 	typename = "multicast listener query";
+ 	codename = NULL;
+ 	break;
+     case ICMP6_MEMBERSHIP_REPORT:
+ 	typename = "multicast listener report";
+ 	codename = NULL;
+ 	break;
+     case ICMP6_MEMBERSHIP_REDUCTION:
+ 	typename = "multicast listener done";
+ 	codename = NULL;
+ 	break;
+     case ND_ROUTER_SOLICIT:
+ 	typename = "router solicitation";
+ 	codename = NULL;
+ 	len = sizeof(struct nd_router_solicit);
+ 	break;
+     case ND_ROUTER_ADVERT:
+ 	typename = "router advertisement";
+ 	codename = NULL;
+ 	len = sizeof(struct nd_router_advert);
+ 	break;
+     case ND_NEIGHBOR_SOLICIT:
+ 	typename = "neighbor solicitation";
+ 	codename = NULL;
+ 	len = sizeof(struct nd_neighbor_solicit);
+ 	break;
+     case ND_NEIGHBOR_ADVERT:
+ 	typename = "neighbor advertisement";
+ 	codename = NULL;
+ 	len = sizeof(struct nd_neighbor_advert);
+ 	break;
+     case ND_REDIRECT:
+ 	typename = "redirect";
+ 	codename = NULL;
+ 	len = sizeof(struct nd_redirect);
+ 	break;
+     case ICMP6_ROUTER_RENUMBERING:
+ 	typename = "router renumbering";
+ 	switch (dp->icmp6_code) {
+ 	case ICMP6_ROUTER_RENUMBERING_COMMAND:
+ 	    codename = "command";
+ 	    break;
+ 	case ICMP6_ROUTER_RENUMBERING_RESULT:
+ 	    codename = "result";
+ 	    break;
+ 	}
+ 	break;
+     }
+ 
+     if (check_col(fd, COL_PROTOCOL))
+ 	col_add_str(fd, COL_PROTOCOL, "ICMPv6");
+     if (check_col(fd, COL_INFO)) {
+ 	char typebuf[256], codebuf[256];
+ 
+ 	if (typename && strcmp(typename, "unknown") == 0) {
+ 	    snprintf(typebuf, sizeof(typebuf), "unknown(0x%02x)",
+ 		dp->icmp6_type);
+ 	    typename = typebuf;
+ 	}
+ 	if (codename && strcmp(codename, "unknown") == 0) {
+ 	    snprintf(codebuf, sizeof(codebuf), "unknown(0x%02x)",
+ 		dp->icmp6_code);
+ 	    codename = codebuf;
+ 	}
+ 	if (codename) {
+ 	    col_add_fstr(fd, COL_INFO, "type=%s code=%s",
+ 		typename, codename);
+ 	} else {
+ 	    col_add_fstr(fd, COL_INFO, "type=%s", typename);
+ 	}
+     }
+ 
+     if (tree) {
+ 	/* !!! specify length */
+ 	ti = add_item_to_tree(GTK_WIDGET(tree), offset, len,
+ 	    "ICMPv6");
+ 	icmp6_tree = gtk_tree_new();
+ 	add_subtree(ti, icmp6_tree, ETT_ICMPv6);
+ 
+ 	add_item_to_tree(icmp6_tree,
+ 	    offset + offsetof(struct icmp6_hdr, icmp6_type), 1,
+ 	    "Type: %s (0x%02x)", typename, dp->icmp6_type);
+ 	if (codename) {
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct icmp6_hdr, icmp6_code), 1,
+ 		"Code: %s (0x%02x)", codename, dp->icmp6_code);
+ 	}
+ 	add_item_to_tree(icmp6_tree,
+ 	    offset + offsetof(struct icmp6_hdr, icmp6_cksum), 2,
+ 	    "Checksum: 0x%04x", (u_int16_t)htons(dp->icmp6_cksum));
+ 
+ 	/* decode... */
+ 	switch (dp->icmp6_type) {
+ 	case ICMP6_PACKET_TOO_BIG:
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct icmp6_hdr, icmp6_mtu), 4,
+ 		"MTU: %d", (u_int32_t)ntohl(dp->icmp6_mtu));
+ 	    dissect_data(pd, offset + sizeof(*dp), fd, tree);
+ 	    break;
+ 	case ICMP6_PARAM_PROB:
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct icmp6_hdr, icmp6_pptr), 4,
+ 		"Problem pointer: 0x%04x", (u_int32_t)ntohl(dp->icmp6_pptr));
+ 	    dissect_data(pd, offset + sizeof(*dp), fd, tree);
+ 	    break;
+ 	case ICMP6_ECHO_REQUEST:
+ 	case ICMP6_ECHO_REPLY:
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct icmp6_hdr, icmp6_id), 2,
+ 		"ID: 0x%04x", (u_int16_t)ntohs(dp->icmp6_id));
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct icmp6_hdr, icmp6_seq), 2,
+ 		"Sequence: 0x%04x", (u_int16_t)ntohs(dp->icmp6_seq));
+ 	    dissect_data(pd, offset + sizeof(*dp), fd, tree);
+ 	    break;
+ 	case ND_ROUTER_SOLICIT:
+ 	    dissect_icmpv6opt(pd, offset + sizeof(*dp), fd,
+ 	    	(GtkTree *)icmp6_tree);
+ 	    break;
+ 	case ND_ROUTER_ADVERT:
+ 	  {
+ 	    struct nd_router_advert *ra = (struct nd_router_advert *)dp;
+ 	    int flagoff;
+ 
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_router_advert, nd_ra_curhoplimit),
+ 		1, "Cur hop limit: %d", ra->nd_ra_curhoplimit);
+ 
+ 	    flagoff = offset + offsetof(struct nd_router_advert, nd_ra_flags_reserved);
+ 	    tf = add_item_to_tree(icmp6_tree, flagoff, 4, "Flags: 0x%08x",
+ 		(u_int32_t)ntohl(ra->nd_ra_flags_reserved));
+ 	    field_tree = gtk_tree_new();
+ 	    add_subtree(tf, field_tree, ETT_ICMPv6FLAG);
+ 	    add_item_to_tree(field_tree, flagoff, 4, "%s",
+ 		decode_boolean_bitfield(ntohl(ra->nd_ra_flags_reserved),
+ 			0x80000000, 32, "Managed", "Not managed"));
+ 	    add_item_to_tree(field_tree, flagoff, 4, "%s",
+ 		decode_boolean_bitfield(ntohl(ra->nd_ra_flags_reserved),
+ 			0x40000000, 32, "Other", "Not other"));
+ 
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_router_advert, nd_ra_router_lifetime),
+ 		2, "Router lifetime: %d",
+ 		(u_int16_t)ntohs(ra->nd_ra_router_lifetime));
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_router_advert, nd_ra_reachable), 4,
+ 		"Reachable time: %d", (u_int32_t)ntohl(ra->nd_ra_reachable));
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_router_advert, nd_ra_retransmit), 4,
+ 		"Retrans time: %d", (u_int32_t)ntohl(ra->nd_ra_retransmit));
+ 	    dissect_icmpv6opt(pd, offset + sizeof(*ra), fd,
+ 		(GtkTree *)icmp6_tree);
+ 	    break;
+ 	  }
+ 	case ND_NEIGHBOR_SOLICIT:
+ 	  {
+ 	    struct nd_neighbor_solicit *ns = (struct nd_neighbor_solicit *)dp;
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_neighbor_solicit, nd_ns_target), 16,
+ 		"Target: %s (%s)",
+ 		get_hostname6(&ns->nd_ns_target),
+ 		ip6_to_str(&ns->nd_ns_target));
+ 	    dissect_icmpv6opt(pd, offset + sizeof(*ns), fd,
+ 		(GtkTree *)icmp6_tree);
+ 	    break;
+ 	  }
+ 	case ND_NEIGHBOR_ADVERT:
+ 	  {
+ 	    struct nd_neighbor_advert *na = (struct nd_neighbor_advert *)dp;
+ 	    int flagoff;
+ 
+ 	    flagoff = offset + offsetof(struct nd_neighbor_advert, nd_na_flags_reserved);
+ 	    tf = add_item_to_tree(icmp6_tree, flagoff, 4, "Flags: 0x%08x",
+ 		(u_int32_t)ntohl(na->nd_na_flags_reserved));
+ 	    field_tree = gtk_tree_new();
+ 	    add_subtree(tf, field_tree, ETT_ICMPv6FLAG);
+ 	    add_item_to_tree(field_tree, flagoff, 4, "%s",
+ 		decode_boolean_bitfield(ntohl(na->nd_na_flags_reserved),
+ 			0x80000000, 32, "Router", "Not router"));
+ 	    add_item_to_tree(field_tree, flagoff, 4, "%s",
+ 		decode_boolean_bitfield(ntohl(na->nd_na_flags_reserved),
+ 			0x40000000, 32, "Solicited", "Not adverted"));
+ 	    add_item_to_tree(field_tree, flagoff, 4, "%s",
+ 		decode_boolean_bitfield(ntohl(na->nd_na_flags_reserved),
+ 			0x20000000, 32, "Override", "Not override"));
+ 
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_neighbor_advert, nd_na_target), 16,
+ 		"Target: %s (%s)",
+ 		get_hostname6(&na->nd_na_target),
+ 		ip6_to_str(&na->nd_na_target));
+ 	    dissect_icmpv6opt(pd, offset + sizeof(*na), fd,
+ 		(GtkTree *)icmp6_tree);
+ 	    break;
+ 	  }
+ 	case ND_REDIRECT:
+ 	  {
+ 	    struct nd_redirect *rd = (struct nd_redirect *)dp;
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_redirect, nd_rd_target), 16,
+ 		"Target: %s (%s)", get_hostname6(&rd->nd_rd_target),
+ 		ip6_to_str(&rd->nd_rd_target));
+ 	    add_item_to_tree(icmp6_tree,
+ 		offset + offsetof(struct nd_redirect, nd_rd_dst), 16,
+ 		"Destination: %s (%s)", get_hostname6(&rd->nd_rd_dst),
+ 		ip6_to_str(&rd->nd_rd_dst));
+ 	    dissect_icmpv6opt(pd, offset + sizeof(*rd), fd,
+ 		(GtkTree *)icmp6_tree);
+ 	    break;
+ 	  }
+ 	default:
+ 	    dissect_data(pd, offset + sizeof(*dp), fd, tree);
+ 	    break;
+ 	}
+     }
+ }
Index: ethereal/packet-ip.c
diff -c ethereal/packet-ip.c:1.1.1.1 ethereal/packet-ip.c:1.3
*** ethereal/packet-ip.c:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/packet-ip.c	Fri Mar  5 23:34:41 1999
***************
*** 402,407 ****
--- 402,409 ----
  		  { IPTOS_PREC_INTERNETCONTROL, "internetwork control" },
  		  { IPTOS_PREC_NETCONTROL,      "network control"      },
  		  { 0,                          NULL                   } };
+   int advance;
+   u_int8_t nxt;
  
    /* To do: check for runts, errs, etc. */
    /* Avoids alignment problems on many architectures. */
***************
*** 419,424 ****
--- 421,429 ----
      case IP_PROTO_TCP:
      case IP_PROTO_UDP:
      case IP_PROTO_OSPF:
+     case IPPROTO_ESP:
+     case IPPROTO_AH:
+     case IPPROTO_IPV6:
        /* Names are set in the associated dissect_* routines */
        break;
      default:
***************
*** 538,544 ****
    pi.ip_src = iph.ip_src;
  
    offset += hlen;
!   switch (iph.ip_p) {
      case IP_PROTO_ICMP:
        dissect_icmp(pd, offset, fd, tree);
       break;
--- 543,560 ----
    pi.ip_src = iph.ip_src;
  
    offset += hlen;
!   nxt = iph.ip_p;
!   if (iph.ip_off & IP_OFFSET) {
!     /* fragmented */
!     if (check_col(fd, COL_INFO))
!       col_add_fstr(fd, COL_INFO, "Fragmented IP protocol (proto=%02x, off=%d)",
! 	iph.ip_p, iph.ip_off & IP_OFFSET);
!     dissect_data(pd, offset, fd, tree);
!     return;
!   }
! 
! again:
!   switch (nxt) {
      case IP_PROTO_ICMP:
        dissect_icmp(pd, offset, fd, tree);
       break;
***************
*** 554,559 ****
--- 570,586 ----
      case IP_PROTO_OSPF:
        dissect_ospf(pd, offset, fd, tree);
       break;
+     case IPPROTO_AH:
+       advance = dissect_ah(pd, offset, fd, tree);
+       nxt = pd[offset];
+       offset += advance;
+       goto again;
+     case IPPROTO_ESP:
+       dissect_esp(pd, offset, fd, tree);
+       break;
+     case IPPROTO_IPV6:
+       dissect_ipv6(pd, offset, fd, tree);
+       break;
    }
  }
  
Index: ethereal/packet-ipsec.c
diff -c /dev/null ethereal/packet-ipsec.c:1.4
*** /dev/null	Mon Mar  8 12:40:05 1999
--- ethereal/packet-ipsec.c	Mon Mar  8 12:19:34 1999
***************
*** 0 ****
--- 1,153 ----
+ /* packet-ipsec.c
+  * Routines for IPsec packet disassembly 
+  *
+  * $Id: packet-ipsec.c,v 1.4 1999/03/08 03:19:34 itojun Exp $
+  *
+  * Ethereal - Network traffic analyzer
+  * By Gerald Combs <gerald@zing.org>
+  * Copyright 1998 Gerald Combs
+  *
+  * 
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License
+  * as published by the Free Software Foundation; either version 2
+  * of the License, or (at your option) any later version.
+  * 
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  * 
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, write to the Free Software
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+  */
+ 
+ #ifdef HAVE_CONFIG_H
+ # include "config.h"
+ #endif
+ 
+ #include <gtk/gtk.h>
+ 
+ #include <stdio.h>
+ 
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ 
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ 
+ #ifdef __KAME__
+ #include <sys/socket.h>
+ #include <net/route.h>
+ struct mbuf;
+ #include <netinet6/ipsec.h>
+ #include <netinet6/ah.h>
+ #include <netinet6/esp.h>
+ #else
+ struct newah {
+ 	u_int8_t	ah_nxt;		/* Next Header */
+ 	u_int8_t	ah_len;		/* Length of data + 1, in 32bit */
+ 	u_int16_t	ah_reserve;	/* Reserved for future use */
+ 	u_int32_t	ah_spi;		/* Security parameter index */
+ 	u_int32_t	ah_seq;		/* Sequence number field */
+ 	/* variable size, 32bit bound*/	/* Authentication data */
+ };
+ 
+ struct newesp {
+ 	u_int32_t	esp_spi;	/* ESP */
+ 	u_int32_t	esp_seq;	/* Sequence number */
+ 	/*variable size*/		/* (IV and) Payload data */
+ 	/*variable size*/		/* padding */
+ 	/*8bit*/			/* pad size */
+ 	/*8bit*/			/* next header */
+ 	/*8bit*/			/* next header */
+ 	/*variable size, 32bit bound*/	/* Authentication data */
+ };
+ #endif
+ 
+ #include "ethereal.h"
+ #include "packet.h"
+ #include "etypes.h"
+ #include "resolv.h"
+ 
+ #ifndef offsetof
+ #define	offsetof(type, member)	((size_t)(&((type *)0)->member))
+ #endif
+ 
+ int
+ dissect_ah(const u_char *pd, int offset, frame_data *fd, GtkTree *tree)
+ {
+     GtkWidget *ah_tree, *ti;
+     struct newah ah;
+     int advance;
+ 
+     memcpy(&ah, (void *) &pd[offset], sizeof(ah)); 
+     advance = sizeof(ah) + ((ah.ah_len - 1) << 2);
+ 
+     if (check_col(fd, COL_PROTOCOL))
+ 	col_add_str(fd, COL_PROTOCOL, "AH");
+     if (check_col(fd, COL_INFO)) {
+ 	col_add_fstr(fd, COL_INFO, "AH (SPI=%08x)",
+ 	    (u_int32_t)ntohl(ah.ah_spi));
+     }
+ 
+     if (tree) {
+ 	/* !!! specify length */
+ 	ti = add_item_to_tree(GTK_WIDGET(tree), offset, advance,
+ 	    "Authentication Header");
+ 	ah_tree = gtk_tree_new();
+ 	add_subtree(ti, ah_tree, ETT_AH);
+ 
+ 	add_item_to_tree(ah_tree, offset + offsetof(struct newah, ah_nxt), 1,
+ 	    "Next Header: %d", ah.ah_nxt);
+ 	add_item_to_tree(ah_tree, offset + offsetof(struct newah, ah_len), 1,
+ 	    "Length: %d", ah.ah_len << 2);
+ 	add_item_to_tree(ah_tree, offset + offsetof(struct newah, ah_spi), 4,
+ 	    "SPI: %08x", (u_int32_t)ntohl(ah.ah_spi));
+ 	add_item_to_tree(ah_tree, offset + offsetof(struct newah, ah_seq), 4,
+ 	    "Sequence?: %08x", (u_int32_t)ntohl(ah.ah_seq));
+ 	add_item_to_tree(ah_tree, offset + sizeof(ah), (ah.ah_len - 1) << 2,
+ 	    "ICV");
+     }
+ 
+     /* start of the new header (could be a extension header) */
+     return advance;
+ }
+ 
+ void
+ dissect_esp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree)
+ {
+     GtkWidget *ti, *esp_tree;
+     struct newesp esp;
+ 
+     memcpy(&esp, (void *) &pd[offset], sizeof(esp)); 
+ 
+     /*
+      * load the top pane info. This should be overwritten by
+      * the next protocol in the stack
+      */
+     if (check_col(fd, COL_PROTOCOL))
+ 	col_add_str(fd, COL_PROTOCOL, "ESP");
+     if (check_col(fd, COL_INFO)) {
+ 	col_add_fstr(fd, COL_INFO, "ESP (SPI=%08x)",
+ 	    (u_int32_t)ntohl(esp.esp_spi));
+     }
+ 
+     /*
+      * populate a tree in the second pane with the status of the link layer
+      * (ie none)
+      */
+     if(tree) {
+ 	ti = add_item_to_tree(GTK_WIDGET(tree), 0, 0,
+ 	    "Encapsulated Security Payload");
+ 	esp_tree = gtk_tree_new();
+ 	add_subtree(ti, esp_tree, ETT_ESP);
+ 	add_item_to_tree(esp_tree, offset + offsetof(struct newesp, esp_spi), 4,
+ 	    "SPI: %08x", (u_int32_t)ntohl(esp.esp_spi));
+ 	add_item_to_tree(esp_tree, offset + offsetof(struct newesp, esp_seq), 4,
+ 	    "Sequence?: %08x", (u_int32_t)ntohl(esp.esp_seq));
+     }
+ }
Index: ethereal/packet-ipv6.c
diff -c ethereal/packet-ipv6.c:1.1.1.1 ethereal/packet-ipv6.c:1.6
*** ethereal/packet-ipv6.c:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/packet-ipv6.c	Sun Mar  7 17:54:52 1999
***************
*** 39,73 ****
  # include <netinet/in.h>
  #endif
  
  #include "ethereal.h"
  #include "packet.h"
- #include "packet-ipv6.h"
  #include "etypes.h"
  
  void
  dissect_ipv6(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
    GtkWidget *ipv6_tree, *ti;
  
!   e_ipv6_header ipv6;
  
!   memcpy(&ipv6, (void *) &pd[offset], 8); 
  
!   switch(ipv6.next_header){
!       /*
!       case IP_PROTO_ICMP:
!       case IP_PROTO_IGMP:
!       case IP_PROTO_TCP:
!       case IP_PROTO_UDP:
!       case IP_PROTO_OSPF:
!       */
!       /* Names are set in the associated dissect_* routines */
!       /*    break; */
!      default:
!          if (check_col(fd, COL_PROTOCOL))
!              col_add_str(fd, COL_PROTOCOL, "IPv6");
!          if (check_col(fd, COL_INFO))
!              col_add_fstr(fd, COL_INFO, "IPv6 support is still under development (%d)", ipv6.next_header);
!   }
  
    if (tree) {
      /* !!! specify length */
--- 39,120 ----
  # include <netinet/in.h>
  #endif
  
+ #include <netinet/ip6.h>
+ #include <netinet/icmp6.h>
+ 
  #include "ethereal.h"
  #include "packet.h"
  #include "etypes.h"
+ #include "resolv.h"
+ 
+ #ifndef offsetof
+ #define	offsetof(type, member)	((size_t)(&((type *)0)->member))
+ #endif
+ 
+ static int
+ dissect_routing6(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
+     return 0;
+ }
+ 
+ static int
+ dissect_frag6(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
+     if (check_col(fd, COL_INFO)) {
+ 	col_add_fstr(fd, COL_INFO, "IPv6 fragment");
+     }
+     return 0;
+ }
+ 
+ static int
+ dissect_hopopts(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
+     return 0;
+ }
+ 
+ static int
+ dissect_dstopts(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
+     struct ip6_dest dstopt;
+     int len;
+     GtkWidget *dstopt_tree, *ti;
+ 
+     memcpy(&dstopt, (void *) &pd[offset], sizeof(dstopt)); 
+     len = (dstopt.ip6d_len + 1) << 3;
+ 
+     if (tree) {
+ 	/* !!! specify length */
+ 	ti = add_item_to_tree(GTK_WIDGET(tree), offset, len,
+ 	    "Destination Option Header");
+ 	dstopt_tree = gtk_tree_new();
+ 	add_subtree(ti, dstopt_tree, ETT_IPv6);
+ 
+ 	add_item_to_tree(dstopt_tree,
+ 	    offset + offsetof(struct ip6_dest, ip6d_len), 1,
+ 	    "Length: %d (%d bytes)", dstopt.ip6d_len, len);
  
+ 	/* decode... */
+     }
+ 
+     return len;
+ }
+ 
  void
  dissect_ipv6(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
    GtkWidget *ipv6_tree, *ti;
+   u_int8_t nxt;
+   int advance;
  
!   struct ip6_hdr ipv6;
  
!   memcpy(&ipv6, (void *) &pd[offset], sizeof(ipv6)); 
  
!   if (check_col(fd, COL_PROTOCOL))
!     col_add_str(fd, COL_PROTOCOL, "IPv6");
!   if (check_col(fd, COL_RES_NET_SRC))
!     col_add_str(fd, COL_RES_NET_SRC, get_hostname6(&ipv6.ip6_src));
!   if (check_col(fd, COL_UNRES_NET_SRC))
!     col_add_str(fd, COL_UNRES_NET_SRC, ip6_to_str(&ipv6.ip6_src));
!   if (check_col(fd, COL_RES_NET_DST))
!     col_add_str(fd, COL_RES_NET_DST, get_hostname6(&ipv6.ip6_dst));
!   if (check_col(fd, COL_UNRES_NET_DST))
!     col_add_str(fd, COL_UNRES_NET_DST, ip6_to_str(&ipv6.ip6_dst));
  
    if (tree) {
      /* !!! specify length */
***************
*** 77,107 ****
      add_subtree(ti, ipv6_tree, ETT_IPv6);
  
      /* !!! warning: version also contains 4 Bit priority */
!     add_item_to_tree(ipv6_tree, offset,      1, "Version: %d Priority: %d", ipv6.version >> 4 , ipv6.version & 15);
!     add_item_to_tree(ipv6_tree, offset + 6,  1, "Next Header: %d", ipv6.next_header);
!     add_item_to_tree(ipv6_tree, offset + 4,  2, "Payload Length: %d", ntohs(ipv6.payload_length));
    }
  
    /* start of the new header (could be a extension header) */
    offset += 40;
!   switch (ipv6.next_header) {
!       case IP_PROTO_ICMP:
!           dissect_icmp(pd, offset, fd, tree);
!           break;
!       case IP_PROTO_IGMP:
!           dissect_igmp(pd, offset, fd, tree);
!           break;
!       case IP_PROTO_TCP:
!           dissect_tcp(pd, offset, fd, tree);
!           break;
!       case IP_PROTO_UDP:
!           dissect_udp(pd, offset, fd, tree);
!           break;
!       case IP_PROTO_OSPF:
!           dissect_ospf(pd, offset, fd, tree);
!           break;
!       default:
!           dissect_data(pd, offset, fd, tree);
!   }
! }
  
--- 124,210 ----
      add_subtree(ti, ipv6_tree, ETT_IPv6);
  
      /* !!! warning: version also contains 4 Bit priority */
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_vfc), 1,
! 	"Version: %d", ipv6.ip6_vfc >> 4);
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_flow), 4,
! 	"Flowinfo: 0x%07x", ipv6.ip6_flow & IPV6_FLOWINFO_MASK);
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_plen), 2,
! 	"Payload Length: %d", ntohs(ipv6.ip6_plen));
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_nxt), 1,
! 	"Next Header: %d", ipv6.ip6_nxt);
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_hlim), 1,
! 	"Hop limit: %d", ipv6.ip6_hlim);
! 
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_src), 16,
! 	"Source address: %s (%s)",
! 	get_hostname6(&ipv6.ip6_src), ip6_to_str(&ipv6.ip6_src));
!     add_item_to_tree(ipv6_tree, offset + offsetof(struct ip6_hdr, ip6_dst), 16,
! 	"Destination address: %s (%s)",
! 	get_hostname6(&ipv6.ip6_dst), ip6_to_str(&ipv6.ip6_dst));
    }
  
    /* start of the new header (could be a extension header) */
    offset += 40;
!   nxt = ipv6.ip6_nxt;
  
+ again:
+     switch (nxt) {
+     case IPPROTO_HOPOPTS:
+ 	dissect_hopopts(pd, offset, fd, tree);
+ #if 0
+ 	goto again;
+ #else
+ 	break;
+ #endif
+     case IPPROTO_IPIP:
+ 	dissect_ip(pd, offset, fd, tree);
+ 	break;
+     case IPPROTO_ROUTING:
+ 	dissect_routing6(pd, offset, fd, tree);
+ #if 0
+ 	goto again;
+ #else
+ 	break;
+ #endif
+     case IPPROTO_FRAGMENT:
+ 	dissect_frag6(pd, offset, fd, tree);
+ #if 0
+ 	goto again;
+ #else
+ 	break;
+ #endif
+     case IPPROTO_ICMPV6:
+ 	dissect_icmpv6(pd, offset, fd, tree);
+ 	break;
+     case IPPROTO_NONE:
+ 	if (check_col(fd, COL_INFO)) {
+ 	    col_add_fstr(fd, COL_INFO, "IPv6 no next header");
+ 	}
+ 	break;
+     case IPPROTO_AH:
+ 	advance = dissect_ah(pd, offset, fd, tree);
+ 	nxt = pd[offset];
+ 	offset += advance;
+ 	goto again;
+     case IPPROTO_ESP:
+ 	dissect_esp(pd, offset, fd, tree);
+ 	break;
+     case IPPROTO_DSTOPTS:
+ 	advance = dissect_dstopts(pd, offset, fd, tree);
+ 	nxt = pd[offset];
+ 	offset += advance;
+ 	goto again;
+     case IP_PROTO_TCP:
+ 	dissect_tcp(pd, offset, fd, tree);
+ 	break;
+     case IP_PROTO_UDP:
+ 	dissect_udp(pd, offset, fd, tree);
+ 	break;
+     default:
+ 	if (check_col(fd, COL_INFO)) {
+ 	    col_add_fstr(fd, COL_INFO, "Unknown IPv6 protocol (0x%02x)",
+ 		ipv6.ip6_nxt);
+ 	}
+ 	dissect_data(pd, offset, fd, tree);
+     }
+ }
Index: ethereal/packet-ipv6.h
diff -c ethereal/packet-ipv6.h:1.1.1.1 ethereal/packet-ipv6.h:1.2
*** ethereal/packet-ipv6.h:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/packet-ipv6.h	Wed Jan  6 13:52:27 1999
***************
*** 1,3 ****
--- 1,4 ----
+ #if 0
  typedef struct _e_ipv6_header{
      /* the version contains 4-bit version and 4-bit priority */
      guint8 	version;
***************
*** 6,8 ****
--- 7,10 ----
      guint8	next_header;
      guint8	hop_limit;
  } e_ipv6_header;
+ #endif
Index: ethereal/packet.c
diff -c ethereal/packet.c:1.1.1.1 ethereal/packet.c:1.2
*** ethereal/packet.c:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/packet.c	Wed Jan  6 13:52:28 1999
***************
*** 47,52 ****
--- 47,55 ----
  # include <netinet/in.h>
  #endif
  
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ 
  #include "ethereal.h"
  #include "packet.h"
  #include "etypes.h"
***************
*** 88,93 ****
--- 91,106 ----
    sprintf(cur, "%d.%d.%d.%d", ad[0], ad[1], ad[2], ad[3]);
    return cur;
  }
+ 
+ #ifdef INET6
+ gchar *
+ ip6_to_str(struct in6_addr *ad) {
+   static gchar buf[4 * 8 + 8];
+ 
+   inet_ntop(AF_INET6, ad, buf, sizeof(buf));
+   return buf;
+ }
+ #endif
  
  void
  packet_hex_print(GtkText *bv, guchar *pd, gint len, gint bstart, gint blen) {
Index: ethereal/packet.h
diff -c ethereal/packet.h:1.1.1.1 ethereal/packet.h:1.6
*** ethereal/packet.h:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/packet.h	Mon Mar  8 12:19:35 1999
***************
*** 452,457 ****
--- 452,462 ----
  	ETT_GIOP,
  	ETT_NBDGM,
  	ETT_CDP,
+ 	ETT_AH,
+ 	ETT_ESP,
+ 	ETT_ICMPv6,
+ 	ETT_ICMPv6OPT,
+ 	ETT_ICMPv6FLAG,
  	NUM_TREE_TYPES	/* last item number plus one */
  };
  
***************
*** 494,499 ****
--- 499,508 ----
  /* Utility routines used by packet*.c */
  gchar*     ether_to_str(guint8 *);
  gchar*     ip_to_str(guint8 *);
+ #ifdef INET6
+ struct in6_addr;
+ gchar*     ip6_to_str(struct in6_addr *);
+ #endif
  void       packet_hex_print(GtkText *, guint8 *, gint, gint, gint);
  #define E_TREEINFO_START_KEY "tree_info_start"
  #define E_TREEINFO_LEN_KEY   "tree_info_len"
***************
*** 574,579 ****
--- 583,591 ----
  void dissect_vines_ipc(const u_char *, int, frame_data *, GtkTree *);
  void dissect_vines_rtp(const u_char *, int, frame_data *, GtkTree *);
  void dissect_vines_spp(const u_char *, int, frame_data *, GtkTree *);
+ int dissect_ah(const u_char *, int, frame_data *, GtkTree *);
+ void dissect_esp(const u_char *, int, frame_data *, GtkTree *);
+ void dissect_icmpv6(const u_char *, int, frame_data *, GtkTree *);
  
  /* These functions are in ethertype.c */
  gchar *ethertype_to_str(guint16 etype, const char *fmt);
Index: ethereal/resolv.c
diff -c ethereal/resolv.c:1.1.1.1 ethereal/resolv.c:1.2
*** ethereal/resolv.c:1.1.1.1	Wed Jan  6 12:34:37 1999
--- ethereal/resolv.c	Wed Jan  6 13:52:30 1999
***************
*** 253,258 ****
--- 253,294 ----
  
  } /* host_name_lookup */
  
+ #ifdef INET6
+ static u_char *host_name_lookup6(struct in6_addr *addr)
+ {
+   struct hostent *hostp;
+   static u_char name[MAXNAMELEN];
+ 
+ fprintf(stderr, "looking up %s\n", ip6_to_str(addr));
+ #ifdef AVOID_DNS_TIMEOUT
+     
+   /* Quick hack to avoid DNS/YP timeout */
+   
+   if (!setjmp(hostname_env)) {
+     signal(SIGALRM, abort_network_query);
+     alarm(DNS_TIMEOUT);
+ #endif
+     hostp = gethostbyaddr((char *)addr, sizeof(*addr), AF_INET6);
+ #ifdef AVOID_DNS_TIMEOUT
+     alarm(0);
+ #endif
+     if (hostp != NULL) {
+       strncpy(name, hostp->h_name, MAXNAMELEN);
+       name[MAXNAMELEN-1] = '\0';
+       return name;
+     }
+ #ifdef AVOID_DNS_TIMEOUT
+   }
+ #endif
+ 
+   /* unknown host or DNS timeout */
+ 
+   sprintf(name, "%s", ip_to_str((guint8 *)&addr));  
+ 
+   return (name);
+ }
+ #endif
+ 
  /*
   *  Miscellaneous functions
   */
***************
*** 662,667 ****
--- 698,718 ----
  
    return host_name_lookup(addr);
  }
+ 
+ #ifdef INET6
+ extern u_char *get_hostname6(struct in6_addr *addr) 
+ {
+ #if 0
+   if (!g_resolving_actif)
+     return ip6_to_str(addr);
+   if (IN6_IS_ADDR_LINKLOCAL(addr) || IN6_IS_ADDR_MULTICAST(addr))
+     return ip6_to_str(addr);
+   return host_name_lookup6(addr);
+ #else
+   return ip6_to_str(addr);
+ #endif
+ }
+ #endif
  
  extern void add_host_name(u_int addr, u_char *name)
  {
Index: ethereal/resolv.h
diff -c ethereal/resolv.h:1.1.1.1 ethereal/resolv.h:1.2
*** ethereal/resolv.h:1.1.1.1	Wed Jan  6 12:34:38 1999
--- ethereal/resolv.h	Wed Jan  6 13:52:31 1999
***************
*** 54,59 ****
--- 54,64 ----
  /* get_hostname returns the host name or "%d.%d.%d.%d" if not found */
  extern u_char *get_hostname(u_int addr);
  
+ #ifdef INET6
+ /* get_hostname returns the host name, or numeric addr if not found */
+ extern u_char *get_hostname6(struct in6_addr *addr);
+ #endif
+ 
  /* get_ether_name returns the logical name if found in ethers files else
     "<vendor>_%02x:%02x:%02x" if the vendor code is known else
     "%02x:%02x:%02x:%02x:%02x:%02x" */
Index: ethereal/wiretap/.cvsignore
diff -c /dev/null ethereal/wiretap/.cvsignore:1.1
*** /dev/null	Mon Mar  8 12:40:13 1999
--- ethereal/wiretap/.cvsignore	Wed Jan  6 13:52:34 1999
***************
*** 0 ****
--- 1,4 ----
+ config.log
+ stamp-h
+ config.status
+ Makefile
