Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Network Structure

A typical college network. Different Hostels connected through LAN. All hosts in a hostel use the same gateway. I can directly communicate to hosts in other hostels using their unique ip.

My query

I run Dota/Warcraft under Linux through Wine. For LAN games, Warcraft only automatically detects servers created by hosts using the same gateway (in my case, created by hosts in my hostel). For others, there is a tool called BattleLan where one can add the ip hosting the server and enables it to show up in Warcraft normally. Unfortunately, this tool doesn't work through wine. However, the concept seems simple to me and I believe can be easily implemented. I just need to make this application listen to port 6112 of some ip (right?). Any help/leads?

share|improve this question

First of all, you are not communicating directly with hosts in other hostels, it's indrect through at least one gateway, more likely two: yours and theirs. Gateways mark the ends of your broadcast domains, which effectively means broadcasts will not carry beyond a gateway. Yet, games, especially the Warcrafts use broadcasts to announce servers. That's why you don't see the servers created by hosts in other hostels; because you are not receiving their broadcasts.

Curiously enough I haven't played with this issue myself, but this is what I can guess and would try:

From the fact that there something like BattleLan that remedies the problem I'd guess the broadcast messages include information of the form "There is an open game of at and ". One your game client has received that broadcast it contacts the server for everything else.

To validate you can use tools like wireshark or tcpdump, make them listen on your local network interface card for broadcast traffic and open a game of Warcraft. The programs will capture and display the broadcasts. The packets are most likely addressed to or the hightes IP of your subnet, probably still ending with 255. The IP packet should contain a UDP segmemt, not TCP, but it may still be addressed to port 6112.

Conceptionally, what you need to do is take the UDP-segments from these IP broadcast packets and send them via IP (unicast) to the remote clients that are outside the servers broadcast domain. As you already know IP-unicast will (is meant to) go beyond your gateways all the way to the remote computer.

Depending on the complexity of the protocol Warcraft implements you either really need to capture, extract and send the messages or you can simply create them yourself.

I think there is already an implementation of this here. Adapt/try it and see what it does for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.