[AGENT++] AgenPro 2 problems [Re: does Agenpro2 call correct OctetStr constructor?]

Frank Fock fock at agentpp.com
Sat Sep 6 02:40:12 CEST 2003


Hi Dave,

Dave Mason wrote:

> Hi Frank,
> I dont think we're out of the woods quite yet.  I picked up AgenPro 
> v2.0.6a but I have two problems and a question:
>
> 1. The IpAddress problem isnt fixed.  Actually, because I have six 
> bytes of data (host and port), I didnt use an IpAddress but rather an 
> octet string.  I saw where you changed cpp_code.vm, but since I didnt 
> use IpAddress, I dont think it helped, although including IpAddress 
> was probably necessary.

Yes, it was. I will investigate the problem with Octet String further...

>
> 2. I see the new agentgen creates the code for tables when agent 
> capabilities is turned on in the project file, but I found a problem 
> with it.  The first columnar object in one of my tables (after the 
> not-accessible index object) is a DateAndTime, specified like this:
>
>   almTime OBJECT-TYPE
>      SYNTAX      DateAndTime
>      MAX-ACCESS  read-only
>      STATUS      current
>      DESCRIPTION
>         "This attribute specifies the time when the notification was 
> issued."
>      ::= { almEntry 2 }
>
> AgenPro v1.8.6 created the constructor like this:
>
> almTime::almTime(const Oidx& id):
>   MibLeaf(id, READONLY, new OctetStr())
> {
> }
>
> AgenPro v2.0.6a does this:
>
> almTime::almTime(const Oidx& id):
>    DateAndTime(id, READONLY, VMODE_DEFAULT)
> {
> }
>
> You'll see that the "new OctetStr()" is not done, so the agent crashes 
> later when I try to assign a value.  This problem also occurs with 
> scalar DateAndTime objects, but I didnt see this problem for any other 
> syntax.

??? The DateAndTime constructor does not take an OctetStr!
Thus, the crashes are most likely related to a totally different issue.

>
> 3. I'm not sure if this is a problem, but I thought I'd run it by 
> you.  The MIB module I'm working with is defined like this:
>
>   ttiWsNotification MODULE-IDENTITY
>      LAST-UPDATED "200206120000Z" -- Midnight June 12, 2002
>      ORGANIZATION "Transat Technologies, Inc."
>      CONTACT-INFO ".."
>      DESCRIPTION  "Notifications MIB."
>      REVISION     "200206120000Z" -- Midnight June 12, 2002
>      DESCRIPTION  "Initial version."                      ::= { ttiWs 
> 11 }
>
> where ttiWs is "1.3.6.1.4.1.13448.3.1".  AgenPro v1.8.6 created the 
> MibGroup constructor like this:
>
> ttiwsnotificationmib::ttiwsnotificationmib():
>   MibGroup("1.3.6.1.4.1.13448.3.1.11", "ttiWsNotification")
> {
> ...
> }

Yes, the maximum root OID search algorithm has been improved
to better handle MIB modules with more than one root.

>
> AgenPro v2.0.6a does it like this:
>
> ttiwsnotificationmib::ttiwsnotificationmib():
>   MibGroup("1.3.6.1.4.1.13448.3.1", "ttiwsnotificationmib")
> {
> ...
> }
>
> Shouldnt the OID end in .11 as before?  Also, it would be nice if the 
> persistent name stayed the same.  Is there a reason for the switch?  
> While I'm here, has the persistence data file format changed any since 
> agent++v3.5.3a?  I would like to be able to build an agent with the 
> new agent++ and read old persistence files.  On the other hand, any 
> fixes or improvements are welcome.

The persistent file format is the same. The naming changed, but you may
change the templates to simulate the old naming as you like. The new
seemed to me more reasonable when dealing with different platforms.

Regards,
Frank





More information about the AGENTPP mailing list