Debian Codegraph @

man/nslookup.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/nslookup.R
3 \name{nslookup}
4 \alias{nslookup}
5 \alias{has_internet}
6 \title{Lookup a hostname}
7 \usage{
8 nslookup(host, ipv4_only = FALSE, multiple = FALSE, error = TRUE)
9
10 has_internet()
11 }
12 \arguments{
13 \item{host}{a string with a hostname}
14
15 \item{ipv4_only}{always return ipv4 address. Set to \code{FALSE} to allow for ipv6 as well.}
16
17 \item{multiple}{returns multiple ip addresses if possible}
18
19 \item{error}{raise an error for failed DNS lookup. Otherwise returns \code{NULL}.}
20 }
21 \description{
22 The \code{nslookup} function is similar to \code{nsl} but works on all platforms
23 and can resolve ipv6 addresses if supported by the OS. Default behavior raises an
24 error if lookup fails.
25 }
26 \details{
27 The \code{has_internet} function tests for internet connectivity by performing a
28 dns lookup. If a proxy server is detected, it will also check for connectivity by
29 connecting via the proxy.
30 }
31 \examples{
32 # Should always work if we are online
33 nslookup("www.google.com")
34
35 # If your OS supports IPv6
36 nslookup("ipv6.test-ipv6.com", ipv4_only = FALSE, error = FALSE)
37 }