-.\" $OpenBSD: ping6.8,v 1.52 2015/10/14 17:26:01 florian Exp $
+.\" $OpenBSD: ping6.8,v 1.53 2015/10/16 18:17:12 florian Exp $
.\" $KAME: ping6.8,v 1.57 2002/05/26 13:18:25 itojun Exp $
.\"
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 14 2015 $
+.Dd $Mdocdate: October 16 2015 $
.Dt PING6 8
.Os
.Sh NAME
.Nd send ICMPv6 ECHO_REQUEST packets to network hosts
.Sh SYNOPSIS
.Nm ping6
-.Op Fl dEefHmNnqtvw
-.Op Fl a Ar addrtype
+.Op Fl dEefHmNnqv
+.Op Fl a Ar querytype
.Op Fl c Ar count
.Op Fl g Ar gateway
.Op Fl h Ar hoplimit
header formatted as documented in RFC 4443.
The options are as follows:
.Bl -tag -width Ds
-.It Fl a Ar addrtype
-Generate an ICMPv6 Node Information Node Addresses query,
+.It Fl a Ar querytype
+Generate an ICMPv6 Node Information query,
rather than an echo-request.
-.Ar addrtype
+.Ar querytype
must be a string constructed of the following characters:
.Pp
.Bl -tag -width Ds -compact
responder's address are requests.
.It Ic c
Requests responder's IPv4-compatible and IPv4-mapped addresses.
+.It Ic d
+Generate an ICMPv6 Node Information DNS Name query.
.It Ic g
Requests responder's global-scope addresses.
.It Ic l
Requests responder's link-local addresses.
+.It Ic n
+Generate an ICMPv6 Node Information query.
.It Ic s
Requests responder's site-local addresses.
.El
This option is ignored if any of the flags
.Op Fl tWw
are specified.
-.It Fl t
-Generate an ICMPv6 Node Information query,
-rather than echo-request.
-.Fl s
-has no effect if
-this option
-is specified.
.It Fl V Ar rtable
Set the routing table to be used for outgoing packets.
.It Fl v
Verbose output.
All ICMP packets
that are received are listed.
-.It Fl w
-Generate an ICMPv6 Node Information DNS Name query,
-rather than echo-request.
-.Fl s
-has no effect if
-this option
-is specified.
.It Ar host
The IPv6 address of the final destination node.
.El
-/* $OpenBSD: ping6.c,v 1.123 2015/10/14 17:26:01 florian Exp $ */
+/* $OpenBSD: ping6.c,v 1.124 2015/10/16 18:17:12 florian Exp $ */
/* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */
/*
preload = 0;
datap = &outpack[ICMP6ECHOLEN + ICMP6ECHOTMLEN];
while ((ch = getopt(argc, argv,
- "a:c:dEefHg:h:I:i:l:mnNp:qS:s:tvV:w")) != -1) {
+ "a:c:dEefHg:h:I:i:l:mnNp:qS:s:vV:")) != -1) {
switch (ch) {
case 'a':
{
char *cp;
options &= ~F_NOUSERDATA;
- options |= F_NODEADDR;
for (cp = optarg; *cp != '\0'; cp++) {
switch (*cp) {
case 'a':
+ options |= F_NODEADDR;
naflags |= NI_NODEADDR_FLAG_ALL;
break;
case 'c':
case 'C':
+ options |= F_NODEADDR;
naflags |= NI_NODEADDR_FLAG_COMPAT;
break;
+ case 'd':
+ options |= F_FQDN;
+ break;
case 'l':
case 'L':
+ options |= F_NODEADDR;
naflags |= NI_NODEADDR_FLAG_LINKLOCAL;
break;
+ case 'n':
+ options |= F_SUPTYPES;
+ break;
case 's':
case 'S':
+ options |= F_NODEADDR;
naflags |= NI_NODEADDR_FLAG_SITELOCAL;
break;
case 'g':
case 'G':
+ options |= F_NODEADDR;
naflags |= NI_NODEADDR_FLAG_GLOBAL;
break;
case 'A': /* experimental. not in the spec */
+ options |= F_NODEADDR;
naflags |= NI_NODEADDR_FLAG_ANYCAST;
break;
default:
errx(1, "datalen value is %s: %s", errstr,
optarg);
break;
- case 't':
- options &= ~F_NOUSERDATA;
- options |= F_SUPTYPES;
- break;
case 'v':
options |= F_VERBOSE;
break;
sizeof(rtableid)) == -1)
err(1, "setsockopt SO_RTABLE");
break;
- case 'w':
- options &= ~F_NOUSERDATA;
- options |= F_FQDN;
- break;
default:
usage();
/*NOTREACHED*/
(void)fprintf(stderr,
"usage: ping6 [-dEefH"
"m"
- "Nnqtvw"
+ "Nnqv"
"] [-a addrtype] [-c count] [-g gateway]\n\t"
"[-h hoplimit] [-I sourceaddr] [-i wait] [-l preload] [-p pattern]"
"\n\t[-s packetsize] [-V rtable] host\n");