Antwort: comments or suggestions

Frank Fock Frank.Fock____marconi.com
Fri Sep 29 17:30:36 CEST 2000



Hello Shivaram,

If you do not like to update to AGENT++v3.4o, then you might have a look at its
code. I introduced the MibTable::update(..) method which is called whenever
a table needs to be updated. This method is called from
Mib::find_managing_object and Mib::find_next.

You may modify your AGENT++ copy accordingly. This will fix
the problems you listed below.

Hope this helps.

Best regards,
Frank



|--------+-------------------------------->
|        |          "Shivaram Narasimha   |
|        |          Murthy"               |
|        |          <shivaram.upadhyayula@|
|        |          wipro.com>            |
|        |                                |
|        |          27.09.00 14:17        |
|        |                                |
|--------+-------------------------------->
  >----------------------------------------------------------------------------|
  |                                                                            |
  |       An:     "Mailing List" <agentpp-dl at fock.de>                          |
  |       Kopie:  "manjunath ramaiah" <manjunath.ramaiah at wipro.com>, "Shivaram |
  |       Upadhyayula" <shivaram.upadhyayula at wipro.com>, (Blindkopie: Frank    |
  |       Fock/MAIN/MC1)                                                       |
  |       Thema:  comments or suggestions                                      |
  >----------------------------------------------------------------------------|






Hello,
     For the sake of dynamically adding rows in a table we have our Table
classes override the is_empty() method, where the code for removing the
existing rows and adding new rows is done. But this causes a problem for a
getnext request if it is the first request when our agent is up. This is
because the process_request() method of Mib class calls the find_next()
method of the MibTable class to determine the oid of the next row. But at
this point the Table does not contain any rows. So the values returned are
not proper since the table is skipped. The table is first filled with rows
only for a get request because for the get request the is_empty() method is
called. Now I have overriden the find_next() method in my Table classes. In
the find_next method() of these classes i first call the is_empty() method
for the class and then call the MibTable::find_next() method.


Also for Mib variable of Object Type IpAddress in a Table we were
constructing the IpAddress object using the constructor IpAddress(). For any
request first the is_valid() method of the object type is called. Since
is_valid() is called before is_empty() method and for us is_empty() has to
be called to fill the Table rows the Table rows are empty. Constructing the
IpAddress object in the above way returns false we were getting an error as
response. Now i use the constructor with an valid ipAddress i.e
IpAddress("0.0.0.0"). So now the is_valid() method of the IpAddress object
returns true. Later the is_empty() method is called and the rows are filled
with the actual IpAddresses.

Please send any comments or Suggestions changes regarding the changes i made
for the above two problems.
Is there any other way using agent++ i can achieve the same? I am not using
agent++v3.4 . I am using an older version.

Thanking you
shivaram






More information about the AGENTPP mailing list