Question regarding code generated by AgentGenPro v1.8.6

Frank Fock Frank.Fock____t-online.de
Thu Apr 3 23:08:56 CEST 2003


Hi Paresh,

Paresh Borkar wrote:
> Hi,
> 
> We are using AgentGenPro v1.8.6 to generate code for our mibs. Our mibs
> contain a table with some fields having types as AdminString and
> DateAndTime. When we run our agent and view the values for these fields
> from HP OpenView or IBM Tivoli, the values for both are displayed as hex
> encoded values. For AdminString we are giving valid UTF-8 strings. We
> are not sure why this is happening?
> 
Are you sure that OpenView and Tivoli are capable of
displaying UTF-8 and in particular do they understand
the AdminString TC? There are several NMS that do not
dynamically interpret TCs, but hard coded for example
the DisplayString TC.

MIB Explorer is different. It can display UTF-8 and
TCs are interpreted at run-time.

> We noticed that the Agent++ library has classes namely: SnmpAdminString
> & DateAndTime to cater to these textual conventions. However, the code
> generated by AgentGenPro adds the column information as:
> 
> add_col(new MibLeaf(colOurAdminStringField, READONLY, new OctetStr()));
> 

This is a limitation of v1.x. The DateAndTime TC is
generated by the default templates coming with AgenPro 2
for AGENT++v3.5.10 or later.

> Thus it does not seem to be using the SnmpAdminString class. Same is the
> case for DateAndTime. Are we missing something over here?
> 
No. However you can replace the "OctetStr" by the
correct class manually. By doing it in the protected code
area, you can use round-trip engineering too.

> Also, the DateAndTime class is not supported on Windows platform (it is
> defined in an #ifndef _WIN32 block). We are using the following versions
> of the libraries:
> Agent++ v3.5.6
> Snmp++ v3.2.1b
>

Support for Windows will be added in the next release
of AGENT++.

Best regards,
Frank





More information about the AGENTPP mailing list