Add wget command to NSH

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1657 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-03-28 19:49:28 +00:00
parent 8007999a39
commit 9a6234f5dc
3 changed files with 50 additions and 6 deletions
+43 -3
View File
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1>
<p>Last Updated: November 15, 2008</p>
<p>Last Updated: March 28, 2009</p>
</td>
</tr>
</table>
@@ -275,7 +275,13 @@
<tr>
<td><br></td>
<td>
<a href="#cmdxd">2.33 Hexadecimal Dump (xd)</a>
<a href="#cmdwget">2.33 Get File Via HTTP (wget)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
<a href="#cmdxd">2.34 Hexadecimal Dump (xd)</a>
</td>
</tr>
<tr>
@@ -1673,7 +1679,34 @@ usleep &lt;usec&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
<a name="cmdxd"><h2>2.33 Hexadecimal dump (xd)</h2></a>
<a name="cmdwget">2.33 Get File Via HTTP (wget)</a>
</td>
</tr>
</table>
<a <p><b>Command Syntax:</b></p>
<ul><pre>
wget [-o &lt;local-path&gt;] &lt;url&gt;
</pre></ul>
<p>
<b>Synopsis</b>.
Use HTTP to copy the file at <code>&lt;url&gt;</code> to the current directory.
</p>
<p><b>Options:</b></p>
<ul><table>
<tr>
<td><b><code>-o &lt;local-path&gt;</code></b></td>
<td>
The file will be saved relative to the current working directory
and with the same name as on the HTTP server unless <code>&lt;local-path&gt;</code> is provided.
</td>
</tr>
</table></ul>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
<a name="cmdxd"><h2>2.34 Hexadecimal dump (xd)</h2></a>
</td>
</tr>
</table>
@@ -1909,6 +1942,12 @@ nsh>
<td>!<code>CONFIG_DISABLE_SIGNALS</code></td>
<td><code>CONFIG_EXAMPLES_NSH_DISABLE_USLEEP</code></td>
</tr>
<tr>
<td><b><code>wget</code></b></td>
<td><code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NET_TCP</code> &amp;&amp;
<code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td><code>CONFIG_EXAMPLES_NSH_DISABLE_WGET</code></td>
</tr>
<tr>
<td><b><code>xd</code></b></td>
<td><br></td>
@@ -2255,6 +2294,7 @@ nsh>
<li><a href="#cmdunmount"><code>umount</code></a></li>
<li><a href="#cmdunset"><code>unset</code></a></li>
<li><a href="#cmdusleep"><code>usleep</code></a></li>
<li><a href="#cmdwget"><code>wget</code></a></li>
<li><a href="#cmdxd"><code>xd</code></a></li>
</ul></td>
</tr></table>
+6 -2
View File
@@ -1363,9 +1363,13 @@ nuttx-0.4.4 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
(submitted by JPelletier). The is the same fix that was needed for the
eZ80 and fixed in 0.4.2.
* netutils: Added logic to support a simple wget() function
* examples/wget: Added a test for wget() (Not yet tested because of
some current networking limitations).
* examples/wget: Added a test for wget() -- NOTE
* lib/strncasecmp: Fix cut'n'paste error in function name.
* NSH: Added wget command (untested and temorarily disabled)-- see NOTE.
NOTE: Features related to wget are not tested on the target platform in this
release and, hence, most likely have problems. I don't have the correct network
settup to perform that testing now (I'm in a hotel).
pascal-0.1.3 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
+1 -1
View File
@@ -817,7 +817,7 @@ include/
<h2>2.12 <a name="DirStructNetUtils">netutils</a></h2>
<p>
This directory contains most of the network applications.
Some of these are original with NuttX (like tftpc) and others were leveraged from the uIP-1.0 apps directory.
Some of these are original with NuttX (like tftpc and dhcpd) and others were leveraged from the uIP-1.0 apps directory.
As the uIP apps/README says, these applications &quot;are not all heavily tested.&quot;
</p>
<ul><pre>