Commit Graph

180 Commits

Author SHA1 Message Date
Gregory Nutt 7cb34d969d 6loWPAN: More fixes from early debug. 2017-04-03 15:25:36 -06:00
Gregory Nutt 1b6630ee75 6loWPAN: Fix compile errors and warnings when building the complete 6loWPAN configuration. 2017-04-02 17:46:22 -06:00
Gregory Nutt 76406af71b 6loWPAN: Add support for sendto() 2017-04-02 11:15:46 -06:00
Gregory Nutt 732f0855c6 6loWPAN: Fleshes out framwork for IEEE802.15.4 send. But still has some gaping holes. 2017-03-31 15:09:07 -06:00
Jussi Kivilinna cd3c9634c8 Add user-space networking stack API (usrsock)
User-space networking stack API allows user-space daemon to
provide TCP/IP stack implementation for NuttX network.

Main use for this is to allow use and seamless integration of
HW-provided TCP/IP stacks to NuttX.

For example, user-space daemon can translate /dev/usrsock
API requests to HW TCP/IP API requests while rest of the
user-space can access standard socket API, with socket
descriptors that can be used with NuttX system calls.
2017-03-31 08:58:14 -06:00
Gregory Nutt 64933246c3 6loWPAN: Tie 6loWPAN send into common socket send logic. 2017-03-28 14:08:54 -06:00
Gregory Nutt ba2b345990 Remove a few remaining use of the obsolteted 'Compilation Switches' program section 2017-01-22 08:57:18 -06:00
Gregory Nutt 9f7d332028 Minor changes from the review of the last PR 2017-01-18 07:32:27 -06:00
Pascal Speck 2e074ca4f9 - Fixed some issues that prevented ipv6 to work with ipv4 enabled. 2017-01-18 10:57:15 +01:00
Gregory Nutt 7467329a98 Eliminate CONFIG_NO_NOINTS. Lots of files changed -> lots of testing needed. 2016-12-03 16:28:19 -06:00
Gregory Nutt 2d057c28c8 net: Disable priority inheritance on all semaphores used for signaling 2016-11-03 12:17:02 -06:00
Gregory Nutt 9c3bade7b4 net/tcp: tcp_ipvX_bind() not actually using the ported selected with port==0. Also removes duplicate call to pkt_input(). Issues noted by Pascal Speck. 2016-08-30 07:59:57 -06:00
Gregory Nutt 2a751068e6 Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err(). 2016-06-20 12:44:38 -06:00
Gregory Nutt 43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt d40a473f72 Without lowsyslog() *llwarn() is not useful. Eliminate and replace with *warn(). 2016-06-20 09:37:08 -06:00
Gregory Nutt 2b445ddccc Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. 2016-06-20 08:57:08 -06:00
Jakub Łągwa 338b915008 While working with version 7.10 I discovered a problem in TCP stack that could be observed on high network load. Generally speaking, the problem is that RST flag is set in unnecessary case, in which between loss of some TCP packet and its proper retransmission, another packets had been successfully sent. The scenario is as follows: NuttX did not receive ACK for some sent packet, so it has been probably lost somewhere. But before its retransmission starts, NuttX is correctly issuing next TCP packets, with sequence numbers increasing properly. When the retransmission of previously lost packet finally succeeds, tcp_input receives the accumulated ACK value, which acknowledges also the packets sent in the meantime (i.e. between unsuccessful sending of lost packet and its proper retransmission). However, variable unackseq is still set to conn->isn + conn->sent, which is truth only if no further packets transmission occurred in the meantime. Because of incorrect (in such specific case) unackseq value, few lines further condition if (ackseq <= unackseq)is not met, and, as a result, we are going to reset label. 2016-06-20 06:55:29 -06:00
Gregory Nutt 7d0950bb22 net/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network events are not errors. 2016-06-12 07:09:37 -06:00
Gregory Nutt f4fcdcdb4d net/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-11 17:37:21 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt e99301d7c2 Rename *lldbg to *llerr 2016-06-11 14:55:27 -06:00
Gregory Nutt 86b79b33cf Reserver the name 'err' for other purposes 2016-06-11 14:40:07 -06:00
Gregory Nutt 1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt c98f00a93b Update comments; trivial addtion to a document. 2016-06-10 09:36:59 -06:00
Gregory Nutt 4f208600aa Replace confusing references to uIP with just 'the network' 2016-05-30 09:31:44 -06:00
Gregory Nutt 2dd9777c7e Fix a backward conditional test introduced with the last commit 2016-03-20 09:58:07 -06:00
Gregory Nutt 00b44959ea TCP poll: TCP poll events can really only being processed when the poll from the correct device is received. 2016-03-20 08:39:15 -06:00
Gregory Nutt 4639cdd894 TCP timeouts: Fix some logic when there are multiple network interfaces. In this case, TCP timeout events can really only being processed when the poll from the correct device is received. 2016-03-20 08:19:00 -06:00
Gregory Nutt 2c95fef501 Remove some empty code section comments 2016-02-26 07:35:55 -06:00
Gregory Nutt 8db55f6493 Back out most of previous commit 2016-02-26 06:45:37 -06:00
Gregory Nutt 0b441ff1f4 net/: Add basic IEEE 802.15-4 socket support 2016-02-25 14:01:22 -06:00
Gregory Nutt 0fb035f76b Standardize some naming in code section comments 2016-02-21 18:09:04 -06:00
Andrew Webster 49e5cc5a6f TCP: check for an active connection before cleaning it up
If there is no active connection (e.g. it is waiting in accept), then
the connection object, which doesn't yet exist, should not be cleaned
up when the socket is closed.
2016-01-22 16:22:09 -06:00
Andrew Webster 5e3023bef1 TCP: return from write when there is no buffer space
During a write, if there is no more buffer space for the user data,
return the amount that was written instead of waiting until there
is free space.  If nothing has been written yet, then block as before.

This solves a deadlock that occurs if the user data is too large to
fit in the available buffer:  the write thread will block before any
data is added to the write queue, leaving no possibility that more
buffers will free up when they are ACKed (since they have not yet been
sent).  The write thread will then block forever and hold all of the
buffers.
2016-01-22 16:19:20 -06:00
Andrew Webster cdd187a7f3 TCP: check for sndcb before using it 2016-01-22 15:54:45 -06:00
Andrew Webster df211ee46a TCP: add writable check during poll
When a poll requesting POLLOUT happens, the poll should return
immediately if a write will not block.  This change adds that, as
opposed to the old behaviour of blocking until a timer from the
Ethernet driver eventually triggers the poll to complete.

This is only implemented for buffered TCP.  Unbuffered TCP should
behave as before.
2016-01-22 15:52:14 -06:00
Andrew Webster 99f5fcda70 iTCP: use lowlevel syslog to avoid infinte recursion
If stdout is a socket (e.g. telnet), then the debug message will cause
more TCP data to be sent, which generates another message, and so on
2016-01-22 15:41:48 -06:00
Gregory Nutt f348e68069 Update to use 64-bit timer when available 2016-01-21 11:54:26 -06:00
Gregory Nutt 6209c51206 net/: More clean-up of spacing/alignment issues 2015-10-08 15:10:04 -06:00
Gregory Nutt 0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt d700793077 Fix a compile error when IPv6 is enabled 2015-09-07 16:34:25 -06:00
Alan Carvalho de Assis f10a103108 Fix tcp_send_unbuffered when NET_ETHERNET is not defined. 2015-09-07 13:31:35 -06:00
Gregory Nutt 9c66bde5b0 Fix typo in pre-processor command noted by Pierre-noel Bouteville. Also move # of pre-processior command to column 1 2015-09-05 09:10:48 -06:00
Gregory Nutt 14297afb83 Cosmetic fix to break up long line 2015-09-03 07:33:50 -06:00
Gregory Nutt 36f4d0e9fc Fix a error in some comments 2015-09-02 20:03:28 -06:00
Gregory Nutt 0e2986f131 net/tcp: The logic that binds a specific networkd device to a connection was faulty for the case of multiple network devices. On bind(), the local address should be used to associate a device with the connection (if the local address is not INADDR_ANY); On connect(), the remote address should be used (in case the local address is INADDR_ANY). On accept(), it does not matter but the remote address is the one guarenteed to be available. 2015-09-02 19:48:31 -06:00
Gregory Nutt 9fcad39a45 Trivial typo fix 2015-09-02 10:09:33 -06:00
Gregory Nutt 63071a563a Costmetic changes 2015-08-27 10:38:43 -06:00