Commit Graph

1871 Commits

Author SHA1 Message Date
Gregory Nutt
d31411189e net/netlink/Kconfig: Remove dependency on EXPERIMENTAL. Although the Netlink implementation is still only fragmentary, there is no usable functionality there and no reason for it to depend on EXPERIMENTAL. Also minor changes to the menu organization so that the Netlink options appear the same was as do other network options. 2019-11-07 14:10:35 -06:00
Gregory Nutt
38e527deeb net/netlink: Fix cosmetic issues, mostly typo fixes. 2019-11-04 14:06:07 -06:00
Gregory Nutt
6d13705e93 net/netlink: The NETLINK_ROUTE logic needs to return the first queued response and not attempt to match up reponses with requests. That is the Linux compatible way. Also, use queue.h functions for list management and fix an error in arp_snapshot(). 2019-11-04 09:02:14 -06:00
Gregory Nutt
7bd045130c net/netlink/: Misc bugfixes from initial testing using NSH 'arp -t' command. 2019-11-03 19:27:58 -06:00
Gregory Nutt
2991987018 net/netlink/netlink_route.c (mostly): This completes a minimal netlink implementation that will retrieve the ARP table.
net/netlink:  Add basic hooks (only) to support the NETLINK_ROUTE protocol.
2019-11-03 13:59:42 -06:00
Gregory Nutt
3b275fcf4e net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
Gregory Nutt
1ba23bb75c net/udp/udp_psock_sendto_buffered.c: Add a check for the device that is polling. In the multiple network device case, this check is necessary to prevent sending the UDP packet to the wrong device. This change addresses the buffered case and is the companion to commit 6c46c48e4b. 2019-10-18 16:04:33 -06:00
Gregory Nutt
6c46c48e4b net/udp/udp_psock_sendto_unbuffered.c: Add a check for the device that is polling. In the multiple network device case, this check is necessary to prevent sending the UDP packet to the wrong device. This change addresses only the unbuffered case. The buffered case is more complex. See patch attached to issue 172. 2019-10-18 14:20:34 -06:00
Gregory Nutt
93452d70ef net/inet/inet_close.c: Fix a warning found in build testing. 2019-09-28 12:57:26 -06:00
Gregory Nutt
81aecdce1e net/igmp/igmp_send.c: Fix a typo in a debug statement. Noted by Bernd Walter. 2019-09-25 13:46:24 -06:00
Gregory Nutt
0b9416a40c net/inet/inet_close.c: Still fussing with f3ab9abe51. Re-analyze all disconnection events, update comments, removed one of two non-standard return values. A failure is returned only in cases where the socket was not actually closed. 2019-09-25 08:16:37 -06:00
Gregory Nutt
8e079d73d9 Update a comment. 2019-09-25 07:39:49 -06:00
Gregory Nutt
f3ab9abe51 net/inet/inet_close.c: Fixes two problems, both noted by Bernd Walter:
1) The change of commit ed9fe70024 left some dangling logic and incorrect, confusing comments.  Prior to that commit the 'pstate' variable was non-NULL only when doing a lingering close.  Comments to this effect as well as tests of pstate should also have been updated.  These are confusing and inappropriate, but do not lead to incorrect behavior.

2) Eliminate an incomplete test when a disconnection event. When a disconnection event occurs, the close logic MUST always terminate the wait.  The conditional test was not incorrect, however, it lacked 'else' logic and would simply ignore that disconnection event in some cases.  That is bad because there may not be another disconnection event and that can lead to hangs (or at least very, very long delays).
2019-09-25 07:24:20 -06:00
Bernd Walter
0008ff33b3 net/icmpv6/icmpv6_rnotify.c: Correct a bad index in debug output. 2019-09-25 06:29:02 -06:00
Bernd Walter
338f09acfc drivers/net and net/: Use ntoh() when printing IPv6 addresses so that the addresses appear in friendlier host order vs. network order. 2019-09-24 10:06:42 -06:00
Xiang Xiao
9830791960 net/icmpv6/icmpv6_poll.c: Fix typo error in icmpv6_poll. 2019-09-24 09:28:07 -06:00
Xiang Xiao
b4e7ca5aac net/icmpv6/icmpv6_autoconfig.c: cmpv6_autoconfig() error handling must not overwrite overwrite the error code. 2019-09-20 12:51:37 -06:00
Xiang Xiao
6c484847d5 net/: Decouple autoconfig and icmpv6 socket to avoid the invalid kconfig combination. 2019-09-20 12:45:05 -06:00
Gregory Nutt
23e1d2e403 Dispatch ICMP_POLL to device's callback list too since icmpv6_neighbor still append the callback into this list. 2019-09-20 07:54:10 -06:00
Juha Niskanen
e8b5dd4528 Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
Xiang Xiao
5fd8f78bf9 net/ipforward, tcp, and udp: Fix a chicken and egg problem by eliminating the check of the arp/neighbor tables before packet transmission
1. For buffered tcp/udp case, if CONFIG_NET_ARP_SEND/CONFIG_NET_ARP_IPIN/CONFIG_NET_ICMPv6_NEIGHBOR isn't enabled and the table doesn't contain ip<->ethaddr mapping yet, the logic will skip the realtransmission and then arp/neighbor can't steal the final buffer to generate arp/icmpv6 packet.
2.for all other case, the tcp layer or user program should already contain the retransmit logic, the check is redundancy and may generate many duplicated packets if arp/icmpv6 response is too slow because the cursor stop forward. If user still concern about the very first packet lost, he could fix the issue by enabling CONFIG_NET_ARP_SEND/CONFIG_NET_ICMPv6_NEIGHBOR at begin.
2019-09-18 12:33:41 -06:00
Nathan Hartman
366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Gregory Nutt
c5066f9f4c net/ipforward/ipv4_forward.c: Correct some errors introduced with commit a52ceac13e. Noted by Adam Porter. 2019-09-06 16:01:38 -06:00
Gregory Nutt
7871e983b8 net/tcp/tcp_send.c: Commit a52ceac13e broke IPv4 sending. In cp_send.c:tcp_ipv4_sendcomplete(), ‘ipv4->vhl’ now needs to be configured before call to tcp_ipv4_chksum(). Noted by Jussi Kivilinna in comit comments. 2019-09-06 09:48:42 -06:00
Juha Niskanen
822bb06967 Fix some typos. Also minor update to stm32f7/nucleo-144/README.txt and stm32l4/nucleo-l496zg/README.txt board documentation. 2019-09-05 08:12:50 -06:00
Gregory Nutt
100fe59ff2 net/arp/arp.h: Remove an unused structure definition. 2019-09-01 17:49:44 -06:00
Gregory Nutt
d596e56c3d net/local/local_conn.c: Removed un-ncessary memset(). Connection structure is allocated with kmm_zalloc() which will clear all memory. 2019-09-01 11:23:40 -06:00
Gregory Nutt
6266e067e9 net/: Re-order the content of all address-family socket 'connection' structures so that they begin with a comomon prologue. This permits better use of logic for different address family types. 2019-09-01 08:47:01 -06:00
Gregory Nutt
a52ceac13e net/: Now handles reception of IPv4 packets with larger IPv4 headers containing options. 2019-08-31 12:25:30 -06:00
Gregory Nutt
9bdde04636 net/Kconfig: Ethernet packet buffer size cannot be permitted to go below 1294 is IPv6 is selected. 2019-08-31 09:08:32 -06:00
zhangyuan7
b33fc302f0 net/inet and net/tcp: Fix tcp close flow; free the connection after all tcp close process finished. 2019-08-30 06:44:43 -06:00
Gregory Nutt
ac151e05e7 Fix warnings found in build testing. 2019-08-27 16:20:39 -06:00
zhangyuan7
ba598841e5 net/tcp/Kconfig, include/nuttx/net/netconfig.h: Make RTO and WAIT_TIME configurable. This fix is not really correct: TCP RTO really should be calculated dynamically for each TCP connection: http://sgros.blogspot.com/2012/02/calculating-tcp-rto.html. 2019-08-26 11:03:27 -06:00
biantao
f1c46b4498 net/tcp/tcp_send.c: Fix RST packet with wrong ack number. 2019-08-26 10:16:43 -06:00
Gregory Nutt
27e4bfffd4 Update some comments and README files. 2019-08-24 13:06:43 -06:00
Anthony Merlino
c024a1f569 Merged in antmerlino/nuttx/xbee-prefix (pull request #1009)
drivers/ieee802154/xbee: Add configuration option for setting the default prefix to use when bringing up the network and setting the IP address.

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 22:24:32 +00:00
Anthony Merlino
70404ed0dc Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
Iobinstrumentation

* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.

* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.

* fs/procfs: Starts adding support for /proc/iobinfo

* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 22:42:25 +00:00
Anthony Merlino
fc1780d63e Merged in antmerlino/nuttx/sixlowpan-removeconversions (pull request #997)
ieee802154/sixlowpan: Removes unnecessary conversions that were happening due to a misunderstanding of byte ordering with EUI-64

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 01:26:44 +00:00
Anthony Merlino
7c06438315 Merged in antmerlino/nuttx/ipforward (pull request #981)
net/ipforward: Check if interface is up early on when forwarding to avoid extra work.

As noticed in a previous wireless commit, when forwarding is enabled and a packet comes in, the packet is attempted to be sent on each other netdev without regard for whether it is in the UP state. Of course this is eventually caught, but it can be caught earlier to avoid unnecessary work, especially in the 6LoWPAN case where a useless packet conversion will occur.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:53:06 +00:00
David Sidrane
1e90dd9284 net/socket/getpeername: Fixed warning in DEBUG code. 2019-08-07 07:53:56 -06:00
Juha Niskanen
d5382cde17 net/udp/udp_psock_sendto_buffered.c: Fixes a copy-paste error in the new SO_LINGER code: CONFIG_TCP_NOTIFIER to CONFIG_UDP_NOTIFIER. 2019-08-05 07:42:14 -06:00
Nathan Hartman
68d43d3679 Fix typos. 2019-08-04 14:50:28 -06:00
David S. Alessio
20e8a83c5f net/udp/udp_txdrain.c: Add missing header file. 2019-07-29 08:12:55 -06:00
Gregory Nutt
124212624d net: Minor fix in error checking in TCP/UDP Tx drain logic 2019-07-28 07:39:55 -06:00
Gregory Nutt
361d85ae35 net/tcp and udp: Fix errors in the new implementation of SO_LINGER. The tcp_drain() and udp_drain() functions were casting the working argument to the wrong type, resulting in hangs and abnormal behavior. There is a complexity in the tcp drain logic when the remote peer closes the socket before all Tx data has been flushed. Sometimes we are not notified of this case and wait the entire timeout unnecessarily. There is a workaround in place in tcp_txdrain(), but this really should be revisited. 2019-07-27 10:26:52 -06:00
Masayuki Ishikawa
5fd5cc0b0a Merged in masayuki2009/nuttx.nuttx/change_udp_broadcast (pull request #954)
net/udp: Remove net stack dependency from CONFIG_NET_BROADCAST

This change allows us to use CONFIG_NET_BROADCAST without network
stack. (i.e. usrsock application can use broadcast)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-26 14:05:03 +00:00
Bernd Walter
5d01ce6c58 net/icmpv6/icmpv6_autoconfig.c: Use ntohs() to convert IPv6 address from network to host order int network debug output. 2019-07-06 07:02:51 -06:00
Gregory Nutt
1346f29151 net/: Fix alignment and spacing problems found by tools/nxstyle. 2019-07-02 18:02:23 -06:00
Gregory Nutt
574595dc32 Still fixing new warnings found in build testing. 2019-07-01 15:56:34 -06:00
Gregory Nutt
8774977f4d Fix warnings found in build testing. 2019-07-01 15:22:42 -06:00
Gregory Nutt
077d164b14 /net/inet: Simplify design of change in last commit. 2019-07-01 14:07:12 -06:00
Gregory Nutt
de5a6163d5 This commit implements a proper version of SO_LINGER. Not sufficiently tested on initial commit.
Squashed commit of the following:

    net/: Fix some naming inconsistencies, Fix final compilation issies.

    net/inet/inet_close():  Now that we have logic to drain the buffered TX data, we can implement a proper lingering close.

    net/inet,tcp,udp:  Add functions to wait for write buffers to drain.

    net/udp:  Add support for notification when the UDP write buffer becomes empty.

    net/tcp:  Add support for notification when the TCP write buffer becomes empty.
2019-07-01 12:25:32 -06:00
Gregory Nutt
ded1900927 include/nuttx/net/net.h: Fix some long lines. 2019-07-01 09:18:38 -06:00
Gregory Nutt
b0f751897c net/inet/inet_close.c: Extend some comments. 2019-07-01 08:24:39 -06:00
Gregory Nutt
5e36627366 Update TODO list and fix an error in conditional compilation that I introduced with the last commit. 2019-07-01 08:12:51 -06:00
Gregory Nutt
5af5fc4409 net/inet/inet_close.c: Last PR remove SO_LINGER socket option. SO_LINGER was always enabled is CONFIG_NET_SOLINGER was selected. 2019-07-01 07:37:41 -06:00
Masayuki Ishikawa
ed9fe70024 Merged in masayuki2009/nuttx.nuttx/fix_tcp_active_close (pull request #923)
net/inet: Fix tcp active close in inet_close.c

In previous implementation, FIN packet was not sent when a socket
is actively closed (e.g. telnetd or webserver) without SO_LINGER.
This issue happens because the socket closing sequence waits for
the status.cl_sem only if lingering timeout is set. However,
in many server use-cases, SO_LINGER is not usually set and even
in these cases, FIN packet must be sent correctly.

This PR changes the logic in inet_close.c so that it can wait
for status.cl_sem regardless of SO_LINGER. Instead, if SO_LINGER
is set, it waits for the semaphore with timeout option.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-01 13:25:47 +00:00
Gregory Nutt
d0c569d7b5 net/tcp/tcp_send_buffered.c: Fix a warning reported in build testing. 2019-06-21 13:48:27 -06:00
Juha Niskanen
abc49a6a13 arch/arm/src/stm32l4: if SRAM3 is used as heap, do not power it off in stop 2 mode. 2019-06-13 05:52:40 -06:00
Gregory Nutt
ee9e8c6bc2 udp\udp_callback.c: Fix another C89 compatibility problem. Empty initializers are not permitted. Caused ez80 build failure. 2019-06-03 09:23:19 -06:00
Masayuki Ishikawa
fd387b6b8c Merged in masayuki2009/nuttx.nuttx/fix_usrsock (pull request #879)
net/usrsock: Fix debug logs and remove DEBUGASSERT from usrsockdev_do_request()

In a client mode, socket() will be the first request for usrsockdev_do_request().
However, in a server mode, the first request to accepted sockets will be recv()
or others which depend on applications. So I think we should remove this
DEBUGASSERT from usrsockdev_do_request().

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-03 11:43:43 +00:00
Gregory Nutt
2cf195e6d1 configs: Fix included path used in all arch/z80 XDS-II builds (ez80 and z8). 2019-06-02 16:16:44 -06:00
Gregory Nutt
2767e80459 Squashed commit of the following:
ez80:  Fixing a few more compile problems.  I am afraid that the 5.3.0 compiler it too buggy to use.
    ez80:  Additional build-related fixed.
    eZ80:  Updating to use the newest ZDSII 5.3.0 toolchain.
2019-06-02 11:05:31 -06:00
Valmantas Paliksa
d3cedfb823 net/tcp/tcp_send_buffered.c: Fix deadlock in iob_copyin when iob buffers are exhausted and network lock is taken. 2019-05-31 07:29:17 -06:00
Gregory Nutt
b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Ivan Ucherdzhiev
82cb456e02 net/sixlowpan/sixlowpan_hc06.c: Correct an endian-ness problem in HC06 decompression. 2019-05-08 06:59:22 -06:00
Jukka Laitinen
285fb555d0 net/socket/getsockname.c: Fix addrlen check in socket debug features. Getsockname checked erroneously a pointer agains 0, where the intention was to dereference the pointer and to check the length. This causes also a compilation failure if the code is compiled with CONFIG_DEBUG_FEATURES and with -Werror flag set. 2019-04-30 06:22:07 -06:00
Gregory Nutt
c999d12bba net/utils: net_lock() and net_restorelock() not return a value. That values is the standard zero on success; negated errno value on failure. This return value is only needed for -ECANCELED. That cancellation indication needs to ripple all the way back to the highest levels where the cancellation can be acted on. This commit only adds the return value; it does not add checking for the return values of net_lock() and net_restorelock() at higher levels. That is required too. 2019-04-14 09:37:25 -06:00
Gregory Nutt
d701dc6a4a net/dev/devif_poll.c: Fix compile error introduced by c9b73f5139. Typo: DEVIF_ICMP6, not DEVIF_ICMPV6. 2019-03-19 16:46:11 -06:00
zhangyuan7
81a3ec250e net/local: Fixed deadlock issue by replacing nxsem_wait() with net_lockedwait() so that we do not wait with the network locked. 2019-03-19 09:54:22 -06:00
zhangyuan7
656c20fd4a net/local/local_connect.c: Initialize lc_result before giving lc_waitsem 2019-03-19 09:52:40 -06:00
anchao
a418b63e07 net/udp/udp_callback.c: Initialize address structure to avoid random values in padding. 2019-03-19 09:49:54 -06:00
anchao
c9b73f5139 net/icmp and icmpv6: Bind icmp callback from device to connection. Resolves the issue that bind() could not be called before send() 2019-03-19 09:43:32 -06:00
zhangyuan7
b161682adc net/usrsock: Add mutual exclusion so that only user can perform a socket request 2019-03-19 09:23:08 -06:00
Gregory Nutt
ba859ad302 tools/nxstyle.c: Don't complain about certain lowercase characters in otherwise uppercase pre-processor identifers: IPv6, IPv4, ICMPv6, IGMPv2, p as a decimal point, d signifying a divisor. It was a bad idea to let the door open a crack for there. While they improve readability, the inconsistently also causes other problems. 2019-03-12 14:22:52 -06:00
Gregory Nutt
f6b00e1966 tools/nxstyle.c: Fix logic error that prevent detecion of '/' and '/=' as operators. net/: Minor updates resulting from testing tools/nxstyle. 2019-03-11 12:48:39 -06:00
Gregory Nutt
a76e137ce2 Squashed commit of the following:
sched/init/nx_start.c:  Add support for CONFIG_BOARD_DRIVER_INITIALIZE.  If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().

    Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.

    Raname board_initialize() to board_late_initialize()
2019-02-18 15:32:00 -06:00
Gregory Nutt
69056d4053 net/: The value ERROR should never be returned from internal OS functions. That is reserved for returning values to appliations with the errno value set. Within the OS, errors are returned with a negated errno value ALWAYS. 2019-02-14 15:38:36 -06:00
Gregory Nutt
359753adee net/tcp/tcp_send_buffered.c: Fix assertion crash when window size is zero. 2019-02-14 08:39:16 -06:00
Gregory Nutt
0bc800d71f net/tcp/tcp.h: Fix a muffed edit to conditional found in build testing. 2019-02-11 15:54:31 -06:00
Gregory Nutt
efe65749ce Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
2019-02-11 15:47:25 -06:00
Gregory Nutt
0cb1c2c0b6 configs/sama5d2-xult: Move console from FLEXCOM4 to UART1. FLEXCOM4 does not work for the Arduino serial. UART1 is used with the VCOM provided by the EDBG. 2019-02-11 14:55:18 -06:00
Gregory Nutt
1a158a184e Fix missing #endif in found in build testing. 2019-02-11 13:31:53 -06:00
Gregory Nutt
a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt
1bbcd1ad96 Update some comments and cosmetic spacing. 2019-02-04 07:24:45 -06:00
Gregory Nutt
732bef73a7 include/net/if.h: Fix some macro definitions overlooked in commit d105dc9b5e. Also corrects the name of a structure: mii_ioctl_notify_s vs mii_iotcl_notify_s. 2019-01-27 16:43:42 -06:00
Xiang Xiao
fe421022e2 sched/wqueue/kwork_notifier.c and several Kconfig files: Notifier should work with either lpwork or hpwork and other minor typo fix. 2019-01-27 11:02:56 -06:00
Xiang Xiao
16850297f3 libs/unistd and other affected files: Hostname support no longer depends on CONFIG_NET since the host name is also useful in the non-network environment. CONFIG_NET_HOSTNAME changed to CONFIG_LIB_HOSTNAME. 2019-01-27 06:56:16 -06:00
Gregory Nutt
68584aa6eb arch/arm/src/tiva/hardware: Add ADI 3 REFSYS header file. 2019-01-13 10:10:00 -06:00
Anthony Merlino
f4ae71be70 Merged in antmerlino/nuttx/sixlowpan-input-fix (pull request #812)
net/sixlowpan: sixlowpan_input should always return 0 if the incoming frame was consumed.

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-13 14:26:00 +00:00
Gregory Nutt
c4dfb76b0d Fix some warnings found in build testing. 2018-12-30 16:05:28 -06:00
Anthony Merlino
5e1055dbfa Merged in antmerlino/nuttx/sixlowpan-d_buf-fix (pull request #795)
net/sixlowpan: Record and restore d_buf on entry/exit of sixlowpan_input. This avoids an issue where d_buf gets set to NULL by sixlowpan, and then is used by forwarding logic from another network interface before getting set back to the drivers internal b

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-26 16:33:44 +00:00
Anthony Merlino
33a4ec969a Merged in antmerlino/nuttx/avoid-double-context-lookup (pull request #788)
sixlowpan: Address comment regarding avoiding double lookup of address context.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-19 18:41:27 +00:00
Anthony Merlino
c897790e55 Merged in antmerlino/nuttx/sixlowpan-ieee802154-address-endianness (pull request #790)
sixlowpan/ieee802154: IEEE802.15.4 stores and uses addresses in little endian order.

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 15:06:41 +00:00
Anthony Merlino
b48a62a7d4 Merged in antmerlino/nuttx/sixlowpan-ul-bit (pull request #787)
sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases whe

* sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases where the IID is derived from say, a short address, this bit should be forced to 0, indicating that it is locally administered.

    See:

    https://tools.ietf.org/html/rfc4291#section-2.5.1
    https://tools.ietf.org/html/rfc4944#section-6
    https://tools.ietf.org/html/rfc2464#section-4

* sixlowpan: Account for endianness with U/L bit.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 13:34:41 +00:00
Anthony Merlino
35232d4997 Merged in antmerlino/nuttx/uncompress-addr-fix (pull request #786)
net/sixlowpan: Fixes decompression of ipaddr from MAC address. The logic used to populate the IP from the radio address should match sixlowpan_ipfromsaddr/sixlowpan_ipfromeaddr

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 21:39:40 +00:00
Anthony Merlino
67c609e343 Merged in antmerlino/nuttx/big-endian (pull request #784)
Fixes usage of CONFIG_BIG_ENDIAN; should be CONFIG_ENDIAN_BIG

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 20:33:54 +00:00
Gregory Nutt
cacbe062ad Fix a new warning found in build tesing. 2018-12-01 17:27:32 -06:00
Gregory Nutt
6941f916ce net/socket: For consistency in naming, change the name of sock_release() to psock_release(). 2018-11-27 07:50:09 -06:00
Gregory Nutt
b8cc5ef757 net/socket/net_clone.c: On a failure to start the TCP monitor, the clone socket is closed but is not properly freed, leaving it attached to a TCP connection structure with the wrong reference count. 2018-11-27 07:40:55 -06:00
Gregory Nutt
41d5e31390 configs/stm32f429i-disco/highpri/defconfig and net/procfs/netdev_statistics.c: Eliminate some warnings found in build testing. 2018-11-25 18:42:39 -06:00
Gregory Nutt
22de66d553 arch/arm/src/max326xx/max32660/max32660_wdt.c: Fix alarm delay calculation. 2018-11-21 17:54:36 -06:00
Gregory Nutt
09f4dee6bc All network drivers! Change pre-processor logic that selects the high priority work queue or gives preferential treatment to the high priority work. All network logic must run on the low priority work queue! Or suffer the consequences. 2018-11-21 07:57:26 -06:00
Gregory Nutt
a588d64b45 net/procfs/netdev_statistics.c: Fix a error found in build testing. 2018-11-20 08:09:03 -06:00
Gregory Nutt
1fd9eb6069 net/pkt: pkt_input() should not report an error using the nerr() macro when the PKT tap does not need the packet. That is not an error. Use ninfo() instead. 2018-11-16 13:48:30 -06:00
Xiang Xiao
77098f8736 Move NETDEV_LATEINIT from drivers/net/Kconfig to net/Kconfig so that we can select NETDEV_LATEINIT without enabling NETDEVICES since the net driver in arch folder may need to initialize later too. 2018-11-12 06:36:26 -06:00
Gregory Nutt
d94bd49b78 net/mld: Fix a typo in conditional compilation. Clean up return values from mld_ngroups(). 2018-11-11 16:23:18 -06:00
Gregory Nutt
9b1025ca1b net/mld/mld_group.c: Fixed failure to stop queries. This turned out to be an uninitialized variable. I wonder why there was no warning from GCC? 2018-11-11 15:25:16 -06:00
Gregory Nutt
610c187e96 net/procfs/netdev_statistics.c: Eliminate warning: array subscript is above array bounds. 2018-11-11 14:28:15 -06:00
Gregory Nutt
002f09f2da net/mld: Fix logic error when testing for the case where all members have left. Still does not work. The end result is that the query timer no longer stops. Not when another another querier with a lower IP is present or when all of the members have left. Basically just can't stop querying under any condition. 2018-11-11 12:43:12 -06:00
Gregory Nutt
bfa8c362c6 net/devif/devif_loopback.c: Fix warning: implicit declaration of memcmp. 2018-11-11 11:56:37 -06:00
Gregory Nutt
8a3fc26b74 Squashed commit of the following:
The MLD implementation did not follow the RFC correctly when it is the Querier.  The Querier should use a general query and get query messages from all members of all groups.  This would be driven by a single timer per sub-nset since all groups are queried at once. Instead, the design used a Multicast Address Specific Query with one timer per group and ignores groups that we are not members of.

    Similary, the MLDv1 compatibility timer should be a single, separate timer, not a per-group timer.

    net/mld: Group may be NULL when sending a general query
2018-11-11 11:38:29 -06:00
Gregory Nutt
591b03aa7d net/mld/mld_query.c: Eliminate a warning: implicit definitino of memcmp. 2018-11-11 07:36:52 -06:00
Gregory Nutt
1a56229386 net/mld: Resolve and issue with sending reports from multiple groups in the same polling cycle. 2018-11-11 07:31:59 -06:00
Gregory Nutt
8cfb376f81 net/mld: There is an issue with the general query timer design. There should be a single instance, not a per-group instance of the timer (ditto for the v1 compatibility timer). Fall back for now and use the per-group MAX query. 2018-11-10 12:13:54 -06:00
Gregory Nutt
f8d39e2c84 net/MLD: The MAS query should be sent on the group multicast address. 2018-11-10 11:41:50 -06:00
Gregory Nutt
854046a931 /net/devif/ipv6_input.c: Correct handling of IPv6 extension headers. The main confusion was that the payload length in the IPv6 header does not include its extension headers.
net/icmpv6/icmpv6_input.c:  Correct caculation of the ICMPv6 header address
    net/mld/mld_query.c:  Correct back test for group found.
    net/mld/mld_report.c: Fix host vs. network order problem.
    net/mld/mld_send.c: Correct the address used in sending the General Query.  It should be the unspecified address in that case.
    net/mld:  Querying workaround.  The MLD implementation does not follow the RFC correct when it is the Querier.  The Querier should use a general query and get query messages from all members of all groups.  This would be driven by a single timer since all groups are queried at once.  Instead, the design currently uses a Multicast Address Specific Query with one timer per group and ignores groups that we are not members of.
2018-11-10 11:29:02 -06:00
Gregory Nutt
b0ba5b69c4 net/udp/Kconfig: Auto-select CONFIG_WQUEUE_NOTIFIER when CONFIG_UDP_READAHEAD_NOTIFIER is selected. 2018-11-10 09:43:44 -06:00
Gregory Nutt
68a115aed9 net/icmpv6/icmpv6_autoconfig.c and icmpv6_rnotify.c: Don't take the network device down when reconfiguring only the IP address from within ICMPv6 logic. Recommended by Xiang Xiao in order to avoid the long delays of bringing some networks back up.
Normally it is required that the network be in the "down" state when re-configuring the network interface.  This is thought not to be a necessary here because.

  1. The ICMPv6 logic here runs with the network locked so there can be no outgoing packets with bad source IP addresses from any asynchronous network activity using the device being reconfigured.
  2. Incoming packets depend only upon the MAC filtering.  Network drivers do not use the IP address; they filter incoming packets using only the MAC address which is not being changed here.
2018-11-10 07:13:54 -06:00
Gregory Nutt
ae29df7445 net/devif/ipv6_input.c: Remove an old, outdated comment. 2018-11-09 17:53:31 -06:00
Gregory Nutt
a583488829 net/devif/ipv6_input.c: Fix a logic error when the received IPv6 srcaddr is a multicast address. Exiting logic only supported UDP multicast. But MLD and certain other ICMPv6 packets also require acceptance of multicast packets. 2018-11-09 16:26:49 -06:00
Gregory Nutt
8527fcf4c5 net/icmpv6/icmpv6_input.c: Fix some ICMPv6 introduced with recent changes. 2018-11-09 16:10:19 -06:00
Xiang Xiao
71e1056e6d net/icmpv6, neighbor, and netdev: Rename netdev_dev_lladdrsize() to netdev_lladdrsize() and move the prototype to include/nuttx/nex/netdev.h, giving is global scope within the OS. Reviewer: This degrades the integrity of the modular architecture by introducing a new coupling via C function call. Not a good thing at all. 2018-11-09 16:05:11 -06:00
Xiang Xiao
a139b7f9b1 net/arp and icmpv6: Double the delay time on each iteration for ARP/ICMP to fight work jitter better. 2018-11-09 15:55:38 -06:00
Xiang Xiao
4f25b83f8f et/icmpv6: Remove the coupling between ICMPv6 and Ethernet by moving all Ethernet stuff to neighbor_ethernet_out.c and make the mac address as first field. 2018-11-09 15:41:23 -06:00
Xiang Xiao
a3cda3867b net/icmpv6/icmpv6_linkipaddr.c: Encapsulate the link scope address generation into icmpv6_linkipaddr() 2018-11-09 15:28:58 -06:00
Xiang Xiao
52021a5300 net/icmpv6/icmpv6_conn.c: icmpv6_free() remove reference count operation since it's already done in icmpv6_close(). 2018-11-09 15:22:25 -06:00
Xiang Xiao
688ccb156a net/icmpv6/icmpv6_neighbor.c: icmpv6_neighbor shouldn't use the out of scope variable(dripaddr) 2018-11-09 15:18:17 -06:00
Gregory Nutt
b93c3c13c4 net/: Fix some compile errors introduce with recent networking patches. Found in build testing. 2018-11-09 14:25:44 -06:00
Xiang Xiao
e294162697 net/neighbor: Support neighbor_out() for multiple link layer at the same time 2018-11-09 14:21:49 -06:00
Xiang Xiao
0a6e234962 net/neighbor: neighbor_lookup() checks if the target IP belongs to one of the local network devices. 2018-11-09 14:14:15 -06:00
Xiang Xiao
0a673d78dc net/neighbor/neighbor_dumpentry.c: Simplify neighbor_dumpentry() implementation 2018-11-09 14:10:18 -06:00
Xiang Xiao
7f8496c643 net/neighbor: Simplify the neighbor table aging process 2018-11-09 14:08:18 -06:00
Xiang Xiao
eb31dc69ac net/: Remove the unnecessary arp.h inclusion 2018-11-09 14:01:12 -06:00
Xiang Xiao
bdf93a8abf net/arp/arp_send.c: Check ifname match before sending packet 2018-11-09 13:57:16 -06:00
Xiang Xiao
43706cd797 net/arp: Redesign ARP table aging to simplify the net initialization 2018-11-09 13:54:55 -06:00
Gregory Nutt
6ca2bcb577 net/icmpv6/icmpv6_input.c: Fix yet another build issue in this file found by build testing. 2018-11-09 11:44:01 -06:00
Xiang Xiao
b8b90b5c4f net/usrsock/usrsock_accept.c: Mark newconn ready before issue accept request to avoid the event get discarded due to the socket in the invalid state 2018-11-09 11:28:19 -06:00
Xiang Xiao
44bcd2c44d net/: add NET_ICMP[v6]_NO_STACK for usrsock case 2018-11-09 11:25:57 -06:00
Xiang Xiao
26ae4176f0 net/arp and net/icmpv6: don't call d_txavail directly since it may point to NULL 2018-11-09 11:22:58 -06:00
zhangyuan7
f036e2a32a net/tcp/tcp_backlog.c: Add SOMAXCONN definition and implementaton per OpenGroup.org. 2018-11-09 11:20:33 -06:00
Xiang Xiao
d2cfd398ba Fix compiler error and warning when CONFIG_NET_SENDFILE=y 2018-11-09 11:17:43 -06:00
Gregory Nutt
9d2e6cf66a net/icmpv6/icmpv6_input.c: Fix a recently introduced error found in build testing. 2018-11-09 11:08:51 -06:00
Xiang Xiao
9e42bede2f net/udp/udp_finddev.c: Fallback to netdev_default device if the device is not found, rather than arbitrary using the device at the head of the list of devices. 2018-11-09 11:05:45 -06:00
Gregory Nutt
5340016104 net/mld: Very that the address of the group that we join is a valid IPv6 multicast address. 2018-11-08 06:37:46 -06:00
Gregory Nutt
9c3e65f15f net/mld: Fix a few compilation problems that cropped up in a different network configuration. Fix a logic error in setting the 'Other Querier Present' timer. Various cosmetic improvements. 2018-11-07 18:21:21 -06:00
Gregory Nutt
02f83334d5 Squashed commit of the following:
net/mld:  Fix a couple of places where I forgot to unlock the network in the previous commit.

    net/mld:  Implement 'Other Querier Present Timer'.  This timer is used to revert to Querier mode if there is no other querier on the network.  Also, fix some naming:  The Done message is not just Version 1 but is used with Version 2 as well.

    net/igmp:  Back out some blind, backported improvements to IGMP from MLD.  There are too many subtle differences in the protocols for this to be safe.
2018-11-07 10:40:30 -06:00
Gregory Nutt
813f4d424c net/mld: Fix a few off-by-one alignment issues spotted by tools/nxstyle. 2018-11-06 15:08:16 -06:00
Gregory Nutt
62e4a41209 net/mld: Add reference counting on the group joins. If there are multiple joins from the same group on this, the don't really leave the group until the matching number of leaves happen. Also add to hooks for the router case: Keep track of the number members NOT on this host. Integrate this with the Leave logic to that the group structure can persist while there no non-local members of the group as well. 2018-11-06 14:46:03 -06:00
Gregory Nutt
f58e7976df net/procfs: Add support to provide MLD stats at /proc/net/mld. net/mld: Fix a couple more bugs found in further MLD testing. 2018-11-06 10:42:53 -06:00