phpday 2027 - Call for Papers

snmp_set_mib_option

(PHP 8 >= 8.6.0)

snmp_set_mib_option — Set an option for parsing MIB files

Açıklama

function snmp_set_mib_option(Snmp\Mib $option, bool $enable): void

Enables or disables an option that controls how the Net-SNMP library parses MIB files. These options make it possible to read MIB files that do not strictly follow the SMI syntax.

The options apply to the MIB files that are read afterwards: with snmp_read_mib(), when the MIB tree is loaded again by snmp_init_mib(), or when a module is loaded automatically from the MIB directories.

Bağımsız Değişkenler

option

The option to set. See Snmp\Mib for the available options.

enable

Whether to enable the option.

Dönen Değerler

Hiçbir değer dönmez.

Örnekler

Örnek 1 Reading a MIB file that uses underscores in names

<?php

snmp_set_mib_option(Snmp\Mib::AllowUnderscores, true);
snmp_read_mib('/usr/share/snmp/mibs/VENDOR-MIB.txt');

?>

Ayrıca Bakınız

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top