xref: /PHP-8.0/ext/snmp/snmp.stub.php (revision 15ec7404)
1<?php
2
3/** @generate-function-entries */
4
5function snmpget(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
6
7function snmpgetnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
8
9function snmpwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
10
11function snmprealwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
12
13/** @alias snmprealwalk */
14function snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
15
16function snmpset(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1): bool {}
17
18function snmp_get_quick_print(): bool {}
19
20function snmp_set_quick_print(bool $enable): bool {}
21
22function snmp_set_enum_print(bool $enable): bool {}
23
24function snmp_set_oid_output_format(int $format): bool {}
25
26/** @alias snmp_set_oid_output_format */
27function snmp_set_oid_numeric_print(int $format): bool {}
28
29function snmp2_get(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
30
31function snmp2_getnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
32
33function snmp2_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
34
35function snmp2_real_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
36
37function snmp2_set(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1): bool {}
38
39function snmp3_get(
40    string $hostname, string $security_name, string $security_level,
41    string $auth_protocol, string $auth_passphrase,
42    string $privacy_protocol, string $privacy_passphrase,
43    array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
44
45function snmp3_getnext(
46    string $hostname, string $security_name, string $security_level,
47    string $auth_protocol, string $auth_passphrase,
48    string $privacy_protocol, string $privacy_passphrase,
49    array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
50
51function snmp3_walk(
52    string $hostname, string $security_name, string $security_level,
53    string $auth_protocol, string $auth_passphrase,
54    string $privacy_protocol, string $privacy_passphrase,
55    array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
56
57function snmp3_real_walk(
58    string $hostname, string $security_name, string $security_level,
59    string $auth_protocol, string $auth_passphrase,
60    string $privacy_protocol, string $privacy_passphrase,
61    array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
62
63function snmp3_set(
64    string $hostname, string $security_name, string $security_level,
65    string $auth_protocol, string $auth_passphrase,
66    string $privacy_protocol, string $privacy_passphrase,
67    array|string $object_id, array|string $type, array|string $value,
68    int $timeout = -1, int $retries = -1): bool {}
69
70function snmp_set_valueretrieval(int $method): bool {}
71
72function snmp_get_valueretrieval(): int {}
73
74function snmp_read_mib(string $filename): bool {}
75
76class SNMP
77{
78    public function __construct(int $version, string $hostname, string $community, int $timeout = -1, int $retries = -1) {}
79
80    /** @return bool */
81    public function close() {}
82
83    /** @return bool */
84    public function setSecurity(
85        string $securityLevel, string $authProtocol = "", string $authPassphrase = "",
86        string $privacyProtocol = "", string $privacyPassphrase = "",
87        string $contextName = "", string $contextEngineId = "") {}
88
89    /** @return mixed */
90    public function get(array|string $objectId, bool $preserveKeys = false) {}
91
92    /** @return mixed */
93    public function getnext(array|string $objectId) {}
94
95    /** @return array|false */
96    public function walk(array|string $objectId, bool $suffixAsKey = false, int $maxRepetitions = -1, int $nonRepeaters = -1) {}
97
98    /** @return bool */
99    public function set(array|string $objectId, array|string $type, array|string $value) {}
100
101    /** @return int */
102    public function getErrno() {}
103
104    /** @return string */
105    public function getError() {}
106}
107
108class SNMPException extends RuntimeException
109{
110}
111