Commit Graph

111 Commits

Author SHA1 Message Date
Xiang Xiao
4d2f580568 apps/netutils/codecs/base64.c: Remove the big stack array 2019-01-27 07:17:07 -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
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
7b56c9c336 apps/include/netutils/ipmsfilter.h: Eliminate error generated by bad pre-processor logic. 2018-11-02 08:32:18 -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
3e81973cd5 include/netutils/netlib.h: Eliminate a warning about AF_UNSPEC and AF_INET not defined. 2018-08-03 10:50:24 -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
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
a7157d0e3c include/netutils/netlib.h: In order to avoid pre-processing warnings, NETLIB_SOCK_FAMILY must always be assigned a value, even if there is no real meaning value for it. 2017-11-03 09:57:33 -06:00
Gregory Nutt
6b9d23c6aa Correct and standardize some naming used in the previous commits. 2017-10-30 14:16:37 -06:00
Gregory Nutt
dafc88ed25 include/netutils/netlib.h: Broaden socket definitions of previous commit. 2017-10-30 14:11:42 -06:00
Gregory Nutt
51b369589b include/netutils/netlib.h: Add definitions needed when only local Unix domain sockets are supported. 2017-10-30 11:34:59 -06:00
Gregory Nutt
dc5be379a9 Squashed commit of the following:
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()
2017-09-20 10:35:56 -06:00
Gregory Nutt
fb804e3498 netlib_ipv[4|6]adaptor: Add a check to handle the case where the network device configuration changed asynchronously and the second IOCTL returns more data than the allocated buffer. 2017-09-20 06:52:05 -06:00
Gregory Nutt
450624c370 Squashed commit of the following:
netutils/netlib:  Add netlib_ipv6adaptor()
    netutils/netlib:  Add netlib_ipv4adaptor()
2017-09-19 15:21:13 -06:00
Gregory Nutt
e1b0821eb1 If only PF_IEEE802154 socket family is enabled, then must use SOCK_DGRAM. 2017-08-21 07:14:33 -06:00
Gregory Nutt
41ce937ed0 Changes to netlib and nsh so that you build build with PF_IEEE802154 enabled and 6LoWPAN disabled. 2017-08-20 09:09:47 -06:00
Gregory Nutt
c433e07a27 netutils/netlib: Add a help to decode short addresses. 2017-08-18 12:07:41 -06:00
Gregory Nutt
4ee084ab24 Remove references to obsoleted CONFIG_NETDEV_MULTINIC and CONFIG_NETDEV_MULILINK. 2017-08-08 18:37:00 -06:00
Gregory Nutt
3b8c97747d netutils/netlib: Fix netlib_nodaddrconv() so that its return type is the same as other address conversion functions. NSH: Correct parsing of ifconfig so that you can specify the HW address without specifying the IP address. 2017-08-02 14:30:34 -06:00
Gregory Nutt
c343fc618e apps/netutils/netlib: Add support for PktRadio IOCTL commands. 2017-08-02 12:40:50 -06:00
Gregory Nutt
28415d662b netutils/telnetd and users of telnetd: Add support for IPv6. 2017-06-27 09:14:13 -06:00
Gregory Nutt
82aad87122 netutils/telnetc: This a port of libtelnet to NuttX. 2017-06-26 14:37:54 -06:00
Anthony Merlino
c2ad1d2d1c Switches IEEE 802.15.4 based code to using byte arrays instead of uint16_t values for short address and PAN ID 2017-06-19 05:56:52 -04:00
Gregory Nutt
033b42789b NSH: Fix some ieee 802.15.4 initialization logic. It should not set the saddr or panid; those cannot be hard-coded but must come from the coordinator. 2017-06-17 10:04:18 -06:00
Sebastien Lorquet
ea1025ead2 DHCPC: Remove hard-coded interface device. Now passed as a parameter to dhcpc_open(). 2017-05-19 15:31:22 -06:00
Gregory Nutt
c2bdd49421 netlib and NSH: Add logic to set the IEEE802.15.4 PAN ID. 2017-04-19 18:10:39 -06:00
Gregory Nutt
ec6ff2791a netutils: Add a helper function to convert a string to a 6loWPAN node address 2017-04-08 12:19:35 -06:00
Gregory Nutt
4c56a28016 6loWPAN: Fix some conditional compilation 2017-04-07 07:24:09 -06:00
Gregory Nutt
194c2d86a8 6loWPAN: Add network IOCTL support to set the node address 2017-04-06 16:00:41 -06:00
Gregory Nutt
84444e4dcc netutils/nshlib: Add wrapper to get the wireless ESSID. 2017-03-13 14:16:26 -06:00
Gregory Nutt
0cb844e790 netutils/netlib: Add one wireless IOCTL wrapper. For now, this is just a test to be sure that the wireless IOCTL definitions are in place. 2017-03-13 10:16:20 -06:00
Pierre-Noel Bouteville
b3c90a4484 esp8266 update cosmetic and many bug fix 2016-12-04 08:35:02 -06:00
Pierre-Noel Bouteville
2c5b13834c Remove some garbage characters added by error. 2016-12-04 08:01:56 -06:00
Pierre-noel Bouteville
f8d425f0ad apps/netutils/cJSON: Eliminate some warnings 2016-07-12 16:27:14 -06:00
Gregory Nutt
68064514b9 uIP webserver: Fix a data declaration in a header file. 2016-07-11 13:05:55 -06:00
Gregory Nutt
cd741c82cf apps/include: Move all header files associated with modules in apps/system to apps/include/system 2016-07-01 06:48:22 -06:00
Gregory Nutt
4343a6ef8b Move apps/include/ftpc.h to apps/include/netutils/ftpc.h 2016-07-01 06:36:07 -06:00
Gregory Nutt
8217864a10 Add .gitignore file for ESP8266 2016-05-21 11:11:32 -06:00
Gregory Nutt
abdf703746 Add ESP8266 driver application. From Pierre-noel Bouteville 2016-05-21 09:13:23 -06:00
Gregory Nutt
1482732f18 NetLib: Move functions in netlib.c to separate files; improve some naming 2016-02-08 16:09:24 -06:00
Gregory Nutt
3f95e05bc2 NetLib: Add utility functions to support access to the ARP table 2016-02-08 11:44:59 -06:00
Vladimir Komendantskiy
387dda152c chat app and required update to the pppd client. 2016-01-29 17:00:59 -06:00
Gregory Nutt
a88338b41a Merge remote-tracking branch 'origin/master' into resolv.conf 2016-01-14 15:17:20 -06:00
Pelle Windestam
16c02a07d7 Add netlib_get_dripv4addr() and netlib_get_ipv4netmask() 2016-01-14 07:24:36 -06:00
Gregory Nutt
0d058af821 Step 1 in /etc/resolv.conf support 2016-01-13 15:08:59 -06:00