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.
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().
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.
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.
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.
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.
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.
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>
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().
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
Squashed commit of the following:
wireless/bluetooth: Some small changes that gets to a clean compile by just eliminating some incorrect implementations (still with a lot of warnings. The logic is still incomplete but now not so lethal.
wireless/bluetooth: Restructuring: Connection interfaces should internal to wireless/bluetooth. include/nuttx/wireless/bt_conn.h removed and merged with wireless/bluetooth/bt_conn.h. Several fix to get closer to bt_netdev.c compiling. Need to design some not interfaces and use some existing interfaces to send and receiv packets.
wireless/bluetooth: Some organization with some network device compile errors fixed. Still not even close to compiling.
net/bluetooth: Fix numerous compile issues; Still open design issues with regard to the interface with the Bluetooth stack.
wireless/bluetooth: Create bt_netdev.c with a crude copy of mac802154_netdev.c. Does not not even compile yet.
include/nuttx/net: Add bluetooth.h. Content is not yet correct.
net/netpackets: Add bluetooth.h. Update net/bluetooth to use new socket address definition.
net/bluetooth: Some fixes for initial build.
net/bluetooth: Add initial support for Bluetooth sockets. The initial cut is just the a clone of the IEEE 802.15.4 socket support with name changes.
net/ieee802154: Fix some typos noted when cloning to create net/bluetooth.