2012-09-12 20:42:07 +02:00
|
|
|
netutils README.txt
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
2011-03-19 22:04:13 +01:00
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
Contents
|
|
|
|
--------
|
|
|
|
|
|
|
|
- uIP Applications
|
|
|
|
- Other Network Applications
|
|
|
|
- Tips for Using Telnetd
|
|
|
|
- Tips for Using DHCPC
|
|
|
|
|
|
|
|
uIP Applications
|
|
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
|
2011-03-19 22:04:13 +01:00
|
|
|
This directory contains most of the network applications contained
|
|
|
|
under the uIP-1.0 apps directory. As the uIP apps/README says,
|
2012-09-17 20:18:44 +02:00
|
|
|
these applications "are not all heavily tested." These uIP-based
|
|
|
|
apps include:
|
2011-03-19 22:04:13 +01:00
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
dhcpc - Dynamic Host Configuration Protocol (DHCP) client. See
|
|
|
|
apps/include/netutils/dhcpc.h for interface information.
|
|
|
|
smtp - Simple Mail Transfer Protocol (SMTP) client. See
|
|
|
|
apps/include/netutils/smtp.h for interface information.
|
|
|
|
webclient - HTTP web client. See apps/include/netutils/webclient.h
|
|
|
|
for interface information.
|
|
|
|
webserver - HTTP web server. See apps/include/netutils/httpd.h
|
|
|
|
for interface information.
|
2011-03-19 22:04:13 +01:00
|
|
|
|
|
|
|
You may find additional information on these apps in the uIP forum
|
2012-09-17 20:18:44 +02:00
|
|
|
accessible through: http://www.sics.se/~adam/uip/index.php/Main_Page .
|
|
|
|
Some of these (such as the uIP web server) have grown some additional
|
|
|
|
functionality due primarily to NuttX user contributions.
|
2011-03-19 22:04:13 +01:00
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
Other Network Applications
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2011-03-19 22:04:13 +01:00
|
|
|
Additional applications that were not part of uIP (but which are
|
|
|
|
highly influenced by uIP) include:
|
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
dhcpd - Dynamic Host Configuration Protocol (DHCP) server. See
|
|
|
|
apps/include/netutils/dhcpd.h for interface information.
|
2012-09-12 20:42:07 +02:00
|
|
|
discover - This daemon is useful for discovering devices in local
|
|
|
|
networks, especially with DHCP configured devices. It
|
|
|
|
listens for UDP broadcasts which also can include a
|
|
|
|
device class so that groups of devices can be discovered.
|
|
|
|
It is also possible to address all classes with a kind of
|
|
|
|
broadcast discover. (Contributed by Max Holtzberg).
|
2016-05-21 17:13:23 +02:00
|
|
|
esp8266 - An ESP8266 networking layer contributed by Pierre-noel
|
|
|
|
Bouteville
|
2012-10-27 20:21:26 +02:00
|
|
|
json - cJSON is an ultra-lightweight, portable, single-file,
|
|
|
|
simple-as-can-be ANSI-C compliant JSON parser, under MIT
|
|
|
|
license. Embeddable Lightweight XML-RPC Server discussed at
|
|
|
|
http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364.
|
|
|
|
This code was taken from http://sourceforge.net/projects/cjson/
|
|
|
|
and adapted for NuttX by Darcy Gong.
|
2012-02-02 05:35:35 +01:00
|
|
|
tftpc - TFTP client. See apps/include/netutils/tftp.h
|
|
|
|
for interface information.
|
2012-01-30 22:29:59 +01:00
|
|
|
telnetd - TELNET server. This is the Telnet logic adapted from
|
|
|
|
uIP and generalized for use as the front end to any
|
|
|
|
shell. The telnet daemon creates sessions that are
|
|
|
|
"wrapped" as character devices and mapped to stdin,
|
|
|
|
stdout, and stderr. Now the telnet session can be
|
|
|
|
inherited by spawned tasks.
|
2012-02-02 05:35:35 +01:00
|
|
|
ftpc - FTP client. See apps/include/ftpc.h for interface
|
|
|
|
information.
|
2012-02-04 23:49:42 +01:00
|
|
|
ftpd - FTP server. See apps/include/netutils/ftpd.h for interface
|
|
|
|
information.
|
2014-04-11 02:15:06 +02:00
|
|
|
ntpclient - This is a fragmentary NTP client. It neither well-tested
|
|
|
|
nor mature nor complete at this point in time.
|
2011-03-19 22:04:13 +01:00
|
|
|
thttpd - This is a port of Jef Poskanzer's THTTPD HTPPD server.
|
2012-02-02 05:35:35 +01:00
|
|
|
See http://acme.com/software/thttpd/ for general THTTPD
|
|
|
|
information. See apps/include/netutils/thttpd.h
|
|
|
|
for interface information. Applications using this thttpd
|
2013-06-02 01:25:16 +02:00
|
|
|
will need to provide the following definitions in the
|
|
|
|
defconfig file to select the appropriate netutils
|
|
|
|
libraries:
|
|
|
|
|
2014-07-03 00:04:25 +02:00
|
|
|
CONFIG_NETUTILS_NETLIB=y
|
2013-06-02 01:25:16 +02:00
|
|
|
CONFIG_NETUTILS_THTTPD=y
|
2012-02-02 05:35:35 +01:00
|
|
|
|
2012-09-14 16:07:21 +02:00
|
|
|
xmlrpc - The Embeddable Lightweight XML-RPC Server discussed at
|
|
|
|
http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364
|
2012-02-02 05:35:35 +01:00
|
|
|
|
2015-12-11 16:09:38 +01:00
|
|
|
ping - This is an unfinished implementation of ping and ping6 using
|
|
|
|
raw sockets. It is not yet hooked into the configuration or
|
|
|
|
build systems.
|
|
|
|
|
|
|
|
Current ping/ping6 logic in NSH makes illegal calls into the
|
|
|
|
OS in order to implement ping/ping6. One correct
|
|
|
|
implementation would be to use raw sockets to implement ping/
|
|
|
|
ping6 as a user application. This is a first cut at such an
|
|
|
|
implementation.
|
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
Tips for Using Telnetd
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Telnetd is set up to be the front end for a shell. The primary use of
|
|
|
|
Telnetd in NuttX is to support the NuttShell (NSH) Telnet front end. See
|
|
|
|
apps/include/netutils/telnetd.h for information about how to incorporate
|
|
|
|
Telnetd into your custom applications.
|
|
|
|
|
2013-06-02 01:25:16 +02:00
|
|
|
To enable and link the Telnetd daemon, you need to include the following in
|
|
|
|
in your defconfig file:
|
2012-02-02 05:35:35 +01:00
|
|
|
|
2014-07-03 00:04:25 +02:00
|
|
|
CONFIG_NETUTILS_NETLIB=y
|
2013-06-02 01:25:16 +02:00
|
|
|
CONFIG_NETUTILS_TELNETD=y
|
2012-02-02 05:35:35 +01:00
|
|
|
|
|
|
|
Also if the Telnet console is enabled, make sure that you have the following
|
|
|
|
set in the NuttX configuration file or else the performance will be very bad
|
|
|
|
(because there will be only one character per TCP transfer):
|
2013-06-02 01:25:16 +02:00
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
CONFIG_STDIO_BUFFER_SIZE Some value >= 64
|
|
|
|
CONFIG_STDIO_LINEBUFFER=y Since Telnetd is line oriented, line buffering
|
|
|
|
is optimal.
|
|
|
|
|
|
|
|
Tips for Using DHCPC
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
2011-03-19 22:04:13 +01:00
|
|
|
|
|
|
|
If you use DHCPC/D, then some special configuration network options are
|
|
|
|
required. These include:
|
|
|
|
|
|
|
|
CONFIG_NET=y Of course
|
|
|
|
CONFIG_NSOCKET_DESCRIPTORS And, of course, you must allocate some
|
|
|
|
socket descriptors.
|
|
|
|
CONFIG_NET_UDP=y UDP support is required for DHCP
|
|
|
|
(as well as various other UDP-related
|
|
|
|
configuration settings).
|
|
|
|
CONFIG_NET_BROADCAST=y UDP broadcast support is needed.
|
2014-11-16 15:50:36 +01:00
|
|
|
CONFIG_NET_ETH_MTU=650 The client must be prepared to receive
|
2011-03-19 22:04:13 +01:00
|
|
|
(or larger) DHCP messages of up to 576 bytes (excluding
|
|
|
|
Ethernet, IP, or UDP headers and FCS).
|
2014-11-16 15:50:36 +01:00
|
|
|
NOTE: Note that the actual MTU setting will
|
|
|
|
depend upon the specific link protocol.
|
|
|
|
Here Ethernet is indicated.
|
2012-02-02 05:35:35 +01:00
|
|
|
|