> I see no good reason why the same index mistake should be repeated for
> IPv6.
>
OK.
If I understand you, the attached proposal should fit your
requirements...
> Simple, but is a slight
> problem if one removes peers in the middle.
Note the "tricky" comment solving that problem... Just not allowing it !
I think this can be a realistic assumption. As Amos said, it is not
expected to change peer configuration very oftenly. In fact, this mib is
inspired on the way IPv6 Interfaces tables is done on rfc 2465, your
very first idea.
Check it. If sound, I will commit.
--
-- cacheMesh group { squid 5 }
--
cachePeerTable OBJECT-TYPE
SYNTAX SEQUENCE OF CachePeerEntry
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" This table contains an enumeration of
the peer caches, complete with info "
::= { cacheMesh 1 }
cachePeerEntry OBJECT-TYPE
SYNTAX CachePeerEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
" An entry in cachePeerTable "
INDEX { cachePeerIndex }
::= { cachePeerTable 1 }
CachePeerEntry ::= SEQUENCE {
cachePeerIndex CachePeerIndex,
cachePeerName DisplayString,
cachePeerAddressType InetAddressType,
cachePeerAddress InetAddress,
cachePeerPortHttp Integer32 (1..65535),
cachePeerPortIcp Integer32 (1..65535),
cachePeerType Integer32,
cachePeerState Integer32,
cachePeerPingsSent Counter32,
cachePeerPingsAcked Counter32,
cachePeerFetches Counter32,
cachePeerRtt Integer32,
cachePeerIgnored Counter32,
cachePeerKeepAlSent Counter32,
cachePeerKeepAlRecv Counter32
}
CachePeerIndex ::= TEXTUAL-CONVENTION
DISPLAY-HINT "d"
STATUS current
DESCRIPTION
"A unique value, greater than zero for each
cache peer instance in the managed
system. It is recommended that values are assigned
contiguously starting from 1. The value for each
cache peer index must remain constant
at least from one re-initialization of the entity's
network management system to the next
re-initialization."
SYNTAX Integer32 (1..2147483647)
END
cachePeerIndex OBJECT-TYPE
SYNTAX CachePeerIndex
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A unique non-zero value identifying
the particular cache Peer."
::= { cachePeerEntry 1 }
cachePeerName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" The FQDN name or internal alias for the
peer cache "
::= { cachePeerEntry 2 }
cachePeerAddressType OBJECT-TYPE
SYNTAX InetAddressType
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The type of Internet address by which the peer
cache is reachable."
::= { cachePeerEntry 3 }
cachePeerAddress OBJECT-TYPE
SYNTAX InetAddress (SIZE (1..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The Internet address for the peer cache. The type of this
address is determined by the value of the peerAddressType
object. Note that implementations must limit themselves
to a single entry in this table per reachable peer.
The peerAddress may not be empty due to the SIZE
restriction.
If a row is created administratively by an SNMP
operation and the address type value is dns(16), then
the agent stores the DNS name internally. A DNS name
lookup must be performed on the internally stored DNS
name whenever it is being used to contact the peer.
If a row is created by the managed entity itself and
the address type value is dns(16), then the agent
stores the IP address internally. A DNS reverse lookup
must be performed on the internally stored IP address
whenever the value is retrieved via SNMP."
::= { cachePeerEntry 4 }
cachePeerPortHttp OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" The port the peer listens for HTTP requests "
::= { cachePeerEntry 5 }
cachePeerPortIcp OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" The port the peer listens for ICP requests
should be 0 if not configured to send ICP requests "
::= { cachePeerEntry 6 }
cachePeerType OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
" Peer Type "
::= { cachePeerEntry 7 }
cachePeerState OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" The operational state of this peer "
::= { cachePeerEntry 8 }
cachePeerPingsSent OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Number of pings sent to peer "
::= { cachePeerEntry 9 }
cachePeerPingsAcked OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Number of pings received from peer "
::= { cachePeerEntry 10 }
cachePeerFetches OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Number of times this peer was selected "
::= { cachePeerEntry 11 }
cachePeerRtt OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Last known round-trip time to the peer (in ms) "
::= { cachePeerEntry 12 }
cachePeerIgnored OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" How many times this peer was ignored "
::= { cachePeerEntry 13 }
cachePeerKeepAlSent OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Number of keepalives sent "
::= { cachePeerEntry 14 }
cachePeerKeepAlRecv OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Number of keepalives received "
::= { cachePeerEntry 15 }