*** ./configure.osr6	Thu Oct 20 13:06:14 2005
--- ./configure	Wed Nov  9 18:47:09 2005
***************
*** 3046,3054 ****
  GCC=`test $ac_compiler_gnu = yes && echo yes`
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
! CFLAGS="-g"
! echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
  if test "${ac_cv_prog_cc_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
--- 3046,3054 ----
  GCC=`test $ac_compiler_gnu = yes && echo yes`
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
! CFLAGS="-O2"
! echo "$as_me:$LINENO: checking whether $CC accepts -O2" >&5
! echo $ECHO_N "checking whether $CC accepts -O2... $ECHO_C" >&6
  if test "${ac_cv_prog_cc_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
***************
*** 3104,3112 ****
    CFLAGS=$ac_save_CFLAGS
  elif test $ac_cv_prog_cc_g = yes; then
    if test "$GCC" = yes; then
!     CFLAGS="-g -O2"
    else
!     CFLAGS="-g"
    fi
  else
    if test "$GCC" = yes; then
--- 3104,3112 ----
    CFLAGS=$ac_save_CFLAGS
  elif test $ac_cv_prog_cc_g = yes; then
    if test "$GCC" = yes; then
!     CFLAGS="-O2"
    else
!     CFLAGS="-O2"
    fi
  else
    if test "$GCC" = yes; then
***************
*** 4118,4126 ****
  GCC=`test $ac_compiler_gnu = yes && echo yes`
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
! CFLAGS="-g"
! echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
  if test "${ac_cv_prog_cc_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
--- 4118,4126 ----
  GCC=`test $ac_compiler_gnu = yes && echo yes`
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
! CFLAGS="-O2"
! echo "$as_me:$LINENO: checking whether $CC accepts -O2" >&5
! echo $ECHO_N "checking whether $CC accepts -O2... $ECHO_C" >&6
  if test "${ac_cv_prog_cc_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
***************
*** 4176,4184 ****
    CFLAGS=$ac_save_CFLAGS
  elif test $ac_cv_prog_cc_g = yes; then
    if test "$GCC" = yes; then
!     CFLAGS="-g -O2"
    else
!     CFLAGS="-g"
    fi
  else
    if test "$GCC" = yes; then
--- 4176,4184 ----
    CFLAGS=$ac_save_CFLAGS
  elif test $ac_cv_prog_cc_g = yes; then
    if test "$GCC" = yes; then
!     CFLAGS="-O2"
    else
!     CFLAGS="-O2"
    fi
  else
    if test "$GCC" = yes; then
***************
*** 5269,5275 ****
    lt_cv_deplibs_check_method=pass_all
    ;;
  
! sco3.2v5*)
    lt_cv_deplibs_check_method=pass_all
    ;;
  
--- 5269,5275 ----
    lt_cv_deplibs_check_method=pass_all
    ;;
  
! sysv5* | sco3.2v5*)
    lt_cv_deplibs_check_method=pass_all
    ;;
  
***************
*** 5277,5283 ****
    lt_cv_deplibs_check_method=pass_all
    ;;
  
! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
    case $host_vendor in
    motorola)
      lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
--- 5277,5283 ----
    lt_cv_deplibs_check_method=pass_all
    ;;
  
! sysv4 | sysv4.2uw2* | sysv4.3*)
    case $host_vendor in
    motorola)
      lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
***************
*** 8210,8216 ****
        fi
        ;;
  
!     solaris* | sysv5*)
        if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  	ld_shlibs=no
  	cat <<EOF 1>&2
--- 8210,8216 ----
        fi
        ;;
  
!     solaris*)
        if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  	ld_shlibs=no
  	cat <<EOF 1>&2
***************
*** 8901,8909 ****
        no_undefined_flag=' -z text'
        # $CC -shared without GNU ld will not create a library from C++
        # object files and a static libstdc++, better avoid it by now
!       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
!       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
!   		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
        hardcode_libdir_flag_spec=
        hardcode_shlibpath_var=no
        runpath_var='LD_RUN_PATH'
--- 8901,8908 ----
        no_undefined_flag=' -z text'
        # $CC -shared without GNU ld will not create a library from C++
        # object files and a static libstdc++, better avoid it by now
!       archive_cmds='$LD -G${allow_undefined_flag} -h $rpath/$soname -o $lib $libobjs $deplibs $linker_flags'
!       archive_expsym_cmds='$LD -G${allow_undefined_flag} -Bexport:$export_symbols -h $rpath/$soname -o $lib $libobjs $deplibs $linker_flags'
        hardcode_libdir_flag_spec=
        hardcode_shlibpath_var=no
        runpath_var='LD_RUN_PATH'
***************
*** 22442,22450 ****
  GCC=`test $ac_compiler_gnu = yes && echo yes`
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
! CFLAGS="-g"
! echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
  if test "${ac_cv_prog_cc_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
--- 22441,22449 ----
  GCC=`test $ac_compiler_gnu = yes && echo yes`
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
! CFLAGS="-O2"
! echo "$as_me:$LINENO: checking whether $CC accepts -O2" >&5
! echo $ECHO_N "checking whether $CC accepts -O2... $ECHO_C" >&6
  if test "${ac_cv_prog_cc_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
***************
*** 22500,22508 ****
    CFLAGS=$ac_save_CFLAGS
  elif test $ac_cv_prog_cc_g = yes; then
    if test "$GCC" = yes; then
!     CFLAGS="-g -O2"
    else
!     CFLAGS="-g"
    fi
  else
    if test "$GCC" = yes; then
--- 22499,22507 ----
    CFLAGS=$ac_save_CFLAGS
  elif test $ac_cv_prog_cc_g = yes; then
    if test "$GCC" = yes; then
!     CFLAGS="-O2"
    else
!     CFLAGS="-O2"
    fi
  else
    if test "$GCC" = yes; then
***************
*** 22954,22959 ****
--- 22953,22964 ----
  
  case "${target}:${CC}" in
  
+     *-*-sysv5*:* )
+         DEFINEOS="OpenServer"
+         RELEASE=`uname -v`
+         echo "* This appears to be ${DEFINEOS} ${RELEASE}"
+       ;;
+ 
      *-*-linux*:* )
          DEFINEOS="LINUX"
          DISTRO=`utils/linuxrelease --distro`
***************
*** 23065,23078 ****
  echo "Test the compiler and setup CFLAGS..."
  echo
  case "$CFLAGS" in
!     *-g* )
          ;;
      * )
!         CFLAGS="$CFLAGS -g"
!         echo "$as_me:$LINENO: checking if compiler accepts -g (debugging information)" >&5
! echo $ECHO_N "checking if compiler accepts -g (debugging information)... $ECHO_C" >&6
          oCFLAGS=$CFLAGS
!         CFLAGS="-g $CFLAGS"
          cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
--- 23070,23083 ----
  echo "Test the compiler and setup CFLAGS..."
  echo
  case "$CFLAGS" in
!     *-O* )
          ;;
      * )
!         CFLAGS="$CFLAGS -O2"
!         echo "$as_me:$LINENO: checking if compiler accepts -O2 (debugging information)" >&5
! echo $ECHO_N "checking if compiler accepts -O2 (debugging information)... $ECHO_C" >&6
          oCFLAGS=$CFLAGS
!         CFLAGS="-O2 $CFLAGS"
          cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
***************
*** 23905,23910 ****
--- 23910,23918 ----
    *-*-freebsd4* )
      LIBS="-pthread ${LIBS}"
      ;;
+   *-*-sysv5* )
+     LIBS="${LIBS} -lsocket -lresmgr"
+     ;;
  esac
  
  
***************
*** 37113,37125 ****
  
  
  
! echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
! echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
  if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_check_lib_save_LIBS=$LIBS
! LIBS="-lpthread  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
--- 37121,37133 ----
  
  
  
! echo "$as_me:$LINENO: checking for pthread_create" >&5
! echo $ECHO_N "checking for pthread_create... $ECHO_C" >&6
  if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_check_lib_save_LIBS=$LIBS
! LIBS="$LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
***************
*** 37182,37188 ****
  #define HAVE_LIBPTHREAD 1
  _ACEOF
  
!   LIBS="-lpthread $LIBS"
  
  else
  
--- 37190,37196 ----
  #define HAVE_LIBPTHREAD 1
  _ACEOF
  
!   LIBS="$LIBS"
  
  else
  
*** ./ntop.h.osr6	Tue Oct  4 03:42:15 2005
--- ./ntop.h	Wed Nov  9 18:47:09 2005
***************
*** 295,307 ****
--- 295,311 ----
  #include <netinet/tcp.h>
  
  #ifndef HAVE_IPV6_H
+ #ifndef __USLC__
  #include <netinet/ip6.h>
  #endif
+ #endif
  
  #ifndef HAVE_ICMPV6_H
+ #ifndef __USLC__
  #include <netinet/icmp6.h>
  #endif
  #endif
+ #endif
  
  #ifdef HAVE_NETINET_IF_ETHER_H
  #include <netinet/if_ether.h>
***************
*** 331,337 ****
--- 335,343 ----
  #else
  #if !defined(WIN32)
   #ifdef HAVE_NET_BPF_H
+  #ifndef __USLC__
    #include <net/bpf.h>
+  #endif
   #else
    #ifdef HAVE_PCAP_BPF_H
     #include <pcap-bpf.h>
*** ./globals-core.h.osr6	Tue Oct  4 03:42:14 2005
--- ./globals-core.h	Wed Nov  9 18:47:09 2005
***************
*** 798,803 ****
--- 798,806 ----
  
  
  #ifdef HAVE_NETDB_H
+ #ifdef h_errno
+ #undef h_errno
+ #endif
  extern int h_errno; /* netdb.h */
  #endif
  
*** ./Configure-OSR6.osr6	Wed Nov  9 18:47:09 2005
--- ./Configure-OSR6	Wed Nov  9 18:47:09 2005
***************
*** 0 ****
--- 1,18 ----
+ #!/bin/sh
+ #
+ HOST=i586-sco-sysv5
+ CFLAGS="-O2"
+ NM="/usr/ccs/bin/nm -p"
+ if [ "$1" = "-g" ]
+ then
+   CC="gcc -D_REENTRANT"
+   CXX="g++ -D_REENTRANT"
+   CFLAGS="$CFLAGS -Wall"
+ else
+   CC="cc -Kpthread -Kalloca"
+   CXX="CC -Kpthread -Kalloca"
+ fi
+ export CC CXX CFLAGS NM
+ rm -f mout-configure
+ ./configure --prefix=/usr --disable-ipv6 \
+             --host=$HOST --target=$HOST --build=$HOST 2>&1 | tee mout-configure
*** ./pbuf.c.osr6	Tue Oct  4 03:42:15 2005
--- ./pbuf.c	Wed Nov  9 18:47:09 2005
***************
*** 1288,1305 ****
        memcpy(&tp, bp+hlen, sizeof(struct tcphdr));
  
        /* Sanity check */
!       if(tcpUdpLen >= (tp.th_off * 4)) {
  	int diff;
  
  	/* Real lenght if we captured the full packet */
! 	tcpDataLength = tcpUdpLen - (tp.th_off * 4);
  
  	/* Actual lenght scaled with caplen */
  	diff = h->caplen - (h->len - tcpDataLength);
  
  	if(diff > 0) {
  	  tcpDataLength = diff;
! 	  theData = (u_char*)(bp+hlen+(tp.th_off * 4));
  	} else {
  	  tcpDataLength = 0;
  	  theData = NULL;
--- 1288,1305 ----
        memcpy(&tp, bp+hlen, sizeof(struct tcphdr));
  
        /* Sanity check */
!       if(tcpUdpLen >= (TH_OFF_LEN * 4)) {
  	int diff;
  
  	/* Real lenght if we captured the full packet */
! 	tcpDataLength = tcpUdpLen - (TH_OFF_LEN * 4);
  
  	/* Actual lenght scaled with caplen */
  	diff = h->caplen - (h->len - tcpDataLength);
  
  	if(diff > 0) {
  	  tcpDataLength = diff;
! 	  theData = (u_char*)(bp+hlen+(TH_OFF_LEN * 4));
  	} else {
  	  tcpDataLength = 0;
  	  theData = NULL;
***************
*** 1340,1346 ****
  	char WSS[3], _MSS[5];
  	struct tcphdr *tcp = (struct tcphdr*)(bp+hlen);
  	u_char *tcp_opt = (u_char *)(tcp + 1);
!         u_char *tcp_data = (u_char *)((int)tcp + tp.th_off * 4);
  
  	if(tcp->th_flags & TH_SYN) {   /* only SYN or SYN-2ACK packets */	  
  	  if(tcpUdpLen > 0) {
--- 1340,1346 ----
  	char WSS[3], _MSS[5];
  	struct tcphdr *tcp = (struct tcphdr*)(bp+hlen);
  	u_char *tcp_opt = (u_char *)(tcp + 1);
!         u_char *tcp_data = (u_char *)((int)tcp + TH_OFF_LEN * 4);
  
  	if(tcp->th_flags & TH_SYN) {   /* only SYN or SYN-2ACK packets */	  
  	  if(tcpUdpLen > 0) {
*** ./traffic.c.osr6	Wed Sep 28 15:39:10 2005
--- ./traffic.c	Wed Nov  9 18:55:17 2005
***************
*** 89,121 ****
  
    topHost = findHostBySerial(topSentSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualSentThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topHostSentSerial = topSentSerial,
!     myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topSentTraffic.value = topThpt;
  
    topHost = findHostBySerial(secondSentSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualSentThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondHostSentSerial = secondSentSerial,
!     myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondSentTraffic.value = topThpt;
  
    topHost = findHostBySerial(thirdSentSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualSentThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdHostSentSerial = thirdSentSerial,
!     myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdSentTraffic.value = topThpt;
  
    topHost = findHostBySerial(topRcvdSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualRcvdThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topHostRcvdSerial = topRcvdSerial,
!     myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topRcvdTraffic.value = topThpt;
  
    topHost = findHostBySerial(secondRcvdSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualRcvdThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondHostRcvdSerial = secondRcvdSerial,
!     myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondRcvdTraffic.value = topThpt;
  
    topHost = findHostBySerial(thirdRcvdSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualRcvdThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdHostRcvdSerial = thirdRcvdSerial,
!     myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdRcvdTraffic.value = topThpt;
  
    myGlobals.device[deviceToUpdate].last60MinutesThptIdx = (myGlobals.device[deviceToUpdate].last60MinutesThptIdx+1) % 60;
  
--- 89,121 ----
  
    topHost = findHostBySerial(topSentSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualSentThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topHostSentSerial = topSentSerial;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topSentTraffic.value = topThpt;
  
    topHost = findHostBySerial(secondSentSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualSentThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondHostSentSerial = secondSentSerial;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondSentTraffic.value = topThpt;
  
    topHost = findHostBySerial(thirdSentSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualSentThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdHostSentSerial = thirdSentSerial;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdSentTraffic.value = topThpt;
  
    topHost = findHostBySerial(topRcvdSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualRcvdThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topHostRcvdSerial = topRcvdSerial;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].topRcvdTraffic.value = topThpt;
  
    topHost = findHostBySerial(secondRcvdSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualRcvdThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondHostRcvdSerial = secondRcvdSerial;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].secondRcvdTraffic.value = topThpt;
  
    topHost = findHostBySerial(thirdRcvdSerial, deviceToUpdate); 
    if(topHost != NULL) topThpt = topHost->actualRcvdThpt; else topThpt = 0;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdHostRcvdSerial = thirdRcvdSerial;
!   myGlobals.device[deviceToUpdate].last60MinutesThpt[0].thirdRcvdTraffic.value = topThpt;
  
    myGlobals.device[deviceToUpdate].last60MinutesThptIdx = (myGlobals.device[deviceToUpdate].last60MinutesThptIdx+1) % 60;
  
