20 sep 2010 kl. 16.45 skrev Stuart Henderson:

> I was looking at getting the net-snmp port to pick up our mibs
> by default and noticed there's a mismatch between mib.c and
> /usr/share/snmp/mibs in the naming of the sensors mib.
>
> OPENBSD-SNMPD-CONF.txt:    sensorsMIBObjects
> OPENBSD-BASE-MIB.txt:sensorsMIBObjects     OBJECT IDENTIFIER ::= { openBSD 2
}
> ..etc..
>
> mib.c:  { MIB(sensorMIBObjects),        OID_MIB },
>
> Does this diff make sense?

sure, why not, if it annoys you ;-)
ok martinh

Having net-snmp pick up the mibs by default would be nice.


> Index: mib.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/snmpd/mib.c,v
> retrieving revision 1.40
> diff -u -p -r1.40 mib.c
> --- mib.c     11 Jun 2010 10:45:36 -0000      1.40
> +++ mib.c     20 Sep 2010 14:44:31 -0000
> @@ -1221,7 +1221,7 @@ char    *mib_sensorvalue(struct sensor *);
> int    mib_memiftable(struct oid *, struct ber_oid *, struct ber_element **);
>
> static struct oid openbsd_mib[] = {
> -     { MIB(sensorMIBObjects),        OID_MIB },
> +     { MIB(sensorsMIBObjects),       OID_MIB },
>       { MIB(sensorNumber),            OID_RD, mib_sensornum },
>       { MIB(sensorIndex),             OID_TRD, mib_sensors },
>       { MIB(sensorDescr),             OID_TRD, mib_sensors },
> Index: mib.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/snmpd/mib.h,v
> retrieving revision 1.20
> diff -u -p -r1.20 mib.h
> --- mib.h     11 Jun 2010 10:45:36 -0000      1.20
> +++ mib.h     20 Sep 2010 14:44:31 -0000
> @@ -398,8 +398,8 @@
>
> /* OPENBSD-MIB */
> #define MIB_pfMIBObjects              MIB_openBSD, 1
> -#define MIB_sensorMIBObjects         MIB_openBSD, 2
> -#define MIB_sensors                  MIB_sensorMIBObjects, 1
> +#define MIB_sensorsMIBObjects                MIB_openBSD, 2
> +#define MIB_sensors                  MIB_sensorsMIBObjects, 1
> #define MIB_sensorNumber              MIB_sensors, 1
> #define MIB_sensorTable                       MIB_sensors, 2
> #define MIB_sensorEntry                       MIB_sensorTable, 1
> @@ -683,7 +683,7 @@
>       { MIBDECL(vantronix) },                         \
>       { MIBDECL(openBSD) },                           \
>                                                       \
> -     { MIBDECL(sensorMIBObjects) },                  \
> +     { MIBDECL(sensorsMIBObjects) },                 \
>       { MIBDECL(sensors) },                           \
>       { MIBDECL(sensorNumber) },                      \
>       { MIBDECL(sensorTable) },                       \

Reply via email to