initializing scalars

This is a discussion on initializing scalars within the SNMP Coders forums, part of the Networking and Network Related category; Hi All, I generated sub agent code for scalars in HOST-RESOURCES_MIB using: env MIBS="+HOST-RESOURCES-MIB" ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-26-2006
Avnindra Singh
 
Posts: n/a
Default initializing scalars

Hi All,

I generated sub agent code for scalars in HOST-RESOURCES_MIB using:
env MIBS="+HOST-RESOURCES-MIB" mib2c -c mib2c.scalar.conf hrSystem

It generates hrSystem.c and hrSystem.h. Inside the .c file there are two
kind of functions:
a) init_hrSystem (to be called from the sub agent)

b) handler functions for scalars like, handle_hrSystemDate, which I
suppose will be called when GET/SET arrives for this scalar.

I want to initialize some value to, say, hrSystemDate, during subagent
initialization, before any GET/SET request comes. Can it be done?

Which data structure I can access calling
netsnmp_create_handler_registration in init_hrSystem to get to the
variable for hrSystemDate?

Please let me know if it is possible.

Thanks,
Avnindra

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0