NetBSD Problem Report #41121
From darrenr@netbsd.org Wed Apr 1 19:15:32 2009
Return-Path: <darrenr@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 53FBC63B8C8
for <gnats-bugs@gnats.NetBSD.org>; Wed, 1 Apr 2009 19:15:32 +0000 (UTC)
Message-Id: <20090401191532.3CFE963B1F8@mail.netbsd.org>
Date: Wed, 1 Apr 2009 19:15:32 +0000 (UTC)
From: darrenr@netbsd.org
Reply-To: darrenr@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: <net/dlt.h> needs to be realigned with tcpdump distro
X-Send-Pr-Version: 3.95
>Number: 41121
>Category: kern
>Synopsis: <net/dlt.h> needs to be realigned with tcudmp disto
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 01 19:20:01 +0000 2009
>Closed-Date: Sat Dec 06 03:16:18 +0000 2025
>Last-Modified: Sat Dec 06 03:16:18 +0000 2025
>Originator: Darren Reed
>Release: NetBSD 4.0_STABLE
>Organization:
NetBSD
>Environment:
System: NetBSD homeworld.netbsd.org 4.0_STABLE NetBSD 4.0_STABLE (NBMAIL) #1: Fri Sep 5 16:31:35 UTC 2008 root@ADMIN:/usr/obj/sys/arch/i386/compile.i386/NBMAIL i386
Architecture: i386
Machine: i386
>Description:
NetBSD has defined at least two DLT types, DLT_HIPPI and DLT_HDLC
that do not appear in the upstream (tcpdump.org) bpf.h file that
lists all of the various DLTs supported by libpcap.
From our <net/dlt.h> file:
#define DLT_HIPPI 15 /* HIPPI */
#define DLT_HDLC 16 /* HDLC framing */
For all platforms aside from FreeBSD and NetBSD, libpcap has this:
#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */
#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */
... for which we use 13 & 14.
It is probably worthwhile taking the time to work through all of the
defines in <net/dlt.h>, bring in ones that aren't there and work with
tcpdump.org to agree on numbers for ones we have but they don't.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Guy Harris <gharris@sonic.net>
To: "gnats-bugs@netbsd.org" <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: kern/41121
Date: Mon, 10 Nov 2025 11:03:47 -0800
Different numerical values for the same DLT_ definition, and different =
DLT_ definitions for the same numeric value, are no longer an issue.
Source code should *not* use numerical DLT_ values, it should use the =
DLT_ #defines.
libpcap no longer writes DLT_ values in capture files; instead, there is =
a set of LINKTYPE_ values, with platform-independent definitions, listed =
at https://www.tcpdump.org/linktypes.html, and it maps between the =
LINKTYPE_ values in capture files and the DLT_ values in its API.
NetBSD's is tracking tcpdump.org's libpcap and has picked up those =
changes.
So nothing more needs to be done here.=
State-Changed-From-To: open->closed
State-Changed-By: lukem@NetBSD.org
State-Changed-When: Sat, 06 Dec 2025 03:16:18 +0000
State-Changed-Why:
Guy Harris mentioned this isn't a problem any more.
Comparing external/bsd/libpcap/dist/pcap/dlt.h and sys/net/dlt.h
shows they're mostly identical, with some NetBSD-specific DLT_CLASS()
related defined at the end of the file
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.