问题
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