Subject: how to get FreeBSD ping.c into NetBSD?
To: None <tech-net@netbsd.org>
From: Gert Doering <gert@greenie.muc.de>
List: tech-net
Date: 11/22/2006 18:17:15
Hi folks,

today I was (again) in need of being able to "ping" with a specific source
address, as opposed to "whatever interface the packet happens to leave via".

This is fairly regularily needed in environments where different source IPs
are handled differently - for example due to IPSEC rules, or due to different
firewall rules.

NetBSD ping doesn't have a "-S <src addr>" flag, while FreeBSD ping has
- and just compiling the FreeBSD 6.x "ping.c" source on NetBSD made it 
work (with two minor changes).

Additionally, FreeBSD ping has a "-W <milliseconds>" flag and some other
usefull goodies...:

usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize]
            [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl]
            [-p pattern] [-S src_addr] [-s packetsize] [-t timeout]
            [-W waittime] [-z tos] host

So... how to get FreeBSD ping.c (or at least "-S <src addr>" functionality)
into NetBSD?

Can we just import their ping.c, due to all being BSD licensed (actually,
FreeBSD ping.c claims to be "public domain")?

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert@net.informatik.tu-muenchen.de