Add some metaprogramation to the methods that get the ip address