I'm writing a C++ program on a linux box (DHCP client) that depends on the connectivity of the network. I need to pragmatically verify that my system has a IP address. I know this is a general and open ended question, so any quick and dirty solution will work for me, but ideally I would like to check/read a system file to ensure the DHCP client has received an IP address from the DHCP sever.
Thanks in advance.