Lines Matching refs:session

22 $session = new SNMP(SNMP::VERSION_1, $hostname, $community, $timeout, $retries);
23 $session->valueretrieval = SNMP_VALUE_LIBRARY;
24 var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
25 var_dump($session->get(array('.1.3.6.1.2.1.1.1.0', '.1.3.6.1.2.1.1.3.0')));
26 var_dump($session->getnext('.1.3.6.1.2.1.1.1.0'));
27 var_dump($session->close());
30 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
31 var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
32 var_dump($session->getnext('.1.3.6.1.2.1.1.1.0'));
33 var_dump($session->close());
36 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
38 $result = $session->get($orig, TRUE);
42 var_dump($session->close());
45 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
46 $z = $session->walk('.1.3.6.1.2.1.1');
51 var_dump($session->close());
54 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
55 $z = $session->walk('.1.3.6.1.2.1.1', FALSE, 30);
60 var_dump($session->close());
63 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
64 $z = $session->walk('.1.3.6.1.2.1.1', FALSE, 30, 0);
69 var_dump($session->close());
72 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
73 $session->max_oids = 30;
74 $z = $session->walk('.1.3.6.1.2.1.1');
79 var_dump($session->close());
82 $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
83 $z = $session->walk('.1.3.6.1.2.1.1', TRUE);
95 var_dump($session->close());
98 $session = new SNMP(SNMP::VERSION_3, $hostname, $user_noauth, $timeout, $retries);
99 #$session->setSecurity($user_noauth, 'noAuthNoPriv', '', '', '', '', '', '');
100 var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
101 var_dump($session->getnext('.1.3.6.1.2.1.1.1.0'));
102 var_dump($session->close());
105 $session = new SNMP(SNMP::VERSION_3, $hostname, $user_noauth, $timeout, $retries);
106 $session->setSecurity('noAuthNoPriv');
107 var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
108 var_dump($session->getnext('.1.3.6.1.2.1.1.1.0'));
109 var_dump($session->close());
112 $session = new SNMP(SNMP::VERSION_3, $hostname, $rwuser, $timeout, $retries);
113 $session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass);
114 var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
115 var_dump($session->getnext('.1.3.6.1.2.1.1.1.0'));
116 var_dump($session->walk('.1.3.6.1.2.1.1.1.0'));
117 var_dump($session->close());
120 $session = new SNMP(SNMP::VERSION_3, $hostname, $rwuser, $timeout, $retries);
121 $session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass);
123 $oldvalue1 = $session->get($oid1);
126 $z = $session->set($oid1, 's', $newvalue1);
128 var_dump(($session->get($oid1) === $newvalue1));
129 $z = $session->set($oid1, 's', $oldvalue1);
131 var_dump(($session->get($oid1) === $oldvalue1));
132 var_dump($session->close());
136 $session = new SNMP(SNMP::VERSION_3, $hostname, $rwuser, $timeout, $retries);
137 $session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass);
138 $session->max_oids = 1;
139 $oldvalue2 = $session->get($oid2);
141 $z = $session->set(array($oid1, $oid2), array('s','s'), array($newvalue1, $newvalue2));
143 var_dump(($session->get($oid1) === $newvalue1));
144 var_dump(($session->get($oid2) === $newvalue2));
145 $z = $session->set(array($oid1, $oid2), array('s','s'), array($oldvalue1, $oldvalue2));
147 var_dump(($session->get($oid1) === $oldvalue1));
148 var_dump(($session->get($oid2) === $oldvalue2));
149 var_dump($session->close());
152 $session = new SNMP(SNMP::VERSION_3, $hostname, $rwuser, $timeout, $retries);
153 $session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '', 'aeeeff');
154 var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
155 var_dump($session->close());