t_of_sexp
is deprecated because it used to block to do a DNS lookup, and we don't
want a sexp converter to do that. As we transition away, one can use
Blocking_sexp
, which has the old behavior.
Blocking_sexp
performs DNS lookup to resolve hostnames to IP addresses.
Conversion from the printable representation of an Internet address to its internal
representation. The argument string consists of 4 numbers separated by periods
(XXX.YYY.ZZZ.TTT
) for IPv4 addresses, and up to 8 numbers separated by colons for
IPv6 addresses. Raise Failure
when given a string that does not match these
formats.
Call of_string
and if that fails, use Host.getbyname
.
Return the printable representation of the given Internet address. See of_string
for a description of the printable representation.
A special address, for use only with bind
, representing all the Internet addresses
that the host machine possesses.
Special addresses representing the host machine.
Some things (like the kernel) report addresses as hex or decimal strings. Provide conversion functions.
inet4_addr_to_int32_exn t = 0l
when t = Inet_addr.of_string ("0.0.0.0")
.
An exception is raised if t
is a not an IPv4 address.