Manual do PHP
Anterior |  | Próxima

# CLII. SNMP Functions

# Introdução

# Dependências

In order to use the SNMP functions on Unix you need to install the NET-SNMP package. On Windows these functions are only available on NT and not on Win95/98.

# Instalação

Important: In order to use the UCD SNMP package, you need to define `NO_ZEROLENGTH_COMMUNITY` to `1` before compiling it. After configuring UCD SNMP, edit `config.h` or `acconfig.h` and search for `NO_ZEROLENGTH_COMMUNITY`. Uncomment the #define line. It should look like this afterwards:

    #define NO_ZEROLENGTH_COMMUNITY 1

Now compile PHP `--with-snmp[=DIR]`.

If you see strange segmentation faults in combination with SNMP commands, you did not follow the above instructions. If you do not want to recompile UCD SNMP, you can compile PHP with the `--enable-ucd-snmp-hack` switch which will work around the misfeature.

The Windows distribution contains support files for SNMP in the `mibs` directory. This directory should be moved to `DRIVE:\usr\mibs`, where DRIVE must be replaced with the driveletter where PHP is installed on, e.g.`c:\usr\mibs`.

# Configurações em execução

Esta extensão não define nenhum parâmetro de configuração no `php.ini`.

# Tipos Resource

# Constantes pré-definidas

As contantes abaixo são definidas por esta extensão e somente estarão disponíveis quando a extensão foi compilada com o PHP ou carregada dinamicamente durante a execução.

`SNMP_OID_OUTPUT_FULL` (integer)

  As of 5.2.0

`SNMP_OID_OUTPUT_NUMERIC` (integer)

  As of 5.2.0

`SNMP_VALUE_LIBRARY` (integer)

`SNMP_VALUE_PLAIN` (integer)

`SNMP_VALUE_OBJECT` (integer)

`SNMP_BIT_STR` (integer)

`SNMP_OCTET_STR` (integer)

`SNMP_OPAQUE` (integer)

`SNMP_NULL` (integer)

`SNMP_OBJECT_ID` (integer)

`SNMP_IPADDRESS` (integer)

`SNMP_COUNTER` (integer)

`SNMP_UNSIGNED` (integer)

`SNMP_TIMETICKS` (integer)

`SNMP_UINTEGER` (integer)

`SNMP_INTEGER` (integer)

`SNMP_COUNTER64` (integer)

Anterior | Principal | Próxima
simplexml_load_string | Acima | snmp_get_quick_print