Some improvements to netutils/cjson and testing/unity
* netutils/cjson/Makefile: fix the error when creating Make.dep
* testing/unity/Makefile: fix the error when creating Make.dep
* include/.gitignore: ignore cJSON headers
* netutils/cjson/Kconfig: update default version to 1.7.12. Previous releases raise compilation warnings about redefined true/false
Approved-by: Gregory Nutt <gnutt@nuttx.org>
netutils/dhcpd: Fixes bug where hwaddr was being used instead of ipaddr in the ARP update.
This bug seems to have been introduced 3 years ago during a rewrite to remove a direct OS call to arp. I'm not sure how others have not run into issues with this. The behavior I was observing was that the DHCPD would go to offer an IP address, but then send a ARP request for the IP instead because it didn't know where to send the data.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
netutils/webserver: Add web server info based on uname()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
apps/examples/webserver: Fix to compile with CONFIG_NETUTILS_HTTPD_SENDFILE=y
Also, in this PR, some configs such as CONFIG_NETUTILS_HTTPDFILESTATS
can be selected by menuconfig.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Some improvements could be made by anyone. For example, I know the main routine in perform() shall be split into several parts for readability. I apologize in advance for this kind of spaghetti code, but I was short on time to refactor it. Also chunked HTTP transfer encoding would be a nice contribution from anyone interested. It is detected but not yet supported.
include/ and netutils/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
nshlib/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
system/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
examples/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
Squashed commit of the following:
apps/nshlib: Remove NSH initialization. Now uses the common apps/netutils/netinit logic (which was cloned from nshlib to begin with).
apps/netutils/netinit: Clone network initialization logic from NSH to this directory so that it can be available for general use.
The patch provided in issue 135, which adds support for HTTP Chunked Encoding, covers all paths in the webserver app except CGI callbacks. As a result, if a page being served happens to use CGI, it could generate stream content that does not comply with HTTP Chunked Encoding.
The patch attached amends the webserver app's CGI callbacks to use the HTTP Chunked Encoding sender function instead of using send() directly.
The webserver/httpd app is currently broken when script support is enabled (CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE). The root cause has been tracked down to the "Content-length" not being available ahead of time in this case (length of -1 passed to send_headers() ). On the other hand, the server closing the socket does not result in FIN being sent to the browser either (FIN not supported by NuttX yet).
Simple solution: Add support for HTTP Chunked Encoding to webserver/httpd (attached patch).
The attached patch is simple. It adds a configuration option to enable chunked encoding. When enabled, the implementation will auto-detect the cases where content length is not available ahead of time, and will automatically engage chunked encoding transfers.
Without this patch, the browser/client hangs forever, as it is expecting more data. With this patch, the browser displays the content.
Reviewers note: Reviewing the changes I also see that these file did not follow the NuttX codings standard. I ran all files through nuttx/tools/indent.sh, manually reviewed all files for coding style issues. I also changed occurrences of non-standard types u8_t, u16_t, and u32_t to the standard uint8_t, uint16_t, and uint32_t.
netutils/ping: remove unsupported ping.
netutils/ping is not supported anymore.
it's better to remove this folder for preventing confusing.
ping is supported by system/ping.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
Approved-by: GregoryN <gnutt@nuttx.org>
Author: anchao <anchao@pinecone.net>
apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
Loadable apps/: Correct loadable symbol table generate
apps/system/ubloxmodem: Fix build break
apps/examples/ostest: start restart/waitpid/user test from main loop
apps/nshlib: Expand reboot and poweroff commands to include a second, optional mode argument
Author: Gregory Nutt <gnutt@nuttx.org>
An attempt to fix build issues. Does not work.
apps/examples/ostest: Fix some inappropriate renaming of static functions introduced with recent patches.
apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing.
Author: anchao <anchao@pinecone.net>
apps/builtin/exec_builtin.c: Try posix_spawn if builtin apps do not have have an entry point.
apps/Application.mk: introduce MODULE config to simplify tristate(m)
apps/nsh: Change the nuttx shell module type to tristate
apps: Add loadable application support
script/mksymtab: Generate symbol table name by default
apps/builtin: Allow loadable applications can register with apps/builtin.
apps/builtin/exec_builtin.c: Try posix_spawn if builtin apps do not have have an entry point.
apps/Application.mk: introduce MODULE config to simplify tristate(m)
apps/nsh: Change the nuttx shell module type to tristate
apps: Add loadable application support
script/mksymtab: Generate symbol table name by default
apps/builtin: Allow loadable applications can register with apps/builtin.
FTP: Adds support for IPv6 and fixes various transfer issues
* netutils/ftpd: Fix support for IPv6 FTP server
* netutils/ftpc:Adds support for IPv6 sockets
* ftpc: Must convert port received by EPSV reply to network order
* ftpc: Data socket address for passive connection should be same as server address
* ftpc: Must skip human readable string in EPSV response before scanning for port
* ftpc: Don't send PASS command if USER command was sufficient. ie no password required
* ftpc: Generically handle permanent negative completion in shard ftpc_cmd logic
* ftpc: Minor addresssing fix
* ftpc: Tweak logic for overriding network debugging output
* FTP: Adds option for setting stack size of various threads in FTPD and FTPC
* netutils/ftpd: Fixes build error setting IPv4 address. sin_addr => sin_addr.s_addr
* netutils/ftpd: Protects against partial write returns by looping in that case
Approved-by: Gregory Nutt <gnutt@nuttx.org>
apps/netutils/netlib: netlib_ipv[4|6]adaptor() will now use the new routing table interfaces if they are available: If the desination IP address does not correspond to the network served by any device, then the address of the router that should get us to the correct sub-net is is determined. Then the network adaptor that can communicate with the that router has the IP address that will returned.
apps/netutils/netlib: Add new utilities netlib_ipv[4|6]router() that can be used to determine the IP address of a router that would be used some some destination IP address that is not locally accessible.
apps/netutils/netlib: Add helpers for reading the routing table: netlib_read_ipv4route() and netlib_read_ipv6route()
commit 6fbbca4ce308f5d8130d795342c7639555a7e5bf
Author: Gregory Nutt <gnutt@nuttx.org>
Date: Sat Aug 19 08:46:27 2017 -0600
apps/examples/pf_ieee802154: Add PANID to command line options; Cannot bind to address zero... There is no counterpart to INADDR_ANY for these radios (not now at least).
commit 354111108a88f549248537e79dbf79998f458ded
Author: Gregory Nutt <gnutt@nuttx.org>
Date: Fri Aug 18 17:47:10 2017 -0600
PF_IEEE802154: A few bugfixes
commit f1bb947609ed5e9e8816234653d6c8ee24585079
Author: Gregory Nutt <gnutt@nuttx.org>
Date: Fri Aug 18 15:17:32 2017 -0600
Add file missed in last commit
commit 9a73930e864db83609b5cc0d7c940d8efeaade66
Merge: 315b888f c433e07a
Author: Gregory Nutt <gnutt@nuttx.org>
Date: Fri Aug 18 12:08:03 2017 -0600
Merge remote-tracking branch 'origin/master' into pf_ieee802154
commit 315b888f4e72523d90b526edc5a82fb97678ff7e
Author: Gregory Nutt <gnutt@nuttx.org>
Date: Fri Aug 18 12:06:51 2017 -0600
examples/pf_ieee802154: Add for testing PF_IEEE802154 sockets.