Page 1 of 1
Network problem
Posted: Sun May 09, 2010 5:29 pm
by X0r
Hi guys,
I am currently working on a RemoteControl-Tool for a well known game and got a big problem now.
The login etc. works fine but when I try to receive the playerlist (more than 1400 bytes @ 30 players maybe) I do not get any message from the NetworkClientEvent-function and so I am not able to receive the list while it is working when there are only a few players online (small amount of data). The protocol being used is UDP.
Hope you guys can help me since this is a very important project for me. Thanks!
Re: Network problem
Posted: Sun May 09, 2010 5:41 pm
by Trond
UDP is not guaranteed protocol. Better use TCP.
Re: Network problem
Posted: Sun May 09, 2010 5:53 pm
by X0r
The game is using UDP so I have no other choice.

Re: Network problem
Posted: Sun May 09, 2010 6:47 pm
by X0r
Hm,
I think I figured out why it does not work. I used Wireshark to watch the traffic and it says the player list is being sent with the "Fragmented IP protocol (proto=UDP ...).
Can anyone tell me what this Fragmented IP protocol is?
Re: Network problem
Posted: Sun May 09, 2010 9:37 pm
by Michael Vogel
Seem to be a proprietary protocol which can't be decoded from an analyzer. Wireshark is only able to analyze the standard protocols, where the header information is well known defined. If a game uses its own protocol, you can try to write an own parser (e.g. for the Microsoft Net Monitor) or just try to live with the hex values presented by Wireshark & Co.
If a large amount of data has to be transfered, it can be segmented to more packets - maybe Wireshark calls this "fragmented protocol" ?! If so, yu could check the packet sizes – if smaller than 1518 bytes, you could check, if the MTU (maximum transfer unit) (or the MSS=maximum segment size) has been set to a low value somewhere (I wouldn't expect this, anyhow, just to be sure...)
Michael
BTW it does not matter, if UDP or TCP is used, IP (V4) acts "best effort" (as Ethernet does), so you can loose packets in a network (which in reality does not happen very often

). Most TCP protocols have some mechanism to be able to recover from some simple problems (single lost packet etc.) but use quite more traffic (acknowledgement packets etc.) to achieve this. So quite a lot of network critical protocols are UDP based (SNMP etc.), don't worry...
Re: Network problem
Posted: Sun May 09, 2010 10:03 pm
by X0r
Hi Michael,
thanks for you informative contribution. I googled and found this:
http://www.qtcentre.org/archive/index.php/t-9785.html
But...
how is it possible to read this fragmented data?
I spent so much time in that project (had to use Wireshark etc. to analyze the whole protocol...). Hope you can help me to solve this problem.
BTW: here is a screenshot showing the Fragmented IP Protocol info:
http://members.forgesoft.net/Soner/wsp.jpg
Re: Network problem
Posted: Mon May 10, 2010 8:15 am
by Michael Vogel
The packet list shown in the qt forum just show a large amount of data segmented to multiple packets, the wireshark screen show a proprietary packet which just seems to have an IP header and nothing else but text data – that's it.
You could compare this type of packet with standard PB conversation to see differences, I fear you need something like SendRawIPPacket()/ReceiveRawIPPacket() functions
Michael
Re: Network problem
Posted: Mon May 10, 2010 6:40 pm
by X0r
Is there any way to do this with the WinAPI?
Re: Network problem
Posted: Mon May 10, 2010 7:26 pm
by Michael Vogel
Forge wrote:
Is there any way to do this with the WinAPI?
I fear, you can't do this using PB commands only

I know, that someone has posted how to deal with PCAP some time ago, maybe this example(s) could help...
Re: Network problem
Posted: Tue May 11, 2010 5:14 pm
by X0r
Curious...
I wrote my own network lib and now it works very well.
I guess it is a bug of the PB lib.
Re: Network problem
Posted: Tue May 11, 2010 8:46 pm
by Michael Vogel
Forge wrote:Curious...
I wrote my own network lib and now it works very well.
I guess it is a bug of the PB lib.
Does your lib handles IP packets, or UDP/TCP?
Could you post some source (snippets)?