; Fix documentation of 'network-lookup-address-info'

* doc/lispref/processes.texi (Misc Network): Fix punctuation and
markup.
This commit is contained in:
Eli Zaretskii 2022-07-26 21:34:38 +03:00
parent 7b447956d8
commit d809207f53

View file

@ -3205,25 +3205,26 @@ If the vector does not include the port number, @var{p}, or if
@end defun
@defun network-lookup-address-info name &optional family hints
Perform hostname lookups on @var{name}, which is expected to be an
ASCII-only string, otherwise signal an error. Call
This function perform hostname lookups on @var{name}, which is
expected to be an ASCII-only string, otherwise it signals an error. Call
@code{puny-encode-domain} on @var{name} first if you wish to lookup
internationalized hostnames.
If successful, return a list of Lisp representations of network
addresses (@pxref{Network Processes} for a description of the
format.), otherwise return @code{nil}. In the latter case, also log
If successful, this function returns a list of Lisp representations of network
addresses (@pxref{Network Processes}, for a description of the
format), otherwise return @code{nil}. In the latter case, it also logs
an error message hopefully explaining what went wrong.
By default, attempt both IPv4 and IPv6 lookups. The optional argument
@var{family} controls this behavior, specifying the symbol @code{ipv4}
or @code{ipv6} restricts lookups to IPv4 and IPv6 respectively.
By default, this function attempts both IPv4 and IPv6 lookups. The
optional argument @var{family} controls this behavior, specifying the
symbol @code{ipv4} or @code{ipv6} restricts lookups to IPv4 and IPv6
respectively.
If optional argument @var{hints} is @code{numeric}, treat the hostname
as a numerical IP address (and do not perform DNS lookups). This can
be used to check whether a string is a valid numerical representation
of an IP address, or to convert a numerical string to its canonical
representation. e.g.
If optional argument @var{hints} is @code{numeric}, the function
treats the @var{name} as a numerical IP address (and does not perform DNS
lookups). This can be used to check whether a string is a valid
numerical representation of an IP address, or to convert a numerical
string to its canonical representation. e.g.@:
@example
(network-lookup-address-info "127.1" 'ipv4 'numeric)
@ -3234,8 +3235,8 @@ representation. e.g.
@end example
Be warned that there are some surprising valid forms,
especially for IPv4, e.g ``0xe3010203'' and ``0343.1.2.3'' are both
valid, as are ``0'' and ``1'' (but they are invalid for IPv6).
especially for IPv4, e.g @samp{0xe3010203} and @samp{0343.1.2.3} are both
valid, as are @samp{0} and @samp{1} (but they are invalid for IPv6).
@end defun
@node Serial Ports