Pike v8.1 release 6

Method Protocols.SNMP.protocol()->trap()


Method trap

int trap(mapping varlist, string oid, int type, int spectype, int ticks, string|void locip, string|void remaddr, int|void remport)

Description

send an SNMP-v1 trap

Parameter varlist

a mapping of OIDs to include in trap

oid1 : array
Array
string type

data type such as tick, oid, gauge, etc

mixed data

data to return for oid1

oid2 : array
Array
string type

data type such as tick, oid, gauge, etc

mixed data

data to return for oid2

oidn : array
Array
string type

data type such as tick, oid, gauge, etc

mixed data

data to return for oidn

Parameter oid
Parameter type

generic trap-type

Parameter spectype

specific trap-type

Parameter ticks

uptime

Parameter locip

originating ip address of the trap

Parameter remaddr
Parameter remport

address and UDP to send trap to

Returns

request id