RE: Hex-to-ASCII of varbins

2004-09-10 Thread HOFKENS Hans \(BMB\)
This is from the veritas cluster server mib...
The OID of the varbin is 1302.8.10.1.14.
Even in ethereal it doesn't get printed as ascii. The last char  is a
0x0a.

Thanks 

Hans

-Original Message-
From: Dave Shield [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 09, 2004 5:38 PM
To: HOFKENS Hans (BMB)
Cc: [EMAIL PROTECTED]
Subject: Re: Hex-to-ASCII of varbins 



 I asked this because the variable I was having problems with was 
 defined as displayString...
 The value send over was:Thu Sep  9 12:51:24 2004. 
 
 Don't know why it got printed out as hex...

Hmmm  nope - neither do I.
If the MIB file was being loaded, then the DisplayString should have
been recognised and hence triggered the use of the DISPLAY HINT.

And even without this, that particular string should be regarded as
printable.

Sudden thought - Unless there's a trailing new-line character that
confused the hex-check.   If you use '-Ox' to force a hex output,
what's the last character of this value?   0x2e or something else?


SYNTAX DisplayString (SIZE (0..50))

I'm not sure offhand whether it's legal to sub-type Textual Conventions
in this way.   I have a sneaking suspicion that DisplayString is fixed
as being (0..255), and if you need a shorter limit, then you'd either
have to mention this in the DESCRIPTION clause, or define a new TC
DisplayString50 with the shorter length.

But again, our MIB parser probably won't complain.

Dave



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



snmp.out
Description: snmp.out


Re: Hex-to-ASCII of varbins

2004-09-09 Thread Dave Shield
[ First - *please* don't mail me privately, without copying
 any responses to the mailing list.  I don't have the time
 or inclination to offer private, unpaid, SNMP consultancy.
 Keep discussions to the list, where others can both learn
 and offer advice.  Thanks.   ]


 Thanks.
 I was just testing with -OT and -Oa.
 -Oa does the job. 
 
 I wonder however why this not the default.

Why should it be?
   OCTET STRINGs are not necessarily printable.

That's what DISPLAY HINTs are for - if a particular
object is meant to hold printable values, then it should
be defined as such (i.e. DisplayString or similar).

If the MIB designer was vague (and/or lazy) and just used
a bare OCTET STRING definition, then we have to try and
guess whether this is probably a printable string, or a
binary one (such as an IP or ethernet address).

Dave



---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47alloc_id808op=click
___
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


RE: Hex-to-ASCII of varbins

2004-09-09 Thread HOFKENS Hans \(BMB\)
Sorry and Thanks.

I asked this because the variable I was having problems with was defined
as displayString...

eventTime OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..50))
ACCESS read-only
STATUS mandatory
DESCRIPTION Events time since 00:00 Universal Coordinated Time,

 January 1, 1970
::= { clustertrapvars 14 }

The value send over was:Thu Sep  9 12:51:24 2004. 

Don't know why it got printed out as hex...

Hans

-Original Message-
From: Dave Shield [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 09, 2004 4:28 PM
To: HOFKENS Hans (BMB)
Cc: [EMAIL PROTECTED]
Subject: Re: Hex-to-ASCII of varbins 


[ First - *please* don't mail me privately, without copying
 any responses to the mailing list.  I don't have the time
 or inclination to offer private, unpaid, SNMP consultancy.
 Keep discussions to the list, where others can both learn
 and offer advice.  Thanks.   ]


 Thanks.
 I was just testing with -OT and -Oa.
 -Oa does the job.
 
 I wonder however why this not the default.

Why should it be?
   OCTET STRINGs are not necessarily printable.

That's what DISPLAY HINTs are for - if a particular
object is meant to hold printable values, then it should
be defined as such (i.e. DisplayString or similar).

If the MIB designer was vague (and/or lazy) and just used
a bare OCTET STRING definition, then we have to try and
guess whether this is probably a printable string, or a
binary one (such as an IP or ethernet address).

Dave



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47alloc_id808op=click
___
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


Re: Hex-to-ASCII of varbins

2004-09-09 Thread Dave Shield

 I asked this because the variable I was having problems with was defined
 as displayString...
 The value send over was:Thu Sep  9 12:51:24 2004. 
 
 Don't know why it got printed out as hex...

Hmmm  nope - neither do I.
If the MIB file was being loaded, then the DisplayString
should have been recognised and hence triggered the use of
the DISPLAY HINT.

And even without this, that particular string should be
regarded as printable.

Sudden thought - Unless there's a trailing new-line character that
confused the hex-check.   If you use '-Ox' to force a hex output,
what's the last character of this value?   0x2e or something else?


SYNTAX DisplayString (SIZE (0..50))

I'm not sure offhand whether it's legal to sub-type Textual Conventions
in this way.   I have a sneaking suspicion that DisplayString is fixed
as being (0..255), and if you need a shorter limit, then you'd either
have to mention this in the DESCRIPTION clause, or define a new TC
DisplayString50 with the shorter length.

But again, our MIB parser probably won't complain.

Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
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