This is a discussion on On debug output within the SNMP Coders forums, part of the Networking and Network Related category; I am currently making over the debug module and have found a few odd corners where some more clarification could ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am currently making over the debug module and have found a few odd
corners where some more clarification could be helpful. Currently debug_is_token_registered only checks if there exist an enabled debug region that is a prefix of token. I would like to modify the check to be if the longest module is enabled or not. Currently debug_print_everything can force us to print everything and dodebug can force us to print nothing but there is no support for setting the default policy. I think it would be nice to be able to say that the default policy should be to print everything or to not prit anything. Currently dbg_tokens might contain multiple entries with the same token. I think it would be reasonable to have a uniqueness condition on dbg_tokens. Currently the MIB maps to the code as follows: nsDebugEnabled <=> !dodebug nsDebugOutputAll <=> debug_print_everything nsDebugDumpPdu <=> NETSNMP_DS_LIB_DUMP_PACKET nsDebugTokenPrefix <=> debug_entry->token_name nsDebugTokenStatus <=> debug_entry->status & SNMP_DEBUG_ACTIVE I would like to add some more things to the mib: nsDebugDefaultEnabled OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-write STATUS current DESCRIPTION "If debug output should be generated for items without any specific instructions." DEFVAL { true } ::= { nsConfigDebug 5 } The mapping to code would be nsDebugDefaultEnabled <=> <new variable with default action> nsDebugTokenEnabled OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-create STATUS current DESCRIPTION "If debug output should be generated for items with this prefix unless a more specialized match exists." DEFVAL { true } ::= { nsDebugTokenStatus 5 } The mapping to code would be nsDebugTokenEnabled <=> !(debug_entry->status & SNMP_DEBUG_EXCLUDED) I am aware that there are some older deprecated but similar columns in nsDebugTokenTable and since I haven't checked if my names clash I might have to change some names in this proposal. The effect I am searching is that one should be able to say that the debug output is for instance: +foo -foobar or +ALL -trace Further, I am looking to support dynamic adding and removal of debug tokens and finally all this should be accessible using the mib module. I also intend to add undo support to the mib module. Any comments on this? /MF ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757...un.com/javaone _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |
![]() |
| Thread Tools | |
| Display Modes | |
|
|