Subject: Re: SNMPD for NetBSD
To: C. Ewen MacMillan <ilixi@tezcat.net>
From: Alistair G. Crooks <azcb0@sde.uts.amdahl.com>
List: current-users
Date: 10/02/1996 09:22:55
> >> --==_Exmh_687530752P
> >> Content-Type: text/plain; charset=us-ascii
> >> 
> >> In message <199609302036.VAA07873@NetBSD.noc.EASYNET.NET>you write:
> >> > Has anyone got a snmpd to compile on NetBSD? ISODE/CMU/ANYTHING?
> >> 
> >> Not even thinking of Host Resources MIB...
> >> I would even go with a compiled binary;-)
> >> 
> >> Gruesse
> >>        Oskar
> >> 
> 
>  I have caused ucd-snmp to compile, by adding a phony definition
>  for ifnet.if_unit and forcing ifnet.if_name to equate to ifnet.xname[SIZEOF]
>  (if I have confused my "ifs" I beg pardon, my personal NetBSD machine is 
>  currently OOS).

Sorry, overlooked my patch file. However, doesn't the if_xname
filed in NetBSD include the name and the unit?  What I did was
to eliminate the appending of the unit number if we're compiling
under NetBSD.
 
>  Unfortunately, the moment that it looks at anything in the mib beyond
>  the routing table, everything goes to hell in a handbasket with kmem
>  read errors. And that is with the arp table stuff shut off completely.
> 
>  This is under 1.2 on i386. I will solve the problem eventually if no
>  one else beats me to it.

Just an idea - I'm not actually running this piece of software in
anger, as everyone has probably guessed - the GNU configure script
doesn't pick up the fact that NetBSD has an -lkvm:

root@pumpy:/jaz/ucd-snmp-3.1.0.1(1491)# make
Fetching ucd-snmp-3.1.0.1...
Verifying ucd-snmp-3.1.0.1...
ucd-snmp-3.1.0.1.tar.gz... ok
Unpacking ucd-snmp-3.1.0.1...
Patching ucd-snmp-3.1.0.1...
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** ucd-snmp-3.1.0.1/agent/snmp_vars.c 1996/10/01 15:20:41     1.1
|--- ucd-snmp-3.1.0.1/agent/snmp_vars.c 1996/10/01 15:27:47
--------------------------
Patching file ucd-snmp-3.1.0.1/agent/snmp_vars.c using Plan A...
Hunk #1 succeeded at 3349.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** ucd-snmp-3.1.0.1/agent/snmp_var_route.c    1996/10/01 15:32:38     1.1
|--- ucd-snmp-3.1.0.1/agent/snmp_var_route.c    1996/10/01 15:33:25
--------------------------
Patching file ucd-snmp-3.1.0.1/agent/snmp_var_route.c using Plan A...
Hunk #1 succeeded at 457.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** /dev/null  Tue Oct  1 16:42:15 1996
|--- ucd-snmp-3.1.0.1/answers   Tue Oct  1 17:22:54 1996
--------------------------
(Creating file ucd-snmp-3.1.0.1/answers...)
Patching file ucd-snmp-3.1.0.1/answers using Plan A...
Hunk #1 succeeded at 1.
done
Checking dependencies for ucd-snmp-3.1.0.1...
Configuring ucd-snmp-3.1.0.1...
(cd ucd-snmp-3.1.0.1; ./configure --prefix=/usr/local < answers)
creating cache ./config.cache
checking for cc... cc
checking for gcc... (cached) cc
checking whether we are using GNU C... yes
checking how to run the C preprocessor... cc -E
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets ${MAKE}... yes
checking for ranlib... ranlib
checking for ps... /bin/ps
checking for sed... sed
checking for AIX... no
checking host system type... i386-unknown-netbsd1.2.
checking target system type... i386-unknown-netbsd1.2.
checking build system type... i386-unknown-netbsd1.2.
checking for additional cpp flags... -x c
checking for location of sytem kernel... /netbsd
checking for location of swap device... /dev/drum
checking for -lelf... no
checking for -lm... yes
checking for -lnsl... no
checking for -lsocket... no
checking for -lkstat... no
checking for -lkvm... no

[ the rest deleted... ]

Alistair