Commit Graph

916 Commits

Author SHA1 Message Date
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
Gregory Nutt 39a37d6aa8 Separate out psock_listen() and psock_accept() for internal use by the OS 2016-04-14 08:39:48 -06:00
Gregory Nutt 03a77c1d18 Remove most unused references to CONFIG_NET_MULTICAST. Rename other uses of CONFIG_NET_MULTICAST to avoid naming comflicts. 2016-03-20 13:16:17 -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 fdddebbffd net/: Finish IEEE802154->6LOWPAN renaming; remove PF_IEEE804154; Move 6LoWPAN menu to inside Internet Protocol Menu 2016-02-27 07:26:20 -06:00
Gregory Nutt 309beae2cd Move drivers/ieee802154 to drivers/wireless/ieee802154; rename include/nuttx/net ieee802154 to 6lowpan.h 2016-02-26 15:03:16 -06:00
Gregory Nutt 2f28ca86c2 Clean up some naming; rename net/ieee802154 to net/6lowpan 2016-02-26 10:08:36 -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 b0ea870bcc Remove some empty code section comments 2016-02-25 18:34:36 -06:00
Gregory Nutt 9ff645a298 drivers/ieee802154: Add a skeleton IEEE802154 driver 2016-02-25 15:11:30 -06:00
Gregory Nutt 0b441ff1f4 net/: Add basic IEEE 802.15-4 socket support 2016-02-25 14:01:22 -06:00
Gregory Nutt e4e6181098 net/: IEEE 802.15-4 basic build build structure. 2016-02-25 10:43:51 -06:00
Gregory Nutt bcbd8ee964 Networking: Cosmetic change 2016-02-24 19:02:51 -06:00
Gregory Nutt d19e9cc448 networking: cosmetic changes 2016-02-24 16:10:20 -06:00
Gregory Nutt 0fb035f76b Standardize some naming in code section comments 2016-02-21 18:09:04 -06:00
Gregory Nutt aa3e778dc6 nuttx/net: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 08:38:44 -06:00
Gregory Nutt 68ee9bcaed Refresh modules + plus minor clean-up from previous commits 2016-02-08 15:13:14 -06:00
Gregory Nutt 166ad58849 DHCPD no longer calls directly into the OS, but uses network IOCTL commands to modify the ARP table. Plus, fix a warning. 2016-02-08 12:08:18 -06:00
Gregory Nutt 0af9a197ac ARP: Add IOCTL commands to manage the ARP table 2016-02-08 11:17:22 -06:00
Gregory Nutt 0554de6c50 Networking: Simply devif_timer; Consolidate duplicated devif_poll logic 2016-02-05 07:36:07 -06:00
Gregory Nutt b5024263e9 Networking: Add a trivial cast 2016-02-03 18:12:19 -06:00
Gregory Nutt 41164740a5 Network: Improve half-second conversion 2016-02-03 13:08:19 -06:00
Gregory Nutt dea24c503a Networking: Remove the HSEC argument from devif_timer. 2016-02-03 12:12:41 -06:00
Gregory Nutt 7fb7bef2d2 Fix an error introduced with last IOB fix 2016-01-26 09:55:17 -06:00
Gregory Nutt 365e015010 iob_alloc_qentry() has the same issue that was recently fixed in iob_alloc() 2016-01-25 17:46:59 -06:00
Gregory Nutt 91b762aa86 Networking: Fix an error that I introduced with my last review changes 2016-01-22 17:35:06 -06:00
Andrew Webster 5c589e5b9c Net: use nlldbg since an iob can be added from an interrupt 2016-01-22 16:23:31 -06:00