2009/8/31 Marwan Khoury <[email protected]>: > 1-Why did mib2c generate the following structure:
[snip] > what is the reason behind the existing of two field of value name and > name_len Index columns are meant to be marked as "not-accessible". The mib2c templates expect this to hold, so generate fields in the data structure for both all index values (which won't be accessible) and accessible column objects (which won't be index values). If your MIB is malformed, and has accessible column objects, then the data structure generated will also be sub-obtimal. > 2-How can I set the values of each colomn in a row? [snip] That looks OK at first sight. Whenever you call 'methodTable_createEntry()' to create a row in the table, that should initialise the column values appropriately. > and the following command: > env MIBS=All snmpwalk -v 2c -c public localhost jpm > gave: > JINNY-JPM-MIB::profact-total.0 = Counter32: 0 > JINNY-JPM-MIB::profact-ok.0 = Counter32: 0 You haven't said anything about how you are initialising the table, or what rows you are creating. > 3-My aim is to read the OID from the snmp request and fetch the value of it > from a shared memory, How can I extract the OID from the request in order to > print it as a string and search fro it in the shared memory? Your handler shouldn't be concerned with OIDs as such - but with the index values for a given row. This is extracted for you by the table handler, and made available via the 'request' parameter. Please see existing MIB module code for examples. Dave ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ 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
