Hello,
while i was working with setting and getting an IPv4 InetAddress one problem
arise.
After setting an Address like this 192.168.143.10, i get with the
appropriate snmpget-command following result:
... = Hex-STRING:C0 A8 8F 0A
This is fine, because it is an InetAdressType
But, when setting an Address like this 41.41.41.41, the result is a little
bit strange:
... = STRING: "))))"
>From my point of view, the second IP-Adress is a valid address.
After searching the mailing-list i found a thread wiht a similar problem,
which i have attached at the end of this mail.
Is is correct, that in the second case only displaying the variable is the
problem?
Actually i'm using net-snmp v5.1.2. Are the coders going to fix this problem
in future releases?
Thank you very much and kind regards,
Sven
From: Fong Tsui <[EMAIL PROTECTED]>.com>
RE: InetAddress display
2003-08-28 17:57
Regardless displaying InetAddress according to InetAddressType, the current
display for
InetAddress is not consistent not only for index but also for result value.
The following are 4 examples.
1) for address: fe80::290:27ff:feee:2222
ipv6."�.........".��""".21 = Hex-STRING: FE 80 00 00 00 00 00 00 02 90
27 FF FE EE 22 22
2) for address: 10.0.0.10
ipv4."....".80 = Hex-STRING: 0A 00 00 0A
3) for address: 10.10.10.10
ipv4."....".80 = STRING: "...."
4) for address: 41.41.41.41
ipv4."))))".80 = STRING: "))))"
I don"t know how to fix this problem. Dave, I also don"t know how to
"tweaking the type of
the InetAddress object to point to one of the formatted TCs before printing,
and then
restore it to InetAddress afterwards." as you mentioned. Could you please
give a little more
detail? My deadline is coming and I am a little panic. Please help!
Thanks,
Fong
-----Original Message-----
From: Dave Shield [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 1:41 AM
To: Fong Tsui
Cc: [EMAIL PROTECTED]
Subject: Re: InetAddress display
Ummm... snmplib/mib.c and snmplib/parse.c, probably.
My guess is that these two syntax types would need to be detected specially
(i.e. be added
as tokens to the parser code), and the string output routine extended
accordingly.
What I"m not sure about is how to link these two values together. I.e.
how to pass the
"print string" routine (which is only expecting a single value) information
about the type
as well.
Maybe this needs to be tackled higher up - tweaking the type of the
InetAddress object to
point to one of the formatted TCs before printing, and then restore it to
InetAddress
afterwards.
But I look forward to seeing what you come up with.
Dave
--
+++ GMX DSL Premiumtarife 3 Monate gratis* + WLAN-Router 0,- EUR* +++
Clevere DSL-Nutzer wechseln jetzt zu GMX: http://www.gmx.net/de/go/dsl
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders