Utility methods to get device's ip address

Signed-off-by: Umair Khan <omerjerk@gmail.com>