Thread View: comp.protocols.snmp
1 messages
1 total messages
Started by Michael S. Greenberg
Fri, 02 Oct 1992 17:53
INTEGER vs. TIMETICKS types
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads