Difference between revisions of "Debug tokens"

From Net-SNMP Wiki
Jump to: navigation, search
(Created page with "There are many debug tokens in Net-SNMP. Debug tokens are not assigned, and MIB authors may use any string they'd like for debug tokens. Because tokens are not assigned, there...")
(No difference)

Revision as of 00:13, 19 November 2014

There are many debug tokens in Net-SNMP. Debug tokens are not assigned, and MIB authors may use any string they'd like for debug tokens. Because tokens are not assigned, there is no way for running code to generate the current set of tokens.

To generate a list of tokens for a particlar version of Net-SNMP, you can download the source and run the following command in the source directory:

find . -name "*.c" | xargs grep "DEBUGMSG[A-Z_]*(( *\"" | sed 's/^.*DEBUGMSG[A-Z_]*(( *\"\([^\"]*\).*/\1/' | sort -u 

There are lists of tokens for a few releases in the wiki:


Note that you do not have to specify a complete token. For example, if you specify -Ddump, you will get debug output for dumpH_recv, dumpv_recv and dumpv_send.

Some of the more interesting/common tokens (available in most releases) are :

agentx
disman
dumpv_recv
dumpv_send
exec
init_mib
mib_init
mteTrigger
parse-file
parse-mibs
perl
read_config
recv
run
smux
snmp
snmpd
snmptls
snmptrapd
snmpusm
snmpv3
tls
transport
trap
usm
usmUser
vacm
versioninfo