Hello,

During the latest Net-SNMP administrative meeting it has been brought up
that it is inconvenient that AgentX clients on Windows using the Net-SNMP
library have to set the AgentX target explicitly to "localhost:705". The
patch below overcomes this, but at the same time changes the default AgentX
target socket from ":705" (any interface) to "localhost:705". Is this
acceptable ?

Index: agent/mibgroup/agentx/agentx_config.c
===================================================================
--- agent/mibgroup/agentx/agentx_config.c       (revision 18337)
+++ agent/mibgroup/agentx/agentx_config.c       (working copy)
@@ -170,7 +170,7 @@ agentx_config_init(void)
    netsnmp_register_default_domain("agentx", "unix tcp");
    netsnmp_register_default_target("agentx", "unix",
NETSNMP_AGENTX_SOCKET);
#define val(x) __STRING(x)
-    netsnmp_register_default_target("agentx", "tcp", ":" val(AGENTX_PORT));
+    netsnmp_register_default_target("agentx", "tcp", "localhost:"
val(AGENTX_PORT));
#undef val
    agentx_register_config_handler("agentxsocket",
                                  agentx_parse_agentx_socket, NULL,

The output of netstat on Windows with a running agent with the above patch
applied is as follows:

C:\>netstat -an|find "705"
 TCP    127.0.0.1:705          0.0.0.0:0              LISTENING

Bart.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to