InetAddress: converting from OID to string and then back to OID

"Katy Sherman" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi

 

I'm using net-snmp 5.4.0.

 

I have an object with a InetAddress as an index. I've got it from a
GetNext query, so first I have it in the response PDU as an OID, its
value equals {204.124.192.1}. Then I convert it from the OID form to a
string. At this point I've got the "204.124.192.1" back. That's due to
the fact that _get_realloc_symbol() function in mib.c has a special
handling of InetAddress.

 

Then I want to convert this string back to OID, but unfortunately the
_add_strings_to_oid() doesn't implement the same approach and translates
every single character of the string "204.124.192.1" as a number, i.e.
what I get back is a buffer {0x32 0x30  0x34 0x2e 0x31 0x32 0x34 0x2e
0x31 0x39 0x32 0x2e 0x01} instead of {0xCC 0x7c 0xC0 0x01}.

 

I want to make sure that it's really a bug and not my mistake.

 

Thanks,

Katy Sherman

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.