Article View: comp.protocols.snmp
Article #201INTEGER vs. TIMETICKS types
From: Michael S. Greenberg
Date: Fri, 02 Oct 1992 17:53
Date: Fri, 02 Oct 1992 17:53
22 lines
1492 bytes
1492 bytes
Here is a question regarding the encoding of ASN.1 INTEGER vs. the encoding of ASN.1 TIMETICKS. I have an implemenation that encodes INTEGERs according to the ISO spec, prepending a 0 byte if the number is positive and the highest bit is set. I do not do this for TIMETICKS because the SMI specifies that type as "non-negative" (section 3.2.3.5), and, since I assume that there is no negative time, I don't prepend the 0 byte if the high bit is set. Unfortunately, my implementation seems to adversely effect CMU code derived agents, who are more than happy to set their time negative. I imagine I will have the same problem with GAUGE and COUNTER types, since the INTEGER is the only one that I prepend the 0 byte to. I could treat all these types like I do an INTEGER if I have to but is this correct? Also, which way is the correct encoding of a TIMETICKS variable (prpending 0 for high bit set, or not)? Thanks in advance! Mike -- Michael Greenberg Internet: arnoff@ftp.com
Technical Details
Message-ID:
<921002175322@karres>Path:
arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!vaxeline.ftp.com!karres!arnoffShow Full Headers
Complete Article Headers
Newsgroups: comp.protocols.snmp Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!vaxeline.ftp.com!karres!arnoff From: arnoff@vax.ftp.com (Michael S. Greenberg) Subject: INTEGER vs. TIMETICKS types Message-ID: <921002175322@karres> Nntp-Software: PC/TCP NNTP Lines: 22 Sender: root@vaxeline.ftp.com (vaxeline.ftp.com root account) Nntp-Posting-Host: karres.ftp.com Reply-To: arnoff Organization: FTP Software, Inc., Wakefield, MA Date: Fri, 02 Oct 1992 17:53:22