From nobody Thu Apr 17 22:44:24 2025 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZdtHf0yl1z5svF7 for ; Thu, 17 Apr 2025 22:44:30 +0000 (UTC) (envelope-from lexi@hemlock.eden.le-fay.org) Received: from fuchsia.eden.le-fay.org (fuchsia.eden.le-fay.org [81.187.47.195]) by mx1.freebsd.org (Postfix) with ESMTP id 4ZdtHd5n6sz40TF; Thu, 17 Apr 2025 22:44:29 +0000 (UTC) (envelope-from lexi@hemlock.eden.le-fay.org) Authentication-Results: mx1.freebsd.org; none Received: from hemlock.eden.le-fay.org (hemlock.eden.le-fay.org [81.2.96.162]) by fuchsia.eden.le-fay.org (Postfix) with ESMTP id 0BA50250C2; Thu, 17 Apr 2025 22:44:26 +0000 (UTC) Received: by hemlock.eden.le-fay.org (Postfix, from userid 10006) id D490148A33; Thu, 17 Apr 2025 23:44:24 +0100 (BST) Date: Thu, 17 Apr 2025 23:44:24 +0100 From: Lexi Winter To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: freebsd-net@freebsd.org Subject: Re: merge traceroute6 into traceroute Message-ID: Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-net@freebsd.org References: <86ikn5b99w.fsf@ltc.des.dev> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86ikn5b99w.fsf@ltc.des.dev> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20712, ipnet:81.187.0.0/16, country:GB] X-Rspamd-Queue-Id: 4ZdtHd5n6sz40TF X-Spamd-Bar: ---- Dag-Erling Smørgrav: > Lexi Winter writes: > > i have proposed a patch to merge traceroute6 into traceroute, so that > > traceroute supports both IPv4 and IPv6 addresses: > > > > https://github.com/freebsd/freebsd-src/pull/1647 > > I've only skimmed the PR but I urge you to look at sbin/ping/main.c and > adjust your code to match. i think you're essentially proposing what jlduran@ already proposed in the PR. this approach is not wrong but i dislike it, because it leaves a lot of duplicate code between the IPv4 and IPv6 versions. for example, nearly all command-line arguments are (or should be) common between IPv4 and IPv6 and there should be a common implementation of those to avoid code duplication. the basic mechanics of sending packets and receiving responses should be common between both versions, as should handling of -P, etc., etc. the point i made on the PR was that if you take jlduran's version and then improve it to how it could be done better, you basically end up with my version. not to say my version is perfect (it certainly is not) but it's further along the path to what we eventually want to end up with. does that make sense?