Network problem

Everything else that doesn't fall into one of the other PB categories.
User avatar
X0r
Enthusiast
Enthusiast
Posts: 151
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Network problem

Post 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!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Network problem

Post by Trond »

UDP is not guaranteed protocol. Better use TCP.
User avatar
X0r
Enthusiast
Enthusiast
Posts: 151
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Re: Network problem

Post by X0r »

The game is using UDP so I have no other choice. :mrgreen:
User avatar
X0r
Enthusiast
Enthusiast
Posts: 151
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Re: Network problem

Post 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?
User avatar
Michael Vogel
Addict
Addict
Posts: 2867
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Network problem

Post 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 :wink:). 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...
User avatar
X0r
Enthusiast
Enthusiast
Posts: 151
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Re: Network problem

Post 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
User avatar
Michael Vogel
Addict
Addict
Posts: 2867
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Network problem

Post 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
User avatar
X0r
Enthusiast
Enthusiast
Posts: 151
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Re: Network problem

Post by X0r »

:?
Is there any way to do this with the WinAPI?
User avatar
Michael Vogel
Addict
Addict
Posts: 2867
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Network problem

Post 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...
User avatar
X0r
Enthusiast
Enthusiast
Posts: 151
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Re: Network problem

Post 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.
User avatar
Michael Vogel
Addict
Addict
Posts: 2867
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Network problem

Post 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)?
Post Reply