Gregory Nutt
a82b8fd71f
Networking: Fix several build errors/warning with IPv4 + IPv6 + multiple networks are enabled.
2015-02-10 06:54:10 -06:00
Gregory Nutt
b756df982d
net/: Lots of build problems introduced into multiple NIC support. Many places where conditional logic based on CONFIG_NETDEV_MULTINIC is confused with CONFIG_NET_MULTILINK. Lots of code changed with IPv6 that was never compiled with MULTINIC enabled. Still some problem with parameter passing.
2015-02-09 18:15:34 -06:00
Gregory Nutt
a07a764d42
ICMPv6: Adds basic logic to support verification that we have the IPv6 address in the Neighbor Table. This feature is important because otherwise the first packet sent to a remote peer will fail (it will be replaced with a Neighbor Solicitation).
2015-02-02 13:44:31 -06:00
Gregory Nutt
6d7891c4de
Fix compile issues with configs/sim/nettest
2015-02-01 12:00:30 -06:00
Gregory Nutt
52f9a2744c
Should fix another warning reported by Travis
2015-01-30 08:57:35 -06:00
Gregory Nutt
a438784054
Forgot to add a file in the last commit
2015-01-30 07:28:30 -06:00
Gregory Nutt
5736cf10af
Networking: Separate TCP poll logic out of net/sockets/net_poll.c and move it into the new net/tcp/tcp_netpoll.c.
2015-01-30 07:25:01 -06:00
Gregory Nutt
de91d34a19
Networking: Separate out UDP poll logic from socket/net_poll.c into a new udp/udp_netpoll.c; Create a skeleton local/local_netpoll.c for future poll support on Unix domain sockets.
2015-01-30 07:09:25 -06:00
Gregory Nutt
ccc72edc0b
Networking: Add UDP read-ahead support and support for poll/select on UDP sockets. From Macs N.
2015-01-30 06:08:26 -06:00
Gregory Nutt
9c2af5317f
Merge remote-tracking branch 'origin/master' into afunix
2015-01-28 12:03:43 -06:00
Gregory Nutt
371a9fd84c
Networking: Fix another deadlock condition. tcp_write_buffer_alloc() calls sem_wait() with network locked. That worked if CONFIG_NET_NOINTS was not defined because interrupts are automatically restored when the wait happens. But with CONFIG_NET_NOINTS=y, the wait blocks with the network locked -- bad style and also can lead to a deadlock condition
2015-01-28 11:56:11 -06:00
Gregory Nutt
5f9837dcc8
Merge remote-tracking branch 'origin/master' into afunix
...
Conflicts:
nuttx/ChangeLog
2015-01-27 21:47:12 -06:00
Gregory Nutt
c4bd6f52b5
Networking: The are issues with the TCP write-ahead buffering if CONFIG_NET_NOINTS is enabled: There is a possibility of deadlocks in certain timing conditions. I have not seen this with the Tiva driver that I have been users but other people claim to see the issue on other platforms. Certainly it is a logic error: The network should never wait for TCP read-ahead buffering space to be available. It should drop the packets immediately.
...
This was fixed by duplicating most of the IOB interfaces: The versions that waited are still present (like iob_alloc()), but now there are non-waiting verisons of the same interfaces (like iob_tryalloc()). The TCP read-ahead logic now uses only these non-waiting interfaces.
2015-01-27 21:23:42 -06:00
Gregory Nutt
f756545eb0
Networking: Add local Unix domain socket accept logic
2015-01-25 16:27:25 -06:00
Gregory Nutt
90e59217c6
Networking: Move TCP specific logic out of net/socket/accept.c to net/tcp/tcp_accept.c; add hooks for local, Unix doamin sockets
2015-01-25 15:46:05 -06:00
Gregory Nutt
0def771c8d
Networking: Move TCP specific logic out of net/socket/accept.c to net/tcp/tcp_accept.c; add hooks for local, Unix doamin sockets
2015-01-25 15:45:51 -06:00
Gregory Nutt
f4bb7f14e1
Networking: Clean up network status collection and presentation for IPv6
2015-01-24 08:26:12 -06:00
Gregory Nutt
c77426e550
Cosmetic changes to comments; refresh configuration
2015-01-22 14:46:36 -06:00
Gregory Nutt
eac4ea7ae5
Networking: Back out a previous change. It is incorrect
2015-01-22 12:10:16 -06:00
Gregory Nutt
46fc574f0f
Forgot to remove some debug instrumentation in the last commit
2015-01-22 10:35:11 -06:00
Gregory Nutt
7106469191
Armv7-M: Remove Px4-only setting of stack to 0xff. This is incompatible with standard NuttX stack montitoring logic
2015-01-22 10:09:10 -06:00
Gregory Nutt
5e23a855ec
More typos in debug statements
2015-01-21 10:32:59 -06:00
Gregory Nutt
354bc626ab
Fix a typo introduced in the last commit
2015-01-21 10:31:18 -06:00
Gregory Nutt
3202819328
IPv6 -- various fixed from problems found in testing
2015-01-21 10:29:18 -06:00
Gregory Nutt
5d31687e75
Correct name of fields in struct sockaddr_in6: sin6_port and sin6_family, not sin_port and sin_family
2015-01-20 18:14:09 -06:00
Gregory Nutt
2842b5c5d6
Networking: Fix some problems with debug is enabled; fix a warning
2015-01-19 10:16:37 -06:00
Gregory Nutt
eb3c6e8390
Networking: Some fixes for compilation when both IPv4 and IPv6 are enabled
2015-01-18 09:23:22 -06:00
Gregory Nutt
f7663ef0ab
Networking: Final detangle off IPv4 and IPv6 TCP/UDP send logic. The Networking subsystem now compiles with IPv6 enabled
2015-01-18 08:56:05 -06:00
Gregory Nutt
ea52bda8f9
Networking: Add IPv6 suppport to TCP application level sending logic
2015-01-17 18:18:19 -06:00
Gregory Nutt
d8b046f2fb
Networking: Fix a simple IPv6 compile error
2015-01-17 17:48:15 -06:00
Gregory Nutt
86f617cc88
Networking: Straighten up use if IPv6/IPv4 in TCP connection logic
2015-01-17 17:07:54 -06:00
Gregory Nutt
b187b4f381
Networking: Straighten up use if IPv6/IPv4 in TCP connection logic
2015-01-17 15:17:35 -06:00
Gregory Nutt
f7681dbb43
Networking: Detangling IPv6/4 logic in UDP connection structures
2015-01-17 14:13:56 -06:00
Gregory Nutt
94f9312150
Networking: Save the IP domain in the connection structure
2015-01-17 13:07:48 -06:00
Gregory Nutt
e2933ca4cc
Networking: Oops. Forgot to add a couple of files that were part of an earlier commit
2015-01-17 09:35:27 -06:00
Gregory Nutt
820509eadc
Networking: Fix accept() so that it returns the correct IP address for the selected socket IP domain.
2015-01-17 09:27:05 -06:00
Gregory Nutt
4ad5998db3
net/socket and net/tcp: When we are ready to receive data or when we have outgoing data ready to be sent, we need to the notify the appropriate device driver of this condition. The notifying socket will be configured as either PF_INET or PF_INET6 and must look up the correct driver using the correct IP domain.
2015-01-17 08:33:14 -06:00
Gregory Nutt
2c251d845c
include/net/if.h: Add a bit to the device flags to indicate if the device packet buffer holds an IPv4 or an IPv6 domain packet. Set/clear the flag along with the correct offset to the application payload data as each packet is received.
...
net/socket, net/tcp, net/udp: Add logic to select the domain of the outputgoing packet before sending any UDP or TCP packet. This sets the bit to indicate the IPv4 or IPv6 domain and the correct offset to the output going payload data.
2015-01-17 07:42:09 -06:00
Gregory Nutt
88a0e82934
Networking: Remove field d_sndata from the device structure. It is the same as d_appdata and unnecessary
2015-01-17 05:59:13 -06:00
Gregory Nutt
8f8259a0d6
Networking: UDP and TCP MSS depends on the IP header size (as well as the link layer header size) and cannot be represented with a single value.
2015-01-16 15:03:10 -06:00
Gregory Nutt
2663538b0a
Networking: Replace all references to the macros net_ipaddr_copy, net_ipaddr_hdrcopy, net_ipaddr_cmp, net_ipaddr_hdrcmp, and net_ipaddr_maskcmp with the appropriate IPv4 or IPv6 version of the macro (such as net_ipv4addr_copy). The goal is to support both IPv4 and IPv6 simultaneously. This requires that the macros be distinct and not conditionally defined to one on or the other.
2015-01-16 13:01:08 -06:00
Gregory Nutt
5e938941a6
Networking: Replace all references to net_ipaddr_t with either in_addr_t on net_ipv6addr_t. The goal is to support both IPv4 and IPv6 simultaneously. This requires that the two types be distinct and not conditionally typedef'ed to net_ipaddr_t.
2015-01-16 12:30:18 -06:00
Gregory Nutt
bee89be4f4
Networking: Drivers can have both IPv4 and IPv6 addesses, but a socket can only only one or the other; The socket connnection structures need to include a union of IPv4 and IPv6 addresses for the local address binding and for the remote address connections
2015-01-16 10:01:54 -06:00
Gregory Nutt
5b45605991
Clean a few more IPv6 compilation issues; Add implementation of net_ipv6_maskcmp()
2015-01-15 15:55:52 -06:00
Gregory Nutt
630366272a
Networking: Seperate tcp_input() and udp_input() into seprate functions tcp_ipv4_input(), tcp_ipv6_input(), udp_ipv4_input(), and upd_ipv6_input() than can deal will the data offsets caused by the differing sizes of the IP header.
2015-01-15 15:06:46 -06:00
Gregory Nutt
60e50ff3b5
Networking: More IPv6 detanglement
2015-01-15 13:08:28 -06:00
Gregory Nutt
a7ce1279f9
Networking: (1) Copied all ICMP sources files to net/icmpv6 with proper renaming and removal of IPv4 logic, (2) remove IPv6 logic from files in net/icmp, (3) copied include/nuttx/icmp.h to icmpv6.h and removed IPv4 specific logic, (4) removed all IPv6 logic from icmp.h, (5) IP_HDRLEN became IPv4_HDRLEN and IPv6_HDRLEN, (6) ip_chksum() became ipv4_chksum() and ipv6_chksum(), and (7) added partial support for ICMPv6 statistics.
2015-01-14 16:10:38 -06:00
Gregory Nutt
a6a9452c05
net/tcp/tcp_conn.c: Fix a logic error when CONFIG_NETDEV_MULTINIC is selected: net_unlock(flags) will be called will an uninitialized variable (2015-01-03).
2015-01-02 12:03:08 -06:00
Gregory Nutt
b36dbe1d89
Add logic to netdev_findbyaddr() to return the correct network device for the case where a broadcast address is used. This change caused trivial ripples through other files because additional parameters are required for netdev_findbyaddr() when CONFIG_NET_MULTINIC
2014-11-23 11:00:22 -06:00
Gregory Nutt
dc7a45ecf8
Extensions to ECP conneciton structure for the case of multiple networks. See additional comments regarding the similar change for UDP
2014-11-22 10:46:37 -06:00