RE: Index in Table .... request for explanation

"Mike Ayers" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <83E753BE7B6A324ABB336245BAF1DAAC0A79C9B3@mailserver.metatv-ds.metatv.com>
> From: m.zeeshan [mailto:[email protected]] 
> Sent: Wednesday, January 28, 2009 3:20 AM

> peerTable OBJECT-TYPE
>     SYNTAX      SEQUENCE OF PeerTableEntry
>     MAX-ACCESS  not-accessible
>     STATUS      current
>     DESCRIPTION
> 	"This table merely contains a set of data which is otherwise."
>     ::= { tableHSS 1 }
> 
> peerTableEntry OBJECT-TYPE
>     SYNTAX      PeerTableEntry
>     MAX-ACCESS  not-accessible
>     STATUS      current
>     DESCRIPTION
> 	"A row describing a given working group"
>     INDEX   { peerIdentity }
>     ::= {peerTable 1 }
> 
> PeerTableEntry ::= SEQUENCE {
> 	peerIdentity	OCTET STRING,
> 	peerRole	OCTET STRING,
> 	peerIPAddress	OCTET STRING,
>     	peerPort	Integer32
> }
> 
> 
> peerIdentity OBJECT-TYPE
>     SYNTAX      OCTET STRING (SIZE(1..32))
>     MAX-ACCESS  read-write
>     STATUS      current
>     DESCRIPTION
> 	"The name of the IETF Working Group this table describes."
>     ::= { peerTableEntry 1 }
> 
> peerRole OBJECT-TYPE
>     SYNTAX      OCTET STRING
>     MAX-ACCESS  read-write
>     STATUS      current
>     DESCRIPTION
> 	"One of the names of the chairs for the IETF working group."
>     ::= { peerTableEntry 2 }
> 
> peerIPAddress OBJECT-TYPE
>     SYNTAX      OCTET STRING
>     MAX-ACCESS  read-write
>     STATUS      current
>     DESCRIPTION
> 	"The other name, if one exists, of the chairs for the IETF
> 	working group."
>     ::= { peerTableEntry 3 }
> 
> 
> peerPort OBJECT-TYPE
>     SYNTAX      Integer32
>     MAX-ACCESS  read-write
>     STATUS      current
>     DESCRIPTION
> 	"The mode number for the current operation being performed."
>     ::= { peerTableEntry 4 }

> 2. the thing i m surely missing is the neat understanding of Indexed
> and/or the purpose of like "snmpv3" tag at the end of each
> nsTransactionTable entry ........ like following...
> 
> CM-HSS-IMS-MIB::peerRole."snmpv3" = STRING: "sh-client"
> 
> why we need this last tag ...... of ....  ."snmpv3"

	A table is a collection of rows of data.  In order to distinguish individual pieces of data, we need two things:  the object in the row, and the row in the table.  We distinguish the object in the row by its position in the SEQUENCE - 1, 2, etc., symbolically referred to by the names given - peerIdentity, peerRole, etc.  The determination of which row is done explicitly, by having an index, which is part of each objects name.  You have defined an OCTET STRING index, so that is what must be used.  So in your example:

> CM-HSS-IMS-MIB::peerRole."snmpv3" = STRING: "sh-client"

	we see that the second object in the row indexed as "snmpv3" in the peerTable of the CM-HSS-IMS-MIB has the value of "sh-client".  There could also be rows for "aaa", "EoS" (giggle), "SMiNG" (chortle), and "snmpconf" (ROFLMAO!)....oops, sorry - my postjudices are showing.

	MIB objects do not exist unless they have data, so it is basically impossible to distinguish between an unimplemented table, a table with no rows, and a table one is not permitted to view.  This is by design.  If you want to see the table when it comes up, add a row during startup.


	HTH,

Mike

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.