根据我的理解:
ASN.1具有广泛的使用范围,SMI是ASN.1的子集,专门用于SNMP。
它是否正确? 如果没有,有什么区别?
From my understanding:
ASN.1 has a wide area of use, and SMI is a subset of ASN.1 which is used specifically in SNMP.
Is this correct? If not, what is the difference?
最满意答案
ASN.1是标准化的表示法。 从RFC 2578开始,似乎SMI使用了这种符号,就像我目前使用英语语法来构造这些句子一样。 例如,在第2节中,他们给出:
SNMPv2-SMI DEFINITIONS ::= BEGIN -- the path to the root org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1本文遵循用于定义ASN.1模块(“SNMPv2-SMI”)的ASN.1语法,模块中的第一个定义是具有特定ASN.1类型的ASN.1值(“org”)(“对象标识符“)。
此外,RFC 2578对可能使用的ASN.1表示法进行了限制。 例如,在3.1中,它们将ASN.1标识符限制为使用连字符,否则将允许使用连字符。 这就像说在StackOverflow帖子中,我们将根据英语语法使用句子,但不允许使用过去时的句子。
附注:RFC 2578使用ASN.1 1988.存在较新版本的ASN.1标准,并且消除了1988标准中的一些符号(特别是宏)。
ASN.1 is standardized notation. From RFC 2578, it appears that SMI uses that notation, much as I am presently using the English grammar to construct these sentences. For example, in section 2, they give:
SNMPv2-SMI DEFINITIONS ::= BEGIN -- the path to the root org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1This text follows the ASN.1 syntax for defining an ASN.1 module ("SNMPv2-SMI"), with the first definition in the module being an ASN.1 value ("org") having a particular ASN.1 type ("OBJECT IDENTIFIER").
Further, RFC 2578 places restrictions on the ASN.1 notation that may be used. As an example, in 3.1 they restrict ASN.1 identifiers from using hyphens, which would otherwise be allowed. This is like saying that in a StackOverflow post, we'll use sentences according to the English grammar, but sentences using the past tense are not allowed.
Side note: RFC 2578 is using ASN.1 1988. Newer versions of the ASN.1 standard exist, and some of the notation from the 1988 standard was eliminated (in particular, macros).
更多推荐
发布评论