snmp.stub.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /** @generate-class-entries */
  3. function snmpget(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
  4. function snmpgetnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
  5. function snmpwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  6. function snmprealwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  7. /** @alias snmprealwalk */
  8. function snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  9. function snmpset(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1): bool {}
  10. function snmp_get_quick_print(): bool {}
  11. function snmp_set_quick_print(bool $enable): bool {}
  12. function snmp_set_enum_print(bool $enable): bool {}
  13. function snmp_set_oid_output_format(int $format): bool {}
  14. /** @alias snmp_set_oid_output_format */
  15. function snmp_set_oid_numeric_print(int $format): bool {}
  16. function snmp2_get(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
  17. function snmp2_getnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
  18. function snmp2_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  19. function snmp2_real_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  20. function snmp2_set(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1): bool {}
  21. function snmp3_get(
  22. string $hostname, string $security_name, string $security_level,
  23. string $auth_protocol, string $auth_passphrase,
  24. string $privacy_protocol, string $privacy_passphrase,
  25. array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
  26. function snmp3_getnext(
  27. string $hostname, string $security_name, string $security_level,
  28. string $auth_protocol, string $auth_passphrase,
  29. string $privacy_protocol, string $privacy_passphrase,
  30. array|string $object_id, int $timeout = -1, int $retries = -1): mixed {}
  31. function snmp3_walk(
  32. string $hostname, string $security_name, string $security_level,
  33. string $auth_protocol, string $auth_passphrase,
  34. string $privacy_protocol, string $privacy_passphrase,
  35. array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  36. function snmp3_real_walk(
  37. string $hostname, string $security_name, string $security_level,
  38. string $auth_protocol, string $auth_passphrase,
  39. string $privacy_protocol, string $privacy_passphrase,
  40. array|string $object_id, int $timeout = -1, int $retries = -1): array|false {}
  41. function snmp3_set(
  42. string $hostname, string $security_name, string $security_level,
  43. string $auth_protocol, string $auth_passphrase,
  44. string $privacy_protocol, string $privacy_passphrase,
  45. array|string $object_id, array|string $type, array|string $value,
  46. int $timeout = -1, int $retries = -1): bool {}
  47. function snmp_set_valueretrieval(int $method): bool {}
  48. function snmp_get_valueretrieval(): int {}
  49. function snmp_read_mib(string $filename): bool {}
  50. class SNMP
  51. {
  52. /** @readonly */
  53. public array $info;
  54. public ?int $max_oids;
  55. public int $valueretrieval;
  56. public bool $quick_print;
  57. public bool $enum_print;
  58. public int $oid_output_format;
  59. public bool $oid_increasing_check;
  60. public int $exceptions_enabled;
  61. public function __construct(int $version, string $hostname, string $community, int $timeout = -1, int $retries = -1) {}
  62. /** @tentative-return-type */
  63. public function close(): bool {}
  64. /** @tentative-return-type */
  65. public function setSecurity(
  66. string $securityLevel, string $authProtocol = "", string $authPassphrase = "",
  67. string $privacyProtocol = "", string $privacyPassphrase = "",
  68. string $contextName = "", string $contextEngineId = ""): bool {}
  69. /** @tentative-return-type */
  70. public function get(array|string $objectId, bool $preserveKeys = false): mixed {}
  71. /** @tentative-return-type */
  72. public function getnext(array|string $objectId): mixed {}
  73. /** @tentative-return-type */
  74. public function walk(array|string $objectId, bool $suffixAsKey = false, int $maxRepetitions = -1, int $nonRepeaters = -1): array|false {}
  75. /** @tentative-return-type */
  76. public function set(array|string $objectId, array|string $type, array|string $value): bool {}
  77. /** @tentative-return-type */
  78. public function getErrno(): int {}
  79. /** @tentative-return-type */
  80. public function getError(): string {}
  81. }
  82. class SNMPException extends RuntimeException
  83. {
  84. }