DNS query: Difference between revisions

Content added Content deleted
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
(→‎{{header|TXR}}: Use str-addr method on objects returned by getaddrinfo.)
Line 1,562: Line 1,562:


=={{header|TXR}}==
=={{header|TXR}}==
<pre>This is the TXR Lisp interactive listener of TXR 282.
At the listener prompt:
<pre>This is the TXR Lisp interactive listener of TXR 283.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
TXR's no-spray organic production means every bug is carefully removed by hand.
TXR's no-spray organic production means every bug is carefully removed by hand.
1> (uniq (collect-each ((addr (getaddrinfo "www.kame.net")))
1> (flow (getaddrinfo "www.kame.net") (mapcar .(str-addr)) uniq)
("210.155.141.200" "2001:2f0:0:8800::1:1" "2001:2f0:0:8800:226:2dff:fe0b:4311")</pre>
(match-case addr

(@(struct sockaddr-in addr @a) (str-inaddr a))
(@(struct sockaddr-in6 addr @a) (str-in6addr a)))))
("210.155.141.200" "2001:2f:8800:226:2dff:fe0b:4311" "2001:2f0:0:880:1:1")</pre>
=={{header|UNIX Shell}}==
=={{header|UNIX Shell}}==
===Using dig===
===Using dig===