高手帮忙分析一下gprs tcp send server on recv 有原始数据

z2661213   2009-6-8 17:45 楼主
lcp_init: xmit_accm=0 0 A 0
upap_init: 0
udpInit()
0D 0D 0D 0D 0D 0D lcp_init: xmit_accm=0 0 A 0
[PPP:5] ppp_set_xaccm[0]: outACCM=0 0 A 0
[PPP:5] ppp_send_config[0]: outACCM=FF FF FF FF
[PPP:5] ppp_recv_config[0]: inACCM=0 0 0 0
lcp_lowerup: asyncmap=0 A 0 0
LCP: lowerup state 0 -> 2
auth_reset: 0
lcp_addci: L opt=2 A0000
lcp_addci: L opt=5 8602DA91
lcp_addci: opt=7
lcp_addci: opt=8
7E FF 7D 23 C0 21 7D 21 7D 21 7D 20 7D 34 7D 22 7D 26 7D 20 7D 2A 7D 20 7D 20 7D 25 7D 26 86 7D 22 DA 91 7D 27 7D 22 7D 28 7D 22 69 8F 7E ppp [0] Write len=46  
fsm_sdata(LCP): Sent code 1,序号 1,长度 20.
LCP: sending Configure-Request, id 1
LCP: open state 2 -> 6

--------------------------------------------------recv byts 165
[PPP:5] pppInProc[0]: got 165 bytes

[PPP:3] pppInProc[0]: Dropping incomplete packet 0
[PPP:5] pppDispatch[0]: lcp in nBuf len=25
fsm_input(LCP):1,3,25
fsm_rconfreq(LCP): Rcvd id 3 state=6
lcp_reqci: Nak AUTHTYPE CHAP not allowed
lcp_reqci: returning CONFNAK.
7E FF 7D 23 C0 21 7D 23 7D 23 7D 20 7D 28 7D 23 7D 24 C0 23 99 7F 7E ppp [0] Write len=23  
fsm_sdata(LCP): Sent code 3,序号 3,长度 8.
--------------------------------------------------parse one packet
[PPP:5] pppDispatch[0]: lcp in nBuf len=25
fsm_input(LCP):1,3,25
fsm_rconfreq(LCP): Rcvd id 3 state=6
lcp_reqci: Nak AUTHTYPE CHAP not allowed
lcp_reqci: returning CONFNAK.
7E FF 7D 23 C0 21 7D 23 7D 23 7D 20 7D 28 7D 23 7D 24 C0 23 99 7F 7E ppp [0] Write len=23  
fsm_sdata(LCP): Sent code 3,序号 3,长度 8.
--------------------------------------------------parse one packet
[PPP:5] pppDispatch[0]: lcp in nBuf len=25
fsm_input(LCP):1,3,25
fsm_rconfreq(LCP): Rcvd id 3 state=6
lcp_reqci: Nak AUTHTYPE CHAP not allowed
lcp_reqci: returning CONFNAK.
7E FF 7D 23 C0 21 7D 23 7D 23 7D 20 7D 28 7D 23 7D 24 C0 23 99 7F 7E ppp [0] Write len=23  
fsm_sdata(LCP): Sent code 3,序号 3,长度 8.
--------------------------------------------------parse one packet

--------------------------------------------------recv byts 98
[PPP:5] pppInProc[0]: got 98 bytes

[PPP:5] pppDispatch[0]: lcp in nBuf len=20
fsm_input(LCP):2,1,20
Receive Configure-Ack(LCP): Rcvd id 1 state=6
lcp_acki: Ack
--------------------------------------------------parse one packet
[PPP:5] pppDispatch[0]: lcp in nBuf len=24
fsm_input(LCP):1,5,24
fsm_rconfreq(LCP): Rcvd id 5 state=7
lcp_reqci: returning CONFACK.
7E FF 7D 23 C0 21 7D 22 7D 25 7D 20 7D 38 7D 22 7D 26 7D 20 7D 2A 7D 20 7D 20 7D 27 7D 22 7D 28 7D 22 7D 25 7D 26 A4 7D 2C 7C 98 7D 23 7D 24 C0 23 36 31 7E ppp [0] Write len=52  
fsm_sdata(LCP): Sent code 2,序号 5,长度 24.
[PPP:5] ppp_send_config[0]: outACCM=0 0 A 0
[PPP:5] ppp_recv_config[0]: inACCM=0 0 A 0
7E FF 03 C0 21 09 00 00 08 86 02 DA 91 BC 9A 7E ppp [0] Write len=16  
fsm_sdata(LCP): Sent code 9,序号 0,长度 8.
-----------------------------------Start the timer for the next interval.
link_established: 0
upap_lowerup: 0 s=0
IPCP: lowerup state 0 -> 2
upap_authwithpeer: 0 user=cmnet password=cmnet s=1
7E FF 03 C0 23 01 01 00 10 05 63 6D 6E 65 74 05 63 6D 6E 65 74 84 47 7E ppp [0] Write len=24  
pap_sauth: Sent id 1
--------------------------------------------------parse one packet

--------------------------------------------------recv byts 16
[PPP:5] pppInProc[0]: got 16 bytes

[PPP:5] pppDispatch[0]: lcp in nBuf len=8
fsm_input(LCP):10,0,8
--------------------------------------------------parse one packet

--------------------------------------------------recv byts 11
[PPP:5] pppInProc[0]: got 11 bytes

[PPP:5] pppDispatch[0]: pap in nBuf len=5
pap_rauthack: Rcvd id 1 s=3
auth_withpeer_success: 0 proto=C023
7E FF 03 80 21 01 01 00 1C 02 06 00 2D 0F 00 03 06 00 00 00 00 81 06 00 00 00 00 83 06 00 00 00 00 1C 86 7E ppp [0] Write len=36  
fsm_sdata(IPCP): Sent code 1,序号 1,长度 28.
IPCP: sending Configure-Request, id 1
IPCP: open state 2 -> 6
--------------------------------------------------parse one packet

--------------------------------------------------recv byts 32
[PPP:5] pppInProc[0]: got 32 bytes

[PPP:5] pppDispatch[0]: ipcp in nBuf len=10
fsm_input(IPCP):1,1,10
fsm_rconfreq(IPCP): Rcvd id 1 state=6
ipcp_reqci: ADDR 192.168.254.254
ipcp_reqci: returning Configure-ACK
7E FF 03 80 21 02 01 00 0A 03 06 C0 A8 FE FE 5F 56 7E ppp [0] Write len=18  
fsm_sdata(IPCP): Sent code 2,序号 1,长度 10.
--------------------------------------------------parse one packet
[PPP:5] pppDispatch[0]: ipcp in nBuf len=10
fsm_input(IPCP):4,1,10
fsm_rconfnakrej(IPCP): Rcvd id 1 state=8
7E FF 03 80 21 01 02 00 16 03 06 00 00 00 00 81 06 00 00 00 00 83 06 00 00 00 00 DA 82 7E ppp [0] Write len=30  
fsm_sdata(IPCP): Sent code 1,序号 2,长度 22.
IPCP: sending Configure-Request, id 2
--------------------------------------------------parse one packet

--------------------------------------------------recv byts 29
[PPP:5] pppInProc[0]: got 29 bytes

[PPP:5] pppDispatch[0]: ipcp in nBuf len=22
fsm_input(IPCP):3,2,22
fsm_rconfnakrej(IPCP): Rcvd id 2 state=8
local IP address 10.59.56.130
primary DNS address 211.136.20.203

secondary DNS address 211.136.17.107

7E FF 03 80 21 01 03 00 16 03 06 0A 3B 38 82 81 06 D3 88 14 CB 83 06 D3 88 7D 31 6B 12 14 7E ppp [0] Write len=31  
fsm_sdata(IPCP): Sent code 1,序号 3,长度 22.
IPCP: sending Configure-Request, id 3
--------------------------------------------------parse one packet

--------------------------------------------------recv byts 29
[PPP:5] pppInProc[0]: got 29 bytes

[PPP:5] pppDispatch[0]: ipcp in nBuf len=22
fsm_input(IPCP):2,3,22
Receive Configure-Ack(IPCP): Rcvd id 3 state=8
np_up: 0 proto=21
network protocol has come up: maxconnect=0 idle_time_limit=0
ipcp: Configure the IP network interface up
[PPP:5] sifvjcomp: VJ compress enable=0 slot=0 max slot=0
[PPP:5] Config the interface up and enable IP packets to pass sifup[0]: ok
[IP:5] ipSetDefault: 10.59.56.130 192.168.254.254 1 0

ppp subsystem init ok[TCP:0] tcpOpen[0]: Opened
[TCP:0] tcpBind[0]: to 0.0.0.0:5000 mss 0
[IP:5] ipMTU: dst 218.107.30.198 => 512
[TCP:0] tcpConnect[0]: to 218.107.30.198:2000 mss 472
[TCP:0] setState[0]: SYN_SENT from CLOSED
[TCP:1] tcpOutput[0]: Timer 63 in SYN_SENT bo=0 md=0 srtt=500
[TCP:0] tcpOutput[0]: 10.59.56.130:5000->218.107.30.198:2000 0@553908780
[TCP:0]    out         SYN 0 win 512
[TCP:2]    out    IP: H
[TCP:2]    out   TCP: H
[IP:5] ipDispatch: len 44 proto 6 to 218.107.30.198 from 10.59.56.130 tos 0
[PPP:7] pppOutput[0]: proto=0x21 len=0
7E 21 45 00 00 2C 00 01 00 00 40 06 3E DD 0A 3B 38 82 DA 6B 1E C6 7D 33 88 07 D0 21 03 FA 2C 00 00 00 00 60 02 02 00 27 8C 00 00 02 04 01 D8 0F 89 7E

[PPP:7] pppInProc[0]: got 45 bytes

[PPP:7] pppInProc[0]: got 5 bytes

[PPP:7] pppDispatch[0]: ip in nBuf len=44
[IP:5] ipDispatch: len 44 proto 6 to 10.59.56.130 from 218.107.30.198 tos 0
[TCP:0] tcpInput[0]: 218.107.30.198:2000->10.59.56.130:5000 0@2038524395
[TCP:0]                ACK+SYN 553908781 win 16384
[TCP:2]           IP: H
[TCP:2]          TCP: H
[TCP:2] tcbUpdate[0]: send(una=553908781,nxt=553908781,ptr=553908781,wnd=16384)
[TCP:2] tcbUpdate[0]: snd(wl1=2038524395,wl2=553908781)
[TCP:2] tcbUpdate[0]: iss=553908780 cwin=257 sst=65535 res=0 backoff=0
[TCP:2] tcbUpdate[0]: recv(nxt=2038524396,wnd=512,up=0) irs=2038524395 mss=472
[TCP:0] setState[0]: ESTABLISHED from SYN_SENT
[TCP:0] tcpOutput[0]: 10.59.56.130:5000->218.107.30.198:2000 0@553908781
[TCP:0]    out         ACK 2038524396 win 512
[TCP:2]    out    IP: H
[TCP:2]    out   TCP: H
[IP:5] ipDispatch: len 40 proto 6 to 218.107.30.198 from 10.59.56.130 tos 0
[PPP:7] pppOutput[0]: proto=0x21 len=0
7E 21 45 00 00 28 00 02 00 00 40 06 3E E0 0A 3B 38 82 DA 6B 1E C6 7D 33 88 07 D0 21 03 FA 2D 79 81 69 EC 50 10 02 00 57 EF 00 00 4E 7B 7E
[TCP:0] tcpConnect[0]: ESTABLISHED
[TCP:1] tcpWrite[0]: 11:1234567890
[TCP:1] tcpOutput[0]: Timer 86 in ESTABLISHED bo=0 md=125 srtt=437
[TCP:0] tcpOutput[0]: 10.59.56.130:5000->218.107.30.198:2000 11@553908781
[TCP:0]    out         ACK+PUSH 2038524396 win 512
[TCP:2]    out    IP: H
[TCP:2]    out   TCP: H
[TCP:0]    out  DATA: H
[IP:5] ipDispatch: len 51 proto 6 to 218.107.30.198 from 10.59.56.130 tos 0
[PPP:7] pppOutput[0]: proto=0x21 len=0
7E 21 45 00 00 33 00 03 00 00 40 06 BE 54 0A 3B 38 82 DA 6B 1E C6 7D 33 88 07 D0 21 03 FA 2D 79 81 69 EC 50 18 02 00 4D D7 00 00 31 32 33 34 35 36 37 38 39 30 00 26 86 7E

[PPP:7] pppInProc[0]: got 57 bytes

[PPP:7] pppDispatch[0]: ip in nBuf len=51
[IP:5] ipDispatch: len 51 proto 6 to 10.59.56.130 from 218.107.30.198 tos 0
[TCP:0] tcpInput[0]: 218.107.30.198:2000->10.59.56.130:5000 11@2038524396
[TCP:0]                ACK+PUSH 553908781 win 65535
[TCP:2]           IP: H
[TCP:2]          TCP: H
[TCP:0]         DATA: H
[TCP:0] tcpOutput[0]: 10.59.56.130:5000->218.107.30.198:2000 0@553908792
[TCP:0]    out         ACK 2038524407 win 256
[TCP:2]    out    IP: H
[TCP:2]    out   TCP: H
[IP:5] ipDispatch: len 40 proto 6 to 218.107.30.198 from 10.59.56.130 tos 0
[PPP:7] pppOutput[0]: proto=0x21 len=0
7E 21 45 00 00 28 00 04 00 00 40 06 3E DE 0A 3B 38 82 DA 6B 1E C6 7D 33 88 07 D0 21 03 FA 38 79 81 69 F7 50 10 01 00 58 D9 00 00 E0 67 7E  
--------------------------------------------------等到数据进
[TCP:1] tcpRead[0]: 11:1234567890

回复评论 (5)

你这帖子的问题开得有点不清楚

一上来就发一堆数据,起码让人知道你现在在做什么,想实现什么吧,大家才能给你建议吧?

帮顶。
点赞  2009-6-9 13:10
ppp 协议啊.

tcp只能收发送的 服务端收不到, 别人的可以,能收能发
点赞  2009-6-9 13:37
你帖子似乎发错地方了,这里貌似没人会这方面的
帮顶
点赞  2009-6-10 09:34
不是很清楚你的意思。
是否
PPP已经建立完成,
TCP处理的时候,接收没问题,发送时服务端接收不到?是这个意思吗?
另外
你的TCP有没有使用类似UIP之类的TCP协议栈?或者是自己写协议栈发送数据?
如果自己写协议栈,那么先把PPP/TCP/IP协议搞清楚,里面包括很多东西,一点出错,对方就接收不到了。

推荐下载“TCP-IP详解卷1”,先重点把PPP/TCP/IP协议的每个段意思搞清楚,然后再测试。

点赞  2009-6-10 16:15
发堆数据上来,你是想干什么?分析什么?
点赞  2009-6-15 14:17
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复