Problems with set_row function?

Frank Fock Frank.Fock____t-online.de
Tue Apr 30 22:40:30 CEST 2002


Kjersti,

The "const char*" string parameter generated for IpAddress columns
is a textual representation of a IPv4 (or IPv6 if you are using the latest
beta of SNMP++) address, for example "192.168.0.1". Thus,
you need to convert your OctetStr value with hexadecimal representation
into decimal representation. This should be an easy task with strtok
and atoi/itoa.

The set_row function is not called by the AGENT++ API. So you
can create any interface you want for it.

Hope this helps.

Best regards,
Frank

Kjersti Grønnevik wrote:

> Hi
>
> I have a problem with the set_row function and how to handle a variable of type IPADDRESS.
> The AgentGen generated code has defined the function with Ipaddress as a const char* .
> The value is of hexadecimal OctetStr type and I thought I could use the get_printable() function in the OctetStr class but it doesn't work. I get the value as char* but I need it as a readable hexadecimal value.
>
> Does anyone have an ide how to solve this?
> Can the function set_row take other variables beside long and char* ?
>
> Hope this is understandable. If not, please tell me so I can explain further!
>
> Best regards,
> Kjersti






More information about the AGENTPP mailing list