Re: How to deal with levels in MIB ?

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 27/02/07, Shuaib Siddiqui <[email protected]> wrote:
> Lets say for example im registering my MIB module under 1.3.6.1.4.1.1 and I
> have:
>
> info 1.3.6.1.4.1.1.1
>  |
>   -version (scalar MIB object) [1.3.6.1.4.1.1.1.1]
>    -date (scalar MIB object)    [1.3.6.1.4.1.1.1.2 ]
>
> params 1.3.6.1.4.1.1.2
>  |
>  -frequency (scalar MIB object) [1.3.6.1.4.1.1.2.1]

That layout isn't particularly helpful.
It would be better to list the MIB definitions.



> how do I write the variable entry for such MIB objects? Is this correct ?
> ....
> {ExampleVERSION, ASN_OCTET_STR, RONLY, var_example, 1, {1} },
> {ExampleDATE, ASN_OCTET_STR, RONLY, var_example, 1, {2} },
> {ExampleFREQUENCY, ASN_INTEGER, RONLY, var_example, 1, {3} }

No.
That would register something like
       .1.3.6.1.4.1.1.{1,2,3}

(depending on the root OID passed to the registration call)

You want something like:

  {ExampleVERSION, ASN_OCTET_STR, RONLY, var_example, 2, {1, 1} },
  {ExampleDATE, ASN_OCTET_STR, RONLY, var_example, 2, {1, 2} },
  {ExampleFREQUENCY, ASN_INTEGER, RONLY, var_example, 2, {2, 1} }

Please see AGENT.txt for a description of this structure.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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.