Properly bring ucd-snmp-current back to life. Eventually

ucd-snmp should be updated to this version too.
This commit is contained in:
wrstuden 2001-09-11 01:46:30 +00:00
parent b221db0b27
commit 8bc24806aa
6 changed files with 425 additions and 0 deletions

View file

@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.6 2001/09/11 01:46:30 wrstuden Exp $
SHA1 (ucd-snmp-4.2.1.tar.gz) = a335b207640597a3b6f035ee49823ba701042ef9
Size (ucd-snmp-4.2.1.tar.gz) = 1565813 bytes
SHA1 (patch-aa) = 06033a8596a74f16702f844c3a7848a1d96f3ed4
SHA1 (patch-ab) = a4bd7337b6c57791d5d0ab936d0fac6c2b1bd497
SHA1 (patch-af) = eb2fd9cfd1830e9a931bcd712a83938bc04dca42
SHA1 (patch-ag) = 4e51af5d595d26e4b641757ad27737af76286893

View file

@ -0,0 +1,155 @@
$NetBSD: patch-aa,v 1.5 2001/09/11 01:46:31 wrstuden Exp $
--- configure.in.orig Tue Jan 30 15:10:50 2001
+++ configure.in Tue Jan 30 15:16:46 2001
@@ -1011,23 +1011,23 @@
dnl
dnl now check for rpm using the appropriate db library
dnl
-AC_CHECK_LIB(rpm, rpmdbOpen,[
- AC_DEFINE(HAVE_LIBRPM)
- LIBS="-lrpm $LIBS"
- CFLAGS="$CFLAGS -I/usr/include/rpm"
-],,-lz)
+#AC_CHECK_LIB(rpm, rpmdbOpen,[
+# AC_DEFINE(HAVE_LIBRPM)
+# LIBS="-lrpm $LIBS"
+# CFLAGS="$CFLAGS -I/usr/include/rpm"
+#],,-lz)
dnl
dnl now check for rpm using the appropriate db library
dnl
-if test x$ac_cv_lib_rpm_rpmdbOpen = xno; then
- unset ac_cv_lib_rpm_rpmdbOpen
- AC_CHECK_LIB(rpm, rpmdbOpen,[
- AC_DEFINE(HAVE_LIBRPM)
- LIBS="-lrpm -lpopt $LIBS"
- CFLAGS="$CFLAGS -I/usr/include/rpm"
- ],,-lpopt -lz)
-fi
+#if test x$ac_cv_lib_rpm_rpmdbOpen = xno; then
+# unset ac_cv_lib_rpm_rpmdbOpen
+# AC_CHECK_LIB(rpm, rpmdbOpen,[
+# AC_DEFINE(HAVE_LIBRPM)
+# LIBS="-lrpm -lpopt $LIBS"
+# CFLAGS="$CFLAGS -I/usr/include/rpm"
+# ],,-lpopt -lz)
+#fi
dnl Replace `main' with a function in -lkstat:
@@ -1053,7 +1053,7 @@
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h pwd.h grp.h)
+AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h pwd.h grp.h)
dnl FreeBSD required headers
AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/disklabel.h machine/types.h sys/socketvar.h)
dnl Linux
@@ -1061,7 +1061,7 @@
dnl NetBSD required headers
AC_CHECK_HEADERS(arpa/inet.h kvm.h sys/pool.h)
dnl BSDi2 headers
-AC_CHECK_HEADERS(sys/mount.h vm/swap_pager.h ufs/ufs/dinode.h)
+AC_CHECK_HEADERS(sys/mount.h ufs/ufs/dinode.h)
dnl BSDi3 headers
AC_CHECK_HEADERS(sys/stat.h sys/vnode.h ufs/ufs/quota.h ufs/ufs/inode.h)
dnl irix headers
@@ -1314,11 +1314,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
], rtentry, rt_dst, no)
@@ -1332,11 +1328,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
],[
@@ -1356,11 +1348,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
],[
struct rtentry rt;
@@ -1413,11 +1401,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
],[
struct rtentry rt;
@@ -1437,11 +1421,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
], rtentry, rt_unit)
@@ -1450,11 +1430,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
], rtentry, rt_refcnt)
@@ -1463,11 +1439,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
], rtentry, rt_hash)
@@ -1476,11 +1448,7 @@
#include <sys/param.h>
#endif
#include <sys/types.h>
-#define KERNEL
-#define _KERNEL
#include <sys/socket.h>
-#undef KERNEL
-#undef _KERNEL
#include <net/route.h>
], rtentry, rt_use)

View file

@ -0,0 +1,31 @@
$NetBSD: patch-ab,v 1.5 2001/09/11 01:46:31 wrstuden Exp $
--- snmplib/Makefile.in.orig Tue Jan 30 15:26:05 2001
+++ snmplib/Makefile.in Tue Jan 30 15:27:03 2001
@@ -40,7 +40,7 @@
snmp_debug.c tools.c snmp_logging.c \
snmpv3.c snmpusm.c lcd_time.c keytools.c \
scapi.c callback.c default_store.c snmp_alarm.c mt_support.c \
- snprintf.c strtol.c strtoul.c
+ snprintf.c strtol.c strtoul.c libwrap.c
OBJS= snmp_client.o mib.o parse.o snmp_api.o snmp.o \
snmp_auth.o asn1.o md5.o snmp_parse_args.o \
@@ -49,7 +49,7 @@
snmpv3.o snmpusm.o lcd_time.o keytools.o \
scapi.o callback.o default_store.o snmp_alarm.o \
mt_support.o \
- snprintf.o strtol.o strtoul.o
+ snprintf.o strtol.o strtoul.o libwrap.o
LOBJS= snmp_client.lo mib.lo parse.lo snmp_api.lo snmp.lo \
snmp_auth.lo asn1.lo md5.lo snmp_parse_args.lo \
@@ -58,7 +58,7 @@
snmpv3.lo snmpusm.lo lcd_time.lo keytools.lo \
scapi.lo callback.lo default_store.lo snmp_alarm.lo \
mt_support.lo \
- snprintf.lo strtol.lo strtoul.lo
+ snprintf.lo strtol.lo strtoul.lo libwrap.lo
# just in case someone wants to remove libtool, change this to OBJS.
TOBJS=$(LOBJS)

View file

@ -0,0 +1,49 @@
$NetBSD: patch-af,v 1.5 2001/09/11 01:46:31 wrstuden Exp $
--- agent/mibgroup/mibII/interfaces.c.orig Tue Jan 30 15:36:04 2001
+++ agent/mibgroup/mibII/interfaces.c Tue Jan 30 15:42:42 2001
@@ -132,7 +132,7 @@
#ifdef freebsd3
# define USE_SYSCTL_IFLIST
#else
-# if defined(CTL_NET) && !defined(freebsd2)
+# if defined(CTL_NET) && !defined(freebsd2) && !defined(netbsd1)
# ifdef PF_ROUTE
# ifdef NET_RT_IFLIST
# ifndef netbsd1
@@ -1549,19 +1549,34 @@
cp = strchr(saveName, '\0');
string_append_int (cp, ifnet.if_unit);
#endif
- if (1 || strcmp(saveName,"lo0") != 0) { /* XXX */
+ if (1 ) { /* XXX */
/*
* Try to find an address for this interface
*/
auto_nlist(IFADDR_SYMBOL, (char *)&ia, sizeof(ia));
+#ifdef netbsd1
+ ia=(struct in_ifaddr *)ifnet.if_addrlist.tqh_first;
+#endif
while (ia) {
klookup((unsigned long)ia , (char *)&in_ifaddr, sizeof(in_ifaddr));
+#ifdef netbsd1
+#define CP(x) ((char *)(x))
+{ char *cp; struct sockaddr * sa;
+ cp = (CP(in_ifaddr.ia_ifa.ifa_addr) - CP(ia)) +
+ CP(&in_ifaddr); sa = (struct sockaddr *)cp;
+if (sa->sa_family==AF_INET)
+#endif
if (in_ifaddr.ia_ifp == ifnetaddr) {
has_ipaddr = 1; /* this IF has IP-address */
break;
}
+}
+#ifdef netbsd1
+ ia=(struct in_ifaddr *)in_ifaddr.ia_ifa.ifa_list.tqe_next;
+#else
ia = in_ifaddr.ia_next;
+#endif
}
#if !defined(netbsd1) && !defined(freebsd2) && !defined(openbsd2) && !defined(STRUCT_IFNET_HAS_IF_ADDRLIST)

View file

@ -0,0 +1,16 @@
$NetBSD: patch-ag,v 1.5 2001/09/11 01:46:31 wrstuden Exp $
--- agent/mibgroup/mibII/ipAddr.c.orig Tue Jan 30 16:00:58 2001
+++ agent/mibgroup/mibII/ipAddr.c Tue Jan 30 16:07:06 2001
@@ -243,7 +243,11 @@
#if defined(linux) || defined(sunV3)
long_return = ntohl(((struct sockaddr_in *) &lowin_ifnet.ifu_broadaddr)->sin_addr.s_addr) & 1;
#else
+#ifdef netbsd1
+ long_return = ((struct sockaddr_in *) &lowin_ifaddr.ia_broadaddr)->sin_addr.s_addr & 1;
+#else
long_return = ntohl(((struct sockaddr_in *) &lowin_ifaddr.ia_broadaddr)->sin_addr.s_addr) & 1;
+#endif
#endif
return(u_char *) &long_return;
case IPADREASMMAX:

View file

@ -0,0 +1,166 @@
@comment $NetBSD: PLIST,v 1.6 2001/09/11 01:46:32 wrstuden Exp $
bin/encode_keychange
bin/snmpbulkget
bin/snmpbulkwalk
bin/snmpcheck
bin/snmpdelta
bin/snmpget
bin/snmpgetnext
bin/snmpinform
bin/snmpnetstat
bin/snmpset
bin/snmpstatus
bin/snmptable
bin/snmptest
bin/snmptranslate
bin/snmptrap
bin/snmpusm
bin/snmpwalk
bin/tkmib
etc/rc.d/snmpd
etc/rc.d/snmptrapd
include/ucd-snmp/agent_index.h
include/ucd-snmp/agent_read_config.h
include/ucd-snmp/agent_registry.h
include/ucd-snmp/agent_trap.h
include/ucd-snmp/asn1.h
include/ucd-snmp/auto_nlist.h
include/ucd-snmp/callback.h
include/ucd-snmp/default_store.h
include/ucd-snmp/ds_agent.h
include/ucd-snmp/header_complex.h
include/ucd-snmp/int64.h
include/ucd-snmp/keytools.h
include/ucd-snmp/mib.h
include/ucd-snmp/mibincl.h
include/ucd-snmp/parse.h
include/ucd-snmp/read_config.h
include/ucd-snmp/scapi.h
include/ucd-snmp/snmp.h
include/ucd-snmp/snmp_agent.h
include/ucd-snmp/snmp_alarm.h
include/ucd-snmp/snmp_api.h
include/ucd-snmp/snmp_client.h
include/ucd-snmp/snmp_debug.h
include/ucd-snmp/snmp_impl.h
include/ucd-snmp/snmp_logging.h
include/ucd-snmp/snmp_parse_args.h
include/ucd-snmp/snmp_vars.h
include/ucd-snmp/snmpusm.h
include/ucd-snmp/snmpv3.h
include/ucd-snmp/struct.h
include/ucd-snmp/system.h
include/ucd-snmp/tools.h
include/ucd-snmp/transform_oids.h
include/ucd-snmp/ucd-snmp-agent-includes.h
include/ucd-snmp/ucd-snmp-config.h
include/ucd-snmp/ucd-snmp-includes.h
include/ucd-snmp/util_funcs.h
include/ucd-snmp/var_struct.h
include/ucd-snmp/version.h
lib/libsnmp.a
lib/libsnmp.la
lib/libsnmp.so
lib/libsnmp-0.4.2.1.so
lib/libucdagent.a
lib/libucdagent.la
lib/libucdagent.so
lib/libucdagent-0.4.2.1.so
lib/libucdmibs.a
lib/libucdmibs.la
lib/libucdmibs.so
lib/libucdmibs-0.4.2.1.so
man/man1/snmpbulkget.1
man/man1/snmpbulkwalk.1
man/man1/snmpcmd.1
man/man1/snmpd.1
man/man1/snmpdelta.1
man/man1/snmpget.1
man/man1/snmpgetnext.1
man/man1/snmpinform.1
man/man1/snmpnetstat.1
man/man1/snmpset.1
man/man1/snmpstatus.1
man/man1/snmptable.1
man/man1/snmptest.1
man/man1/snmptranslate.1
man/man1/snmptrap.1
man/man1/snmpusm.1
man/man1/snmpwalk.1
man/man3/default_store.3
man/man3/mib_api.3
man/man3/read_config.3
man/man3/snmp_agent_api.3
man/man3/snmp_alarm.3
man/man3/snmp_api.3
man/man3/snmp_close.3
man/man3/snmp_free_pdu.3
man/man3/snmp_open.3
man/man3/snmp_read.3
man/man3/snmp_select_info.3
man/man3/snmp_send.3
man/man3/snmp_sess_api.3
man/man3/snmp_sess_async_send.3
man/man3/snmp_sess_close.3
man/man3/snmp_sess_error.3
man/man3/snmp_sess_init.3
man/man3/snmp_sess_open.3
man/man3/snmp_sess_read.3
man/man3/snmp_sess_select_info.3
man/man3/snmp_sess_send.3
man/man3/snmp_sess_session.3
man/man3/snmp_sess_timeout.3
man/man3/snmp_timeout.3
man/man3/snmp_trap_api.3
man/man5/snmp.conf.5
man/man5/snmp_config.5
man/man5/snmpd.conf.5
man/man5/snmptrapd.conf.5
man/man5/variables.5
man/man8/snmptrapd.8
sbin/snmpd
sbin/snmptrapd
share/examples/ucd-snmp/EXAMPLE.conf
share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
share/snmp/mibs/EtherLike-MIB.txt
share/snmp/mibs/HOST-RESOURCES-MIB.txt
share/snmp/mibs/HOST-RESOURCES-TYPES.txt
share/snmp/mibs/IANAifType-MIB.txt
share/snmp/mibs/IF-MIB.txt
share/snmp/mibs/IP-MIB.txt
share/snmp/mibs/IPV6-ICMP-MIB.txt
share/snmp/mibs/IPV6-MIB.txt
share/snmp/mibs/IPV6-TC.txt
share/snmp/mibs/IPV6-TCP-MIB.txt
share/snmp/mibs/IPV6-UDP-MIB.txt
share/snmp/mibs/RFC1155-SMI.txt
share/snmp/mibs/RFC1213-MIB.txt
share/snmp/mibs/RMON-MIB.txt
share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
share/snmp/mibs/SNMP-MPD-MIB.txt
share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
share/snmp/mibs/SNMP-PROXY-MIB.txt
share/snmp/mibs/SNMP-TARGET-MIB.txt
share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
share/snmp/mibs/SNMPv2-CONF.txt
share/snmp/mibs/SNMPv2-MIB.txt
share/snmp/mibs/SNMPv2-SMI.txt
share/snmp/mibs/SNMPv2-TC.txt
share/snmp/mibs/SNMPv2-TM.txt
share/snmp/mibs/TCP-MIB.txt
share/snmp/mibs/UCD-DEMO-MIB.txt
share/snmp/mibs/UCD-DISKIO-MIB.txt
share/snmp/mibs/UCD-DLMOD-MIB.txt
share/snmp/mibs/UCD-IPFWACC-MIB.txt
share/snmp/mibs/UCD-SNMP-MIB.txt
share/snmp/mibs/UDP-MIB.txt
@unexec /bin/rm -f %D/share/snmp/mibs/.index
@dirrm share/snmp/mibs
@dirrm share/snmp
@dirrm share/examples/ucd-snmp
@exec /bin/mkdir -p %D/lib/snmp/dlmod
@dirrm lib/snmp/dlmod
@dirrm lib/snmp
@dirrm include/ucd-snmp