Only in ../../ucd-snmp-3.2: Makefile diff -u -r ./Makefile.in ../../ucd-snmp-3.2/Makefile.in --- ./Makefile.in Wed May 14 07:17:58 1997 +++ ../../ucd-snmp-3.2/Makefile.in Thu Jan 8 17:15:04 1998 @@ -70,16 +70,16 @@ rm -f snmplib/Makefile Makefile agent/Makefile apps/Makefile apps/snmpnetstat/Makefile agent/mibgroup/Makefile local/Makefile rm -f mib_module_config.h agent/mibgroup/mib_module_includes.h agent/mibgroup/mib_module_inits.h agent/mibgroup/mib_module_loads.h -configure: configure.in aclocal.m4 - cd ${srcdir} && autoconf - echo "Please run configure now." - sh -c exit 2 +#configure: configure.in aclocal.m4 +# cd ${srcdir} && autoconf +# echo "Please run configure now." +# sh -c exit 2 # autoheader might not change config.h.in, so touch a stamp file. -config.h.in: stamp-h.in -stamp-h.in: configure.in acconfig.h - cd ${srcdir} && autoheader - echo timestamp > ${srcdir}/stamp-h.in +#config.h.in: stamp-h.in +#stamp-h.in: configure.in acconfig.h +# cd ${srcdir} && autoheader +# echo timestamp > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status diff -u -r ./aclocal.m4 ../../ucd-snmp-3.2/aclocal.m4 --- ./aclocal.m4 Mon Feb 3 05:50:06 1997 +++ ../../ucd-snmp-3.2/aclocal.m4 Thu Jan 8 17:15:04 1998 @@ -83,7 +83,20 @@ #endif #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif ], ifnet, $1, $2) ]) Only in ../../ucd-snmp-3.2/agent: Makefile diff -u -r ./agent/Makefile.in ../../ucd-snmp-3.2/agent/Makefile.in --- ./agent/Makefile.in Mon May 12 02:44:19 1997 +++ ../../ucd-snmp-3.2/agent/Makefile.in Thu Jan 8 17:15:04 1998 @@ -10,8 +10,8 @@ exec_prefix = @exec_prefix@ bindir = $(exec_prefix)/bin libdir = $(exec_prefix)/lib -etcdir = $(exec_prefix)/etc -snmplibdir = $(prefix)/lib/snmp +sbindir = $(exec_prefix)/sbin +snmplibdir = $(libdir)/snmp INSTALL = @INSTALL@ @@ -56,10 +56,10 @@ cd mibgroup; make clean install: installdirs - @$(INSTALL) $(TARG) $(etcdir) ; echo "install: installed $(TARG) in $(etcdir) " + @$(INSTALL) $(TARG) $(sbindir) ; echo "install: installed $(TARG) in $(sbindir) " installdirs: - @$(SHELL) $(srcdir)/../mkinstalldirs $(etcdir) $(snmplibdir) + @$(SHELL) $(srcdir)/../mkinstalldirs $(sbindir) $(snmplibdir) dependlocal: makedepend $(CPPFLAGS) $(srcdir)/*.c diff -u -r ./agent/common_header.h ../../ucd-snmp-3.2/agent/common_header.h --- ./agent/common_header.h Tue Apr 22 09:47:06 1997 +++ ../../ucd-snmp-3.2/agent/common_header.h Thu Jan 8 17:15:04 1998 @@ -82,6 +82,9 @@ #define _I_DEFINED_KERNEL #endif #include +#if HAVE_NET_IF_VAR_H +#include +#endif #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif Only in ../../ucd-snmp-3.2/agent/mibgroup: 1 Only in ../../ucd-snmp-3.2/agent/mibgroup: Makefile diff -u -r ./agent/mibgroup/at.c ../../ucd-snmp-3.2/agent/mibgroup/at.c --- ./agent/mibgroup/at.c Tue Apr 22 09:01:42 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/at.c Thu Jan 8 17:15:04 1998 @@ -33,7 +33,7 @@ #ifndef solaris2 static void ARP_Scan_Init __P((void)); -#if defined(freebsd2) || defined (netbsd1) || defined (hpux) || defined (bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined (netbsd1) || defined (hpux) || defined (bsdi2) static int ARP_Scan_Next __P((u_long *, char *, u_long *, u_short *)); #else static int ARP_Scan_Next __P((u_long *, char *, u_long *)); @@ -83,9 +83,9 @@ oid current[16]; static char PhysAddr[6], LowPhysAddr[6]; u_long Addr, LowAddr; -#if defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) u_short ifIndex, lowIfIndex; -#endif/* (freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#endif/* (freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ u_long ifType, lowIfType; int oid_length; @@ -103,7 +103,7 @@ LowAddr = -1; /* Don't have one yet */ ARP_Scan_Init(); for (;;) { -#if defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) if (ARP_Scan_Next(&Addr, PhysAddr, &ifType, &ifIndex) == 0) break; current[10] = ifIndex; @@ -115,7 +115,7 @@ else { /* IP NetToMedia group oid */ op = current + 11; } -#else /* (freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#else /* (freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ if (ARP_Scan_Next(&Addr, PhysAddr, &ifType) == 0) break; current[10] = 1; @@ -127,7 +127,7 @@ else { /* IP NetToMedia group oid */ op = current + 11; } -#endif /* (freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#endif /* (freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ cp = (u_char *)&Addr; *op++ = *cp++; *op++ = *cp++; @@ -138,9 +138,9 @@ if (compare(current, oid_length, name, *length) == 0){ bcopy((char *)current, (char *)lowest, oid_length * sizeof(oid)); LowAddr = Addr; -#if defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) lowIfIndex = ifIndex; -#endif /* defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#endif /* defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ bcopy(PhysAddr, LowPhysAddr, sizeof(PhysAddr)); lowIfType = ifType; break; /* no need to search further */ @@ -154,9 +154,9 @@ */ bcopy((char *)current, (char *)lowest, oid_length * sizeof(oid)); LowAddr = Addr; -#if defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) lowIfIndex = ifIndex; -#endif /* defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#endif /* defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ bcopy(PhysAddr, LowPhysAddr, sizeof(PhysAddr)); lowIfType = ifType; } @@ -171,11 +171,11 @@ switch(vp->magic){ case IPMEDIAIFINDEX: /* also ATIFINDEX */ *var_len = sizeof long_return; -#if defined(freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) long_return = lowIfIndex; -#else /* (freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#else /* (freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ long_return = 1; /* XXX */ -#endif /* (freebsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ +#endif /* (freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(hpux) || defined(bsdi2) */ return (u_char *)&long_return; case IPMEDIAPHYSADDRESS: /* also ATPHYSADDRESS */ *var_len = sizeof(LowPhysAddr); @@ -427,7 +427,7 @@ #endif /* CAN_USE_SYSCTL */ } -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) || defined(hpux) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) || defined(hpux) static int ARP_Scan_Next(IPAddr, PhysAddr, ifType, ifIndex) u_short *ifIndex; #else @@ -437,7 +437,7 @@ char *PhysAddr; u_long *ifType; { -#if !defined (netbsd1) && !defined (freebsd2) && !defined(bsdi2) +#if !defined (netbsd1) && !defined (freebsd2) && !defined(openbsd2) && !defined(bsdi2) && !defined(openbsd2) register struct arptab *atab; while (arptab_current < arptab_size) { @@ -473,7 +473,7 @@ #endif return(1); } -#else /* netbsd1, freebsd2, bsdi2 */ +#else /* netbsd1, freebsd2, openbsd2, bsdi2 */ struct rt_msghdr *rtm; struct sockaddr_inarp *sin; struct sockaddr_dl *sdl; @@ -492,7 +492,7 @@ return(1); } } -#endif /* netbsd1, freebsd2, bsdi2 */ +#endif /* netbsd1, freebsd2, openbsd2, bsdi2 */ return(0); /* "EOF" */ } #endif /* solaris2 */ diff -u -r ./agent/mibgroup/errormib.c ../../ucd-snmp-3.2/agent/mibgroup/errormib.c --- ./agent/mibgroup/errormib.c Tue Apr 22 09:01:44 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/errormib.c Thu Jan 8 17:15:04 1998 @@ -99,7 +99,7 @@ char *to; { char buf[STRMAX]; -#if !defined(netbsd1) && !defined(freebsd2) +#if !defined(netbsd1) && !defined(freebsd2) && !defined(openbsd2) extern char *sys_errlist[]; #endif extern int errno; diff -u -r ./agent/mibgroup/interfaces.c ../../ucd-snmp-3.2/agent/mibgroup/interfaces.c --- ./agent/mibgroup/interfaces.c Thu May 15 05:22:18 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/interfaces.c Thu Jan 8 17:26:42 1998 @@ -5,6 +5,12 @@ #include "../common_header.h" #include "interfaces.h" +#if defined(freebsd2) +#include +#endif +#if defined(openbsd2) +#include +#endif /********************* @@ -300,10 +306,10 @@ long_return = ifnet.if_flags & IFF_UP ? 1 : 2; return (u_char *) &long_return; case IFLASTCHANGE: -#if defined(STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC) && !defined(freebsd2) -/* XXX - SNMP's ifLastchange is time when op. status changed - * FreeBSD's if_lastchange is time when packet was input or output - * (at least in 2.1.0-RELEASE. Changed in later versions of the kernel?) +#if defined(STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_SEC) && !(defined(freebsd2) && __FreeBSD_version < 199607) +/* FreeBSD's if_lastchange before the 2.1.5 release is the time when + * a packet was last input or output. In the 2.1.5 and later releases, + * this is fixed, thus the 199607 comparison. */ if ((ifnet.if_lastchange.tv_sec == 0 ) && (ifnet.if_lastchange.tv_usec == 0)) @@ -905,7 +911,7 @@ #else -#ifdef netbsd1 +#if defined(netbsd1) || defined(openbsd2) #define ia_next ia_list.tqe_next #define if_next if_list.tqe_next #endif @@ -928,7 +934,7 @@ */ klookup((unsigned long)ifnetaddr, (char *)&ifnet, sizeof ifnet); #if STRUCT_IFNET_HAS_IF_XNAME -#ifdef netbsd1 +#if defined(netbsd1) || defined(openbsd2) strncpy(saveName, ifnet.if_xname, sizeof saveName); #else klookup((unsigned long)ifnet.if_xname, (char *)saveName, sizeof saveName); @@ -946,14 +952,21 @@ * Try to find an address for this interface */ +#ifdef openbsd2 + TAILQ_HEAD(, in_ifaddr) iah; + + KNLookup(interfaces_nl, N_IN_IFADDR, (char *)&iah, sizeof(iah)); + ia = iah.tqh_first; +#else KNLookup(interfaces_nl, N_IN_IFADDR, (char *)&ia, sizeof(ia)); +#endif while (ia) { klookup((unsigned long)ia , (char *)&in_ifaddr, sizeof(in_ifaddr)); if (in_ifaddr.ia_ifp == ifnetaddr) break; ia = in_ifaddr.ia_next; } -#if !defined(netbsd1) && !defined(freebsd2) && !defined(STRUCT_IFNET_HAS_IF_ADDRLIST) +#if !defined(netbsd1) && !defined(freebsd2) && !defined(openbsd2) && !defined(STRUCT_IFNET_HAS_IF_ADDRLIST) ifnet.if_addrlist = (struct ifaddr *)ia; /* WRONG DATA TYPE; ONLY A FLAG */ #endif /* ifnet.if_addrlist = (struct ifaddr *)&ia->ia_ifa; */ /* WRONG DATA TYPE; ONLY A FLAG */ @@ -1068,7 +1081,7 @@ if (i != Index) return(-1); /* Error, doesn't exist */ } -#ifdef freebsd2 +#if defined(freebsd2) || defined(openbsd2) if (saveifnet.if_type != IFT_ETHER) { bzero(EtherAddr, sizeof(arpcom.ac_enaddr)); @@ -1103,7 +1116,7 @@ return(0); /* DONE */ } -#ifdef freebsd2 +#if defined(freebsd2) || defined(openbsd2) static struct in_ifaddr *in_ifaddraddr; Address_Scan_Init() diff -u -r ./agent/mibgroup/ip.c ../../ucd-snmp-3.2/agent/mibgroup/ip.c --- ./agent/mibgroup/ip.c Tue Apr 22 09:01:48 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/ip.c Thu Jan 8 17:15:04 1998 @@ -346,7 +346,7 @@ bcopy((char *)vp->name, (char *)current, (int)vp->namelen * sizeof(oid)); -#ifndef freebsd2 +#if !defined(freebsd2) Interface_Scan_Init(); #else Address_Scan_Init(); @@ -357,7 +357,7 @@ if (Interface_Scan_Next(&interface, NULL, &ifnet) == 0) break; cp = (u_char *)&(((struct sockaddr_in *) &(ifnet.if_addr))->sin_addr.s_addr); #else -#ifndef freebsd2 +#if !defined(freebsd2) if (Interface_Scan_Next(&interface, NULL, &ifnet, &in_ifaddr) == 0) break; #else if (Address_Scan_Next(&interface, &in_ifaddr) == 0) break; Only in ../../ucd-snmp-3.2/agent/mibgroup: mib_module_includes.h Only in ../../ucd-snmp-3.2/agent/mibgroup: mib_module_inits.h Only in ../../ucd-snmp-3.2/agent/mibgroup: mib_module_loads.h diff -u -r ./agent/mibgroup/route_write.c ../../ucd-snmp-3.2/agent/mibgroup/route_write.c --- ./agent/mibgroup/route_write.c Tue Apr 22 09:01:51 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/route_write.c Thu Jan 8 17:15:04 1998 @@ -44,7 +44,7 @@ #include "ip.h" #include "route_write.h" -#if defined(irix6) || defined(osf3) || defined(netbsd1) || defined(freebsd2) || defined(bsdi2) +#if defined(irix6) || defined(osf3) || defined(netbsd1) || defined(freebsd2) || defined(openbsd2) || defined(bsdi2) #define rt_dst rt_nodes->rn_key #endif @@ -137,7 +137,7 @@ } -#if defined(irix6) || defined(osf3) || defined(netbsd1) || defined(freebsd2) || defined(bsdi2) +#if defined(irix6) || defined(osf3) || defined(netbsd1) || defined(freebsd2) || defined(openbsd2) || defined(bsdi2) #undef rt_dst #endif diff -u -r ./agent/mibgroup/tcp.c ../../ucd-snmp-3.2/agent/mibgroup/tcp.c --- ./agent/mibgroup/tcp.c Tue Apr 22 09:01:54 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/tcp.c Thu Jan 8 17:28:54 1998 @@ -22,7 +22,7 @@ #define N_HP_TCPMIB 2 #if !defined(hpux) && !defined(solaris2) { "_tcpstat" }, -#ifdef netbsd1 +#if defined(netbsd1) || defined(openbsd2) { "_tcbtable" }, #else { "_tcb" }, @@ -545,7 +545,12 @@ #define inp_prev inp_queue.cqe_prev #endif -#ifdef freebsd2 +#ifdef openbsd2 +#define inp_next inp_hash.le_next +#define inp_prev inp_hash.le_prev +#endif + +#if defined(freebsd2) #define inp_next inp_list.le_next #define inp_prev inp_list.le_prev #endif @@ -571,32 +576,32 @@ KNLookup(tcp_nl, N_TCB, (char *)&cb, sizeof(struct inpcb)); inpcb = cb; -#if !(defined(freebsd2) || defined(netbsd1)) +#if !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) prev = (struct inpcb *) tcp_nl[N_TCB].n_value; -#endif /* !(defined(freebsd2) || defined(netbsd1)) */ +#endif /* !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) */ /* * Scan the control blocks */ -#if defined(freebsd2) || defined(netbsd1) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) while ((inpcb.inp_next != NULL) && (inpcb.inp_next != (struct inpcb *) tcp_nl[N_TCB].n_value)) { -#else /* defined(freebsd2) || defined(netbsd1) */ +#else /* defined(freebsd2) || defined(openbsd2) || defined(netbsd1) */ while (inpcb.inp_next != (struct inpcb *) tcp_nl[N_TCB].n_value) { -#endif /* defined(freebsd2) || defined(netbsd1) */ +#endif /* defined(freebsd2) || defined(openbsd2) || defined(netbsd1) */ next = inpcb.inp_next; if((klookup((unsigned long)next, (char *)&inpcb, sizeof (inpcb)) == 0)) { perror("TCP_Count_Connections - inpcb"); } -#if !(defined(freebsd2) || defined(netbsd1)) +#if !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) if (inpcb.inp_prev != prev) { /* ??? */ sleep(1); goto Again; } -#endif /* !(defined(freebsd2) || defined(netbsd1)) */ +#endif /* !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) */ if (inet_lnaof(inpcb.inp_laddr) == INADDR_ANY) { -#if !(defined(freebsd2) || defined(netbsd1)) +#if !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) prev = next; -#endif /* !(defined(freebsd2) || defined(netbsd1)) */ +#endif /* !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) */ continue; } if(klookup((unsigned long)inpcb.inp_ppcb, (char *)&tcpcb, sizeof (tcpcb)) == 0) { @@ -607,9 +612,9 @@ if ((tcpcb.t_state == TCPS_ESTABLISHED) || (tcpcb.t_state == TCPS_CLOSE_WAIT)) Established++; -#if !(defined(freebsd2) || defined(netbsd1)) +#if !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) prev = next; -#endif /* !(defined(freebsd2) || defined(netbsd1)) */ +#endif /* !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) */ } return(Established); } @@ -624,7 +629,7 @@ { #ifndef linux KNLookup(tcp_nl, N_TCB, (char *)&tcp_inpcb, sizeof(tcp_inpcb)); -#if !(defined(freebsd2) || defined(netbsd1)) +#if !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) tcp_prev = (struct inpcb *) tcp_nl[N_TCB].n_value; #endif #else @@ -708,7 +713,7 @@ #ifndef linux struct tcpcb tcpcb; -#if defined(freebsd2) || defined(netbsd1) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) if ((tcp_inpcb.inp_next == NULL) || (tcp_inpcb.inp_next == (struct inpcb *) tcp_nl[N_TCB].n_value)) { #else @@ -720,10 +725,10 @@ next = tcp_inpcb.inp_next; klookup((unsigned long)next, (char *)&tcp_inpcb, sizeof (tcp_inpcb)); -#if !(defined(netbsd1) || defined(freebsd2)) +#if !(defined(netbsd1) || defined(freebsd2) || defined(openbsd2)) if (tcp_inpcb.inp_prev != tcp_prev) /* ??? */ return(-1); /* "FAILURE" */ -#endif /* !(defined(netbsd1) || defined(freebsd2)) */ +#endif /* !(defined(netbsd1) || defined(freebsd2) || defined(openbsd2)) */ klookup ( (int)tcp_inpcb.inp_ppcb, (char *)&tcpcb, sizeof (tcpcb)); *State = tcpcb.t_state; #else /* linux */ @@ -736,7 +741,7 @@ #endif *RetInPcb = tcp_inpcb; -#if !(defined(netbsd1) || defined(freebsd2)) +#if !(defined(netbsd1) || defined(freebsd2) || defined(openbsd2)) tcp_prev = next; #endif return(1); /* "OK" */ diff -u -r ./agent/mibgroup/udp.c ../../ucd-snmp-3.2/agent/mibgroup/udp.c --- ./agent/mibgroup/udp.c Tue May 20 05:24:27 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/udp.c Thu Jan 8 17:33:49 1998 @@ -21,7 +21,7 @@ #define N_HP_UDPMIB 2 #if !defined(hpux) && !defined(solaris2) { "_udpstat" }, -#ifdef netbsd1 +#if defined(netbsd1) || defined(openbsd2) { "_udbtable" }, #else { "_udb" }, @@ -137,7 +137,7 @@ switch (vp->magic){ case UDPINDATAGRAMS: -#if defined(freebsd2) || defined(netbsd1) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) long_return = udpstat.udps_ipackets; #else #if defined(linux) @@ -148,7 +148,7 @@ #endif return (u_char *) &long_return; case UDPNOPORTS: -#if defined(freebsd2) || defined(netbsd1) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) long_return = udpstat.udps_noport; #else #if defined(linux) @@ -159,7 +159,7 @@ #endif return (u_char *) &long_return; case UDPOUTDATAGRAMS: -#if defined(freebsd2) || defined(netbsd1) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) long_return = udpstat.udps_opackets; #else #if defined(linux) @@ -387,7 +387,7 @@ { #ifndef linux KNLookup(udp_nl, N_UDB, (char *)&udp_inpcb, sizeof(udp_inpcb)); -#if !(defined(freebsd2) || defined(netbsd1)) +#if !(defined(freebsd2) || defined(openbsd2) || defined(netbsd1)) udp_prev = (struct inpcb *) udp_nl[N_UDB].n_value; #endif #else /* linux */ @@ -468,34 +468,30 @@ if ((udp_inpcb.inp_list.le_next == NULL) || (udp_inpcb.inp_list.le_next == (struct inpcb *) udp_nl[N_UDB].n_value)) { -#else -#if defined(netbsd1) +#elif defined(netbsd1) || defined(openbsd2) if ((udp_inpcb.inp_queue.cqe_next == NULL) || (udp_inpcb.inp_queue.cqe_next == (struct inpcb *) udp_nl[N_UDB].n_value)) { #else if (udp_inpcb.inp_next == (struct inpcb *) udp_nl[N_UDB].n_value) { #endif -#endif return(0); /* "EOF" */ } -#ifdef netbsd1 +#if defined(openbsd2) || defined(netbsd1) next = udp_inpcb.inp_queue.cqe_next; -#else -#ifdef freebsd2 +#elif defined(freebsd2) next = udp_inpcb.inp_list.le_next; #else next = udp_inpcb.inp_next; #endif -#endif klookup((unsigned long)next, (char *)&udp_inpcb, sizeof (udp_inpcb)); -#if !(defined(netbsd1) || defined(freebsd2) || defined(linux)) +#if !(defined(openbsd2) || defined(netbsd1) || defined(freebsd2) || defined(linux)) if (udp_inpcb.inp_prev != udp_prev) /* ??? */ return(-1); /* "FAILURE" */ #endif *RetInPcb = udp_inpcb; -#if !(defined(netbsd1) || defined(freebsd2)) +#if !(defined(openbsd2) || defined(netbsd1) || defined(freebsd2)) udp_prev = next; #endif #else /* linux */ diff -u -r ./agent/mibgroup/var_route.c ../../ucd-snmp-3.2/agent/mibgroup/var_route.c --- ./agent/mibgroup/var_route.c Tue Apr 22 09:01:57 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/var_route.c Thu Jan 8 17:34:27 1998 @@ -64,6 +64,9 @@ #include #endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif #if HAVE_SYS_HASHING_H #include #endif @@ -75,7 +78,7 @@ #undef KERNEL #ifdef RTENTRY_4_4 #define rt_unit rt_refcnt /* Reuse this field for device # */ -#if defined(irix6) || defined(osf3) || defined(netbsd1) || defined(freebsd2) || defined(bsdi2) +#if defined(irix6) || defined(osf3) || defined(netbsd1) || defined(freebsd2) || defined(openbsd2) || defined(bsdi2) #define rt_dst rt_nodes->rn_key #endif #else @@ -148,7 +151,7 @@ { "_rthost" }, { "_rtnet" }, { "_rthashsize" }, -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) { "_rt_tables" }, #else { "_rt_table" }, @@ -187,7 +190,7 @@ #ifndef solaris2 -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) static union { struct sockaddr_in sin; u_short data[128]; @@ -222,7 +225,7 @@ static oid saveName[14], Current[14]; u_char *cp; oid *op; -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) struct sockaddr_in *sa; #endif #ifndef linux @@ -276,7 +279,7 @@ Route_Scan_Reload(); #endif for(RtIndex=0; RtIndex < rtsize; RtIndex++) { -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) sa = klgetsa((struct sockaddr_in *) rthead[RtIndex]->rt_dst); cp = (u_char *) &(sa->sin_addr.s_addr); #else @@ -318,7 +321,7 @@ switch(vp->magic){ case IPROUTEDEST: -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) sa = klgetsa((struct sockaddr_in *) rthead[RtIndex]->rt_dst); return(u_char *) &(sa->sin_addr.s_addr); #else @@ -347,7 +350,7 @@ long_return = -1; return (u_char *)&long_return; case IPROUTENEXTHOP: -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) sa = klgetsa((struct sockaddr_in *) rthead[RtIndex]->rt_gateway); return(u_char *) &(sa->sin_addr.s_addr); #else @@ -367,11 +370,11 @@ long_return = 0; return (u_char *)&long_return; case IPROUTEMASK: -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) /* XXX - Almost certainly not right but I don't have a suitable system to test this on */ long_return = 0; -#else /* defined(freebsd2) || defined(netbsd1) || defined(bsdi2) */ +#else /* defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) */ if ( ((struct sockaddr_in *) &rthead[RtIndex]->rt_dst)->sin_addr.s_addr == 0 ) long_return = 0; /* Default route */ else { @@ -384,7 +387,7 @@ return (u_char *) rthead[RtIndex]->rt_genmask.sa_data; #endif /* linux */ } -#endif /* defined(freebsd2) || defined(netbsd1) || defined(bsdi2) */ +#endif /* defined(freebsd2) || defined(openbsd2) || defined(netbsd1) || defined(bsdi2) */ return (u_char *)&long_return; case IPROUTEINFO: *var_len = nullOidLen; @@ -570,7 +573,7 @@ if (rt.rt_ifp != 0) { klookup((unsigned long)rt.rt_ifp, (char *)&ifnet, sizeof (ifnet)); #if STRUCT_IFNET_HAS_IF_XNAME -#ifdef netbsd1 +#if defined(netbsd1) || defined(openbsd2) strncpy(name, ifnet.if_xname, sizeof name); #else klookup((unsigned long)ifnet.if_xname, name, sizeof name); @@ -589,7 +592,7 @@ } } -#if defined(freebsd2) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(bsdi2) if (((rt.rt_flags & RTF_CLONING) != RTF_CLONING) && ((rt.rt_flags & RTF_LLINFO) != RTF_LLINFO)) { @@ -608,7 +611,7 @@ */ bcopy((char *) &rt, (char *)rthead[rtsize], sizeof(RTENTRY)); rtsize++; -#if defined(freebsd2) || defined(bsdi2) +#if defined(freebsd2) || defined(openbsd2) || defined(bsdi2) } #endif @@ -947,7 +950,7 @@ static int qsort_compare(r1,r2) RTENTRY **r1, **r2; { -#if defined(freebsd2) || defined(bsdi2) || defined(netbsd1) +#if defined(freebsd2) || defined(openbsd2) || defined(bsdi2) || defined(netbsd1) register u_long dst1 = ntohl(klgetsa((struct sockaddr_in *)(*r1)->rt_dst)->sin_addr.s_addr); register u_long dst2 = ntohl(klgetsa((struct sockaddr_in *)(*r2)->rt_dst)->sin_addr.s_addr); #else diff -u -r ./agent/mibgroup/var_route.h ../../ucd-snmp-3.2/agent/mibgroup/var_route.h --- ./agent/mibgroup/var_route.h Tue Apr 22 09:01:57 1997 +++ ../../ucd-snmp-3.2/agent/mibgroup/var_route.h Thu Jan 8 17:34:46 1998 @@ -12,7 +12,7 @@ #ifdef RTENTRY_4_4 void load_rtentries __P((struct radix_node *)); #endif -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) +#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) || defined(openbsd2) struct sockaddr_in *klgetsa __P((struct sockaddr_in *)); #endif u_char *var_ipRouteEntry __P((struct variable*, oid *, int *, int, int *, int (**write) __P((int, u_char *, u_char, int, u_char *, oid *, int)) )); Only in ../../ucd-snmp-3.2/apps: Makefile Only in ../../ucd-snmp-3.2/apps/snmpnetstat: Makefile Only in ../../ucd-snmp-3.2: config.cache Only in ../../ucd-snmp-3.2: config.h diff -u -r ./config.h.in ../../ucd-snmp-3.2/config.h.in --- ./config.h.in Fri May 23 07:35:14 1997 +++ ../../ucd-snmp-3.2/config.h.in Thu Jan 8 17:15:06 1998 @@ -251,6 +251,9 @@ /* Define if you have the header file. */ #undef HAVE_NET_IF_DL_H +/* Define if you have the header file. */ +#undef HAVE_NET_IF_VAR_H + /* Define if you have the header file. */ #undef HAVE_NET_IF_TYPES_H @@ -510,7 +513,7 @@ /* swap MIN */ #define MEMMIBNUM 4 -#if defined(hpux9) || defined(bsdi2) +#if defined(hpux9) || defined(bsdi2) || defined(freebsd2) || defined(freebsd3) #define USEMEMMIB #endif @@ -551,7 +554,7 @@ #define ULTRIXID 5 #define HPUX10ID 6 #define NETBSD1ID 7 -#define FREEBSD2ID 8 +#define FREEBSDID 8 #define IRIXID 9 #define UNKNOWNID 255 @@ -576,8 +579,8 @@ #ifdef netbsd1 #define OSTYPE NETBSD1ID #endif -#ifdef freebsd2 -#define OSTYPE FREEBSD2ID +#if defined(freebsd2) || defined(freebsd3) +#define OSTYPE FREEBSDID #endif #if defined(irix6) || defined(irix5) #define OSTYPE IRIXID @@ -728,7 +731,7 @@ #endif #endif -#if !(defined( __P) || defined(netbsd1)) +#if !(defined( __P) || defined(netbsd1) || defined(freebsd2) || defined(openbsd2)) #ifdef __STDC__ #define __P(params) params #else Only in ../../ucd-snmp-3.2: config.log Only in ../../ucd-snmp-3.2: config.status diff -u -r ./configure ../../ucd-snmp-3.2/configure --- ./configure Mon May 26 05:00:13 1997 +++ ../../ucd-snmp-3.2/configure Thu Jan 8 17:15:05 1998 @@ -2197,7 +2197,7 @@ fi done -for ac_hdr in malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_types.h +for ac_hdr in malloc.h sys/param.h net/if_dl.h net/if_var.h sys/sysctl.h stdlib.h net/if_types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -3857,7 +3857,22 @@ #include "confdefs.h" -#include +#include +#include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +#include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -3867,7 +3882,7 @@ ; return 0; } EOF -if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -3895,7 +3910,7 @@ if test "x$ac_cv_struct_ifnet_has_if_mtu" = "xno"; then echo $ac_n "checking if _KERNEL needs to be defined for if_mtu""... $ac_c" 1>&6 -echo "configure:3899: checking if _KERNEL needs to be defined for if_mtu" >&5 +echo "configure:3914: checking if _KERNEL needs to be defined for if_mtu" >&5 if eval "test \"`echo '$''{'ac_cv_IFNET_NEEDS_KERNEL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3904,13 +3919,26 @@ ac_cv_IFNET_NEEDS_KERNEL=no else cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -3919,7 +3947,7 @@ ; return 0; } EOF -if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_IFNET_NEEDS_KERNEL=yes else @@ -3951,7 +3979,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifaddr.ifa_next""... $ac_c" 1>&6 -echo "configure:3955: checking for ifaddr.ifa_next" >&5 +echo "configure:3983: checking for ifaddr.ifa_next" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3964,7 +3992,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -3983,7 +4024,7 @@ ; return 0; } EOF -if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4018,7 +4059,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_baudrate""... $ac_c" 1>&6 -echo "configure:4022: checking for ifnet.if_baudrate" >&5 +echo "configure:4063: checking for ifnet.if_baudrate" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4031,7 +4072,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4050,7 +4104,7 @@ ; return 0; } EOF -if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4085,7 +4139,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_type""... $ac_c" 1>&6 -echo "configure:4089: checking for ifnet.if_type" >&5 +echo "configure:4143: checking for ifnet.if_type" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4098,7 +4152,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4117,7 +4184,7 @@ ; return 0; } EOF -if { (eval echo configure:4121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4152,7 +4219,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_imcasts""... $ac_c" 1>&6 -echo "configure:4156: checking for ifnet.if_imcasts" >&5 +echo "configure:4223: checking for ifnet.if_imcasts" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4165,7 +4232,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4184,7 +4264,7 @@ ; return 0; } EOF -if { (eval echo configure:4188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4219,7 +4299,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_iqdrops""... $ac_c" 1>&6 -echo "configure:4223: checking for ifnet.if_iqdrops" >&5 +echo "configure:4303: checking for ifnet.if_iqdrops" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4232,7 +4312,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4251,7 +4344,7 @@ ; return 0; } EOF -if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4286,7 +4379,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_noproto""... $ac_c" 1>&6 -echo "configure:4290: checking for ifnet.if_noproto" >&5 +echo "configure:4383: checking for ifnet.if_noproto" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4299,7 +4392,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4318,7 +4424,7 @@ ; return 0; } EOF -if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4353,7 +4459,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_omcasts""... $ac_c" 1>&6 -echo "configure:4357: checking for ifnet.if_omcasts" >&5 +echo "configure:4463: checking for ifnet.if_omcasts" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4366,7 +4472,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4385,7 +4504,7 @@ ; return 0; } EOF -if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4420,7 +4539,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_xname""... $ac_c" 1>&6 -echo "configure:4424: checking for ifnet.if_xname" >&5 +echo "configure:4543: checking for ifnet.if_xname" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4433,7 +4552,7 @@ defineit="no" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4452,7 +4584,7 @@ ; return 0; } EOF -if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4487,7 +4619,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_lastchange.tv_sec""... $ac_c" 1>&6 -echo "configure:4491: checking for ifnet.if_lastchange.tv_sec" >&5 +echo "configure:4623: checking for ifnet.if_lastchange.tv_sec" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4500,7 +4632,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4519,7 +4664,7 @@ ; return 0; } EOF -if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4554,7 +4699,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_obytes""... $ac_c" 1>&6 -echo "configure:4558: checking for ifnet.if_obytes" >&5 +echo "configure:4703: checking for ifnet.if_obytes" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4567,7 +4712,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4586,7 +4744,7 @@ ; return 0; } EOF -if { (eval echo configure:4590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4621,7 +4779,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_ibytes""... $ac_c" 1>&6 -echo "configure:4625: checking for ifnet.if_ibytes" >&5 +echo "configure:4783: checking for ifnet.if_ibytes" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4634,7 +4792,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4653,7 +4824,7 @@ ; return 0; } EOF -if { (eval echo configure:4657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4688,7 +4859,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for ifnet.if_addrlist""... $ac_c" 1>&6 -echo "configure:4692: checking for ifnet.if_addrlist" >&5 +echo "configure:4863: checking for ifnet.if_addrlist" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4701,7 +4872,7 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif int main() { @@ -4720,7 +4904,7 @@ ; return 0; } EOF -if { (eval echo configure:4724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4755,7 +4939,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for udpstat.udps_discard""... $ac_c" 1>&6 -echo "configure:4759: checking for udpstat.udps_discard" >&5 +echo "configure:4943: checking for udpstat.udps_discard" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4768,7 +4952,7 @@ defineit="" fi cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4818,7 +5002,7 @@ ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for arphd.at_next""... $ac_c" 1>&6 -echo "configure:4822: checking for arphd.at_next" >&5 +echo "configure:5006: checking for arphd.at_next" >&5 if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4831,13 +5015,26 @@ defineit="" fi cat > conftest.$ac_ext < #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif #if HAVE_NETINET_IN_H #include #endif @@ -4853,7 +5050,7 @@ ; return 0; } EOF -if { (eval echo configure:4857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "${ac_safe_all}=yes" else @@ -4881,7 +5078,7 @@ echo $ac_n "checking if sysctl can read kernel information""... $ac_c" 1>&6 -echo "configure:4885: checking if sysctl can read kernel information" >&5 +echo "configure:5082: checking if sysctl can read kernel information" >&5 if eval "test \"`echo '$''{'ac_cv_CAN_USE_SYSCTL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4889,7 +5086,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_CAN_USE_SYSCTL=yes else @@ -4952,7 +5149,7 @@ if test "x$ac_cv_user_prompt_GLOBALSECURITY" = "x" -o "x$ac_cv_user_prompt_LOGFILE" = "x" -o "x$ac_cv_user_prompt_SYS_LOC" = "x" -o "x$ac_cv_user_prompt_SYS_CONTACT" = "x"; then echo $ac_n "checking if you have run configure before""... $ac_c" 1>&6 -echo "configure:4956: checking if you have run configure before" >&5 +echo "configure:5153: checking if you have run configure before" >&5 if eval "test \"`echo '$''{'ac_cv_have_warned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5007,7 +5204,7 @@ System Contact Information" | tail -1` echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6 -echo "configure:5011: checking $MSG_CHECK" >&5 +echo "configure:5208: checking $MSG_CHECK" >&5 if eval "test \"`echo '$''{'ac_cv_user_prompt_SYS_CONTACT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5067,7 +5264,7 @@ System Location" | tail -1` echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6 -echo "configure:5071: checking $MSG_CHECK" >&5 +echo "configure:5268: checking $MSG_CHECK" >&5 if eval "test \"`echo '$''{'ac_cv_user_prompt_SYS_LOC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5133,7 +5330,7 @@ Location to write logfile" | tail -1` echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6 -echo "configure:5137: checking $MSG_CHECK" >&5 +echo "configure:5334: checking $MSG_CHECK" >&5 if eval "test \"`echo '$''{'ac_cv_user_prompt_LOGFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5203,7 +5400,7 @@ What type of security to use" | tail -1` echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6 -echo "configure:5207: checking $MSG_CHECK" >&5 +echo "configure:5404: checking $MSG_CHECK" >&5 if eval "test \"`echo '$''{'ac_cv_user_prompt_GLOBALSECURITY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff -u -r ./configure.in ../../ucd-snmp-3.2/configure.in --- ./configure.in Mon May 26 04:50:20 1997 +++ ../../ucd-snmp-3.2/configure.in Thu Jan 8 17:15:05 1998 @@ -281,7 +281,7 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(strings.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h sys/dmap.h machine/pte.h xti.h sys/sockio.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 kstat.h utsname.h sys/utsname.h) dnl FreeBSD required headers -AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_types.h) +AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h net/if_var.h sys/sysctl.h stdlib.h net/if_types.h) dnl Linux (lame) doesn't have these AC_CHECK_HEADERS(sys/conf.h netinet/in_var.h netinet/in_pcb.h netinet/if_ether.h netinet/ip_var.h netinet/tcp_timer.h netinet/tcp_var.h netinet/tcp_fsm.h netinet/udp_var.h netinet/icmp_var.h sys/protosw.h) dnl NetBSD required headers @@ -449,7 +449,22 @@ dnl irix checks AC_CHECK_STRUCT_FOR([ -#include +#include +#include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +#include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif ], ifnet, if_mtu) if test "x$ac_cv_struct_ifnet_has_if_mtu" = "xno"; then @@ -462,7 +477,20 @@ #define _KERNEL 1 #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif ],[ struct ifnet testit; testit.if_mtu = 0; @@ -481,7 +509,20 @@ #endif #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif ], ifaddr, ifa_next) dnl Check ifnet entries using macro defined in aclocal.m4. @@ -506,7 +547,20 @@ AC_CHECK_STRUCT_FOR([ #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include +#ifdef HAVE_NET_IF_VAR_H +#include +#endif #if HAVE_NETINET_IN_H #include #endif Only in ../../ucd-snmp-3.2/local: Makefile Only in ../../ucd-snmp-3.2/man: Makefile diff -u -r ./man/Makefile.in ../../ucd-snmp-3.2/man/Makefile.in --- ./man/Makefile.in Mon May 12 02:49:23 1997 +++ ../../ucd-snmp-3.2/man/Makefile.in Thu Jan 8 17:15:05 1998 @@ -19,11 +19,10 @@ SED = @SED@ MAN1 = snmpget.1 snmpset.1 snmpwalk.1 snmpbulkwalk.1 snmpgetnext.1 snmptest.1 snmpnetstat.1 snmptranslate.1 snmpstatus.1 snmptrap.1 -MAN1G = snmpd.1 MAN3 = snmp_api.3 mib_api.3 MAN5 = variables.5 MAN5G = snmpd.conf.5 -MAN8 = snmptrapd.8 +MAN8 = snmptrapd.8 snmpd.8 TARGETS = snmpd.conf.5 snmpd.1 @@ -34,6 +33,9 @@ snmpd.1: snmpd.1.def ../sedscript $(SED) -f ../sedscript < $(srcdir)/snmpd.1.def > snmpd.1 + +snmpd.8: snmpd.1 + cp snmpd.1 snmpd.8 install: installdirs $(MAN1) $(MAN3) $(MAN5) $(MAN8) @for i in $(MAN1) ; do $(INSTALL) $(srcdir)/$$i $(man1dir) ; echo "install: installed $$i in $(man1dir)" ; done Only in ../../ucd-snmp-3.2/man: snmpd.8 Only in ../../ucd-snmp-3.2: mib_module_config.h Only in ../../ucd-snmp-3.2/mibs: Makefile diff -u -r ./mibs/UCD-SNMP-MIB.txt ../../ucd-snmp-3.2/mibs/UCD-SNMP-MIB.txt --- ./mibs/UCD-SNMP-MIB.txt Thu May 15 05:30:01 1997 +++ ../../ucd-snmp-3.2/mibs/UCD-SNMP-MIB.txt Thu Jan 8 17:15:06 1998 @@ -32,7 +32,7 @@ osf OBJECT IDENTIFIER ::= { ucdSnmpAgent 4 } ultrix OBJECT IDENTIFIER ::= { ucdSnmpAgent 5 } netbsd1 OBJECT IDENTIFIER ::= { ucdSnmpAgent 7 } -freebsd2 OBJECT IDENTIFIER ::= { ucdSnmpAgent 8 } +freebsd OBJECT IDENTIFIER ::= { ucdSnmpAgent 8 } irix OBJECT IDENTIFIER ::= { ucdSnmpAgent 9 } unknown OBJECT IDENTIFIER ::= { ucdSnmpAgent 255 } Only in ../../ucd-snmp-3.2/ov: Makefile Only in ../../ucd-snmp-3.2/snmplib: Makefile diff -u -r ./snmplib/Makefile.in ../../ucd-snmp-3.2/snmplib/Makefile.in --- ./snmplib/Makefile.in Fri May 9 16:38:13 1997 +++ ../../ucd-snmp-3.2/snmplib/Makefile.in Thu Jan 8 17:15:06 1998 @@ -6,11 +6,18 @@ VPATH = @srcdir@ @SET_MAKE@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = $(exec_prefix)/lib +headerdir = $(exec_prefix)/include/snmp + +INSTALL = @INSTALL@ + TARG= libsnmp.a CSRCS= snmp_client.c mib.c parse.c snmp_api.c snmp.c snmp_auth.c asn1.c md5.c party.c context.c acl.c view.c party_parse.c context_parse.c acl_parse.c system.c OBJS= snmp_client.o mib.o parse.o snmp_api.o snmp.o snmp_auth.o asn1.o md5.o party.o context.o acl.o view.o party_parse.o context_parse.o acl_parse.o system.o -CFLAGS=@CFLAGS@ +CFLAGS=@CFLAGS@ -fpic -DPIC CPPFLAGS=@CPPFLAGS@ -I.. -I$(srcdir)/.. LDFLAGS=@LDFLAGS@ @@ -23,7 +30,12 @@ ar r libsnmp.a ${OBJS} $(RANLIB) libsnmp.a -install: $(TARG) +install: $(TARG) installdirs + @$(INSTALL) $(TARG) $(libdir) ; echo "install: installed $(TARG) in $(libdir)" + @$(INSTALL) *.h $(headerdir) ; echo "install: installed headers in $(headerdir)" + +installdirs: + @$(SHELL) $(srcdir)/../mkinstalldirs $(libdir) $(headerdir) ../lib/libsnmp.a: libsnmp.a cp libsnmp.a ../lib