I have started using mib2c to generate the stub code for my access routines.

 

I see much commonality in the bulk of the code but I have a couple
questions, if anyone could I would appreciate it.

 

1. Using mib2c -c mib2c.scalar.conf <MIBNAME>:<Scalar Name>           works
like a champ, I have get and set working.

 

2. Using mib2c -c mib2c.table.conf <MIBNAME>:<Table Name>   

            Basic code is there, there are a few incorrect pointer
dereferences, but not a huge problem, I have get and set working

            What is missing are the get first and next support routines
found under the next two options. (for GET_NEXT operations)

            The files mib2c created we on the order of 25Kbytes of code

 

 

2. Using mib2c -c mib2c.iterate_access.conf <MIBNAME>:<Table Name>


3. Using mib2c -c mib2c.mfd.conf <MIBNAME>:<Table Name>    

These worked, with the same problems described above but the amount of code
generated is on the order of 200K (yikes)

 

 

I am building a small application and with 40 tables and 100 scalars, I can
not afford the MFD approach or iterate approach.  Debug is still on but the
relative size of the files compared to each other will still be dramatic.

 

Question 1: Can I simply lift the first and next routines from the other 2
mib2c runs and use them in the table style code?  MFD seems to have done
away with the huge switch statement in the generated code.

 

Question 2: The code comments around the table and iterate styles have
MODE_GET: and state these handle GET_NEXT and GET_BULK when in fact they do
not.

                  The MODE_GET_NEXT and MODE_GET_BULK are not handled, maybe
that is why the get_first and get_next handlers for the row search are
missing too?

                        What to do here?                       

 

Thanks,

 

Adam J. Bell



 



The information contained in this electronic mail transmission may be 
privileged and confidential, and therefore, protected from disclosure. If you 
have received this communication in error, please notify us immediately by 
replying to this message and deleting it from your computer without copying or 
disclosing it.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to