Gregory Nutt
bb92b98dc0
net/arp/arp_out.c: Fix some backward logic in an if condition.
2018-08-29 10:51:44 -06:00
dongjianli
09c689ea15
net/icmp and icmpv6: Fix failure to poll ICMP socket issue.
2018-08-26 15:37:03 -06:00
Xiang Xiao
40b0e98d25
net/icmp/icmp_conn.c and net/icmpv6/icmpv6_conn.c: Change the type of id in icmpv[6]_findconn to uint16_t
2018-08-26 15:28:02 -06:00
dongjianli
23f14c2660
net/usrsock: Add the listen/accept/getpeername/ioctl support
2018-08-26 15:15:48 -06:00
Xiang Xiao
42f7c3e927
net/usrsock: Optimize option dependence
2018-08-26 15:05:46 -06:00
ligd
3ae93762b7
net/usrsock/usrsock.h: Fix re-definitions of struct iovec.
2018-08-26 15:03:32 -06:00
Xiang Xiao
31b3dc6c27
net/usrsock: Combine some the duplicated logic.
2018-08-26 15:01:53 -06:00
Gregory Nutt
67193ff5c4
net/usrsock/: Correct of semphore usage issues.
2018-08-26 14:59:04 -06:00
dongjianli
b48804cfc2
net/netdev/netdev_ioctl.c: Add si_ioctl callback and net_ioctl_arglen so usrsock could forward the ioctl to the remote end
2018-08-26 14:54:26 -06:00
Xiang Xiao
3eedabfded
net/socket/getsockname.c: Add psock_getsockname function
2018-08-26 14:43:13 -06:00
Xiang Xiao
fd1405d976
netdev_findby_ipv[4|6]addr return netdev_default() as last resort but don't return loopback device if another network device is in the UP state.
2018-08-26 14:40:47 -06:00
zhangyuan7
da1a323f34
net/tcp/tcp_monitor.c: Fix net unlock issue when tcp close. This bug could leave the net locked.
2018-08-26 14:32:06 -06:00
Xiang Xiao
49548da297
net/Kconfig: Uncomment the prompt of NET_SLIP_PKTSIZE
2018-08-26 14:28:35 -06:00
Xiang Xiao
bcf9360e5f
Move psock check from [get|set]sockopt to psock_[get|set]sockopt
2018-08-26 14:25:54 -06:00
Xiang Xiao
3f50451046
fs/vfs/fs_fcntl.c, net/socket/net_dupsd.c, and net/socket/net_vfcntl.c: Add file_fcntl, psock_fcntl, and psock_dupsd for use within the kernel.
2018-08-26 13:31:18 -06:00
Gregory Nutt
5d042b41c3
Rename the file devif_loopbackout.c to devif_loopback.c
2018-08-25 08:36:02 -06:00
Gregory Nutt
9bc951a335
Rename devif_loopback_out to devi_loopback
2018-08-25 08:33:21 -06:00
Gregory Nutt
3bf96c8e7e
net/arp: Improve arp_find() commit 9774d35010
to reduce the amount and frequency of data copies.
2018-08-25 07:12:21 -06:00
Gregory Nutt
324e1412ef
net/arp: Costmetic update to comments.
2018-08-24 17:57:15 -06:00
Gregory Nutt
9774d35010
net/arp: Make the function arp_find() thread-safe. It now returns a copy of the ARP table entry, rather than a potentially unstable reference to the ARP table entry.
2018-08-24 17:36:08 -06:00
Xiang Xiao
0074afa0ac
net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire.
2018-08-24 09:21:33 -06:00
Xiang Xiao
f74ddd2a04
net/arp: arp_find() now checks if the target IP belongs to one of the local network devices.
2018-08-24 09:04:29 -06:00
Xiang Xiao
e1202d2ed3
Replace all ASSERT with DEBUGASSERT to save the code space
2018-08-24 06:58:30 -06:00
Gregory Nutt
af9fb080e0
fix a spelling error
2018-08-21 10:33:16 -06:00
Gregory Nutt
2e0860e193
net/procfs/netdev_statistics.c: Was not handling the output correct for the case of an IEEE 802.11 device.
2018-08-21 09:08:29 -06:00
Gregory Nutt
4b92f71a82
net/netdev/netdev_register.c: Eliminate a newly introduced warning.
2018-08-14 13:54:10 -06:00
Gregory Nutt
b00a2e5c54
net/: Change order of logic: Select the user-defined interface name format BEFORE determining the minor device number. Otherwise, the devault interface name will be used.
2018-08-14 08:40:06 -06:00
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 d944388888
. 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