[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

6055.0. "ASN.1 Mib Hex values question." by CSC32::EMAWIZ::T_MILTON () Thu Jul 21 1994 13:51

    
    	I have a customer who is writing SNMP MIBs and would like to get
    	ASN.1 mib values to display in Hex format when they do SNMP GETS
    	or receive enterprise specific traps from the entity.   Apparently
    	the MTU has given errors on the syntaxes he has tried.  What
    	MIB syntax should he use to get the above result?
    
    	Ted.
T.RTitleUserPersonal
Name
DateLines
6055.1OCTET STRING is the keyBIKINI::KRAUSECSC Network Management/HubsMon Jul 25 1994 05:289
Just use data type OCTET STRING. MCC will display this as hex. Remember 
that this data type has to be built into the agent as well, because the 
data type that the agent sends and the data type that MCC knows from the 
MIB must match!

If you post the relevant portion of the MIB and the error message from 
MTU, I might be able to tell you more about what went wrong.

*Robert
6055.2More info about hex valuesCSC32::EMAWIZ::T_MILTONTue Aug 09 1994 21:4377
    	
    
    
Here is some further clarification for what the customer is trying to do.
The below should be self explanatory.  I want a mib, example below, 
to be interpreted by the mtu to produce msl that will indicate to mcc pm 
that the objects value is to be displayed in hex.
    
    Thanks in advance,
    
    Ted.
    
--
TestMIB

-- * File:   test.mib
-- *
-- * Programming Language:  ASN.1 Concise MIB definition 
-- *
-- * Description:
-- *    This MIB defines one object just to show the syntax we wish to use
-- *	for working in hex with integers.  Our problem is that the mtu
-- *	utility does not complain (we've learned not to be suprised about
-- *	this) about the below syntax nor does it provide any provision in
-- *	the msl to display the value received as hex.  We DO not want to
-- *	define the object as Octet string and would rather not edit the msl.
-- *	Is there a way to relate to mcc, via the mtu, that this integer 
-- *	should be displayed in hex?

          DEFINITIONS ::= BEGIN

          IMPORTS
                  mgmt, NetworkAddress, IpAddress, Counter, Gauge,
                          TimeTicks, enterprises
                      FROM RFC1155-SMI
                  OBJECT-TYPE
                          FROM RFC-1212;


          --  This MIB module uses the extended OBJECT-TYPE macro as
          --  defined in [14];

          DisplayString ::=
              OCTET STRING
          -- This data type is used to model textual information taken
          -- from the NVT ASCII character set.  By convention, objects
          -- with this syntax are declared as having
          --
          --      SIZE (0..255)

          -- MDS Specific objects
          wec           OBJECT IDENTIFIER ::= { enterprises 618 }

          -- Mobile Data Service
          mds           OBJECT IDENTIFIER ::= { wec 1  }

          -- Terrestrial Interface Subsystem
          test           OBJECT IDENTIFIER ::= { mds 1  }


bobstestobject OBJECT-TYPE
        SYNTAX INTEGER (0..'ffffffff'h)
        ACCESS read-write
        STATUS mandatory
        DESCRIPTION
                "Test object to determine how mcc imports an integer and
                 displays it in hex"
        REFERENCE "none"
        DEFVAL {'f'h}
        ::= { test 101 }

-- 

END

    
6055.3INTEGER ==> OCTET STRINGBIKINI::KRAUSECSC Network Management/HubsThu Aug 11 1994 03:477
>        SYNTAX INTEGER (0..'ffffffff'h)

Well, as I said before: you need to change the data type from INTEGER to
OCTET STRING. This needs to be done in the MIB file *AND* in the agent
code! Otherwise - tough luck. 

*Robert