Commit Graph

466 Commits

Author SHA1 Message Date
Gregory Nutt
94a0d92b54 This commit removes the private network initialization logic from NSH and puts in a common location at apps/netutils/netinit. Now that netork initialization logic can be used by applications that do not include NSH.
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.
2019-04-29 10:22:56 -06:00
Gregory Nutt
07b6eb555c Trivial changes from review of last PR 2019-04-28 06:47:03 -06:00
raiden00pl
75aca388a4 Merged in raiden00/apps/cjson (pull request #175)
netutils: support for the current version of cJSON

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-04-28 12:34:20 +00:00
Sebastien Lorquet
fe0954cd62 netutils/netlib/netlib_parseurl.c: Add a more flexible version of netlib_parsehttpurl. This one can parse any URL, and is extensible so future improvements keep the same API. 2019-04-26 13:08:38 -06:00
Alan Carvalho de Assis
5492fcdafa apps//netutils/webclient/Kconfig: NET_SOCKOPTS is needed to get webclient compiled. 2019-02-24 13:55:19 -06:00
Gregory Nutt
b2f46360de apps/: Remove/replace all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0. That value is always greater than zero now. In places just replace with #ifdef CONFIG_NET. 2019-02-11 16:23:55 -06:00
Gregory Nutt
a14f3fbffb apps/netutils/tftpc: Fix unmatched #endif found in build testing 2019-02-11 15:52:37 -06:00
Gregory Nutt
9db029e318 The file system can no longer be disabled. Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS==0 2019-02-11 13:10:10 -06:00
Kevin Liu
721bb64e52 apps/netutils/dhcpc/dhcpc.c: Fix an error for DHCP REQUEST receiving a NAK.In DHCP Request operation, no need to update ciaddr to the client address and keep it as 0. 2019-01-30 07:49:37 -06:00
ligd
557cd8e454 netutils/codecs/base64.c: Add base64_[de|en]code_length() API 2019-01-27 07:20:25 -06:00
Xiang Xiao
4d2f580568 apps/netutils/codecs/base64.c: Remove the big stack array 2019-01-27 07:17:07 -06:00
Alan Carvalho de Assis
25c0387c44 apps/examples/battery: Add Battery Charger Monitor Example 2019-01-04 12:15:05 -06:00
Gregory Nutt
0c615ed586 Fix a few typos. 2018-12-27 08:48:52 -06:00
Gregory Nutt
3adf8af266 netutils/webserver/httpd.c: Eliminate some warnings found in build testing. 2018-11-25 18:43:09 -06:00
Gregory Nutt
e88a529010 From patch attached to nuttx/ Bitbucket Issue #136 from Vlado Vidovic:
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.
2018-11-23 17:29:07 -06:00
Gregory Nutt
d3c36663d0 netutils/webserver: Contributed by "Anonymous" via attachment to Bitbucket issue #135: "webserver broken when scripting support enabled - support for chunked encoding fixes it"
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.
2018-11-23 10:13:34 -06:00
ligd
f954b15cac pps/system/ping and pings and apps/netutils/ping: Extract icmp ping and icmpv6 ping6 logic from system/ to C-callable library in netutils/. 2018-11-08 09:32:05 -06:00
Gregory Nutt
48ebc1377a apps/netutils/pppd/: More changes for consistency in coding style. 2018-11-07 13:43:51 -06:00
Gregory Nutt
bb21a11a60 apps/netutils/pppd: Fix some naming convention violations. 2018-11-07 13:37:37 -06:00
Xiang Xiao
cddfda99f0 apps/netutils/pppd: Refine and fix pppd code.
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.
2018-11-07 12:43:42 -06:00
Xiang Xiao
c1f0653c85 apps/netutils/chat and apps/examples/chat: 'constify' chat variables and parameters 2018-11-07 11:55:09 -06:00
Gregory Nutt
a26a7f9767 apps/netutils/netlib and apps/examples/igmp: Adapt to use the corrected, semi-standard version of struct ip_msfilter. 2018-10-29 06:51:56 -06:00
Gregory Nutt
e363b27b09 apps/netutils/codecs/base64.c: Cosmetic changes from review. Various coding style issues and removed all old commented out code. 2018-10-19 06:40:44 -06:00
Aleksandr Vyhovanec
9aa2f5c5a2 Merged in AVyhovanec/apps (pull request #158)
"dst" overflow protection when base64 string ends with "="

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-19 12:29:12 +00:00
Gregory Nutt
386c29bbaf netutils/netlib/netlib_parsehttpurl.c: Rethink last commit. I think it still needs to continue parsing to the end of the hostname string after the E2BIG error has occurred. 2018-09-30 08:46:52 -06:00
Gregory Nutt
2d9a916be1 apps/netutils/netlib/netlib_parsehttpurl.c: Correct handling of long URLs as noted in Bitbucket issue #119 (in the nuttx/ repository, not the apps/ repository). 2018-09-30 08:33:10 -06:00
Gregory Nutt
42e99d59ce Correct some network-related configuration variable names. All *_MTU defines were changes to *_PKTSIZE gut that was not reflected in apps/ 2018-09-14 07:06:06 -06:00
EunBong Song
fa8c4cbae3 Merged in ebsong/fork-apps (pull request #153)
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>
2018-09-05 20:52:28 +00:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
Xiang Xiao
5304ec5eec Replace all ASSERT calls to DEBUGASSERT 2018-08-24 06:19:35 -06:00
anchao
220653f21c Squashed commit of the following:
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.
2018-08-23 11:06:15 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
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.
2018-08-22 09:30:38 -06:00
Gregory Nutt
a89f0e3a07 Add missing function names in function headers. 2018-08-13 15:52:59 -06:00
Gregory Nutt
a57610c2c4 Remove trailing spaces at the end of lines. 2018-08-13 07:47:26 -06:00
Gregory Nutt
4d8b8fa177 apps/netutils/dhcpc: Activates BINDTODEVICE if available, and break up some long lines 2018-06-25 15:19:01 -06:00
Dmitriy Linikov
1b4d17d9c0 apps/netutils/ftpc: Fixed handling of url-encoded strings 2018-06-04 14:29:35 -06:00
Gregory Nutt
0094b411da apps/netutils/netlib: Various fixes needed to get a clean netlib build with Bluetooth only. 2018-04-03 10:01:55 -06:00
Sebastien Lorquet
3211ab9069 apps/netutils/tftpc: This commit modifies the TFTP client functions to use a data read/write callback instead of a file.This allows TFTP to write to arbitrary destination (in my case, a MTD device - for firmware update). Two new functions are introduced for this, named tftpget_cb and tftpput_cb. They are just made of most of the existing code. The previously existing tftpget/tftpput functions are now wrappers on the new ones, with callbacks that read/write from files, so my modifications are backwards compatible with existing applications, eg the associated nsh commands dont need to be changed. 2018-03-09 07:08:06 -06:00
Dmitriy Linikov
2f2fb92ae3 Merged in hardlulz/modem-3.0-nuttx-apps/fix-sem-EINTR (pull request #133)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:37:32 +00:00
Gregory Nutt
8d96448a88 Correct a typo in some C comments. 2018-02-09 11:15:35 -06:00
Masayuki Ishikawa
14959b43e0 apps/netutils/netlib: Add default route in netlib_set_dripv4addr()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2018-01-19 09:06:55 +09:00
Gregory Nutt
661718ee19 apps/nshlib: Add irqinfo command. 2018-01-12 17:58:44 -06:00
Gregory Nutt
4ad9d7ec19 apps/netutils/ftpc: Fix a typo/compile problem found in build testing. 2018-01-04 18:00:04 -06:00
Gregory Nutt
ccee5daaf3 apps/netutils/ftpc: Fix some cornercases that could cause FTP to access past the end of valid data. 2017-12-21 12:05:28 -06:00
Gregory Nutt
68affc6c08 netutils/ftpc: Eliminate warnings about types of inputs to netlib_ipv4adaptr() and about ftp_cmd_pasv() being defined but not used. 2017-11-12 13:31:36 -06:00
Anthony Merlino
f489bcd6f9 Merged in antmerlino/apps/ftp-ipv6 (pull request #122)
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>
2017-11-06 23:41:30 +00:00
Gregory Nutt
6b9d23c6aa Correct and standardize some naming used in the previous commits. 2017-10-30 14:16:37 -06:00
Gregory Nutt
8af55bbdcc netutils/ftpc: Fix some crazy comparisons to determine is a file is an absolute path. Noted by Anthony Merlino. 2017-10-13 15:36:36 -06:00
Gregory Nutt
27773d570b Fix a copy-paste error 2017-09-20 10:59:00 -06:00