Oleh Derevenko(deleted)
12/12/2007 10:35 AM
post3687
|
...continued from "TCP stream socket send() thread safety" thread
Hello!
So, first the ending of the old story... I did not work with Windows for quite a long time already that's why assumption
regarding necessity to read until WSAEWOULDBLOCK is returned was incorrect. For programmer's convenience Windows re-
enables socket select event signalling after any call to recv(). However, handle shuffling was still an issue.
Nevertheless, after corrections to client the problem is not gone.
I had to make further investigations. I ran Wireshark (formerly, Ethereal) on Windows machine to investigate the problem
.
Here is normal request-response for a heartbeat packet (172.25.31.241 is QNX host, 172.25.31.249 is Windows client):
======begin======
No. Time Source Destination Protocol Info
115272 530.469917 172.25.31.249 172.25.31.241 TCP 2789 > 16015 [PSH, ACK] Seq=71129 Ack=4198257
Win=64959 [TCP CHECKSUM INCORRECT] Len=16
Frame 115272 (70 bytes on wire, 70 bytes captured)
Arrival Time: Dec 12, 2007 14:51:19.841042000
[Time delta from previous captured frame: 0.130069000 seconds]
[Time delta from previous displayed frame: 6.644444000 seconds]
[Time since reference or first frame: 530.469917000 seconds]
Frame Number: 115272
Frame Length: 70 bytes
Capture Length: 70 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:tcp:data]
[Coloring Rule Name: Checksum Errors]
[Coloring Rule String: cdp.checksum_bad==1 || edp.checksum_bad==1 || ip.checksum_bad==1 || tcp.checksum_bad==1 ||
udp.checksum_bad==1]
Ethernet II, Src: AsustekC_5c:57:23 (00:15:f2:5c:57:23), Dst: Intel_b9:5d:30 (00:0e:0c:b9:5d:30)
Destination: Intel_b9:5d:30 (00:0e:0c:b9:5d:30)
Address: Intel_b9:5d:30 (00:0e:0c:b9:5d:30)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: AsustekC_5c:57:23 (00:15:f2:5c:57:23)
Address: AsustekC_5c:57:23 (00:15:f2:5c:57:23)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol, Src: 172.25.31.249 (172.25.31.249), Dst: 172.25.31.241 (172.25.31.241)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 56
Identification: 0x139f (5023)
Flags: 0x04 (Don't Fragment)
0... = Reserved bit: Not set
.1.. = Don't fragment: Set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 128
Protocol: TCP (0x06)
Header checksum: 0x4f04 [correct]
[Good: True]
[Bad : False]
Source: 172.25.31.249 (172.25.31.249)
Destination: 172.25.31.241 (172.25.31.241)
Transmission Control Protocol, Src Port: 2789 (2789), Dst Port: 16015 (16015), Seq: 71129, Ack: 4198257, Len: 16
Source port: 2789 (2789)
Destination port: 16015 (16015)
Sequence number: 71129 (relative sequence number)
[Next sequence number: 71145 (relative sequence number)]
Acknowledgement number: 4198257 (relative ack number)
Header length: 20 bytes
Flags: 0x18 (PSH, ACK)
0... .... = Congestion Window Reduced (CWR): Not set
.0.. .... = ECN-Echo: Not set
..0. .... = Urgent: Not set
...1 .... = Acknowledgment: Set
.... 1... = Push: Set
.... .0.. = Reset: Not set
.... ..0. = Syn: Not set
.... ...0 = Fin: Not set
Window size: 64959
Checksum: 0x9847 [incorrect, should be 0xe476 (maybe caused by "TCP checksum offload"?)]
...
View Full Message
|
|
|