Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

//set it to something else
snmpset("ucd-snmp.ucdavis.edu",
"demopublic", "ucdDemoPublicString.0",
"s", "Core PHP Programming");


//see current value of the demo string
$snmp = snmpget("ucd-snmp.ucdavis.edu",
"demopublic", "ucdDemoPublicString.0");
print("$snmp (new value)
\n");
?>


snmprealwalk


This function is an alias to snmpwalk.


array snmpwalk(string host, string community, string object,
integer timeout, integer retries)


The snmpwalk function returns an array of all objects in the tree that starts at the
specified object. You can use an empty string for the object parameter to get all
objects. Optionally, you may supply a timeout in seconds and a number of times to retry a
connection.


Table 14.12. SNMP Types
Type Description

a IP Address
d Decimal String
i Integer
o Object ID
s String
t Time Ticks
u Unsigned Integer


x Hex String
D Double
F Float
I Signed 64-bit Integer
U Unsigned 64-bit Integer


<?


//get all the SNMP objects
$snmp = snmpwalk("ucd-snmp.ucdavis.edu",
"demopublic", "");

Free download pdf