Translate between the textual representation of an IP address
and the Prolog data structure. Prolog represents ip4 addresses as
ip(A,B,C,D) and ip6 addresses as ip(A,B,C,D,E,F,H).
For example:
?- ip_name(ip(1,2,3,4), Name)
Name = '1.2.3.4'.
?- ip_name(IP, '::').
IP = ip(0,0,0,0,0,0,0,0).
?- ip_name(IP, '1:2::3').
IP = ip(1,2,0,0,0,0,0,3).