xref: /freebsd/sys/net/dlt.h (revision 57e22627f9459b9dfd6043b32e02ecfcf205e176)
1ada6f083SXin LI /*-
2ada6f083SXin LI  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3ada6f083SXin LI  *	The Regents of the University of California.  All rights reserved.
4ada6f083SXin LI  *
5ada6f083SXin LI  * This code is derived from the Stanford/CMU enet packet filter,
6ada6f083SXin LI  * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7ada6f083SXin LI  * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8ada6f083SXin LI  * Berkeley Laboratory.
9ada6f083SXin LI  *
10ada6f083SXin LI  * Redistribution and use in source and binary forms, with or without
11ada6f083SXin LI  * modification, are permitted provided that the following conditions
12ada6f083SXin LI  * are met:
13ada6f083SXin LI  * 1. Redistributions of source code must retain the above copyright
14ada6f083SXin LI  *    notice, this list of conditions and the following disclaimer.
15ada6f083SXin LI  * 2. Redistributions in binary form must reproduce the above copyright
16ada6f083SXin LI  *    notice, this list of conditions and the following disclaimer in the
17ada6f083SXin LI  *    documentation and/or other materials provided with the distribution.
18b86fcc14SXin LI  * 3. Neither the name of the University nor the names of its contributors
19ada6f083SXin LI  *    may be used to endorse or promote products derived from this software
20ada6f083SXin LI  *    without specific prior written permission.
21ada6f083SXin LI  *
22ada6f083SXin LI  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23ada6f083SXin LI  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24ada6f083SXin LI  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25ada6f083SXin LI  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26ada6f083SXin LI  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27ada6f083SXin LI  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28ada6f083SXin LI  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29ada6f083SXin LI  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30ada6f083SXin LI  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31ada6f083SXin LI  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32ada6f083SXin LI  * SUCH DAMAGE.
33ada6f083SXin LI  *
34ada6f083SXin LI  *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
35ada6f083SXin LI  *
36ada6f083SXin LI  * $FreeBSD$
37ada6f083SXin LI  */
38ada6f083SXin LI 
39ada6f083SXin LI #ifndef _NET_DLT_H_
40ada6f083SXin LI #define _NET_DLT_H_
41ada6f083SXin LI 
42ada6f083SXin LI /*
43ada6f083SXin LI  * Link-layer header type codes.
44ada6f083SXin LI  *
45ada6f083SXin LI  * Do *NOT* add new values to this list without asking
46ada6f083SXin LI  * "tcpdump-workers@lists.tcpdump.org" for a value.  Otherwise, you run
47ada6f083SXin LI  * the risk of using a value that's already being used for some other
48ada6f083SXin LI  * purpose, and of having tools that read libpcap-format captures not
49ada6f083SXin LI  * being able to handle captures with your new DLT_ value, with no hope
50ada6f083SXin LI  * that they will ever be changed to do so (as that would destroy their
51ada6f083SXin LI  * ability to read captures using that value for that other purpose).
52ada6f083SXin LI  *
53ada6f083SXin LI  * See
54ada6f083SXin LI  *
55ada6f083SXin LI  *	http://www.tcpdump.org/linktypes.html
56ada6f083SXin LI  *
57ada6f083SXin LI  * for detailed descriptions of some of these link-layer header types.
58ada6f083SXin LI  */
59ada6f083SXin LI 
60ada6f083SXin LI /*
61ada6f083SXin LI  * These are the types that are the same on all platforms, and that
62ada6f083SXin LI  * have been defined by <net/bpf.h> for ages.
63ada6f083SXin LI  */
64ada6f083SXin LI #define DLT_NULL	0	/* BSD loopback encapsulation */
65ada6f083SXin LI #define DLT_EN10MB	1	/* Ethernet (10Mb) */
66ada6f083SXin LI #define DLT_EN3MB	2	/* Experimental Ethernet (3Mb) */
67ada6f083SXin LI #define DLT_AX25	3	/* Amateur Radio AX.25 */
68ada6f083SXin LI #define DLT_PRONET	4	/* Proteon ProNET Token Ring */
69ada6f083SXin LI #define DLT_CHAOS	5	/* Chaos */
70ada6f083SXin LI #define DLT_IEEE802	6	/* 802.5 Token Ring */
71ada6f083SXin LI #define DLT_ARCNET	7	/* ARCNET, with BSD-style header */
72ada6f083SXin LI #define DLT_SLIP	8	/* Serial Line IP */
73ada6f083SXin LI #define DLT_PPP		9	/* Point-to-point Protocol */
74ada6f083SXin LI #define DLT_FDDI	10	/* FDDI */
75ada6f083SXin LI 
76ada6f083SXin LI /*
77ada6f083SXin LI  * These are types that are different on some platforms, and that
78ada6f083SXin LI  * have been defined by <net/bpf.h> for ages.  We use #ifdefs to
79ada6f083SXin LI  * detect the BSDs that define them differently from the traditional
80ada6f083SXin LI  * libpcap <net/bpf.h>
81ada6f083SXin LI  *
82ada6f083SXin LI  * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
83ada6f083SXin LI  * but I don't know what the right #define is for BSD/OS.
84ada6f083SXin LI  */
85ada6f083SXin LI #define DLT_ATM_RFC1483	11	/* LLC-encapsulated ATM */
86ada6f083SXin LI 
87ada6f083SXin LI #ifdef __OpenBSD__
88ada6f083SXin LI #define DLT_RAW		14	/* raw IP */
89ada6f083SXin LI #else
90ada6f083SXin LI #define DLT_RAW		12	/* raw IP */
91ada6f083SXin LI #endif
92ada6f083SXin LI 
93ada6f083SXin LI /*
94ada6f083SXin LI  * Given that the only OS that currently generates BSD/OS SLIP or PPP
95ada6f083SXin LI  * is, well, BSD/OS, arguably everybody should have chosen its values
96ada6f083SXin LI  * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
97ada6f083SXin LI  * didn't.  So it goes.
98ada6f083SXin LI  */
99ada6f083SXin LI #if defined(__NetBSD__) || defined(__FreeBSD__)
100ada6f083SXin LI #ifndef DLT_SLIP_BSDOS
101ada6f083SXin LI #define DLT_SLIP_BSDOS	13	/* BSD/OS Serial Line IP */
102ada6f083SXin LI #define DLT_PPP_BSDOS	14	/* BSD/OS Point-to-point Protocol */
103ada6f083SXin LI #endif
104ada6f083SXin LI #else
105ada6f083SXin LI #define DLT_SLIP_BSDOS	15	/* BSD/OS Serial Line IP */
106ada6f083SXin LI #define DLT_PPP_BSDOS	16	/* BSD/OS Point-to-point Protocol */
107ada6f083SXin LI #endif
108ada6f083SXin LI 
109ada6f083SXin LI /*
110ada6f083SXin LI  * 17 was used for DLT_PFLOG in OpenBSD; it no longer is.
111ada6f083SXin LI  *
112ada6f083SXin LI  * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG
113ada6f083SXin LI  * as 117 so that pflog captures would use a link-layer header type
114ada6f083SXin LI  * value that didn't collide with any other values.  On all
115ada6f083SXin LI  * platforms other than OpenBSD, we defined DLT_PFLOG as 117,
116ada6f083SXin LI  * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG.
117ada6f083SXin LI  *
118ada6f083SXin LI  * OpenBSD eventually switched to using 117 for DLT_PFLOG as well.
119ada6f083SXin LI  *
120ada6f083SXin LI  * Don't use 17 for anything else.
121ada6f083SXin LI  */
122ada6f083SXin LI 
123ada6f083SXin LI /*
124ada6f083SXin LI  * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and
1255fd1ea08SHans Petter Selasky  * macOS; don't use it for anything else.  (FreeBSD uses 121, which
1265fd1ea08SHans Petter Selasky  * collides with DLT_HHDLC, even though it doesn't use 18 for
1275fd1ea08SHans Petter Selasky  * anything and doesn't appear to have ever used it for anything.)
128ada6f083SXin LI  *
129ada6f083SXin LI  * We define it as 18 on those platforms; it is, unfortunately, used
130ada6f083SXin LI  * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC
131ada6f083SXin LI  * in general.  As the packet format for it, like that for
132ada6f083SXin LI  * DLT_PFLOG, is not only OS-dependent but OS-version-dependent,
133ada6f083SXin LI  * we don't support printing it in tcpdump except on OSes that
134ada6f083SXin LI  * have the relevant header files, so it's not that useful on
135ada6f083SXin LI  * other platforms.
136ada6f083SXin LI  */
137ada6f083SXin LI #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
138ada6f083SXin LI #define DLT_PFSYNC	18
139ada6f083SXin LI #endif
140ada6f083SXin LI 
141ada6f083SXin LI #define DLT_ATM_CLIP	19	/* Linux Classical-IP over ATM */
142ada6f083SXin LI 
143ada6f083SXin LI /*
144ada6f083SXin LI  * Apparently Redback uses this for its SmartEdge 400/800.  I hope
145ada6f083SXin LI  * nobody else decided to use it, too.
146ada6f083SXin LI  */
147ada6f083SXin LI #define DLT_REDBACK_SMARTEDGE	32
148ada6f083SXin LI 
149ada6f083SXin LI /*
150ada6f083SXin LI  * These values are defined by NetBSD; other platforms should refrain from
151ada6f083SXin LI  * using them for other purposes, so that NetBSD savefiles with link
152ada6f083SXin LI  * types of 50 or 51 can be read as this type on all platforms.
153ada6f083SXin LI  */
154ada6f083SXin LI #define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
155ada6f083SXin LI #define DLT_PPP_ETHER	51	/* PPP over Ethernet */
156ada6f083SXin LI 
157ada6f083SXin LI /*
158ada6f083SXin LI  * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
159ada6f083SXin LI  * a link-layer type of 99 for the tcpdump it supplies.  The link-layer
160ada6f083SXin LI  * header has 6 bytes of unknown data, something that appears to be an
161ada6f083SXin LI  * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
162ada6f083SXin LI  * I've seen.
163ada6f083SXin LI  */
164ada6f083SXin LI #define DLT_SYMANTEC_FIREWALL	99
165ada6f083SXin LI 
166ada6f083SXin LI /*
167ada6f083SXin LI  * Values between 100 and 103 are used in capture file headers as
168ada6f083SXin LI  * link-layer header type LINKTYPE_ values corresponding to DLT_ types
169ada6f083SXin LI  * that differ between platforms; don't use those values for new DLT_
170ada6f083SXin LI  * new types.
171ada6f083SXin LI  */
172ada6f083SXin LI 
173ada6f083SXin LI /*
174ada6f083SXin LI  * Values starting with 104 are used for newly-assigned link-layer
175ada6f083SXin LI  * header type values; for those link-layer header types, the DLT_
176ada6f083SXin LI  * value returned by pcap_datalink() and passed to pcap_open_dead(),
177ada6f083SXin LI  * and the LINKTYPE_ value that appears in capture files, are the
178ada6f083SXin LI  * same.
179ada6f083SXin LI  *
180ada6f083SXin LI  * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
181ada6f083SXin LI  * the highest such value.
182ada6f083SXin LI  */
183ada6f083SXin LI #define DLT_MATCHING_MIN	104
184ada6f083SXin LI 
185ada6f083SXin LI /*
186ada6f083SXin LI  * This value was defined by libpcap 0.5; platforms that have defined
187ada6f083SXin LI  * it with a different value should define it here with that value -
188ada6f083SXin LI  * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
189ada6f083SXin LI  * whatever value that happens to be, so programs will correctly
190ada6f083SXin LI  * handle files with that link type regardless of the value of
191ada6f083SXin LI  * DLT_C_HDLC.
192ada6f083SXin LI  *
193ada6f083SXin LI  * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
194ada6f083SXin LI  * compatibility with programs written for BSD/OS.
195ada6f083SXin LI  *
196ada6f083SXin LI  * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
197ada6f083SXin LI  * for source compatibility with programs written for libpcap 0.5.
198ada6f083SXin LI  */
199ada6f083SXin LI #define DLT_C_HDLC	104	/* Cisco HDLC */
200ada6f083SXin LI #define DLT_CHDLC	DLT_C_HDLC
201ada6f083SXin LI 
202ada6f083SXin LI #define DLT_IEEE802_11	105	/* IEEE 802.11 wireless */
203ada6f083SXin LI 
204ada6f083SXin LI /*
205ada6f083SXin LI  * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
206ada6f083SXin LI  * except when it isn't.  (I.e., sometimes it's just raw IP, and
207ada6f083SXin LI  * sometimes it isn't.)  We currently handle it as DLT_LINUX_SLL,
208ada6f083SXin LI  * so that we don't have to worry about the link-layer header.)
209ada6f083SXin LI  */
210ada6f083SXin LI 
211ada6f083SXin LI /*
212ada6f083SXin LI  * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
213ada6f083SXin LI  * with other values.
214ada6f083SXin LI  * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
215ada6f083SXin LI  * (DLCI, etc.).
216ada6f083SXin LI  */
217ada6f083SXin LI #define DLT_FRELAY	107
218ada6f083SXin LI 
219ada6f083SXin LI /*
220ada6f083SXin LI  * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
221ada6f083SXin LI  * that the AF_ type in the link-layer header is in network byte order.
222ada6f083SXin LI  *
223ada6f083SXin LI  * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
224ada6f083SXin LI  * we don't use 12 for it in OSes other than OpenBSD.
225ada6f083SXin LI  */
226ada6f083SXin LI #ifdef __OpenBSD__
227ada6f083SXin LI #define DLT_LOOP	12
228ada6f083SXin LI #else
229ada6f083SXin LI #define DLT_LOOP	108
230ada6f083SXin LI #endif
231ada6f083SXin LI 
232ada6f083SXin LI /*
233ada6f083SXin LI  * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
234ada6f083SXin LI  * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
235ada6f083SXin LI  * than OpenBSD.
236ada6f083SXin LI  */
237ada6f083SXin LI #ifdef __OpenBSD__
238ada6f083SXin LI #define DLT_ENC		13
239ada6f083SXin LI #else
240ada6f083SXin LI #define DLT_ENC		109
241ada6f083SXin LI #endif
242ada6f083SXin LI 
243ada6f083SXin LI /*
244ada6f083SXin LI  * Values between 110 and 112 are reserved for use in capture file headers
245ada6f083SXin LI  * as link-layer types corresponding to DLT_ types that might differ
246ada6f083SXin LI  * between platforms; don't use those values for new DLT_ types
247ada6f083SXin LI  * other than the corresponding DLT_ types.
248ada6f083SXin LI  */
249ada6f083SXin LI 
250ada6f083SXin LI /*
251ada6f083SXin LI  * This is for Linux cooked sockets.
252ada6f083SXin LI  */
253ada6f083SXin LI #define DLT_LINUX_SLL	113
254ada6f083SXin LI 
255ada6f083SXin LI /*
256ada6f083SXin LI  * Apple LocalTalk hardware.
257ada6f083SXin LI  */
258ada6f083SXin LI #define DLT_LTALK	114
259ada6f083SXin LI 
260ada6f083SXin LI /*
261ada6f083SXin LI  * Acorn Econet.
262ada6f083SXin LI  */
263ada6f083SXin LI #define DLT_ECONET	115
264ada6f083SXin LI 
265ada6f083SXin LI /*
266ada6f083SXin LI  * Reserved for use with OpenBSD ipfilter.
267ada6f083SXin LI  */
268ada6f083SXin LI #define DLT_IPFILTER	116
269ada6f083SXin LI 
270ada6f083SXin LI /*
271ada6f083SXin LI  * OpenBSD DLT_PFLOG.
272ada6f083SXin LI  */
273ada6f083SXin LI #define DLT_PFLOG	117
274ada6f083SXin LI 
275ada6f083SXin LI /*
276ada6f083SXin LI  * Registered for Cisco-internal use.
277ada6f083SXin LI  */
278ada6f083SXin LI #define DLT_CISCO_IOS	118
279ada6f083SXin LI 
280ada6f083SXin LI /*
281ada6f083SXin LI  * For 802.11 cards using the Prism II chips, with a link-layer
282ada6f083SXin LI  * header including Prism monitor mode information plus an 802.11
283ada6f083SXin LI  * header.
284ada6f083SXin LI  */
285ada6f083SXin LI #define DLT_PRISM_HEADER	119
286ada6f083SXin LI 
287ada6f083SXin LI /*
288ada6f083SXin LI  * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
289ada6f083SXin LI  * (see Doug Ambrisko's FreeBSD patches).
290ada6f083SXin LI  */
291ada6f083SXin LI #define DLT_AIRONET_HEADER	120
292ada6f083SXin LI 
293ada6f083SXin LI /*
294ada6f083SXin LI  * Sigh.
295ada6f083SXin LI  *
296ada6f083SXin LI  * 121 was reserved for Siemens HiPath HDLC on 2002-01-25, as
297ada6f083SXin LI  * requested by Tomas Kukosa.
298ada6f083SXin LI  *
299ada6f083SXin LI  * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that
300ada6f083SXin LI  * assigned 121 as DLT_PFSYNC.  In current versions, its libpcap
301ada6f083SXin LI  * does DLT_ <-> LINKTYPE_ mapping, mapping DLT_PFSYNC to a
302ada6f083SXin LI  * LINKTYPE_PFSYNC value of 246, so it should write out DLT_PFSYNC
303ada6f083SXin LI  * dump files with 246 as the link-layer header type.  (Earlier
304ada6f083SXin LI  * versions might not have done mapping, in which case they would
305ada6f083SXin LI  * have written them out with a link-layer header type of 121.)
306ada6f083SXin LI  *
307ada6f083SXin LI  * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC;
308ada6f083SXin LI  * its libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would
309ada6f083SXin LI  * write out DLT_PFSYNC dump files with use 18 as the link-layer
310ada6f083SXin LI  * header type.
311ada6f083SXin LI  *
312ada6f083SXin LI  * NetBSD, DragonFly BSD, and Darwin also use 18 for DLT_PFSYNC; in
313ada6f083SXin LI  * current versions, their libpcaps do DLT_ <-> LINKTYPE_ mapping,
314ada6f083SXin LI  * mapping DLT_PFSYNC to a LINKTYPE_PFSYNC value of 246, so they
315ada6f083SXin LI  * should write out DLT_PFSYNC dump files with 246 as the link-layer
316ada6f083SXin LI  * header type.  (Earlier versions might not have done mapping,
317ada6f083SXin LI  * in which case they'd work the same way OpenBSD does, writing
318ada6f083SXin LI  * them out with a link-layer header type of 18.)
319ada6f083SXin LI  *
320ada6f083SXin LI  * We'll define DLT_PFSYNC as:
321ada6f083SXin LI  *
322ada6f083SXin LI  *    18 on NetBSD, OpenBSD, DragonFly BSD, and Darwin;
323ada6f083SXin LI  *
324ada6f083SXin LI  *    121 on FreeBSD;
325ada6f083SXin LI  *
326ada6f083SXin LI  *    246 everywhere else.
327ada6f083SXin LI  *
328ada6f083SXin LI  * We'll define DLT_HHDLC as 121 on everything except for FreeBSD;
329ada6f083SXin LI  * anybody who wants to compile, on FreeBSD, code that uses DLT_HHDLC
330ada6f083SXin LI  * is out of luck.
331ada6f083SXin LI  *
332ada6f083SXin LI  * We'll define LINKTYPE_PFSYNC as 246 on *all* platforms, so that
333ada6f083SXin LI  * savefiles written using *this* code won't use 18 or 121 for PFSYNC,
334ada6f083SXin LI  * they'll all use 246.
335ada6f083SXin LI  *
336ada6f083SXin LI  * Code that uses pcap_datalink() to determine the link-layer header
337ada6f083SXin LI  * type of a savefile won't, when built and run on FreeBSD, be able
338ada6f083SXin LI  * to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC capture
339ada6f083SXin LI  * files, as pcap_datalink() will give 121 for both of them.  Code
340ada6f083SXin LI  * that doesn't, such as the code in Wireshark, will be able to
341ada6f083SXin LI  * distinguish between them.
342ada6f083SXin LI  *
343ada6f083SXin LI  * FreeBSD's libpcap won't map a link-layer header type of 18 - i.e.,
344ada6f083SXin LI  * DLT_PFSYNC files from OpenBSD and possibly older versions of NetBSD,
3455fd1ea08SHans Petter Selasky  * DragonFly BSD, and macOS - to DLT_PFSYNC, so code built with FreeBSD's
346ada6f083SXin LI  * libpcap won't treat those files as DLT_PFSYNC files.
347ada6f083SXin LI  *
348ada6f083SXin LI  * Other libpcaps won't map a link-layer header type of 121 to DLT_PFSYNC;
349ada6f083SXin LI  * this means they can read DLT_HHDLC files, if any exist, but won't
350ada6f083SXin LI  * treat pcap files written by any older versions of FreeBSD libpcap that
351ada6f083SXin LI  * didn't map to 246 as DLT_PFSYNC files.
352ada6f083SXin LI  */
353ada6f083SXin LI #ifdef __FreeBSD__
354ada6f083SXin LI #define DLT_PFSYNC		121
355ada6f083SXin LI #else
356ada6f083SXin LI #define DLT_HHDLC		121
357ada6f083SXin LI #endif
358ada6f083SXin LI 
359ada6f083SXin LI /*
360ada6f083SXin LI  * This is for RFC 2625 IP-over-Fibre Channel.
361ada6f083SXin LI  *
362ada6f083SXin LI  * This is not for use with raw Fibre Channel, where the link-layer
363ada6f083SXin LI  * header starts with a Fibre Channel frame header; it's for IP-over-FC,
364ada6f083SXin LI  * where the link-layer header starts with an RFC 2625 Network_Header
365ada6f083SXin LI  * field.
366ada6f083SXin LI  */
367ada6f083SXin LI #define DLT_IP_OVER_FC		122
368ada6f083SXin LI 
369ada6f083SXin LI /*
370ada6f083SXin LI  * This is for Full Frontal ATM on Solaris with SunATM, with a
371ada6f083SXin LI  * pseudo-header followed by an AALn PDU.
372ada6f083SXin LI  *
373ada6f083SXin LI  * There may be other forms of Full Frontal ATM on other OSes,
374ada6f083SXin LI  * with different pseudo-headers.
375ada6f083SXin LI  *
376ada6f083SXin LI  * If ATM software returns a pseudo-header with VPI/VCI information
377ada6f083SXin LI  * (and, ideally, packet type information, e.g. signalling, ILMI,
378ada6f083SXin LI  * LANE, LLC-multiplexed traffic, etc.), it should not use
379ada6f083SXin LI  * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
380ada6f083SXin LI  * and the like don't have to infer the presence or absence of a
381ada6f083SXin LI  * pseudo-header and the form of the pseudo-header.
382ada6f083SXin LI  */
383ada6f083SXin LI #define DLT_SUNATM		123	/* Solaris+SunATM */
384ada6f083SXin LI 
385ada6f083SXin LI /*
386ada6f083SXin LI  * Reserved as per request from Kent Dahlgren <kent@praesum.com>
387ada6f083SXin LI  * for private use.
388ada6f083SXin LI  */
389ada6f083SXin LI #define DLT_RIO                 124     /* RapidIO */
390ada6f083SXin LI #define DLT_PCI_EXP             125     /* PCI Express */
391ada6f083SXin LI #define DLT_AURORA              126     /* Xilinx Aurora link layer */
392ada6f083SXin LI 
393ada6f083SXin LI /*
394ada6f083SXin LI  * Header for 802.11 plus a number of bits of link-layer information
395ada6f083SXin LI  * including radio information, used by some recent BSD drivers as
396ada6f083SXin LI  * well as the madwifi Atheros driver for Linux.
397ada6f083SXin LI  */
398ada6f083SXin LI #define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
399ada6f083SXin LI 
400ada6f083SXin LI /*
401ada6f083SXin LI  * Reserved for the TZSP encapsulation, as per request from
402ada6f083SXin LI  * Chris Waters <chris.waters@networkchemistry.com>
403ada6f083SXin LI  * TZSP is a generic encapsulation for any other link type,
404ada6f083SXin LI  * which includes a means to include meta-information
405ada6f083SXin LI  * with the packet, e.g. signal strength and channel
406ada6f083SXin LI  * for 802.11 packets.
407ada6f083SXin LI  */
408ada6f083SXin LI #define DLT_TZSP                128     /* Tazmen Sniffer Protocol */
409ada6f083SXin LI 
410ada6f083SXin LI /*
411ada6f083SXin LI  * BSD's ARCNET headers have the source host, destination host,
412ada6f083SXin LI  * and type at the beginning of the packet; that's what's handed
413ada6f083SXin LI  * up to userland via BPF.
414ada6f083SXin LI  *
415ada6f083SXin LI  * Linux's ARCNET headers, however, have a 2-byte offset field
416ada6f083SXin LI  * between the host IDs and the type; that's what's handed up
417ada6f083SXin LI  * to userland via PF_PACKET sockets.
418ada6f083SXin LI  *
419ada6f083SXin LI  * We therefore have to have separate DLT_ values for them.
420ada6f083SXin LI  */
421ada6f083SXin LI #define DLT_ARCNET_LINUX	129	/* ARCNET */
422ada6f083SXin LI 
423ada6f083SXin LI /*
424ada6f083SXin LI  * Juniper-private data link types, as per request from
425ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
426ada6f083SXin LI  * for passing on chassis-internal metainformation such as
427ada6f083SXin LI  * QOS profiles, etc..
428ada6f083SXin LI  */
429ada6f083SXin LI #define DLT_JUNIPER_MLPPP       130
430ada6f083SXin LI #define DLT_JUNIPER_MLFR        131
431ada6f083SXin LI #define DLT_JUNIPER_ES          132
432ada6f083SXin LI #define DLT_JUNIPER_GGSN        133
433ada6f083SXin LI #define DLT_JUNIPER_MFR         134
434ada6f083SXin LI #define DLT_JUNIPER_ATM2        135
435ada6f083SXin LI #define DLT_JUNIPER_SERVICES    136
436ada6f083SXin LI #define DLT_JUNIPER_ATM1        137
437ada6f083SXin LI 
438ada6f083SXin LI /*
439ada6f083SXin LI  * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
440ada6f083SXin LI  * <dieter@apple.com>.  The header that's presented is an Ethernet-like
441ada6f083SXin LI  * header:
442ada6f083SXin LI  *
443ada6f083SXin LI  *	#define FIREWIRE_EUI64_LEN	8
444ada6f083SXin LI  *	struct firewire_header {
445ada6f083SXin LI  *		u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
446ada6f083SXin LI  *		u_char  firewire_shost[FIREWIRE_EUI64_LEN];
447ada6f083SXin LI  *		u_short firewire_type;
448ada6f083SXin LI  *	};
449ada6f083SXin LI  *
450ada6f083SXin LI  * with "firewire_type" being an Ethernet type value, rather than,
451ada6f083SXin LI  * for example, raw GASP frames being handed up.
452ada6f083SXin LI  */
453ada6f083SXin LI #define DLT_APPLE_IP_OVER_IEEE1394	138
454ada6f083SXin LI 
455ada6f083SXin LI /*
456ada6f083SXin LI  * Various SS7 encapsulations, as per a request from Jeff Morriss
457ada6f083SXin LI  * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
458ada6f083SXin LI  */
459ada6f083SXin LI #define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info, followed by MTP2 */
460ada6f083SXin LI #define DLT_MTP2		140	/* MTP2, without pseudo-header */
461ada6f083SXin LI #define DLT_MTP3		141	/* MTP3, without pseudo-header or MTP2 */
462ada6f083SXin LI #define DLT_SCCP		142	/* SCCP, without pseudo-header or MTP2 or MTP3 */
463ada6f083SXin LI 
464ada6f083SXin LI /*
465ada6f083SXin LI  * DOCSIS MAC frames.
466ada6f083SXin LI  */
467ada6f083SXin LI #define DLT_DOCSIS		143
468ada6f083SXin LI 
469ada6f083SXin LI /*
470ada6f083SXin LI  * Linux-IrDA packets. Protocol defined at http://www.irda.org.
471ada6f083SXin LI  * Those packets include IrLAP headers and above (IrLMP...), but
472ada6f083SXin LI  * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
473ada6f083SXin LI  * framing can be handled by the hardware and depend on the bitrate.
474ada6f083SXin LI  * This is exactly the format you would get capturing on a Linux-IrDA
475ada6f083SXin LI  * interface (irdaX), but not on a raw serial port.
476ada6f083SXin LI  * Note the capture is done in "Linux-cooked" mode, so each packet include
477ada6f083SXin LI  * a fake packet header (struct sll_header). This is because IrDA packet
478ada6f083SXin LI  * decoding is dependant on the direction of the packet (incomming or
479ada6f083SXin LI  * outgoing).
480ada6f083SXin LI  * When/if other platform implement IrDA capture, we may revisit the
481ada6f083SXin LI  * issue and define a real DLT_IRDA...
482ada6f083SXin LI  * Jean II
483ada6f083SXin LI  */
484ada6f083SXin LI #define DLT_LINUX_IRDA		144
485ada6f083SXin LI 
486ada6f083SXin LI /*
487ada6f083SXin LI  * Reserved for IBM SP switch and IBM Next Federation switch.
488ada6f083SXin LI  */
489ada6f083SXin LI #define DLT_IBM_SP		145
490ada6f083SXin LI #define DLT_IBM_SN		146
491ada6f083SXin LI 
492ada6f083SXin LI /*
493ada6f083SXin LI  * Reserved for private use.  If you have some link-layer header type
494ada6f083SXin LI  * that you want to use within your organization, with the capture files
495ada6f083SXin LI  * using that link-layer header type not ever be sent outside your
496ada6f083SXin LI  * organization, you can use these values.
497ada6f083SXin LI  *
498ada6f083SXin LI  * No libpcap release will use these for any purpose, nor will any
499ada6f083SXin LI  * tcpdump release use them, either.
500ada6f083SXin LI  *
501ada6f083SXin LI  * Do *NOT* use these in capture files that you expect anybody not using
502ada6f083SXin LI  * your private versions of capture-file-reading tools to read; in
503ada6f083SXin LI  * particular, do *NOT* use them in products, otherwise you may find that
504ada6f083SXin LI  * people won't be able to use tcpdump, or snort, or Ethereal, or... to
505ada6f083SXin LI  * read capture files from your firewall/intrusion detection/traffic
506ada6f083SXin LI  * monitoring/etc. appliance, or whatever product uses that DLT_ value,
507ada6f083SXin LI  * and you may also find that the developers of those applications will
508ada6f083SXin LI  * not accept patches to let them read those files.
509ada6f083SXin LI  *
510ada6f083SXin LI  * Also, do not use them if somebody might send you a capture using them
511ada6f083SXin LI  * for *their* private type and tools using them for *your* private type
512ada6f083SXin LI  * would have to read them.
513ada6f083SXin LI  *
514ada6f083SXin LI  * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
515ada6f083SXin LI  * as per the comment above, and use the type you're given.
516ada6f083SXin LI  */
517ada6f083SXin LI #define DLT_USER0		147
518ada6f083SXin LI #define DLT_USER1		148
519ada6f083SXin LI #define DLT_USER2		149
520ada6f083SXin LI #define DLT_USER3		150
521ada6f083SXin LI #define DLT_USER4		151
522ada6f083SXin LI #define DLT_USER5		152
523ada6f083SXin LI #define DLT_USER6		153
524ada6f083SXin LI #define DLT_USER7		154
525ada6f083SXin LI #define DLT_USER8		155
526ada6f083SXin LI #define DLT_USER9		156
527ada6f083SXin LI #define DLT_USER10		157
528ada6f083SXin LI #define DLT_USER11		158
529ada6f083SXin LI #define DLT_USER12		159
530ada6f083SXin LI #define DLT_USER13		160
531ada6f083SXin LI #define DLT_USER14		161
532ada6f083SXin LI #define DLT_USER15		162
533ada6f083SXin LI 
534ada6f083SXin LI /*
535ada6f083SXin LI  * For future use with 802.11 captures - defined by AbsoluteValue
536ada6f083SXin LI  * Systems to store a number of bits of link-layer information
537ada6f083SXin LI  * including radio information:
538ada6f083SXin LI  *
539ada6f083SXin LI  *	http://www.shaftnet.org/~pizza/software/capturefrm.txt
540ada6f083SXin LI  *
541ada6f083SXin LI  * but it might be used by some non-AVS drivers now or in the
542ada6f083SXin LI  * future.
543ada6f083SXin LI  */
544ada6f083SXin LI #define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
545ada6f083SXin LI 
546ada6f083SXin LI /*
547ada6f083SXin LI  * Juniper-private data link type, as per request from
548ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
549ada6f083SXin LI  * for passing on chassis-internal metainformation such as
550ada6f083SXin LI  * QOS profiles, etc..
551ada6f083SXin LI  */
552ada6f083SXin LI #define DLT_JUNIPER_MONITOR     164
553ada6f083SXin LI 
554ada6f083SXin LI /*
555ada6f083SXin LI  * BACnet MS/TP frames.
556ada6f083SXin LI  */
557ada6f083SXin LI #define DLT_BACNET_MS_TP	165
558ada6f083SXin LI 
559ada6f083SXin LI /*
560ada6f083SXin LI  * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
561ada6f083SXin LI  *
562ada6f083SXin LI  * This is used in some OSes to allow a kernel socket filter to distinguish
563ada6f083SXin LI  * between incoming and outgoing packets, on a socket intended to
564ada6f083SXin LI  * supply pppd with outgoing packets so it can do dial-on-demand and
565ada6f083SXin LI  * hangup-on-lack-of-demand; incoming packets are filtered out so they
566ada6f083SXin LI  * don't cause pppd to hold the connection up (you don't want random
567ada6f083SXin LI  * input packets such as port scans, packets from old lost connections,
568ada6f083SXin LI  * etc. to force the connection to stay up).
569ada6f083SXin LI  *
570ada6f083SXin LI  * The first byte of the PPP header (0xff03) is modified to accomodate
571ada6f083SXin LI  * the direction - 0x00 = IN, 0x01 = OUT.
572ada6f083SXin LI  */
573ada6f083SXin LI #define DLT_PPP_PPPD		166
574ada6f083SXin LI 
575ada6f083SXin LI /*
576ada6f083SXin LI  * Names for backwards compatibility with older versions of some PPP
577ada6f083SXin LI  * software; new software should use DLT_PPP_PPPD.
578ada6f083SXin LI  */
579ada6f083SXin LI #define DLT_PPP_WITH_DIRECTION	DLT_PPP_PPPD
580ada6f083SXin LI #define DLT_LINUX_PPP_WITHDIRECTION	DLT_PPP_PPPD
581ada6f083SXin LI 
582ada6f083SXin LI /*
583ada6f083SXin LI  * Juniper-private data link type, as per request from
584ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
585ada6f083SXin LI  * for passing on chassis-internal metainformation such as
586ada6f083SXin LI  * QOS profiles, cookies, etc..
587ada6f083SXin LI  */
588ada6f083SXin LI #define DLT_JUNIPER_PPPOE       167
589ada6f083SXin LI #define DLT_JUNIPER_PPPOE_ATM   168
590ada6f083SXin LI 
591ada6f083SXin LI #define DLT_GPRS_LLC		169	/* GPRS LLC */
592ada6f083SXin LI #define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
593ada6f083SXin LI #define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
594ada6f083SXin LI 
595ada6f083SXin LI /*
596ada6f083SXin LI  * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
597ada6f083SXin LI  * monitoring equipment.
598ada6f083SXin LI  */
599ada6f083SXin LI #define DLT_GCOM_T1E1		172
600ada6f083SXin LI #define DLT_GCOM_SERIAL		173
601ada6f083SXin LI 
602ada6f083SXin LI /*
603ada6f083SXin LI  * Juniper-private data link type, as per request from
604ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_ is used
605ada6f083SXin LI  * for internal communication to Physical Interface Cards (PIC)
606ada6f083SXin LI  */
607ada6f083SXin LI #define DLT_JUNIPER_PIC_PEER    174
608ada6f083SXin LI 
609ada6f083SXin LI /*
610ada6f083SXin LI  * Link types requested by Gregor Maier <gregor@endace.com> of Endace
611ada6f083SXin LI  * Measurement Systems.  They add an ERF header (see
612ada6f083SXin LI  * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
613ada6f083SXin LI  * the link-layer header.
614ada6f083SXin LI  */
615ada6f083SXin LI #define DLT_ERF_ETH		175	/* Ethernet */
616ada6f083SXin LI #define DLT_ERF_POS		176	/* Packet-over-SONET */
617ada6f083SXin LI 
618ada6f083SXin LI /*
619ada6f083SXin LI  * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
620ada6f083SXin LI  * for vISDN (http://www.orlandi.com/visdn/).  Its link-layer header
621ada6f083SXin LI  * includes additional information before the LAPD header, so it's
622ada6f083SXin LI  * not necessarily a generic LAPD header.
623ada6f083SXin LI  */
624ada6f083SXin LI #define DLT_LINUX_LAPD		177
625ada6f083SXin LI 
626ada6f083SXin LI /*
627ada6f083SXin LI  * Juniper-private data link type, as per request from
628ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
629ada6f083SXin LI  * The DLT_ are used for prepending meta-information
630ada6f083SXin LI  * like interface index, interface name
631ada6f083SXin LI  * before standard Ethernet, PPP, Frelay & C-HDLC Frames
632ada6f083SXin LI  */
633ada6f083SXin LI #define DLT_JUNIPER_ETHER       178
634ada6f083SXin LI #define DLT_JUNIPER_PPP         179
635ada6f083SXin LI #define DLT_JUNIPER_FRELAY      180
636ada6f083SXin LI #define DLT_JUNIPER_CHDLC       181
637ada6f083SXin LI 
638ada6f083SXin LI /*
639ada6f083SXin LI  * Multi Link Frame Relay (FRF.16)
640ada6f083SXin LI  */
641ada6f083SXin LI #define DLT_MFR                 182
642ada6f083SXin LI 
643ada6f083SXin LI /*
644ada6f083SXin LI  * Juniper-private data link type, as per request from
645ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
646ada6f083SXin LI  * The DLT_ is used for internal communication with a
647ada6f083SXin LI  * voice Adapter Card (PIC)
648ada6f083SXin LI  */
649ada6f083SXin LI #define DLT_JUNIPER_VP          183
650ada6f083SXin LI 
651ada6f083SXin LI /*
652ada6f083SXin LI  * Arinc 429 frames.
653ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
654ada6f083SXin LI  * Every frame contains a 32bit A429 label.
655ada6f083SXin LI  * More documentation on Arinc 429 can be found at
656ada6f083SXin LI  * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
657ada6f083SXin LI  */
658ada6f083SXin LI #define DLT_A429                184
659ada6f083SXin LI 
660ada6f083SXin LI /*
661ada6f083SXin LI  * Arinc 653 Interpartition Communication messages.
662ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
663ada6f083SXin LI  * Please refer to the A653-1 standard for more information.
664ada6f083SXin LI  */
665ada6f083SXin LI #define DLT_A653_ICM            185
666ada6f083SXin LI 
667ada6f083SXin LI /*
668ada6f083SXin LI  * This used to be "USB packets, beginning with a USB setup header;
669ada6f083SXin LI  * requested by Paolo Abeni <paolo.abeni@email.it>."
670ada6f083SXin LI  *
671ada6f083SXin LI  * However, that header didn't work all that well - it left out some
672ada6f083SXin LI  * useful information - and was abandoned in favor of the DLT_USB_LINUX
673ada6f083SXin LI  * header.
674ada6f083SXin LI  *
675ada6f083SXin LI  * This is now used by FreeBSD for its BPF taps for USB; that has its
676ada6f083SXin LI  * own headers.  So it is written, so it is done.
677ada6f083SXin LI  *
678ada6f083SXin LI  * For source-code compatibility, we also define DLT_USB to have this
679ada6f083SXin LI  * value.  We do it numerically so that, if code that includes this
680ada6f083SXin LI  * file (directly or indirectly) also includes an OS header that also
681ada6f083SXin LI  * defines DLT_USB as 186, we don't get a redefinition warning.
682ada6f083SXin LI  * (NetBSD 7 does that.)
683ada6f083SXin LI  */
684ada6f083SXin LI #define DLT_USB_FREEBSD		186
685ada6f083SXin LI #define DLT_USB			186
686ada6f083SXin LI 
687ada6f083SXin LI /*
688ada6f083SXin LI  * Bluetooth HCI UART transport layer (part H:4); requested by
689ada6f083SXin LI  * Paolo Abeni.
690ada6f083SXin LI  */
691ada6f083SXin LI #define DLT_BLUETOOTH_HCI_H4	187
692ada6f083SXin LI 
693ada6f083SXin LI /*
694ada6f083SXin LI  * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
695ada6f083SXin LI  * <cruz_petagay@bah.com>.
696ada6f083SXin LI  */
697ada6f083SXin LI #define DLT_IEEE802_16_MAC_CPS	188
698ada6f083SXin LI 
699ada6f083SXin LI /*
700ada6f083SXin LI  * USB packets, beginning with a Linux USB header; requested by
701ada6f083SXin LI  * Paolo Abeni <paolo.abeni@email.it>.
702ada6f083SXin LI  */
703ada6f083SXin LI #define DLT_USB_LINUX		189
704ada6f083SXin LI 
705ada6f083SXin LI /*
706ada6f083SXin LI  * Controller Area Network (CAN) v. 2.0B packets.
707ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
708ada6f083SXin LI  * Used to dump CAN packets coming from a CAN Vector board.
709ada6f083SXin LI  * More documentation on the CAN v2.0B frames can be found at
710ada6f083SXin LI  * http://www.can-cia.org/downloads/?269
711ada6f083SXin LI  */
712ada6f083SXin LI #define DLT_CAN20B              190
713ada6f083SXin LI 
714ada6f083SXin LI /*
715ada6f083SXin LI  * IEEE 802.15.4, with address fields padded, as is done by Linux
716ada6f083SXin LI  * drivers; requested by Juergen Schimmer.
717ada6f083SXin LI  */
718ada6f083SXin LI #define DLT_IEEE802_15_4_LINUX	191
719ada6f083SXin LI 
720ada6f083SXin LI /*
721ada6f083SXin LI  * Per Packet Information encapsulated packets.
722ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
723ada6f083SXin LI  */
724ada6f083SXin LI #define DLT_PPI			192
725ada6f083SXin LI 
726ada6f083SXin LI /*
727ada6f083SXin LI  * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
728ada6f083SXin LI  * requested by Charles Clancy.
729ada6f083SXin LI  */
730ada6f083SXin LI #define DLT_IEEE802_16_MAC_CPS_RADIO	193
731ada6f083SXin LI 
732ada6f083SXin LI /*
733ada6f083SXin LI  * Juniper-private data link type, as per request from
734ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
735ada6f083SXin LI  * The DLT_ is used for internal communication with a
736ada6f083SXin LI  * integrated service module (ISM).
737ada6f083SXin LI  */
738ada6f083SXin LI #define DLT_JUNIPER_ISM         194
739ada6f083SXin LI 
740ada6f083SXin LI /*
741ada6f083SXin LI  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
742ada6f083SXin LI  * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
743ada6f083SXin LI  * For this one, we expect the FCS to be present at the end of the frame;
744ada6f083SXin LI  * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used.
745ada6f083SXin LI  */
746ada6f083SXin LI #define DLT_IEEE802_15_4	195
747ada6f083SXin LI 
748ada6f083SXin LI /*
749ada6f083SXin LI  * Various link-layer types, with a pseudo-header, for SITA
750ada6f083SXin LI  * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
751ada6f083SXin LI  */
752ada6f083SXin LI #define DLT_SITA		196
753ada6f083SXin LI 
754ada6f083SXin LI /*
755ada6f083SXin LI  * Various link-layer types, with a pseudo-header, for Endace DAG cards;
756ada6f083SXin LI  * encapsulates Endace ERF records.  Requested by Stephen Donnelly
757ada6f083SXin LI  * <stephen@endace.com>.
758ada6f083SXin LI  */
759ada6f083SXin LI #define DLT_ERF			197
760ada6f083SXin LI 
761ada6f083SXin LI /*
762ada6f083SXin LI  * Special header prepended to Ethernet packets when capturing from a
763ada6f083SXin LI  * u10 Networks board.  Requested by Phil Mulholland
764ada6f083SXin LI  * <phil@u10networks.com>.
765ada6f083SXin LI  */
766ada6f083SXin LI #define DLT_RAIF1		198
767ada6f083SXin LI 
768ada6f083SXin LI /*
769ada6f083SXin LI  * IPMB packet for IPMI, beginning with the I2C slave address, followed
770ada6f083SXin LI  * by the netFn and LUN, etc..  Requested by Chanthy Toeung
771ada6f083SXin LI  * <chanthy.toeung@ca.kontron.com>.
772*57e22627SCy Schubert  *
773*57e22627SCy Schubert  * XXX - this used to be called DLT_IPMB, back when we got the
774*57e22627SCy Schubert  * impression from the email thread requesting it that the packet
775*57e22627SCy Schubert  * had no extra 2-byte header.  We've renamed it; if anybody used
776*57e22627SCy Schubert  * DLT_IPMB and assumed no 2-byte header, this will cause the compile
777*57e22627SCy Schubert  * to fail, at which point we'll have to figure out what to do about
778*57e22627SCy Schubert  * the two header types using the same DLT_/LINKTYPE_ value.  If that
779*57e22627SCy Schubert  * doesn't happen, we'll assume nobody used it and that the redefinition
780*57e22627SCy Schubert  * is safe.
781ada6f083SXin LI  */
782*57e22627SCy Schubert #define DLT_IPMB_KONTRON	199
783ada6f083SXin LI 
784ada6f083SXin LI /*
785ada6f083SXin LI  * Juniper-private data link type, as per request from
786ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
787ada6f083SXin LI  * The DLT_ is used for capturing data on a secure tunnel interface.
788ada6f083SXin LI  */
789ada6f083SXin LI #define DLT_JUNIPER_ST          200
790ada6f083SXin LI 
791ada6f083SXin LI /*
792ada6f083SXin LI  * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
793ada6f083SXin LI  * that includes direction information; requested by Paolo Abeni.
794ada6f083SXin LI  */
795ada6f083SXin LI #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR	201
796ada6f083SXin LI 
797ada6f083SXin LI /*
798ada6f083SXin LI  * AX.25 packet with a 1-byte KISS header; see
799ada6f083SXin LI  *
800ada6f083SXin LI  *	http://www.ax25.net/kiss.htm
801ada6f083SXin LI  *
802ada6f083SXin LI  * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
803ada6f083SXin LI  */
804ada6f083SXin LI #define DLT_AX25_KISS		202
805ada6f083SXin LI 
806ada6f083SXin LI /*
807ada6f083SXin LI  * LAPD packets from an ISDN channel, starting with the address field,
808ada6f083SXin LI  * with no pseudo-header.
809ada6f083SXin LI  * Requested by Varuna De Silva <varunax@gmail.com>.
810ada6f083SXin LI  */
811ada6f083SXin LI #define DLT_LAPD		203
812ada6f083SXin LI 
813ada6f083SXin LI /*
814ada6f083SXin LI  * Variants of various link-layer headers, with a one-byte direction
815ada6f083SXin LI  * pseudo-header prepended - zero means "received by this host",
816ada6f083SXin LI  * non-zero (any non-zero value) means "sent by this host" - as per
817ada6f083SXin LI  * Will Barker <w.barker@zen.co.uk>.
818ada6f083SXin LI  */
819ada6f083SXin LI #define DLT_PPP_WITH_DIR	204	/* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
820ada6f083SXin LI #define DLT_C_HDLC_WITH_DIR	205	/* Cisco HDLC */
821ada6f083SXin LI #define DLT_FRELAY_WITH_DIR	206	/* Frame Relay */
822ada6f083SXin LI #define DLT_LAPB_WITH_DIR	207	/* LAPB */
823ada6f083SXin LI 
824ada6f083SXin LI /*
825ada6f083SXin LI  * 208 is reserved for an as-yet-unspecified proprietary link-layer
826ada6f083SXin LI  * type, as requested by Will Barker.
827ada6f083SXin LI  */
828ada6f083SXin LI 
829ada6f083SXin LI /*
830ada6f083SXin LI  * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
831ada6f083SXin LI  * <avn@pigeonpoint.com>.
832ada6f083SXin LI  */
833ada6f083SXin LI #define DLT_IPMB_LINUX		209
834ada6f083SXin LI 
835ada6f083SXin LI /*
836ada6f083SXin LI  * FlexRay automotive bus - http://www.flexray.com/ - as requested
837ada6f083SXin LI  * by Hannes Kaelber <hannes.kaelber@x2e.de>.
838ada6f083SXin LI  */
839ada6f083SXin LI #define DLT_FLEXRAY		210
840ada6f083SXin LI 
841ada6f083SXin LI /*
842ada6f083SXin LI  * Media Oriented Systems Transport (MOST) bus for multimedia
843ada6f083SXin LI  * transport - http://www.mostcooperation.com/ - as requested
844ada6f083SXin LI  * by Hannes Kaelber <hannes.kaelber@x2e.de>.
845ada6f083SXin LI  */
846ada6f083SXin LI #define DLT_MOST		211
847ada6f083SXin LI 
848ada6f083SXin LI /*
849ada6f083SXin LI  * Local Interconnect Network (LIN) bus for vehicle networks -
850ada6f083SXin LI  * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
851ada6f083SXin LI  * <hannes.kaelber@x2e.de>.
852ada6f083SXin LI  */
853ada6f083SXin LI #define DLT_LIN			212
854ada6f083SXin LI 
855ada6f083SXin LI /*
856ada6f083SXin LI  * X2E-private data link type used for serial line capture,
857ada6f083SXin LI  * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
858ada6f083SXin LI  */
859ada6f083SXin LI #define DLT_X2E_SERIAL		213
860ada6f083SXin LI 
861ada6f083SXin LI /*
862ada6f083SXin LI  * X2E-private data link type used for the Xoraya data logger
863ada6f083SXin LI  * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
864ada6f083SXin LI  */
865ada6f083SXin LI #define DLT_X2E_XORAYA		214
866ada6f083SXin LI 
867ada6f083SXin LI /*
868ada6f083SXin LI  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
869ada6f083SXin LI  * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
870ada6f083SXin LI  * of 0 as preamble, one octet of SFD, one octet of frame length+
871ada6f083SXin LI  * reserved bit, and then the MAC-layer data, starting with the
872ada6f083SXin LI  * frame control field).
873ada6f083SXin LI  *
874ada6f083SXin LI  * Requested by Max Filippov <jcmvbkbc@gmail.com>.
875ada6f083SXin LI  */
876ada6f083SXin LI #define DLT_IEEE802_15_4_NONASK_PHY	215
877ada6f083SXin LI 
878ada6f083SXin LI /*
879ada6f083SXin LI  * David Gibson <david@gibson.dropbear.id.au> requested this for
880ada6f083SXin LI  * captures from the Linux kernel /dev/input/eventN devices. This
881ada6f083SXin LI  * is used to communicate keystrokes and mouse movements from the
882ada6f083SXin LI  * Linux kernel to display systems, such as Xorg.
883ada6f083SXin LI  */
884ada6f083SXin LI #define DLT_LINUX_EVDEV		216
885ada6f083SXin LI 
886ada6f083SXin LI /*
887ada6f083SXin LI  * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
888ada6f083SXin LI  *
889ada6f083SXin LI  * Requested by Harald Welte <laforge@gnumonks.org>.
890ada6f083SXin LI  */
891ada6f083SXin LI #define DLT_GSMTAP_UM		217
892ada6f083SXin LI #define DLT_GSMTAP_ABIS		218
893ada6f083SXin LI 
894ada6f083SXin LI /*
895ada6f083SXin LI  * MPLS, with an MPLS label as the link-layer header.
896ada6f083SXin LI  * Requested by Michele Marchetto <michele@openbsd.org> on behalf
897ada6f083SXin LI  * of OpenBSD.
898ada6f083SXin LI  */
899ada6f083SXin LI #define DLT_MPLS		219
900ada6f083SXin LI 
901ada6f083SXin LI /*
902ada6f083SXin LI  * USB packets, beginning with a Linux USB header, with the USB header
903ada6f083SXin LI  * padded to 64 bytes; required for memory-mapped access.
904ada6f083SXin LI  */
905ada6f083SXin LI #define DLT_USB_LINUX_MMAPPED	220
906ada6f083SXin LI 
907ada6f083SXin LI /*
908ada6f083SXin LI  * DECT packets, with a pseudo-header; requested by
909ada6f083SXin LI  * Matthias Wenzel <tcpdump@mazzoo.de>.
910ada6f083SXin LI  */
911ada6f083SXin LI #define DLT_DECT		221
912ada6f083SXin LI 
913ada6f083SXin LI /*
914ada6f083SXin LI  * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
915ada6f083SXin LI  * Date: Mon, 11 May 2009 11:18:30 -0500
916ada6f083SXin LI  *
917ada6f083SXin LI  * DLT_AOS. We need it for AOS Space Data Link Protocol.
918ada6f083SXin LI  *   I have already written dissectors for but need an OK from
919ada6f083SXin LI  *   legal before I can submit a patch.
920ada6f083SXin LI  *
921ada6f083SXin LI  */
922ada6f083SXin LI #define DLT_AOS                 222
923ada6f083SXin LI 
924ada6f083SXin LI /*
925ada6f083SXin LI  * Wireless HART (Highway Addressable Remote Transducer)
926ada6f083SXin LI  * From the HART Communication Foundation
927ada6f083SXin LI  * IES/PAS 62591
928ada6f083SXin LI  *
929ada6f083SXin LI  * Requested by Sam Roberts <vieuxtech@gmail.com>.
930ada6f083SXin LI  */
931ada6f083SXin LI #define DLT_WIHART		223
932ada6f083SXin LI 
933ada6f083SXin LI /*
934ada6f083SXin LI  * Fibre Channel FC-2 frames, beginning with a Frame_Header.
935ada6f083SXin LI  * Requested by Kahou Lei <kahou82@gmail.com>.
936ada6f083SXin LI  */
937ada6f083SXin LI #define DLT_FC_2		224
938ada6f083SXin LI 
939ada6f083SXin LI /*
940ada6f083SXin LI  * Fibre Channel FC-2 frames, beginning with an encoding of the
941ada6f083SXin LI  * SOF, and ending with an encoding of the EOF.
942ada6f083SXin LI  *
943ada6f083SXin LI  * The encodings represent the frame delimiters as 4-byte sequences
944ada6f083SXin LI  * representing the corresponding ordered sets, with K28.5
945ada6f083SXin LI  * represented as 0xBC, and the D symbols as the corresponding
946ada6f083SXin LI  * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
947ada6f083SXin LI  * is represented as 0xBC 0xB5 0x55 0x55.
948ada6f083SXin LI  *
949ada6f083SXin LI  * Requested by Kahou Lei <kahou82@gmail.com>.
950ada6f083SXin LI  */
951ada6f083SXin LI #define DLT_FC_2_WITH_FRAME_DELIMS	225
952ada6f083SXin LI 
953ada6f083SXin LI /*
954ada6f083SXin LI  * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
955ada6f083SXin LI  *
956ada6f083SXin LI  * The pseudo-header starts with a one-byte version number; for version 2,
957ada6f083SXin LI  * the pseudo-header is:
958ada6f083SXin LI  *
959ada6f083SXin LI  * struct dl_ipnetinfo {
9605fd1ea08SHans Petter Selasky  *     uint8_t   dli_version;
9615fd1ea08SHans Petter Selasky  *     uint8_t   dli_family;
9625fd1ea08SHans Petter Selasky  *     uint16_t  dli_htype;
9635fd1ea08SHans Petter Selasky  *     uint32_t  dli_pktlen;
9645fd1ea08SHans Petter Selasky  *     uint32_t  dli_ifindex;
9655fd1ea08SHans Petter Selasky  *     uint32_t  dli_grifindex;
9665fd1ea08SHans Petter Selasky  *     uint32_t  dli_zsrc;
9675fd1ea08SHans Petter Selasky  *     uint32_t  dli_zdst;
968ada6f083SXin LI  * };
969ada6f083SXin LI  *
970ada6f083SXin LI  * dli_version is 2 for the current version of the pseudo-header.
971ada6f083SXin LI  *
972ada6f083SXin LI  * dli_family is a Solaris address family value, so it's 2 for IPv4
973ada6f083SXin LI  * and 26 for IPv6.
974ada6f083SXin LI  *
975ada6f083SXin LI  * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
976ada6f083SXin LI  * packets, and 2 for packets arriving from another zone on the same
977ada6f083SXin LI  * machine.
978ada6f083SXin LI  *
979ada6f083SXin LI  * dli_pktlen is the length of the packet data following the pseudo-header
980ada6f083SXin LI  * (so the captured length minus dli_pktlen is the length of the
981ada6f083SXin LI  * pseudo-header, assuming the entire pseudo-header was captured).
982ada6f083SXin LI  *
983ada6f083SXin LI  * dli_ifindex is the interface index of the interface on which the
984ada6f083SXin LI  * packet arrived.
985ada6f083SXin LI  *
986ada6f083SXin LI  * dli_grifindex is the group interface index number (for IPMP interfaces).
987ada6f083SXin LI  *
988ada6f083SXin LI  * dli_zsrc is the zone identifier for the source of the packet.
989ada6f083SXin LI  *
990ada6f083SXin LI  * dli_zdst is the zone identifier for the destination of the packet.
991ada6f083SXin LI  *
992ada6f083SXin LI  * A zone number of 0 is the global zone; a zone number of 0xffffffff
993ada6f083SXin LI  * means that the packet arrived from another host on the network, not
994ada6f083SXin LI  * from another zone on the same machine.
995ada6f083SXin LI  *
996ada6f083SXin LI  * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
997ada6f083SXin LI  * which of those it is.
998ada6f083SXin LI  */
999ada6f083SXin LI #define DLT_IPNET		226
1000ada6f083SXin LI 
1001ada6f083SXin LI /*
1002ada6f083SXin LI  * CAN (Controller Area Network) frames, with a pseudo-header as supplied
1003ada6f083SXin LI  * by Linux SocketCAN, and with multi-byte numerical fields in that header
1004ada6f083SXin LI  * in big-endian byte order.
1005ada6f083SXin LI  *
1006ada6f083SXin LI  * See Documentation/networking/can.txt in the Linux source.
1007ada6f083SXin LI  *
1008ada6f083SXin LI  * Requested by Felix Obenhuber <felix@obenhuber.de>.
1009ada6f083SXin LI  */
1010ada6f083SXin LI #define DLT_CAN_SOCKETCAN	227
1011ada6f083SXin LI 
1012ada6f083SXin LI /*
1013ada6f083SXin LI  * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
1014ada6f083SXin LI  * whether it's v4 or v6.  Requested by Darren Reed <Darren.Reed@Sun.COM>.
1015ada6f083SXin LI  */
1016ada6f083SXin LI #define DLT_IPV4		228
1017ada6f083SXin LI #define DLT_IPV6		229
1018ada6f083SXin LI 
1019ada6f083SXin LI /*
1020ada6f083SXin LI  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
1021ada6f083SXin LI  * nothing), and with no FCS at the end of the frame; requested by
1022ada6f083SXin LI  * Jon Smirl <jonsmirl@gmail.com>.
1023ada6f083SXin LI  */
1024ada6f083SXin LI #define DLT_IEEE802_15_4_NOFCS	230
1025ada6f083SXin LI 
1026ada6f083SXin LI /*
1027ada6f083SXin LI  * Raw D-Bus:
1028ada6f083SXin LI  *
1029ada6f083SXin LI  *	http://www.freedesktop.org/wiki/Software/dbus
1030ada6f083SXin LI  *
1031ada6f083SXin LI  * messages:
1032ada6f083SXin LI  *
1033ada6f083SXin LI  *	http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
1034ada6f083SXin LI  *
1035ada6f083SXin LI  * starting with the endianness flag, followed by the message type, etc.,
1036ada6f083SXin LI  * but without the authentication handshake before the message sequence:
1037ada6f083SXin LI  *
1038ada6f083SXin LI  *	http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
1039ada6f083SXin LI  *
1040ada6f083SXin LI  * Requested by Martin Vidner <martin@vidner.net>.
1041ada6f083SXin LI  */
1042ada6f083SXin LI #define DLT_DBUS		231
1043ada6f083SXin LI 
1044ada6f083SXin LI /*
1045ada6f083SXin LI  * Juniper-private data link type, as per request from
1046ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
1047ada6f083SXin LI  */
1048ada6f083SXin LI #define DLT_JUNIPER_VS			232
1049ada6f083SXin LI #define DLT_JUNIPER_SRX_E2E		233
1050ada6f083SXin LI #define DLT_JUNIPER_FIBRECHANNEL	234
1051ada6f083SXin LI 
1052ada6f083SXin LI /*
1053ada6f083SXin LI  * DVB-CI (DVB Common Interface for communication between a PC Card
1054ada6f083SXin LI  * module and a DVB receiver).  See
1055ada6f083SXin LI  *
1056ada6f083SXin LI  *	http://www.kaiser.cx/pcap-dvbci.html
1057ada6f083SXin LI  *
1058ada6f083SXin LI  * for the specification.
1059ada6f083SXin LI  *
1060ada6f083SXin LI  * Requested by Martin Kaiser <martin@kaiser.cx>.
1061ada6f083SXin LI  */
1062ada6f083SXin LI #define DLT_DVB_CI		235
1063ada6f083SXin LI 
1064ada6f083SXin LI /*
1065ada6f083SXin LI  * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
1066ada6f083SXin LI  * *not* the same as, 27.010).  Requested by Hans-Christoph Schemmel
1067ada6f083SXin LI  * <hans-christoph.schemmel@cinterion.com>.
1068ada6f083SXin LI  */
1069ada6f083SXin LI #define DLT_MUX27010		236
1070ada6f083SXin LI 
1071ada6f083SXin LI /*
1072ada6f083SXin LI  * STANAG 5066 D_PDUs.  Requested by M. Baris Demiray
1073ada6f083SXin LI  * <barisdemiray@gmail.com>.
1074ada6f083SXin LI  */
1075ada6f083SXin LI #define DLT_STANAG_5066_D_PDU	237
1076ada6f083SXin LI 
1077ada6f083SXin LI /*
1078ada6f083SXin LI  * Juniper-private data link type, as per request from
1079ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
1080ada6f083SXin LI  */
1081ada6f083SXin LI #define DLT_JUNIPER_ATM_CEMIC	238
1082ada6f083SXin LI 
1083ada6f083SXin LI /*
1084ada6f083SXin LI  * NetFilter LOG messages
1085ada6f083SXin LI  * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
1086ada6f083SXin LI  *
1087ada6f083SXin LI  * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
1088ada6f083SXin LI  */
1089ada6f083SXin LI #define DLT_NFLOG		239
1090ada6f083SXin LI 
1091ada6f083SXin LI /*
1092ada6f083SXin LI  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1093ada6f083SXin LI  * for Ethernet packets with a 4-byte pseudo-header and always
1094ada6f083SXin LI  * with the payload including the FCS, as supplied by their
1095ada6f083SXin LI  * netANALYZER hardware and software.
1096ada6f083SXin LI  *
1097ada6f083SXin LI  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
1098ada6f083SXin LI  */
1099ada6f083SXin LI #define DLT_NETANALYZER		240
1100ada6f083SXin LI 
1101ada6f083SXin LI /*
1102ada6f083SXin LI  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1103ada6f083SXin LI  * for Ethernet packets with a 4-byte pseudo-header and FCS and
1104ada6f083SXin LI  * with the Ethernet header preceded by 7 bytes of preamble and
1105ada6f083SXin LI  * 1 byte of SFD, as supplied by their netANALYZER hardware and
1106ada6f083SXin LI  * software.
1107ada6f083SXin LI  *
1108ada6f083SXin LI  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
1109ada6f083SXin LI  */
1110ada6f083SXin LI #define DLT_NETANALYZER_TRANSPARENT	241
1111ada6f083SXin LI 
1112ada6f083SXin LI /*
1113ada6f083SXin LI  * IP-over-InfiniBand, as specified by RFC 4391.
1114ada6f083SXin LI  *
1115ada6f083SXin LI  * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
1116ada6f083SXin LI  */
1117ada6f083SXin LI #define DLT_IPOIB		242
1118ada6f083SXin LI 
1119ada6f083SXin LI /*
1120ada6f083SXin LI  * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
1121ada6f083SXin LI  *
1122ada6f083SXin LI  * Requested by Guy Martin <gmsoft@tuxicoman.be>.
1123ada6f083SXin LI  */
1124ada6f083SXin LI #define DLT_MPEG_2_TS		243
1125ada6f083SXin LI 
1126ada6f083SXin LI /*
1127ada6f083SXin LI  * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
1128ada6f083SXin LI  * used by their ng40 protocol tester.
1129ada6f083SXin LI  *
1130ada6f083SXin LI  * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
1131ada6f083SXin LI  */
1132ada6f083SXin LI #define DLT_NG40		244
1133ada6f083SXin LI 
1134ada6f083SXin LI /*
1135ada6f083SXin LI  * Pseudo-header giving adapter number and flags, followed by an NFC
1136ada6f083SXin LI  * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
1137ada6f083SXin LI  * as specified by NFC Forum Logical Link Control Protocol Technical
1138ada6f083SXin LI  * Specification LLCP 1.1.
1139ada6f083SXin LI  *
1140ada6f083SXin LI  * Requested by Mike Wakerly <mikey@google.com>.
1141ada6f083SXin LI  */
1142ada6f083SXin LI #define DLT_NFC_LLCP		245
1143ada6f083SXin LI 
1144ada6f083SXin LI /*
1145ada6f083SXin LI  * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
1146ada6f083SXin LI  *
1147ada6f083SXin LI  * DLT_PFSYNC has different values on different platforms, and all of
1148ada6f083SXin LI  * them collide with something used elsewhere.  On platforms that
1149ada6f083SXin LI  * don't already define it, define it as 246.
1150ada6f083SXin LI  */
1151ada6f083SXin LI #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
1152ada6f083SXin LI #define DLT_PFSYNC		246
1153ada6f083SXin LI #endif
1154ada6f083SXin LI 
1155ada6f083SXin LI /*
1156ada6f083SXin LI  * Raw InfiniBand packets, starting with the Local Routing Header.
1157ada6f083SXin LI  *
1158ada6f083SXin LI  * Requested by Oren Kladnitsky <orenk@mellanox.com>.
1159ada6f083SXin LI  */
1160ada6f083SXin LI #define DLT_INFINIBAND		247
1161ada6f083SXin LI 
1162ada6f083SXin LI /*
1163ada6f083SXin LI  * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
1164ada6f083SXin LI  *
1165ada6f083SXin LI  * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
1166ada6f083SXin LI  */
1167ada6f083SXin LI #define DLT_SCTP		248
1168ada6f083SXin LI 
1169ada6f083SXin LI /*
1170ada6f083SXin LI  * USB packets, beginning with a USBPcap header.
1171ada6f083SXin LI  *
1172ada6f083SXin LI  * Requested by Tomasz Mon <desowin@gmail.com>
1173ada6f083SXin LI  */
1174ada6f083SXin LI #define DLT_USBPCAP		249
1175ada6f083SXin LI 
1176ada6f083SXin LI /*
1177ada6f083SXin LI  * Schweitzer Engineering Laboratories "RTAC" product serial-line
1178ada6f083SXin LI  * packets.
1179ada6f083SXin LI  *
1180ada6f083SXin LI  * Requested by Chris Bontje <chris_bontje@selinc.com>.
1181ada6f083SXin LI  */
1182ada6f083SXin LI #define DLT_RTAC_SERIAL		250
1183ada6f083SXin LI 
1184ada6f083SXin LI /*
1185ada6f083SXin LI  * Bluetooth Low Energy air interface link-layer packets.
1186ada6f083SXin LI  *
1187ada6f083SXin LI  * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
1188ada6f083SXin LI  */
1189ada6f083SXin LI #define DLT_BLUETOOTH_LE_LL	251
1190ada6f083SXin LI 
1191ada6f083SXin LI /*
1192ada6f083SXin LI  * DLT type for upper-protocol layer PDU saves from wireshark.
1193ada6f083SXin LI  *
1194ada6f083SXin LI  * the actual contents are determined by two TAGs stored with each
1195ada6f083SXin LI  * packet:
1196ada6f083SXin LI  *   EXP_PDU_TAG_LINKTYPE          the link type (LINKTYPE_ value) of the
1197ada6f083SXin LI  *				   original packet.
1198ada6f083SXin LI  *
1199ada6f083SXin LI  *   EXP_PDU_TAG_PROTO_NAME        the name of the wireshark dissector
1200ada6f083SXin LI  * 				   that can make sense of the data stored.
1201ada6f083SXin LI  */
1202ada6f083SXin LI #define DLT_WIRESHARK_UPPER_PDU	252
1203ada6f083SXin LI 
1204ada6f083SXin LI /*
1205ada6f083SXin LI  * DLT type for the netlink protocol (nlmon devices).
1206ada6f083SXin LI  */
1207ada6f083SXin LI #define DLT_NETLINK		253
1208ada6f083SXin LI 
1209ada6f083SXin LI /*
1210ada6f083SXin LI  * Bluetooth Linux Monitor headers for the BlueZ stack.
1211ada6f083SXin LI  */
1212ada6f083SXin LI #define DLT_BLUETOOTH_LINUX_MONITOR	254
1213ada6f083SXin LI 
1214ada6f083SXin LI /*
1215ada6f083SXin LI  * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
1216ada6f083SXin LI  * captured by Ubertooth.
1217ada6f083SXin LI  */
1218ada6f083SXin LI #define DLT_BLUETOOTH_BREDR_BB	255
1219ada6f083SXin LI 
1220ada6f083SXin LI /*
1221ada6f083SXin LI  * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
1222ada6f083SXin LI  */
1223ada6f083SXin LI #define DLT_BLUETOOTH_LE_LL_WITH_PHDR	256
1224ada6f083SXin LI 
1225ada6f083SXin LI /*
1226ada6f083SXin LI  * PROFIBUS data link layer.
1227ada6f083SXin LI  */
1228ada6f083SXin LI #define DLT_PROFIBUS_DL		257
1229ada6f083SXin LI 
1230ada6f083SXin LI /*
1231ada6f083SXin LI  * Apple's DLT_PKTAP headers.
1232ada6f083SXin LI  *
1233ada6f083SXin LI  * Sadly, the folks at Apple either had no clue that the DLT_USERn values
1234ada6f083SXin LI  * are for internal use within an organization and partners only, and
1235ada6f083SXin LI  * didn't know that the right way to get a link-layer header type is to
1236ada6f083SXin LI  * ask tcpdump.org for one, or knew and didn't care, so they just
1237ada6f083SXin LI  * used DLT_USER2, which causes problems for everything except for
1238ada6f083SXin LI  * their version of tcpdump.
1239ada6f083SXin LI  *
1240ada6f083SXin LI  * So I'll just give them one; hopefully this will show up in a
1241ada6f083SXin LI  * libpcap release in time for them to get this into 10.10 Big Sur
1242ada6f083SXin LI  * or whatever Mavericks' successor is called.  LINKTYPE_PKTAP
12435fd1ea08SHans Petter Selasky  * will be 258 *even on macOS*; that is *intentional*, so that
1244ada6f083SXin LI  * PKTAP files look the same on *all* OSes (different OSes can have
1245ada6f083SXin LI  * different numerical values for a given DLT_, but *MUST NOT* have
1246ada6f083SXin LI  * different values for what goes in a file, as files can be moved
1247ada6f083SXin LI  * between OSes!).
1248ada6f083SXin LI  *
1249ada6f083SXin LI  * When capturing, on a system with a Darwin-based OS, on a device
1250ada6f083SXin LI  * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this
1251ada6f083SXin LI  * version of libpcap, the DLT_ value for the pcap_t  will be DLT_PKTAP,
1252ada6f083SXin LI  * and that will continue to be DLT_USER2 on Darwin-based OSes. That way,
1253ada6f083SXin LI  * binary compatibility with Mavericks is preserved for programs using
1254ada6f083SXin LI  * this version of libpcap.  This does mean that if you were using
12555fd1ea08SHans Petter Selasky  * DLT_USER2 for some capture device on macOS, you can't do so with
1256ada6f083SXin LI  * this version of libpcap, just as you can't with Apple's libpcap -
12575fd1ea08SHans Petter Selasky  * on macOS, they define DLT_PKTAP to be DLT_USER2, so programs won't
1258ada6f083SXin LI  * be able to distinguish between PKTAP and whatever you were using
1259ada6f083SXin LI  * DLT_USER2 for.
1260ada6f083SXin LI  *
1261ada6f083SXin LI  * If the program saves the capture to a file using this version of
1262ada6f083SXin LI  * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be
1263ada6f083SXin LI  * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes.
1264ada6f083SXin LI  * That way, the file will *not* be a DLT_USER2 file.  That means
1265ada6f083SXin LI  * that the latest version of tcpdump, when built with this version
1266ada6f083SXin LI  * of libpcap, and sufficiently recent versions of Wireshark will
1267ada6f083SXin LI  * be able to read those files and interpret them correctly; however,
1268ada6f083SXin LI  * Apple's version of tcpdump in OS X 10.9 won't be able to handle
1269ada6f083SXin LI  * them.  (Hopefully, Apple will pick up this version of libpcap,
1270ada6f083SXin LI  * and the corresponding version of tcpdump, so that tcpdump will
1271ada6f083SXin LI  * be able to handle the old LINKTYPE_USER2 captures *and* the new
1272ada6f083SXin LI  * LINKTYPE_PKTAP captures.)
1273ada6f083SXin LI  */
1274ada6f083SXin LI #ifdef __APPLE__
1275ada6f083SXin LI #define DLT_PKTAP	DLT_USER2
1276ada6f083SXin LI #else
1277ada6f083SXin LI #define DLT_PKTAP	258
1278ada6f083SXin LI #endif
1279ada6f083SXin LI 
1280ada6f083SXin LI /*
1281ada6f083SXin LI  * Ethernet packets preceded by a header giving the last 6 octets
1282ada6f083SXin LI  * of the preamble specified by 802.3-2012 Clause 65, section
1283ada6f083SXin LI  * 65.1.3.2 "Transmit".
1284ada6f083SXin LI  */
1285ada6f083SXin LI #define DLT_EPON	259
1286ada6f083SXin LI 
1287ada6f083SXin LI /*
1288ada6f083SXin LI  * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
1289ada6f083SXin LI  * in the PICMG HPM.2 specification.
1290ada6f083SXin LI  */
1291ada6f083SXin LI #define DLT_IPMI_HPM_2	260
1292ada6f083SXin LI 
1293ada6f083SXin LI /*
1294ada6f083SXin LI  * per  Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
1295ada6f083SXin LI  */
1296ada6f083SXin LI #define DLT_ZWAVE_R1_R2  261
1297ada6f083SXin LI #define DLT_ZWAVE_R3     262
1298ada6f083SXin LI 
1299ada6f083SXin LI /*
1300ada6f083SXin LI  * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
1301ada6f083SXin LI  * Digital Lighting Management room bus serial protocol captures.
1302ada6f083SXin LI  */
1303ada6f083SXin LI #define DLT_WATTSTOPPER_DLM     263
1304ada6f083SXin LI 
1305ada6f083SXin LI /*
1306ada6f083SXin LI  * ISO 14443 contactless smart card messages.
1307ada6f083SXin LI  */
1308ada6f083SXin LI #define DLT_ISO_14443	264
1309ada6f083SXin LI 
1310ada6f083SXin LI /*
1311ada6f083SXin LI  * Radio data system (RDS) groups.  IEC 62106.
1312ada6f083SXin LI  * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
1313ada6f083SXin LI  */
1314ada6f083SXin LI #define DLT_RDS		265
1315ada6f083SXin LI 
1316ada6f083SXin LI /*
13175fd1ea08SHans Petter Selasky  * USB packets, beginning with a Darwin (macOS, etc.) header.
13185fd1ea08SHans Petter Selasky  */
13195fd1ea08SHans Petter Selasky #define DLT_USB_DARWIN	266
13205fd1ea08SHans Petter Selasky 
13215fd1ea08SHans Petter Selasky /*
13225fd1ea08SHans Petter Selasky  * OpenBSD DLT_OPENFLOW.
13235fd1ea08SHans Petter Selasky  */
13245fd1ea08SHans Petter Selasky #define DLT_OPENFLOW	267
13255fd1ea08SHans Petter Selasky 
13265fd1ea08SHans Petter Selasky /*
13275fd1ea08SHans Petter Selasky  * SDLC frames containing SNA PDUs.
13285fd1ea08SHans Petter Selasky  */
13295fd1ea08SHans Petter Selasky #define DLT_SDLC	268
13305fd1ea08SHans Petter Selasky 
13315fd1ea08SHans Petter Selasky /*
13325fd1ea08SHans Petter Selasky  * per "Selvig, Bjorn" <b.selvig@ti.com> used for
13335fd1ea08SHans Petter Selasky  * TI protocol sniffer.
13345fd1ea08SHans Petter Selasky  */
13355fd1ea08SHans Petter Selasky #define DLT_TI_LLN_SNIFFER	269
13365fd1ea08SHans Petter Selasky 
13375fd1ea08SHans Petter Selasky /*
13385fd1ea08SHans Petter Selasky  * per: Erik de Jong <erikdejong at gmail.com> for
13395fd1ea08SHans Petter Selasky  *   https://github.com/eriknl/LoRaTap/releases/tag/v0.1
13405fd1ea08SHans Petter Selasky  */
13415fd1ea08SHans Petter Selasky #define DLT_LORATAP             270
13425fd1ea08SHans Petter Selasky 
13435fd1ea08SHans Petter Selasky /*
13445fd1ea08SHans Petter Selasky  * per: Stefanha at gmail.com for
13455fd1ea08SHans Petter Selasky  *   http://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html
13465fd1ea08SHans Petter Selasky  * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h
13475fd1ea08SHans Petter Selasky  * for: http://qemu-project.org/Features/VirtioVsock
13485fd1ea08SHans Petter Selasky  */
13495fd1ea08SHans Petter Selasky #define DLT_VSOCK               271
13505fd1ea08SHans Petter Selasky 
13515fd1ea08SHans Petter Selasky /*
13525fd1ea08SHans Petter Selasky  * Nordic Semiconductor Bluetooth LE sniffer.
13535fd1ea08SHans Petter Selasky  */
13545fd1ea08SHans Petter Selasky #define DLT_NORDIC_BLE		272
13555fd1ea08SHans Petter Selasky 
13565fd1ea08SHans Petter Selasky /*
13575fd1ea08SHans Petter Selasky  * Excentis DOCSIS 3.1 RF sniffer (XRA-31)
13585fd1ea08SHans Petter Selasky  *   per: bruno.verstuyft at excentis.com
13595fd1ea08SHans Petter Selasky  *        http://www.xra31.com/xra-header
13605fd1ea08SHans Petter Selasky  */
13615fd1ea08SHans Petter Selasky #define DLT_DOCSIS31_XRA31	273
13625fd1ea08SHans Petter Selasky 
13635fd1ea08SHans Petter Selasky /*
13645fd1ea08SHans Petter Selasky  * mPackets, as specified by IEEE 802.3br Figure 99-4, starting
13655fd1ea08SHans Petter Selasky  * with the preamble and always ending with a CRC field.
13665fd1ea08SHans Petter Selasky  */
13675fd1ea08SHans Petter Selasky #define DLT_ETHERNET_MPACKET	274
13685fd1ea08SHans Petter Selasky 
13695fd1ea08SHans Petter Selasky /*
13705fd1ea08SHans Petter Selasky  * DisplayPort AUX channel monitoring data as specified by VESA
13715fd1ea08SHans Petter Selasky  * DisplayPort(DP) Standard preceeded by a pseudo-header.
13725fd1ea08SHans Petter Selasky  *    per dirk.eibach at gdsys.cc
13735fd1ea08SHans Petter Selasky  */
13745fd1ea08SHans Petter Selasky #define DLT_DISPLAYPORT_AUX	275
13755fd1ea08SHans Petter Selasky 
13765fd1ea08SHans Petter Selasky /*
1377*57e22627SCy Schubert  * Linux cooked sockets v2.
1378*57e22627SCy Schubert  */
1379*57e22627SCy Schubert #define DLT_LINUX_SLL2	276
1380*57e22627SCy Schubert 
1381*57e22627SCy Schubert /*
1382ada6f083SXin LI  * In case the code that includes this file (directly or indirectly)
1383ada6f083SXin LI  * has also included OS files that happen to define DLT_MATCHING_MAX,
1384ada6f083SXin LI  * with a different value (perhaps because that OS hasn't picked up
1385ada6f083SXin LI  * the latest version of our DLT definitions), we undefine the
1386ada6f083SXin LI  * previous value of DLT_MATCHING_MAX.
1387ada6f083SXin LI  */
1388ada6f083SXin LI #ifdef DLT_MATCHING_MAX
1389ada6f083SXin LI #undef DLT_MATCHING_MAX
1390ada6f083SXin LI #endif
1391*57e22627SCy Schubert #define DLT_MATCHING_MAX	276	/* highest value in the "matching" range */
1392ada6f083SXin LI 
1393ada6f083SXin LI /*
1394ada6f083SXin LI  * DLT and savefile link type values are split into a class and
1395ada6f083SXin LI  * a member of that class.  A class value of 0 indicates a regular
1396ada6f083SXin LI  * DLT_/LINKTYPE_ value.
1397ada6f083SXin LI  */
1398ada6f083SXin LI #define DLT_CLASS(x)		((x) & 0x03ff0000)
1399ada6f083SXin LI 
1400ada6f083SXin LI /*
1401ada6f083SXin LI  * NetBSD-specific generic "raw" link type.  The class value indicates
1402ada6f083SXin LI  * that this is the generic raw type, and the lower 16 bits are the
1403ada6f083SXin LI  * address family we're dealing with.  Those values are NetBSD-specific;
1404ada6f083SXin LI  * do not assume that they correspond to AF_ values for your operating
1405ada6f083SXin LI  * system.
1406ada6f083SXin LI  */
1407ada6f083SXin LI #define	DLT_CLASS_NETBSD_RAWAF	0x02240000
1408ada6f083SXin LI #define	DLT_NETBSD_RAWAF(af)	(DLT_CLASS_NETBSD_RAWAF | (af))
1409ada6f083SXin LI #define	DLT_NETBSD_RAWAF_AF(x)	((x) & 0x0000ffff)
1410ada6f083SXin LI #define	DLT_IS_NETBSD_RAWAF(x)	(DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
1411ada6f083SXin LI 
1412ada6f083SXin LI #endif /* !_NET_DLT_H_ */
1413