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 1b6990b69f
. 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
Gregory Nutt
8fdbb1e0a4
Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
...
Squashed commit of the following:
sched: Rename all use of system_t to clock_t.
syscall: Rename all use of system_t to clock_t.
net: Rename all use of system_t to clock_t.
libs: Rename all use of system_t to clock_t.
fs: Rename all use of system_t to clock_t.
drivers: Rename all use of system_t to clock_t.
arch: Rename all use of system_t to clock_t.
include: Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Gregory Nutt
a186383f2a
Recent changes to UDP in order to correct problems with UDP connection mode introduced a new bug: The 'to' address passed to sendto() must now be NULL in connection mode. But there are errors because there was one place where the 'to' address was still being used.
...
This commit adds logic to first check for UDP connection mode. If the UDP socket is connected, then the NULL 'to' address is ignored and saved connection address is used instead.
2018-05-17 07:46:09 -06:00
Anthony Merlino
5e2d7c227d
net/sixlowpan: TCP send should have PSH and ACK flags set when sending. This matches the standard network (Ethernet) TCP send logic.
2018-05-17 06:45:46 -06:00
Anthony Merlino
19ebdb4ef9
Merged in antmerlino/nuttx/sixlowpan_hc06_fix (pull request #644 )
...
sixlowpan: Preserve big-endian (network order) when uncompressing address.
This change is the counterpart to another recent endianness fix that occurred on compression of the ip address.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-05-15 17:32:40 +00:00
Gregory Nutt
4e8e726ca3
net/udp: Trivial correct in comments due to copy-paste.
2018-05-14 06:36:59 -06:00
Gregory Nutt
3ee61fb890
net/udp: Associated with last commit. Make sure that the new connection flag is cleared when a new UDP connection structure is allocated.
2018-05-13 10:03:55 -06:00
Gregory Nutt
fb8cf9373c
net/udp: Resolve race condition in connection-less UDP sockets with read-ahead buffering.
...
In connection-mode UDP sockets, a remote address is retained in the UDP connection structure. This determines both there send() will send the packets and which packets recv() will accept.
This same mechanism is used for connection-less UDP sendto: A temporary remote address is written into the connection structure to support the sendto() operation. That address persists until the next recvfrom() when it is reset to accept any address.
When UDP read-ahead buffering is enabled, however, that means that the old, invalid remote address can be left in the connection structure for some time. This can cause read-ahead buffer to fail, dropping UDP packets.
Shortening the time between when he remote address is reset (i.e., immediately after the sendto() completes) is not a solution, that does not eliminate the race condition; in only makes it smaller.
With this change, a flag was added to the connection structure to indicate if the UDP socket is in connection mode or if it is connection-less. This change effects only UDP receive operations: The remote address in the UDP connection is always ignored if the UDP socket is not in connection-mode.
No for connection-mode sockets, that remote address behaves as before. But for connection-less sockets, it is only used by sendto().
2018-05-13 09:57:34 -06:00
Gregory Nutt
d6f9000077
net/socket: Missing semicolon in last fstat() change.
2018-04-30 09:57:43 -06:00
Gregory Nutt
fd844f8eac
include/nuttx/wireless/bluetooth: Move Bluetooth header files from include/nuttx/wireless to include/nuttx/wireless/bluetooth for symmetry with other wireless technologies.
2018-04-29 12:43:09 -06:00
Gregory Nutt
efed1b6aa1
net/udp: Remove an unused variable warning. Add some comments.
2018-04-27 18:26:38 -06:00
Gregory Nutt
f5d0fc7447
fs/vfs and net/udp: Repartition logic of commit 0c963449d6
, moving into net/udp. Add support to handle connected UDP sockets. The correct 'optimal blksize' to return is the MSS. The MTU is always too big.
2018-04-27 08:36:25 -06:00
Gregory Nutt
119ce8730f
net/udp: Fix a backward conditional test added in commit 434da18cd7
.
2018-04-27 06:35:51 -06:00
Gregory Nutt
434da18cd7
net/udp: Correct an error introduce in recent fixes for UDP connected sockets. The interaction between psock_udp_send() and psock_udp_sendto() was perverse: It should always pass a NULL destinatino address.
2018-04-26 21:58:09 -06:00
hhuysqt
144e335b85
drivers/wiresless/ieee80211: Correct some initialization problems with BCM43362 chip. Adds BCM43428 support. arch/arm/src: Add support for SDIO card to SDIO driver.
...
Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
include/nuttx/wireless/ieee80211: Cosmetic, coding standard changes from review of last merge.
drivers/wireless/ieee80211: Cosmetic, coding standard changes from review of last merge.
configs/photon: Cosmetic, coding standard changes from review of last merge.
arch/arm/src/stm32: SDIO changes from last review: Fix a few long lines and other coding standard issues; Make additions for SDIO card support dependent on a configuration option.
Author: hhuysqt <hyq9606@126.com>
Return IEEE 802.11 MAC address just as ethernet does
Modifyed bcmf_board_setup_oob_irq declaration
Modified OOB ISR function types
Add some logic according to WICED SDK
Bug fixed: data_offset counts in 4-bytes
Add BCM43438 logic for future developement
Add tips on using telnet
Use SDIO in-band interrupt instead of OOB interrupt, because Photon seems to unconnect the OOB interrupt line...
add SDIO in-band interrupt logic
2018-04-26 08:10:23 -06:00
Gregory Nutt
cfc5f86862
net/udp: Minor update from review of 091e3f732e
. In connect(), AF_UNSPEC is used to disconnect UDP socket. However, initial commit lacked logic to mark the socket as disconnected.
2018-04-25 10:13:59 -06:00
Gregory Nutt
091e3f732e
net/udp: Fix several issues using connected UDP sockets: sendto() should not accept and address. Normally send() should be used instead. recvfrom() is no longer necessary. recvfrom() and poll() should not reset to accept any addresses but should, instead, only accept inputs and events from the connected remore peer. On of these issues was noted by 李桂丁 <liguiding@pinecone.net>. Changes were made as summarized here: http://www.masterraghu.com/subjects/np/introduction/unix_network_programming_v1.3/ch08lev1sec11.html
2018-04-25 08:43:38 -06:00
Pelle Windestam
303e6499bd
net/tcp: Extended support for sending to non-blocking tcp sockets.
2018-04-20 07:37:51 -06:00
Gregory Nutt
d93b22d042
net/sixlowpan: Fix a nasty, byte-ordering/endian-ness problem. The root cause has been found and corrected. And a half dozen or so bandaid fixes were reverted.
2018-04-17 15:34:12 -06:00
Gregory Nutt
5fc2f7a36c
net/sixlowpan: Simplify redundant check in the previous commit. If fullmac == true, then we must also have usemac == true and so checking usemac in that context is redundant.
2018-04-16 10:33:35 -06:00
Gregory Nutt
9ddce0b324
net/sixlowpan: Grrr.. got conditional logic reversed in the last commit
2018-04-16 08:02:42 -06:00
Gregory Nutt
12002d1604
net/sixlowpan: When uncompressing link local addresses, the source of the address matters. Apparently address by byte reversed in IP addresses. But if the source of the address is the locally assigned address, bytes are not reversed.
2018-04-16 07:34:02 -06:00
Gregory Nutt
06aee06a8d
Revert "net/sixlowpan: Fix a constant value used in IPv6 address decompression. The 0x0200 value used in the address modification should be in network order."
...
This reverts commit e8832be8f1
.
2018-04-16 06:40:10 -06:00
Gregory Nutt
e8832be8f1
net/sixlowpan: Fix a constant value used in IPv6 address decompression. The 0x0200 value used in the address modification should be in network order.
2018-04-13 08:17:25 -06:00
Gregory Nutt
cab7ba8b8f
Bluetooth: Better integrate NuttX Bluetooth IOCTL commands and NetBSD IOCTL commands. Stanardize naming.
2018-04-06 09:42:41 -06:00
Gregory Nutt
39e393fa5f
net/bluetooth: Since the max header is always reported, the max frame size for purposes of allocation is the max header lenght plus the max payload, even though the frames with the max payload never have the max header length.
2018-04-05 16:40:59 -06:00