<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >SNMP Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="simplexml_load_string" HREF="function.simplexml-load-string.html"><LINK REL="NEXT" TITLE="snmp_get_quick_print" HREF="function.snmp-get-quick-print.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.simplexml-load-string.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.snmp-get-quick-print.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.snmp" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CLII. SNMP Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN205326" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="snmp.intro" >Introdução</A ></H1 ><P > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="snmp.requirements" >Dependências</A ></H1 ><P > In order to use the SNMP functions on Unix you need to install the <A HREF="http://www.net-snmp.org/" TARGET="_top" >NET-SNMP</A > package. On Windows these functions are only available on NT and not on Win95/98. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="snmp.installation" >Instalação</A ></H1 ><P > Important: In order to use the UCD SNMP package, you need to define <TT CLASS="literal" >NO_ZEROLENGTH_COMMUNITY</TT > to <TT CLASS="literal" >1</TT > before compiling it. After configuring UCD SNMP, edit <TT CLASS="filename" >config.h</TT > or <TT CLASS="filename" >acconfig.h</TT > and search for <TT CLASS="literal" >NO_ZEROLENGTH_COMMUNITY</TT >. Uncomment the #define line. It should look like this afterwards: <TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="c" >#define NO_ZEROLENGTH_COMMUNITY 1</PRE ></TD ></TR ></TABLE > Now compile PHP <CODE CLASS="option" >--with-snmp[=DIR]</CODE >. </P ><P > 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 <CODE CLASS="option" >--enable-ucd-snmp-hack</CODE > switch which will work around the misfeature. </P ><P > The Windows distribution contains support files for SNMP in the <TT CLASS="filename" >mibs</TT > directory. This directory should be moved to <TT CLASS="filename" >DRIVE:\usr\mibs</TT >, where DRIVE must be replaced with the driveletter where PHP is installed on, e.g.<TT CLASS="filename" >c:\usr\mibs</TT >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="snmp.configuration" >Configurações em execução</A ></H1 ><P >Esta extensão não define nenhum parâmetro de configuração no <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="snmp.resources" >Tipos Resource</A ></H1 ><P > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="snmp.constants" >Constantes pré-definidas</A ></H1 ><P > 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. </P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><TT CLASS="constant" ><B >SNMP_OID_OUTPUT_FULL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > As of 5.2.0 </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_OID_OUTPUT_NUMERIC</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > As of 5.2.0 </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_VALUE_LIBRARY</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_VALUE_PLAIN</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_VALUE_OBJECT</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_BIT_STR</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_OCTET_STR</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_OPAQUE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_NULL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_OBJECT_ID</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_IPADDRESS</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_COUNTER</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_UNSIGNED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_TIMETICKS</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_UINTEGER</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_INTEGER</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >SNMP_COUNTER64</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.snmp-get-quick-print.html" >snmp_get_quick_print</A > -- Fetches the current value of the UCD library's quick_print setting </DT ><DT ><A HREF="function.snmp-get-valueretrieval.html" >snmp_get_valueretrieval</A > -- Return the method how the SNMP values will be returned </DT ><DT ><A HREF="function.snmp-read-mib.html" >snmp_read_mib</A > -- Reads and parses a MIB file into the active MIB tree </DT ><DT ><A HREF="function.snmp-set-enum-print.html" >snmp_set_enum_print</A > -- Return all values that are enums with their enum value instead of the raw integer </DT ><DT ><A HREF="function.snmp-set-oid-numeric-print.html" >snmp_set_oid_numeric_print</A > -- Return all objects including their respective object id within the specified one </DT ><DT ><A HREF="function.snmp-set-oid-output-format.html" >snmp_set_oid_output_format</A > -- Set the OID output format </DT ><DT ><A HREF="function.snmp-set-quick-print.html" >snmp_set_quick_print</A > -- Set the value of quick_print within the UCD SNMP library </DT ><DT ><A HREF="function.snmp-set-valueretrieval.html" >snmp_set_valueretrieval</A > -- Specify the method how the SNMP values will be returned </DT ><DT ><A HREF="function.snmpget.html" >snmpget</A > -- Fetch an SNMP object</DT ><DT ><A HREF="function.snmpgetnext.html" >snmpgetnext</A > -- Fetch a SNMP object </DT ><DT ><A HREF="function.snmprealwalk.html" >snmprealwalk</A > -- Return all objects including their respective object ID within the specified one </DT ><DT ><A HREF="function.snmpset.html" >snmpset</A > -- Set an SNMP object</DT ><DT ><A HREF="function.snmpwalk.html" >snmpwalk</A > -- Fetch all the SNMP objects from an agent</DT ><DT ><A HREF="function.snmpwalkoid.html" >snmpwalkoid</A > -- Query for a tree of information about a network entity </DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.simplexml-load-string.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.snmp-get-quick-print.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >simplexml_load_string</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >snmp_get_quick_print</TD ></TR ></TABLE ></DIV ></BODY ></HTML >