Hi all,

I've tried to use the net-snmp utility in the project for the snmp
functionality. Here's the requirement for the project:

1. create a snmp mib according to the configuration parameters with a
particular algorithm, such as attribute name, host name...... . BTW, the
generated mib files will change everyday.   
2. register the snmp table handler with the content of the gerated snmp
mib file,write some call back function to deal with the get/get next
request.
  1) Register the call back function to deal with the snmp get request
within the netsnmp_create_handler_registration() , which will register
the net snmp handler for snmp get/get next functionality
       xReg = netsnmp_create_handler_registration(
              xTableName,     GeneratedTable_handler,
              xSnmpTableOid,  xSnmpTableOidLen,
              HANDLER_CAN_RONLY
              );

 2)Register the net snmp table iterator to loop for the content of all
the index for a snmp table, especially for the get-next request:
   netsnmp_iterator_info           *iinfo;
   netsnmp_table_registration_info *table_info;
   iinfo->get_first_data_point = GeneratedTable_get_first_data_point;
   iinfo->get_next_data_point  = GeneratedTable_get_next_data_point;
   iinfo->table_reginfo        = table_info;
    
   netsnmp_register_table_iterator( reg, iinfo ); 
  

 3) when there's an SNMP get request from the client side, the Agentx of
net-snmp will  invoke the call back function that registered for this
snmp table, It'll deal with all the entries in the snmp table. 

But it seems that there's no registered handle if you don't load the
geerated mib , so I can't get any values from the specific oid. Is there
any exmaple or instruction to show how to implement the code for the
dynamic snmp tables? Thanks!


Best Regards,
Chen Fei
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to