I threw this together in 10 minutes as a simple means of keeping track of my current game server IP address. I've taken some liberty with the code and made some assumptions, such as the static nature of the first 2 octets of the server IP.
The code is obviously not meant to impress, but was a means of tracking the GSIP address without netstating. I've included the source in case anyone is interested in how to call simple shell commands from C#.
The code is built on netstat and parses the output of it to give what I have found to be the desired results. Again, critical analysis of the code really isn't neccessary as the code is not meant to be an elegant expression of the solution.
Just start the IP Tracker exe or compile it for yourself adding custom touches. Th]e form loads and updates the game server address every second or so.
Here's a screenie of it running. There's no interaction needed. It's very straightforward. Just load it up and whenever you join a D3 game, it returns the GSIP.
LINK to the project files archive https://rapidshare.com/files/1410095137/GSIPTracker.rar
EDIT:: I've been awake for 70+ hours and I have no idea why I put this in Exploits instead of Programs. Mods please move. My apologies.
EDIT 2:: Changed detection mechanism from a timer to a background thread. This corrects a bug that was causing the program to crash.
EDIT 3: Removed netstat usage and enhanced IP determination. Much smoother (actually responsive )