On 27/04/07, rajasekhar kavuri wrote:
> register_config_handler("snmptrapd", "createUser",
> usm_parse_create_usmUser, NULL,
> "username (MD5|SHA) passphrase [DES [passphrase]]");
> register_config_handler("snmptrapd", "usmUser",
> usm_parse_config_usmUser, NULL, NULL);


If there's a line "createUser ..." or "usmUser ..." in the snmptrapd.conf file,
then call the routine usm_parse_{create,config}_usmUser() to process it,
and add the relevant SNMPv3 user to the system.


> snmp_register_callback(SNMP_CALLBACK_LIBRARY,
> SNMP_CALLBACK_STORE_DATA,
> usm_store_users, NULL);


Prepare the trapd to save any SNMPv3 users to persistent storage.


> init_snmp("snmptrapd");


Initialise the SNMP libraries.
(including reading in config files, and saving any persistent data.

> netsnmp_transport* transport = netsnmp_tdomain_transport("udp:162", 1, "udp");


Listen for incoming requests on UDP port 162.


Dave

PS: It's C code, not C++

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders