note 78909 added to ref.snmp
| From: | Chris at osu1 dot php dot net | Date: | Thu, 01 Nov 2007 21:50:17 +0000 |
| Subject: | note 78909 added to ref.snmp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131922@lists.php.net to get a copy of this message | ||
Here's a fresh list of API for SNMPv1, SNMPv2c, and SNMPv3 as of PHP 5.2.4:
SNMPv1
------
string snmpget(string host, string community, string object_id [, int timeout [, int retries]]);
string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]]);
array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]]);
array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]]);
bool snmp_get_quick_print(void);
void snmp_set_quick_print(int quick_print);
void snmp_set_enum_print(int enum_print);
void snmp_set_oid_output_format(int oid_format);
int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout
[, int retries]]);
SNMPv2c
-------
string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]]);
string snmp2_getnext(string host, string community, string object_id [, int timeout [, int
retries]]);
array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]]);
array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int
retries]]);
int snmp2_set(string host, string community, string object_id, string type, mixed value [, int
timeout [, int retries]]);
SNMPv3
------
int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string
auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [,
int retries]]);
int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string
auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [,
int retries]]);
int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string
auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [,
int retries]]);
int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string
auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [,
int retries]]);
int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string
auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed
value [, int timeout [, int retries]]);
General
-------
int snmp_set_valueretrieval(int method);
int snmp_get_valueretrieval();
int snmp_read_mib(string filename);
SNMPv3 options
--------------
SNMPv3 offers a different authentication/authorization scheme than previous versions of SNMP. To
aid in using the API listed above, here is a brief explanation of each of the unique parameters used
in the snmp3_* functions.
$sec_name - the "username" used for authentication to the system
$sec_level - the authentication scheme ('noAuthNoPriv', 'authNoPriv', or
'authPriv')
$auth_protocol - the encryption protocol used for authentication ('MD5' [default] or
'SHA')
$auth_passphrase - the encrypted key to use as the authentication challenge
$priv_protocol - the encryption protocol used for protecting the protocol data unit ('DES'
[default], 'AES128', 'AES192', or 'AES256')
$priv_passphrase - the key to use for encrypting the protocol data unit
There are good code snippets available on http://forums.cacti.net/about5403.html for more
information.
----
Server IP: 64.71.164.2
Probable Submitter: 198.144.198.66
----
Manual Page -- http://www.php.net/manual/en/ref.snmp.php
Edit -- https://master.php.net/note/edit/78909
Del: integrated -- https://master.php.net/note/delete/78909/integrated
Del: useless -- https://master.php.net/note/delete/78909/useless
Del: bad code -- https://master.php.net/note/delete/78909/bad+code
Del: spam -- https://master.php.net/note/delete/78909/spam
Del: non-english -- https://master.php.net/note/delete/78909/non-english
Del: in docs -- https://master.php.net/note/delete/78909/in+docs
Del: other reasons-- https://master.php.net/note/delete/78909
Reject -- https://master.php.net/note/reject/78909
Search -- https://master.php.net/manage/user-notes.php