Commit Graph

924 Commits

Author SHA1 Message Date
Gregory Nutt
da1d1d7139 ICMPv6: Add option to send Router Advertisement Messages. 2015-02-05 09:28:00 -06:00
Gregory Nutt
6f3f43d930 IPv6: Add a netmaks for the local link address 2015-02-05 05:43:57 -06:00
Gregory Nutt
453c25cdbb Minor logic simplification 2015-02-04 21:06:11 -06:00
Gregory Nutt
28b89b7a65 ICMPv6 Auto-configuration: If no router reponds to the Router Solicitation, claim the link local address by sending the Neighbor Advertisement and return success 2015-02-04 16:13:27 -06:00
Gregory Nutt
c5ed77120f ICMPv6: Separate out Neighbor Advertise message so that we can reuse it 2015-02-04 15:43:54 -06:00
Gregory Nutt
f558dfbb96 Remove unnecessary, inappropriate inclusion of ARP head file in IPv6 code 2015-02-04 14:52:46 -06:00
Gregory Nutt
24d800398e Networking: Break out Ethernet definitions into a separate file; add IPv6 multicast addresses as common globals, Ethernet drivers need to filter link-local, all nodes Ethernet address 2015-02-04 14:51:20 -06:00
Gregory Nutt
6159d1307d Forgot to add a file from a previous commit 2015-02-03 17:45:24 -06:00
Gregory Nutt
0e38ca9a42 ICMPv6: Fix some multi-cast addresses 2015-02-03 17:26:05 -06:00
Gregory Nutt
f7ace410d1 Minor updates to comments, debug messages, documentation 2015-02-03 17:01:48 -06:00
Gregory Nutt
154d3ce955 ICMPv6: Some initial bugfix from first tests of the ICMPv6 auto-configuration logic. so far so good but a lot more testing is needed 2015-02-03 16:19:08 -06:00
Gregory Nutt
9791e829f5 ICMPv6: This completes coding of the ICMPv6 auto-configuration feature. It is not yet functional 2015-02-03 15:40:56 -06:00
Gregory Nutt
66f0198e3f Networking: Add support for sending ICMPv6 Router Solicitation and receiving Router advertisement. This is a part of the ICMPv6 auto-configuration logic is still still not complete 2015-02-03 13:25:28 -06:00
Gregory Nutt
553b93cd23 Costmetic updates to comments 2015-02-03 11:19:33 -06:00
Gregory Nutt
0e23712db4 Add an ioctal() that can be used to perform ICMPv6 auto-configuration 2015-02-03 08:54:42 -06:00
Gregory Nutt
b427e8288b Add netlib and application hooks for ICMPv6 auto-configuration (still incomplete 2015-02-03 08:01:55 -06:00
Gregory Nutt
d89073ae13 Add some comments to C files 2015-02-03 06:04:54 -06:00
Gregory Nutt
88f6573f31 ICMPv6: Add file/build structure that will eventually support ICMPv6 auto-configuration 2015-02-02 17:54:48 -06:00
Gregory Nutt
f019d11384 Restore 20Msec default 2015-02-02 14:59:49 -06:00
Gregory Nutt
bba3fccd74 Networking: Apply the same ARP fix for the Neighbor Solicitation logic 2015-02-02 14:50:16 -06:00
Gregory Nutt
e4c602747b Networking: Fixes another CONFIG_NET_NOINTS issues. When called sem_timedwait() with the network locked, the network stays logcked while we wait which is not what we want (without CONFIG_NET_NOINTS, interrupts are re-enabled while we wait and all is well). 2015-02-02 14:48:11 -06:00
Gregory Nutt
fb72b1b1b7 Auto neighbor solicitation is no longer EXPERIMENTAL and is the default for the DK-TM4C129X/ipv6 configuration 2015-02-02 14:09:06 -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
4ce94a7e95 IPv6: Eliminate a warning from UDP code 2015-02-02 11:37:22 -06:00
Gregory Nutt
b1b8c0e47d IPv6: More framework for automatic neighbor solicition. I think this also corrects and error in a broadcast/multicast address chedk 2015-02-02 11:34:51 -06:00
Gregory Nutt
3385082b99 IPv6: Remove an unusd file (kruft from original IPv6 develoment); Add inital hooks to support automatic Neighbor Solitication 2015-02-02 10:49:50 -06:00
Gregory Nutt
011ff49685 Cosmetic update to a few comments 2015-02-01 12:23:57 -06:00
Gregory Nutt
6d7891c4de Fix compile issues with configs/sim/nettest 2015-02-01 12:00:30 -06:00
Gregory Nutt
898d511e05 Unix domain: Fix some bugs in logic the frees stream FIFOs 2015-02-01 09:16:55 -06:00
Gregory Nutt
f8bb77365a Unix domain: Enable logic to clean up the FIFOs underlying stream sockets with those sockets are disconnected. Tehre is still no corresponding clean-up logic in place for Unix domain datagram sockets because the life of the FIFO is not as well known in that case 2015-02-01 08:52:26 -06:00
Gregory Nutt
0fc8d2fcc5 Unix domain: Add options to build in stream or datagram support separately 2015-01-31 07:58:51 -06:00
Gregory Nutt
6b8da59df6 Networking: Add fcntl support for Unix domain sockets and UDP sockets with read-ahead enabled 2015-01-30 14:41:09 -06:00
Gregory Nutt
f421723fbd Fix some errors in debug assertions 2015-01-30 13:29:56 -06:00
Gregory Nutt
62b706fa68 If a Unix domain socket is non-blocking, then the underlying FIFO should also be opened non-blocking 2015-01-30 12:43:37 -06:00
Gregory Nutt
e8a74527a0 Fix mimatched #if/#endif 2015-01-30 12:28:29 -06:00
Gregory Nutt
e86d00913e Unix domain/FIFOs: Fix a race condition between FIFO buffer operations and the opening and closing of FIFOs which necessary when the FIFOs are used to support Unix domain, datagram sockets. The default policy is the deallocate FIFO buffering when the last client closes the pipe. When when used for datagram communicatinos, packets left in the FIFO will be lost. Some like UDP read-ahead is needed: The buffered data in the FIFO needs to be retained until the reader gets a chance to re-open the FIFO. Added an ioctl (PIPEIOC_POLICY) to control the buffer policy. Default (0) is the legacy behavior; Unix domain datagram logic sets the alternative policy so that the packet data persists after the FIFO is closed. 2015-01-30 11:14:24 -06:00
Gregory Nutt
4205d68505 Networking: Any linger UDP read-ahead buffers must be freed when UDP socket is closed 2015-01-30 09:44:00 -06:00
Gregory Nutt
2a39105b3f Unix domain: Add logic to release references to the half duplex FIFO after sendto and recvfrom 2015-01-30 09:28:55 -06:00
Gregory Nutt
52f9a2744c Should fix another warning reported by Travis 2015-01-30 08:57:35 -06:00
Gregory Nutt
a76b87305a Networking: Should fix a few compile errors/warnings reported by Travis 2015-01-30 08:54:40 -06:00
Gregory Nutt
f357ba6c80 Fix error just introduces into recvfrom. From Macs N. 2015-01-30 08:22:44 -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
6eda06888a Eliminate a warning 2015-01-30 06:39:23 -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
7e7d228cd7 Update a comment 2015-01-30 05:40:28 -06:00
Gregory Nutt
7f95e4fb2c Networking: Fix a major TCP bug introduced with commit e71c09ce9777ff732cb60bd07fb43d85522f79d6. Some connection logic was reorder -- setting the socket got moved BEFORE the point where the check was made if the socket was already connected. The resulting behavior was odd: Telnet would connect, but then when you exit and reconnect, it would fail to connect. But then if try again, it would connect okay. So the symptom was connect-fail-connect-fail-... 2015-01-29 16:30:47 -06:00
Gregory Nutt
8b9958b7ba Fix two compilation errors that occur when Unix domain occurs an IPv6 are enabled 2015-01-29 12:31:29 -06:00
Gregory Nutt
0deca5b039 Unix domain: Various fixes to get apps/examplex/udgram working 2015-01-29 11:05:04 -06:00
Gregory Nutt
e5f820a2cd Unix domain: Add sendto logic for SOCK_DRAM protocoal 2015-01-29 10:40:10 -06:00
Gregory Nutt
9abd8e2e64 Fix typo in conditional compilation 2015-01-29 10:08:16 -06:00
Gregory Nutt
f6bec26e53 Elminate some warnings with TCP and UDP are disabled 2015-01-29 09:33:45 -06:00
Gregory Nutt
ffb16f658f Unix domain: Add initial cut at redvfrom() for Unix domain datagram sockets 2015-01-29 07:47:09 -06:00
Gregory Nutt
1c8ddae655 Fix a typo in comments 2015-01-28 17:51:59 -06:00
Gregory Nutt
72ac79e7a1 Minor fixes after initial tests with apps/examples/udgram 2015-01-28 15:27:54 -06:00
Gregory Nutt
dfa642601a Merge remote-tracking branch 'origin/master' into afunix 2015-01-28 14:58:49 -06:00
Gregory Nutt
35a814abca net/socket/accept.c: Ooops.. deleted one too many header files 2015-01-28 14:56:06 -06:00
Gregory Nutt
2c7123197c Networking: Move UDP-specifc parts of sendto() out of socket/sendto.c and into udp/udp_sendto.c. Hook in Unix domain sokcet sendto() logic (still just a stub for the moment) 2015-01-28 13:41:24 -06:00
Gregory Nutt
508f8aefa6 Unix domain socket support is no longer EXPERIMENTAL 2015-01-28 13:22:53 -06:00
Gregory Nutt
e4e863e752 Merge remote-tracking branch 'origin/master' into afunix 2015-01-28 12:14:00 -06:00
Gregory Nutt
5c2aad64cd Networking: Missed header file inclusion 2015-01-28 12:09:00 -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
6a1bfc9594 Unix domain: Fix a typo and some missing conditional compilation 2015-01-28 11:48:23 -06:00
Gregory Nutt
cba78c7349 Unix domain: More fixes. With these changes, apps/examples/ustream works 2015-01-28 08:39:48 -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
b76db036da Unix domain: A few more bugfixes 2015-01-27 17:31:42 -06:00
Gregory Nutt
ca2102febb Unix domain: A few fixes from early integration 2015-01-27 16:39:30 -06:00
Gregory Nutt
55d94b6748 Unix domain: With these changes I can build a system with no link layer enabled, only Unix domain sockets 2015-01-27 15:26:03 -06:00
Gregory Nutt
c250c97186 Unix domain: More fixed to build without Ethernet or Slip 2015-01-27 14:26:10 -06:00
Gregory Nutt
8f517ad0c1 recvfrom(): Missing else in conditional logic of recvfrom() 2015-01-27 14:14:53 -06:00
Gregory Nutt
c49c7bc447 Merge remote-tracking branch 'origin/master' into afunix 2015-01-27 14:12:41 -06:00
Gregory Nutt
cbf0608513 Various fixes to get Unix domain sockets to build on the simulator without Ethernet 2015-01-27 14:11:46 -06:00
Gregory Nutt
8f29039f42 Unix sockets: Fleshes out the recvfrom() logic 2015-01-27 11:51:24 -06:00
Gregory Nutt
120efa4717 Local sockets: Add basic packet send logic 2015-01-27 08:05:09 -06:00
Gregory Nutt
1f7b40ce15 Local sockets: Remove some ill-conceived logic 2015-01-27 07:03:20 -06:00
Gregory Nutt
a88b824f96 Networking: Hook in send and revcfrom Unix domain socket logic; still needs hooks for sendto logic 2015-01-26 18:47:48 -06:00
Gregory Nutt
2201c9b449 Add stub files for sending and receiving on FIFOs 2015-01-26 17:28:36 -06:00
Gregory Nutt
1828badd1d Networking: Add FIFO management logic needed to support Unix domain sockets 2015-01-26 13:30:27 -06:00
Gregory Nutt
a25f6cb7fd Replace an un-necessary goto 2015-01-25 17:53:01 -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
59f9a1a286 Networking: Add local Unix domain socket listen logic 2015-01-25 14:16:44 -06:00
Gregory Nutt
c3f2023089 Networking: Add local Unix domain socket connection logic 2015-01-25 12:37:40 -06:00
Gregory Nutt
ffc02f30b0 Networking: Add logic for binding Unix domain sockets 2015-01-25 08:33:39 -06:00
Gregory Nutt
3b64518049 Networking: A litle more Unix domain socket logic 2015-01-25 07:36:16 -06:00
Gregory Nutt
666ee755da Hook local socket functions into socket creation and close logic 2015-01-24 15:19:50 -06:00
Gregory Nutt
81a3daca6d Add basic build structure for Unix domain sockets 2015-01-24 14:03:32 -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
96a53254dd Some minor clean-up of IPv4/6 flags 2015-01-24 07:29:43 -06:00
Gregory Nutt
e5d1ff373b Networking: IPv4 and IPv6 work together. This fixes a bug necessary to accomplish that as well as cleaning up a couple of other issues 2015-01-23 16:40:18 -06:00
Gregory Nutt
e02ced8c98 Networking: Final fixes. IPv6 pings now work in both directions 2015-01-23 15:10:47 -06:00
Gregory Nutt
8e844a3c27 Networking: Various bugfixes related to IPv6 ping 2015-01-23 14:40:09 -06:00
Gregory Nutt
30f0a942e1 Networking: First cut at ICMPv6 ping logic 2015-01-23 14:06:08 -06:00
Gregory Nutt
51f8e9dbf6 IPv6 is not longer EXPERIMENTAL 2015-01-23 11:43:03 -06:00
Gregory Nutt
af71b7a1ed Networking: Eliminate a warning with UDP checksums are suppressed 2015-01-23 11:42:12 -06:00
Gregory Nutt
f4ce875711 Networking: Fix issues with UDP packet length and checksum calculations when IPv6 is selected 2015-01-23 09:33:18 -06:00
Gregory Nutt
e22848c19c Networking: UDP checksums must always be used with IPv6 2015-01-23 09:31:44 -06:00
Gregory Nutt
b51c00c8d7 Networking: Need to set the IPv6 EtherType on outgoing IPv6 packets 2015-01-23 09:30:50 -06:00
Gregory Nutt
c77426e550 Cosmetic changes to comments; refresh configuration 2015-01-22 14:46:36 -06:00
Gregory Nutt
1c8dae4eee Correct calculation of initial MSS 2015-01-22 12:29:49 -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
2e8667d304 Networking: New domain field in socket structure is created by socket(), but missed cases where a socket is created via accept() or dup() 2015-01-22 07:50:31 -06:00
Gregory Nutt
6175e9eec5 Networking: Correct the value returned by accept() in the case where net_lockingwait() is called. It was returning -1 and losing the errno value. Noted by Rony Xln 2015-01-22 06:51:31 -06:00
Gregory Nutt
4ab8e85dba Networking: Change some debug outputto vebose debug output 2015-01-21 14:23:50 -06:00
Gregory Nutt
4db99c631f Networking IPv6: Fix and error when adding a neighbor to the table. Comparing wrong address. Add more debug info too 2015-01-21 14:13:57 -06:00
Gregory Nutt
7dd07f7179 Networking: IPv6 receipt logic errors. Don't save neighbor address in table when solicitation is recieved. Save it when the advertisement is received 2015-01-21 14:13:03 -06:00
Gregory Nutt
8132afb3de Fix some errors in memcpy arguments. No ampersands on array arguments. 2015-01-21 12:42:22 -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
4498bf9f5b ICMPv6 Neighbor Advertisement: Need to set O flag or response is not used. Also, TTL=255 seems to be more-or-less standard in this message 2015-01-21 08:37:23 -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
cdff532bfa Networking: When sending ICMPv6 advertisements and solicitations, set the NOARP bit so that we don't overwrite the destination MAC address 2015-01-20 15:59:52 -06:00
Gregory Nutt
67a655ecf0 Networking: Add logic to search the Neighbor Table and update the destination address in the output Ethernet header OR to send an ICMPv6 Neighbor Solicitation if there is no entry in the Neighbor table for the IPv6 address 2015-01-20 14:37:02 -06:00
Gregory Nutt
41bb57efea Fix typo in function name 2015-01-20 13:48:42 -06:00
Gregory Nutt
109c7c7437 Networking: Clean up IPv6 Neighbor Table logic 2015-01-20 12:31:56 -06:00
Gregory Nutt
d68cd0d8de Networking: Update ICMPv6 logic to RFCs 2015-01-20 11:06:51 -06:00
Gregory Nutt
aec4528882 Cosmetic standardization of some naming in comments 2015-01-19 16:02:56 -06:00
Gregory Nutt
33d95bdcee Networking: Hook in ICMPv6 polling operations into periodic network logic 2015-01-19 15:51:40 -06:00
Gregory Nutt
2fd334432c Networking: Fix to ICMPv6 logic: Needs to set source and destination address in the Ethernet header 2015-01-19 14:57:55 -06:00
Gregory Nutt
6d901e4d8b Networking: Costmetic changes 2015-01-19 14:56:35 -06:00
Gregory Nutt
13149536f2 Networking: Update ICMPv6 message numbers 2015-01-19 14:04:16 -06:00
Gregory Nutt
bd3d26ccd7 Networking: Fix an IPv6 bug: Wrong network byte order in comparison 2015-01-19 13:21:26 -06:00
Gregory Nutt
ce75017d7c Networking: net/neighbor/Make.defs was not being included by Makefile 2015-01-19 10:36:22 -06:00
Gregory Nutt
adc91965ed NSH library: Disable put and get commends of TFTP client is not enabled; disable wget command if web client is not enabled 2015-01-19 10:32:46 -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
59c0757183 Fix a few more dangling IPv6 issues found by code inspection 2015-01-18 10:33:27 -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
2a2c925259 Merge remote-tracking branch 'origin/master' into ipv6 2015-01-17 17:08:22 -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
cfbe12adb2 Networking: Fix some errors detected by Travis in configuration that have TCP on and UDP off and vice versa 2015-01-17 17:00:19 -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
b80cdb3880 Fix a few warnings introduced with the last commit 2015-01-17 14:25:40 -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
4a0eb1f0b1 Networking: Calculation of TCP and UDP checksums differ with IPv4 and IPv6 2015-01-17 12:31:39 -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
0f364f6ae6 Networking: Move net/ipv6 to net/neighbor 2015-01-16 16:49:48 -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
fe8b3c5220 Networking: More detangling of IPv6 logic. Next steps will be more invasive and will get moved to a branch 2015-01-16 08:51:18 -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
5a441ce03b Networking: Misck IPv6 detanglement 2015-01-15 12:19:44 -06:00
Gregory Nutt
89538ac4a2 - Rename devif_input() ipv4_input()
- Copy net/devif/devif_input.c to ipv6_input.c.  Remove all IPv4-specific logic.
- Rename net/devif/devif_input.c to ipv4_input.c.  Remove all IPv6-specific logic
- Split IPv4 header structure out as net_ipv4hdr_s from net_iphdr_s
2015-01-15 08:03:56 -06:00
Gregory Nutt
a49f0231d2 Networking: A few more IPv6-related fixes 2015-01-14 18:34: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
99a18c84ff Networking: Remove all logic conditioned upon IPv6 from the net/icmp/directory 2015-01-14 14:47:40 -06:00
Gregory Nutt
fcd65e9d7d Networking: Make a home for ICMPv6 2015-01-14 14:26:50 -06:00
Gregory Nutt
7d68c22d7f Networking: Add support for IPv6 ioctls 2015-01-14 13:03:12 -06:00
Gregory Nutt
babe9cf08e Network: Add an IPv4 configuration option. Hardcoded to =y for now, but I would like to be able to select IPv4 and/or IPv6 in the future 2015-01-14 10:51:09 -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
1aa528a572 More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs. 2014-11-25 14:10:35 -06:00
Gregory Nutt
6a3a2f466c Update comments and README 2014-11-24 07:25:40 -06:00
Gregory Nutt
8de38d719a Fix included IPv6 file name 2014-11-24 07:25:03 -06:00
Gregory Nutt
aa9700c1ab Update comments and read me 2014-11-23 12:52:18 -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
43d036f587 Network routing: Refuse to perform routing table lookups for the Broadcast IP address. From Brennan Ashton 2014-11-23 08:36:34 -06:00
Gregory Nutt
d2a323ca19 Back inclusion of ipv6.h 2014-11-22 13:26:27 -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
Gregory Nutt
fbd82712da Add a comment 2014-11-22 09:08:31 -06:00
Gregory Nutt
d76ed2cbc5 Fix UDP routing error in last commit 2014-11-22 09:08:06 -06:00
Gregory Nutt
251249a954 Back out a misconception about INADDR_ANY introduce with some previous commits 2014-11-22 07:55:45 -06:00
Gregory Nutt
80fc094734 Make tcp_listener static scope; it is not used outside of tcp_conn.c 2014-11-22 07:14:17 -06:00
Gregory Nutt
2c2b5e6738 Fix routing of muli-network UDP packets 2014-11-21 17:44:12 -06:00
Gregory Nutt
15c07e0d67 Network: Misc changes to UDP bind logic for the case of multiple networks 2014-11-21 17:00:08 -06:00
Gregory Nutt
4dd021f351 Some ideas for how port assignments might work with multiple network interfaces 2014-11-21 14:21:30 -06:00
Gregory Nutt
fbedc361bb File missed in previous commit 2014-11-21 14:19:36 -06:00
Gregory Nutt
735aa4289a Network: Add logic to get a default network device (for the case where are multiple devices). For INADDR_ANY 2014-11-21 14:14:39 -06:00
Gregory Nutt
d297b623b4 Network: Add a file of IPv6 globals 2014-11-21 14:10:25 -06:00
Gregory Nutt
c64cb19861 Move IP header flags from tcp.h to ip.h and rename IP_FLAGS vs TCPFLAGS. The problem fixed here is that there IP flags were not available when TCP was disabled. The IP flags are used in ICMP and IGFMP 2014-11-17 17:16:46 -06:00
Gregory Nutt
8b2b7afdae Update TODO; Cosmetic changes to comments 2014-11-17 15:34:50 -06:00
Gregory Nutt
57bcb28991 changes for clean build with Ethernet+SLIP 2014-11-16 11:27:53 -06:00
Gregory Nutt
38754a3466 Completes basic changes to support per-device/per-link TCP receive window size 2014-11-16 11:15:21 -06:00
Gregory Nutt
2340d46d20 Rename NET_LL_MTU to NET_DEV_MTU; rename d_llmtu to d_mtu 2014-11-16 10:42:19 -06:00
Gregory Nutt
859748a94e Completes conversion of CONFIG_NET_BUFIZE to CONFIG_NET_ETH/SLIP_MTU 2014-11-16 09:22:38 -06:00
Gregory Nutt
ca7486d7f3 Add link MTU size to network device structure. 2014-11-16 08:49:14 -06:00
Gregory Nutt
51adb90e9a Network: Update SLIP configuration; Fix compile issues when building SLIP only 2014-11-15 14:36:49 -06:00
Gregory Nutt
daa94934eb Network: netdev_register() must assign the device name appropriately according to the link layer type 2014-11-15 14:21:11 -06:00
Gregory Nutt
08de18c1a6 Network: Various fixes for clean compile with both Ethernet and SLIP 2014-11-15 13:52:39 -06:00
Gregory Nutt
2e55db369d Network: All logic will now handle varialbe length link layer protocol headers within incoming packets. This permits use of multiple network interfaces with differing data links. For example, ETHERNET + SLIP 2014-11-15 13:13:23 -06:00
Gregory Nutt
a831ab21bc Merge remote-tracking branch 'origin/master' into llhdrlen 2014-11-15 10:04:49 -06:00
Gregory Nutt
ebb6fd1e9c Resove merge conflicts 2014-11-15 10:04:33 -06:00
Gregory Nutt
25d787ff12 Remove use of NET_LL_HDRLEN from net/arp logic. Use ETH_HDRLEN instead 2014-11-15 09:13:50 -06:00
Gregory Nutt
2b758537ea Network: Misc fixes for clean complete with both Ethernet and SLIP enabled 2014-11-15 08:55:50 -06:00
Gregory Nutt
388ef8db1a Netwoek: Ada a parameter to netdev_register() to indicate the link protocol supported by the driver. Use this value to replace some logic commited yesterday 2014-11-15 08:22:51 -06:00
Gregory Nutt
64d18bfe12 NET: Fix some some more ARP/Ethernet releated configuration 2014-11-14 21:22:45 -06:00
Gregory Nutt
0d7c378e4e Costmetic change 2014-11-14 18:51:57 -06:00
Gregory Nutt
ebdff66c8b ARP: Add support for the case where there are multiple networks: One being Etherenet and the other not (say slip or perhaps someday PPP). In that case, we need to suppress ARP-related operations on the SLIP/PPP interface only 2014-11-14 18:25:33 -06:00
Gregory Nutt
e03c764d92 I don't think that the net_route function has ever worked correctly. The source ip was updated in the match struct instead of the route ip. From Brennan Ashton. 2014-11-14 16:45:25 -06:00
Gregory Nutt
8e5ae2ee18 EFM32: Fix typo in connecting ODD GPIO interrupt. Noted by Pierre 2014-11-08 06:18:21 -06:00
Gregory Nutt
ae3cc327c7 AIO now also supports socket transfers 2014-10-11 08:15:23 -06:00
Gregory Nutt
0abe6c66d7 Update everything under nuttx/net to use the corrected syslog interfaces 2014-10-08 10:48:11 -06:00
Gregory Nutt
d914f3ceec Major structure of file system functions to better support asynchronous I/O. Respository should not be trusted until I have a chance to verify everything 2014-10-06 10:53:25 -06:00
Gregory Nutt
205260d5e2 Reanem kzalloc to kmm_zalloc for consistency 2014-08-31 17:34:44 -06:00
Gregory Nutt
1780810d3d Rename kmalloc to kmm_malloc for consistency 2014-08-31 17:26:36 -06:00
Gregory Nutt
54fa3b0b59 Rename kfree to kmm_free for consistency with other naming conventions 2014-08-31 17:04:02 -06:00
Gregory Nutt
ad9b3f8ab8 wdog.h does not contain any application interface, only internal OS interface. Further, it is non-standard. Move wdog.h from include/ to include/nuttx. For the same reason, move the description of the watchdog timer interfaces from the Users Guide to the Porting Guide. 2014-08-21 11:16:55 -06:00
Gregory Nutt
21add71646 ARP reuestion logc needs to do the right thing if (1) the address is a broadcast or multicast address, and (2) if the IP address lies outside of the network. Thanks to Manuel Stuehn 2014-08-20 07:09:02 -06:00
Gregory Nutt
27cc2a3fc3 ARP request logic is no longer EXPERIMENTAL 2014-08-20 07:07:24 -06:00
Gregory Nutt
8e84282c05 ARP: Fix bid conversion from msec to nsec 2014-08-19 08:37:14 -06:00
Gregory Nutt
a9ca05266b Update ChangeLog 2014-08-19 07:52:52 -06:00
Gregory Nutt
9662f1750c ARP: Add signal logic so that we do not have to wait so long with the network responses to ARP requests quickly 2014-08-19 07:47:32 -06:00
Gregory Nutt
4bba611dc6 Move some internal networking function protoypes out of the public include/nuttx/net/arp.h into to the private net/arp/arp.h 2014-08-18 16:35:20 -06:00
Gregory Nutt
6e04518e4a If CONFIG_NET_ARP_SEND is enabled, then all ICMP, TCP, and UDP send operations will call arp_send() before attempting the real send operation. arp_send() will check if the the IP address mapping is in the ARP table and, if not send ARP requests periodically until it is. This eliminates losing the first outgoing message because there is not mapping in the ARP table. 2014-08-18 16:22:14 -06:00
Gregory Nutt
548fda7834 arp_poll(): inished the implementation of logic to send ARP requests. Complete, fully hooked into the networking logic, and ready for test (but still untested) 2014-08-18 15:24:51 -06:00
Gregory Nutt
b440fa18ca arp_send.c: Partial implementation of logic to send ARP requests to assure that an IP address mapping is present in the ARP table 2014-08-18 14:29:02 -06:00
Gregory Nutt
ec429fdf00 PKT sockets: Change how the IFF_NOARP flag is handled. This should be set only when data is moved into the buffer and cleared after tested by the ARP logic. Setting it globally can cause packets to be sent with no valid MAC addresses 2014-08-18 13:42:51 -06:00
Gregory Nutt
1a7e1fb93b arp_format.c: Move the logic that formats an ARP packet into a separate file where it can be re-used. 2014-08-18 12:37:40 -06:00
Gregory Nutt
1323ab9352 Move arp_arpin() from arp_inout.c to its own file. Rename arp_inout.c to arpipin.c because that is all that is left in the file 2014-08-18 11:36:39 -06:00
Gregory Nutt
6f1d354ef1 Move arp_out() from arp_inout.c to its own file 2014-08-18 11:21:53 -06:00
Gregory Nutt
985c016150 ARP: Add missing configuration option to select dumping of ARP packet headers. Move ARP dumping logic from arp_inout.c to its own file 2014-08-18 11:08:15 -06:00
Gregory Nutt
057af36c1d More of the PHY event notification logic change: Fix some compile errors when full feature is enabled; Add some missing ioctol logic 2014-08-16 15:04:09 -06:00
Gregory Nutt
eb5e2e4b20 Finishes the ioctl definition to subscribe to PHY events. Revamp network ioctl signature to support arguments other than struct mii_ioctl_data. 2014-08-16 14:08:04 -06:00
Gregory Nutt
e463730c2f A little too much was deleted in a recent commit 2014-08-16 12:52:28 -06:00
Gregory Nutt
79e098b20e Clean missing function headers 2014-08-16 10:24:06 -06:00
Gregory Nutt
caba61999a Remove CONFIG_DISABLE_CLOCK 2014-08-07 12:35:24 -06:00
Gregory Nutt
cab24a4bd8 Add inclusion of assert.h to so files that use DEBUGASSERT 2014-07-21 18:46:47 -06:00
Gregory Nutt
4f60bfb485 IOB: Change suggested by Rony Xln 2014-07-08 07:13:50 -06:00
Gregory Nutt
178b2b0cbe NET: Important fix to the read-ahead buffer queue managment: Consumed bytes were being trimmed from the head of the queue, but the queue head itself was not being updated. From Rony XLN 2014-07-07 07:28:17 -06:00
Gregory Nutt
e89eac6365 NET: Fix a few problems after big merge of network reorganization 2014-07-06 17:58:36 -06:00
Gregory Nutt
73f3ecf7e2 NET: Rename network interrupt event flags more appropriately: TCP_, UDP_, ICMP_, or PKT_ vs UIP_ 2014-07-06 17:22:02 -06:00
Gregory Nutt
a251259f90 NET: Rename some non-configurable constants UIP_ to IP_ or TCP_ 2014-07-06 16:19:26 -06:00
Gregory Nutt
b77fda2c95 NET: Rename TCP state values: UIP_ -> TCP_ 2014-07-06 16:10:26 -06:00
Gregory Nutt
1f11a452dd NET: Add a few missing configuration options to the Kconfig files 2014-07-06 13:04:27 -06:00
Gregory Nutt
2d52d70d4c NET: Move private definitions from include/nuttx/net/tcp to net/tcp/tcp.h 2014-07-06 12:34:27 -06:00
Gregory Nutt
9e87ab90b8 NET: Move private definitions from include/nuttx/net/arp.h to net/arp/arp.h 2014-07-06 11:05:28 -06:00
Gregory Nutt
d392be6f73 NET: Oops. Forgot to add a file before committing 2014-07-05 15:21:13 -06:00
Gregory Nutt
811668cf15 NET: Move most of the contents of include/nuttx/net/igmp.h moved to net/igmp/igmp.h 2014-07-05 15:15:40 -06:00
Gregory Nutt
47a502a5e2 NET: Most of the contents of include/nuttx/net/udp.h moved to net/pkt/udp.h 2014-07-05 14:40:29 -06:00
Gregory Nutt
dc8cba763d NET: Most of the contents of include/nuttx/net/pkt.h moved to net/pkt/pkt.h 2014-07-05 13:59:22 -06:00
Gregory Nutt
c5fc24e110 NET: Standardize naming of all protocal header lengths 2014-07-05 13:04:48 -06:00
Gregory Nutt
60246e613b NET: emoved all includes of uip.h; added includes of ip.h wherever needed. Tried to fix problems of the now missing sneak inclusions because uip.h was removed. There are probably a few of these that were missed. 2014-07-04 19:13:08 -06:00
Gregory Nutt
0bb153b8cb Remove all inclusion of uip.h 2014-07-04 16:58:22 -06:00