Network Working Group                 Editors of this version:
Request for Comments: 2579                                 K. McCloghrie
STD: 58                                                    Cisco Systems
Obsoletes: 1903                                               D. Perkins
Category: Standards Track                                       SNMPinfo
                                                        J. Schoenwaelder
                                                         TU Braunschweig
                                      Authors of previous version:
                                                                 J. Case
                                                           SNMP Research
                                                           K. McCloghrie
                                                           Cisco Systems
                                                                 M. Rose
                                                  First Virtual Holdings
                                                           S. Waldbusser
                                          International Network Services
                                                              April 1999
        
Network Working Group                 Editors of this version:
Request for Comments: 2579                                 K. McCloghrie
STD: 58                                                    Cisco Systems
Obsoletes: 1903                                               D. Perkins
Category: Standards Track                                       SNMPinfo
                                                        J. Schoenwaelder
                                                         TU Braunschweig
                                      Authors of previous version:
                                                                 J. Case
                                                           SNMP Research
                                                           K. McCloghrie
                                                           Cisco Systems
                                                                 M. Rose
                                                  First Virtual Holdings
                                                           S. Waldbusser
                                          International Network Services
                                                              April 1999
        

Textual Conventions for SMIv2

SMIv2的文本约定

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (1999). All Rights Reserved.

版权所有(C)互联网协会(1999年)。版权所有。

Table of Contents

目录

   1 Introduction ..................................................2
   1.1 A Note on Terminology .......................................2
   2 Definitions ...................................................2
   3 Mapping of the TEXTUAL-CONVENTION macro ......................20
   3.1 Mapping of the DISPLAY-HINT clause .........................21
   3.2 Mapping of the STATUS clause ...............................22
   3.3 Mapping of the DESCRIPTION clause ..........................23
   3.4 Mapping of the REFERENCE clause ............................23
   3.5 Mapping of the SYNTAX clause ...............................23
   4 Sub-typing of Textual Conventions ............................23
   5 Revising a Textual Convention Definition .....................23
        
   1 Introduction ..................................................2
   1.1 A Note on Terminology .......................................2
   2 Definitions ...................................................2
   3 Mapping of the TEXTUAL-CONVENTION macro ......................20
   3.1 Mapping of the DISPLAY-HINT clause .........................21
   3.2 Mapping of the STATUS clause ...............................22
   3.3 Mapping of the DESCRIPTION clause ..........................23
   3.4 Mapping of the REFERENCE clause ............................23
   3.5 Mapping of the SYNTAX clause ...............................23
   4 Sub-typing of Textual Conventions ............................23
   5 Revising a Textual Convention Definition .....................23
        
   6 Security Considerations ......................................24
   7 Editors' Addresses ...........................................25
   8 References ...................................................25
   9 Full Copyright Statement .....................................26
        
   6 Security Considerations ......................................24
   7 Editors' Addresses ...........................................25
   8 References ...................................................25
   9 Full Copyright Statement .....................................26
        
1. Introduction
1. 介绍

Management information is viewed as a collection of managed objects, residing in a virtual information store, termed the Management Information Base (MIB). Collections of related objects are defined in MIB modules. These modules are written using an adapted subset of OSI's Abstract Syntax Notation One, ASN.1 (1988) [1], termed the Structure of Management Information (SMI) [2].

管理信息被视为托管对象的集合,驻留在虚拟信息存储中,称为管理信息库(MIB)。相关对象的集合在MIB模块中定义。这些模块使用OSI抽象语法符号1的一个子集ASN.1(1988)[1]编写,称为管理信息结构(SMI)[2]。

When designing a MIB module, it is often useful to define new types similar to those defined in the SMI. In comparison to a type defined in the SMI, each of these new types has a different name, a similar syntax, but a more precise semantics. These newly defined types are termed textual conventions, and are used for the convenience of humans reading the MIB module. It is the purpose of this document to define the initial set of textual conventions available to all MIB modules.

在设计MIB模块时,定义与SMI中定义的类型类似的新类型通常很有用。与SMI中定义的类型相比,每个新类型都有不同的名称、相似的语法,但语义更精确。这些新定义的类型称为文本约定,用于方便人们阅读MIB模块。本文档的目的是定义可用于所有MIB模块的初始文本约定集。

Objects defined using a textual convention are always encoded by means of the rules that define their primitive type. However, textual conventions often have special semantics associated with them. As such, an ASN.1 macro, TEXTUAL-CONVENTION, is used to concisely convey the syntax and semantics of a textual convention.

使用文本约定定义的对象总是通过定义其基本类型的规则进行编码。然而,文本约定通常具有与之相关联的特殊语义。因此,ASN.1宏text-CONVENTION用于简洁地传达文本约定的语法和语义。

1.1. A Note on Terminology
1.1. 术语注释

For the purpose of exposition, the original Structure of Management Information, as described in RFCs 1155 (STD 16), 1212 (STD 16), and RFC 1215, is termed the SMI version 1 (SMIv1). The current version of the Structure of Management Information is termed SMI version 2 (SMIv2).

为了便于说明,RFCs 1155(STD 16)、1212(STD 16)和RFC 1215中描述的管理信息的原始结构称为SMI版本1(SMIv1)。管理信息结构的当前版本称为SMI版本2(SMIv2)。

2. Definitions
2. 定义
SNMPv2-TC DEFINITIONS ::= BEGIN
        
SNMPv2-TC DEFINITIONS ::= BEGIN
        

IMPORTS TimeTicks FROM SNMPv2-SMI;

从SNMPv2 SMI导入时间刻度;

-- definition of textual conventions

--文本约定的定义

TEXTUAL-CONVENTION MACRO ::=
        
TEXTUAL-CONVENTION MACRO ::=
        
BEGIN
    TYPE NOTATION ::=
                  DisplayPart
                  "STATUS" Status
                  "DESCRIPTION" Text
                  ReferPart
                  "SYNTAX" Syntax
        
BEGIN
    TYPE NOTATION ::=
                  DisplayPart
                  "STATUS" Status
                  "DESCRIPTION" Text
                  ReferPart
                  "SYNTAX" Syntax
        
    VALUE NOTATION ::=
                   value(VALUE Syntax)      -- adapted ASN.1
        
    VALUE NOTATION ::=
                   value(VALUE Syntax)      -- adapted ASN.1
        
    DisplayPart ::=
                  "DISPLAY-HINT" Text
                | empty
        
    DisplayPart ::=
                  "DISPLAY-HINT" Text
                | empty
        
    Status ::=
                  "current"
                | "deprecated"
                | "obsolete"
        
    Status ::=
                  "current"
                | "deprecated"
                | "obsolete"
        
    ReferPart ::=
                  "REFERENCE" Text
                | empty
        
    ReferPart ::=
                  "REFERENCE" Text
                | empty
        
    -- a character string as defined in [2]
    Text ::= value(IA5String)
        
    -- a character string as defined in [2]
    Text ::= value(IA5String)
        
    Syntax ::=   -- Must be one of the following:
                       -- a base type (or its refinement), or
                       -- a BITS pseudo-type
                  type
                | "BITS" "{" NamedBits "}"
        
    Syntax ::=   -- Must be one of the following:
                       -- a base type (or its refinement), or
                       -- a BITS pseudo-type
                  type
                | "BITS" "{" NamedBits "}"
        
    NamedBits ::= NamedBit
                | NamedBits "," NamedBit
        
    NamedBits ::= NamedBit
                | NamedBits "," NamedBit
        
    NamedBit ::=  identifier "(" number ")" -- number is nonnegative
        
    NamedBit ::=  identifier "(" number ")" -- number is nonnegative
        

END

终止

DisplayString ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "255a"
    STATUS       current
    DESCRIPTION
            "Represents textual information taken from the NVT ASCII
        
DisplayString ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "255a"
    STATUS       current
    DESCRIPTION
            "Represents textual information taken from the NVT ASCII
        

character set, as defined in pages 4, 10-11 of RFC 854.

字符集,如RFC 854第4、10-11页所定义。

To summarize RFC 854, the NVT ASCII repertoire specifies:

总结RFC 854,NVT ASCII指令表规定:

- the use of character codes 0-127 (decimal)

- 使用字符代码0-127(十进制)

- the graphics characters (32-126) are interpreted as US ASCII

- 图形字符(32-126)被解释为US ASCII

- NUL, LF, CR, BEL, BS, HT, VT and FF have the special meanings specified in RFC 854

- NUL、LF、CR、BEL、BS、HT、VT和FF具有RFC 854中规定的特殊含义

- the other 25 codes have no standard interpretation

- 其他25个代码没有标准解释

- the sequence 'CR LF' means newline

- 序列“CR LF”表示换行

- the sequence 'CR NUL' means carriage-return

- 序列“CR NUL”表示回车

- an 'LF' not preceded by a 'CR' means moving to the same column on the next line.

- 前面没有“CR”的“LF”表示移动到下一行的同一列。

- the sequence 'CR x' for any x other than LF or NUL is illegal. (Note that this also means that a string may end with either 'CR LF' or 'CR NUL', but not with CR.)

- 除LF或NUL之外的任何x的序列“CR x”都是非法的。(请注意,这也意味着字符串可以以“CR LF”或“CR NUL”结尾,但不能以CR结尾。)

Any object defined using this syntax may not exceed 255 characters in length." SYNTAX OCTET STRING (SIZE (0..255))

使用此语法定义的任何对象的长度不得超过255个字符。“语法八位字节字符串(大小(0..255))

PhysAddress ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "1x:"
    STATUS       current
    DESCRIPTION
            "Represents media- or physical-level addresses."
    SYNTAX       OCTET STRING
        
PhysAddress ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "1x:"
    STATUS       current
    DESCRIPTION
            "Represents media- or physical-level addresses."
    SYNTAX       OCTET STRING
        
MacAddress ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "1x:"
    STATUS       current
    DESCRIPTION
            "Represents an 802 MAC address represented in the
            `canonical' order defined by IEEE 802.1a, i.e., as if it
            were transmitted least significant bit first, even though
            802.5 (in contrast to other 802.x protocols) requires MAC
            addresses to be transmitted most significant bit first."
    SYNTAX       OCTET STRING (SIZE (6))
        
MacAddress ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "1x:"
    STATUS       current
    DESCRIPTION
            "Represents an 802 MAC address represented in the
            `canonical' order defined by IEEE 802.1a, i.e., as if it
            were transmitted least significant bit first, even though
            802.5 (in contrast to other 802.x protocols) requires MAC
            addresses to be transmitted most significant bit first."
    SYNTAX       OCTET STRING (SIZE (6))
        
TruthValue ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents a boolean value."
    SYNTAX       INTEGER { true(1), false(2) }
        
TruthValue ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents a boolean value."
    SYNTAX       INTEGER { true(1), false(2) }
        
TestAndIncr ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents integer-valued information used for atomic
            operations.  When the management protocol is used to specify
            that an object instance having this syntax is to be
            modified, the new value supplied via the management protocol
            must precisely match the value presently held by the
            instance.  If not, the management protocol set operation
            fails with an error of `inconsistentValue'.  Otherwise, if
            the current value is the maximum value of 2^31-1 (2147483647
            decimal), then the value held by the instance is wrapped to
            zero; otherwise, the value held by the instance is
            incremented by one.  (Note that regardless of whether the
            management protocol set operation succeeds, the variable-
            binding in the request and response PDUs are identical.)
        
TestAndIncr ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents integer-valued information used for atomic
            operations.  When the management protocol is used to specify
            that an object instance having this syntax is to be
            modified, the new value supplied via the management protocol
            must precisely match the value presently held by the
            instance.  If not, the management protocol set operation
            fails with an error of `inconsistentValue'.  Otherwise, if
            the current value is the maximum value of 2^31-1 (2147483647
            decimal), then the value held by the instance is wrapped to
            zero; otherwise, the value held by the instance is
            incremented by one.  (Note that regardless of whether the
            management protocol set operation succeeds, the variable-
            binding in the request and response PDUs are identical.)
        

The value of the ACCESS clause for objects having this syntax is either `read-write' or `read-create'. When an instance of a columnar object having this syntax is created, any value may be supplied via the management protocol.

具有此语法的对象的ACCESS子句的值为'read-write'或'read-create'。当创建具有此语法的列对象实例时,可以通过管理协议提供任何值。

When the network management portion of the system is re-initialized, the value of every object instance having this syntax must either be incremented from its value prior to the re-initialization, or (if the value prior to the re-initialization is unknown) be set to a pseudo-randomly generated value." SYNTAX INTEGER (0..2147483647)

当系统的网络管理部分重新初始化时,具有此语法的每个对象实例的值必须从重新初始化之前的值递增,或者(如果重新初始化之前的值未知)设置为伪随机生成的值。“语法整数(0..2147483647)

AutonomousType ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents an independently extensible type identification
            value.  It may, for example, indicate a particular sub-tree
            with further MIB definitions, or define a particular type of
            protocol or hardware."
    SYNTAX       OBJECT IDENTIFIER
        
AutonomousType ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents an independently extensible type identification
            value.  It may, for example, indicate a particular sub-tree
            with further MIB definitions, or define a particular type of
            protocol or hardware."
    SYNTAX       OBJECT IDENTIFIER
        
InstancePointer ::= TEXTUAL-CONVENTION
    STATUS       obsolete
        
InstancePointer ::= TEXTUAL-CONVENTION
    STATUS       obsolete
        

DESCRIPTION "A pointer to either a specific instance of a MIB object or a conceptual row of a MIB table in the managed device. In the latter case, by convention, it is the name of the particular instance of the first accessible columnar object in the conceptual row.

DESCRIPTION“指向受管设备中MIB对象的特定实例或MIB表的概念行的指针。在后一种情况下,按照约定,它是概念行中第一个可访问列对象的特定实例的名称。

The two uses of this textual convention are replaced by VariablePointer and RowPointer, respectively." SYNTAX OBJECT IDENTIFIER

此文本约定的两种用法分别替换为VariablePointer和RowPointer

VariablePointer ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "A pointer to a specific object instance.  For example,
            sysContact.0 or ifInOctets.3."
    SYNTAX       OBJECT IDENTIFIER
        
VariablePointer ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "A pointer to a specific object instance.  For example,
            sysContact.0 or ifInOctets.3."
    SYNTAX       OBJECT IDENTIFIER
        
RowPointer ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents a pointer to a conceptual row.  The value is the
            name of the instance of the first accessible columnar object
            in the conceptual row.
        
RowPointer ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents a pointer to a conceptual row.  The value is the
            name of the instance of the first accessible columnar object
            in the conceptual row.
        

For example, ifIndex.3 would point to the 3rd row in the ifTable (note that if ifIndex were not-accessible, then ifDescr.3 would be used instead)." SYNTAX OBJECT IDENTIFIER

例如,ifIndex.3将指向ifTable中的第三行(请注意,如果ifIndex不可访问,则将使用ifDescr.3)

RowStatus ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "The RowStatus textual convention is used to manage the
            creation and deletion of conceptual rows, and is used as the
            value of the SYNTAX clause for the status column of a
            conceptual row (as described in Section 7.7.1 of [2].)
        
RowStatus ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "The RowStatus textual convention is used to manage the
            creation and deletion of conceptual rows, and is used as the
            value of the SYNTAX clause for the status column of a
            conceptual row (as described in Section 7.7.1 of [2].)
        

The status column has six defined values:

“状态”列有六个定义的值:

- `active', which indicates that the conceptual row is available for use by the managed device;

- `active',表示概念行可供受管设备使用;

- `notInService', which indicates that the conceptual row exists in the agent, but is unavailable for use by the managed device (see NOTE below); 'notInService' has no implication regarding the internal consistency of the row, availability of resources, or consistency with the current state of the managed device;

- `notInService',表示代理中存在概念行,但不可供受管设备使用(请参见下面的注释);'notInService’对行的内部一致性、资源的可用性或与受管设备的当前状态的一致性没有影响;

- `notReady', which indicates that the conceptual row exists in the agent, but is missing information necessary in order to be available for use by the managed device (i.e., one or more required columns in the conceptual row have not been instanciated);

- `notReady',表示代理中存在概念行,但缺少可供受管设备使用的必要信息(即,概念行中的一个或多个必需列尚未实例化);

- `createAndGo', which is supplied by a management station wishing to create a new instance of a conceptual row and to have its status automatically set to active, making it available for use by the managed device;

- `createAndGo',由希望创建概念行的新实例并将其状态自动设置为活动的管理站提供,使其可供受管设备使用;

- `createAndWait', which is supplied by a management station wishing to create a new instance of a conceptual row (but not make it available for use by the managed device); and,

- `createAndWait',由希望创建概念行的新实例的管理站提供(但不使其可供受管设备使用);和

- `destroy', which is supplied by a management station wishing to delete all of the instances associated with an existing conceptual row.

- `destroy',由希望删除与现有概念行关联的所有实例的管理站提供。

Whereas five of the six values (all except `notReady') may be specified in a management protocol set operation, only three values will be returned in response to a management protocol retrieval operation: `notReady', `notInService' or `active'. That is, when queried, an existing conceptual row has only three states: it is either available for use by the managed device (the status column has value `active'); it is not available for use by the managed device, though the agent has sufficient information to attempt to make it so (the status column has value `notInService'); or, it is not available for use by the managed device, and an attempt to make it so would fail because the agent has insufficient information (the state column has value `notReady').

虽然在管理协议集操作中可以指定六个值中的五个值(除“notReady”外),但在响应管理协议检索操作时只返回三个值:“notReady”、“notInService”或“active”。也就是说,在查询时,现有概念行只有三种状态:它要么可供受管设备使用(status列的值为“active”);它不可供受管设备使用,尽管代理有足够的信息尝试这样做(状态列的值为“notInService”);或者,它不可供受管设备使用,尝试这样做将失败,因为代理没有足够的信息(state列的值为“notReady”)。

NOTE WELL

注意

This textual convention may be used for a MIB table, irrespective of whether the values of that table's conceptual rows are able to be modified while it is active, or whether its conceptual rows must be taken out of service in order to be modified. That is, it is the responsibility of the DESCRIPTION clause of the status column to specify whether the status column must not be `active' in order for the value of some other column of the same conceptual row to be modified. If such a specification is made, affected columns may be changed by an SNMP set PDU if the RowStatus would not be equal to `active' either immediately before or after processing the PDU. In other words, if the PDU also contained a varbind that would change the RowStatus value, the column in question may be changed if the RowStatus was not equal to `active' as the PDU was received, or if the varbind sets the status to a value other than 'active'.

此文本约定可用于MIB表,无论该表的概念行的值是否可以在其处于活动状态时修改,或其概念行是否必须停止使用才能修改。也就是说,status列的DESCRIPTION子句负责指定status列是否不能为“active”,以便修改同一概念行的其他列的值。如果制定了此类规范,如果在处理PDU之前或之后,RowStatus不等于“active”,则SNMP集PDU可能会更改受影响的列。换句话说,如果PDU还包含一个会更改RowStatus值的varbind,则如果收到PDU时RowStatus不等于“active”,或者如果varbind将状态设置为“active”以外的值,则可能会更改相关列。

Also note that whenever any elements of a row exist, the RowStatus column must also exist.

还要注意,只要行的任何元素存在,RowStatus列也必须存在。

To summarize the effect of having a conceptual row with a status column having a SYNTAX clause value of RowStatus, consider the following state diagram:

为了总结具有状态列的概念行的效果,该状态列具有ROWSTATE的语法子句值,请考虑以下状态图:

                                         STATE
              +--------------+-----------+-------------+-------------
              |      A       |     B     |      C      |      D
              |              |status col.|status column|
              |status column |    is     |      is     |status column
    ACTION    |does not exist|  notReady | notInService|  is active
--------------+--------------+-----------+-------------+-------------
set status    |noError    ->D|inconsist- |inconsistent-|inconsistent-
column to     |       or     |   entValue|        Value|        Value
createAndGo   |inconsistent- |           |             |
              |         Value|           |             |
--------------+--------------+-----------+-------------+-------------
set status    |noError  see 1|inconsist- |inconsistent-|inconsistent-
column to     |       or     |   entValue|        Value|        Value
createAndWait |wrongValue    |           |             |
--------------+--------------+-----------+-------------+-------------
set status    |inconsistent- |inconsist- |noError      |noError
column to     |         Value|   entValue|             |
active        |              |           |             |
              |              |     or    |             |
              |              |           |             |
              |              |see 2   ->D|see 8     ->D|          ->D
--------------+--------------+-----------+-------------+-------------
set status    |inconsistent- |inconsist- |noError      |noError   ->C
column to     |         Value|   entValue|             |
notInService  |              |           |             |
              |              |     or    |             |      or
              |              |           |             |
              |              |see 3   ->C|          ->C|see 6
--------------+--------------+-----------+-------------+-------------
set status    |noError       |noError    |noError      |noError   ->A
column to     |              |           |             |      or
destroy       |           ->A|        ->A|          ->A|see 7
--------------+--------------+-----------+-------------+-------------
set any other |see 4         |noError    |noError      |see 5
column to some|              |           |             |
value         |              |      see 1|          ->C|          ->D
--------------+--------------+-----------+-------------+-------------
        
                                         STATE
              +--------------+-----------+-------------+-------------
              |      A       |     B     |      C      |      D
              |              |status col.|status column|
              |status column |    is     |      is     |status column
    ACTION    |does not exist|  notReady | notInService|  is active
--------------+--------------+-----------+-------------+-------------
set status    |noError    ->D|inconsist- |inconsistent-|inconsistent-
column to     |       or     |   entValue|        Value|        Value
createAndGo   |inconsistent- |           |             |
              |         Value|           |             |
--------------+--------------+-----------+-------------+-------------
set status    |noError  see 1|inconsist- |inconsistent-|inconsistent-
column to     |       or     |   entValue|        Value|        Value
createAndWait |wrongValue    |           |             |
--------------+--------------+-----------+-------------+-------------
set status    |inconsistent- |inconsist- |noError      |noError
column to     |         Value|   entValue|             |
active        |              |           |             |
              |              |     or    |             |
              |              |           |             |
              |              |see 2   ->D|see 8     ->D|          ->D
--------------+--------------+-----------+-------------+-------------
set status    |inconsistent- |inconsist- |noError      |noError   ->C
column to     |         Value|   entValue|             |
notInService  |              |           |             |
              |              |     or    |             |      or
              |              |           |             |
              |              |see 3   ->C|          ->C|see 6
--------------+--------------+-----------+-------------+-------------
set status    |noError       |noError    |noError      |noError   ->A
column to     |              |           |             |      or
destroy       |           ->A|        ->A|          ->A|see 7
--------------+--------------+-----------+-------------+-------------
set any other |see 4         |noError    |noError      |see 5
column to some|              |           |             |
value         |              |      see 1|          ->C|          ->D
--------------+--------------+-----------+-------------+-------------
        

(1) goto B or C, depending on information available to the agent.

(1) 转到B或C,具体取决于代理可用的信息。

(2) if other variable bindings included in the same PDU,

(2) 如果同一PDU中包含其他变量绑定,

provide values for all columns which are missing but required, and all columns have acceptable values, then return noError and goto D.

为缺少但必需的所有列提供值,并且所有列都具有可接受的值,然后返回noError和goto D。

(3) if other variable bindings included in the same PDU, provide legal values for all columns which are missing but required, then return noError and goto C.

(3) 如果同一PDU中包含其他变量绑定,请为缺少但必需的所有列提供合法值,然后返回noError和goto C。

(4) at the discretion of the agent, the return value may be either:

(4) 由代理行自行决定,返回值可以是:

inconsistentName: because the agent does not choose to create such an instance when the corresponding RowStatus instance does not exist, or

不一致名称:因为代理不选择在相应的RowStatus实例不存在时创建这样的实例,或者

inconsistentValue: if the supplied value is inconsistent with the state of some other MIB object's value, or

不一致值:如果提供的值与其他MIB对象值的状态不一致,或

noError: because the agent chooses to create the instance.

noError:因为代理选择创建实例。

If noError is returned, then the instance of the status column must also be created, and the new state is B or C, depending on the information available to the agent. If inconsistentName or inconsistentValue is returned, the row remains in state A.

如果返回noError,则还必须创建status列的实例,新状态为B或C,具体取决于代理可用的信息。如果返回unconsistentname或unconsistentValue,则行将保持状态A。

(5) depending on the MIB definition for the column/table, either noError or inconsistentValue may be returned.

(5) 根据列/表的MIB定义,可能会返回noError或inconsistentValue。

(6) the return value can indicate one of the following errors:

(6) 返回值可能指示以下错误之一:

wrongValue: because the agent does not support notInService (e.g., an agent which does not support createAndWait), or

错误值:因为代理不支持notInService(例如,不支持createAndWait的代理),或

inconsistentValue: because the agent is unable to take the row out of service at this time, perhaps because it is in use and cannot be de-activated.

值不一致:因为代理此时无法使该行停止服务,可能是因为该行正在使用且无法取消激活。

(7) the return value can indicate the following error:

(7) 返回值可能指示以下错误:

inconsistentValue: because the agent is unable to remove the row at this time, perhaps because it is in use and cannot be de-activated.

值不一致:因为代理此时无法删除该行,可能是因为该行正在使用且无法取消激活。

(8) the transition to D can fail, e.g., if the values of the conceptual row are inconsistent, then the error code would be inconsistentValue.

(8) 向D的转换可能会失败,例如,如果概念行的值不一致,则错误代码将是不一致的值。

NOTE: Other processing of (this and other varbinds of) the set request may result in a response other than noError being returned, e.g., wrongValue, noCreation, etc.

注意:set请求的其他处理(此和其他变量绑定)可能会导致返回noError以外的响应,例如错误值、noCreation等。

Conceptual Row Creation

概念行创建

There are four potential interactions when creating a conceptual row: selecting an instance-identifier which is not in use; creating the conceptual row; initializing any objects for which the agent does not supply a default; and, making the conceptual row available for use by the managed device.

创建概念行时有四种可能的交互:选择未使用的实例标识符;创建概念行;初始化代理未提供默认值的任何对象;以及,使概念行可供受管设备使用。

Interaction 1: Selecting an Instance-Identifier

交互1:选择实例标识符

The algorithm used to select an instance-identifier varies for each conceptual row. In some cases, the instance-identifier is semantically significant, e.g., the destination address of a route, and a management station selects the instance-identifier according to the semantics.

用于选择实例标识符的算法因每个概念行而异。在一些情况下,实例标识符在语义上是重要的,例如,路由的目的地地址,并且管理站根据语义选择实例标识符。

In other cases, the instance-identifier is used solely to distinguish conceptual rows, and a management station without specific knowledge of the conceptual row might examine the instances present in order to determine an unused instance-identifier. (This approach may be used, but it is often highly sub-optimal; however, it is also a questionable practice for a naive management station to attempt conceptual row creation.)

在其他情况下,实例标识符仅用于区分概念行,没有概念行特定知识的管理站可能会检查存在的实例,以确定未使用的实例标识符。(可以使用这种方法,但它通常是高度次优的;然而,对于一个幼稚的管理站来说,尝试概念性的行创建也是一种值得怀疑的做法。)

Alternately, the MIB module which defines the conceptual row might provide one or more objects which provide assistance in determining an unused instance-identifier. For example, if the conceptual row is indexed by an integer-value, then an object having an integer-valued SYNTAX clause might be defined for such a purpose, allowing a management station to issue a management protocol retrieval operation. In order to avoid unnecessary collisions between competing management stations, `adjacent' retrievals of this object should be different.

或者,定义概念行的MIB模块可以提供一个或多个对象,这些对象可以帮助确定未使用的实例标识符。例如,如果概念行由一个整数值索引,则可以为此目的定义具有整数值语法子句的对象,从而允许管理站发出管理协议检索操作。为了避免竞争管理站之间不必要的冲突,此对象的“相邻”检索应该不同。

Finally, the management station could select a pseudo-random number to use as the index. In the event that this index

最后,管理站可以选择一个伪随机数作为索引。如果该索引

was already in use and an inconsistentValue was returned in response to the management protocol set operation, the management station should simply select a new pseudo-random number and retry the operation.

已在使用,并且响应管理协议集操作返回了不一致的值,管理站只需选择一个新的伪随机数,然后重试该操作。

A MIB designer should choose between the two latter algorithms based on the size of the table (and therefore the efficiency of each algorithm). For tables in which a large number of entries are expected, it is recommended that a MIB object be defined that returns an acceptable index for creation. For tables with small numbers of entries, it is recommended that the latter pseudo-random index mechanism be used.

MIB设计者应该根据表的大小(以及每个算法的效率)在后两种算法之间进行选择。对于需要大量条目的表,建议定义一个MIB对象,该对象返回可接受的索引以供创建。对于条目数较少的表,建议使用后一种伪随机索引机制。

Interaction 2: Creating the Conceptual Row

交互2:创建概念行

Once an unused instance-identifier has been selected, the management station determines if it wishes to create and activate the conceptual row in one transaction or in a negotiated set of interactions.

一旦选择了未使用的实例标识符,管理站将确定是否希望在一个事务或协商的交互集合中创建和激活概念行。

Interaction 2a: Creating and Activating the Conceptual Row

交互2a:创建和激活概念行

The management station must first determine the column requirements, i.e., it must determine those columns for which it must or must not provide values. Depending on the complexity of the table and the management station's knowledge of the agent's capabilities, this determination can be made locally by the management station. Alternately, the management station issues a management protocol get operation to examine all columns in the conceptual row that it wishes to create. In response, for each column, there are three possible outcomes:

管理站必须首先确定列要求,即必须确定其必须或不得提供值的列。根据表的复杂性和管理站对代理能力的了解,管理站可以在本地进行此确定。或者,管理站发出管理协议get操作,以检查其希望创建的概念行中的所有列。作为回应,每一列都有三种可能的结果:

- a value is returned, indicating that some other management station has already created this conceptual row. We return to interaction 1.

- 返回一个值,指示其他某个管理工作站已创建此概念行。我们回到互动1。

- the exception `noSuchInstance' is returned, indicating that the agent implements the object-type associated with this column, and that this column in at least one conceptual row would be accessible in the MIB view used by the retrieval were it to exist. For those columns to which the agent provides read-create access, the `noSuchInstance' exception tells the management station that it should supply a value for this column when the conceptual row is to be created.

- 返回异常“noSuchInstance”,表示代理实现了与此列关联的对象类型,并且如果此列存在,则至少一个概念行中的此列可以在检索使用的MIB视图中访问。对于代理提供读取-创建访问权限的列,“noSuchInstance”异常告诉管理站,在创建概念行时,它应该为此列提供一个值。

- the exception `noSuchObject' is returned, indicating that the agent does not implement the object-type associated with this column or that there is no conceptual row for which this column would be accessible in the MIB view used by the retrieval. As such, the management station can not issue any management protocol set operations to create an instance of this column.

- 返回异常“noSuchObject”,表示代理未实现与此列关联的对象类型,或者在检索所使用的MIB视图中没有可访问此列的概念行。因此,管理站不能发出任何管理协议集操作来创建此列的实例。

Once the column requirements have been determined, a management protocol set operation is accordingly issued. This operation also sets the new instance of the status column to `createAndGo'.

一旦确定了列要求,就会相应地发布管理协议集操作。此操作还将状态列的新实例设置为“createAndGo”。

When the agent processes the set operation, it verifies that it has sufficient information to make the conceptual row available for use by the managed device. The information available to the agent is provided by two sources: the management protocol set operation which creates the conceptual row, and, implementation-specific defaults supplied by the agent (note that an agent must provide implementation-specific defaults for at least those objects which it implements as read-only). If there is sufficient information available, then the conceptual row is created, a `noError' response is returned, the status column is set to `active', and no further interactions are necessary (i.e., interactions 3 and 4 are skipped). If there is insufficient information, then the conceptual row is not created, and the set operation fails with an error of `inconsistentValue'. On this error, the management station can issue a management protocol retrieval operation to determine if this was because it failed to specify a value for a required column, or, because the selected instance of the status column already existed. In the latter case, we return to interaction 1. In the former case, the management station can re-issue the set operation with the additional information, or begin interaction 2 again using `createAndWait' in order to negotiate creation of the conceptual row.

当代理处理set操作时,它将验证是否有足够的信息使概念行可供受管设备使用。代理可用的信息由两个来源提供:创建概念行的管理协议集操作,以及代理提供的特定于实现的默认值(请注意,代理必须至少为其以只读方式实现的对象提供特定于实现的默认值)。如果有足够的可用信息,则创建概念行,返回“无错误”响应,状态列设置为“活动”,并且不需要进一步交互(即跳过交互3和4)。如果没有足够的信息,则不会创建概念行,并且set操作失败,并出现错误“UnconsistentValue”。在出现此错误时,管理站可以发出管理协议检索操作,以确定这是因为它未能为所需列指定值,还是因为状态列的选定实例已存在。在后一种情况下,我们返回到交互1。在前一种情况下,管理站可以使用附加信息重新发出set操作,或者使用“createAndWait”再次开始交互2,以便协商概念行的创建。

NOTE WELL

注意

Regardless of the method used to determine the column requirements, it is possible that the management station might deem a column necessary when, in fact, the agent will not allow that particular columnar instance to be created or written. In this case, the management protocol set operation will fail with an error such as `noCreation' or `notWritable'. In this case, the management station decides whether it needs to be able to set a value for that particular columnar instance. If not, the management station re-issues the management protocol set operation, but without setting a value for that particular columnar instance; otherwise, the management station aborts the row creation algorithm.

不管用于确定列需求的方法是什么,管理站可能认为列是必要的,而实际上,代理不允许创建或编写特定的列实例。在这种情况下,管理协议集操作将失败,并出现“noCreation”或“notWritable”等错误。在这种情况下,管理站决定是否需要能够为特定的列实例设置值。如果不是,则管理站重新发出管理协议集操作,但不设置该特定列实例的值;否则,管理站将中止行创建算法。

Interaction 2b: Negotiating the Creation of the Conceptual Row

交互2b:协商创建概念行

The management station issues a management protocol set operation which sets the desired instance of the status column to `createAndWait'. If the agent is unwilling to process a request of this sort, the set operation fails with an error of `wrongValue'. (As a consequence, such an agent must be prepared to accept a single management protocol set operation, i.e., interaction 2a above, containing all of the columns indicated by its column requirements.) Otherwise, the conceptual row is created, a `noError' response is returned, and the status column is immediately set to either `notInService' or `notReady', depending on whether it has sufficient information to (attempt to) make the conceptual row available for use by the managed device. If there is sufficient information available, then the status column is set to `notInService'; otherwise, if there is insufficient information, then the status column is set to `notReady'. Regardless, we proceed to interaction 3.

管理站发出管理协议集操作,将状态列的所需实例设置为“createAndWait”。如果代理不愿意处理此类请求,则set操作将失败,并出现“错误值”错误。(因此,此类代理必须准备好接受单个管理协议集操作,即上面的交互2a,包含其列要求指示的所有列。)否则,创建概念行时,将返回“无错误”响应,状态列立即设置为“notInService”或“notReady”,这取决于它是否有足够的信息(尝试)使概念行可供受管设备使用。如果有足够的可用信息,则状态列设置为“notInService”;否则,如果信息不足,则状态列设置为“notReady”。不管怎样,我们继续进行交互3。

Interaction 3: Initializing non-defaulted Objects

交互3:初始化非默认对象

The management station must now determine the column requirements. It issues a management protocol get operation to examine all columns in the created conceptual row. In the response, for each column, there are three possible outcomes:

管理站现在必须确定列要求。它发出一个管理协议get操作来检查所创建概念行中的所有列。在答复中,每一列都有三种可能的结果:

- a value is returned, indicating that the agent implements the object-type associated with this column and had sufficient information to provide a value. For those columns to which the agent provides read-create access (and for which the agent allows their values to be changed after their creation), a value return tells the management station that it may issue additional management protocol set operations, if it desires, in order to change the value associated with this column.

- 返回一个值,指示代理实现与此列关联的对象类型,并且具有足够的信息来提供值。对于代理提供读-创建访问权限的列(以及代理允许在创建后更改其值的列),值返回告诉管理站,如果需要,可以发出其他管理协议集操作,以更改与此列关联的值。

- the exception `noSuchInstance' is returned, indicating that the agent implements the object-type associated with this column, and that this column in at least one conceptual row would be accessible in the MIB view used by the retrieval were it to exist. However, the agent does not have sufficient information to provide a value, and until a value is provided, the conceptual row may not be made available for use by the managed device. For those columns to which the agent provides read-create access, the `noSuchInstance' exception tells the management station that it must issue additional management protocol set operations, in order to provide a value associated with this column.

- 返回异常“noSuchInstance”,表示代理实现了与此列关联的对象类型,并且如果此列存在,则至少一个概念行中的此列可以在检索使用的MIB视图中访问。但是,代理没有足够的信息来提供值,在提供值之前,概念行可能无法供受管设备使用。对于代理提供读取-创建访问权限的列,“noSuchInstance”异常告诉管理站,它必须执行其他管理协议集操作,以便提供与此列关联的值。

- the exception `noSuchObject' is returned, indicating that the agent does not implement the object-type associated with this column or that there is no conceptual row for which this column would be accessible in the MIB view used by the retrieval. As such, the management station can not issue any management protocol set operations to create an instance of this column.

- 返回异常“noSuchObject”,表示代理未实现与此列关联的对象类型,或者在检索所使用的MIB视图中没有可访问此列的概念行。因此,管理站不能发出任何管理协议集操作来创建此列的实例。

If the value associated with the status column is `notReady', then the management station must first deal with all `noSuchInstance' columns, if any. Having done so, the value of the status column becomes `notInService', and we proceed to interaction 4.

如果与状态列关联的值为“notReady”,则管理站必须首先处理所有“noSuchInstance”列(如果有)。完成此操作后,status列的值变为“notInService”,我们继续进行交互4。

Interaction 4: Making the Conceptual Row Available

交互4:使概念行可用

Once the management station is satisfied with the values associated with the columns of the conceptual row, it issues a management protocol set operation to set the status column to `active'. If the agent has sufficient information to make the conceptual row available for use by the managed device, the management protocol set operation succeeds (a `noError' response is returned). Otherwise, the management protocol set operation fails with an error of `inconsistentValue'.

一旦管理站对与概念行的列相关联的值感到满意,它就会发出管理协议集操作,将状态列设置为“活动”。如果代理具有足够的信息使概念行可供受管设备使用,则管理协议集操作将成功(返回“noError”响应)。否则,管理协议集操作失败,错误为“不一致值”。

NOTE WELL

注意

A conceptual row having a status column with value `notInService' or `notReady' is unavailable to the managed device. As such, it is possible for the managed device to create its own instances during the time between the management protocol set operation which sets the status column to `createAndWait' and the management protocol set operation which sets the status column to `active'. In this case, when the management protocol set operation is issued to set the status column to `active', the values held in the agent supersede those used by the managed device.

具有值为“notInService”或“notReady”的状态列的概念行对受管设备不可用。因此,在将状态列设置为“createAndWait”的管理协议集操作和将状态列设置为“active”的管理协议集操作之间的时间内,受管设备可以创建自己的实例。在这种情况下,当发出管理协议设置操作以将状态列设置为“活动”时,代理中保存的值将取代受管设备使用的值。

If the management station is prevented from setting the status column to `active' (e.g., due to management station or network failure) the conceptual row will be left in the `notInService' or `notReady' state, consuming resources indefinitely. The agent must detect conceptual rows that have been in either state for an abnormally long period of time and remove them. It is the responsibility of the DESCRIPTION clause of the status column to indicate what an abnormally long period of time would be. This period of time should be long enough to allow for human response time (including `think time') between the creation of the conceptual row and the setting of the status to `active'. In the absence of such information in the DESCRIPTION clause, it is suggested that this period be approximately 5 minutes in length. This removal action applies not only to newly-created rows, but also to previously active rows which are set to, and left in, the notInService state for a prolonged period exceeding that which is considered normal for such a conceptual row.

如果管理站无法将状态列设置为“活动”(例如,由于管理站或网络故障),则概念行将处于“notInService”或“notReady”状态,无限期地消耗资源。代理必须检测处于任一状态的概念行异常长的时间,并将其删除。status列的DESCRIPTION子句负责指示异常长的时间段。这段时间应足够长,以便在创建概念行和将状态设置为“活动”之间留出人类响应时间(包括“思考时间”)。在描述条款中没有此类信息的情况下,建议这段时间大约为5分钟。此删除操作不仅适用于新创建的行,而且也适用于以前处于活动状态的行,这些行被设置为notInService状态并保持在notInService状态的时间超过了此类概念行的正常时间。

Conceptual Row Suspension

概念行悬挂

When a conceptual row is `active', the management station may issue a management protocol set operation which sets the instance of the status column to `notInService'. If the agent is unwilling to do so, the set operation fails with an error of `wrongValue' or `inconsistentValue'. Otherwise, the conceptual row is taken out of service, and a `noError' response is returned. It is the responsibility of the DESCRIPTION clause of the status column to indicate under what circumstances the status column should be taken out of service (e.g., in order for the value of some other column of the same conceptual row to be modified).

当概念行为“活动”时,管理站可发出管理协议集操作,该操作将状态列的实例设置为“notInService”。如果代理不愿意这样做,则set操作将失败,错误为“错误值”或“不一致值”。否则,概念行将停止服务,并返回“noError”响应。status列的DESCRIPTION子句负责指出在什么情况下应该停止使用status列(例如,为了修改同一概念行的其他列的值)。

Conceptual Row Deletion

概念行删除

            For deletion of conceptual rows, a management protocol set
            operation is issued which sets the instance of the status
            column to `destroy'.  This request may be made regardless of
            the current value of the status column (e.g., it is possible
            to delete conceptual rows which are either `notReady',
            `notInService' or `active'.)  If the operation succeeds,
            then all instances associated with the conceptual row are
            immediately removed."
    SYNTAX       INTEGER {
                     -- the following two values are states:
                     -- these values may be read or written
                     active(1),
                     notInService(2),
        
            For deletion of conceptual rows, a management protocol set
            operation is issued which sets the instance of the status
            column to `destroy'.  This request may be made regardless of
            the current value of the status column (e.g., it is possible
            to delete conceptual rows which are either `notReady',
            `notInService' or `active'.)  If the operation succeeds,
            then all instances associated with the conceptual row are
            immediately removed."
    SYNTAX       INTEGER {
                     -- the following two values are states:
                     -- these values may be read or written
                     active(1),
                     notInService(2),
        
                     -- the following value is a state:
                     -- this value may be read, but not written
                     notReady(3),
        
                     -- the following value is a state:
                     -- this value may be read, but not written
                     notReady(3),
        
                     -- the following three values are
                     -- actions: these values may be written,
                     --   but are never read
                     createAndGo(4),
                     createAndWait(5),
                     destroy(6)
                 }
        
                     -- the following three values are
                     -- actions: these values may be written,
                     --   but are never read
                     createAndGo(4),
                     createAndWait(5),
                     destroy(6)
                 }
        
TimeStamp ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "The value of the sysUpTime object at which a specific
            occurrence happened.  The specific occurrence must be
        
TimeStamp ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "The value of the sysUpTime object at which a specific
            occurrence happened.  The specific occurrence must be
        

defined in the description of any object defined using this type.

在使用此类型定义的任何对象的描述中定义。

If sysUpTime is reset to zero as a result of a re-initialization of the network management (sub)system, then the values of all TimeStamp objects are also reset. However, after approximately 497 days without a re-initialization, the sysUpTime object will reach 2^^32-1 and then increment around to zero; in this case, existing values of TimeStamp objects do not change. This can lead to ambiguities in the value of TimeStamp objects." SYNTAX TimeTicks

如果由于网络管理(子)系统的重新初始化,sysUpTime重置为零,则所有时间戳对象的值也将重置。但是,在大约497天没有重新初始化之后,sysUpTime对象将达到2^^32-1,然后增加到零左右;在这种情况下,时间戳对象的现有值不会更改。这可能导致时间戳对象的值出现歧义

TimeInterval ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "A period of time, measured in units of 0.01 seconds."
    SYNTAX       INTEGER (0..2147483647)
        
TimeInterval ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "A period of time, measured in units of 0.01 seconds."
    SYNTAX       INTEGER (0..2147483647)
        
DateAndTime ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
    STATUS       current
    DESCRIPTION
            "A date-time specification.
        
DateAndTime ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
    STATUS       current
    DESCRIPTION
            "A date-time specification.
        
            field  octets  contents                  range
            -----  ------  --------                  -----
              1      1-2   year*                     0..65536
              2       3    month                     1..12
              3       4    day                       1..31
              4       5    hour                      0..23
              5       6    minutes                   0..59
              6       7    seconds                   0..60
                           (use 60 for leap-second)
              7       8    deci-seconds              0..9
              8       9    direction from UTC        '+' / '-'
              9      10    hours from UTC*           0..13
             10      11    minutes from UTC          0..59
        
            field  octets  contents                  range
            -----  ------  --------                  -----
              1      1-2   year*                     0..65536
              2       3    month                     1..12
              3       4    day                       1..31
              4       5    hour                      0..23
              5       6    minutes                   0..59
              6       7    seconds                   0..60
                           (use 60 for leap-second)
              7       8    deci-seconds              0..9
              8       9    direction from UTC        '+' / '-'
              9      10    hours from UTC*           0..13
             10      11    minutes from UTC          0..59
        

* Notes: - the value of year is in network-byte order - daylight saving time in New Zealand is +13

* 注:-年值按网络字节顺序排列-新西兰的夏令时为+13

For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as:

例如,1992年5月26日星期二美国东部夏令时下午1:30:15将显示为:

                             1992-5-26,13:30:15.0,-4:0
        
                             1992-5-26,13:30:15.0,-4:0
        

Note that if only local time is known, then timezone information (fields 8-10) is not present." SYNTAX OCTET STRING (SIZE (8 | 11))

注意,如果只知道本地时间,则时区信息(字段8-10)不存在

StorageType ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Describes the memory realization of a conceptual row.  A
            row which is volatile(2) is lost upon reboot.  A row which
            is either nonVolatile(3), permanent(4) or readOnly(5), is
            backed up by stable storage.  A row which is permanent(4)
            can be changed but not deleted.  A row which is readOnly(5)
            cannot be changed nor deleted.
        
StorageType ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Describes the memory realization of a conceptual row.  A
            row which is volatile(2) is lost upon reboot.  A row which
            is either nonVolatile(3), permanent(4) or readOnly(5), is
            backed up by stable storage.  A row which is permanent(4)
            can be changed but not deleted.  A row which is readOnly(5)
            cannot be changed nor deleted.
        

If the value of an object with this syntax is either permanent(4) or readOnly(5), it cannot be written. Conversely, if the value is either other(1), volatile(2) or nonVolatile(3), it cannot be modified to be permanent(4) or readOnly(5). (All illegal modifications result in a 'wrongValue' error.)

如果具有此语法的对象的值为永久(4)或只读(5),则无法写入。相反,如果该值为其他(1)、易失性(2)或非易失性(3),则不能将其修改为永久性(4)或只读(5)。(所有非法修改都会导致“错误值”错误。)

            Every usage of this textual convention is required to
            specify the columnar objects which a permanent(4) row must
            at a minimum allow to be writable."
    SYNTAX       INTEGER {
                     other(1),       -- eh?
                     volatile(2),    -- e.g., in RAM
                     nonVolatile(3), -- e.g., in NVRAM
                     permanent(4),   -- e.g., partially in ROM
                     readOnly(5)     -- e.g., completely in ROM
                 }
        
            Every usage of this textual convention is required to
            specify the columnar objects which a permanent(4) row must
            at a minimum allow to be writable."
    SYNTAX       INTEGER {
                     other(1),       -- eh?
                     volatile(2),    -- e.g., in RAM
                     nonVolatile(3), -- e.g., in NVRAM
                     permanent(4),   -- e.g., partially in ROM
                     readOnly(5)     -- e.g., completely in ROM
                 }
        
TDomain ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
          "Denotes a kind of transport service.
        
TDomain ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
          "Denotes a kind of transport service.
        

Some possible values, such as snmpUDPDomain, are defined in the SNMPv2-TM MIB module. Other possible values are defined in other MIB modules." REFERENCE "The SNMPv2-TM MIB module is defined in RFC 1906." SYNTAX OBJECT IDENTIFIER

一些可能的值,如snmpUDPDomain,在SNMPv2 TM MIB模块中定义。其他可能的值在其他MIB模块中定义。“参考”SNMPv2 TM MIB模块在RFC 1906中定义。“语法对象标识符”

TAddress ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
          "Denotes a transport service address.
        
TAddress ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
          "Denotes a transport service address.
        

A TAddress value is always interpreted within the context of a TDomain value. Thus, each definition of a TDomain value must be accompanied by a definition of a textual convention for use with that TDomain. Some possible textual conventions, such as SnmpUDPAddress for snmpUDPDomain, are defined in the SNMPv2-TM MIB module. Other possible textual conventions are defined in other MIB modules." REFERENCE "The SNMPv2-TM MIB module is defined in RFC 1906." SYNTAX OCTET STRING (SIZE (1..255))

TAddress值始终在TDomain值的上下文中进行解释。因此,TDomain值的每个定义都必须附带一个与该TDomain一起使用的文本约定的定义。一些可能的文本约定,如snmpUDPDomain的SnmpUDPAddress,在SNMPv2 TM MIB模块中定义。其他可能的文本约定在其他MIB模块中定义。“参考”SNMPv2 TM MIB模块在RFC 1906中定义。“语法八位字符串(大小(1..255))

END

终止

3. Mapping of the TEXTUAL-CONVENTION macro
3. 文本约定宏的映射

The TEXTUAL-CONVENTION macro is used to convey the syntax and semantics associated with a textual convention. It should be noted that the expansion of the TEXTUAL-CONVENTION macro is something which conceptually happens during implementation and not during run-time.

text-CONVENTION宏用于传递与文本约定相关的语法和语义。应该注意,文本约定宏的扩展在概念上是在实现过程中发生的,而不是在运行时发生的。

The name of a textual convention must consist of one or more letters or digits, with the initial character being an upper case letter. The name must not conflict with any of the reserved words listed in section 3.7 of [2], should not consist of all upper case letters, and shall not exceed 64 characters in length. (However, names longer than 32 characters are not recommended.) The hyphen is not allowed in the name of a textual convention (except for use in information modules converted from SMIv1 which allowed hyphens in ASN.1 type assignments). Further, all names used for the textual conventions defined in all "standard" information modules shall be unique.

文本约定的名称必须由一个或多个字母或数字组成,首字母为大写字母。名称不得与[2]第3.7节中列出的任何保留字冲突,不得包含所有大写字母,且长度不得超过64个字符。(但是,不建议名称长度超过32个字符。)文本约定的名称中不允许使用连字符(从SMIv1转换的信息模块中使用连字符除外,该模块允许在ASN.1类型分配中使用连字符)。此外,所有“标准”信息模块中定义的文本约定使用的所有名称都应是唯一的。

3.1. Mapping of the DISPLAY-HINT clause
3.1. DISPLAY-HINT子句的映射

The DISPLAY-HINT clause, which need not be present, gives a hint as to how the value of an instance of an object with the syntax defined using this textual convention might be displayed. The DISPLAY-HINT clause must not be present if the Textual Convention is defined with a syntax of: OBJECT IDENTIFIER, IpAddress, Counter32, Counter64, or any enumerated syntax (BITS or INTEGER). The determination of whether it makes sense for other syntax types is dependent on the specific definition of the Textual Convention.

DISPLAY-HINT子句不需要出现,它给出了一个关于如何显示使用此文本约定定义的语法的对象实例的值的提示。如果使用以下语法定义文本约定:对象标识符、IpAddress、Counter32、Counter64或任何枚举语法(位或整数),则不能出现DISPLAY-HINT子句。确定它对其他语法类型是否有意义取决于文本约定的特定定义。

When the syntax has an underlying primitive type of INTEGER, the hint consists of an integer-format specification, containing two parts. The first part is a single character suggesting a display format, either: `x' for hexadecimal, or `d' for decimal, or `o' for octal, or `b' for binary. For all types, when rendering the value, leading zeros are omitted, and for negative values, a minus sign is rendered immediately before the digits. The second part is always omitted for `x', `o' and `b', and need not be present for `d'. If present, the second part starts with a hyphen and is followed by a decimal number, which defines the implied decimal point when rendering the value. For example:

当语法的基础基元类型为INTEGER时,提示由INTEGER格式规范组成,包含两部分。第一部分是表示显示格式的单个字符:十六进制为'x',十进制为'd',八进制为'o',二进制为'b'。对于所有类型,在呈现值时,前导零将被忽略,对于负值,负号将在数字之前呈现。第二部分对于'x'、'o'和'b'总是被省略,对于'd'不必出现。如果存在,则第二部分以连字符开头,后面是一个十进制数,它定义了呈现值时隐含的小数点。例如:

        Hundredths ::= TEXTUAL-CONVENTION
            DISPLAY-HINT "d-2"
            ...
            SYNTAX     INTEGER (0..10000)
        
        Hundredths ::= TEXTUAL-CONVENTION
            DISPLAY-HINT "d-2"
            ...
            SYNTAX     INTEGER (0..10000)
        

suggests that a Hundredths value of 1234 be rendered as "12.34"

建议将1234的百分之一值表示为“12.34”

When the syntax has an underlying primitive type of OCTET STRING, the hint consists of one or more octet-format specifications. Each specification consists of five parts, with each part using and removing zero or more of the next octets from the value and producing the next zero or more characters to be displayed. The octets within the value are processed in order of significance, most significant first.

当语法具有八进制字符串的基本基元类型时,提示由一个或多个八进制格式规范组成。每个规范由五个部分组成,每个部分使用并从值中删除零个或多个下一个八位字节,并生成下一个要显示的零个或多个字符。值内的八位字节按显著性顺序处理,最显著的排在第一位。

The five parts of a octet-format specification are:

八位字节格式规范的五个部分是:

(1) the (optional) repeat indicator; if present, this part is a `*', and indicates that the current octet of the value is to be used as the repeat count. The repeat count is an unsigned integer (which may be zero) which specifies how many times the remainder of this octet-format specification should be successively applied. If the repeat indicator is not present, the repeat count is one.

(1) (可选)重复指示器;如果存在,则此部分为“*”,并指示值的当前八位字节将用作重复计数。重复计数是一个无符号整数(可以是零),它指定应连续应用此八位字节格式规范剩余部分的次数。如果重复指示器不存在,则重复计数为1。

(2) the octet length: one or more decimal digits specifying the number of octets of the value to be used and formatted by this octet-specification. Note that the octet length can be zero. If less than this number of octets remain in the value, then the lesser number of octets are used.

(2) 八位字节长度:一个或多个十进制数字,指定要使用的值的八位字节数,并按此八位字节规范进行格式化。请注意,八位字节长度可以为零。如果值中保留的八位字节数少于此数,则使用较少的八位字节数。

(3) the display format, either: `x' for hexadecimal, `d' for decimal, `o' for octal, `a' for ascii, or `t' for UTF-8. If the octet length part is greater than one, and the display format part refers to a numeric format, then network-byte ordering (big-endian encoding) is used interpreting the octets in the value. The octets processed by the `t' display format do not necessarily form an integral number of UTF-8 characters. Trailing octets which do not form a valid UTF-8 encoded character are discarded.

(3) 显示格式为:十六进制为'x',十进制为'd',八进制为'o',ascii为'a',UTF-8为't'。如果八位字节长度部分大于1,且显示格式部分指的是数字格式,则使用网络字节排序(大端编码)解释值中的八位字节。“t”显示格式处理的八位字节不一定构成整数个UTF-8字符。不构成有效UTF-8编码字符的尾随八位字节将被丢弃。

(4) the (optional) display separator character; if present, this part is a single character which is produced for display after each application of this octet-specification; however, this character is not produced for display if it would be immediately followed by the display of the repeat terminator character for this octet-specification. This character can be any character other than a decimal digit and a `*'.

(4) (可选)显示分隔符字符;如果存在,则该部分为单个字符,在每次应用本八位字节规范后生成以供显示;但是,如果该字符后面紧接着显示该八位字节规范的重复终止符字符,则不会生成该字符进行显示。此字符可以是除十进制数字和“*”以外的任何字符。

(5) the (optional) repeat terminator character, which can be present only if the display separator character is present and this octet-specification begins with a repeat indicator; if present, this part is a single character which is produced after all the zero or more repeated applications (as given by the repeat count) of this octet-specification. This character can be any character other than a decimal digit and a `*'.

(5) (可选)重复终止符字符,仅当显示分隔符字符存在且该八位字节规范以重复指示符开始时,该字符才能出现;如果存在,则该部分是在本八位字节规范的所有零次或多次重复应用(如重复计数所示)之后产生的单个字符。此字符可以是除十进制数字和“*”以外的任何字符。

Output of a display separator character or a repeat terminator character is suppressed if it would occur as the last character of the display.

如果显示分隔符字符或重复终止符字符将作为显示的最后一个字符出现,则会抑制其输出。

If the octets of the value are exhausted before all the octet-format specification have been used, then the excess specifications are ignored. If additional octets remain in the value after interpreting all the octet-format specifications, then the last octet-format specification is re-interpreted to process the additional octets, until no octets remain in the value.

如果在使用所有八位字节格式规范之前耗尽了值的八位字节,则忽略多余的规范。如果在解释所有八位字节格式规范后,值中仍保留其他八位字节,则将重新解释最后一个八位字节格式规范,以处理其他八位字节,直到值中不保留任何八位字节。

3.2. Mapping of the STATUS clause
3.2. 状态子句的映射

The STATUS clause, which must be present, indicates whether this definition is current or historic.

STATUS子句(必须存在)指示此定义是当前定义还是历史定义。

The value "current" means that the definition is current and valid.

值“current”表示该定义是当前有效的。

The value "obsolete" means the definition is obsolete and should not be implemented and/or can be removed if previously implemented. While the value "deprecated" also indicates an obsolete definition, it permits new/continued implementation in order to foster interoperability with older/existing implementations.

值“过时”表示该定义已过时,不应实施和/或在以前实施的情况下可以删除。虽然值“deprecated”也表示过时的定义,但它允许新的/继续的实现,以促进与旧的/现有的实现的互操作性。

3.3. Mapping of the DESCRIPTION clause
3.3. 描述子句的映射

The DESCRIPTION clause, which must be present, contains a textual definition of the textual convention, which provides all semantic definitions necessary for implementation, and should embody any information which would otherwise be communicated in any ASN.1 commentary annotations associated with the object.

描述条款(必须存在)包含文本约定的文本定义,该文本约定提供了实施所需的所有语义定义,并应包含否则将在与对象相关的任何ASN.1注释中传达的任何信息。

3.4. Mapping of the REFERENCE clause
3.4. 引用子句的映射

The REFERENCE clause, which need not be present, contains a textual cross-reference to some other document, either another information module which defines a related assignment, or some other document which provides additional information relevant to this definition.

REFERENCE子句不需要出现,它包含对其他文档的文本交叉引用,或者是对定义相关分配的其他信息模块的文本交叉引用,或者是对提供与此定义相关的附加信息的其他文档的文本交叉引用。

3.5. Mapping of the SYNTAX clause
3.5. 语法子句的映射

The SYNTAX clause, which must be present, defines abstract data structure corresponding to the textual convention. The data structure must be one of the alternatives defined in the ObjectSyntax CHOICE or the BITS construct (see section 7.1 in [2]). Note that this means that the SYNTAX clause of a Textual Convention can not refer to a previously defined Textual Convention.

必须存在的SYNTAX子句定义了与文本约定相对应的抽象数据结构。数据结构必须是ObjectSyntax选择或BITS构造中定义的备选方案之一(见[2]第7.1节)。注意,这意味着文本约定的语法子句不能引用以前定义的文本约定。

An extended subset of the full capabilities of ASN.1 (1988) sub-typing is allowed, as appropriate to the underlying ASN.1 type. Any such restriction on size, range or enumerations specified in this clause represents the maximal level of support which makes "protocol sense". Restrictions on sub-typing are specified in detail in Section 9 and Appendix A of [2].

ASN.1(1988)子类型的完整功能的扩展子集是允许的,适用于基础ASN.1类型。本条款中规定的对大小、范围或枚举数的任何此类限制表示具有“协议意义”的最大支持级别。[2]第9节和附录A详细规定了子类型的限制。

4. Sub-typing of Textual Conventions
4. 文本约定的子类型

The SYNTAX clause of a TEXTUAL CONVENTION macro may be sub-typed in the same way as the SYNTAX clause of an OBJECT-TYPE macro (see section 11 of [2]).

文本约定宏的语法子句可以采用与对象类型宏的语法子句相同的方式进行子类型化(参见[2]第11节)。

5. Revising a Textual Convention Definition
5. 修订文本约定定义

It may be desirable to revise the definition of a textual convention after experience is gained with it. However, changes are not allowed if they have any potential to cause interoperability problems "over

在获得经验后,可能需要修订文本惯例的定义。但是,如果更改有可能导致“过多”的互操作性问题,则不允许进行更改

the wire" between an implementation using an original specification and an implementation using an updated specification(s). Such changes can only be accommodated by defining a new textual convention (i.e., a new name).

使用原始规范的实现与使用更新规范的实现之间的“连线”。只有通过定义新的文本约定(即新名称),才能适应此类更改。

The following revisions are allowed:

允许进行以下修订:

(1) A SYNTAX clause containing an enumerated INTEGER may have new enumerations added or existing labels changed. Similarly, named bits may be added or existing labels changed for the BITS construct.

(1) 包含枚举整数的语法子句可能会添加新枚举或更改现有标签。类似地,可以为bits构造添加命名位或更改现有标签。

(2) A STATUS clause value of "current" may be revised as "deprecated" or "obsolete". Similarly, a STATUS clause value of "deprecated" may be revised as "obsolete". When making such a change, the DESCRIPTION clause should be updated to explain the rationale.

(2) 状态子句值“current”可以修改为“deprecated”或“过时”。同样,状态子句值“不推荐”也可以修改为“过时”。进行此类更改时,应更新描述条款,以解释基本原理。

(3) A REFERENCE clause may be added or updated.

(3) 可以添加或更新引用子句。

(4) A DISPLAY-HINTS clause may be added or updated.

(4) 可以添加或更新DISPLAY-HINTS子句。

(5) Clarifications and additional information may be included in the DESCRIPTION clause.

(5) 说明条款中可能包含澄清和附加信息。

(6) Any editorial change.

(6) 任何编辑上的改动。

Note that with the introduction of the TEXTUAL-CONVENTION macro, there is no longer any need to define types in the following manner:

请注意,随着text-CONVENTION宏的引入,不再需要以以下方式定义类型:

        DisplayString ::= OCTET STRING (SIZE (0..255))
        
        DisplayString ::= OCTET STRING (SIZE (0..255))
        

When revising an information module containing a definition such as this, that definition should be replaced by a TEXTUAL-CONVENTION macro.

修改包含此类定义的信息模块时,该定义应替换为文本约定宏。

6. Security Considerations
6. 安全考虑

This document defines the means to define new data types for the language used to write and read descriptions of management information. These data types have no security impact on the Internet.

本文档定义了为用于写入和读取管理信息描述的语言定义新数据类型的方法。这些数据类型对Internet没有安全影响。

7. Editors' Addresses
7. 编辑地址

Keith McCloghrie Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA Phone: +1 408 526 5260 EMail: kzm@cisco.com

Keith McCloghrie Cisco Systems,Inc.美国加利福尼亚州圣何塞西塔斯曼大道170号95134-1706电话:+1 408 526 5260电子邮件:kzm@cisco.com

David Perkins SNMPinfo 3763 Benton Street Santa Clara, CA 95051 USA Phone: +1 408 221-8702 EMail: dperkins@snmpinfo.com

David Perkins SNMPinfo 3763 Benton Street Santa Clara,CA 95051美国电话:+1 408 221-8702电子邮件:dperkins@snmpinfo.com

Juergen Schoenwaelder TU Braunschweig Bueltenweg 74/75 38106 Braunschweig Germany Phone: +49 531 391-3283 EMail: schoenw@ibr.cs.tu-bs.de

Juergen Schoenwaelder TU Braunchweig Bueltenweg 74/75 38106 Braunchweig Germany电话:+49 531 391-3283电子邮件:schoenw@ibr.cs.tu-理学士

8. References
8. 工具书类

[1] Information processing systems - Open Systems Interconnection - Specification of Abstract Syntax Notation One (ASN.1), International Organization for Standardization. International Standard 8824, (December, 1987).

[1] 信息处理系统.开放系统互连.国际标准化组织抽象语法符号1(ASN.1)规范。国际标准8824(1987年12月)。

[2] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Structure of Management Information Version 2 (SMIv2)", STD 58, RFC 2578, April 1999.

[2] McCloghrie,K.,Perkins,D.,Schoenwaeld,J.,Case,J.,Rose,M.和S.Waldbusser,“管理信息的结构版本2(SMIv2)”,STD 58,RFC 2578,1999年4月。

[3] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and Waldbusser, S., "Transport Mappings for Version 2 of the" Simple Network Management Protocol (SNMPv2)", RFC 1906, January 1996.

[3] SNMPv2工作组,Case,J.,McCloghrie,K.,Rose,M.和Waldbusser,S.,“简单网络管理协议(SNMPv2)”版本2的传输映射”,RFC 1906,1996年1月。

9. Full Copyright Statement
9. 完整版权声明

Copyright (C) The Internet Society (1999). All Rights Reserved.

版权所有(C)互联网协会(1999年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。”