On 17/07/06, Alon Marx <[EMAIL PROTECTED]> wrote:
>  By the way, is there another configuration file that handles strings
>  (ASN_OCTET_STR)?

'mib2c.scalar.conf' will generate code to handle all types of scalar
objects, though not as "watched variables".  You'd have to fill in the
appropriate handle_myscalar routine.

It would certainly be possible to extend the 'int_watch' config to
handle strings and OID values as well - it just needs someone to sit
down and write the necessary code.  Maybe when I have a bit of time...


>  Also, an idea 'stolen' from rpcgen:
>  nowadays, the scalar configuration file generates the main part of the
>  code (oid registration, etc.) and generates remarks where the user has
>  to insert his code:

>  Would it be better to just declare a function that will return the
>  pointer and length. This will enable the user to put his code within the
>  file (as it works today), or to implement the function in another file.

The module implementer can always do this if they wish, and it's
similar to the approach taken in Robert's MfD helper framework.  But
personally, I dislike a proliferation of itty-bitty functions, and
prefer to have a smaller number of (IMO) sensibly-sized routines.

There's no One Right Way to organise code, so it tends to be the lead
programmer on a particular module/helper/etc that sets the tone for
how that particular module will be written.  We could waste hours
fighting among ourselves about the best way to structure things.  If
someone is prepared to do the work, they get the major say in how it
should be laid out :-)  It's not perfect, but it seems to work OK.


Dave

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

Reply via email to