1139823Simp/*-
2313695Sdelphij * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3229073Slstewart *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * This code is derived from the Stanford/CMU enet packet filter,
61541Srgrimes * (net/enet.c) distributed as part of 4.3BSD, and code contributed
71541Srgrimes * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
81541Srgrimes * Berkeley Laboratory.
91541Srgrimes *
101541Srgrimes * Redistribution and use in source and binary forms, with or without
111541Srgrimes * modification, are permitted provided that the following conditions
121541Srgrimes * are met:
131541Srgrimes * 1. Redistributions of source code must retain the above copyright
141541Srgrimes *    notice, this list of conditions and the following disclaimer.
151541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
161541Srgrimes *    notice, this list of conditions and the following disclaimer in the
171541Srgrimes *    documentation and/or other materials provided with the distribution.
18319279Sdelphij * 3. Neither the name of the University nor the names of its contributors
191541Srgrimes *    may be used to endorse or promote products derived from this software
201541Srgrimes *    without specific prior written permission.
211541Srgrimes *
221541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
231541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
241541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
251541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
261541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
271541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
281541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
291541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
301541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
311541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
321541Srgrimes * SUCH DAMAGE.
331541Srgrimes *
34313695Sdelphij *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
351541Srgrimes *
3650477Speter * $FreeBSD: stable/11/sys/net/dlt.h 356341 2020-01-04 00:44:49Z cy $
371541Srgrimes */
381541Srgrimes
39313695Sdelphij#ifndef _NET_DLT_H_
40313695Sdelphij#define _NET_DLT_H_
412168Spaul
421541Srgrimes/*
43313695Sdelphij * Link-layer header type codes.
44177548Scsjp *
45313695Sdelphij * Do *NOT* add new values to this list without asking
46313695Sdelphij * "tcpdump-workers@lists.tcpdump.org" for a value.  Otherwise, you run
47313695Sdelphij * the risk of using a value that's already being used for some other
48313695Sdelphij * purpose, and of having tools that read libpcap-format captures not
49313695Sdelphij * being able to handle captures with your new DLT_ value, with no hope
50313695Sdelphij * that they will ever be changed to do so (as that would destroy their
51313695Sdelphij * ability to read captures using that value for that other purpose).
52313695Sdelphij *
53313695Sdelphij * See
54313695Sdelphij *
55313695Sdelphij *	http://www.tcpdump.org/linktypes.html
56313695Sdelphij *
57313695Sdelphij * for detailed descriptions of some of these link-layer header types.
58177548Scsjp */
59177548Scsjp
60177548Scsjp/*
61313695Sdelphij * These are the types that are the same on all platforms, and that
62313695Sdelphij * have been defined by <net/bpf.h> for ages.
631541Srgrimes */
64129874Sdwmalone#define DLT_NULL	0	/* BSD loopback encapsulation */
651541Srgrimes#define DLT_EN10MB	1	/* Ethernet (10Mb) */
661541Srgrimes#define DLT_EN3MB	2	/* Experimental Ethernet (3Mb) */
671541Srgrimes#define DLT_AX25	3	/* Amateur Radio AX.25 */
681541Srgrimes#define DLT_PRONET	4	/* Proteon ProNET Token Ring */
691541Srgrimes#define DLT_CHAOS	5	/* Chaos */
70313695Sdelphij#define DLT_IEEE802	6	/* 802.5 Token Ring */
71313695Sdelphij#define DLT_ARCNET	7	/* ARCNET, with BSD-style header */
721541Srgrimes#define DLT_SLIP	8	/* Serial Line IP */
731541Srgrimes#define DLT_PPP		9	/* Point-to-point Protocol */
741541Srgrimes#define DLT_FDDI	10	/* FDDI */
751541Srgrimes
761541Srgrimes/*
77313695Sdelphij * These are types that are different on some platforms, and that
78313695Sdelphij * have been defined by <net/bpf.h> for ages.  We use #ifdefs to
79313695Sdelphij * detect the BSDs that define them differently from the traditional
80313695Sdelphij * libpcap <net/bpf.h>
8180767Sfenner *
82313695Sdelphij * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
83313695Sdelphij * but I don't know what the right #define is for BSD/OS.
8480767Sfenner */
85313695Sdelphij#define DLT_ATM_RFC1483	11	/* LLC-encapsulated ATM */
86313695Sdelphij
87313695Sdelphij#ifdef __OpenBSD__
88313695Sdelphij#define DLT_RAW		14	/* raw IP */
89313695Sdelphij#else
90313695Sdelphij#define DLT_RAW		12	/* raw IP */
91313695Sdelphij#endif
92313695Sdelphij
93313695Sdelphij/*
94313695Sdelphij * Given that the only OS that currently generates BSD/OS SLIP or PPP
95313695Sdelphij * is, well, BSD/OS, arguably everybody should have chosen its values
96313695Sdelphij * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
97313695Sdelphij * didn't.  So it goes.
98313695Sdelphij */
99313695Sdelphij#if defined(__NetBSD__) || defined(__FreeBSD__)
100313695Sdelphij#ifndef DLT_SLIP_BSDOS
101313695Sdelphij#define DLT_SLIP_BSDOS	13	/* BSD/OS Serial Line IP */
102313695Sdelphij#define DLT_PPP_BSDOS	14	/* BSD/OS Point-to-point Protocol */
103313695Sdelphij#endif
104313695Sdelphij#else
10580767Sfenner#define DLT_SLIP_BSDOS	15	/* BSD/OS Serial Line IP */
10680767Sfenner#define DLT_PPP_BSDOS	16	/* BSD/OS Point-to-point Protocol */
107313695Sdelphij#endif
10880767Sfenner
109313695Sdelphij/*
110313695Sdelphij * 17 was used for DLT_PFLOG in OpenBSD; it no longer is.
111313695Sdelphij *
112313695Sdelphij * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG
113313695Sdelphij * as 117 so that pflog captures would use a link-layer header type
114313695Sdelphij * value that didn't collide with any other values.  On all
115313695Sdelphij * platforms other than OpenBSD, we defined DLT_PFLOG as 117,
116313695Sdelphij * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG.
117313695Sdelphij *
118313695Sdelphij * OpenBSD eventually switched to using 117 for DLT_PFLOG as well.
119313695Sdelphij *
120313695Sdelphij * Don't use 17 for anything else.
121313695Sdelphij */
122313695Sdelphij
123313695Sdelphij/*
124313695Sdelphij * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and
125335640Shselasky * macOS; don't use it for anything else.  (FreeBSD uses 121, which
126335640Shselasky * collides with DLT_HHDLC, even though it doesn't use 18 for
127335640Shselasky * anything and doesn't appear to have ever used it for anything.)
128313695Sdelphij *
129313695Sdelphij * We define it as 18 on those platforms; it is, unfortunately, used
130313695Sdelphij * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC
131313695Sdelphij * in general.  As the packet format for it, like that for
132313695Sdelphij * DLT_PFLOG, is not only OS-dependent but OS-version-dependent,
133313695Sdelphij * we don't support printing it in tcpdump except on OSes that
134313695Sdelphij * have the relevant header files, so it's not that useful on
135313695Sdelphij * other platforms.
136313695Sdelphij */
137313695Sdelphij#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
138313695Sdelphij#define DLT_PFSYNC	18
139313695Sdelphij#endif
140313695Sdelphij
14180767Sfenner#define DLT_ATM_CLIP	19	/* Linux Classical-IP over ATM */
14280767Sfenner
14380767Sfenner/*
144313695Sdelphij * Apparently Redback uses this for its SmartEdge 400/800.  I hope
145313695Sdelphij * nobody else decided to use it, too.
146313695Sdelphij */
147313695Sdelphij#define DLT_REDBACK_SMARTEDGE	32
148313695Sdelphij
149313695Sdelphij/*
15098540Sfenner * These values are defined by NetBSD; other platforms should refrain from
15198540Sfenner * using them for other purposes, so that NetBSD savefiles with link
15298540Sfenner * types of 50 or 51 can be read as this type on all platforms.
15380767Sfenner */
15480767Sfenner#define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
15598540Sfenner#define DLT_PPP_ETHER	51	/* PPP over Ethernet */
15680767Sfenner
15780767Sfenner/*
158313695Sdelphij * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
159313695Sdelphij * a link-layer type of 99 for the tcpdump it supplies.  The link-layer
160313695Sdelphij * header has 6 bytes of unknown data, something that appears to be an
161313695Sdelphij * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
162313695Sdelphij * I've seen.
163127674Sbms */
164127674Sbms#define DLT_SYMANTEC_FIREWALL	99
165127674Sbms
166235425Sdelphij/*
167235425Sdelphij * Values between 100 and 103 are used in capture file headers as
168235425Sdelphij * link-layer header type LINKTYPE_ values corresponding to DLT_ types
169235425Sdelphij * that differ between platforms; don't use those values for new DLT_
170235425Sdelphij * new types.
171235425Sdelphij */
172127674Sbms
173127674Sbms/*
174235425Sdelphij * Values starting with 104 are used for newly-assigned link-layer
175235425Sdelphij * header type values; for those link-layer header types, the DLT_
176235425Sdelphij * value returned by pcap_datalink() and passed to pcap_open_dead(),
177235425Sdelphij * and the LINKTYPE_ value that appears in capture files, are the
178235425Sdelphij * same.
179235425Sdelphij *
180235425Sdelphij * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
181235425Sdelphij * the highest such value.
182235425Sdelphij */
183235425Sdelphij#define DLT_MATCHING_MIN	104
184235425Sdelphij
185235425Sdelphij/*
18680767Sfenner * This value was defined by libpcap 0.5; platforms that have defined
18780767Sfenner * it with a different value should define it here with that value -
18880767Sfenner * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
18980767Sfenner * whatever value that happens to be, so programs will correctly
19080767Sfenner * handle files with that link type regardless of the value of
19180767Sfenner * DLT_C_HDLC.
19280767Sfenner *
19380767Sfenner * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
19480767Sfenner * compatibility with programs written for BSD/OS.
19580767Sfenner *
19680767Sfenner * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
19780767Sfenner * for source compatibility with programs written for libpcap 0.5.
19880767Sfenner */
19980767Sfenner#define DLT_C_HDLC	104	/* Cisco HDLC */
20080767Sfenner#define DLT_CHDLC	DLT_C_HDLC
20180767Sfenner
20280767Sfenner#define DLT_IEEE802_11	105	/* IEEE 802.11 wireless */
20380767Sfenner
20480767Sfenner/*
205313695Sdelphij * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
206313695Sdelphij * except when it isn't.  (I.e., sometimes it's just raw IP, and
207313695Sdelphij * sometimes it isn't.)  We currently handle it as DLT_LINUX_SLL,
208313695Sdelphij * so that we don't have to worry about the link-layer header.)
20980767Sfenner */
21080767Sfenner
21180767Sfenner/*
212127673Sbms * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
213127673Sbms * with other values.
214127673Sbms * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
215127673Sbms * (DLCI, etc.).
216127673Sbms */
217127673Sbms#define DLT_FRELAY	107
218127673Sbms
219127673Sbms/*
22080767Sfenner * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
22180767Sfenner * that the AF_ type in the link-layer header is in network byte order.
22280767Sfenner *
223313695Sdelphij * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
224313695Sdelphij * we don't use 12 for it in OSes other than OpenBSD.
22580767Sfenner */
226313695Sdelphij#ifdef __OpenBSD__
227313695Sdelphij#define DLT_LOOP	12
228313695Sdelphij#else
22980767Sfenner#define DLT_LOOP	108
230313695Sdelphij#endif
23180767Sfenner
23280767Sfenner/*
233127673Sbms * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
234127673Sbms * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
235127673Sbms * than OpenBSD.
236127673Sbms */
237313695Sdelphij#ifdef __OpenBSD__
238313695Sdelphij#define DLT_ENC		13
239313695Sdelphij#else
240313695Sdelphij#define DLT_ENC		109
241313695Sdelphij#endif
242127673Sbms
243127673Sbms/*
244313695Sdelphij * Values between 110 and 112 are reserved for use in capture file headers
245313695Sdelphij * as link-layer types corresponding to DLT_ types that might differ
246313695Sdelphij * between platforms; don't use those values for new DLT_ types
247313695Sdelphij * other than the corresponding DLT_ types.
248313695Sdelphij */
249313695Sdelphij
250313695Sdelphij/*
25180767Sfenner * This is for Linux cooked sockets.
25280767Sfenner */
25380767Sfenner#define DLT_LINUX_SLL	113
25480767Sfenner
25580767Sfenner/*
25698540Sfenner * Apple LocalTalk hardware.
25798540Sfenner */
25898540Sfenner#define DLT_LTALK	114
25998540Sfenner
26098540Sfenner/*
26198540Sfenner * Acorn Econet.
26298540Sfenner */
26398540Sfenner#define DLT_ECONET	115
26498540Sfenner
26598540Sfenner/*
26698540Sfenner * Reserved for use with OpenBSD ipfilter.
26798540Sfenner */
26898540Sfenner#define DLT_IPFILTER	116
26998540Sfenner
27098540Sfenner/*
271313695Sdelphij * OpenBSD DLT_PFLOG.
27298540Sfenner */
27398540Sfenner#define DLT_PFLOG	117
27498540Sfenner
27598540Sfenner/*
27698540Sfenner * Registered for Cisco-internal use.
27798540Sfenner */
27898540Sfenner#define DLT_CISCO_IOS	118
27998540Sfenner
28098540Sfenner/*
281313695Sdelphij * For 802.11 cards using the Prism II chips, with a link-layer
28298540Sfenner * header including Prism monitor mode information plus an 802.11
28398540Sfenner * header.
28498540Sfenner */
28598540Sfenner#define DLT_PRISM_HEADER	119
28698540Sfenner
28798540Sfenner/*
28898540Sfenner * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
28998540Sfenner * (see Doug Ambrisko's FreeBSD patches).
29098540Sfenner */
29198540Sfenner#define DLT_AIRONET_HEADER	120
29298540Sfenner
29398540Sfenner/*
294313695Sdelphij * Sigh.
295313695Sdelphij *
296313695Sdelphij * 121 was reserved for Siemens HiPath HDLC on 2002-01-25, as
297313695Sdelphij * requested by Tomas Kukosa.
298313695Sdelphij *
299313695Sdelphij * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that
300313695Sdelphij * assigned 121 as DLT_PFSYNC.  In current versions, its libpcap
301313695Sdelphij * does DLT_ <-> LINKTYPE_ mapping, mapping DLT_PFSYNC to a
302313695Sdelphij * LINKTYPE_PFSYNC value of 246, so it should write out DLT_PFSYNC
303313695Sdelphij * dump files with 246 as the link-layer header type.  (Earlier
304313695Sdelphij * versions might not have done mapping, in which case they would
305313695Sdelphij * have written them out with a link-layer header type of 121.)
306313695Sdelphij *
307313695Sdelphij * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC;
308313695Sdelphij * its libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would
309313695Sdelphij * write out DLT_PFSYNC dump files with use 18 as the link-layer
310313695Sdelphij * header type.
311313695Sdelphij *
312313695Sdelphij * NetBSD, DragonFly BSD, and Darwin also use 18 for DLT_PFSYNC; in
313313695Sdelphij * current versions, their libpcaps do DLT_ <-> LINKTYPE_ mapping,
314313695Sdelphij * mapping DLT_PFSYNC to a LINKTYPE_PFSYNC value of 246, so they
315313695Sdelphij * should write out DLT_PFSYNC dump files with 246 as the link-layer
316313695Sdelphij * header type.  (Earlier versions might not have done mapping,
317313695Sdelphij * in which case they'd work the same way OpenBSD does, writing
318313695Sdelphij * them out with a link-layer header type of 18.)
319313695Sdelphij *
320313695Sdelphij * We'll define DLT_PFSYNC as:
321313695Sdelphij *
322313695Sdelphij *    18 on NetBSD, OpenBSD, DragonFly BSD, and Darwin;
323313695Sdelphij *
324313695Sdelphij *    121 on FreeBSD;
325313695Sdelphij *
326313695Sdelphij *    246 everywhere else.
327313695Sdelphij *
328313695Sdelphij * We'll define DLT_HHDLC as 121 on everything except for FreeBSD;
329313695Sdelphij * anybody who wants to compile, on FreeBSD, code that uses DLT_HHDLC
330313695Sdelphij * is out of luck.
331313695Sdelphij *
332313695Sdelphij * We'll define LINKTYPE_PFSYNC as 246 on *all* platforms, so that
333313695Sdelphij * savefiles written using *this* code won't use 18 or 121 for PFSYNC,
334313695Sdelphij * they'll all use 246.
335313695Sdelphij *
336313695Sdelphij * Code that uses pcap_datalink() to determine the link-layer header
337313695Sdelphij * type of a savefile won't, when built and run on FreeBSD, be able
338313695Sdelphij * to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC capture
339313695Sdelphij * files, as pcap_datalink() will give 121 for both of them.  Code
340313695Sdelphij * that doesn't, such as the code in Wireshark, will be able to
341313695Sdelphij * distinguish between them.
342313695Sdelphij *
343313695Sdelphij * FreeBSD's libpcap won't map a link-layer header type of 18 - i.e.,
344313695Sdelphij * DLT_PFSYNC files from OpenBSD and possibly older versions of NetBSD,
345335640Shselasky * DragonFly BSD, and macOS - to DLT_PFSYNC, so code built with FreeBSD's
346313695Sdelphij * libpcap won't treat those files as DLT_PFSYNC files.
347313695Sdelphij *
348313695Sdelphij * Other libpcaps won't map a link-layer header type of 121 to DLT_PFSYNC;
349313695Sdelphij * this means they can read DLT_HHDLC files, if any exist, but won't
350313695Sdelphij * treat pcap files written by any older versions of FreeBSD libpcap that
351313695Sdelphij * didn't map to 246 as DLT_PFSYNC files.
352127673Sbms */
353313695Sdelphij#ifdef __FreeBSD__
354313695Sdelphij#define DLT_PFSYNC		121
355313695Sdelphij#else
356313695Sdelphij#define DLT_HHDLC		121
357313695Sdelphij#endif
358127673Sbms
359127673Sbms/*
360313695Sdelphij * This is for RFC 2625 IP-over-Fibre Channel.
361313695Sdelphij *
362313695Sdelphij * This is not for use with raw Fibre Channel, where the link-layer
363313695Sdelphij * header starts with a Fibre Channel frame header; it's for IP-over-FC,
364313695Sdelphij * where the link-layer header starts with an RFC 2625 Network_Header
365313695Sdelphij * field.
366127674Sbms */
367313695Sdelphij#define DLT_IP_OVER_FC		122
368127674Sbms
369127674Sbms/*
370313695Sdelphij * This is for Full Frontal ATM on Solaris with SunATM, with a
371313695Sdelphij * pseudo-header followed by an AALn PDU.
372313695Sdelphij *
373313695Sdelphij * There may be other forms of Full Frontal ATM on other OSes,
374313695Sdelphij * with different pseudo-headers.
375313695Sdelphij *
376313695Sdelphij * If ATM software returns a pseudo-header with VPI/VCI information
377313695Sdelphij * (and, ideally, packet type information, e.g. signalling, ILMI,
378313695Sdelphij * LANE, LLC-multiplexed traffic, etc.), it should not use
379313695Sdelphij * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
380313695Sdelphij * and the like don't have to infer the presence or absence of a
381313695Sdelphij * pseudo-header and the form of the pseudo-header.
382127673Sbms */
383313695Sdelphij#define DLT_SUNATM		123	/* Solaris+SunATM */
384127673Sbms
385127673Sbms/*
386127674Sbms * Reserved as per request from Kent Dahlgren <kent@praesum.com>
387127674Sbms * for private use.
388127674Sbms */
389313695Sdelphij#define DLT_RIO                 124     /* RapidIO */
390313695Sdelphij#define DLT_PCI_EXP             125     /* PCI Express */
391313695Sdelphij#define DLT_AURORA              126     /* Xilinx Aurora link layer */
392127674Sbms
393127674Sbms/*
394313695Sdelphij * Header for 802.11 plus a number of bits of link-layer information
395313695Sdelphij * including radio information, used by some recent BSD drivers as
396313695Sdelphij * well as the madwifi Atheros driver for Linux.
397127673Sbms */
398313695Sdelphij#define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
399127673Sbms
400127673Sbms/*
401313695Sdelphij * Reserved for the TZSP encapsulation, as per request from
402313695Sdelphij * Chris Waters <chris.waters@networkchemistry.com>
403313695Sdelphij * TZSP is a generic encapsulation for any other link type,
404313695Sdelphij * which includes a means to include meta-information
405313695Sdelphij * with the packet, e.g. signal strength and channel
406313695Sdelphij * for 802.11 packets.
407127674Sbms */
408313695Sdelphij#define DLT_TZSP                128     /* Tazmen Sniffer Protocol */
409127674Sbms
410127674Sbms/*
411313695Sdelphij * BSD's ARCNET headers have the source host, destination host,
412313695Sdelphij * and type at the beginning of the packet; that's what's handed
413313695Sdelphij * up to userland via BPF.
414313695Sdelphij *
415313695Sdelphij * Linux's ARCNET headers, however, have a 2-byte offset field
416313695Sdelphij * between the host IDs and the type; that's what's handed up
417313695Sdelphij * to userland via PF_PACKET sockets.
418313695Sdelphij *
419313695Sdelphij * We therefore have to have separate DLT_ values for them.
420127673Sbms */
421313695Sdelphij#define DLT_ARCNET_LINUX	129	/* ARCNET */
422127673Sbms
423127673Sbms/*
424313695Sdelphij * Juniper-private data link types, as per request from
425313695Sdelphij * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
426313695Sdelphij * for passing on chassis-internal metainformation such as
427313695Sdelphij * QOS profiles, etc..
428127674Sbms */
429313695Sdelphij#define DLT_JUNIPER_MLPPP       130
430313695Sdelphij#define DLT_JUNIPER_MLFR        131
431313695Sdelphij#define DLT_JUNIPER_ES          132
432313695Sdelphij#define DLT_JUNIPER_GGSN        133
433313695Sdelphij#define DLT_JUNIPER_MFR         134
434313695Sdelphij#define DLT_JUNIPER_ATM2        135
435313695Sdelphij#define DLT_JUNIPER_SERVICES    136
436313695Sdelphij#define DLT_JUNIPER_ATM1        137
437127674Sbms
438127674Sbms/*
439146729Ssam * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
440146729Ssam * <dieter@apple.com>.  The header that's presented is an Ethernet-like
441146729Ssam * header:
442146729Ssam *
443146729Ssam *	#define FIREWIRE_EUI64_LEN	8
444146729Ssam *	struct firewire_header {
445146729Ssam *		u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
446146729Ssam *		u_char  firewire_shost[FIREWIRE_EUI64_LEN];
447146729Ssam *		u_short firewire_type;
448146729Ssam *	};
449146729Ssam *
450146729Ssam * with "firewire_type" being an Ethernet type value, rather than,
451146729Ssam * for example, raw GASP frames being handed up.
452127673Sbms */
453127673Sbms#define DLT_APPLE_IP_OVER_IEEE1394	138
454127673Sbms
455127673Sbms/*
456147893Ssam * Various SS7 encapsulations, as per a request from Jeff Morriss
457147893Ssam * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
458146729Ssam */
459147893Ssam#define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info, followed by MTP2 */
460147893Ssam#define DLT_MTP2		140	/* MTP2, without pseudo-header */
461147893Ssam#define DLT_MTP3		141	/* MTP3, without pseudo-header or MTP2 */
462147893Ssam#define DLT_SCCP		142	/* SCCP, without pseudo-header or MTP2 or MTP3 */
463146729Ssam
464146729Ssam/*
465313695Sdelphij * DOCSIS MAC frames.
466127674Sbms */
467313695Sdelphij#define DLT_DOCSIS		143
468127674Sbms
469127674Sbms/*
470313695Sdelphij * Linux-IrDA packets. Protocol defined at http://www.irda.org.
471313695Sdelphij * Those packets include IrLAP headers and above (IrLMP...), but
472313695Sdelphij * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
473313695Sdelphij * framing can be handled by the hardware and depend on the bitrate.
474313695Sdelphij * This is exactly the format you would get capturing on a Linux-IrDA
475313695Sdelphij * interface (irdaX), but not on a raw serial port.
476313695Sdelphij * Note the capture is done in "Linux-cooked" mode, so each packet include
477313695Sdelphij * a fake packet header (struct sll_header). This is because IrDA packet
478313695Sdelphij * decoding is dependant on the direction of the packet (incomming or
479313695Sdelphij * outgoing).
480313695Sdelphij * When/if other platform implement IrDA capture, we may revisit the
481313695Sdelphij * issue and define a real DLT_IRDA...
482313695Sdelphij * Jean II
483127673Sbms */
484313695Sdelphij#define DLT_LINUX_IRDA		144
485127673Sbms
486127673Sbms/*
487127674Sbms * Reserved for IBM SP switch and IBM Next Federation switch.
488127674Sbms */
489313695Sdelphij#define DLT_IBM_SP		145
490313695Sdelphij#define DLT_IBM_SN		146
491127674Sbms
492127674Sbms/*
493146729Ssam * Reserved for private use.  If you have some link-layer header type
494146729Ssam * that you want to use within your organization, with the capture files
495146729Ssam * using that link-layer header type not ever be sent outside your
496146729Ssam * organization, you can use these values.
497146729Ssam *
498146729Ssam * No libpcap release will use these for any purpose, nor will any
499146729Ssam * tcpdump release use them, either.
500146729Ssam *
501146729Ssam * Do *NOT* use these in capture files that you expect anybody not using
502146729Ssam * your private versions of capture-file-reading tools to read; in
503146729Ssam * particular, do *NOT* use them in products, otherwise you may find that
504146729Ssam * people won't be able to use tcpdump, or snort, or Ethereal, or... to
505146729Ssam * read capture files from your firewall/intrusion detection/traffic
506146729Ssam * monitoring/etc. appliance, or whatever product uses that DLT_ value,
507146729Ssam * and you may also find that the developers of those applications will
508146729Ssam * not accept patches to let them read those files.
509146729Ssam *
510146729Ssam * Also, do not use them if somebody might send you a capture using them
511146729Ssam * for *their* private type and tools using them for *your* private type
512146729Ssam * would have to read them.
513146729Ssam *
514313695Sdelphij * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
515146729Ssam * as per the comment above, and use the type you're given.
516127673Sbms */
517146729Ssam#define DLT_USER0		147
518146729Ssam#define DLT_USER1		148
519146729Ssam#define DLT_USER2		149
520146729Ssam#define DLT_USER3		150
521146729Ssam#define DLT_USER4		151
522146729Ssam#define DLT_USER5		152
523146729Ssam#define DLT_USER6		153
524146729Ssam#define DLT_USER7		154
525146729Ssam#define DLT_USER8		155
526146729Ssam#define DLT_USER9		156
527146729Ssam#define DLT_USER10		157
528146729Ssam#define DLT_USER11		158
529146729Ssam#define DLT_USER12		159
530146729Ssam#define DLT_USER13		160
531146729Ssam#define DLT_USER14		161
532146729Ssam#define DLT_USER15		162
533127673Sbms
534127673Sbms/*
535146729Ssam * For future use with 802.11 captures - defined by AbsoluteValue
536146729Ssam * Systems to store a number of bits of link-layer information
537146729Ssam * including radio information:
538146729Ssam *
539146729Ssam *	http://www.shaftnet.org/~pizza/software/capturefrm.txt
540146729Ssam *
541146729Ssam * but it might be used by some non-AVS drivers now or in the
542146729Ssam * future.
543127674Sbms */
544146729Ssam#define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
545127674Sbms
546127674Sbms/*
547146729Ssam * Juniper-private data link type, as per request from
548146729Ssam * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
549146729Ssam * for passing on chassis-internal metainformation such as
550146729Ssam * QOS profiles, etc..
551146729Ssam */
552146729Ssam#define DLT_JUNIPER_MONITOR     164
553146729Ssam
554146729Ssam/*
555313695Sdelphij * BACnet MS/TP frames.
556146729Ssam */
557146729Ssam#define DLT_BACNET_MS_TP	165
558146729Ssam
559146729Ssam/*
560146729Ssam * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
561146729Ssam *
562146729Ssam * This is used in some OSes to allow a kernel socket filter to distinguish
563146729Ssam * between incoming and outgoing packets, on a socket intended to
564146729Ssam * supply pppd with outgoing packets so it can do dial-on-demand and
565146729Ssam * hangup-on-lack-of-demand; incoming packets are filtered out so they
566146729Ssam * don't cause pppd to hold the connection up (you don't want random
567146729Ssam * input packets such as port scans, packets from old lost connections,
568146729Ssam * etc. to force the connection to stay up).
569146729Ssam *
570313695Sdelphij * The first byte of the PPP header (0xff03) is modified to accomodate
571146729Ssam * the direction - 0x00 = IN, 0x01 = OUT.
572146729Ssam */
573146729Ssam#define DLT_PPP_PPPD		166
574146729Ssam
575146729Ssam/*
576146729Ssam * Names for backwards compatibility with older versions of some PPP
577146729Ssam * software; new software should use DLT_PPP_PPPD.
578146729Ssam */
579146729Ssam#define DLT_PPP_WITH_DIRECTION	DLT_PPP_PPPD
580146729Ssam#define DLT_LINUX_PPP_WITHDIRECTION	DLT_PPP_PPPD
581146729Ssam
582146729Ssam/*
583146729Ssam * Juniper-private data link type, as per request from
584146729Ssam * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
585146729Ssam * for passing on chassis-internal metainformation such as
586146729Ssam * QOS profiles, cookies, etc..
587146729Ssam */
588146729Ssam#define DLT_JUNIPER_PPPOE       167
589146729Ssam#define DLT_JUNIPER_PPPOE_ATM   168
590146729Ssam
591146729Ssam#define DLT_GPRS_LLC		169	/* GPRS LLC */
592146729Ssam#define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
593146729Ssam#define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
594146729Ssam
595146729Ssam/*
596146729Ssam * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
597146729Ssam * monitoring equipment.
598146729Ssam */
599146729Ssam#define DLT_GCOM_T1E1		172
600146729Ssam#define DLT_GCOM_SERIAL		173
601146729Ssam
602146729Ssam/*
603146729Ssam * Juniper-private data link type, as per request from
604146729Ssam * Hannes Gredler <hannes@juniper.net>.  The DLT_ is used
605146729Ssam * for internal communication to Physical Interface Cards (PIC)
606146729Ssam */
607146729Ssam#define DLT_JUNIPER_PIC_PEER    174
608146729Ssam
609146729Ssam/*
610146729Ssam * Link types requested by Gregor Maier <gregor@endace.com> of Endace
611146729Ssam * Measurement Systems.  They add an ERF header (see
612146729Ssam * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
613146729Ssam * the link-layer header.
614146729Ssam */
615146729Ssam#define DLT_ERF_ETH		175	/* Ethernet */
616146729Ssam#define DLT_ERF_POS		176	/* Packet-over-SONET */
617146729Ssam
618146729Ssam/*
619147893Ssam * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
620147893Ssam * for vISDN (http://www.orlandi.com/visdn/).  Its link-layer header
621147893Ssam * includes additional information before the LAPD header, so it's
622147893Ssam * not necessarily a generic LAPD header.
623147893Ssam */
624147893Ssam#define DLT_LINUX_LAPD		177
625147893Ssam
626147893Ssam/*
627162010Ssam * Juniper-private data link type, as per request from
628174876Srwatson * Hannes Gredler <hannes@juniper.net>.
629162010Ssam * The DLT_ are used for prepending meta-information
630162010Ssam * like interface index, interface name
631162010Ssam * before standard Ethernet, PPP, Frelay & C-HDLC Frames
632162010Ssam */
633162010Ssam#define DLT_JUNIPER_ETHER       178
634162010Ssam#define DLT_JUNIPER_PPP         179
635162010Ssam#define DLT_JUNIPER_FRELAY      180
636162010Ssam#define DLT_JUNIPER_CHDLC       181
637162010Ssam
638162010Ssam/*
639172851Smlaier * Multi Link Frame Relay (FRF.16)
640172851Smlaier */
641172851Smlaier#define DLT_MFR                 182
642172851Smlaier
643172851Smlaier/*
644172851Smlaier * Juniper-private data link type, as per request from
645174876Srwatson * Hannes Gredler <hannes@juniper.net>.
646172851Smlaier * The DLT_ is used for internal communication with a
647172851Smlaier * voice Adapter Card (PIC)
648172851Smlaier */
649172851Smlaier#define DLT_JUNIPER_VP          183
650172851Smlaier
651172851Smlaier/*
652172851Smlaier * Arinc 429 frames.
653172851Smlaier * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
654172851Smlaier * Every frame contains a 32bit A429 label.
655172851Smlaier * More documentation on Arinc 429 can be found at
656172851Smlaier * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
657172851Smlaier */
658172851Smlaier#define DLT_A429                184
659172851Smlaier
660172851Smlaier/*
661172851Smlaier * Arinc 653 Interpartition Communication messages.
662172851Smlaier * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
663172851Smlaier * Please refer to the A653-1 standard for more information.
664172851Smlaier */
665172851Smlaier#define DLT_A653_ICM            185
666172851Smlaier
667172851Smlaier/*
668313695Sdelphij * This used to be "USB packets, beginning with a USB setup header;
669313695Sdelphij * requested by Paolo Abeni <paolo.abeni@email.it>."
670313695Sdelphij *
671313695Sdelphij * However, that header didn't work all that well - it left out some
672313695Sdelphij * useful information - and was abandoned in favor of the DLT_USB_LINUX
673313695Sdelphij * header.
674313695Sdelphij *
675313695Sdelphij * This is now used by FreeBSD for its BPF taps for USB; that has its
676313695Sdelphij * own headers.  So it is written, so it is done.
677313695Sdelphij *
678313695Sdelphij * For source-code compatibility, we also define DLT_USB to have this
679313695Sdelphij * value.  We do it numerically so that, if code that includes this
680313695Sdelphij * file (directly or indirectly) also includes an OS header that also
681313695Sdelphij * defines DLT_USB as 186, we don't get a redefinition warning.
682313695Sdelphij * (NetBSD 7 does that.)
683172851Smlaier */
684313695Sdelphij#define DLT_USB_FREEBSD		186
685172851Smlaier#define DLT_USB			186
686172851Smlaier
687172851Smlaier/*
688172851Smlaier * Bluetooth HCI UART transport layer (part H:4); requested by
689172851Smlaier * Paolo Abeni.
690172851Smlaier */
691172851Smlaier#define DLT_BLUETOOTH_HCI_H4	187
692172851Smlaier
693172851Smlaier/*
694172851Smlaier * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
695172851Smlaier * <cruz_petagay@bah.com>.
696172851Smlaier */
697172851Smlaier#define DLT_IEEE802_16_MAC_CPS	188
698172851Smlaier
699172851Smlaier/*
700172851Smlaier * USB packets, beginning with a Linux USB header; requested by
701172851Smlaier * Paolo Abeni <paolo.abeni@email.it>.
702172851Smlaier */
703172851Smlaier#define DLT_USB_LINUX		189
704172851Smlaier
705172851Smlaier/*
706172851Smlaier * Controller Area Network (CAN) v. 2.0B packets.
707172851Smlaier * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
708172851Smlaier * Used to dump CAN packets coming from a CAN Vector board.
709172851Smlaier * More documentation on the CAN v2.0B frames can be found at
710172851Smlaier * http://www.can-cia.org/downloads/?269
711172851Smlaier */
712172851Smlaier#define DLT_CAN20B              190
713172851Smlaier
714172851Smlaier/*
715172851Smlaier * IEEE 802.15.4, with address fields padded, as is done by Linux
716172851Smlaier * drivers; requested by Juergen Schimmer.
717172851Smlaier */
718172851Smlaier#define DLT_IEEE802_15_4_LINUX	191
719172851Smlaier
720172851Smlaier/*
721172851Smlaier * Per Packet Information encapsulated packets.
722172851Smlaier * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
723172851Smlaier */
724172851Smlaier#define DLT_PPI			192
725172851Smlaier
726172851Smlaier/*
727172851Smlaier * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
728172851Smlaier * requested by Charles Clancy.
729172851Smlaier */
730172851Smlaier#define DLT_IEEE802_16_MAC_CPS_RADIO	193
731172851Smlaier
732172851Smlaier/*
733172851Smlaier * Juniper-private data link type, as per request from
734174876Srwatson * Hannes Gredler <hannes@juniper.net>.
735172851Smlaier * The DLT_ is used for internal communication with a
736172851Smlaier * integrated service module (ISM).
737172851Smlaier */
738172851Smlaier#define DLT_JUNIPER_ISM         194
739172851Smlaier
740172851Smlaier/*
741172851Smlaier * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
742172851Smlaier * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
743313695Sdelphij * For this one, we expect the FCS to be present at the end of the frame;
744313695Sdelphij * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used.
745172851Smlaier */
746172851Smlaier#define DLT_IEEE802_15_4	195
747172851Smlaier
748172851Smlaier/*
749172851Smlaier * Various link-layer types, with a pseudo-header, for SITA
750172851Smlaier * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
751172851Smlaier */
752172851Smlaier#define DLT_SITA		196
753172851Smlaier
754172851Smlaier/*
755172851Smlaier * Various link-layer types, with a pseudo-header, for Endace DAG cards;
756172851Smlaier * encapsulates Endace ERF records.  Requested by Stephen Donnelly
757172851Smlaier * <stephen@endace.com>.
758172851Smlaier */
759172851Smlaier#define DLT_ERF			197
760172851Smlaier
761172851Smlaier/*
762172851Smlaier * Special header prepended to Ethernet packets when capturing from a
763172851Smlaier * u10 Networks board.  Requested by Phil Mulholland
764172851Smlaier * <phil@u10networks.com>.
765172851Smlaier */
766172851Smlaier#define DLT_RAIF1		198
767172851Smlaier
768172851Smlaier/*
769172851Smlaier * IPMB packet for IPMI, beginning with the I2C slave address, followed
770172851Smlaier * by the netFn and LUN, etc..  Requested by Chanthy Toeung
771172851Smlaier * <chanthy.toeung@ca.kontron.com>.
772356341Scy *
773356341Scy * XXX - this used to be called DLT_IPMB, back when we got the
774356341Scy * impression from the email thread requesting it that the packet
775356341Scy * had no extra 2-byte header.  We've renamed it; if anybody used
776356341Scy * DLT_IPMB and assumed no 2-byte header, this will cause the compile
777356341Scy * to fail, at which point we'll have to figure out what to do about
778356341Scy * the two header types using the same DLT_/LINKTYPE_ value.  If that
779356341Scy * doesn't happen, we'll assume nobody used it and that the redefinition
780356341Scy * is safe.
781172851Smlaier */
782356341Scy#define DLT_IPMB_KONTRON	199
783172851Smlaier
784172851Smlaier/*
785172851Smlaier * Juniper-private data link type, as per request from
786174876Srwatson * Hannes Gredler <hannes@juniper.net>.
787172851Smlaier * The DLT_ is used for capturing data on a secure tunnel interface.
788172851Smlaier */
789172851Smlaier#define DLT_JUNIPER_ST          200
790172851Smlaier
791172851Smlaier/*
792172851Smlaier * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
793172851Smlaier * that includes direction information; requested by Paolo Abeni.
794172851Smlaier */
795172851Smlaier#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR	201
796172851Smlaier
797172851Smlaier/*
798190639Srpaulo * AX.25 packet with a 1-byte KISS header; see
799190639Srpaulo *
800313695Sdelphij *	http://www.ax25.net/kiss.htm
801190639Srpaulo *
802190639Srpaulo * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
803190639Srpaulo */
804313695Sdelphij#define DLT_AX25_KISS		202
805190639Srpaulo
806190639Srpaulo/*
807190639Srpaulo * LAPD packets from an ISDN channel, starting with the address field,
808190639Srpaulo * with no pseudo-header.
809190639Srpaulo * Requested by Varuna De Silva <varunax@gmail.com>.
810190639Srpaulo */
811313695Sdelphij#define DLT_LAPD		203
812190639Srpaulo
813190639Srpaulo/*
814190639Srpaulo * Variants of various link-layer headers, with a one-byte direction
815190639Srpaulo * pseudo-header prepended - zero means "received by this host",
816190639Srpaulo * non-zero (any non-zero value) means "sent by this host" - as per
817190639Srpaulo * Will Barker <w.barker@zen.co.uk>.
818190639Srpaulo */
819313695Sdelphij#define DLT_PPP_WITH_DIR	204	/* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
820313695Sdelphij#define DLT_C_HDLC_WITH_DIR	205	/* Cisco HDLC */
821313695Sdelphij#define DLT_FRELAY_WITH_DIR	206	/* Frame Relay */
822313695Sdelphij#define DLT_LAPB_WITH_DIR	207	/* LAPB */
823190639Srpaulo
824190639Srpaulo/*
825190639Srpaulo * 208 is reserved for an as-yet-unspecified proprietary link-layer
826190639Srpaulo * type, as requested by Will Barker.
827190639Srpaulo */
828190639Srpaulo
829190639Srpaulo/*
830190639Srpaulo * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
831190639Srpaulo * <avn@pigeonpoint.com>.
832190639Srpaulo */
833313695Sdelphij#define DLT_IPMB_LINUX		209
834190639Srpaulo
835190639Srpaulo/*
836190639Srpaulo * FlexRay automotive bus - http://www.flexray.com/ - as requested
837190639Srpaulo * by Hannes Kaelber <hannes.kaelber@x2e.de>.
838190639Srpaulo */
839313695Sdelphij#define DLT_FLEXRAY		210
840190639Srpaulo
841190639Srpaulo/*
842190639Srpaulo * Media Oriented Systems Transport (MOST) bus for multimedia
843190639Srpaulo * transport - http://www.mostcooperation.com/ - as requested
844190639Srpaulo * by Hannes Kaelber <hannes.kaelber@x2e.de>.
845190639Srpaulo */
846313695Sdelphij#define DLT_MOST		211
847190639Srpaulo
848190639Srpaulo/*
849190639Srpaulo * Local Interconnect Network (LIN) bus for vehicle networks -
850190639Srpaulo * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
851190639Srpaulo * <hannes.kaelber@x2e.de>.
852190639Srpaulo */
853313695Sdelphij#define DLT_LIN			212
854190639Srpaulo
855190639Srpaulo/*
856190639Srpaulo * X2E-private data link type used for serial line capture,
857190639Srpaulo * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
858190639Srpaulo */
859313695Sdelphij#define DLT_X2E_SERIAL		213
860190639Srpaulo
861190639Srpaulo/*
862190639Srpaulo * X2E-private data link type used for the Xoraya data logger
863190639Srpaulo * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
864190639Srpaulo */
865313695Sdelphij#define DLT_X2E_XORAYA		214
866190639Srpaulo
867190639Srpaulo/*
868190639Srpaulo * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
869190639Srpaulo * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
870190639Srpaulo * of 0 as preamble, one octet of SFD, one octet of frame length+
871190639Srpaulo * reserved bit, and then the MAC-layer data, starting with the
872190639Srpaulo * frame control field).
873190639Srpaulo *
874190639Srpaulo * Requested by Max Filippov <jcmvbkbc@gmail.com>.
875190639Srpaulo */
876313695Sdelphij#define DLT_IEEE802_15_4_NONASK_PHY	215
877190639Srpaulo
878313695Sdelphij/*
879214517Srpaulo * David Gibson <david@gibson.dropbear.id.au> requested this for
880214517Srpaulo * captures from the Linux kernel /dev/input/eventN devices. This
881214517Srpaulo * is used to communicate keystrokes and mouse movements from the
882313695Sdelphij * Linux kernel to display systems, such as Xorg.
883214517Srpaulo */
884313695Sdelphij#define DLT_LINUX_EVDEV		216
885214517Srpaulo
886190639Srpaulo/*
887214517Srpaulo * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
888214517Srpaulo *
889214517Srpaulo * Requested by Harald Welte <laforge@gnumonks.org>.
890214517Srpaulo */
891313695Sdelphij#define DLT_GSMTAP_UM		217
892313695Sdelphij#define DLT_GSMTAP_ABIS		218
893214517Srpaulo
894214517Srpaulo/*
895214517Srpaulo * MPLS, with an MPLS label as the link-layer header.
896214517Srpaulo * Requested by Michele Marchetto <michele@openbsd.org> on behalf
897214517Srpaulo * of OpenBSD.
898214517Srpaulo */
899313695Sdelphij#define DLT_MPLS		219
900214517Srpaulo
901214517Srpaulo/*
902214517Srpaulo * USB packets, beginning with a Linux USB header, with the USB header
903214517Srpaulo * padded to 64 bytes; required for memory-mapped access.
904214517Srpaulo */
905313695Sdelphij#define DLT_USB_LINUX_MMAPPED	220
906214517Srpaulo
907214517Srpaulo/*
908214517Srpaulo * DECT packets, with a pseudo-header; requested by
909214517Srpaulo * Matthias Wenzel <tcpdump@mazzoo.de>.
910214517Srpaulo */
911313695Sdelphij#define DLT_DECT		221
912313695Sdelphij
913214517Srpaulo/*
914214517Srpaulo * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
915214517Srpaulo * Date: Mon, 11 May 2009 11:18:30 -0500
916214517Srpaulo *
917214517Srpaulo * DLT_AOS. We need it for AOS Space Data Link Protocol.
918214517Srpaulo *   I have already written dissectors for but need an OK from
919214517Srpaulo *   legal before I can submit a patch.
920214517Srpaulo *
921214517Srpaulo */
922313695Sdelphij#define DLT_AOS                 222
923214517Srpaulo
924214517Srpaulo/*
925214517Srpaulo * Wireless HART (Highway Addressable Remote Transducer)
926214517Srpaulo * From the HART Communication Foundation
927214517Srpaulo * IES/PAS 62591
928214517Srpaulo *
929214517Srpaulo * Requested by Sam Roberts <vieuxtech@gmail.com>.
930214517Srpaulo */
931313695Sdelphij#define DLT_WIHART		223
932214517Srpaulo
933214517Srpaulo/*
934214517Srpaulo * Fibre Channel FC-2 frames, beginning with a Frame_Header.
935214517Srpaulo * Requested by Kahou Lei <kahou82@gmail.com>.
936214517Srpaulo */
937313695Sdelphij#define DLT_FC_2		224
938214517Srpaulo
939214517Srpaulo/*
940214517Srpaulo * Fibre Channel FC-2 frames, beginning with an encoding of the
941214517Srpaulo * SOF, and ending with an encoding of the EOF.
942214517Srpaulo *
943214517Srpaulo * The encodings represent the frame delimiters as 4-byte sequences
944214517Srpaulo * representing the corresponding ordered sets, with K28.5
945214517Srpaulo * represented as 0xBC, and the D symbols as the corresponding
946214517Srpaulo * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
947214517Srpaulo * is represented as 0xBC 0xB5 0x55 0x55.
948214517Srpaulo *
949214517Srpaulo * Requested by Kahou Lei <kahou82@gmail.com>.
950214517Srpaulo */
951313695Sdelphij#define DLT_FC_2_WITH_FRAME_DELIMS	225
952313695Sdelphij
953214517Srpaulo/*
954214517Srpaulo * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
955214517Srpaulo *
956214517Srpaulo * The pseudo-header starts with a one-byte version number; for version 2,
957214517Srpaulo * the pseudo-header is:
958214517Srpaulo *
959214517Srpaulo * struct dl_ipnetinfo {
960335640Shselasky *     uint8_t   dli_version;
961335640Shselasky *     uint8_t   dli_family;
962335640Shselasky *     uint16_t  dli_htype;
963335640Shselasky *     uint32_t  dli_pktlen;
964335640Shselasky *     uint32_t  dli_ifindex;
965335640Shselasky *     uint32_t  dli_grifindex;
966335640Shselasky *     uint32_t  dli_zsrc;
967335640Shselasky *     uint32_t  dli_zdst;
968214517Srpaulo * };
969214517Srpaulo *
970214517Srpaulo * dli_version is 2 for the current version of the pseudo-header.
971214517Srpaulo *
972214517Srpaulo * dli_family is a Solaris address family value, so it's 2 for IPv4
973214517Srpaulo * and 26 for IPv6.
974214517Srpaulo *
975214517Srpaulo * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
976214517Srpaulo * packets, and 2 for packets arriving from another zone on the same
977214517Srpaulo * machine.
978214517Srpaulo *
979214517Srpaulo * dli_pktlen is the length of the packet data following the pseudo-header
980214517Srpaulo * (so the captured length minus dli_pktlen is the length of the
981214517Srpaulo * pseudo-header, assuming the entire pseudo-header was captured).
982214517Srpaulo *
983214517Srpaulo * dli_ifindex is the interface index of the interface on which the
984214517Srpaulo * packet arrived.
985214517Srpaulo *
986214517Srpaulo * dli_grifindex is the group interface index number (for IPMP interfaces).
987214517Srpaulo *
988214517Srpaulo * dli_zsrc is the zone identifier for the source of the packet.
989214517Srpaulo *
990214517Srpaulo * dli_zdst is the zone identifier for the destination of the packet.
991214517Srpaulo *
992214517Srpaulo * A zone number of 0 is the global zone; a zone number of 0xffffffff
993214517Srpaulo * means that the packet arrived from another host on the network, not
994214517Srpaulo * from another zone on the same machine.
995214517Srpaulo *
996214517Srpaulo * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
997214517Srpaulo * which of those it is.
998214517Srpaulo */
999313695Sdelphij#define DLT_IPNET		226
1000214517Srpaulo
1001214517Srpaulo/*
1002214517Srpaulo * CAN (Controller Area Network) frames, with a pseudo-header as supplied
1003313695Sdelphij * by Linux SocketCAN, and with multi-byte numerical fields in that header
1004313695Sdelphij * in big-endian byte order.
1005214517Srpaulo *
1006313695Sdelphij * See Documentation/networking/can.txt in the Linux source.
1007313695Sdelphij *
1008214517Srpaulo * Requested by Felix Obenhuber <felix@obenhuber.de>.
1009214517Srpaulo */
1010313695Sdelphij#define DLT_CAN_SOCKETCAN	227
1011214517Srpaulo
1012214517Srpaulo/*
1013214517Srpaulo * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
1014214517Srpaulo * whether it's v4 or v6.  Requested by Darren Reed <Darren.Reed@Sun.COM>.
1015214517Srpaulo */
1016235425Sdelphij#define DLT_IPV4		228
1017235425Sdelphij#define DLT_IPV6		229
1018214517Srpaulo
1019214517Srpaulo/*
1020235425Sdelphij * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
1021235425Sdelphij * nothing), and with no FCS at the end of the frame; requested by
1022235425Sdelphij * Jon Smirl <jonsmirl@gmail.com>.
1023235425Sdelphij */
1024235425Sdelphij#define DLT_IEEE802_15_4_NOFCS	230
1025235425Sdelphij
1026235425Sdelphij/*
1027235425Sdelphij * Raw D-Bus:
1028235425Sdelphij *
1029235425Sdelphij *	http://www.freedesktop.org/wiki/Software/dbus
1030235425Sdelphij *
1031235425Sdelphij * messages:
1032235425Sdelphij *
1033235425Sdelphij *	http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
1034235425Sdelphij *
1035235425Sdelphij * starting with the endianness flag, followed by the message type, etc.,
1036235425Sdelphij * but without the authentication handshake before the message sequence:
1037235425Sdelphij *
1038235425Sdelphij *	http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
1039235425Sdelphij *
1040235425Sdelphij * Requested by Martin Vidner <martin@vidner.net>.
1041235425Sdelphij */
1042235425Sdelphij#define DLT_DBUS		231
1043235425Sdelphij
1044235425Sdelphij/*
1045235425Sdelphij * Juniper-private data link type, as per request from
1046235425Sdelphij * Hannes Gredler <hannes@juniper.net>.
1047235425Sdelphij */
1048235425Sdelphij#define DLT_JUNIPER_VS			232
1049235425Sdelphij#define DLT_JUNIPER_SRX_E2E		233
1050235425Sdelphij#define DLT_JUNIPER_FIBRECHANNEL	234
1051235425Sdelphij
1052235425Sdelphij/*
1053235425Sdelphij * DVB-CI (DVB Common Interface for communication between a PC Card
1054235425Sdelphij * module and a DVB receiver).  See
1055235425Sdelphij *
1056235425Sdelphij *	http://www.kaiser.cx/pcap-dvbci.html
1057235425Sdelphij *
1058235425Sdelphij * for the specification.
1059235425Sdelphij *
1060235425Sdelphij * Requested by Martin Kaiser <martin@kaiser.cx>.
1061235425Sdelphij */
1062235425Sdelphij#define DLT_DVB_CI		235
1063235425Sdelphij
1064235425Sdelphij/*
1065235425Sdelphij * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
1066235425Sdelphij * *not* the same as, 27.010).  Requested by Hans-Christoph Schemmel
1067235425Sdelphij * <hans-christoph.schemmel@cinterion.com>.
1068235425Sdelphij */
1069235425Sdelphij#define DLT_MUX27010		236
1070235425Sdelphij
1071235425Sdelphij/*
1072235425Sdelphij * STANAG 5066 D_PDUs.  Requested by M. Baris Demiray
1073235425Sdelphij * <barisdemiray@gmail.com>.
1074235425Sdelphij */
1075235425Sdelphij#define DLT_STANAG_5066_D_PDU	237
1076235425Sdelphij
1077235425Sdelphij/*
1078235425Sdelphij * Juniper-private data link type, as per request from
1079235425Sdelphij * Hannes Gredler <hannes@juniper.net>.
1080235425Sdelphij */
1081235425Sdelphij#define DLT_JUNIPER_ATM_CEMIC	238
1082235425Sdelphij
1083235425Sdelphij/*
1084313695Sdelphij * NetFilter LOG messages
1085235425Sdelphij * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
1086235425Sdelphij *
1087235425Sdelphij * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
1088235425Sdelphij */
1089235425Sdelphij#define DLT_NFLOG		239
1090235425Sdelphij
1091235425Sdelphij/*
1092235425Sdelphij * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1093235425Sdelphij * for Ethernet packets with a 4-byte pseudo-header and always
1094235425Sdelphij * with the payload including the FCS, as supplied by their
1095235425Sdelphij * netANALYZER hardware and software.
1096235425Sdelphij *
1097235425Sdelphij * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
1098235425Sdelphij */
1099235425Sdelphij#define DLT_NETANALYZER		240
1100235425Sdelphij
1101235425Sdelphij/*
1102235425Sdelphij * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1103235425Sdelphij * for Ethernet packets with a 4-byte pseudo-header and FCS and
1104235425Sdelphij * with the Ethernet header preceded by 7 bytes of preamble and
1105235425Sdelphij * 1 byte of SFD, as supplied by their netANALYZER hardware and
1106235425Sdelphij * software.
1107235425Sdelphij *
1108235425Sdelphij * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
1109235425Sdelphij */
1110235425Sdelphij#define DLT_NETANALYZER_TRANSPARENT	241
1111235425Sdelphij
1112235425Sdelphij/*
1113276768Sdelphij * IP-over-InfiniBand, as specified by RFC 4391.
1114235425Sdelphij *
1115235425Sdelphij * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
1116235425Sdelphij */
1117235425Sdelphij#define DLT_IPOIB		242
1118235425Sdelphij
1119241231Sdelphij/*
1120241231Sdelphij * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
1121241231Sdelphij *
1122241231Sdelphij * Requested by Guy Martin <gmsoft@tuxicoman.be>.
1123241231Sdelphij */
1124241231Sdelphij#define DLT_MPEG_2_TS		243
1125235425Sdelphij
1126235425Sdelphij/*
1127241231Sdelphij * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
1128241231Sdelphij * used by their ng40 protocol tester.
1129241231Sdelphij *
1130241231Sdelphij * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
1131241231Sdelphij */
1132241231Sdelphij#define DLT_NG40		244
1133241231Sdelphij
1134241231Sdelphij/*
1135241231Sdelphij * Pseudo-header giving adapter number and flags, followed by an NFC
1136241231Sdelphij * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
1137241231Sdelphij * as specified by NFC Forum Logical Link Control Protocol Technical
1138241231Sdelphij * Specification LLCP 1.1.
1139241231Sdelphij *
1140241231Sdelphij * Requested by Mike Wakerly <mikey@google.com>.
1141241231Sdelphij */
1142241231Sdelphij#define DLT_NFC_LLCP		245
1143241231Sdelphij
1144241231Sdelphij/*
1145313695Sdelphij * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
1146241231Sdelphij *
1147241231Sdelphij * DLT_PFSYNC has different values on different platforms, and all of
1148241231Sdelphij * them collide with something used elsewhere.  On platforms that
1149313695Sdelphij * don't already define it, define it as 246.
1150241231Sdelphij */
1151241231Sdelphij#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
1152241231Sdelphij#define DLT_PFSYNC		246
1153241231Sdelphij#endif
1154241231Sdelphij
1155276768Sdelphij/*
1156276768Sdelphij * Raw InfiniBand packets, starting with the Local Routing Header.
1157276768Sdelphij *
1158276768Sdelphij * Requested by Oren Kladnitsky <orenk@mellanox.com>.
1159276768Sdelphij */
1160276768Sdelphij#define DLT_INFINIBAND		247
1161241231Sdelphij
1162241231Sdelphij/*
1163276768Sdelphij * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
1164276768Sdelphij *
1165276768Sdelphij * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
1166276768Sdelphij */
1167276768Sdelphij#define DLT_SCTP		248
1168276768Sdelphij
1169276768Sdelphij/*
1170276768Sdelphij * USB packets, beginning with a USBPcap header.
1171276768Sdelphij *
1172276768Sdelphij * Requested by Tomasz Mon <desowin@gmail.com>
1173276768Sdelphij */
1174276768Sdelphij#define DLT_USBPCAP		249
1175276768Sdelphij
1176276768Sdelphij/*
1177276768Sdelphij * Schweitzer Engineering Laboratories "RTAC" product serial-line
1178276768Sdelphij * packets.
1179276768Sdelphij *
1180276768Sdelphij * Requested by Chris Bontje <chris_bontje@selinc.com>.
1181276768Sdelphij */
1182276768Sdelphij#define DLT_RTAC_SERIAL		250
1183276768Sdelphij
1184276768Sdelphij/*
1185276768Sdelphij * Bluetooth Low Energy air interface link-layer packets.
1186276768Sdelphij *
1187276768Sdelphij * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
1188276768Sdelphij */
1189276768Sdelphij#define DLT_BLUETOOTH_LE_LL	251
1190276768Sdelphij
1191276768Sdelphij/*
1192276768Sdelphij * DLT type for upper-protocol layer PDU saves from wireshark.
1193313695Sdelphij *
1194276768Sdelphij * the actual contents are determined by two TAGs stored with each
1195276768Sdelphij * packet:
1196276768Sdelphij *   EXP_PDU_TAG_LINKTYPE          the link type (LINKTYPE_ value) of the
1197276768Sdelphij *				   original packet.
1198276768Sdelphij *
1199276768Sdelphij *   EXP_PDU_TAG_PROTO_NAME        the name of the wireshark dissector
1200276768Sdelphij * 				   that can make sense of the data stored.
1201276768Sdelphij */
1202276768Sdelphij#define DLT_WIRESHARK_UPPER_PDU	252
1203276768Sdelphij
1204276768Sdelphij/*
1205276768Sdelphij * DLT type for the netlink protocol (nlmon devices).
1206276768Sdelphij */
1207276768Sdelphij#define DLT_NETLINK		253
1208276768Sdelphij
1209276768Sdelphij/*
1210276768Sdelphij * Bluetooth Linux Monitor headers for the BlueZ stack.
1211276768Sdelphij */
1212276768Sdelphij#define DLT_BLUETOOTH_LINUX_MONITOR	254
1213276768Sdelphij
1214276768Sdelphij/*
1215276768Sdelphij * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
1216276768Sdelphij * captured by Ubertooth.
1217276768Sdelphij */
1218276768Sdelphij#define DLT_BLUETOOTH_BREDR_BB	255
1219276768Sdelphij
1220276768Sdelphij/*
1221276768Sdelphij * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
1222276768Sdelphij */
1223276768Sdelphij#define DLT_BLUETOOTH_LE_LL_WITH_PHDR	256
1224276768Sdelphij
1225276768Sdelphij/*
1226276768Sdelphij * PROFIBUS data link layer.
1227276768Sdelphij */
1228276768Sdelphij#define DLT_PROFIBUS_DL		257
1229276768Sdelphij
1230276768Sdelphij/*
1231276768Sdelphij * Apple's DLT_PKTAP headers.
1232276768Sdelphij *
1233276768Sdelphij * Sadly, the folks at Apple either had no clue that the DLT_USERn values
1234276768Sdelphij * are for internal use within an organization and partners only, and
1235276768Sdelphij * didn't know that the right way to get a link-layer header type is to
1236276768Sdelphij * ask tcpdump.org for one, or knew and didn't care, so they just
1237276768Sdelphij * used DLT_USER2, which causes problems for everything except for
1238276768Sdelphij * their version of tcpdump.
1239276768Sdelphij *
1240276768Sdelphij * So I'll just give them one; hopefully this will show up in a
1241276768Sdelphij * libpcap release in time for them to get this into 10.10 Big Sur
1242276768Sdelphij * or whatever Mavericks' successor is called.  LINKTYPE_PKTAP
1243335640Shselasky * will be 258 *even on macOS*; that is *intentional*, so that
1244276768Sdelphij * PKTAP files look the same on *all* OSes (different OSes can have
1245276768Sdelphij * different numerical values for a given DLT_, but *MUST NOT* have
1246276768Sdelphij * different values for what goes in a file, as files can be moved
1247276768Sdelphij * between OSes!).
1248276768Sdelphij *
1249276768Sdelphij * When capturing, on a system with a Darwin-based OS, on a device
1250276768Sdelphij * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this
1251276768Sdelphij * version of libpcap, the DLT_ value for the pcap_t  will be DLT_PKTAP,
1252276768Sdelphij * and that will continue to be DLT_USER2 on Darwin-based OSes. That way,
1253276768Sdelphij * binary compatibility with Mavericks is preserved for programs using
1254276768Sdelphij * this version of libpcap.  This does mean that if you were using
1255335640Shselasky * DLT_USER2 for some capture device on macOS, you can't do so with
1256276768Sdelphij * this version of libpcap, just as you can't with Apple's libpcap -
1257335640Shselasky * on macOS, they define DLT_PKTAP to be DLT_USER2, so programs won't
1258276768Sdelphij * be able to distinguish between PKTAP and whatever you were using
1259276768Sdelphij * DLT_USER2 for.
1260276768Sdelphij *
1261276768Sdelphij * If the program saves the capture to a file using this version of
1262276768Sdelphij * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be
1263276768Sdelphij * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes.
1264276768Sdelphij * That way, the file will *not* be a DLT_USER2 file.  That means
1265276768Sdelphij * that the latest version of tcpdump, when built with this version
1266276768Sdelphij * of libpcap, and sufficiently recent versions of Wireshark will
1267276768Sdelphij * be able to read those files and interpret them correctly; however,
1268276768Sdelphij * Apple's version of tcpdump in OS X 10.9 won't be able to handle
1269276768Sdelphij * them.  (Hopefully, Apple will pick up this version of libpcap,
1270276768Sdelphij * and the corresponding version of tcpdump, so that tcpdump will
1271276768Sdelphij * be able to handle the old LINKTYPE_USER2 captures *and* the new
1272276768Sdelphij * LINKTYPE_PKTAP captures.)
1273276768Sdelphij */
1274276768Sdelphij#ifdef __APPLE__
1275276768Sdelphij#define DLT_PKTAP	DLT_USER2
1276276768Sdelphij#else
1277276768Sdelphij#define DLT_PKTAP	258
1278276768Sdelphij#endif
1279276768Sdelphij
1280276768Sdelphij/*
1281276768Sdelphij * Ethernet packets preceded by a header giving the last 6 octets
1282276768Sdelphij * of the preamble specified by 802.3-2012 Clause 65, section
1283276768Sdelphij * 65.1.3.2 "Transmit".
1284276768Sdelphij */
1285276768Sdelphij#define DLT_EPON	259
1286276768Sdelphij
1287276768Sdelphij/*
1288276768Sdelphij * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
1289276768Sdelphij * in the PICMG HPM.2 specification.
1290276768Sdelphij */
1291276768Sdelphij#define DLT_IPMI_HPM_2	260
1292276768Sdelphij
1293276768Sdelphij/*
1294313695Sdelphij * per  Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
1295190639Srpaulo */
1296313695Sdelphij#define DLT_ZWAVE_R1_R2  261
1297313695Sdelphij#define DLT_ZWAVE_R3     262
1298190639Srpaulo
1299190639Srpaulo/*
1300313695Sdelphij * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
1301313695Sdelphij * Digital Lighting Management room bus serial protocol captures.
13021541Srgrimes */
1303313695Sdelphij#define DLT_WATTSTOPPER_DLM     263
1304276768Sdelphij
1305276768Sdelphij/*
1306313695Sdelphij * ISO 14443 contactless smart card messages.
1307276768Sdelphij */
1308313695Sdelphij#define DLT_ISO_14443	264
1309276768Sdelphij
13101541Srgrimes/*
1311313695Sdelphij * Radio data system (RDS) groups.  IEC 62106.
1312313695Sdelphij * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
13131541Srgrimes */
1314313695Sdelphij#define DLT_RDS		265
13151541Srgrimes
13161541Srgrimes/*
1317335640Shselasky * USB packets, beginning with a Darwin (macOS, etc.) header.
1318335640Shselasky */
1319335640Shselasky#define DLT_USB_DARWIN	266
1320335640Shselasky
1321335640Shselasky/*
1322335640Shselasky * OpenBSD DLT_OPENFLOW.
1323335640Shselasky */
1324335640Shselasky#define DLT_OPENFLOW	267
1325335640Shselasky
1326335640Shselasky/*
1327335640Shselasky * SDLC frames containing SNA PDUs.
1328335640Shselasky */
1329335640Shselasky#define DLT_SDLC	268
1330335640Shselasky
1331335640Shselasky/*
1332335640Shselasky * per "Selvig, Bjorn" <b.selvig@ti.com> used for
1333335640Shselasky * TI protocol sniffer.
1334335640Shselasky */
1335335640Shselasky#define DLT_TI_LLN_SNIFFER	269
1336335640Shselasky
1337335640Shselasky/*
1338335640Shselasky * per: Erik de Jong <erikdejong at gmail.com> for
1339335640Shselasky *   https://github.com/eriknl/LoRaTap/releases/tag/v0.1
1340335640Shselasky */
1341335640Shselasky#define DLT_LORATAP             270
1342335640Shselasky
1343335640Shselasky/*
1344335640Shselasky * per: Stefanha at gmail.com for
1345335640Shselasky *   http://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html
1346335640Shselasky * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h
1347335640Shselasky * for: http://qemu-project.org/Features/VirtioVsock
1348335640Shselasky */
1349335640Shselasky#define DLT_VSOCK               271
1350335640Shselasky
1351335640Shselasky/*
1352335640Shselasky * Nordic Semiconductor Bluetooth LE sniffer.
1353335640Shselasky */
1354335640Shselasky#define DLT_NORDIC_BLE		272
1355335640Shselasky
1356335640Shselasky/*
1357335640Shselasky * Excentis DOCSIS 3.1 RF sniffer (XRA-31)
1358335640Shselasky *   per: bruno.verstuyft at excentis.com
1359335640Shselasky *        http://www.xra31.com/xra-header
1360335640Shselasky */
1361335640Shselasky#define DLT_DOCSIS31_XRA31	273
1362335640Shselasky
1363335640Shselasky/*
1364335640Shselasky * mPackets, as specified by IEEE 802.3br Figure 99-4, starting
1365335640Shselasky * with the preamble and always ending with a CRC field.
1366335640Shselasky */
1367335640Shselasky#define DLT_ETHERNET_MPACKET	274
1368335640Shselasky
1369335640Shselasky/*
1370335640Shselasky * DisplayPort AUX channel monitoring data as specified by VESA
1371335640Shselasky * DisplayPort(DP) Standard preceeded by a pseudo-header.
1372335640Shselasky *    per dirk.eibach at gdsys.cc
1373335640Shselasky */
1374335640Shselasky#define DLT_DISPLAYPORT_AUX	275
1375335640Shselasky
1376335640Shselasky/*
1377356341Scy * Linux cooked sockets v2.
1378356341Scy */
1379356341Scy#define DLT_LINUX_SLL2	276
1380356341Scy
1381356341Scy/*
1382313695Sdelphij * In case the code that includes this file (directly or indirectly)
1383313695Sdelphij * has also included OS files that happen to define DLT_MATCHING_MAX,
1384313695Sdelphij * with a different value (perhaps because that OS hasn't picked up
1385313695Sdelphij * the latest version of our DLT definitions), we undefine the
1386313695Sdelphij * previous value of DLT_MATCHING_MAX.
13871541Srgrimes */
1388313695Sdelphij#ifdef DLT_MATCHING_MAX
1389313695Sdelphij#undef DLT_MATCHING_MAX
1390177548Scsjp#endif
1391356341Scy#define DLT_MATCHING_MAX	276	/* highest value in the "matching" range */
1392177548Scsjp
1393159180Scsjp/*
1394313695Sdelphij * DLT and savefile link type values are split into a class and
1395313695Sdelphij * a member of that class.  A class value of 0 indicates a regular
1396313695Sdelphij * DLT_/LINKTYPE_ value.
1397177548Scsjp */
1398313695Sdelphij#define DLT_CLASS(x)		((x) & 0x03ff0000)
1399177548Scsjp
1400177548Scsjp/*
1401313695Sdelphij * NetBSD-specific generic "raw" link type.  The class value indicates
1402313695Sdelphij * that this is the generic raw type, and the lower 16 bits are the
1403313695Sdelphij * address family we're dealing with.  Those values are NetBSD-specific;
1404313695Sdelphij * do not assume that they correspond to AF_ values for your operating
1405313695Sdelphij * system.
1406159180Scsjp */
1407313695Sdelphij#define	DLT_CLASS_NETBSD_RAWAF	0x02240000
1408313695Sdelphij#define	DLT_NETBSD_RAWAF(af)	(DLT_CLASS_NETBSD_RAWAF | (af))
1409313695Sdelphij#define	DLT_NETBSD_RAWAF_AF(x)	((x) & 0x0000ffff)
1410313695Sdelphij#define	DLT_IS_NETBSD_RAWAF(x)	(DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
1411281797Smarkj
1412313695Sdelphij#endif /* !_NET_DLT_H_ */
1413