phpday 2027 - Call for Papers

The Snmp\Output Enum

(PHP 8 >= 8.6.0)

Вступ

The Snmp\Output enum lists the options that control how the Net-SNMP library formats the values and OIDs it returns. They are set with snmp_set_output_option(). Each option can also be set on a single SNMP session with the corresponding property.

Кородкий огляд переліку

namespace Snmp;
enum Output
{
case NumericIndex ; // Print table indexes numerically, instead of trying to interpret them as strings or OIDs. For instance, vacmSecurityModel.0."wes" is printed as vacmSecurityModel.0.3.119.101.115. Corresponds to the -Ob command-line option of Net-SNMP and to the SNMP::$numeric_index property.

case EnumPrint ; // Print enumeration values as numbers only, without their symbolic label. For instance, INTEGER: forwarding(1) is printed as INTEGER: 1. Corresponds to the -Oe command-line option of Net-SNMP, to snmp_set_enum_print() and to the SNMP::$enum_print property.

case EscapeQuotes ; // Escape the quote characters in string table indexes. For instance, vacmSecurityModel.0."wes" is printed as vacmSecurityModel.0.\"wes\". Corresponds to the -OE command-line option of Net-SNMP and to the SNMP::$escape_quotes property.

case QuickPrint ; // Print only the value, without its type. For instance, STRING: router is printed as router. Corresponds to the -Oq command-line option of Net-SNMP, to snmp_set_quick_print() and to the SNMP::$quick_print property.

case NumericTimeticks ; // Print TimeTicks values as raw numbers. For instance, Timeticks: (14096763) 1 day, 15:09:27.63 is printed as 14096763. Corresponds to the -Ot command-line option of Net-SNMP and to the SNMP::$numeric_timeticks property.

case HexText ; // When a value is printed as a hexadecimal string, also print its printable characters. Corresponds to the -OT command-line option of Net-SNMP and to the SNMP::$print_hex_text property.

case DontPrintUnits ; // Do not append the UNITS defined in the MIB to the value. Corresponds to the -OU command-line option of Net-SNMP and to the SNMP::$dont_print_units property.

case ExtendedIndex ; // Print table indexes in square brackets, like array indexes. For instance, ifDescr.1 is printed as ifDescr[1]. Corresponds to the -OX command-line option of Net-SNMP and to the SNMP::$extended_index property.

}
+add a note

User Contributed Notes

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