1<?php 2 3/** @generate-class-entries */ 4 5/** 6 * @var int 7 * @cvalue NETSNMP_OID_OUTPUT_SUFFIX 8 */ 9const SNMP_OID_OUTPUT_SUFFIX = UNKNOWN; 10/** 11 * @var int 12 * @cvalue NETSNMP_OID_OUTPUT_MODULE 13 */ 14const SNMP_OID_OUTPUT_MODULE = UNKNOWN; 15/** 16 * @var int 17 * @cvalue NETSNMP_OID_OUTPUT_FULL 18 */ 19const SNMP_OID_OUTPUT_FULL = UNKNOWN; 20/** 21 * @var int 22 * @cvalue NETSNMP_OID_OUTPUT_NUMERIC 23 */ 24const SNMP_OID_OUTPUT_NUMERIC = UNKNOWN; 25/** 26 * @var int 27 * @cvalue NETSNMP_OID_OUTPUT_UCD 28 */ 29const SNMP_OID_OUTPUT_UCD = UNKNOWN; 30/** 31 * @var int 32 * @cvalue NETSNMP_OID_OUTPUT_NONE 33 */ 34const SNMP_OID_OUTPUT_NONE = UNKNOWN; 35 36/** 37 * @var int 38 * @cvalue SNMP_VALUE_LIBRARY 39 */ 40const SNMP_VALUE_LIBRARY = UNKNOWN; 41/** 42 * @var int 43 * @cvalue SNMP_VALUE_PLAIN 44 */ 45const SNMP_VALUE_PLAIN = UNKNOWN; 46/** 47 * @var int 48 * @cvalue SNMP_VALUE_OBJECT 49 */ 50const SNMP_VALUE_OBJECT = UNKNOWN; 51 52/** 53 * @var int 54 * @cvalue ASN_BIT_STR 55 */ 56const SNMP_BIT_STR = UNKNOWN; 57/** 58 * @var int 59 * @cvalue ASN_OCTET_STR 60 */ 61const SNMP_OCTET_STR = UNKNOWN; 62/** 63 * @var int 64 * @cvalue ASN_OPAQUE 65 */ 66const SNMP_OPAQUE = UNKNOWN; 67/** 68 * @var int 69 * @cvalue ASN_NULL 70 */ 71const SNMP_NULL = UNKNOWN; 72/** 73 * @var int 74 * @cvalue ASN_OBJECT_ID 75 */ 76const SNMP_OBJECT_ID = UNKNOWN; 77/** 78 * @var int 79 * @cvalue ASN_IPADDRESS 80 */ 81const SNMP_IPADDRESS = UNKNOWN; 82/** 83 * @var int 84 * @cvalue ASN_GAUGE 85 */ 86const SNMP_COUNTER = UNKNOWN; 87/** 88 * @var int 89 * @cvalue ASN_UNSIGNED 90 */ 91const SNMP_UNSIGNED = UNKNOWN; 92/** 93 * @var int 94 * @cvalue ASN_TIMETICKS 95 */ 96const SNMP_TIMETICKS = UNKNOWN; 97/** 98 * @var int 99 * @cvalue ASN_UINTEGER 100 */ 101const SNMP_UINTEGER = UNKNOWN; 102/** 103 * @var int 104 * @cvalue ASN_INTEGER 105 */ 106const SNMP_INTEGER = UNKNOWN; 107/** 108 * @var int 109 * @cvalue ASN_COUNTER64 110 */ 111const SNMP_COUNTER64 = UNKNOWN; 112 113function snmpget(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} 114 115function snmpgetnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} 116 117function snmpwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 118 119function snmprealwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 120 121/** @alias snmprealwalk */ 122function snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 123 124function snmpset(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1): bool {} 125 126function snmp_get_quick_print(): bool {} 127 128function snmp_set_quick_print(bool $enable): true {} 129 130function snmp_set_enum_print(bool $enable): true {} 131 132function snmp_set_oid_output_format(int $format): true {} 133 134/** @alias snmp_set_oid_output_format */ 135function snmp_set_oid_numeric_print(int $format): true {} 136 137function snmp2_get(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} 138 139function snmp2_getnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} 140 141function snmp2_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 142 143function snmp2_real_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 144 145function snmp2_set(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1): bool {} 146 147function snmp3_get( 148 string $hostname, string $security_name, string $security_level, 149 string $auth_protocol, string $auth_passphrase, 150 string $privacy_protocol, string $privacy_passphrase, 151 array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} 152 153function snmp3_getnext( 154 string $hostname, string $security_name, string $security_level, 155 string $auth_protocol, string $auth_passphrase, 156 string $privacy_protocol, string $privacy_passphrase, 157 array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} 158 159function snmp3_walk( 160 string $hostname, string $security_name, string $security_level, 161 string $auth_protocol, string $auth_passphrase, 162 string $privacy_protocol, string $privacy_passphrase, 163 array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 164 165function snmp3_real_walk( 166 string $hostname, string $security_name, string $security_level, 167 string $auth_protocol, string $auth_passphrase, 168 string $privacy_protocol, string $privacy_passphrase, 169 array|string $object_id, int $timeout = -1, int $retries = -1): array|false {} 170 171function snmp3_set( 172 string $hostname, string $security_name, string $security_level, 173 string $auth_protocol, string $auth_passphrase, 174 string $privacy_protocol, string $privacy_passphrase, 175 array|string $object_id, array|string $type, array|string $value, 176 int $timeout = -1, int $retries = -1): bool {} 177 178function snmp_set_valueretrieval(int $method): true {} 179 180function snmp_get_valueretrieval(): int {} 181 182function snmp_read_mib(string $filename): bool {} 183 184class SNMP 185{ 186 /** @cvalue SNMP_VERSION_1 */ 187 public const int VERSION_1 = UNKNOWN; 188 /** @cvalue SNMP_VERSION_2c */ 189 public const int VERSION_2c = UNKNOWN; 190 /** @cvalue SNMP_VERSION_2c */ 191 public const int VERSION_2C = UNKNOWN; 192 /** @cvalue SNMP_VERSION_3 */ 193 public const int VERSION_3 = UNKNOWN; 194 195 /** @cvalue PHP_SNMP_ERRNO_NOERROR */ 196 public const int ERRNO_NOERROR = UNKNOWN; 197 /** @cvalue PHP_SNMP_ERRNO_ANY */ 198 public const int ERRNO_ANY = UNKNOWN; 199 /** @cvalue PHP_SNMP_ERRNO_GENERIC */ 200 public const int ERRNO_GENERIC = UNKNOWN; 201 /** @cvalue PHP_SNMP_ERRNO_TIMEOUT */ 202 public const int ERRNO_TIMEOUT = UNKNOWN; 203 /** @cvalue PHP_SNMP_ERRNO_ERROR_IN_REPLY */ 204 public const int ERRNO_ERROR_IN_REPLY = UNKNOWN; 205 /** @cvalue PHP_SNMP_ERRNO_OID_NOT_INCREASING */ 206 public const int ERRNO_OID_NOT_INCREASING = UNKNOWN; 207 /** @cvalue PHP_SNMP_ERRNO_OID_PARSING_ERROR */ 208 public const int ERRNO_OID_PARSING_ERROR = UNKNOWN; 209 /** @cvalue PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES */ 210 public const int ERRNO_MULTIPLE_SET_QUERIES = UNKNOWN; 211 212 /** @readonly */ 213 public array $info; 214 public ?int $max_oids; 215 public int $valueretrieval; 216 public bool $quick_print; 217 public bool $enum_print; 218 public int $oid_output_format; 219 public bool $oid_increasing_check; 220 public int $exceptions_enabled; 221 222 public function __construct(int $version, string $hostname, string $community, int $timeout = -1, int $retries = -1) {} 223 224 /** @tentative-return-type */ 225 public function close(): bool {} 226 227 /** @tentative-return-type */ 228 public function setSecurity( 229 string $securityLevel, string $authProtocol = "", string $authPassphrase = "", 230 string $privacyProtocol = "", string $privacyPassphrase = "", 231 string $contextName = "", string $contextEngineId = ""): bool {} 232 233 /** @tentative-return-type */ 234 public function get(array|string $objectId, bool $preserveKeys = false): mixed {} 235 236 /** @tentative-return-type */ 237 public function getnext(array|string $objectId): mixed {} 238 239 /** @tentative-return-type */ 240 public function walk(array|string $objectId, bool $suffixAsKey = false, int $maxRepetitions = -1, int $nonRepeaters = -1): array|false {} 241 242 /** @tentative-return-type */ 243 public function set(array|string $objectId, array|string $type, array|string $value): bool {} 244 245 /** @tentative-return-type */ 246 public function getErrno(): int {} 247 248 /** @tentative-return-type */ 249 public function getError(): string {} 250} 251 252class SNMPException extends RuntimeException 253{ 254} 255