2009/12/8 飞飞 <chenyapu1...@qq.com>:
> I really think I have done my mib2c file job,but the MgG-soft brower's
> result dispirit me heavily.
>
> I got:
>
> 2464: enterprises.30901.2090.7000.1.1.1.1.111 (gauge) 111
> 2465: enterprises.30901.2090.7000.1.1.1.2.111 (gauge) 111
> 2466: enterprises.30901.2090.7000.1.1.1.3.111 (gauge) 111
> 2467: enterprises.30901.2090.7000.1.1.1.4.111 (gauge) 1
> 2468: enterprises.30901.2090.7000.1.1.1.5.111 (integer) 1
> 2469: enterprises.30901.2090.7000.1.1.1.6.111 (gauge) 1
> 2470: enterprises.30901.2090.7000.1.1.1.7.111 (integer) 1
> 2471: enterprises.30901.2090.7000.1.1.1.8.111 (integer) 1
> 2472: enterprises.30901.2090.7000.1.1.1.9.111 (integer) 1
> 2473: enterprises.30901.2090.7000.1.1.1.10.111 (gauge) 1
> 2474: enterprises.30901.2090.7000.1.1.1.11.111 (gauge) 1
> 2475: enterprises.30901.2090.7000.1.1.1.12.111 (octet string) uituits
> 2476: enterprises.30901.2090.7000.1.1.1.13.111 (octet string) uituits
> 2477: enterprises.30901.2090.7000.1.1.1.14.111 (octet string) uituits
> 2478: enterprises.30901.2090.7000.1.1.1.15.111 (octet string) uituits
> 2479: enterprises.30901.2090.7000.1.1.1.16.111 (octet string) uituits

OK - so that looks like a table rooted at
   enterprises.30901.2090.7000.1.1,
with sixteen columns (numbered 1-16), and one row (with index 111)

The first 3 columns of this (sole) row have the value 111,
the next 8 have the value 1, and the last five have the value "uituits"



> It is so weird,my .c file is:


>     static oid diskSystemTable_oid[] = {1,3,6,1,4,1,30901,2090,7000,1,1};
>     size_t diskSystemTable_oid_len   = OID_LENGTH(diskSystemTable_oid);

>     reg = netsnmp_create_handler_registration(
>               "diskSystemTable",     diskSystemTable_handler,
>               diskSystemTable_oid, diskSystemTable_oid_len,
>               HANDLER_CAN_RONLY
>               );
>     netsnmp_register_table_iterator( reg, iinfo );

So you're registering a table with root .1.3.6.1.4.1.30901.2090.7000.1.1


>     diskSystemTable_createEntry(111,111,111, 1,1,1,1,1,1,1,1,"uituits",
>               7,"uituits", 7,"uituits", 7,"uituits", 7,"uituits", 7);

and initialising this with a single row, containing three columns of 111,
eight columns of 1, and five columns of "uituits".


So what you see when you walk the table is exactly what you are
setting up in the code.   What's the problem?

Dave

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to