Gregory Nutt
04a661a97c
TCP networking: Add support for network driver events
2015-05-30 09:12:27 -06:00
Gregory Nutt
ab50e9d04d
Networking: Get rid of g_ipv4_allzeroaddr and g_ipv4_alloneaddr. It is more efficient and more intuitive to use INADDR_ANY and INADDR_BROADCAST
2015-05-29 15:16:11 -06:00
Gregory Nutt
34509a9ad5
UDP should use dev=NULL if the address in the lookup is INADDR_ANY
2015-05-29 14:56:44 -06:00
Gregory Nutt
0bdf2d5360
UDP Networking: Misc fixes to get the last changes working + cleanup
2015-05-29 14:32:56 -06:00
Gregory Nutt
fa8b7c19b7
Forgot to add a file in the last commit
2015-05-29 11:03:02 -06:00
Gregory Nutt
f10fdf7ad4
Networking: Add a test to see a device pointer is still valid
2015-05-29 11:01:03 -06:00
Gregory Nutt
2102892e7b
Fix missing file and some compilation errors from the last UDP committ
2015-05-29 10:45:41 -06:00
Gregory Nutt
e672bcebfd
UDP Networking: Add support for device event notification for UDP transfers.
2015-05-29 10:21:06 -06:00
Gregory Nutt
e28a8b1416
Raw sockets: Correct some compile issues; better modularized device-related logic
2015-05-29 08:47:21 -06:00
Gregory Nutt
988fbf0dcc
Merge branch 'master' of ssh://git.code.sf.net/p/nuttx/git into multinic
...
Conflicts:
nuttx/ChangeLog
2015-05-29 08:15:17 -06:00
Gregory Nutt
5337176cdf
Networking: setsockopt() fails when setting timeouts to values less that an 100 msec. That is because the timeout is limited to stops of 1 decisecond and because the conversion of structure timeval was truncating the microsecond remainder. The utility net_timeval2dsec now accespts and option to determin how it handles the remainder: truncate, discarding the remainder, use the remainder to round to the closed decisecond value, or use any non-zero remainder to the next larger whole decisecond value.
...
For the setsockopt() case, it will always use the final option. This means that a time of zero (i.e., not timeout) can only occur if the value zero was explicated provided to setsockopt().
2015-05-29 07:17:15 -06:00
Gregory Nutt
0595d54470
Correct some comments
2015-05-28 19:44:04 -06:00
Gregory Nutt
4747c04c94
Trivial correction to some comments
2015-05-28 19:43:35 -06:00
Gregory Nutt
b5c005d5a4
Merge remote-tracking branch 'origin/master' into multinic
...
Conflicts:
nuttx/ChangeLog
2015-05-28 19:30:48 -06:00
Gregory Nutt
7ec0725533
Missed a couple of function headers
2015-05-28 19:28:41 -06:00
Gregory Nutt
d319b7c6f0
Networking: PKT logic now uses the device event list
2015-05-28 12:40:05 -06:00
Gregory Nutt
e81f279315
Networking: Modify event list handling: Now there are two event lists each device structure: (1) One is for ARP and ICMP data related evetns, the other is for device related events. Callback allocation/free routines no accept a device paramter as well as a list: If the device paramter is added, then the callback goes into both the connection-related liast AND the device event list. Thus each socket type can received both custom data-related events as well as common device related events.
2015-05-28 12:01:38 -06:00
Gregory Nutt
3606d05888
Merge branch 'multinic'
2015-05-28 09:07:18 -06:00
Gregory Nutt
3260db7dbe
Reorder some network events bitset to make the event class clearer
2015-05-28 08:55:36 -06:00
Gregory Nutt
01d176af76
net_startmonitor.c always returned zero. In the case where a socket has already been closed, it correctly handled the disconnetion event but still returned OK. Returning OK causes the callers of net_startmonitor to assume that the connection was okay, undoing the good things that net_startmonitor did and causing the socket to be marked as connected. This behavior was noted by Pelle Windestam.
2015-05-28 08:23:51 -06:00
Gregory Nutt
0e2b6929b4
Add function headers to prototypes in net/socket/socket.h
2015-05-28 07:26:03 -06:00
Gregory Nutt
d6c3ed1c6f
Networking: Fixes an important TCP bug: 16-bit flags was being converted to 8-bits in a few locations, causing loss of status indications
2015-05-27 17:17:42 -06:00
Gregory Nutt
4fd0192a3e
Networking: No that ARP, ICMP, and ICMPv6 reside in the same list we need to make the definitions of ARP_POLL, ICMP_POLL, and ICMPv6_POLL different because there are small differences in the context for each.
2015-05-27 15:04:51 -06:00
Gregory Nutt
390eeaae69
Add function headers to netdev.h header file
2015-05-27 14:34:15 -06:00
Gregory Nutt
2ecff2a432
Add some missing NETDEV_DOWN support for ICMPv6 auto configuration and router support
2015-05-27 12:49:39 -06:00
Gregory Nutt
7d8e8bc188
Missed a place where NETDEV_DOWN needs to be added to notification flags
2015-05-27 12:22:07 -06:00
Gregory Nutt
b94321cfb4
Extend device specific callbacks to ICMPv6 and ARP. Fix some IPv6 compilation errors that have crept in
2015-05-27 11:39:44 -06:00
Gregory Nutt
8ecb84ed89
Improve icmp handling if MULTINIC enabled. From Max Neklyudov
2015-05-27 09:26:00 -06:00
Gregory Nutt
608f812407
Fix bug in IPv6 router from Max Neklyudov.
2015-05-13 07:26:24 -06:00
Gregory Nutt
f20ac5ef93
Add inclusion of assert.h in networking files where needed to avoid compilation errors. From Max Neklyudov.
2015-05-13 07:24:22 -06:00
Gregory Nutt
8cb4e78a1a
Complete implementation of the IPv6 routing logic. From Max Neklyudov.
2015-05-13 07:22:02 -06:00
Gregory Nutt
0f5c35260b
Local sockets: Local stream sockets had problem of double releasing pipes (both server and client attempt release), which causes wrong pipe pair being closed in multi-client case. Solve by adding per connection instance ID to pipe names. From Jussi Kivilinna (2015-05-12).
2015-05-12 07:47:32 -06:00
Gregory Nutt
3c1af2feed
Local sockets: Add poll support for Unix stream sockets. From Jussi Kivilinna.
2015-05-12 07:41:12 -06:00
Gregory Nutt
2fcb93d2ca
Correct some network lock logic: Two error conditions where the network was not being unlocked and one where it was getting unlocked twice. From Jussi Kivilinna.
2015-05-12 07:28:26 -06:00
Gregory Nutt
1f3ee83134
Increase the size of the number of bytes sent from uint16_t to uint32_t in order to avoid TCP errors with long sessions. For exmple:
...
int hello_main(int argc, char *argv[])
{
uint32_t i;
for(i = 0; i < 65536; i++)
{
printf("Hello, World!!\n");
}
printf("press any key!!\n");
if (getchar()=='t')
return 0;
else
return 1;
}
When ran in a Telnet session, the "press any key" is not displayed because the tcp session closed unexpectedly with:
tcp_input: ERROR: conn->sndseq xx, conn->unacked xx"
This is fixed by increasing the width of conn->sent to 32-bits to prevent overflow.
From Rony XLN
2015-05-11 07:14:25 -06:00
Gregory Nutt
d35926ea4a
Fix typo introduced by commit a00f14a60a8ec54fbcf63e44d00f7101ec7cb5a3
2015-05-08 14:19:18 -06:00
Gregory Nutt
00011d4766
Another newly missing semicolon after a debug assertion. Noted by Librae
2015-04-29 15:56:08 -06:00
Gregory Nutt
621eae86b1
Networking: If IPV6 is not enabled, an warning occurs for an unused variable, which is currently used inside the IPV6 block, but declared outside. From ObitalFox.
2015-04-27 11:28:28 -06:00
Gregory Nutt
7a745c3fa4
Use common macro(s) for calculating link layer header length. From Brennan Ashton.
2015-04-13 13:53:13 -06:00
Gregory Nutt
3840c2a14b
Fix several typos in comments
2015-04-09 16:13:03 -06:00
Gregory Nutt
3ba9dda227
socket: net_dupsd: Do not call sockfd_socket() twice. From Juha Niskanen
2015-03-12 08:11:08 -06:00
Gregory Nutt
21d6e41032
Add TUN device. From Max Neklyudov
2015-03-11 06:52:56 -06:00
Gregory Nutt
5c13722416
Networking: Improve the network device registration logic. When multiple link types are used, modify how each interface number is assigned to the device name by incrementing the device number individually for each interface link type. From Max Neklyudov.
2015-02-27 08:23:14 -06:00
Gregory Nutt
19f3d46eb0
Fix a list handling error in netdev_unregister(). From Max Neklyudov
2015-02-27 08:01:31 -06:00
Gregory Nutt
cded7ea682
Fix some time value changes; mostly changing greater than 1000000000 to greater than or equal to 1000000000. From Juha Niskanen
2015-02-20 07:07:36 -06:00
Gregory Nutt
63ab39b274
VFS: The inode unlink method should not be support if operations on the root pseudo-filesystem are disabled.
2015-02-18 09:34:58 -06:00
Gregory Nutt
db741dd695
Move some useful internal logic from recvfrom.c and udp_callback.c and put them in ip.h where they can be used more generally
2015-02-17 07:37:44 -06:00
Gregory Nutt
686dcbb79c
Move some useful internal macros from udp_send.c and put them in ip.h where they can be used more generally
2015-02-17 07:08:11 -06:00
Gregory Nutt
eb8f5e548f
Purely cosmetic changes resulting from last review IPv6 UDP change
2015-02-16 15:23:02 -06:00
Gregory Nutt
3f5ff4b210
IPv4 mapping to IPv6 implementation. Just for UDP. From Macs Neklyudov
2015-02-16 14:33:58 -06:00