I'm working on the gdb but here are the changes I made to the source. One
was the patch for mib.c provided form the sourcefourge site. I'm not an
expert programmer but this did make it compile and run.


diff -c -r net-snmp-5.3.0.1/configure net-snmp-5.3.0.1.new/configure
*** net-snmp-5.3.0.1/configure  Fri Jan 13 20:51:51 2006
--- net-snmp-5.3.0.1.new/configure      Thu Mar  2 09:29:17 2006
***************
*** 1852,1858 ****
    enableval="$enable_mini_agent"

  fi;
! if test "x$enable_mini_agent" == "xyes"; then
      mini_agent="yes"
  else
      mini_agent="no"
--- 1852,1858 ----
    enableval="$enable_mini_agent"

  fi;
! if test "x$enable_mini_agent" = "xyes"; then
      mini_agent="yes"
  else
      mini_agent="no"
diff -c -r net-snmp-5.3.0.1/agent/mibgroup/host/hr_filesys.c
net-snmp-5.3.0.1.new/agent/mibgroup/host/hr_filesys.c
*** net-snmp-5.3.0.1/agent/mibgroup/host/hr_filesys.c   Mon Feb 28 07:52:58
2005
--- net-snmp-5.3.0.1.new/agent/mibgroup/host/hr_filesys.c       Mon Feb 20
10:38:00 2006
***************
*** 314,367 ****
--- 314,399 ----
           */
  #if HAVE_GETFSSTAT && !defined(MFSNAMELEN)
          switch (HRFS_entry->HRFS_type) {
+ #ifdef MOUNT_UFS
          case MOUNT_UFS:
              fsys_type_id[fsys_type_len - 1] = 3;
              break;
+ #endif
+ #ifdef MOUNT_NFS
          case MOUNT_NFS:
              fsys_type_id[fsys_type_len - 1] = 14;
              break;
+ #endif
+ #ifdef MOUNT_MFS
          case MOUNT_MFS:
              fsys_type_id[fsys_type_len - 1] = 8;
              break;
+ #endif
+ #ifdef MOUNT_MSDOS
          case MOUNT_MSDOS:
              fsys_type_id[fsys_type_len - 1] = 5;
              break;
+ #endif
+ #ifdef MOUNT_LFS
          case MOUNT_LFS:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_LOFS
          case MOUNT_LOFS:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_FDESC
          case MOUNT_FDESC:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_PORTAL
          case MOUNT_PORTAL:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_NULL
          case MOUNT_NULL:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_UMAP
          case MOUNT_UMAP:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_KERNFS
          case MOUNT_KERNFS:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_PROCFS
          case MOUNT_PROCFS:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_AFS
          case MOUNT_AFS:
              fsys_type_id[fsys_type_len - 1] = 16;
              break;
+ #endif
+ #ifdef MOUNT_CD9660
          case MOUNT_CD9660:
              fsys_type_id[fsys_type_len - 1] = 12;
              break;
+ #endif
+ #ifdef MOUNT_UNION
          case MOUNT_UNION:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
+ #ifdef MOUNT_DEVFS
          case MOUNT_DEVFS:
              fsys_type_id[fsys_type_len - 1] = 1;
              break;
+ #endif
  #ifdef MOUNT_EXT2FS
          case MOUNT_EXT2FS:
              fsys_type_id[fsys_type_len - 1] = 23;
***************
*** 468,474 ****
      case HRFSYS_ACCESS:
  #if defined(HAVE_STATVFS) && defined(__NetBSD__)
        long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1;
! #elif defined(HAVE_GETFSSTAT)
          long_return = HRFS_entry->f_flags & MNT_RDONLY ? 2 : 1;
  #elif defined(cygwin)
          long_return = 1;
--- 500,506 ----
      case HRFSYS_ACCESS:
  #if defined(HAVE_STATVFS) && defined(__NetBSD__)
        long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1;
! #elif defined(HAVE_GETFSSTAT) && defined(MNT_RDONLY)
          long_return = HRFS_entry->f_flags & MNT_RDONLY ? 2 : 1;
  #elif defined(cygwin)
          long_return = 1;
diff -c -r net-snmp-5.3.0.1/include/net-snmp/system/osf5.h
net-snmp-5.3.0.1.new/include/net-snmp/system/osf5.h
*** net-snmp-5.3.0.1/include/net-snmp/system/osf5.h     Mon Oct 31 07:40:30
2005
--- net-snmp-5.3.0.1.new/include/net-snmp/system/osf5.h Fri Feb 17 16:35:26
2006
***************
*** 7,12 ****
--- 7,15 ----
  #define _SOCKADDR_LEN
  #endif

+ /* undef added */
+ #undef TOTAL_MEMORY_SYMBOL
+
  #undef TCP_TTL_SYMBOL
  #define TCP_TTL_SYMBOL "tcp_ttl"

diff -c -r net-snmp-5.3.0.1/snmplib/mib.c net-snmp-5.3.0.1.new/snmplib/mib.c
*** net-snmp-5.3.0.1/snmplib/mib.c      Fri Dec  2 05:33:57 2005
--- net-snmp-5.3.0.1.new/snmplib/mib.c  Thu Feb 23 11:53:43 2006
***************
*** 2861,2867 ****
  read_objid(const char *input, oid * output, size_t * out_len)
  {                               /* number of subid's in "output" */
  #ifndef DISABLE_MIB_LOADING
!     struct tree    *root = tree_head;
  #endif /* DISABLE_MIB_LOADING */
      char            buf[SPRINT_MAX_LEN];
      int             ret, max_out_len;
--- 2861,2867 ----
  read_objid(const char *input, oid * output, size_t * out_len)
  {                               /* number of subid's in "output" */
  #ifndef DISABLE_MIB_LOADING
!     struct tree    *root = tree_top;
  #endif /* DISABLE_MIB_LOADING */
      char            buf[SPRINT_MAX_LEN];
      int             ret, max_out_len;
***************
*** 2904,2910 ****
  #endif /* DISABLE_MIB_LOADING */

  #ifndef DISABLE_MIB_LOADING
!     if (root == NULL) {
          SET_SNMP_ERROR(SNMPERR_NOMIB);
          *out_len = 0;
          return 0;
--- 2904,2913 ----
  #endif /* DISABLE_MIB_LOADING */

  #ifndef DISABLE_MIB_LOADING
!     if ((root == NULL) && (tree_head != NULL)) {
!         root = tree_head;
!     }
!     else if (root == NULL) {
          SET_SNMP_ERROR(SNMPERR_NOMIB);
          *out_len = 0;
          return 0;

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas
Anders
Sent: Thursday, March 02, 2006 9:17 AM
To: net-snmp-users@lists.sourceforge.net
Subject: Re: snmpwalk kills snmpd-5.3.0.1 on TRU64

Pike, David wrote:
> I'm having a bit of trouble with net-snmp-5.3.0.1. When I run an 
> snmpwalk, It starts the walk but kills snmpd.

Can you please run snmpd under gdb, type "bt" when it has crashed and 
post the output?

> ./configure --with-cc=cc --prefix=/test_install_dir/test \
> --with-persistent-directory="/var/net-snmp" \
> --with-copy-persistent-files="no" \
> --with-default-snmp-verion="3" \
> --with-sys-contact="System Administrator" \
> --with-sys-location="Unknown" \
> --with-defaults \
> --with-logfile="/var/adm/snmpd.log" \
> --with-mib-modules="mibII ucd_snmp host"

I'm surprised you got it to compile with the "host" module. Did you make 
any modification to the source?


+Thomas

-- 
Thomas Anders (thomas.anders at blue-cable.de)


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to