Skip site navigation (1)Skip section navigation (2)
Date:      11 Jan 2014 17:36:01 +0000
From:      "Mark Delany" <c2h@romeo.emu.st>
To:        freebsd-net@freebsd.org
Subject:   Re: Merge ping+ping6 and traceroue+traceroute6 to single utilities?
Message-ID:  <20140111173601.6934.qmail@f5-external.bushwire.net>
In-Reply-To: <20140111164047.GA97150@edge.bac.lab>
References:  <1063008459.20140111160525@serebryakov.spb.ru> <20140111164047.GA97150@edge.bac.lab>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11Jan14, mp39590@gmail.com allegedly wrote:

> From a developer's point of view: since the underling raw sockets API is
> totally different between IPv4 and IPv6, we would end up having two types of
> code base.

> From an operator's point of view: unlike ordinary network applications like
> remote login tools, we are usually aware of address family when using network
> management tools.  We do not just want to know the reachability to the host,

Breaking this down by class of users is useful.

Another class of users are tool writers. The contortions you have to
go thru in a shell script to determine which ping command to run is
currently particularly unfriendly.

You have to work out whether both ends have one or both classes which
is non-trivial. Then you run different commands accordingly and react
to all four possible outcomes. Ugly and bug-prone.

Furthermore, all existing scripts that have been written over the last
couple of decades are gradually breaking and have to be patched as the
world evolves to v6.

In short, every script writer on the planet is going to have to
re-invent a ping4/ping6 wrapper to solve this problem and patch it
into all of their existing code.

Wouldn't it be nice it those tool writers could just add an option to
their existing ping command to encompass both their 4&6 requirements?
Or as others have suggested have it "just work" without change?

A third way is to provide a "reachability" wrapper around ping4/ping6
but that means training all FBSD users to use a different tool
resulting in scripts that don't easily port across platforms.

What I'd like semantically in my scripts is: ping [-46..] [-e 1|2|all]

Where -e defines minimal reachability for an exit(0) and multiple
classes are tested based on -4, -6, -8. So, ping -46 -e2 means both 4
and 6 addresses must respond and ping -46 -e1 means either of 4 or 6
must respond.

     (It'd also be nice if all the ping writers across platforms
     agreed on a standardizes output to express results, but that's a
     whole other problem.)


Mark.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140111173601.6934.qmail>