Added RFC 2578, SNMP. Barely useful; the MACRO definitions are all commented out.
authorRick van Rein <rick@openfortress.nl>
Sun, 13 Mar 2016 00:17:34 +0000 (00:17 +0000)
committerRick van Rein <rick@openfortress.nl>
Sun, 13 Mar 2016 00:17:34 +0000 (00:17 +0000)
rfc/Makefile
rfc/rfc2578.asn1 [new file with mode: 0644]

index c401329..139e997 100644 (file)
@@ -12,7 +12,8 @@
 PREFIX = /usr/local
 
 TARGETS = rfc3280.h rfc4120.h rfc4511.h rfc5280.h \
-       rfc2898.h rfc2315.h rfc5208.h rfc7292.h
+       rfc2898.h rfc2315.h rfc5208.h rfc7292.h \
+       rfc2578.h
 #DOWNWARD-SPIRAL-INTO-ITU# TARGETS += InformationFramework.h UsefulDefinitions.h
 
 ASN2QUICKDER_DIR = ../tool/asn1ate
diff --git a/rfc/rfc2578.asn1 b/rfc/rfc2578.asn1
new file mode 100644 (file)
index 0000000..0825a53
--- /dev/null
@@ -0,0 +1,358 @@
+RFC2578 --asn1ate:SNMPv2-SMI-- DEFINITIONS ::= BEGIN
+
+
+-- asn1ate: So much of this is in MACRO definitions that this module is barely useful
+
+
+-- the path to the root
+
+org            OBJECT IDENTIFIER ::= { iso 3 }  --  "iso" = 1
+dod            OBJECT IDENTIFIER ::= { org 6 }
+internet       OBJECT IDENTIFIER ::= { dod 1 }
+
+directory      OBJECT IDENTIFIER ::= { internet 1 }
+
+mgmt           OBJECT IDENTIFIER ::= { internet 2 }
+mib-2          OBJECT IDENTIFIER ::= { mgmt 1 }
+transmission   OBJECT IDENTIFIER ::= { mib-2 10 }
+
+experimental   OBJECT IDENTIFIER ::= { internet 3 }
+
+private        OBJECT IDENTIFIER ::= { internet 4 }
+enterprises    OBJECT IDENTIFIER ::= { private 1 }
+
+security       OBJECT IDENTIFIER ::= { internet 5 }
+
+snmpV2         OBJECT IDENTIFIER ::= { internet 6 }
+
+-- transport domains
+snmpDomains    OBJECT IDENTIFIER ::= { snmpV2 1 }
+
+-- transport proxies
+snmpProxys     OBJECT IDENTIFIER ::= { snmpV2 2 }
+
+-- module identities
+snmpModules    OBJECT IDENTIFIER ::= { snmpV2 3 }
+
+-- Extended UTCTime, to allow dates with four-digit years
+-- (Note that this definition of ExtUTCTime is not to be IMPORTed
+--  by MIB modules.)
+-- asn1ate: ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
+ExtUTCTime ::= OCTET STRING(SIZE(11..13))
+    -- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
+    --   where: YY   - last two digits of year (only years
+    --                 between 1900-1999)
+    --          YYYY - last four digits of the year (any year)
+    --          MM   - month (01 through 12)
+    --          DD   - day of month (01 through 31)
+    --          HH   - hours (00 through 23)
+    --          MM   - minutes (00 through 59)
+    --          Z    - denotes GMT (the ASCII character Z)
+    --
+    -- For example, "9502192015Z" and "199502192015Z" represent
+    -- 8:15pm GMT on 19 February 1995. Years after 1999 must use
+    -- the four digit year format. Years 1900-1999 may use the
+    -- two or four digit format.
+
+-- definitions for information modules
+
+-- asn1ate: MODULE-IDENTITY MACRO ::=
+-- asn1ate: BEGIN
+-- asn1ate:     TYPE NOTATION ::=
+-- asn1ate:                   "LAST-UPDATED" value(Update ExtUTCTime)
+-- asn1ate:                   "ORGANIZATION" Text
+-- asn1ate:                   "CONTACT-INFO" Text
+-- asn1ate:                   "DESCRIPTION" Text
+-- asn1ate:                   RevisionPart
+-- asn1ate: 
+-- asn1ate:     VALUE NOTATION ::=
+-- asn1ate:                   value(VALUE OBJECT IDENTIFIER)
+-- asn1ate: 
+-- asn1ate:     RevisionPart ::=
+-- asn1ate:                   Revisions
+-- asn1ate:                 | empty
+-- asn1ate:     Revisions ::=
+-- asn1ate:                   Revision
+-- asn1ate:                 | Revisions Revision
+-- asn1ate:     Revision ::=
+-- asn1ate:                   "REVISION" value(Update ExtUTCTime)
+-- asn1ate:                   "DESCRIPTION" Text
+-- asn1ate: 
+-- asn1ate:     - - a character string as defined in section 3.1.1
+-- asn1ate:     Text ::= value(IA5String)
+-- asn1ate: END
+-- asn1ate: 
+-- asn1ate: 
+-- asn1ate: OBJECT-IDENTITY MACRO ::=
+-- asn1ate: BEGIN
+-- asn1ate:     TYPE NOTATION ::=
+-- asn1ate:                   "STATUS" Status
+-- asn1ate:                   "DESCRIPTION" Text
+-- asn1ate:                   ReferPart
+-- asn1ate: 
+-- asn1ate:     VALUE NOTATION ::=
+-- asn1ate:                   value(VALUE OBJECT IDENTIFIER)
+-- asn1ate: 
+-- asn1ate:     Status ::=
+-- asn1ate:                   "current"
+-- asn1ate:                 | "deprecated"
+-- asn1ate:                 | "obsolete"
+-- asn1ate: 
+-- asn1ate:     ReferPart ::=
+-- asn1ate:                   "REFERENCE" Text
+-- asn1ate:                 | empty
+-- asn1ate: 
+-- asn1ate:     - - a character string as defined in section 3.1.1
+-- asn1ate:     Text ::= value(IA5String)
+-- asn1ate: END
+
+
+-- names of objects
+-- (Note that these definitions of ObjectName and NotificationName
+--  are not to be IMPORTed by MIB modules.)
+
+ObjectName ::=
+    OBJECT IDENTIFIER
+
+NotificationName ::=
+    OBJECT IDENTIFIER
+
+-- syntax of objects
+
+-- the "base types" defined here are:
+--   3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER
+--   8 application-defined types: Integer32, IpAddress, Counter32,
+--              Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64
+
+ObjectSyntax ::=
+    CHOICE {
+        simple
+            SimpleSyntax,
+
+          -- note that SEQUENCEs for conceptual tables and
+          -- rows are not mentioned here...
+
+        application-wide
+            ApplicationSyntax
+    }
+
+-- built-in ASN.1 types
+
+SimpleSyntax ::=
+    CHOICE {
+        -- INTEGERs with a more restrictive range
+        -- may also be used
+        integer-value               -- includes Integer32
+            INTEGER (-2147483648..2147483647),
+
+        -- OCTET STRINGs with a more restrictive size
+        -- may also be used
+        string-value
+            OCTET STRING (SIZE (0..65535)),
+
+        objectID-value
+            OBJECT IDENTIFIER
+    }
+
+-- indistinguishable from INTEGER, but never needs more than
+-- 32-bits for a two's complement representation
+Integer32 ::=
+        INTEGER (-2147483648..2147483647)
+
+
+-- application-wide types
+
+ApplicationSyntax ::=
+    CHOICE {
+        ipAddress-value
+            IpAddress,
+
+        counter-value
+            Counter32,
+
+        timeticks-value
+            TimeTicks,
+
+        arbitrary-value
+            Opaque,
+
+        big-counter-value
+            Counter64,
+
+        unsigned-integer-value  -- includes Gauge32
+            Unsigned32
+    }
+
+-- in network-byte order
+-- (this is a tagged type for historical reasons)
+IpAddress ::=
+    [APPLICATION 0]
+        IMPLICIT OCTET STRING (SIZE (4))
+
+-- this wraps
+Counter32 ::=
+    [APPLICATION 1]
+        IMPLICIT INTEGER (0..4294967295)
+
+-- this doesn't wrap
+Gauge32 ::=
+    [APPLICATION 2]
+        IMPLICIT INTEGER (0..4294967295)
+
+-- an unsigned 32-bit quantity
+-- indistinguishable from Gauge32
+Unsigned32 ::=
+    [APPLICATION 2]
+        IMPLICIT INTEGER (0..4294967295)
+
+-- hundredths of seconds since an epoch
+TimeTicks ::=
+    [APPLICATION 3]
+        IMPLICIT INTEGER (0..4294967295)
+
+-- for backward-compatibility only
+Opaque ::=
+    [APPLICATION 4]
+        IMPLICIT OCTET STRING
+
+-- for counters that wrap in less than one hour with only 32 bits
+Counter64 ::=
+    [APPLICATION 6]
+        IMPLICIT INTEGER (0..18446744073709551615)
+
+
+-- definition for objects
+
+-- asn1ate: OBJECT-TYPE MACRO ::=
+-- asn1ate: BEGIN
+-- asn1ate:     TYPE NOTATION ::=
+-- asn1ate:                   "SYNTAX" Syntax
+-- asn1ate:                   UnitsPart
+-- asn1ate:                   "MAX-ACCESS" Access
+-- asn1ate:                   "STATUS" Status
+-- asn1ate:                   "DESCRIPTION" Text
+-- asn1ate:                   ReferPart
+-- asn1ate:                   IndexPart
+-- asn1ate:                   DefValPart
+-- asn1ate: 
+-- asn1ate:     VALUE NOTATION ::=
+-- asn1ate:                   value(VALUE ObjectName)
+-- asn1ate: 
+-- asn1ate:     Syntax ::=   - - Must be one of the following:
+-- asn1ate:                        - - a base type (or its refinement),
+-- asn1ate:                        - - a textual convention (or its refinement), or
+-- asn1ate:                        - - a BITS pseudo-type
+-- asn1ate:                    type
+-- asn1ate:                 | "BITS" "{" NamedBits "}"
+-- asn1ate: 
+-- asn1ate:     NamedBits ::= NamedBit
+-- asn1ate:                 | NamedBits "," NamedBit
+-- asn1ate: 
+-- asn1ate:     NamedBit ::=  identifier "(" number ")" - - number is nonnegative
+-- asn1ate: 
+-- asn1ate:     UnitsPart ::=
+-- asn1ate:                   "UNITS" Text
+-- asn1ate:                 | empty
+-- asn1ate: 
+-- asn1ate:     Access ::=
+-- asn1ate:                   "not-accessible"
+-- asn1ate:                 | "accessible-for-notify"
+-- asn1ate:                 | "read-only"
+-- asn1ate:                 | "read-write"
+-- asn1ate:                 | "read-create"
+-- asn1ate: 
+-- asn1ate:     Status ::=
+-- asn1ate:                   "current"
+-- asn1ate:                 | "deprecated"
+-- asn1ate:                 | "obsolete"
+-- asn1ate: 
+-- asn1ate:     ReferPart ::=
+-- asn1ate:                   "REFERENCE" Text
+-- asn1ate:                 | empty
+-- asn1ate: 
+-- asn1ate:     IndexPart ::=
+-- asn1ate:                   "INDEX"    "{" IndexTypes "}"
+-- asn1ate:                 | "AUGMENTS" "{" Entry      "}"
+-- asn1ate:                 | empty
+-- asn1ate:     IndexTypes ::=
+-- asn1ate:                   IndexType
+-- asn1ate:                 | IndexTypes "," IndexType
+-- asn1ate:     IndexType ::=
+-- asn1ate:                   "IMPLIED" Index
+-- asn1ate:                 | Index
+-- asn1ate: 
+-- asn1ate:     Index ::=
+-- asn1ate:                     - - use the SYNTAX value of the
+-- asn1ate:                     - - correspondent OBJECT-TYPE invocation
+-- asn1ate:                   value(ObjectName)
+-- asn1ate:     Entry ::=
+-- asn1ate:                     - - use the INDEX value of the
+-- asn1ate:                     - - correspondent OBJECT-TYPE invocation
+-- asn1ate:                   value(ObjectName)
+-- asn1ate: 
+-- asn1ate:     DefValPart ::= "DEFVAL" "{" Defvalue "}"
+-- asn1ate:                 | empty
+-- asn1ate: 
+-- asn1ate:     Defvalue ::=  - - must be valid for the type specified in
+-- asn1ate:                   - - SYNTAX clause of same OBJECT-TYPE macro
+-- asn1ate:                   value(ObjectSyntax)
+-- asn1ate:                 | "{" BitsValue "}"
+-- asn1ate: 
+-- asn1ate:     BitsValue ::= BitNames
+-- asn1ate:                 | empty
+-- asn1ate: 
+-- asn1ate:     BitNames ::=  BitName
+-- asn1ate:                 | BitNames "," BitName
+-- asn1ate: 
+-- asn1ate:     BitName ::= identifier
+-- asn1ate: 
+-- asn1ate:     - - a character string as defined in section 3.1.1
+-- asn1ate:     Text ::= value(IA5String)
+-- asn1ate: END
+
+
+-- definitions for notifications
+
+-- asn1ate: NOTIFICATION-TYPE MACRO ::=
+-- asn1ate: BEGIN
+-- asn1ate:     TYPE NOTATION ::=
+-- asn1ate:                   ObjectsPart
+-- asn1ate:                   "STATUS" Status
+-- asn1ate:                   "DESCRIPTION" Text
+-- asn1ate:                   ReferPart
+-- asn1ate: 
+-- asn1ate:     VALUE NOTATION ::=
+-- asn1ate:                   value(VALUE NotificationName)
+-- asn1ate: 
+-- asn1ate:     ObjectsPart ::=
+-- asn1ate:                   "OBJECTS" "{" Objects "}"
+-- asn1ate:                 | empty
+-- asn1ate:     Objects ::=
+-- asn1ate:                   Object
+-- asn1ate:                 | Objects "," Object
+-- asn1ate:     Object ::=
+-- asn1ate:                   value(ObjectName)
+-- asn1ate: 
+-- asn1ate:     Status ::=
+-- asn1ate:                   "current"
+-- asn1ate:                 | "deprecated"
+-- asn1ate:                 | "obsolete"
+-- asn1ate: 
+-- asn1ate:     ReferPart ::=
+-- asn1ate:                   "REFERENCE" Text
+-- asn1ate:                 | empty
+-- asn1ate: 
+-- asn1ate:     - - a character string as defined in section 3.1.1
+-- asn1ate:     Text ::= value(IA5String)
+-- asn1ate: END
+
+-- definitions of administrative identifiers
+
+zeroDotZero    OBJECT-IDENTITY
+    -- asn1ate: STATUS     current
+    -- asn1ate: DESCRIPTION
+    -- asn1ate:         "A value used for null identifiers."
+    ::= { 0 0 }
+
+END
+