<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.net-get-interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>net_get_interfaces</refname>
  <refpurpose>Get network interfaces</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type class="union"><type>array</type><type>false</type></type><methodname>net_get_interfaces</methodname>
   <void/>
  </methodsynopsis>
  <para>
   Returns an enumeration of network interfaces (adapters) on the local machine.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  &no.function.parameters;
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns an associative &array; where the key is the name of the interface and
   the value an associative array of interface attributes,
   &return.falseforfailure;.
  </para>
  <para>
   Each interface associative array contains:
   <table>
    <title>Interface attributes</title>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Name;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>description</entry>
       <entry>
        Optional string value for description of the interface.
        Windows only.
       </entry>
      </row>
      <row>
       <entry>mac</entry>
       <entry>
        Optional string value for MAC address of the interface.
        Windows only.
       </entry>
      </row>
      <row>
       <entry>mtu</entry>
       <entry>
        Integer value for Maximum transmission unit (MTU) of the interface.
        Windows only.
       </entry>
      </row>
      <row>
       <entry>unicast</entry>
       <entry>
        Array of associative arrays, see Unicast attributes below.
       </entry>
      </row>
      <row>
       <entry>up</entry>
       <entry>
        Boolean status (on/off) for interface.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>
  <para>
   <table>
    <title>Unicast attributes</title>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Name;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>flags</entry>
       <entry>
        Integer value.
       </entry>
      </row>
      <row>
       <entry>family</entry>
       <entry>
        Integer value.
       </entry>
      </row>
      <row>
       <entry>address</entry>
       <entry>
        String value for address in either IPv4 or IPv6.
       </entry>
      </row>
      <row>
       <entry>netmask</entry>
       <entry>
        String value for netmask in either IPv4 or IPv6.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  <para>
   Emits an <constant>E_WARNING</constant> on failure to get interface information.
  </para>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
