Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Received packets not forwarded to application

Status
Not open for further replies.

dougy83

Programmer
Jul 25, 2007
2
AU
Hi everyone,

I'm trying to talk to a remote ethernet enabled device over a small LAN, but the received packet (I can see them in a tcpdump) data is not making it to the application (I've tried using hyperterminal and a vb6 winsock app on my pc).

The data sent from my pc arrives at the remote, and is decoded correctly and displayed (at remote end). The problem is that the data from the remote end is not.

I've attached a tcpdump of a few packet transactions, I can't see any problems, except that the response packet length is greater than the length specified in the header.

Could anyone give an help as to why the packet is not being accepted by winsock or hyperterminal? Any help would be greatly appreciated.

Regards,
Doug

Info:
10.231.4.105(dougie):port 1900 is the local host
10.241.8.50:port 3355 is the remote

local sends "test string"
remote sends CRLF
remote sends "T"
remote sends "E"
remote sends "S"
remote sends "T"
remote sends CRLF
I think the remote then repeats the above in a single packet: CRLF "TEST" CRLF
local sends "m"
local sends "m"
local sends "m"

Code:
C:\tcpdump -X not arp

*******************************************************************
**                                                               **
**            Tcpdump v3.9.4 (2005.10.02) for Windows            **
**              Win 95/98/ME/NT4/2000/XP/2003/Vista              **
**               x86-32, EMT64T & AMD64 compatible               **
**                                                               **
**      built with microOLAP Packet Sniffer SDK v3.0 and         **
**   microOLAP WinPCap to Packet Sniffer SDK migration module.   **
**                                                               **
**     Copyright (c) 1997 - 2006 microOLAP Technologies LTD,     **
**                  Khalturin A.P. & Naumov D.A.                 **
**                   [URL unfurl="true"]http://www.microolap.com[/URL]                    **
**                                                               **
**                       Sergey M. Britko                        **
**                   [URL unfurl="true"]http://www.givemetoo.com[/URL]                    **
**                                                               **
**                     Free for personal use.                    **
**                                                               **
*******************************************************************

tcpdump: listening on \Device\{271E1CC8-BDAC-4134-AFDB-2792DF50075A}
10:16:21.146632 IP DOOGIE.1900 > 10.241.8.50.3355: S 2802119121:2802119121(0) win 65535 <mss 1260,nop,nop,sackOK>
        0x0000:  4500 0030 02f8 4000 8006 d55d 0ae7 0469  E..0..@....]...i
        0x0010:  0af1 0832 076c 0d1b a704 f1d1 0000 0000  ...2.l..........
        0x0020:  7002 ffff b417 0000 0204 04ec 0101 0402  p...............
10:16:21.417020 IP 10.241.8.50.3355 > DOOGIE.1900: S 23927463:23927463(0) ack 2802119122 win 2048 <mss 1500,eol>
        0x0000:  4500 0030 04d2 0000 fd06 9683 0af1 0832  E..0...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aa7 a704 f1d2  ...i...l.m......
        0x0020:  7012 0800 9405 0000 0204 05dc 0000 0000  p...............
10:16:21.417020 IP DOOGIE.1900 > 10.241.8.50.3355: . ack 1 win 65535
        0x0000:  4500 0028 02fa 4000 8006 d563 0ae7 0469  E..(..@....c...i
        0x0010:  0af1 0832 076c 0d1b a704 f1d2 016d 1aa8  ...2.l.......m..
        0x0020:  5010 ffff c3ee 0000                      P.......
10:16:28.236827 IP DOOGIE.1900 > 10.241.8.50.3355: P 1:12(11) ack 1 win 65535
        0x0000:  4500 0033 0301 4000 8006 d551 0ae7 0469  E..3..@....Q...i
        0x0010:  0af1 0832 076c 0d1b a704 f1d2 016d 1aa8  ...2.l.......m..
        0x0020:  5018 ffff 76ad 0000 7465 7374 2073 7472  P...v...test.str
        0x0030:  696e 67                                  ing
10:16:28.517230 IP 10.241.8.50.3355 > DOOGIE.1900: . ack 12 win 2037
        0x0000:  4500 0028 04d2 0000 fd06 968b 0af1 0832  E..(...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aa8 a704 f1dd  ...i...l.m......
        0x0020:  5010 07f5 bbee 0000 0000 0000 0000       P.............
10:16:36.418592 IP 10.241.8.50.3355 > DOOGIE.1900: . win 2048
        0x0000:  4500 0028 04d2 0000 fd06 968b 0af1 0832  E..(...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aa8 a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 bbf3 0000 0000 0000 0000       P.............
10:17:02.706392 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927464:23927466(2) win 2048
        0x0000:  4500 002a 04d2 0000 fd06 9689 0af1 0832  E..*...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aa8 a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 aee7 0000 0d0a 0000 0000       P.............
10:17:06.031172 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927466:23927467(1) win 2048
        0x0000:  4500 0029 04d2 0000 fd06 968a 0af1 0832  E..)...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aaa a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 67f0 0000 5400 0000 0000       P...g...T.....
10:17:07.693563 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927467:23927468(1) win 2048
        0x0000:  4500 0029 04d2 0000 fd06 968a 0af1 0832  E..)...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aab a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 76ef 0000 4500 0000 0000       P...v...E.....
10:17:09.045507 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927468:23927469(1) win 2048
        0x0000:  4500 0029 04d2 0000 fd06 968a 0af1 0832  E..)...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aac a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 68ee 0000 5300 0000 0000       P...h...S.....
10:17:10.297307 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927469:23927470(1) win 2048
        0x0000:  4500 0029 04d2 0000 fd06 968a 0af1 0832  E..)...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aad a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 67ed 0000 5400 0000 0000       P...g...T.....
10:17:11.859553 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927470:23927472(2) win 2048
        0x0000:  4500 002a 04d2 0000 fd06 9689 0af1 0832  E..*...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aae a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 aee1 0000 0d0a 0000 0000       P.............
10:17:26.881153 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927464:23927472(8) win 2048
        0x0000:  4500 0030 04d2 0000 fd06 9683 0af1 0832  E..0...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aa8 a704 f1dd  ...i...l.m......
        0x0020:  5000 0800 fa3d 0000 0d0a 5445 5354 0d0a  P....=....TEST..
10:17:33.821132 IP DOOGIE.1900 > 10.241.8.50.3355: P 12:13(1) ack 1 win 65535
        0x0000:  4500 0029 0304 4000 8006 d558 0ae7 0469  E..)..@....X...i
        0x0010:  0af1 0832 076c 0d1b a704 f1dd 016d 1aa8  ...2.l.......m..
        0x0020:  5018 ffff 56da 0000 6d                   P...V...m
10:17:34.081507 IP 10.241.8.50.3355 > DOOGIE.1900: . ack 13 win 2047
        0x0000:  4500 0028 04d2 0000 fd06 968b 0af1 0832  E..(...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1ab0 a704 f1de  ...i...l.m......
        0x0020:  5010 07ff bbdb 0000 0000 0000 0000       P.............
10:17:36.615150 IP DOOGIE.1900 > 10.241.8.50.3355: P 13:14(1) ack 1 win 65535
        0x0000:  4500 0029 0305 4000 8006 d557 0ae7 0469  E..)..@....W...i
        0x0010:  0af1 0832 076c 0d1b a704 f1de 016d 1aa8  ...2.l.......m..
        0x0020:  5018 ffff 56d9 0000 6d                   P...V...m
10:17:36.885539 IP 10.241.8.50.3355 > DOOGIE.1900: . ack 14 win 2047
        0x0000:  4500 0028 04d2 0000 fd06 968b 0af1 0832  E..(...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1ab0 a704 f1df  ...i...l.m......
        0x0020:  5010 07ff bbda 0000 0000 0000 0000       P.............
10:17:37.656648 IP DOOGIE.1900 > 10.241.8.50.3355: P 14:15(1) ack 1 win 65535
        0x0000:  4500 0029 0306 4000 8006 d556 0ae7 0469  E..)..@....V...i
        0x0010:  0af1 0832 076c 0d1b a704 f1df 016d 1aa8  ...2.l.......m..
        0x0020:  5018 ffff 56d8 0000 6d                   P...V...m
10:17:37.927036 IP 10.241.8.50.3355 > DOOGIE.1900: . ack 15 win 2047
        0x0000:  4500 0028 04d2 0000 fd06 968b 0af1 0832  E..(...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1ab0 a704 f1e0  ...i...l.m......
        0x0020:  5010 07ff bbd9 0000 0000 0000 0000       P.............	ack
10:17:41.882724 IP 10.241.8.50.3355 > DOOGIE.1900: . 23927464:23927472(8) win 2048
        0x0000:  4500 0030 04d2 0000 fd06 9683 0af1 0832  E..0...........2
        0x0010:  0ae7 0469 0d1b 076c 016d 1aa8 a704 f1e0  ...i...l.m......
        0x0020:  5000 0800 fa3a 0000 0d0a 5445 5354 0d0a  P....:....TEST..

28 packets captured
272 packets received by filter
0 packets dropped by kernel

C:\>
 
Hi again,

Is this question too difficult (or too easy :) to get a response?

I analysed the packets and found that in a normal transaction between a winsock server and client, every packet containing user data has the PSH and ACK flags set. In the above tcpdump, the PSH and ACK flags are not set when the remote device sends packets. These packets are not acknowledged by the local socket either.

The PSH flag is needed for the winsock driver to send the data to the application, no?

I'm assuming that the local socket isn't sending an ACK because it's waiting for its input buffer to fill or a PSH. Is this correct?

Thanks for any advice!

Regards,
Doug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top