cvs: peardoc /en/packages STATUS networking.xml
| From: | Alexander Merz | Date: | Sat, 05 Jan 2002 13:38:37 +0000 |
| Subject: | cvs: peardoc /en/packages STATUS networking.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1828@lists.php.net to get a copy of this message | ||
alexmerz Sat Jan 5 08:38:37 2002 EDT
Modified files:
/peardoc/en/packages STATUS networking.xml
Log:
split networking.xml into single files and add net_finger doc
Index: peardoc/en/packages/STATUS
diff -u peardoc/en/packages/STATUS:1.1 peardoc/en/packages/STATUS:1.2
--- peardoc/en/packages/STATUS:1.1 Sat Jan 5 07:26:50 2002
+++ peardoc/en/packages/STATUS Sat Jan 5 08:38:37 2002
@@ -12,10 +12,10 @@
Log -
MP3_Id -
Net_CheckIP f mj
-Net_Finger w alexmerz
+Net_Finger f alexmerz
Net_IPv6 w alexmerz
Net_NNTP w alexmerz
-Net_Ping w alexmerz
+Net_Ping f mj, alexmerz
Net_Whois w alexmerz
Pear -
PHPDoc -
Index: peardoc/en/packages/networking.xml
diff -u peardoc/en/packages/networking.xml:1.3 peardoc/en/packages/networking.xml:1.4
--- peardoc/en/packages/networking.xml:1.3 Sat Dec 22 10:33:16 2001
+++ peardoc/en/packages/networking.xml Sat Jan 5 08:38:37 2002
@@ -1,193 +1,15 @@
+<!-- $Id: networking.xml,v 1.4 2002/01/05 13:38:37 alexmerz Exp $ -->
<reference id="packages.Networking">
<title>Networking</title>
<partintro>
<para>
Networking utilities.
</para>
- </partintro>
+ </partintro>
- <refentry id="packages.Networking.Net_CheckIP">
- <refnamediv>
- <refname><classname>Net_CheckIP</classname></refname>
- <refpurpose>
- Validation of IPv4 adresses
- </refpurpose>
- </refnamediv>
-
- <refsect1 id="packages.Networking.Net_CheckIP.check_ip">
- <title>Net_Portscan::checkPort</title>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>boolean <function>Net_CheckIP::check_ip</function></funcdef>
- <paramdef>string <parameter>ip</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- This function can validate if a given string has a valid IPv4 syntax.
- </para>
- <example>
- <title>Using checkPort</title>
- <programlisting role="php">
-require_once "Net_CheckIP/CheckIP.php";
-
-if (Net_CheckIP::check_ip("your_ip_goes_here")) {
- // Syntax of the IP is ok
-}
- </programlisting>
- </example>
- </refsect1>
- </refentry>
-
- <refentry id="packages.Networking.Net_Portscan">
- <refnamediv>
- <refname><classname>Net_Portscan</classname></refname>
- <refpurpose>
- Portscanner utilities.
- </refpurpose>
- </refnamediv>
-
- <refsect1 id="packages.Networking.Net_Portscan.checkPort">
- <title>Net_Portscan::checkPort</title>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>boolean
<function>Net_Portscan::checkPort</function></funcdef>
- <paramdef>string <parameter>host</parameter></paramdef>
- <paramdef>integer <parameter>port</parameter></paramdef>
- <paramdef>integer
<parameter><optional>timeout</optional></parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- This function checks if there is a service available at the
- specified port on the specified machine. It there is a service,
- the function returns true. Otherwise it returns false.
- </para>
-
- <example>
- <title>Using checkPort</title>
- <programlisting role="php">
-require_once "Net_Portscan/Portscan.php";
-
-if (Net_Portscan::checkPort("localhost", 80) == NET_PORTSCAN_SERVICE_FOUND) {
- echo "There is a service on localhost on port 80 (" . Net_Portscan::getService(80) .
").\n";
-}
- </programlisting>
- </example>
- </refsect1>
-
- <refsect1 id="packages.Networking.Net_Portscan.checkPortRange">
- <title>Net_Portscan::checkPortRange</title>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>array
<function>Net_Portscan::checkPortRange</function></funcdef>
- <paramdef>string <parameter>host</parameter></paramdef>
- <paramdef>integer <parameter>minPort</parameter></paramdef>
- <paramdef>integer <parameter>maxPort</parameter></paramdef>
- <paramdef>integer
<parameter><optional>timeout</optional></parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- This function is pretty identical to checkPort, except it takes
- a range of ports, that are scanned.
- </para>
-
- <example>
- <title>Using checkPortRange</title>
- <programlisting role="php">
-require_once "Net_Portscan/Portscan.php";
-
-echo "Scanning localhost ports 70-90\n";
-$result = Net_Portscan::checkPortRange("localhost", 70, 90);
-
-foreach ($result as $port => $element) {
- if ($element == NET_PORTSCAN_SERVICE_FOUND) {
- echo "On port " . $port . " there is running a service.\n";
- } else {
- echo "On port " . $port . " there is no service running.\n";
- }
-}
- </programlisting>
- </example>
- </refsect1>
-
- <refsect1 id="packages.Networking.Net_Portscan.getService">
- <title>Net_Portscan::getService</title>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>string
<function>Net_Portscan::checkPortRange</function></funcdef>
- <paramdef>integer <parameter>port</parameter></paramdef>
- <paramdef>string
<parameter><optional>protocol</optional></parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- This function returns the service associated with port for the
- specified protocol as per /etc/services. protocol is either
- tcp or udp. (Default is tcp.)
- </para>
- </refsect1>
-
- <refsect1 id="packages.Networking.Net_Portscan.getPort">
- <title>Net_Portscan::getPort</title>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>integer <function>Net_Portscan::getPort</function></funcdef>
- <paramdef>string <parameter>service</parameter></paramdef>
- <paramdef>string
<parameter><optional>protocol</optional></parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- This function returns the port which corresponds to service for the
- specified protocol as per /etc/services. protocol is either tcp or
- udp. (Default is tcp.)
- </para>
- </refsect1>
- </refentry>
-
- <refentry id="packages.Networking.Net_Ping">
- <refnamediv>
- <refname><classname>Net_Ping</classname></refname>
- <refpurpose>
- Wrapper class for ping calls
- </refpurpose>
- </refnamediv>
-
- <refsect1 id="packages.Networking.Net_Ping.ping">
- <title>Net_Ping::ping</title>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>array <function>Net_Ping::ping</function></funcdef>
- <paramdef>string <parameter>host</parameter></paramdef>
- <paramdef>integer <parameter>counts</parameter></paramdef>
- <paramdef>integer <parameter>packet_size</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- Execute ping and return result.
- </para>
- <example>
- <title>Using ping</title>
- <programlisting role="php">
-require_once "Net_Ping/Ping.php";
-
-$ping = new Net_Ping;
-
-print_r($ping->ping("127.0.0.1");
- </programlisting>
- </example>
-
- <para>
- By passing a value for the second parameter <parameter>counts
- </parameter> you can specify the number of signals that are sent
- to <parameter>host</parameter> (default is 5). The third
- parameter <parameter> packet_size</parameter> can be used to
- change the size of the packets that are sent.
- </para>
- </refsect1>
- </refentry>
+ &packages.networking.Net-CheckIP;
+ &packages.networking.Net-Finger;
+ &packages.networking.Net-Ping;
+ &packages.networking.Net-Portscan;
</reference>