SaeHie Park
e983e547e1
Networking: Correct return value from psock_tcp_accept(). From SaeHie Park
2015-08-25 07:15:21 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Gregory Nutt
8f7752d956
Networking: Modify how callback structures are stored to avoid another potential use of a stal pointer.
2015-06-03 08:11:57 -06:00
Gregory Nutt
33085cb309
Networking: The network device list was protected by a re-entrant semaphore. With the recent change to support network device callback, the network stack needs to access the network device list too. Some drivers, however, run the network stack from the interrupt level -- this is bad but a fact in the current state. Of course,those drivers are unable to take the semaphore and will assert.
...
The solution here is to eliminate the device devices semaphore altogether. This eliminates netdev_semtake() and netdev_semgive() and replaces them with net_lock() and net_unlock() which have larger scope as needed for this purpose.
2015-05-31 08:34:03 -06:00
Gregory Nutt
6687e156e6
Revamp last change. IFF_UP only required when allocating callback, not freeing.
2015-05-30 21:13:58 -06:00
Gregory Nutt
8b029fbbee
TCP networking: Hook the network monitor into the device event notification logic
2015-05-30 11:29:47 -06:00
Gregory Nutt
933b95ac80
Forgot to add a file in the last commit
2015-05-30 09:17:46 -06:00
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
e672bcebfd
UDP Networking: Add support for device event notification for UDP transfers.
2015-05-29 10:21:06 -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
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
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
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
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
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