RE: Document for modifying the mib2c generated code

Dheeraj Gautam <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I am not sure of the document. While I was implemented this, I did the following step and it worked good and still working.

1.       TABLE_data_access.c is only file I changed, TABLE__container_load() is only function I changed

2.       Code generated will contain a while (1) loop in above function. This loop is responsible for caching all the data with-in snmpd.

3.       If no data or end of data, set rc as MFD_END_OF_DATA and break out of loop

4.       Keep incrementing the idx variable till you have data (already generated)

5.       Fill all the indexes of table. For me a string was index, TABLE_variable1, copy the value in generated variable (TABLE_variable1) , set TABLE_variable1_len to the length of string copied. Make string as NULL terminated

6.       Now fill values in all the generated variables. For U64, you might have to set VAR.high and VAR.low separately.

7.       TABLE_data_access.h will contain a timeout macro, change this value if needed.

I use dlmod option in snmpd.conf and started snmpd with /usr/bin/snmpd -f -Ls7 -c /etc/snmpd.conf

dlmod <name of init-snmp-module function>       /path/to/snmp-module/ lib<snmp-module-name>.so

That's all

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1

_______________________________________________
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.