Use something besides raw sockets
I have done some things like this in the past. There is no need to go as far as writing your application using sockets. Use the ftp client in the PDA and an FTP server on the host. It does not have to be FTP, just an idea.
FTP will work well you monitor your return codes, and track what is happening. It will also be secure because it is over the VPN connection.
You could spend your time coding the logic of the app and stay away from the transport.
I also noticed you mentioned VPN. I you PDA is actually on a vpn then the IP address of the devcie can be seen because you are actually tunneled in and will be using an IP address assigned by the VPN server.
Your app sounds fun, reuse code.
Ron