(PHP 8 >= 8.6.0)
snmp_set_mib_option — Set an option for parsing MIB files
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.
optionThe option to set. See Snmp\Mib for the available options.
enableWhether to enable the option.
値を返しません。
例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');
?>