So hey. I wrote and open sourced a small cross platform library for getting the IP and MAC address of the current device. You can find it here:
So far I’ve tested it on Windows, Linux (Ubuntu), and Mac OSX Mountain Lion. It *should* also work on iOS, BSD and Android. If you happen to test it on one of those other platforms, I would love to know what the Sample program outputs. Thanks!
EDIT (June 2015): Moved it to GitHub, merged in an Android fix.