Function: nslookup-host
nslookup-host is an autoloaded, interactive and byte-compiled function
defined in net-utils.el.gz.
Signature
(nslookup-host HOST &optional NAME-SERVER)
Documentation
Look up the DNS information for HOST (name or IP address).
Optional argument NAME-SERVER says which server to use for DNS resolution. Interactively, prompt for NAME-SERVER if invoked with prefix argument.
This command uses nslookup-program for looking up the DNS information.
See also: nslookup-host-ipv4, nslookup-host-ipv6 for
non-interactive versions of this function more suitable for use
in Lisp code.
Probably introduced at or before Emacs version 26.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/net-utils.el.gz
;;;###autoload
(defun nslookup-host (host &optional name-server)
"Look up the DNS information for HOST (name or IP address).
Optional argument NAME-SERVER says which server to use for
DNS resolution.
Interactively, prompt for NAME-SERVER if invoked with prefix argument.
This command uses `nslookup-program' for looking up the DNS information.
See also: `nslookup-host-ipv4', `nslookup-host-ipv6' for
non-interactive versions of this function more suitable for use
in Lisp code."
(interactive
(list (let ((default (ffap-machine-at-point)))
(read-string (format-prompt "Lookup host" default) nil nil default))
(if current-prefix-arg (read-from-minibuffer "Name server: "))))
(let ((options
(append nslookup-program-options (list host)
(if name-server (list name-server)))))
(net-utils-run-program
"Nslookup"
(concat "** "
(mapconcat #'identity
(list "Nslookup" host nslookup-program)
" ** "))
nslookup-program
options)))