RFC 3781 - Next Generation Structure of Management Informati(3)

时间:2006-10-30 来源: 作者: 点击:
groups,orsomeotherdocumentwhichprovidesadditionalinformation relevanttothisgroup. 4.6.6.UsageExample ThesnmpGroup,originallydefinedin[RFC3418],maybedescribedas follows: groupsnmpGroup{ oidsnmpMIBGrou
  
   groups, or some other document which provides additional information
   relevant to this group.

4.6.6.  Usage Example

   The snmpGroup, originally defined in [RFC3418], may be described as
   follows:

   group snmpGroup {
     oid             snmpMIBGroups.8;
     objects         (snmpInPkts, snmpInBadVersions,
                      snmpInASNParseErrs,
                      snmpSilentDrops, snmpProxyDrops,

                      snmpEnableAuthenTraps);
     status          current;
     description
             "A collection of objects providing basic
              instrumentation and control of an agent.";
   };

4.7.  The compliance Statement

   The `compliance’ statement is used to define a set of conformance
   requirements, named a `compliance statement’.  It gets two arguments:
   a lower-case compliance identifier and a statement block that holds
   detailed compliance information in an obligatory order.

   See the `complianceStatement’ rule of the grammar (Section 5) for the
   formal syntax of the `compliance’ statement.

4.7.1.  The compliance’s oid Statement

   The compliance’s `oid’ statement, which must be present, gets one
   argument which specifies the object identifier value that is assigned
   to this compliance statement.

4.7.2.  The compliance’s status Statement

   The compliance’s `status’ statement, which must be present, gets one
   argument which is used to specify whether this compliance statement
   is current or historic.  The value `current’ means that the
   definition is current and valid.  The value `obsolete’ means the
   definition is obsolete and no longer specifies a valid definition of
   conformance.  While the value `deprecated’ also indicates an obsolete
   definition, it permits new/continued use of the compliance
   specification.

4.7.3.  The compliance’s description Statement

   The compliance’s `description’ statement, which must be present, gets
   one argument which is used to specify a high-level textual
   description of this compliance statement.

4.7.4.  The compliance’s reference Statement

   The compliance’s `reference’ statement, which need not be present,
   gets one argument which is used to specify a textual cross-reference
   to some other document, either another module which defines related
   compliance statements, or some other document which provides
   additional information relevant to this compliance statement.

4.7.5.  The compliance’s mandatory Statement

   The compliance’s `mandatory’ statement, which need not be present,
   gets one argument which is used to specify a comma-separated list of
   one or more groups (Section 4.6) of objects and/or notifications
   enclosed in parenthesis.  These groups are unconditionally mandatory
   for implementation.

   If an agent claims compliance to a MIB module then it must implement
   each and every object and notification within each group listed in
   the `mandatory’ statement(s) of the compliance statement(s) of that
   module.

4.7.6.  The compliance’s optional Statement

   The compliance’s `optional’ statement, which need not be present, is
   repeatedly used to name each group which is conditionally mandatory
   for compliance to the compliance statement.  It can also be used to
   name unconditionally optional groups.  A group named in an `optional’
   statement MUST be absent from the correspondent `mandatory’
   statement.  The `optional’ statement gets two arguments: a lower-case
   group identifier and a statement block that holds detailed compliance
   information on that group.

   Conditionally mandatory groups include those groups which are
   mandatory only if a particular protocol is implemented, or only if
   another group is implemented.  The `description’ statement specifies
   the conditions under which the group is conditionally mandatory.

   A group which is named in neither a `mandatory’ statement nor an
   `optional’ statement, is unconditionally optional for compliance to
   the module.

   See the `optionalStatement’ rule of the grammar (Section 5) for the
   formal syntax of the `optional’ statement.

4.7.6.1.  The optional’s description Statement

   The optional’s `description’ statement, which must be present, gets
   one argument which is used to specify a high-level textual
   description of the conditions under which this group is conditionally
   mandatory or unconditionally optional.

4.7.7.  The compliance’s refine Statement

   The compliance’s `refine’ statement, which need not be present, is
   repeatedly used to specify each object for which compliance has a
   refined requirement with respect to the module definition.  The

   object must be present in one of the conformance groups named in the
   correspondent `mandatory’ or `optional’ statements.  The `refine’
   statement gets two arguments: a lower-case identifier of a scalar or
   columnar object and a statement block that holds detailed refinement
   information on that object.

   See the `refineStatement’ rule of the grammar (Section 5) for the
   formal syntax of the `refine’ statement.

4.7.7.1. The refine’s type Statement

   The refine’s `type’ statement, which need not be present, gets one
   argument that is used to provide a refined type for the correspondent
   object.  Type restrictions may be applied by appending subtyping
   information according to the rules of the base type.  See [RFC3780]
   for SMIng base types and their type restrictions.  In case of
   enumeration or bitset types the order of named numbers is not
   significant.

   Note that if a `type’ and a `writetype’ statement are both present
   then this type only applies when instances of the correspondent
   object are read.

4.7.7.2.  The refine’s writetype Statement

   The refine’s `writetype’ statement, which need not be present, gets
   one argument that is used to provide a refined type for the
   correspondent object, only when instances of that object are written.
   Type restrictions may be applied by appending subtyping information
   according to the rules of the base type.  See [RFC3780] for SMIng
   base types and their type restrictions.  In case of enumeration or
   bitset types the order of named numbers is not significant.

4.7.7.3.  The refine’s access Statement

   The refine’s `access’ statement, which need not be present, gets one
   argument that is used to specify the minimal level of access that the
   correspondent object must implement in the sense of its original
   `access’ statement.  Hence, the refine’s `access’ statement MUST NOT
   specify a greater level of access than is specified in the
   correspondent object definition.

   An implementation is compliant if the level of access it provides is
   greater or equal to the minimal level in the refine’s `access’
   statement and less or equal to the maximal level in the object’s
   `access’ statement.

4.7.7.4.  The refine’s description Statement

   The refine’s `description’ statement, which must be present, gets one
   argument which is used to specify a high-level textual description of
   the refined compliance requirement.

4.7.8.  Usage Example

   The compliance statement contained in the SNMPv2-MIB [RFC3418],
   converted to SMIng:

      compliance snmpBasicComplianceRev2 {
        oid             snmpMIBCompliances.3;
        status          current;
        description
                "The compliance statement for SNMP entities which
                 implement this MIB module.";

        mandatory       (snmpGroup, snmpSetGroup, systemGroup,
                         snmpBasicNotificationsGroup);

        optional snmpCommunityGroup {
          description
                "This group is mandatory for SNMP entities which
                 support community-based authentication.";
        };
        optional snmpWarmStartNotificationGroup {
          description
                "This group is mandatory for an SNMP entity which
                 supports command responder applications, and is
                 able to reinitialize itself such that its
                 configuration is unaltered.";
        };
      };

5. NMRG-SMING-SNMP-EXT

   The grammar of the snmp statement (including all its contained
   statements) conforms to the Augmented Backus-Naur Form (ABNF)
   [RFC2234].  It is included in the abnf statement of the snmp SMIng
   extension definition in the NMRG-SMING-SNMP-EXT module below.

   module NMRG-SMING-SNMP-EXT {

      organization    "IRTF Network Management Research Group (NMRG)";

      contact         "IRTF Network Management Research Group (NMRG)
                       http://www.ibr.cs.tu-bs.de/projects/nmrg/

                       Frank Strauss
                       TU Braunschweig
                       Muehlenpfordtstrasse 23
                       38106 Braunschweig
                       Germany
                       Phone: +49 531 391 3266
                       EMail: strauss@ibr.cs.tu-bs.de

                       Juergen Schoenwaelder
                       International University Bremen
                       P.O. Box 750 561
                       28725 Bremen
                       Germany
                       Phone: +49 421 200 3587
                       EMail: j.schoenwaelder@iu-bremen.de";

      description     "This module defines a SMIng extension to define
                       the mapping of SMIng definitions of class and
                       their attributes and events to SNMP compatible
                       definitions of modules, node, scalars, tables,
                       and notifications, and additional information on
                       module compliances.

                       Copyright (C) The Internet Society (2004).
                       All Rights Reserved.
                       This version of this module is part of
                       RFC 3781, see the RFC itself for full
                       legal notices.";

      revision {
          date        "2003-12-16";
          description "Initial revision, published as RFC 3781.";
      };

      //
      //
      //

      extension snmp {

          status          current;
          description
             "The snmp statement maps SMIng definitions to SNMP
              conformant definitions.";
          abnf "
 ;;
 ;; sming-snmp.abnf -- Grammar of SNMP mappings in ABNF
 ;;                    notation (RFC 2234).

 ;;
 ;; @(#) $Id: sming-snmp.abnf,v 1.14 2003/10/23 19:31:55 strauss Exp $
 ;;
 ;; Copyright (C) The Internet Society (2004). All Rights Reserved.
 ;;

 ;;
 ;; Statement rules.
 ;;

 snmpStatement           = snmpKeyword *1(sep lcIdentifier) optsep
                               \"{\" stmtsep
                               *1(oidStatement stmtsep)
                               *(nodeStatement stmtsep)
                               *(scalarsStatement stmtsep)
                               *(tableStatement stmtsep)
                               *(notificationStatement stmtsep)
                               *(groupStatement stmtsep)
                               *(complianceStatement stmtsep)
                               statusStatement stmtsep
                               descriptionStatement stmtsep
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 nodeStatement           = nodeKeyword sep lcIdentifier optsep
                               \"{\" stmtsep
                               oidStatement stmtsep
                               *1(representsStatement stmtsep)
                               statusStatement stmtsep
                               *1(descriptionStatement stmtsep)
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 representsStatement     = representsKeyword sep
                               qucIdentifier optsep \";\"

 scalarsStatement        = scalarsKeyword sep lcIdentifier optsep
                               \"{\" stmtsep
                               oidStatement stmtsep
                               1*(objectStatement stmtsep)
                               statusStatement stmtsep
                               descriptionStatement stmtsep
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 tableStatement          = tableKeyword sep lcIdentifier optsep
                               \"{\" stmtsep
                               oidStatement stmtsep

                               anyIndexStatement stmtsep
                               *1(createStatement stmtsep)
                               1*(objectStatement stmtsep)
                               statusStatement stmtsep
                               descriptionStatement stmtsep
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 objectStatement         = objectKeyword sep lcIdentifier optsep
                               \"{\" stmtsep
                               implementsStatement stmtsep
                               *1(subidStatement stmtsep)
                               *1(statusStatement stmtsep)
                               *1(descriptionStatement stmtsep)
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 implementsStatement     = implementsKeyword sep qcattrIdentifier
                               optsep \";\"

 notificationStatement   = notificationKeyword sep lcIdentifier
                               optsep \"{\" stmtsep
                               oidStatement stmtsep
                               signalsStatement stmtsep
                               statusStatement stmtsep
                               descriptionStatement stmtsep
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 signalsStatement        = signalsKeyword sep qattrIdentifier
                               optsep \"{\" stmtsep
                               *(signalsObjectStatement)
                           \"}\" optsep \";\"

 signalsObjectStatement  = objectKeyword sep
                               qattrIdentifier optsep \";\"

 groupStatement          = groupKeyword sep lcIdentifier optsep
                               \"{\" stmtsep
                               oidStatement stmtsep
                               membersStatement stmtsep
                               statusStatement stmtsep
                               descriptionStatement stmtsep
                               *1(referenceStatement stmtsep)
                           \"}\" optsep \";\"

 complianceStatement     = complianceKeyword sep lcIdentifier optsep
                               \"{\" stmtsep

                               oidStatement stmtsep
                               statusStatement stmtsep
                               descriptionStatement stmtsep
                               *1(referenceStatement stmtsep)
                               *1(mandatoryStatement stmtsep)
                               *(optionalStatement stmtsep)
                               *(refineStatement stmtsep)
                           \"}\" optsep \";\"

 anyIndexStatement       = indexStatement /
                           augmentsStatement /
                           reordersStatement /
                           extendsStatement /
                           expandsStatement

 indexStatement          = indexKeyword *1(sep impliedKeyword) optsep
                               \"(\" optsep qlcIdentifierList
                               optsep \")\" optsep \";\"

 augmentsStatement       = augmentsKeyword sep qlcIdentifier
                               optsep \";\"

 reordersStatement       = reordersKeyword sep qlcIdentifier
                               *1(sep impliedKeyword)
                               optsep \"(\" optsep
                               qlcIdentifierList optsep \")\"
                               optsep \";\"

 extendsStatement        = extendsKeyword sep qlcIdentifier optsep \";\"

 expandsStatement        = expandsKeyword sep qlcIdentifier
                               *1(sep impliedKeyword)
                               optsep \"(\" optsep
                               qlcIdentifierList optsep \")\"
                               optsep \";\"

 createStatement         = createKeyword optsep \";\"

 membersStatement        = membersKeyword optsep \"(\" optsep
                               qlcIdentifierList optsep
                               \")\" optsep \";\"

 mandatoryStatement      = mandatoryKeyword optsep \"(\" optsep
                               qlcIdentifierList optsep
                               \")\" optsep \";\"

 optionalStatement       = optionalKeyword sep qlcIdentifier optsep
                               \"{\" descriptionStatement stmtsep

                           \"}\" optsep \";\"

 refineStatement         = refineKeyword sep qlcIdentifier optsep \"{\"
                               *1(typeStatement stmtsep)
                               *1(writetypeStatement stmtsep)
                               *1(accessStatement stmtsep)
                               descriptionStatement stmtsep
                           \"}\" optsep \";\"

 typeStatement           = typeKeyword sep
                               (refinedBaseType / refinedType)
                               optsep \";\"

 writetypeStatement      = writetypeKeyword sep
                               (refinedBaseType / refinedType)
                               optsep \";\"

 oidStatement            = oidKeyword sep objectIdentifier optsep \";\"

 subidStatement          = subidKeyword sep subid optsep \";\"

 ;;
 ;; Statement keywords.
 ;;

 snmpKeyword         =  %x73 %x6E %x6D %x70
 nodeKeyword         =  %x6E %x6F %x64 %x65
 representsKeyword   =  %x72 %x65 %x70 %x72 %x65 %x73 %x65 %x6E %x74
                        %x73
 scalarsKeyword      =  %x73 %x63 %x61 %x6C %x61 %x72 %x73
 tableKeyword        =  %x74 %x61 %x62 %x6C %x65
 implementsKeyword   =  %x69 %x6D %x70 %x6C %x65 %x6D %x65 %x6E %x74
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容