Browse Source

hosts => entities; edns_client_subnet oversight in bulk_query()

boB Rudis 3 years ago
parent
commit
1a73328a1d
2 changed files with 30 additions and 7 deletions
  1. 15
    4
      R/gdns.r
  2. 15
    3
      man/bulk_query.Rd

+ 15
- 4
R/gdns.r View File

@@ -74,8 +74,19 @@ query <- function(name, type="1", edns_client_subnet="0.0.0.0/0") {
74 74
 
75 75
 #' Vectorized query, returning only answers in a data frame
76 76
 #'
77
-#' @param hosts character vector of hosts to query
78
-#' @param type RR type (see \code{type} in \code{query()}).
77
+#' @param entities character vector of entities to query
78
+#' @param type RR type can be represented as a number in [1, 65535] or canonical
79
+#'        string (A, aaaa, etc). More information on RR types can be
80
+#'        found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}.
81
+#' @param edns_client_subnet The edns0-client-subnet option. Format is an IP
82
+#'        address with a subnet mask. Examples: \code{1.2.3.4/24},
83
+#'        \code{2001:700:300::/48}.\cr
84
+#'        If you are using DNS-over-HTTPS because of privacy concerns, and do
85
+#'        not want any part of your IP address to be sent to authoritative
86
+#'        nameservers for geographic location accuracy, use
87
+#'        \code{edns_client_subnet=0.0.0.0/0}. Google Public DNS normally sends
88
+#'        approximate network information (usually replacing the last part of
89
+#'        your IPv4 address with zeroes). \code{0.0.0.0/0} is the default.
79 90
 #' @return \code{data.frame} of only answers (use \code{query()} for detailed responses)
80 91
 #' @references \url{https://developers.google.com/speed/public-dns/docs/dns-over-https}
81 92
 #' @export
@@ -85,7 +96,7 @@ query <- function(name, type="1", edns_client_subnet="0.0.0.0/0") {
85 96
 #' @examples
86 97
 #' hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com")
87 98
 #' gdns::bulk_query(hosts)
88
-bulk_query <- function(hosts, type=1) {
89
-  results <- map(hosts, gdns::query, type=type)
99
+bulk_query <- function(entities, type=1, edns_client_subnet="0.0.0.0/0") {
100
+  results <- map(entities, gdns::query, type=type, edns_client_subnet=edns_client_subnet)
90 101
   map_df(results, "Answer")
91 102
 }

+ 15
- 3
man/bulk_query.Rd View File

@@ -4,12 +4,24 @@
4 4
 \alias{bulk_query}
5 5
 \title{Vectorized query, returning only answers in a data frame}
6 6
 \usage{
7
-bulk_query(hosts, type = 1)
7
+bulk_query(entities, type = 1, edns_client_subnet = "0.0.0.0/0")
8 8
 }
9 9
 \arguments{
10
-\item{hosts}{character vector of hosts to query}
10
+\item{entities}{character vector of entities to query}
11 11
 
12
-\item{type}{RR type (see \code{type} in \code{query()}).}
12
+\item{type}{RR type can be represented as a number in [1, 65535] or canonical
13
+string (A, aaaa, etc). More information on RR types can be
14
+found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}.}
15
+
16
+\item{edns_client_subnet}{The edns0-client-subnet option. Format is an IP
17
+address with a subnet mask. Examples: \code{1.2.3.4/24},
18
+\code{2001:700:300::/48}.\cr
19
+If you are using DNS-over-HTTPS because of privacy concerns, and do
20
+not want any part of your IP address to be sent to authoritative
21
+nameservers for geographic location accuracy, use
22
+\code{edns_client_subnet=0.0.0.0/0}. Google Public DNS normally sends
23
+approximate network information (usually replacing the last part of
24
+your IPv4 address with zeroes). \code{0.0.0.0/0} is the default.}
13 25
 }
14 26
 \value{
15 27
 \code{data.frame} of only answers (use \code{query()} for detailed responses)

Loading…
Cancel
Save