Subject: AgentX Inter Operability Tests UCD vs. AgentX++ (First Impression)

From: Frank Fock <[email-masked]>
Date: Mon, 06 Mar 2000 14:00:45 +0100

Hi Dave,

yesterday I did the first inter operability testings between the UCD
implementation (4.1.1 on SuSE Linux 6.3) and my AgentX++ implementation.
After solving a few bugs in my encoding/decoding of integers and oids
I got an AgentX++ master with the agentxd subagent up and running.

A walk on 0.0 works until the first OPAQUE (float) in your private
UCD MIB. The debug log of agentxd shows that it gets the value from
the instrumentation and then it seems that it does not send the value
out on the socket. If you are interested in the debug log, I can send 
it to you.

The test with the snmpd and an AgentX++ subagent failed. My subagents 
successfully register at your master, but if I do a walk on the
registered subtree the snmpd debug log shows that the agentx instrumentation
is called but there is no message going out on the socket. So, my
original request times out. 

Do I need to compile the MIB defining the subtree I am registering 
into snmpd? I registered for example 1.3.6.1.2.1.37 (atmMIB).

Today I will do some SET request and GETBULK testing. 

Best regards,
Frank

-- 
Frank Fock                     Marconi Communications Software Systems
<[email-masked]>  Blumenstrasse 22-24, 
Phone: +49 7191 13-4851        71522 Backnang,            
Fax:   +49 7191 13-2502        Germany

---

From: Wes Hardaker <[email-masked]>
Date: 06 Mar 2000 11:14:26 -0800

>>>>> On Mon, 06 Mar 2000 14:00:45 +0100, Frank Fock <[email-masked]> said:

Frank> Do I need to compile the MIB defining the subtree I am
Frank> registering into snmpd? I registered for example 1.3.6.1.2.1.37
Frank> (atmMIB).

I'll let Dave respond to the rest when he gets back from his long
weekend, but no you do not need to do the above.

-- 
Wes Hardaker
Distributed Computing Analysis and Support
University of California at Davis

---

From: Frank Fock <[email-masked]>
Date: Tue, 07 Mar 2000 19:03:05 +0100

> original request times out.

I have tested the UCD master / AgentX++ subagent combination once 
again. The statement above from my first mail is not correct. My
subagent receives AgentX search requests but the upper bound is
set to the lower bound of the registered region by the UCD master. 

Because of this, my subagent is returning endOfMibView. The master
seems to not make a error status conversion from v2c to v1. It returns
<NULL> on the GETNEXT request. 

The region I am registering is the atmMIB (1.3.6.1.2.1.37). The
GETNEXT I issued was on 1.3.6.1.2.1.37. 

> Today I will do some SET request and GETBULK testing.

The SET request processings I have done so far worked. But I will
have to create some more complex test cases. 

The GETBULK work fine with the UCD master and AgentX++ subagent, except
the problem with OPAQUE types mentioned in my first mail. 

Best regards,
Frank

---

From: Dave Shield <[email-masked]>
Date: Wed, 08 Mar 2000 11:10:16 +0000

> set to the lower bound of the registered region by the UCD master.

Oh, that's a relief.
I knew that the UCD agent didn't handle ranges correctly, but it
was a bit worrying that it wasn't sending out the request at all.

Can you try the following patch (untested, but it should work :-) )

-------------- snip ----------

*** master_request.c	2000/03/08 10:52:34	1.1
--- master_request.c	2000/03/08 10:54:16
***************
*** 339,345 ****
  	sub = find_subtree_previous( vbp->name, vbp->name_length, NULL );
          snmp_pdu_add_variable( request->pdu,
  			   vbp->name, vbp->name_length, ASN_PRIV_INCL_RANGE,
! 			   (u_char*)sub->name, sub->namelen);
      }
  
      return AGENTX_ERR_NOERROR;
--- 339,345 ----
  	sub = find_subtree_previous( vbp->name, vbp->name_length, NULL );
          snmp_pdu_add_variable( request->pdu,
  			   vbp->name, vbp->name_length, ASN_PRIV_INCL_RANGE,
! 			   (u_char*)sub->end, sub->end_len);
      }
  
      return AGENTX_ERR_NOERROR;

-------------- snip ----------

> seems to not make a error status conversion from v2c to v1.

Yes - that's correct
There's a comment in the 'handle_agentx_response'
routine to remind me that this needs fixing.

> GETNEXT I issued was on 1.3.6.1.2.1.37. 

   The master ought to be picking up any following (internal) modules,
so this will should only bite if the last subagent registration follows
any internal registrations.

  How did you configure the UCD master?  Does it still include any of
the UCD-specific support (e.g. ucd-snmp/versioninfo) ?

> have to create some more complex test cases.

Note that it's likely that failed subagent SETs will probably not be
handled correctly.  While I believe this worked initially, subsequent
changes to the main agent (unrelated to AgentX) have broken the handling
of errors from sub-agents, and this wasn't spotted until after the 4.1.1
release.

> the problem with OPAQUE types mentioned in my first mail. 

Hmmm.... I'm slightly puzzled about this.
It should be processed in precisely the same way as a string
or IP Address type.  I presume these are working OK?

  If you can send me the log, I'll see if I can spot the problem.

Dave