[AGENT++] SNMP++ Thread Safety???

Frank Fock fock at agentpp.com
Fri Jan 9 08:19:53 CET 2004


Hi Andrew,

OK, now I understand. The RFC-1212 contains a MIB module body
in the text which can be extracted. Since that module is written in ASN.1
not SMI, one will have to remove (or comment out) the MACROs defined
in it. This has been done for RFC-1212 by Deavid Perkins as listed below:

-- file: RFC-1212.my
-- changes:
--      Removed IMPORTS.
--      Commented out OBJECT-TYPE macro definition and replaced
--        with SMIC directive to enable it.
-- dperkins at scruznet.com

RFC-1212 DEFINITIONS ::= BEGIN

    -- Make builtin items known
    --SMI OBJECT-TYPE


        --  OBJECT-TYPE MACRO ::=
        --  BEGIN
        --      TYPE NOTATION ::=
                                          -- must conform to
                                          -- RFC1155's ObjectSyntax
        --                        "SYNTAX" type(ObjectSyntax)
        --                        "ACCESS" Access
        --                        "STATUS" Status
        --                        DescrPart
        --                        ReferPart
        --                        IndexPart
        --                        DefValPart
        --      VALUE NOTATION ::= value (VALUE ObjectName)
        --
        --      Access ::= "read-only"
        --                      | "read-write"
        --                      | "write-only"
        --                      | "not-accessible"
        --      Status ::= "mandatory"
        --                      | "optional"
        --                      | "obsolete"
        --                      | "deprecated"
        --
        --      DescrPart ::=
        --                 "DESCRIPTION" value (description DisplayString)
        --                      | empty
        --
        --      ReferPart ::=
        --                 "REFERENCE" value (reference DisplayString)
        --                      | empty
        --
        --      IndexPart ::=
        --                 "INDEX" "{" IndexTypes "}"
        --                      | empty
        --      IndexTypes ::=
        --                 IndexType | IndexTypes "," IndexType
        --      IndexType ::=
                                  -- if indexobject, use the SYNTAX
                                  -- value of the correspondent
                                  -- OBJECT-TYPE invocation
        --                 value (indexobject ObjectName)
                                  -- otherwise use named SMI type
                                  -- must conform to IndexSyntax below
        --                      | type (indextype)
        --
        --      DefValPart ::=
        --                 "DEFVAL" "{" value (defvalue ObjectSyntax) "}"
        --                      | empty
        --  END
        --
        --  IndexSyntax ::=
        --      CHOICE {
        --          number
        --              INTEGER (0..MAX),
        --          string
        --              OCTET STRING,
        --          object
        --              OBJECT IDENTIFIER,
        --          address
        --              NetworkAddress,
        --          ipAddress
        --              IpAddress
        --      }
END

Best regards,
Frank Fock

Andrew Chen wrote:

>Hi Frank:
>
>I was trying to compile one of the IETF (i.e. CLNS-MIB) MIB using AgentGen
>Standard when the prompt asks for RFC-1212, which contains the textual
>definition of a MIB module in plain English.  I haven't attempted to
>download one yet but I don't suppose the compiler can work with such a
>format?
>
>Andrew  
>
>
>
>-----Original Message-----
>From: Frank Fock [mailto:fock at agentpp.com]
>Sent: Tuesday, January 06, 2004 2:40 PM
>To: Andrew Chen
>Cc: agentpp at agentpp.org
>Subject: Re: [AGENT++] SNMP++ Thread Safety???
>
>
>Hi Andrew,
>
>Could you please rephrase your question or explain what you mean by
>"concise definition of MIB"?
>
>Thanks,
>Frank
>
>Andrew Chen wrote:
>
>  
>
>>Hi Frank:
>>
>>How would you compile a MIB that refers to RFC-1212 if it is the concise
>>definition of MIB?
>>
>>Andrew
>>
>>-----Original Message-----
>>From: Frank Fock [mailto:fock at agentpp.com]
>>Sent: Tuesday, December 30, 2003 12:53 PM
>>To: Andrew Chen
>>Cc: agentpp at agentpp.org
>>Subject: Re: [AGENT++] SNMP++ Thread Safety???
>>
>>
>>Hi Andrew,
>>
>>CHOICE is also not part of SMI and cannot be recognized by
>>a SMIv1/v2 MIB compiler. Have you read the FAQ?
>>
>>You can find a SMIv2 conformant version of the SNMPv2-SMI
>>MIB module at:
>>http://www.mibexplorer.com/export/ietf/index.html
>>
>>Best regards,
>>Frank
>>
>>Andrew Chen wrote:
>>
>> 
>>
>>    
>>
>>>Hi Frank:
>>>
>>>I'm also stuck on "CHOICE" (SNMPv2-SMI.mib) with the same error message,
>>>   
>>>
>>>      
>>>
>>and
>> 
>>
>>    
>>
>>>even without the build-in ASN.1 types I still can't pass through
>>>   
>>>
>>>      
>>>
>>"Integer32"
>> 
>>
>>    
>>
>>>for that matter.  Is OBJECT IDENTIFIER the only keyword the compiler sees?
>>>      
>>>
>
>  
>
>>>Andrew 
>>>
>>>-----Original Message-----
>>>From: Frank Fock [mailto:fock at agentpp.com]
>>>Sent: Tuesday, December 30, 2003 1:33 AM
>>>To: Andrew Chen
>>>Cc: agentpp at agentpp.org
>>>Subject: Re: [AGENT++] SNMP++ Thread Safety???
>>>
>>>
>>>Hi Andrew,
>>>
>>>you will have to remove all MACRO definitions from the file or use the
>>>files that are shipped with AgenPro. The MIB Designer FAQ explains
>>>why this is necessary http://www.mibdesigner.com/FAQ.txt
>>>
>>>Best regards,
>>>Frank
>>>
>>>Andrew Chen wrote:
>>>
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>Hi Frank:
>>>>
>>>>I've tried to use a command-line AgentGen (1.8?) to compile a standard
>>>>        
>>>>
>MIB
>  
>
>>>>file (i.e. SNMPv2-SMI.mib).  The add process however stops at line
>>>>"MODULE-IDENTITY MACRO ::=" and it complains about expecting "END",
>>>><UPPERCASENAME>, or <LOWERCASENAME> keywords.  Is there anything I need
>>>>        
>>>>
>to
>  
>
>>>>modify the file to be able to pass through the stage?
>>>>
>>>>Andrew   
>>>>
>>>>-----Original Message-----
>>>>From: Frank Fock [mailto:fock at agentpp.com]
>>>>Sent: Tuesday, December 23, 2003 3:32 PM
>>>>To: Andrew Chen
>>>>Cc: agentpp at agentpp.org
>>>>Subject: Re: [AGENT++] SNMP++ Thread Safety???
>>>>
>>>>
>>>>Hi Andrew,
>>>>
>>>>AGENT++ has no built-in MIB compiler, but you can use
>>>>AgenPro v2.x (http://www.agentpp.com) for that purpose.
>>>>If you need a solution for runtime compilation, you will have
>>>>to use a third party API like libsmi. But runtime compilation
>>>>of MIBs is rarely necessary.
>>>>
>>>>Best regards,
>>>>Frank
>>>>
>>>>Andrew Chen wrote:
>>>>
>>>>
>>>>
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>>>Hi:
>>>>>
>>>>>I'm fairly new to SNMP development, upon going over AGENT++ I have one
>>>>> 
>>>>>
>>>>>    
>>>>>
>>>>>       
>>>>>
>>>>>          
>>>>>
>>>>basic
>>>>
>>>>
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>>>question for a starter:
>>>>>
>>>>>-Can AGENT++ compile a MIB into a C/C++ data structure, if yes how do I
>>>>> 
>>>>>
>>>>>    
>>>>>
>>>>>       
>>>>>
>>>>>          
>>>>>
>>>>make
>>>>
>>>>
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>>>such a call?
>>>>>
>>>>>Any help is appreciated.
>>>>>
>>>>>Andrew
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 
>>>>>
>>>>>    
>>>>>
>>>>>       
>>>>>
>>>>>          
>>>>>
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>
>>>   
>>>
>>>      
>>>
>>
>> 
>>
>>    
>>
>
>
>
>  
>






More information about the AGENTPP mailing list