How can I set contextName instead of default NULL

"girish" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <1198766188.178.autosave.old.1198821597.3981@webmail.rediffmail.com>
Hi all,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I'm using agent-subagent approach. I want to set the context name only for my MIB. How I should change my subagent code based on this..??? Here in my subagent initialization code. Please help wat&nbsp; changes I should do.&nbsp; void *snmpsubagent(void *){&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp; syslog = 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);&nbsp;netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET,&nbsp;&nbsp;&nbsp; "tcp:localhost:705");&nbsp;&nbsp; SOCK_STARTUP;&nbsp;&nbsp;&nbsp; if(!(init_agent("subagent_daemon")))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug("Subagent-daemon is up and running.");&nbsp;&nbsp;&nbsp; else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
 ;&nbsp;&nbsp; err("Subagent-daemon could not be initialized.");&nbsp;&nbsp;&nbsp; init_myMIBScalars();&nbsp;&nbsp;&nbsp; init_myMIBTables();&nbsp;&nbsp;&nbsp; init_snmp("subagent_daemon");&n
 bsp;&nbsp;&nbsp; snmp_shutdown("subagent_daemon");&nbsp;&nbsp;&nbsp; SOCK_CLEANUP;&nbsp;&nbsp;&nbsp; return(NULL);}

Regards,
Girish

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.