]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Regardt van de Vyver <squid@vdvyver.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 14 Jan 2009 01:55:03 +0000 (14:55 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 14 Jan 2009 01:55:03 +0000 (14:55 +1300)
Bug 2555: Fixes to SNMP-MIB

* Modified imports as Integer32 and TEXTUAL-CONVENTION are external defines to
this MIB, it's a compliance issue for validation

* Updated the order of Revisions as the MIB spec requires them to be in reverse
choronological order

* moved the nlanr define to a valid location as it may not be the first defined
item in a module (the MODULE IDENTITY must be)

* Modified various "ACCESS" statements to "MAX-ACCESS" due to changes in the
MIB spec requiring the change of defines.

* Modified various interative table entries to "not-accessible". This is due to
the fact that the root element should not be directly accessed, rather the
generated table entries matching these values. This is not strictly neccesary
but does make the file validate on severity 3 instead of severity 2.

* Modified cacheMedianTime to have a valid range. Ranges are REQUIRED for any
object used as an INDEX

* Modified cachePeerPortHTTP and cachePeerPortIcp to use a new type
"ValidPort". This is to meet a requirement that we cannot define valid port
ranges in a sequence defenition.

* Created a new define ValidPort so that we can specify a range of valid values
for ports

* In some object defines STATUS was set to mandatory, this is however not a
valid MIB STATUS value and has thus been fixed to current. These items
specifically caused the MIBs to fail compile completely.

* cacheClientEntry had a duplicate oid and after checking the source code I
updated its oid to the correct value.

SIDE NOTE:
Squid-2 and 3.0 have a different structure for cachePeerEnty enum. This may
cause some confusion if the squid3 mib is used with older squid releases.

src/mib.txt

index aa3d3524814327f59108632aa7ebf3b92a0e0e56..d928f63cf3095ae468cb421f95cf04b36c5b4f86 100644 (file)
@@ -2,24 +2,22 @@
 
 SQUID-MIB DEFINITIONS ::= BEGIN
 --
--- $Id: mib.txt,v 1.32 2007/12/14 23:11:47 amosjeffries Exp $
+-- $Id$
 --
 
 IMPORTS
        enterprises, Unsigned32, TimeTicks, Gauge32, Counter32,
-       MODULE-IDENTITY, OBJECT-TYPE
+       MODULE-IDENTITY, OBJECT-TYPE, Integer32
                FROM SNMPv2-SMI
 
-       DisplayString
+       DisplayString, TEXTUAL-CONVENTION
                FROM SNMPv2-TC
 
        InetAddressType, InetAddress
                FROM INET-ADDRESS-MIB;
 
-nlanr OBJECT IDENTIFIER ::= { enterprises 3495 }
-
 squid MODULE-IDENTITY
-    LAST-UPDATED "9708120000Z"
+    LAST-UPDATED "200812240200Z"
     ORGANIZATION "National Laboratory for Applied Network Research"
     CONTACT-INFO
             "        Squid Developers
@@ -28,23 +26,31 @@ squid MODULE-IDENTITY
     DESCRIPTION
                "Squid MIB defined for the management of the Squid
                proxy server. See http://www.squid-cache.org/."
-       
-    REVISION      "9708120000Z"
+
+    REVISION      "200812240200Z"
     DESCRIPTION
-               "Added support for IPv6 Technology."
-    REVISION      "9809220000Z"
+               "Corrected MIB strictness requirements. Mapped
+               valid port ranges"
+    
+    REVISION      "200712140000Z"
     DESCRIPTION
-               "Move to SMIv2. Prepare to split into proxy/squid."
+               "Added support for IPv6 Technology."
+
     REVISION      "9901010000Z"
     DESCRIPTION
                "Added objects and corrected asn.1 syntax and
                descriptions."
+
+    REVISION      "9809220000Z"
+    DESCRIPTION
+               "Move to SMIv2. Prepare to split into proxy/squid."
+               
     ::= { nlanr 1 }
 
 --
 -- OID Assignments
 --
-
+       nlanr OBJECT IDENTIFIER ::= { enterprises 3495 }
        cacheSystem     OBJECT IDENTIFIER ::= { squid 1 }
        cacheConfig     OBJECT IDENTIFIER ::= { squid 2 }
        cachePerf       OBJECT IDENTIFIER ::= { squid 3 }
@@ -112,7 +118,7 @@ squid MODULE-IDENTITY
 
        cacheLoggingFacility OBJECT-TYPE
                SYNTAX DisplayString
-               ACCESS read-write
+               MAX-ACCESS read-write
                STATUS current
                DESCRIPTION
                        " Logging Facility. An informational string
@@ -419,7 +425,7 @@ squid MODULE-IDENTITY
 
        cacheMedianSvcTable OBJECT-TYPE
                 SYNTAX SEQUENCE OF CacheMedianSvcEntry
-                MAX-ACCESS read-only
+                MAX-ACCESS not-accessible
                 STATUS current
                 DESCRIPTION
                         " CacheMedianSvcTable "
@@ -449,7 +455,7 @@ squid MODULE-IDENTITY
        }
 
        cacheMedianTime OBJECT-TYPE
-                SYNTAX Integer32
+                SYNTAX Integer32 (1|5|60)
                 MAX-ACCESS read-only
                 STATUS current
                DESCRIPTION
@@ -709,7 +715,7 @@ squid MODULE-IDENTITY
 
        cachePeerTable OBJECT-TYPE
                SYNTAX SEQUENCE OF CachePeerEntry
-               MAX-ACCESS read-only
+               MAX-ACCESS not-accessible
                STATUS current
                DESCRIPTION
                        " This table contains an enumeration of
@@ -730,8 +736,8 @@ squid MODULE-IDENTITY
          cachePeerName         DisplayString,
          cachePeerAddressType  InetAddressType,
          cachePeerAddress      InetAddress,
-         cachePeerPortHttp     Integer32 (1..65535),
-         cachePeerPortIcp      Integer32 (1..65535),
+         cachePeerPortHttp     ValidPort,
+         cachePeerPortIcp      ValidPort,
          cachePeerType         Integer32,
          cachePeerState        Integer32,
          cachePeerPingsSent    Counter32,
@@ -742,7 +748,15 @@ squid MODULE-IDENTITY
          cachePeerKeepAlSent   Counter32,
          cachePeerKeepAlRecv   Counter32
        }
-
+       
+       ValidPort ::= TEXTUAL-CONVENTION
+             DISPLAY-HINT "d"
+             STATUS       current
+             DESCRIPTION
+                               "A integer value from 1 to 65535 to indicate 
+                               the appropriate port number for the connection."
+                       SYNTAX       Integer32 (1..65535)
+       
        CachePeerIndex ::= TEXTUAL-CONVENTION
              DISPLAY-HINT "d"
              STATUS       current
@@ -756,7 +770,7 @@ squid MODULE-IDENTITY
                network management system to the next
                re-initialization."
              SYNTAX       Integer32 (1..2147483647)
-        END
+
 
 
        cachePeerIndex OBJECT-TYPE
@@ -814,7 +828,7 @@ squid MODULE-IDENTITY
 
 
        cachePeerPortHttp OBJECT-TYPE
-                SYNTAX Integer32
+                SYNTAX ValidPort
                 MAX-ACCESS read-only
                 STATUS current
                DESCRIPTION
@@ -822,7 +836,7 @@ squid MODULE-IDENTITY
         ::= { cachePeerEntry 5 }
 
        cachePeerPortIcp OBJECT-TYPE
-                SYNTAX Integer32
+                SYNTAX ValidPort
                 MAX-ACCESS read-only
                 STATUS current
                DESCRIPTION
@@ -832,7 +846,7 @@ squid MODULE-IDENTITY
 
        cachePeerType OBJECT-TYPE
                 SYNTAX INTEGER
-                MAX-ACCESS not-accessible
+                MAX-ACCESS read-only
                 STATUS current
                 DESCRIPTION
                         " Peer Type "
@@ -909,8 +923,8 @@ squid MODULE-IDENTITY
 
         cacheClientTable OBJECT-TYPE
            SYNTAX  SEQUENCE OF CacheClientEntry
-           ACCESS  not-accessible
-           STATUS  mandatory
+           MAX-ACCESS  not-accessible
+           STATUS  current
            DESCRIPTION
                     "A list of cache client entries."
                ::= { cacheMesh 2 }
@@ -918,8 +932,8 @@ squid MODULE-IDENTITY
 
        cacheClientEntry OBJECT-TYPE
            SYNTAX CacheClientEntry
-           ACCESS  not-accessible
-           STATUS  mandatory
+           MAX-ACCESS  not-accessible
+           STATUS  current
            DESCRIPTION
                     "An entry in cacheClientTable "
           INDEX { cacheClientAddressType, cacheClientAddress }
@@ -1033,7 +1047,7 @@ squid MODULE-IDENTITY
                 STATUS current
                DESCRIPTION
                     " Amount of ICP hit traffic in KB "
-        ::= { cacheClientEntry 9 }
+        ::= { cacheClientEntry 10 }
 
        -- end of cacheClientTable