Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation for net_get_interfaces()
Co-authored-by: George Peter Banyard <girgias@php.net> Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-847.
- Loading branch information
Showing
2 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<?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 role="procedural"> | ||
<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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters