Commit Graph

945 Commits

Author SHA1 Message Date
Pascal Speck
1b266096c7 Merged in iktek01/nuttx (pull request #284)
- fixed wrong assert on udp dgram send

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-03-21 13:33:12 +00:00
Pascal Speck
8f91c73304 - fixed wrong assert on udp dgram send 2017-03-17 15:13:03 +01:00
Gregory Nutt
aad82bcd9f Cosmetic change 2017-03-13 18:01:21 -06:00
Gregory Nutt
888cff30dc Fix some errors in the previous commit 2017-03-13 10:14:38 -06:00
Gregory Nutt
b808084e57 Move wireless IOCTLs from include/nuttx/net/ioctl to include/nuttx/wireless/wireless.h. Add some linux compatible structures to use with the IOCTL commands. 2017-03-13 09:51:31 -06:00
Gregory Nutt
430b52c977 Networking: Add registration support for integrated ieee80211 wireless drivers. Rename CONFIG_IEEE802154 to CONFIG_WIRELESS_IEEE8021514 following the convention of including the location of the configuration variable as a part of its name. 2017-03-12 12:50:41 -06:00
Janne Rosberg
3331e9c49a STM32 OTGHS host: stm32_in_transfer() fails and returns NAK if a short transfer is received. This causes problems from class drivers like CDC/ACM where short packets are expected. In those protocols, any transfer may be terminated by sending short or NUL packet. 2017-03-07 06:58:59 -06:00
Pascal Speck
1094f85bda Merged in iktek01/nuttx (pull request #231)
- fixed a nullptr-dereference on iob_clone

Approved-by: Gregory Nutt
2017-03-01 15:24:53 +00:00
Pascal Speck
40433bd7f7 - fixed a nullptr-dereference on iob_clone 2017-03-01 12:13:06 +01: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
518d19c0be Update comments 2017-01-18 07:53:28 -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
b52e4e5ecd Move cancellation point definitions to their own header file. 2016-12-10 09:08:26 -06:00
Gregory Nutt
bc3ca25cc7 Cancellation points: Close up some logic to eliminte some race conditions. 2016-12-10 08:36:58 -06:00
Gregory Nutt
38b9ab09d9 Fix copy-and-paste gone wrong. 2016-12-09 17:28:03 -06:00
Gregory Nutt
64ffd89ee1 Another missing header file inclusion. 2016-12-09 17:25:00 -06:00
Gregory Nutt
16be9b332e More cancellation points 2016-12-09 15:17:58 -06:00
Gregory Nutt
f45727dffc Fix some kruft left behind in last big commit. 2016-12-03 16:53:31 -06: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
00beb665f5 net/: Remove references to CONFIG_NET_MULTIBUFFER 2016-11-29 16:12:39 -06:00
Gregory Nutt
0804286ad3 arch/: Add option to use low-priority work queue to all Ethernet drivers in arch that support CONFIG_NET_NOINTS. 2016-11-19 09:20:01 -06:00
Gregory Nutt
936b55f608 drivers/net: Add option to use low-priority work queue to all drivers in drivers/net. Not yet added to all architecture-specific network drivers. 2016-11-18 09:22:49 -06:00
Gregory Nutt
b0dffdc2ca Fix a number of header files with mismatched 'extern C {' and '}' 2016-11-05 07:25:05 -06:00
Gregory Nutt
6ff6cca1a0 Fix some mispellings of semaphore 2016-11-03 17:48:36 -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
1dabbd8489 Costmetic changes 2016-10-24 16:18:30 -06:00
Vladimir Komendantskiy
e5cffc40fc NET_TUN=y => NET_MULTIBUFFER=y 2016-09-20 13:06:47 -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
9a44f3017b Fix a few typos in the last commit 2016-07-19 13:40:54 -06:00
Gregory Nutt
6e6c04f778 Rename file_poll as fdesc_poll. The file_ namespace is used for other things. 2016-07-15 11:21:11 -06:00
Gregory Nutt
88a03ae3ec Break out internal interface psock_ioctl() 2016-07-06 07:30:09 -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
a81a467a40 Networking: In both IPv6 and IPv4 incoming logic: (1) Should check if the packet size is large enough before trying to access the packet length in the IP header. (2) In the comparison between the IP length and the full packet length, need to subtract the size of the link layer header before making the comparison or we will get false positives (i.e., the packet is really too small). 2016-06-09 13:16:47 -06:00
Gregory Nutt
4f208600aa Replace confusing references to uIP with just 'the network' 2016-05-30 09:31:44 -06:00
Steve
bd3ef36eda SUMMARY
-------
   This patch enhances networking support for the simulation under Linux.
   Includes updated support for Linux TUN/TAP, and the addition of support for
   Linux bridge devices.

CHANGES
-------
   o Check to see if the d_txavail callback is present before calling it in
     the arp send code.  This prevents a segfault when simulating the telnetd
     daemon with arp send enabled.

   o Adjust the simulation's netdriver_loop() so it will detect and respond to
     ARP requests.

   o Do not attempt to take the tap device's hardware address for use by the
     simulation.  That hardware address belongs to the host end of the link,
     not the simulation end.  Generate a randomized MAC address instead.

   o Do not assign an IP address to the interface on the host side of the TAP
     link.

   + Provide two modes: "host route" and "bridge".

   + In host route mode, maintain a host route that points any traffic for the
     simulation's IP address to the tap device.  In this mode, so long as the
     simulation's IP is a free address in the same subnet as the host, no
     additional configuration will be required to talk to it from the host.
     Note that address changes are handled automatically if they follow the
     rule of if-down/set-address/if-up, which everything seems to.

   + In bridge mode, add the tap device to the specified bridge instance.  See
     configs/sim/NETWORK-LINUX.txt for information and usage examples.  This
     enables much more flexible configurations (with fewer headaches), such as
     running multiple simulations on a single host, all of which can access
     the network the host is connected to.

   o Refresh configurations in configs/sim where CONFIG_NET=y.  They default
     to "host route" mode.

   o Add configs/sim/NETWORK-LINUX.txt

CAVEATS
-------
   - The MAC address generation code is extremely simplistic, and does not
     check for potential conflicts on the network.  Probably not an issue, but
     something to be aware of.

   - I was careful to leave it in a state where Cygwin/pcap should still work,
     but I don't have a Windows environment to test in.  This should be
     checked.

   - I don't know if this was ever intended to work with OS X.  I didn't even
     try to test it there.

NOTES
-----
   - Was able to get telnetd working and simulate nsh over telnet, but only so
     long as listen backlogs were disabled.

     There appears to be a bug in the backlog code where sockets are being
     returned in SYN_RCVD state instead of waiting until they're ESTABLISHED;
     if you perform an immediate send after accepting the connection, it will
     confuse the stack and the send will hang; additionally, the connection
     will never reach ESTABLISHED state.

     Can be worked around by adding a sleep(1) after the accept in telnetd.  I
     don't have the necessary knowledge of the IP stack to know what the
     correct fix is.
2016-05-20 17:36:14 -06:00
Gregory Nutt
e523c93391 Several Makefiles: Add .PHONY definitions to prevent 'clean up to date' message weirdness. 2016-05-10 15:44:06 -06:00
Gregory Nutt
3ca5a94515 VNC: Add basic message receipt logic 2016-04-17 09:17:37 -06:00