SNMP MIB Table complex data object

不羁岁月 提交于 2019-12-24 12:37:11

问题


Can a table entry include a complex data object? For example can a table entry look like this?

ExampleTableEntry ::=
    SEQUENCE {
        simpleDataObject1         INTEGER,
        complexDataObject2        ComplexType,
        SimpleDataObject3         TruthValue
    }

ComplexType  OBJECT-IDENTITY    
    STATUS current
    DESCRIPTION
      " What ever "
    ::= { parent 1 }

subObject1 OBJECT-TYPE                        
    SYNTAX   DisplayString (SIZE (0..255))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
            " Diameter peer's host name. Reference: RFC 3588 "
    ::= { ComplexType 1 }

subObject2 OBJECT-TYPE                       
    SYNTAX   Integer32
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
            "  "
    ::= { ComplexType 2 }

Can the ComplexType be defined through a Textual convention or as an Object Identity? Object Group?

If not, am I forced to add the sub objects to the parent table entry?

Thanks for your comments.


回答1:


This is something strictly defined in SNMP RFC documents, such as

http://tools.ietf.org/html/rfc2578#page-25

As the <syntax> part must be of SYNTAX clause format, it cannot be the thing you imagined.

In your case, you either define more objects in the sequence, or write a secondary table to accompany.



来源:https://stackoverflow.com/questions/22821495/snmp-mib-table-complex-data-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!