Hi,

I am using Net-SNMP version 5.7.1.pre2, having built it using Visual 
Studio 2008 with support for the agentx module and installed the Perl 
modules that are bundled with it.

I have configured the agent to run as an AgentX master agent and I have a 
perl module that registers a sub-agent handler, MyHandler, for OID 
1.3.6.1.4.1.2257.11.1.1.1 (ssaApplication).

The call-back handler, MyHandler, is called correctly for Get, Set and 
GetNext requests issued for OIDs in the sub-tree below 
1.3.6.1.4.1.2257.11.1.1.1.

However, when I issue an SNMP Walk command at OID 1.3.6.1.4.1.2257.11.1.1 
(ssaGenericMIB), I get what I believe to be unexpected behaviour from the 
master agent. 

1. The agent receives a GETNEXT message for OID, 1.3.6.1.4.1.2257.11.1.1. 
I believe this is correct.
2. The agent invokes MyHandler, passing it OID 1.3.6.1.4.1.2257.11.1.1.1. 
I believe this is also correct. 
3. The mode passed to MyHandler is 'Get'. This is incorrect as a 
GetRequest cannot be invoked without an instance id.

This doesn't make any sense. The call-back handler should be invoked with 
a mode indicating 'GetNext' and the OID 1.3.6.1.4.1.2257.11.1.1.1. Why is 
the mode being changed from 'GetNext' to 'Get'?

At the very least the agent should not invoke the call-back handler with 
mode 'Get' on an object that is not an instance. This is not allowed in 
SNMP.

Has anyone else seen this kind of behaviour?

The output from the agent is included below. The OID of ssaNetwork (seen 
in the output below) is 1.3.6.1.4.1.2257.11.1.1.2.


C:\net-snmp\bin>snmpd.exe -V -f -Lo -Dagentx udp:8161
registered debug token agentx, 1
agentx_register_app_config_handler: registering .conf token for 
"agentxsocket"
agentx_register_app_config_handler: registering .conf token for 
"agentxperms"
agentx_register_app_config_handler: registering .conf token for 
"agentxRetries"
agentx_register_app_config_handler: registering .conf token for 
"agentxTimeout"
Turning on AgentX master support.
agentx/config: port spec: tcp:localhost:30000
agentx/master: initializing...
agentx/master: initializing...   DONE
NET-SNMP version 5.7.1.pre2
agentx/master: transport connect on session 00AF8508
agentx/master: handle pdu (req=0x7ad0,trans=0x0,sess=0x0)
agentx/master: open 00AF8508
agentx/master: opened 00B092D8 = 5 with flags = a0
agentx/master: send response, stat 0 (req=0x7ad0,trans=0x0,sess=0x0)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x7ad1,trans=0x0,sess=0x5)
agentx/master: in register_agentx_list
agentx/master: registered ok
agentx/master: send response, stat 0 (req=0x7ad1,trans=0x0,sess=0x5)
agentx_build: packet built okay
agentx/master: handle pdu (req=0x7ad2,trans=0x0,sess=0x5)
agentx/master: in register_agentx_list
agentx/master: registered ok
agentx/master: send response, stat 0 (req=0x7ad2,trans=0x0,sess=0x5)
agentx_build: packet built okay
Received SNMP packet(s) from UDP: [10.50.80.218]:3185->[0.0.0.0]:0
  GETNEXT message
    -- SSA-GENERIC-MIB::ssaGenericMIB
agentx/master: agentx master handler starting, mode = 0xa1
agentx/master: request for variable (SSA-GENERIC-MIB::ssaGenericMIB)
agentx/master: inexact request preceeding region 
(SSA-APPLICATION-MIB::ssaApplication)
agentx/master: INCLUSIVE varbind SSA-APPLICATION-MIB::ssaApplication 
scoped to SSA-NETWORK-MIB::ssaNetwork
agentx/master: sending pdu (req=0x2,trans=0x1,sess=0x5)
agentx_build: packet built okay
agentx/master: transport disconnect on session 00AF8508
agentx/master: close 00AF8508, -1
agentx/master: agentx master handler starting, mode = 0xa1
agentx/master: request for variable (SSA-GENERIC-MIB::ssaGenericMIB)
agentx/master: inexact request preceeding region 
(SSA-NETWORK-MIB::ssaNetwork)
agentx/master: INCLUSIVE varbind SSA-NETWORK-MIB::ssaNetwork scoped to 
SSA-FILE-TRANSFER-MIB::ssaFileTransfer
agentx/master: sending pdu (req=0x3,trans=0x1,sess=0x5)
agentx_build: packet built okay
agentx/master: timeout on session 00AF8508 req=0x2
agentx/master: NULL sess_pointer??


regards

Ramon




-----------------------------------------------
This email and any attached files contains company confidential information 
which may be legally privileged.  it is intended only for the person(s) or 
entity to which it is addressed and solely for the purposes set forth therein.  
If you are not the intended recipient or have received this email in error 
please notify the sender by return, delete it from your system and destroy any 
local copies.  It is strictly forbidden to use the information in this email 
including any attachment or part thereof including copying, disclosing, 
distributing, amending or using for any other purpose.

In addition the sender excludes all liabilities (whether tortious or common 
law) for damage or breach arising or related to this email including but not 
limited to viruses and libel.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
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

Reply via email to