This function takes the values from sysObjectOID, sysService, and ipForwarding MIB variables of an agent and determines what services the SNMP agent supports. For example, Router/Switch/Repeater/Host could be a supported service, as defined in the SNMP MIB RFC 1213.
The return from the function is evaluated as follows because custom device types have high precedence over system ones:
Syntax
This function has the following format:
DeviceService[] snmpSvcs(ObjectID sysObjectID, Integer sysServices, Integer ipForwarding)
Parameters
The object ID value to parse.
An integer where each bit represents a different service, such as switch/repeater/host.
An integer indicating whether this entity is acting as an IP gateway or IP host regarding the forwarding of datagrams. This entity receives the forwarded datagrams, but the forwarded datagrams are not addressed to this entity. Possible values are 1 (Forwarding) and 2 (notForwarding).
Return Values
Returns a list of one or more of the following device services:
Example
The following expression produces the following result for a sysServices value of 8, an ipForwarding value of 0, and sysObjectID not found in the DeviceTypes file:
Expression:
snmpSvcs(sysObjectOID,sysServices,ipForwarding)
Result:
DeviceService[HOST]
Advanced Example
The following expression is taken from the "System Statistics" Vendor Certification:
Services=snmpSvcs(sysObjectID,isdef(sysServices)?sysServices:0,isdef(ipForwarding)?ipForwarding:0)
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|