snmpget

snmpget -- Fetch an SNMP object

Description

int snmpget(string hostname, string community, string object_id);

Returns SNMP object value on success and false on error.

The snmpget() function is used to read the value of an SNMP object specified by the object_id. SNMP agent is specified by the hostname and the read community is specified by the community parameter.

snmpget("127.0.0.1", "public", "system.SysContact.0")