Gregory Nutt
4a724b1f3c
net/: Remove all references to CONFIG_NET_USER_DEVFMT. That feature is now unconditionally enabled. This was done because (1) the feature does not require very much additional memory, and (2) it causes confusion in the configuration due to the additional complexity. And network drivers that fail to zero the device structure interface name field (d_ifname) because calling netdev_register() will, however, get a nasty surprise.
2018-08-14 08:01:52 -06:00
Gregory Nutt
8c61c2f31b
Remove trailing spaces at the end of lines.
2018-08-13 07:39:38 -06:00
Gregory Nutt
c2267a57a0
Kconfig files: Fix several errors noted by Alex Denisov in Bitbucket issue 115.
2018-08-05 10:48:02 -06:00
Gregory Nutt
056d704cf9
This commit brings in a fragmentary, experimental implementation of NETLINK sockets. There is not too much to that socket support on this initial commit, just the netlink socketer framework. However, I decided to bring it into master because there is a enough that I would not want to lose what is in place. And since it is dependent on CONFIG_EXPERIMENATL, its presence on master should be innocuous.
...
Squashed commit of the following:
net/netlink: Mark netlink support as EXPERIMENTAL.
net/netlink/netlink_sockif.c: Add netlink_getpeername to the socket interface.
net: Add getpeeername() support for netlink sockets.
include/netpacket/netlink.h: Add a few more definitions and structures used at the NetLink interface. Still missing many.
net/netlink: Add basic framework for Netlink socket support.
include/: Add basic Netlink definitions.
2018-08-03 13:22:36 -06:00
Masayuki Ishikawa
ac5b2ea049
Merged in masayuki2009/nuttx.nuttx/fix_tcp_statistics (pull request #703 )
...
net/tcp: Remove g_netstats.tcp.syndrop++ from tcp_data_event()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-03 01:25:53 +00:00
Gregory Nutt
ac5618239c
Fix some errors in last commits found in build testing.
2018-07-19 10:30:52 -06:00
Gregory Nutt
788c5bf1dd
Forgot to add files before previous commit.
2018-07-19 09:07:20 -06:00
ligd
e840038f2d
net/ and include/nuttx/net: Add getpeername() support
2018-07-19 07:16:30 -06:00
Jake Choy
b1daa22040
net/udp/udp_finddev.c: Fix for network byte-order issue when checking if an address is a multicast address.
2018-07-17 11:18:11 -06:00
Alan Carvalho de Assis
283b73edc5
Fix lots of typos in C comments and Kconfig help text
2018-07-08 18:24:45 -06:00
Gregory Nutt
1783d344dc
Eliminate some new warnings found in build testing.
2018-07-08 13:44:39 -06:00
Gregory Nutt
6571d4fa37
Update some comments.
2018-07-07 15:23:46 -06:00
Gregory Nutt
427b3b8fcb
Squashed commit of the following:
...
net/utils: return from net_breaklock() was being clobbered.
net/: Replace all calls to iob_alloc() with calls to net_ioballoc() which will release the network lock, if necessary.
net/utils, tcp, include/net: Separate out the special IOB allocation logic and place it in its own function. Prototype is available in a public header file where it can also be used by network drivers.
net/utils: net_timedwait() now uses new net_breaklock() and net_restorelock().
2018-07-07 08:26:13 -06:00
Gregory Nutt
75cc19ebb4
net/tcp: Fix a deadlock condition that can occur when (1) all network logic runs on a single work queue, (1) TCP write buffering is enabled, and (2) we run out of IOBs. In this case, the TCP write buffering logic was blocking on iob_alloc() with the network locked. Since the network was locked, the device driver polls that would provide take the write buffer data and release the IOBs could not execute. This fixes the problem by unlocking the network lock while waiting for the IOBs.
2018-07-06 19:49:05 -06:00
Gregory Nutt
23a8af2069
Trivial update to some comments.
2018-07-06 17:37:26 -06:00
Gregory Nutt
5764d5a529
net/tcp: Back out part of commit d9443888881e5d638a08ab3f6fdc203c9f9f475c. I see a few places that say that the maximum receive window size is 32,767 (INT16_MAX), but most say that it is 65,535 (UINT16_MAX).
2018-07-05 17:41:01 -06:00
Gregory Nutt
d944388888
configs/viewtool-stm32f107: Add a TCP performance test using apps/examples/tcpblaster.
2018-07-05 16:08:03 -06:00
Gregory Nutt
73c4b1610b
net/tcp: Set the default TCP MSS to the value required by RFC 879 and never change it under any circumstance unless the remote host requests a larger MSS via an option the TCP header.
2018-07-05 10:54:45 -06:00
Gregory Nutt
30657b769f
net/udp/udp_setsockopt.c: Remove a warning about an uninitialized variable.
2018-07-04 18:28:17 -06:00
Gregory Nutt
e1f8b3ff3b
Update some help comments in two Kconfig files.
2018-07-04 15:36:31 -06:00
Gregory Nutt
22cd0d47fa
This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
...
This makes the user interface a little hostile. People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header). A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length. Instead, we define the packet buffer size then derive the MTU.
The MTU is not common currency in networking. On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP). Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes. So we should be all good and without the recurring 14 byte error in MTU's and MSS's.
Squashed commit of the following:
Trivial update to fix some spacing issues.
net/: Rename several macros containing _MTU to _PKTSIZE.
net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE. This is not the MTU which does not include the size of the link layer header. This is the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename the file d_mtu in the network driver structure to d_pktsize. That value saved there is not the MTU. The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header. The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt
254924029b
net/udp: Restore some legacy behavior that was lost with the implementation of CONFIG_NET_UDP_BINDTODEVICE: If no device has a local address when the broadcast packet is sent and the UDP socket is not bound to a device, there select some arbitrary device. This is certainly lunacy in the case where there are multiple network devices registered because the wrong device will probably be returned. It works find, however, for the legacy case where only a single network device is registered.
2018-07-04 07:35:51 -06:00
Gregory Nutt
3e9ba72441
net/sixlowpan: Fix typo uint16->uint16_t. Also picks up some cosmetic USB host changes.
2018-07-01 10:05:15 -06:00
Gregory Nutt
e59b26370d
Squashed commit of the following:
...
Fix a few typo/compilation problems.
net/: Remove all CONFIG_NET_xxx_TCP_RECVWNDO configuration variables. They were used only to initialize the d_recwndo of the network device structure which no longer exists.
net/: Remove the device TCP receive window field (d_recvwndo) from the device structure. That value is no longer retained, but is calculated dynamically.
Remove some dangling references to CONFIG_NET_TCP_RWND_CONTROL.
net/tcp: Take read-ahead throttling into account when calculating the TCP receive window size.
net/tcp: tcp_get_recvwindow() now returns the receive window size directly (vs. indirectly via the device structure).
net/tcp: Remove CONFIG_NET_TCP_RWND_CONTROL. TCP window algorithm is now trigged only by CONFIG_NET_TCP_READAHEAD.
2018-07-01 07:59:33 -06:00
Gregory Nutt
b32d8b1714
net/tcp and sixlowpan: Separate the the TCP receive window calculations to a separate header file. It must also be used by the special 6LoWPAN TCP logic.
2018-06-30 20:50:07 -06:00
Gregory Nutt
cf3dd19352
Fix a typo.
2018-06-26 07:01:27 -06:00
Gregory Nutt
8e6afb958a
net/udp: If the interface index of the device bound to a UDP socket is no longer valid because the device has been unregistered, then un-bind the UDP socket.
2018-06-26 06:53:13 -06:00
Gregory Nutt
e2c442cdcb
net/procfs: Fix a design REVISIT from the integration the IFINDEX logic and the existing ifconfig/procfs logic.
2018-06-25 17:42:56 -06:00
Gregory Nutt
bdb73a60ca
Fix some errors found in build testing.
2018-06-25 17:06:29 -06:00
Gregory Nutt
c439b93627
net/procfs and netdev: Fix some problems with ifconfig introduced with last changes. Also picks up one of Sebastien's changes that did not make it it before. net/udp: Fixes a DEBUGASSERT.
2018-06-25 17:06:11 -06:00
Sebastien Lorquet
65be13bffe
net/udp: Finish support for the UDP_BINDTODEVICE protocol socket option
2018-06-25 15:07:53 -06:00
Gregory Nutt
2a29fe0223
net/netdev: Fix.. Too many calls to net_unlock()
2018-06-25 14:21:33 -06:00
Gregory Nutt
872a11b4a0
Correct some errors found in build testing.
2018-06-25 14:16:19 -06:00
Gregory Nutt
5a0cf3c9a8
net/netdev: Add an algorithm to prevent an interface index from being reused until all network interfaces have by assigned once. The prevents removable devices from being removed, unregistered and re-installed, re-registered and keeping the same interface index.
2018-06-25 12:57:42 -06:00
Gregory Nutt
c65e1aa3df
Squashed commit of the following:
...
syscalls/: Add syscall support for if_nametoindex() and if_indextoname()
net/: Update some comments.
2018-06-25 12:41:28 -06:00
Gregory Nutt
7c1394d814
Squashed commit of the following:
...
net/netdev: Add implementation of if_nametoindex() and if indextoname().
net/pkt: Raw AF_PACKET sockets now depend on CONFIG_NETDEV_IFINDEX.
net/procfs: Tweak to handle traversal of interfaces if CONFIG_NETDEV_IFINDEX is not defined.
net/netdev.h: Update netdev_findbyaddr() to use the assigned device index.
Trivial typo fix
net/netdev: Add support for assigned an interface index to a device when it is regisgtered.
2018-06-25 12:08:10 -06:00
Gregory Nutt
589e3aa54e
net/udp: Fix a whole in the address lookup logic.
2018-06-25 07:51:21 -06:00
Gregory Nutt
25686a9dac
Remove if #if 0 logic. Update some comments.
2018-06-24 15:50:45 -06:00
Gregory Nutt
715d561c41
Trivial spelling corrections in comments; update some comments in a Kconfig file.
2018-06-24 15:01:49 -06:00
Gregory Nutt
0786b5d053
net/tcp: Re-think CONFIG_NET_TCP_RWND_CONTROL TCP windowing controls.
2018-06-24 14:46:12 -06:00
Gregory Nutt
433f29eea2
net/: Rename CONFIG_TCP_REASSEMBLY to CONFIG_IPv4_REASSEMBLY. Add some fixes to get a clen compile with CONFIG_IPv4_REASSEMBLY enabled. There are several problems with the current implementation: It is untested (and depends on CONFIG_EXPERMIMENTAL). It uses some Ethernet specific definitions (and depends on CONFIG_NET_ETHERNET). There is only a single reassembly buffer. The last two issues prevent use of this feature in any context where IPv4 packets may be reassembled for multiple network devices concurrently).
2018-06-24 12:06:12 -06:00
Gregory Nutt
1acfac3eb6
net/: More fixes to wrong comments from old change from the interrupt driven network to the work-queue driven network.
2018-06-23 15:03:01 -06:00
Gregory Nutt
aabdc00e8c
net/: Fix some incorrect comments that go back for years (but have also been cloned in newer files). The network was once interrupt driver, but now runs on the work queue with a semaphore to enforce mutual exclusion.
2018-06-23 14:09:06 -06:00
Gregory Nutt
a0e169ad7b
net/: Fix a sixlowpan typo bug recently introduced; Rename g_ipv6_allzeroaddre with the more meaning g_ipv6_unspecaddr since the all-zero address is the IPv6 unspecified address (sometime IN6_ADDR_ANY). Remove more inline tests for IPv6 multicast with tcommint net_is_addr_mcast() macro. Update some comments.
2018-06-23 12:53:27 -06:00
Gregory Nutt
5bb216fb90
net/: There are many different checks for IPv6 multicast addresses. Most of the checks are different. RFC 3513 clearly specifies how to detect an IPv6 multilcast address: they should begin with 0xffxx. I did not change some of the checks in ipv6_input.c, however. In that file, the comments indicate that the code should only pick of certain mulicast address that begin withi 0xff02.
2018-06-23 10:13:38 -06:00
Gregory Nutt
706a6a2c19
Trivial typo fixes
2018-06-23 06:20:25 -06:00
Gregory Nutt
daa04c2eae
net/udp: Fix yet another confusion between raddr and laddr introduced in a recent change.
2018-06-22 10:14:47 -06:00
Gregory Nutt
66db9f09f6
Fix a typo introduced in 1b6990b69f974b9ef299c8707713cef80b944374. Also some minor design improvment.
2018-06-22 10:09:47 -06:00
Gregory Nutt
1b6990b69f
net/udp: When sending a broadcast (or multicast) packet do not attempt to look up the device by the destination IP address. Rather, use the locally bound address for these cases to select the correct network device.
2018-06-22 08:19:17 -06:00
Gregory Nutt
668df010ec
Committed defconfigs for working configurations should never have CONFIG_EXPERIMENTAL set because the opens the doors for untested and incomplete configurations. Conversely, if there are released configurations that use features with dependencies on CONFIG_EXPERIMENTAL, then those configurations are in use and those dependencies should be removed:
...
graphics/vnc/server/Kconfig: Remove a dependency on CONFIG_EXPERIMENTAL
net/tcp/Kconfig: Remove a dependency on CONFIG_EXPERIMENTAL
wireless/bluetooth/Kconfig: Remove a dependency on CONFIG_EXPERIMENTAL
configs/lc823450-xgevk/audio/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/bt/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/ipl2/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/nsh/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/rndis/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/usb/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/lpcxpresso-lpc54628/netnsh/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/moxa/nsh/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/olimex-stm32-p407/module/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/photon/wlan/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sabre-6quad/smp/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sam4cmp-db/nsh/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sama5d4-ek/elf/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sama5d4-ek/knsh/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/samv71-xult/module/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/samv71-xult/vnc/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/samv71-xult/vnxwm/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sim/bluetooth/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sim/pf_ieee802154/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sim/pktradio/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sim/sixlowpan/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sim/traveler/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/sim/userfs/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/stm32f4discovery/hciuart/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/stm32f4discovery/pseudoterm/defconfig: Remove CONFIG_EXPERIMENTAL=y
configs/teensy-3.x/usbnsh/defconfig: Remove CONFIG_EXPERIMENTAL=y
2018-06-17 10:30:01 -06:00