Bug 82625 - [PATCH] Enhancement to ping to ping through
Summary: [PATCH] Enhancement to ping to ping through
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 5.3-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gleb Smirnoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-25 00:00 UTC by Chris Hellberg
Modified: 2005-11-03 12:42 UTC (History)
0 users

See Also:


Attachments
ping.8.diff (1.60 KB, patch)
2005-06-25 00:06 UTC, Chris Hellberg
no flags Details | Diff
ping.c.diff (6.81 KB, patch)
2005-06-25 00:06 UTC, Chris Hellberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hellberg 2005-06-25 00:00:26 UTC
	A useful function to test MTU issues and traffic
policing functions in networks is to gradually increment
packet sizes in pings in a sweeping fashion.

Fix: 

The diffs implment the changes needed to ping.c and updates
the ping manpage. To get the ping sweep working, you need to
specify pingsweepmax as a minimum. This is the maximum data
size that will be sent.

If pingsweepmin is set, the data size will start from the
specified value. The default data size is 0.

If pingsweepincr is set, after each _count_ number of packets
has been sent, the data size is increased by the current
data size + pingsweepincr. This cycle repeated until the
current data size is equal or less to pingsweepmax. If 
pingsweepincr doesn't divide evenly in to pingsweepmax, the
sweep will stop before it would exceed pingsweepmax.

If "-s count" is included, each sweep of a particular data size
will consist of "count" bytes.
Comment 1 Chris Hellberg 2005-06-25 00:06:17 UTC
Pathces attached
Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2005-08-15 12:52:20 UTC
  Chris,

can you please comment this change? I can't understand it:

@@ -780,13 +853,21 @@
                        }
                        pr_pack((char *)packet, cc, &from, tv);
                        if ((options & F_ONCE && nreceived) ||
-                           (npackets && nreceived >= npackets))
+                           (totpackets && ntransmitted >= totpackets))
                                break;
                }

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
Comment 3 Gleb Smirnoff freebsd_committer freebsd_triage 2005-08-15 15:16:37 UTC
State Changed
From-To: open->patched

Functionality committed. 


Comment 4 Gleb Smirnoff freebsd_committer freebsd_triage 2005-08-15 15:16:37 UTC
Responsible Changed
From-To: freebsd-bugs->glebius

I find the functionality very useful. In the past I made this 
by hand or with shell scripts. I have committed slightly edited 
patch version. 

The submitted patch breaks '-c' switch used without sweep. Also, 
the patch had several style(9) and mdoc(7) problems. Please, 
next time clean your patch thoroughly. Thanks.
Comment 5 Gleb Smirnoff freebsd_committer freebsd_triage 2005-11-03 12:42:32 UTC
State Changed
From-To: patched->closed

Merged to RELENG_5.