phpday 2027 - Call for Papers

The Snmp\Mib Enum

(PHP 8 >= 8.6.0)

Introduction

The Snmp\Mib enum lists the options that control how the Net-SNMP library parses MIB files. They are set with snmp_set_mib_option(), and allow reading MIB files that do not strictly follow the SMI syntax.

Enum synopsis

namespace Snmp;
enum Mib
{
case AllowUnderscores ; // Allow the underscore character (_) in MIB object names and other symbols. This is not valid SMI syntax, but some vendor MIB files use it. Corresponds to the -Pu command-line option and the mibAllowUnderline configuration token of Net-SNMP.

case CommentTerm ; // Make every comment extend to the end of the line. Strictly speaking, a second -- on the same line ends a comment, which is the default behaviour, but this breaks some MIB files. Corresponds to the -Pc command-line option and the commentToEOL configuration token of Net-SNMP.

case Replace ; // If the same MIB object (parent name and sub-identifier) is defined more than once, use the definition that was read last. By default, the first definition is used, and later ones are discarded. Corresponds to the -PR command-line option and the mibReplaceWithLatest configuration token of Net-SNMP.

}
+add a note

User Contributed Notes

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