Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156923186
D21356.id61090.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21356.id61090.diff
View Options
Index: head/sbin/ping/ping.8
===================================================================
--- head/sbin/ping/ping.8
+++ head/sbin/ping/ping.8
@@ -28,7 +28,7 @@
.\" @(#)ping.8 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd March 11, 2016
+.Dd August 21, 2019
.Dt PING 8
.Os
.Sh NAME
@@ -38,7 +38,7 @@
packets to network hosts
.Sh SYNOPSIS
.Nm
-.Op Fl AaDdfnoQqRrv
+.Op Fl AaDdfHnoQqRrv
.Op Fl c Ar count
.Op Fl G Ar sweepmaxsize
.Op Fl g Ar sweepminsize
@@ -56,7 +56,7 @@
.Op Fl z Ar tos
.Ar host
.Nm
-.Op Fl AaDdfLnoQqRrv
+.Op Fl AaDdfHLnoQqRrv
.Op Fl c Ar count
.Op Fl I Ar iface
.Op Fl i Ar wait
@@ -157,6 +157,14 @@
.Tn ICMP
payload to start with when sending sweeping pings.
The default value is 0.
+.It Fl H
+Hostname output.
+Try to do a reverse DNS lookup when displaying addresses.
+This is the opposite of
+.Fl n ,
+and it is the default behavior.
+.Nm
+utility tries reverse-lookup by default.
.It Fl h Ar sweepincrsize
Specify the number of bytes to increment the size of
.Tn ICMP
Index: head/sbin/ping/ping.c
===================================================================
--- head/sbin/ping/ping.c
+++ head/sbin/ping/ping.c
@@ -297,7 +297,7 @@
outpack = outpackhdr + sizeof(struct ip);
while ((ch = getopt(argc, argv,
- "Aac:DdfG:g:h:I:i:Ll:M:m:nop:QqRrS:s:T:t:vW:z:"
+ "Aac:DdfG:g:Hh:I:i:Ll:M:m:nop:QqRrS:s:T:t:vW:z:"
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
"P:"
@@ -363,6 +363,9 @@
options |= F_SWEEP;
sweepmin = ltmp;
break;
+ case 'H':
+ options &= ~F_NUMERIC;
+ break;
case 'h': /* Packet size increment for ping sweep */
ltmp = strtol(optarg, &ep, 0);
if (*ep || ep == optarg || ltmp < 1)
@@ -1743,11 +1746,11 @@
{
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
-"usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize]",
+"usage: ping [-AaDdfHnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize]",
" [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl]",
" " SECOPT " [-p pattern] [-S src_addr] [-s packetsize] [-t timeout]",
" [-W waittime] [-z tos] host",
-" ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]",
+" ping [-AaDdfHLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]",
" [-M mask | time] [-m ttl]" SECOPT " [-p pattern] [-S src_addr]",
" [-s packetsize] [-T ttl] [-t timeout] [-W waittime]",
" [-z tos] mcast-group");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 9:32 AM (3 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33242239
Default Alt Text
D21356.id61090.diff (2 KB)
Attached To
Mode
D21356: ping: add -H option for enabling reverse DNS lookup
Attached
Detach File
Event Timeline
Log In to Comment