UDP network question

20 posts in this topic

death pax 0

Ive been looking through the help file at the udp network functions and from what i have seen its possible to specify the destination port, but not the source port, I am trying to connect to my game server and recieve a status message from it. So i was wondering if anyone could tell me how to set the sourceport, thnx in advance

Share this post

Link to post

Share on other sites

death pax 0

ive tried several things with it, but udp bind seems to specify what port to listen for data on, not what port to send data through... im starting to wonder if it wouldnt be easier to find the dllcalls for winsock

Share this post

Link to post

Share on other sites

flaxcrack 0

I'm interested in what game you're talking about, because I've done some

small tests with a game myself and I'm thinking of putting them on my fileman...

I have a question about this as well.... Is it possible to recieve game packets analize them and redirect them back to the appropiate port with AutoIT? I would really like to analize some information before it hits the game client on my machine.

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Share this post

Link to post

Share on other sites

The Kandie Man 3

Are you trying to send messages to the to the script within the script? I am not sure what you are doing. The reason it may not be working if you are in fact trying to do this is because the UDPBind () and the UDPSend() don't seem to have the same IP or port number. This is obvious, but i thought i just might point it out. Is there another script you are also using?

Here is a version that works if you are just trying to send UDP packets to the script itself:

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post

Link to post

Share on other sites

death pax 0

No, this is an external game server. the script would send \info\ to the game server, then the server should send back the response on the same port number that the script sent the \info\ on (provided it is within the the port range 2000-2500 or something like that), this is why i need to designate the source port to use

Share this post

Link to post

Share on other sites

flaxcrack 0

x.x im at my wits end... i think ill start researching dllcalls for winsock... maybe that will help me...

Why UDP and not TCP?

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Share this post

Link to post

Share on other sites

PsaltyDS 22

Because that is what protocol the game uses, its not like i can change it

I am not absolutely sure about this, but I think you are up against the UDP spec, as implemented in Windows' IP stack. UDP being a connectionless "packet lite" kind of protocol uses any send port of opportunity by design, IIRC. Controlling the source port might be equivelent to writing a new IP stack.

Share this post

Link to post

Share on other sites

PsaltyDS 22

The software modules that handle the various layers of the OSI seven layer model. The whole thing is the "TCP/IP Stack", and layers three and below are the "IP stack". Port addressing is actualy higher than layer three and so I should have said "TCP/IP Stack".

UDP ports are at layer four, and the source port is an optional field.

My point was that the source port is usually considered irrelevant in UDP (of course the destination port is critical). I have not used AutoIT UDP capabilities at all, but assuming it uses calls to Windows' included TCP/IP stack, you may not have any control or access to UDP source ports. I'm not an expert though, and always ready to be corrected.