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.
Pathces attached
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
State Changed From-To: open->patched Functionality committed.
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.
State Changed From-To: patched->closed Merged to RELENG_5.