xref: /freebsd/sys/net/dlt.h (revision 6f9cba8f8b5efd16249633e52483ea351876b67b)
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  *
55*6f9cba8fSJoseph Mingrone  *	https://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 /*
110*6f9cba8fSJoseph Mingrone  * NetBSD uses 15 for HIPPI.
111*6f9cba8fSJoseph Mingrone  *
112*6f9cba8fSJoseph Mingrone  * From a quick look at sys/net/if_hippi.h and sys/net/if_hippisubr.c
113*6f9cba8fSJoseph Mingrone  * in an older version of NetBSD , the header appears to be:
114*6f9cba8fSJoseph Mingrone  *
115*6f9cba8fSJoseph Mingrone  * 	a 1-byte ULP field (ULP-id)?
116*6f9cba8fSJoseph Mingrone  *
117*6f9cba8fSJoseph Mingrone  *	a 1-byte flags field;
118*6f9cba8fSJoseph Mingrone  *
119*6f9cba8fSJoseph Mingrone  *	a 2-byte "offsets" field;
120*6f9cba8fSJoseph Mingrone  *
121*6f9cba8fSJoseph Mingrone  *	a 4-byte "D2 length" field (D2_Size?);
122*6f9cba8fSJoseph Mingrone  *
123*6f9cba8fSJoseph Mingrone  *	a 4-byte "destination switch" field (or a 1-byte field
124*6f9cba8fSJoseph Mingrone  *	containing the Forwarding Class, Double_Wide, and Message_Type
125*6f9cba8fSJoseph Mingrone  *	sub fields, followed by a 3-byte Destination_Switch_Address
126*6f9cba8fSJoseph Mingrone  *	field?, HIPPI-LE 3.4-style?);
127*6f9cba8fSJoseph Mingrone  *
128*6f9cba8fSJoseph Mingrone  *	a 4-byte "source switch" field (or a 1-byte field containing the
129*6f9cba8fSJoseph Mingrone  *	Destination_Address_type and Source_Address_Type fields, followed
130*6f9cba8fSJoseph Mingrone  *	by a 3-byte Source_Switch_Address field, HIPPI-LE 3.4-style?);
131*6f9cba8fSJoseph Mingrone  *
132*6f9cba8fSJoseph Mingrone  *	a 2-byte reserved field;
133*6f9cba8fSJoseph Mingrone  *
134*6f9cba8fSJoseph Mingrone  *	a 6-byte destination address field;
135*6f9cba8fSJoseph Mingrone  *
136*6f9cba8fSJoseph Mingrone  *	a 2-byte "local admin" field;
137*6f9cba8fSJoseph Mingrone  *
138*6f9cba8fSJoseph Mingrone  *	a 6-byte source address field;
139*6f9cba8fSJoseph Mingrone  *
140*6f9cba8fSJoseph Mingrone  * followed by an 802.2 LLC header.
141*6f9cba8fSJoseph Mingrone  *
142*6f9cba8fSJoseph Mingrone  * This looks somewhat like something derived from the HIPPI-FP 4.4
143*6f9cba8fSJoseph Mingrone  * Header_Area, followed an HIPPI-FP 4.4 D1_Area containing a D1 data set
144*6f9cba8fSJoseph Mingrone  * with the header in HIPPI-LE 3.4 (ANSI X3.218-1993), followed by an
145*6f9cba8fSJoseph Mingrone  * HIPPI-FP 4.4 D2_Area (with no Offset) containing the 802.2 LLC header
146*6f9cba8fSJoseph Mingrone  * and payload?  Or does the "offsets" field contain the D2_Offset,
147*6f9cba8fSJoseph Mingrone  * with that many bytes of offset before the payload?
148*6f9cba8fSJoseph Mingrone  *
149*6f9cba8fSJoseph Mingrone  * See http://wotug.org/parallel/standards/hippi/ for an archive of
150*6f9cba8fSJoseph Mingrone  * HIPPI specifications.
151*6f9cba8fSJoseph Mingrone  *
152*6f9cba8fSJoseph Mingrone  * RFC 2067 imposes some additional restrictions.  It says that the
153*6f9cba8fSJoseph Mingrone  * Offset is always zero
154*6f9cba8fSJoseph Mingrone  *
155*6f9cba8fSJoseph Mingrone  * HIPPI is long-gone, and the source files found in an older version
156*6f9cba8fSJoseph Mingrone  * of NetBSD don't appear to be in the main CVS branch, so we may never
157*6f9cba8fSJoseph Mingrone  * see a capture with this link-layer type.
158*6f9cba8fSJoseph Mingrone  */
159*6f9cba8fSJoseph Mingrone #if defined(__NetBSD__)
160*6f9cba8fSJoseph Mingrone #define DLT_HIPPI	15	/* HIPPI */
161*6f9cba8fSJoseph Mingrone #endif
162*6f9cba8fSJoseph Mingrone 
163*6f9cba8fSJoseph Mingrone /*
164*6f9cba8fSJoseph Mingrone  * NetBSD uses 16 for DLT_HDLC; see below.
165*6f9cba8fSJoseph Mingrone  * BSD/OS uses it for PPP; see above.
166*6f9cba8fSJoseph Mingrone  * As far as I know, no other OS uses it for anything; don't use it
167*6f9cba8fSJoseph Mingrone  * for anything else.
168*6f9cba8fSJoseph Mingrone  */
169*6f9cba8fSJoseph Mingrone 
170*6f9cba8fSJoseph Mingrone /*
171ada6f083SXin LI  * 17 was used for DLT_PFLOG in OpenBSD; it no longer is.
172ada6f083SXin LI  *
173ada6f083SXin LI  * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG
174ada6f083SXin LI  * as 117 so that pflog captures would use a link-layer header type
175ada6f083SXin LI  * value that didn't collide with any other values.  On all
176ada6f083SXin LI  * platforms other than OpenBSD, we defined DLT_PFLOG as 117,
177ada6f083SXin LI  * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG.
178ada6f083SXin LI  *
179ada6f083SXin LI  * OpenBSD eventually switched to using 117 for DLT_PFLOG as well.
180ada6f083SXin LI  *
181ada6f083SXin LI  * Don't use 17 for anything else.
182ada6f083SXin LI  */
183ada6f083SXin LI 
184ada6f083SXin LI /*
185ada6f083SXin LI  * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and
1865fd1ea08SHans Petter Selasky  * macOS; don't use it for anything else.  (FreeBSD uses 121, which
1875fd1ea08SHans Petter Selasky  * collides with DLT_HHDLC, even though it doesn't use 18 for
1885fd1ea08SHans Petter Selasky  * anything and doesn't appear to have ever used it for anything.)
189ada6f083SXin LI  *
190ada6f083SXin LI  * We define it as 18 on those platforms; it is, unfortunately, used
191ada6f083SXin LI  * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC
192ada6f083SXin LI  * in general.  As the packet format for it, like that for
193ada6f083SXin LI  * DLT_PFLOG, is not only OS-dependent but OS-version-dependent,
194ada6f083SXin LI  * we don't support printing it in tcpdump except on OSes that
195ada6f083SXin LI  * have the relevant header files, so it's not that useful on
196ada6f083SXin LI  * other platforms.
197ada6f083SXin LI  */
198ada6f083SXin LI #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
199ada6f083SXin LI #define DLT_PFSYNC	18
200ada6f083SXin LI #endif
201ada6f083SXin LI 
202*6f9cba8fSJoseph Mingrone #define DLT_ATM_CLIP	19	/* Linux Classical IP over ATM */
203ada6f083SXin LI 
204ada6f083SXin LI /*
205ada6f083SXin LI  * Apparently Redback uses this for its SmartEdge 400/800.  I hope
206ada6f083SXin LI  * nobody else decided to use it, too.
207ada6f083SXin LI  */
208ada6f083SXin LI #define DLT_REDBACK_SMARTEDGE	32
209ada6f083SXin LI 
210ada6f083SXin LI /*
211ada6f083SXin LI  * These values are defined by NetBSD; other platforms should refrain from
212ada6f083SXin LI  * using them for other purposes, so that NetBSD savefiles with link
213ada6f083SXin LI  * types of 50 or 51 can be read as this type on all platforms.
214ada6f083SXin LI  */
215ada6f083SXin LI #define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
216ada6f083SXin LI #define DLT_PPP_ETHER	51	/* PPP over Ethernet */
217ada6f083SXin LI 
218ada6f083SXin LI /*
219ada6f083SXin LI  * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
220ada6f083SXin LI  * a link-layer type of 99 for the tcpdump it supplies.  The link-layer
221ada6f083SXin LI  * header has 6 bytes of unknown data, something that appears to be an
222ada6f083SXin LI  * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
223ada6f083SXin LI  * I've seen.
224ada6f083SXin LI  */
225ada6f083SXin LI #define DLT_SYMANTEC_FIREWALL	99
226ada6f083SXin LI 
227ada6f083SXin LI /*
228ada6f083SXin LI  * Values between 100 and 103 are used in capture file headers as
229ada6f083SXin LI  * link-layer header type LINKTYPE_ values corresponding to DLT_ types
230ada6f083SXin LI  * that differ between platforms; don't use those values for new DLT_
231ada6f083SXin LI  * new types.
232ada6f083SXin LI  */
233ada6f083SXin LI 
234ada6f083SXin LI /*
235ada6f083SXin LI  * Values starting with 104 are used for newly-assigned link-layer
236ada6f083SXin LI  * header type values; for those link-layer header types, the DLT_
237ada6f083SXin LI  * value returned by pcap_datalink() and passed to pcap_open_dead(),
238ada6f083SXin LI  * and the LINKTYPE_ value that appears in capture files, are the
239ada6f083SXin LI  * same.
240ada6f083SXin LI  *
241ada6f083SXin LI  * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
242ada6f083SXin LI  * the highest such value.
243ada6f083SXin LI  */
244ada6f083SXin LI #define DLT_MATCHING_MIN	104
245ada6f083SXin LI 
246ada6f083SXin LI /*
247ada6f083SXin LI  * This value was defined by libpcap 0.5; platforms that have defined
248ada6f083SXin LI  * it with a different value should define it here with that value -
249ada6f083SXin LI  * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
250ada6f083SXin LI  * whatever value that happens to be, so programs will correctly
251ada6f083SXin LI  * handle files with that link type regardless of the value of
252ada6f083SXin LI  * DLT_C_HDLC.
253ada6f083SXin LI  *
254ada6f083SXin LI  * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
255ada6f083SXin LI  * compatibility with programs written for BSD/OS.
256ada6f083SXin LI  *
257ada6f083SXin LI  * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
258ada6f083SXin LI  * for source compatibility with programs written for libpcap 0.5.
259ada6f083SXin LI  */
260ada6f083SXin LI #define DLT_C_HDLC	104	/* Cisco HDLC */
261ada6f083SXin LI #define DLT_CHDLC	DLT_C_HDLC
262ada6f083SXin LI 
263ada6f083SXin LI #define DLT_IEEE802_11	105	/* IEEE 802.11 wireless */
264ada6f083SXin LI 
265ada6f083SXin LI /*
266ada6f083SXin LI  * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
267ada6f083SXin LI  * except when it isn't.  (I.e., sometimes it's just raw IP, and
268ada6f083SXin LI  * sometimes it isn't.)  We currently handle it as DLT_LINUX_SLL,
269ada6f083SXin LI  * so that we don't have to worry about the link-layer header.)
270ada6f083SXin LI  */
271ada6f083SXin LI 
272ada6f083SXin LI /*
273ada6f083SXin LI  * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
274ada6f083SXin LI  * with other values.
275ada6f083SXin LI  * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
276ada6f083SXin LI  * (DLCI, etc.).
277ada6f083SXin LI  */
278ada6f083SXin LI #define DLT_FRELAY	107
279ada6f083SXin LI 
280ada6f083SXin LI /*
281ada6f083SXin LI  * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
282ada6f083SXin LI  * that the AF_ type in the link-layer header is in network byte order.
283ada6f083SXin LI  *
284ada6f083SXin LI  * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
285*6f9cba8fSJoseph Mingrone  * we don't use 12 for it in OSes other than OpenBSD; instead, we
286*6f9cba8fSJoseph Mingrone  * use the same value as LINKTYPE_LOOP.
287ada6f083SXin LI  */
288ada6f083SXin LI #ifdef __OpenBSD__
289ada6f083SXin LI #define DLT_LOOP	12
290ada6f083SXin LI #else
291ada6f083SXin LI #define DLT_LOOP	108
292ada6f083SXin LI #endif
293ada6f083SXin LI 
294ada6f083SXin LI /*
295ada6f083SXin LI  * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
296ada6f083SXin LI  * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
297*6f9cba8fSJoseph Mingrone  * than OpenBSD; instead, we use the same value as LINKTYPE_ENC.
298ada6f083SXin LI  */
299ada6f083SXin LI #ifdef __OpenBSD__
300ada6f083SXin LI #define DLT_ENC		13
301ada6f083SXin LI #else
302ada6f083SXin LI #define DLT_ENC		109
303ada6f083SXin LI #endif
304ada6f083SXin LI 
305ada6f083SXin LI /*
306*6f9cba8fSJoseph Mingrone  * Values 110 and 111 are reserved for use in capture file headers
307ada6f083SXin LI  * as link-layer types corresponding to DLT_ types that might differ
308ada6f083SXin LI  * between platforms; don't use those values for new DLT_ types
309ada6f083SXin LI  * other than the corresponding DLT_ types.
310ada6f083SXin LI  */
311ada6f083SXin LI 
312ada6f083SXin LI /*
313*6f9cba8fSJoseph Mingrone  * NetBSD uses 16 for (Cisco) "HDLC framing".  For other platforms,
314*6f9cba8fSJoseph Mingrone  * we define it to have the same value as LINKTYPE_NETBSD_HDLC.
315*6f9cba8fSJoseph Mingrone  */
316*6f9cba8fSJoseph Mingrone #if defined(__NetBSD__)
317*6f9cba8fSJoseph Mingrone #define DLT_HDLC	16	/* Cisco HDLC */
318*6f9cba8fSJoseph Mingrone #else
319*6f9cba8fSJoseph Mingrone #define DLT_HDLC	112
320*6f9cba8fSJoseph Mingrone #endif
321*6f9cba8fSJoseph Mingrone 
322*6f9cba8fSJoseph Mingrone /*
323*6f9cba8fSJoseph Mingrone  * Linux cooked sockets.
324ada6f083SXin LI  */
325ada6f083SXin LI #define DLT_LINUX_SLL	113
326ada6f083SXin LI 
327ada6f083SXin LI /*
328ada6f083SXin LI  * Apple LocalTalk hardware.
329ada6f083SXin LI  */
330ada6f083SXin LI #define DLT_LTALK	114
331ada6f083SXin LI 
332ada6f083SXin LI /*
333ada6f083SXin LI  * Acorn Econet.
334ada6f083SXin LI  */
335ada6f083SXin LI #define DLT_ECONET	115
336ada6f083SXin LI 
337ada6f083SXin LI /*
338ada6f083SXin LI  * Reserved for use with OpenBSD ipfilter.
339ada6f083SXin LI  */
340ada6f083SXin LI #define DLT_IPFILTER	116
341ada6f083SXin LI 
342ada6f083SXin LI /*
343ada6f083SXin LI  * OpenBSD DLT_PFLOG.
344ada6f083SXin LI  */
345ada6f083SXin LI #define DLT_PFLOG	117
346ada6f083SXin LI 
347ada6f083SXin LI /*
348ada6f083SXin LI  * Registered for Cisco-internal use.
349ada6f083SXin LI  */
350ada6f083SXin LI #define DLT_CISCO_IOS	118
351ada6f083SXin LI 
352ada6f083SXin LI /*
353ada6f083SXin LI  * For 802.11 cards using the Prism II chips, with a link-layer
354ada6f083SXin LI  * header including Prism monitor mode information plus an 802.11
355ada6f083SXin LI  * header.
356ada6f083SXin LI  */
357ada6f083SXin LI #define DLT_PRISM_HEADER	119
358ada6f083SXin LI 
359ada6f083SXin LI /*
360ada6f083SXin LI  * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
361ada6f083SXin LI  * (see Doug Ambrisko's FreeBSD patches).
362ada6f083SXin LI  */
363ada6f083SXin LI #define DLT_AIRONET_HEADER	120
364ada6f083SXin LI 
365ada6f083SXin LI /*
366ada6f083SXin LI  * Sigh.
367ada6f083SXin LI  *
368ada6f083SXin LI  * 121 was reserved for Siemens HiPath HDLC on 2002-01-25, as
369ada6f083SXin LI  * requested by Tomas Kukosa.
370ada6f083SXin LI  *
371ada6f083SXin LI  * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that
372ada6f083SXin LI  * assigned 121 as DLT_PFSYNC.  In current versions, its libpcap
373ada6f083SXin LI  * does DLT_ <-> LINKTYPE_ mapping, mapping DLT_PFSYNC to a
374ada6f083SXin LI  * LINKTYPE_PFSYNC value of 246, so it should write out DLT_PFSYNC
375ada6f083SXin LI  * dump files with 246 as the link-layer header type.  (Earlier
376ada6f083SXin LI  * versions might not have done mapping, in which case they would
377ada6f083SXin LI  * have written them out with a link-layer header type of 121.)
378ada6f083SXin LI  *
379ada6f083SXin LI  * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC;
380ada6f083SXin LI  * its libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would
381ada6f083SXin LI  * write out DLT_PFSYNC dump files with use 18 as the link-layer
382ada6f083SXin LI  * header type.
383ada6f083SXin LI  *
384ada6f083SXin LI  * NetBSD, DragonFly BSD, and Darwin also use 18 for DLT_PFSYNC; in
385ada6f083SXin LI  * current versions, their libpcaps do DLT_ <-> LINKTYPE_ mapping,
386ada6f083SXin LI  * mapping DLT_PFSYNC to a LINKTYPE_PFSYNC value of 246, so they
387ada6f083SXin LI  * should write out DLT_PFSYNC dump files with 246 as the link-layer
388ada6f083SXin LI  * header type.  (Earlier versions might not have done mapping,
389ada6f083SXin LI  * in which case they'd work the same way OpenBSD does, writing
390ada6f083SXin LI  * them out with a link-layer header type of 18.)
391ada6f083SXin LI  *
392ada6f083SXin LI  * We'll define DLT_PFSYNC as:
393ada6f083SXin LI  *
394ada6f083SXin LI  *    18 on NetBSD, OpenBSD, DragonFly BSD, and Darwin;
395ada6f083SXin LI  *
396ada6f083SXin LI  *    121 on FreeBSD;
397ada6f083SXin LI  *
398ada6f083SXin LI  *    246 everywhere else.
399ada6f083SXin LI  *
400ada6f083SXin LI  * We'll define DLT_HHDLC as 121 on everything except for FreeBSD;
401ada6f083SXin LI  * anybody who wants to compile, on FreeBSD, code that uses DLT_HHDLC
402ada6f083SXin LI  * is out of luck.
403ada6f083SXin LI  *
404ada6f083SXin LI  * We'll define LINKTYPE_PFSYNC as 246 on *all* platforms, so that
405ada6f083SXin LI  * savefiles written using *this* code won't use 18 or 121 for PFSYNC,
406ada6f083SXin LI  * they'll all use 246.
407ada6f083SXin LI  *
408ada6f083SXin LI  * Code that uses pcap_datalink() to determine the link-layer header
409ada6f083SXin LI  * type of a savefile won't, when built and run on FreeBSD, be able
410ada6f083SXin LI  * to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC capture
411ada6f083SXin LI  * files, as pcap_datalink() will give 121 for both of them.  Code
412ada6f083SXin LI  * that doesn't, such as the code in Wireshark, will be able to
413ada6f083SXin LI  * distinguish between them.
414ada6f083SXin LI  *
415ada6f083SXin LI  * FreeBSD's libpcap won't map a link-layer header type of 18 - i.e.,
416ada6f083SXin LI  * DLT_PFSYNC files from OpenBSD and possibly older versions of NetBSD,
4175fd1ea08SHans Petter Selasky  * DragonFly BSD, and macOS - to DLT_PFSYNC, so code built with FreeBSD's
418ada6f083SXin LI  * libpcap won't treat those files as DLT_PFSYNC files.
419ada6f083SXin LI  *
420ada6f083SXin LI  * Other libpcaps won't map a link-layer header type of 121 to DLT_PFSYNC;
421ada6f083SXin LI  * this means they can read DLT_HHDLC files, if any exist, but won't
422ada6f083SXin LI  * treat pcap files written by any older versions of FreeBSD libpcap that
423ada6f083SXin LI  * didn't map to 246 as DLT_PFSYNC files.
424ada6f083SXin LI  */
425ada6f083SXin LI #ifdef __FreeBSD__
426ada6f083SXin LI #define DLT_PFSYNC		121
427ada6f083SXin LI #else
428ada6f083SXin LI #define DLT_HHDLC		121
429ada6f083SXin LI #endif
430ada6f083SXin LI 
431ada6f083SXin LI /*
432ada6f083SXin LI  * This is for RFC 2625 IP-over-Fibre Channel.
433ada6f083SXin LI  *
434ada6f083SXin LI  * This is not for use with raw Fibre Channel, where the link-layer
435ada6f083SXin LI  * header starts with a Fibre Channel frame header; it's for IP-over-FC,
436ada6f083SXin LI  * where the link-layer header starts with an RFC 2625 Network_Header
437ada6f083SXin LI  * field.
438ada6f083SXin LI  */
439ada6f083SXin LI #define DLT_IP_OVER_FC		122
440ada6f083SXin LI 
441ada6f083SXin LI /*
442ada6f083SXin LI  * This is for Full Frontal ATM on Solaris with SunATM, with a
443ada6f083SXin LI  * pseudo-header followed by an AALn PDU.
444ada6f083SXin LI  *
445ada6f083SXin LI  * There may be other forms of Full Frontal ATM on other OSes,
446ada6f083SXin LI  * with different pseudo-headers.
447ada6f083SXin LI  *
448ada6f083SXin LI  * If ATM software returns a pseudo-header with VPI/VCI information
449ada6f083SXin LI  * (and, ideally, packet type information, e.g. signalling, ILMI,
450ada6f083SXin LI  * LANE, LLC-multiplexed traffic, etc.), it should not use
451ada6f083SXin LI  * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
452ada6f083SXin LI  * and the like don't have to infer the presence or absence of a
453ada6f083SXin LI  * pseudo-header and the form of the pseudo-header.
454ada6f083SXin LI  */
455ada6f083SXin LI #define DLT_SUNATM		123	/* Solaris+SunATM */
456ada6f083SXin LI 
457ada6f083SXin LI /*
458ada6f083SXin LI  * Reserved as per request from Kent Dahlgren <kent@praesum.com>
459ada6f083SXin LI  * for private use.
460ada6f083SXin LI  */
461ada6f083SXin LI #define DLT_RIO                 124     /* RapidIO */
462ada6f083SXin LI #define DLT_PCI_EXP             125     /* PCI Express */
463ada6f083SXin LI #define DLT_AURORA              126     /* Xilinx Aurora link layer */
464ada6f083SXin LI 
465ada6f083SXin LI /*
466ada6f083SXin LI  * Header for 802.11 plus a number of bits of link-layer information
467ada6f083SXin LI  * including radio information, used by some recent BSD drivers as
468ada6f083SXin LI  * well as the madwifi Atheros driver for Linux.
469ada6f083SXin LI  */
470ada6f083SXin LI #define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
471ada6f083SXin LI 
472ada6f083SXin LI /*
473ada6f083SXin LI  * Reserved for the TZSP encapsulation, as per request from
474ada6f083SXin LI  * Chris Waters <chris.waters@networkchemistry.com>
475ada6f083SXin LI  * TZSP is a generic encapsulation for any other link type,
476ada6f083SXin LI  * which includes a means to include meta-information
477ada6f083SXin LI  * with the packet, e.g. signal strength and channel
478ada6f083SXin LI  * for 802.11 packets.
479ada6f083SXin LI  */
480ada6f083SXin LI #define DLT_TZSP                128     /* Tazmen Sniffer Protocol */
481ada6f083SXin LI 
482ada6f083SXin LI /*
483ada6f083SXin LI  * BSD's ARCNET headers have the source host, destination host,
484ada6f083SXin LI  * and type at the beginning of the packet; that's what's handed
485ada6f083SXin LI  * up to userland via BPF.
486ada6f083SXin LI  *
487ada6f083SXin LI  * Linux's ARCNET headers, however, have a 2-byte offset field
488ada6f083SXin LI  * between the host IDs and the type; that's what's handed up
489ada6f083SXin LI  * to userland via PF_PACKET sockets.
490ada6f083SXin LI  *
491ada6f083SXin LI  * We therefore have to have separate DLT_ values for them.
492ada6f083SXin LI  */
493ada6f083SXin LI #define DLT_ARCNET_LINUX	129	/* ARCNET */
494ada6f083SXin LI 
495ada6f083SXin LI /*
496ada6f083SXin LI  * Juniper-private data link types, as per request from
497ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
498ada6f083SXin LI  * for passing on chassis-internal metainformation such as
499ada6f083SXin LI  * QOS profiles, etc..
500ada6f083SXin LI  */
501ada6f083SXin LI #define DLT_JUNIPER_MLPPP       130
502ada6f083SXin LI #define DLT_JUNIPER_MLFR        131
503ada6f083SXin LI #define DLT_JUNIPER_ES          132
504ada6f083SXin LI #define DLT_JUNIPER_GGSN        133
505ada6f083SXin LI #define DLT_JUNIPER_MFR         134
506ada6f083SXin LI #define DLT_JUNIPER_ATM2        135
507ada6f083SXin LI #define DLT_JUNIPER_SERVICES    136
508ada6f083SXin LI #define DLT_JUNIPER_ATM1        137
509ada6f083SXin LI 
510ada6f083SXin LI /*
511ada6f083SXin LI  * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
512ada6f083SXin LI  * <dieter@apple.com>.  The header that's presented is an Ethernet-like
513ada6f083SXin LI  * header:
514ada6f083SXin LI  *
515ada6f083SXin LI  *	#define FIREWIRE_EUI64_LEN	8
516ada6f083SXin LI  *	struct firewire_header {
517ada6f083SXin LI  *		u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
518ada6f083SXin LI  *		u_char  firewire_shost[FIREWIRE_EUI64_LEN];
519ada6f083SXin LI  *		u_short firewire_type;
520ada6f083SXin LI  *	};
521ada6f083SXin LI  *
522ada6f083SXin LI  * with "firewire_type" being an Ethernet type value, rather than,
523ada6f083SXin LI  * for example, raw GASP frames being handed up.
524ada6f083SXin LI  */
525ada6f083SXin LI #define DLT_APPLE_IP_OVER_IEEE1394	138
526ada6f083SXin LI 
527ada6f083SXin LI /*
528ada6f083SXin LI  * Various SS7 encapsulations, as per a request from Jeff Morriss
529ada6f083SXin LI  * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
530ada6f083SXin LI  */
531ada6f083SXin LI #define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info, followed by MTP2 */
532ada6f083SXin LI #define DLT_MTP2		140	/* MTP2, without pseudo-header */
533ada6f083SXin LI #define DLT_MTP3		141	/* MTP3, without pseudo-header or MTP2 */
534ada6f083SXin LI #define DLT_SCCP		142	/* SCCP, without pseudo-header or MTP2 or MTP3 */
535ada6f083SXin LI 
536ada6f083SXin LI /*
537ada6f083SXin LI  * DOCSIS MAC frames.
538ada6f083SXin LI  */
539ada6f083SXin LI #define DLT_DOCSIS		143
540ada6f083SXin LI 
541ada6f083SXin LI /*
542*6f9cba8fSJoseph Mingrone  * Linux-IrDA packets. Protocol defined at https://www.irda.org.
543ada6f083SXin LI  * Those packets include IrLAP headers and above (IrLMP...), but
544ada6f083SXin LI  * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
545ada6f083SXin LI  * framing can be handled by the hardware and depend on the bitrate.
546ada6f083SXin LI  * This is exactly the format you would get capturing on a Linux-IrDA
547ada6f083SXin LI  * interface (irdaX), but not on a raw serial port.
548ada6f083SXin LI  * Note the capture is done in "Linux-cooked" mode, so each packet include
549ada6f083SXin LI  * a fake packet header (struct sll_header). This is because IrDA packet
550*6f9cba8fSJoseph Mingrone  * decoding is dependent on the direction of the packet (incoming or
551ada6f083SXin LI  * outgoing).
552ada6f083SXin LI  * When/if other platform implement IrDA capture, we may revisit the
553ada6f083SXin LI  * issue and define a real DLT_IRDA...
554ada6f083SXin LI  * Jean II
555ada6f083SXin LI  */
556ada6f083SXin LI #define DLT_LINUX_IRDA		144
557ada6f083SXin LI 
558ada6f083SXin LI /*
559ada6f083SXin LI  * Reserved for IBM SP switch and IBM Next Federation switch.
560ada6f083SXin LI  */
561ada6f083SXin LI #define DLT_IBM_SP		145
562ada6f083SXin LI #define DLT_IBM_SN		146
563ada6f083SXin LI 
564ada6f083SXin LI /*
565ada6f083SXin LI  * Reserved for private use.  If you have some link-layer header type
566ada6f083SXin LI  * that you want to use within your organization, with the capture files
567ada6f083SXin LI  * using that link-layer header type not ever be sent outside your
568ada6f083SXin LI  * organization, you can use these values.
569ada6f083SXin LI  *
570ada6f083SXin LI  * No libpcap release will use these for any purpose, nor will any
571ada6f083SXin LI  * tcpdump release use them, either.
572ada6f083SXin LI  *
573ada6f083SXin LI  * Do *NOT* use these in capture files that you expect anybody not using
574ada6f083SXin LI  * your private versions of capture-file-reading tools to read; in
575ada6f083SXin LI  * particular, do *NOT* use them in products, otherwise you may find that
576ada6f083SXin LI  * people won't be able to use tcpdump, or snort, or Ethereal, or... to
577ada6f083SXin LI  * read capture files from your firewall/intrusion detection/traffic
578ada6f083SXin LI  * monitoring/etc. appliance, or whatever product uses that DLT_ value,
579ada6f083SXin LI  * and you may also find that the developers of those applications will
580ada6f083SXin LI  * not accept patches to let them read those files.
581ada6f083SXin LI  *
582ada6f083SXin LI  * Also, do not use them if somebody might send you a capture using them
583ada6f083SXin LI  * for *their* private type and tools using them for *your* private type
584ada6f083SXin LI  * would have to read them.
585ada6f083SXin LI  *
586ada6f083SXin LI  * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
587ada6f083SXin LI  * as per the comment above, and use the type you're given.
588ada6f083SXin LI  */
589ada6f083SXin LI #define DLT_USER0		147
590ada6f083SXin LI #define DLT_USER1		148
591ada6f083SXin LI #define DLT_USER2		149
592ada6f083SXin LI #define DLT_USER3		150
593ada6f083SXin LI #define DLT_USER4		151
594ada6f083SXin LI #define DLT_USER5		152
595ada6f083SXin LI #define DLT_USER6		153
596ada6f083SXin LI #define DLT_USER7		154
597ada6f083SXin LI #define DLT_USER8		155
598ada6f083SXin LI #define DLT_USER9		156
599ada6f083SXin LI #define DLT_USER10		157
600ada6f083SXin LI #define DLT_USER11		158
601ada6f083SXin LI #define DLT_USER12		159
602ada6f083SXin LI #define DLT_USER13		160
603ada6f083SXin LI #define DLT_USER14		161
604ada6f083SXin LI #define DLT_USER15		162
605ada6f083SXin LI 
606ada6f083SXin LI /*
607ada6f083SXin LI  * For future use with 802.11 captures - defined by AbsoluteValue
608ada6f083SXin LI  * Systems to store a number of bits of link-layer information
609ada6f083SXin LI  * including radio information:
610ada6f083SXin LI  *
611ada6f083SXin LI  *	http://www.shaftnet.org/~pizza/software/capturefrm.txt
612ada6f083SXin LI  *
613ada6f083SXin LI  * but it might be used by some non-AVS drivers now or in the
614ada6f083SXin LI  * future.
615ada6f083SXin LI  */
616ada6f083SXin LI #define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
617ada6f083SXin LI 
618ada6f083SXin LI /*
619ada6f083SXin LI  * Juniper-private data link type, as per request from
620ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
621ada6f083SXin LI  * for passing on chassis-internal metainformation such as
622ada6f083SXin LI  * QOS profiles, etc..
623ada6f083SXin LI  */
624ada6f083SXin LI #define DLT_JUNIPER_MONITOR     164
625ada6f083SXin LI 
626ada6f083SXin LI /*
627ada6f083SXin LI  * BACnet MS/TP frames.
628ada6f083SXin LI  */
629ada6f083SXin LI #define DLT_BACNET_MS_TP	165
630ada6f083SXin LI 
631ada6f083SXin LI /*
632ada6f083SXin LI  * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
633ada6f083SXin LI  *
634ada6f083SXin LI  * This is used in some OSes to allow a kernel socket filter to distinguish
635ada6f083SXin LI  * between incoming and outgoing packets, on a socket intended to
636ada6f083SXin LI  * supply pppd with outgoing packets so it can do dial-on-demand and
637ada6f083SXin LI  * hangup-on-lack-of-demand; incoming packets are filtered out so they
638ada6f083SXin LI  * don't cause pppd to hold the connection up (you don't want random
639ada6f083SXin LI  * input packets such as port scans, packets from old lost connections,
640ada6f083SXin LI  * etc. to force the connection to stay up).
641ada6f083SXin LI  *
642d792dc7eSGordon Bergling  * The first byte of the PPP header (0xff03) is modified to accommodate
643ada6f083SXin LI  * the direction - 0x00 = IN, 0x01 = OUT.
644ada6f083SXin LI  */
645ada6f083SXin LI #define DLT_PPP_PPPD		166
646ada6f083SXin LI 
647ada6f083SXin LI /*
648ada6f083SXin LI  * Names for backwards compatibility with older versions of some PPP
649ada6f083SXin LI  * software; new software should use DLT_PPP_PPPD.
650ada6f083SXin LI  */
651ada6f083SXin LI #define DLT_PPP_WITH_DIRECTION	DLT_PPP_PPPD
652ada6f083SXin LI #define DLT_LINUX_PPP_WITHDIRECTION	DLT_PPP_PPPD
653ada6f083SXin LI 
654ada6f083SXin LI /*
655ada6f083SXin LI  * Juniper-private data link type, as per request from
656ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
657ada6f083SXin LI  * for passing on chassis-internal metainformation such as
658ada6f083SXin LI  * QOS profiles, cookies, etc..
659ada6f083SXin LI  */
660ada6f083SXin LI #define DLT_JUNIPER_PPPOE       167
661ada6f083SXin LI #define DLT_JUNIPER_PPPOE_ATM   168
662ada6f083SXin LI 
663ada6f083SXin LI #define DLT_GPRS_LLC		169	/* GPRS LLC */
664ada6f083SXin LI #define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
665ada6f083SXin LI #define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
666ada6f083SXin LI 
667ada6f083SXin LI /*
668ada6f083SXin LI  * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
669ada6f083SXin LI  * monitoring equipment.
670ada6f083SXin LI  */
671ada6f083SXin LI #define DLT_GCOM_T1E1		172
672ada6f083SXin LI #define DLT_GCOM_SERIAL		173
673ada6f083SXin LI 
674ada6f083SXin LI /*
675ada6f083SXin LI  * Juniper-private data link type, as per request from
676ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.  The DLT_ is used
677ada6f083SXin LI  * for internal communication to Physical Interface Cards (PIC)
678ada6f083SXin LI  */
679ada6f083SXin LI #define DLT_JUNIPER_PIC_PEER    174
680ada6f083SXin LI 
681ada6f083SXin LI /*
682ada6f083SXin LI  * Link types requested by Gregor Maier <gregor@endace.com> of Endace
683ada6f083SXin LI  * Measurement Systems.  They add an ERF header (see
684*6f9cba8fSJoseph Mingrone  * https://www.endace.com/support/EndaceRecordFormat.pdf) in front of
685ada6f083SXin LI  * the link-layer header.
686ada6f083SXin LI  */
687ada6f083SXin LI #define DLT_ERF_ETH		175	/* Ethernet */
688ada6f083SXin LI #define DLT_ERF_POS		176	/* Packet-over-SONET */
689ada6f083SXin LI 
690ada6f083SXin LI /*
691ada6f083SXin LI  * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
692ada6f083SXin LI  * for vISDN (http://www.orlandi.com/visdn/).  Its link-layer header
693ada6f083SXin LI  * includes additional information before the LAPD header, so it's
694ada6f083SXin LI  * not necessarily a generic LAPD header.
695ada6f083SXin LI  */
696ada6f083SXin LI #define DLT_LINUX_LAPD		177
697ada6f083SXin LI 
698ada6f083SXin LI /*
699ada6f083SXin LI  * Juniper-private data link type, as per request from
700ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
701ada6f083SXin LI  * The DLT_ are used for prepending meta-information
702ada6f083SXin LI  * like interface index, interface name
703ada6f083SXin LI  * before standard Ethernet, PPP, Frelay & C-HDLC Frames
704ada6f083SXin LI  */
705ada6f083SXin LI #define DLT_JUNIPER_ETHER       178
706ada6f083SXin LI #define DLT_JUNIPER_PPP         179
707ada6f083SXin LI #define DLT_JUNIPER_FRELAY      180
708ada6f083SXin LI #define DLT_JUNIPER_CHDLC       181
709ada6f083SXin LI 
710ada6f083SXin LI /*
711ada6f083SXin LI  * Multi Link Frame Relay (FRF.16)
712ada6f083SXin LI  */
713ada6f083SXin LI #define DLT_MFR                 182
714ada6f083SXin LI 
715ada6f083SXin LI /*
716ada6f083SXin LI  * Juniper-private data link type, as per request from
717ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
718ada6f083SXin LI  * The DLT_ is used for internal communication with a
719ada6f083SXin LI  * voice Adapter Card (PIC)
720ada6f083SXin LI  */
721ada6f083SXin LI #define DLT_JUNIPER_VP          183
722ada6f083SXin LI 
723ada6f083SXin LI /*
724ada6f083SXin LI  * Arinc 429 frames.
725ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
726ada6f083SXin LI  * Every frame contains a 32bit A429 label.
727ada6f083SXin LI  * More documentation on Arinc 429 can be found at
728*6f9cba8fSJoseph Mingrone  * https://web.archive.org/web/20040616233302/https://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
729ada6f083SXin LI  */
730ada6f083SXin LI #define DLT_A429                184
731ada6f083SXin LI 
732ada6f083SXin LI /*
733ada6f083SXin LI  * Arinc 653 Interpartition Communication messages.
734ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
735ada6f083SXin LI  * Please refer to the A653-1 standard for more information.
736ada6f083SXin LI  */
737ada6f083SXin LI #define DLT_A653_ICM            185
738ada6f083SXin LI 
739ada6f083SXin LI /*
740ada6f083SXin LI  * This used to be "USB packets, beginning with a USB setup header;
741ada6f083SXin LI  * requested by Paolo Abeni <paolo.abeni@email.it>."
742ada6f083SXin LI  *
743ada6f083SXin LI  * However, that header didn't work all that well - it left out some
744ada6f083SXin LI  * useful information - and was abandoned in favor of the DLT_USB_LINUX
745ada6f083SXin LI  * header.
746ada6f083SXin LI  *
747ada6f083SXin LI  * This is now used by FreeBSD for its BPF taps for USB; that has its
748ada6f083SXin LI  * own headers.  So it is written, so it is done.
749ada6f083SXin LI  *
750ada6f083SXin LI  * For source-code compatibility, we also define DLT_USB to have this
751ada6f083SXin LI  * value.  We do it numerically so that, if code that includes this
752ada6f083SXin LI  * file (directly or indirectly) also includes an OS header that also
753ada6f083SXin LI  * defines DLT_USB as 186, we don't get a redefinition warning.
754ada6f083SXin LI  * (NetBSD 7 does that.)
755ada6f083SXin LI  */
756ada6f083SXin LI #define DLT_USB_FREEBSD		186
757ada6f083SXin LI #define DLT_USB			186
758ada6f083SXin LI 
759ada6f083SXin LI /*
760ada6f083SXin LI  * Bluetooth HCI UART transport layer (part H:4); requested by
761ada6f083SXin LI  * Paolo Abeni.
762ada6f083SXin LI  */
763ada6f083SXin LI #define DLT_BLUETOOTH_HCI_H4	187
764ada6f083SXin LI 
765ada6f083SXin LI /*
766ada6f083SXin LI  * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
767ada6f083SXin LI  * <cruz_petagay@bah.com>.
768ada6f083SXin LI  */
769ada6f083SXin LI #define DLT_IEEE802_16_MAC_CPS	188
770ada6f083SXin LI 
771ada6f083SXin LI /*
772ada6f083SXin LI  * USB packets, beginning with a Linux USB header; requested by
773ada6f083SXin LI  * Paolo Abeni <paolo.abeni@email.it>.
774ada6f083SXin LI  */
775ada6f083SXin LI #define DLT_USB_LINUX		189
776ada6f083SXin LI 
777ada6f083SXin LI /*
778ada6f083SXin LI  * Controller Area Network (CAN) v. 2.0B packets.
779ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
780ada6f083SXin LI  * Used to dump CAN packets coming from a CAN Vector board.
781ada6f083SXin LI  * More documentation on the CAN v2.0B frames can be found at
782ada6f083SXin LI  * http://www.can-cia.org/downloads/?269
783ada6f083SXin LI  */
784ada6f083SXin LI #define DLT_CAN20B              190
785ada6f083SXin LI 
786ada6f083SXin LI /*
787ada6f083SXin LI  * IEEE 802.15.4, with address fields padded, as is done by Linux
788ada6f083SXin LI  * drivers; requested by Juergen Schimmer.
789ada6f083SXin LI  */
790ada6f083SXin LI #define DLT_IEEE802_15_4_LINUX	191
791ada6f083SXin LI 
792ada6f083SXin LI /*
793ada6f083SXin LI  * Per Packet Information encapsulated packets.
794ada6f083SXin LI  * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
795ada6f083SXin LI  */
796ada6f083SXin LI #define DLT_PPI			192
797ada6f083SXin LI 
798ada6f083SXin LI /*
799ada6f083SXin LI  * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
800ada6f083SXin LI  * requested by Charles Clancy.
801ada6f083SXin LI  */
802ada6f083SXin LI #define DLT_IEEE802_16_MAC_CPS_RADIO	193
803ada6f083SXin LI 
804ada6f083SXin LI /*
805ada6f083SXin LI  * Juniper-private data link type, as per request from
806ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
807ada6f083SXin LI  * The DLT_ is used for internal communication with a
808ada6f083SXin LI  * integrated service module (ISM).
809ada6f083SXin LI  */
810ada6f083SXin LI #define DLT_JUNIPER_ISM         194
811ada6f083SXin LI 
812ada6f083SXin LI /*
813ada6f083SXin LI  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
814ada6f083SXin LI  * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
815ada6f083SXin LI  * For this one, we expect the FCS to be present at the end of the frame;
816ada6f083SXin LI  * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used.
817*6f9cba8fSJoseph Mingrone  *
818*6f9cba8fSJoseph Mingrone  * We keep the name DLT_IEEE802_15_4 as an alias for backwards
819*6f9cba8fSJoseph Mingrone  * compatibility, but, again, this should *only* be used for 802.15.4
820*6f9cba8fSJoseph Mingrone  * frames that include the FCS.
821ada6f083SXin LI  */
822*6f9cba8fSJoseph Mingrone #define DLT_IEEE802_15_4_WITHFCS	195
823*6f9cba8fSJoseph Mingrone #define DLT_IEEE802_15_4		DLT_IEEE802_15_4_WITHFCS
824ada6f083SXin LI 
825ada6f083SXin LI /*
826ada6f083SXin LI  * Various link-layer types, with a pseudo-header, for SITA
827*6f9cba8fSJoseph Mingrone  * (https://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
828ada6f083SXin LI  */
829ada6f083SXin LI #define DLT_SITA		196
830ada6f083SXin LI 
831ada6f083SXin LI /*
832ada6f083SXin LI  * Various link-layer types, with a pseudo-header, for Endace DAG cards;
833ada6f083SXin LI  * encapsulates Endace ERF records.  Requested by Stephen Donnelly
834ada6f083SXin LI  * <stephen@endace.com>.
835ada6f083SXin LI  */
836ada6f083SXin LI #define DLT_ERF			197
837ada6f083SXin LI 
838ada6f083SXin LI /*
839ada6f083SXin LI  * Special header prepended to Ethernet packets when capturing from a
840ada6f083SXin LI  * u10 Networks board.  Requested by Phil Mulholland
841ada6f083SXin LI  * <phil@u10networks.com>.
842ada6f083SXin LI  */
843ada6f083SXin LI #define DLT_RAIF1		198
844ada6f083SXin LI 
845ada6f083SXin LI /*
846*6f9cba8fSJoseph Mingrone  * IPMB packet for IPMI, beginning with a 2-byte header, followed by
847*6f9cba8fSJoseph Mingrone  * the I2C slave address, followed by the netFn and LUN, etc..
848*6f9cba8fSJoseph Mingrone  * Requested by Chanthy Toeung <chanthy.toeung@ca.kontron.com>.
84957e22627SCy Schubert  *
85057e22627SCy Schubert  * XXX - this used to be called DLT_IPMB, back when we got the
85157e22627SCy Schubert  * impression from the email thread requesting it that the packet
85257e22627SCy Schubert  * had no extra 2-byte header.  We've renamed it; if anybody used
85357e22627SCy Schubert  * DLT_IPMB and assumed no 2-byte header, this will cause the compile
85457e22627SCy Schubert  * to fail, at which point we'll have to figure out what to do about
85557e22627SCy Schubert  * the two header types using the same DLT_/LINKTYPE_ value.  If that
85657e22627SCy Schubert  * doesn't happen, we'll assume nobody used it and that the redefinition
85757e22627SCy Schubert  * is safe.
858ada6f083SXin LI  */
85957e22627SCy Schubert #define DLT_IPMB_KONTRON	199
860ada6f083SXin LI 
861ada6f083SXin LI /*
862ada6f083SXin LI  * Juniper-private data link type, as per request from
863ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
864ada6f083SXin LI  * The DLT_ is used for capturing data on a secure tunnel interface.
865ada6f083SXin LI  */
866ada6f083SXin LI #define DLT_JUNIPER_ST          200
867ada6f083SXin LI 
868ada6f083SXin LI /*
869ada6f083SXin LI  * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
870ada6f083SXin LI  * that includes direction information; requested by Paolo Abeni.
871ada6f083SXin LI  */
872ada6f083SXin LI #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR	201
873ada6f083SXin LI 
874ada6f083SXin LI /*
875ada6f083SXin LI  * AX.25 packet with a 1-byte KISS header; see
876ada6f083SXin LI  *
877ada6f083SXin LI  *	http://www.ax25.net/kiss.htm
878ada6f083SXin LI  *
879ada6f083SXin LI  * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
880ada6f083SXin LI  */
881ada6f083SXin LI #define DLT_AX25_KISS		202
882ada6f083SXin LI 
883ada6f083SXin LI /*
884ada6f083SXin LI  * LAPD packets from an ISDN channel, starting with the address field,
885ada6f083SXin LI  * with no pseudo-header.
886ada6f083SXin LI  * Requested by Varuna De Silva <varunax@gmail.com>.
887ada6f083SXin LI  */
888ada6f083SXin LI #define DLT_LAPD		203
889ada6f083SXin LI 
890ada6f083SXin LI /*
891*6f9cba8fSJoseph Mingrone  * PPP, with a one-byte direction pseudo-header prepended - zero means
892*6f9cba8fSJoseph Mingrone  * "received by this host", non-zero (any non-zero value) means "sent by
893*6f9cba8fSJoseph Mingrone  * this host" - as per Will Barker <w.barker@zen.co.uk>.
894*6f9cba8fSJoseph Mingrone  *
895*6f9cba8fSJoseph Mingrone  * Don't confuse this with DLT_PPP_WITH_DIRECTION, which is an old
896*6f9cba8fSJoseph Mingrone  * name for what is now called DLT_PPP_PPPD.
897ada6f083SXin LI  */
898*6f9cba8fSJoseph Mingrone #define DLT_PPP_WITH_DIR	204
899*6f9cba8fSJoseph Mingrone 
900*6f9cba8fSJoseph Mingrone /*
901*6f9cba8fSJoseph Mingrone  * Cisco HDLC, with a one-byte direction pseudo-header prepended - zero
902*6f9cba8fSJoseph Mingrone  * means "received by this host", non-zero (any non-zero value) means
903*6f9cba8fSJoseph Mingrone  * "sent by this host" - as per Will Barker <w.barker@zen.co.uk>.
904*6f9cba8fSJoseph Mingrone  */
905*6f9cba8fSJoseph Mingrone #define DLT_C_HDLC_WITH_DIR	205
906*6f9cba8fSJoseph Mingrone 
907*6f9cba8fSJoseph Mingrone /*
908*6f9cba8fSJoseph Mingrone  * Frame Relay, with a one-byte direction pseudo-header prepended - zero
909*6f9cba8fSJoseph Mingrone  * means "received by this host" (DCE -> DTE), non-zero (any non-zero
910*6f9cba8fSJoseph Mingrone  * value) means "sent by this host" (DTE -> DCE) - as per Will Barker
911*6f9cba8fSJoseph Mingrone  * <w.barker@zen.co.uk>.
912*6f9cba8fSJoseph Mingrone  */
913*6f9cba8fSJoseph Mingrone #define DLT_FRELAY_WITH_DIR	206
914*6f9cba8fSJoseph Mingrone 
915*6f9cba8fSJoseph Mingrone /*
916*6f9cba8fSJoseph Mingrone  * LAPB, with a one-byte direction pseudo-header prepended - zero means
917*6f9cba8fSJoseph Mingrone  * "received by this host" (DCE -> DTE), non-zero (any non-zero value)
918*6f9cba8fSJoseph Mingrone  * means "sent by this host" (DTE -> DCE)- as per Will Barker
919*6f9cba8fSJoseph Mingrone  * <w.barker@zen.co.uk>.
920*6f9cba8fSJoseph Mingrone  */
921*6f9cba8fSJoseph Mingrone #define DLT_LAPB_WITH_DIR	207
922ada6f083SXin LI 
923ada6f083SXin LI /*
924ada6f083SXin LI  * 208 is reserved for an as-yet-unspecified proprietary link-layer
925ada6f083SXin LI  * type, as requested by Will Barker.
926ada6f083SXin LI  */
927ada6f083SXin LI 
928ada6f083SXin LI /*
929ada6f083SXin LI  * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
930ada6f083SXin LI  * <avn@pigeonpoint.com>.
931ada6f083SXin LI  */
932ada6f083SXin LI #define DLT_IPMB_LINUX		209
933ada6f083SXin LI 
934ada6f083SXin LI /*
935ada6f083SXin LI  * FlexRay automotive bus - http://www.flexray.com/ - as requested
936ada6f083SXin LI  * by Hannes Kaelber <hannes.kaelber@x2e.de>.
937ada6f083SXin LI  */
938ada6f083SXin LI #define DLT_FLEXRAY		210
939ada6f083SXin LI 
940ada6f083SXin LI /*
941ada6f083SXin LI  * Media Oriented Systems Transport (MOST) bus for multimedia
942*6f9cba8fSJoseph Mingrone  * transport - https://www.mostcooperation.com/ - as requested
943ada6f083SXin LI  * by Hannes Kaelber <hannes.kaelber@x2e.de>.
944ada6f083SXin LI  */
945ada6f083SXin LI #define DLT_MOST		211
946ada6f083SXin LI 
947ada6f083SXin LI /*
948ada6f083SXin LI  * Local Interconnect Network (LIN) bus for vehicle networks -
949ada6f083SXin LI  * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
950ada6f083SXin LI  * <hannes.kaelber@x2e.de>.
951ada6f083SXin LI  */
952ada6f083SXin LI #define DLT_LIN			212
953ada6f083SXin LI 
954ada6f083SXin LI /*
955ada6f083SXin LI  * X2E-private data link type used for serial line capture,
956ada6f083SXin LI  * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
957ada6f083SXin LI  */
958ada6f083SXin LI #define DLT_X2E_SERIAL		213
959ada6f083SXin LI 
960ada6f083SXin LI /*
961ada6f083SXin LI  * X2E-private data link type used for the Xoraya data logger
962ada6f083SXin LI  * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
963ada6f083SXin LI  */
964ada6f083SXin LI #define DLT_X2E_XORAYA		214
965ada6f083SXin LI 
966ada6f083SXin LI /*
967ada6f083SXin LI  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
968ada6f083SXin LI  * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
969ada6f083SXin LI  * of 0 as preamble, one octet of SFD, one octet of frame length+
970ada6f083SXin LI  * reserved bit, and then the MAC-layer data, starting with the
971ada6f083SXin LI  * frame control field).
972ada6f083SXin LI  *
973ada6f083SXin LI  * Requested by Max Filippov <jcmvbkbc@gmail.com>.
974ada6f083SXin LI  */
975ada6f083SXin LI #define DLT_IEEE802_15_4_NONASK_PHY	215
976ada6f083SXin LI 
977ada6f083SXin LI /*
978ada6f083SXin LI  * David Gibson <david@gibson.dropbear.id.au> requested this for
979ada6f083SXin LI  * captures from the Linux kernel /dev/input/eventN devices. This
980ada6f083SXin LI  * is used to communicate keystrokes and mouse movements from the
981ada6f083SXin LI  * Linux kernel to display systems, such as Xorg.
982ada6f083SXin LI  */
983ada6f083SXin LI #define DLT_LINUX_EVDEV		216
984ada6f083SXin LI 
985ada6f083SXin LI /*
986ada6f083SXin LI  * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
987ada6f083SXin LI  *
988ada6f083SXin LI  * Requested by Harald Welte <laforge@gnumonks.org>.
989ada6f083SXin LI  */
990ada6f083SXin LI #define DLT_GSMTAP_UM		217
991ada6f083SXin LI #define DLT_GSMTAP_ABIS		218
992ada6f083SXin LI 
993ada6f083SXin LI /*
994ada6f083SXin LI  * MPLS, with an MPLS label as the link-layer header.
995ada6f083SXin LI  * Requested by Michele Marchetto <michele@openbsd.org> on behalf
996ada6f083SXin LI  * of OpenBSD.
997ada6f083SXin LI  */
998ada6f083SXin LI #define DLT_MPLS		219
999ada6f083SXin LI 
1000ada6f083SXin LI /*
1001ada6f083SXin LI  * USB packets, beginning with a Linux USB header, with the USB header
1002ada6f083SXin LI  * padded to 64 bytes; required for memory-mapped access.
1003ada6f083SXin LI  */
1004ada6f083SXin LI #define DLT_USB_LINUX_MMAPPED	220
1005ada6f083SXin LI 
1006ada6f083SXin LI /*
1007ada6f083SXin LI  * DECT packets, with a pseudo-header; requested by
1008ada6f083SXin LI  * Matthias Wenzel <tcpdump@mazzoo.de>.
1009ada6f083SXin LI  */
1010ada6f083SXin LI #define DLT_DECT		221
1011ada6f083SXin LI 
1012ada6f083SXin LI /*
1013ada6f083SXin LI  * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
1014ada6f083SXin LI  * Date: Mon, 11 May 2009 11:18:30 -0500
1015ada6f083SXin LI  *
1016ada6f083SXin LI  * DLT_AOS. We need it for AOS Space Data Link Protocol.
1017ada6f083SXin LI  *   I have already written dissectors for but need an OK from
1018ada6f083SXin LI  *   legal before I can submit a patch.
1019ada6f083SXin LI  *
1020ada6f083SXin LI  */
1021ada6f083SXin LI #define DLT_AOS                 222
1022ada6f083SXin LI 
1023ada6f083SXin LI /*
1024ada6f083SXin LI  * Wireless HART (Highway Addressable Remote Transducer)
1025ada6f083SXin LI  * From the HART Communication Foundation
1026ada6f083SXin LI  * IES/PAS 62591
1027ada6f083SXin LI  *
1028ada6f083SXin LI  * Requested by Sam Roberts <vieuxtech@gmail.com>.
1029ada6f083SXin LI  */
1030ada6f083SXin LI #define DLT_WIHART		223
1031ada6f083SXin LI 
1032ada6f083SXin LI /*
1033ada6f083SXin LI  * Fibre Channel FC-2 frames, beginning with a Frame_Header.
1034ada6f083SXin LI  * Requested by Kahou Lei <kahou82@gmail.com>.
1035ada6f083SXin LI  */
1036ada6f083SXin LI #define DLT_FC_2		224
1037ada6f083SXin LI 
1038ada6f083SXin LI /*
1039ada6f083SXin LI  * Fibre Channel FC-2 frames, beginning with an encoding of the
1040ada6f083SXin LI  * SOF, and ending with an encoding of the EOF.
1041ada6f083SXin LI  *
1042ada6f083SXin LI  * The encodings represent the frame delimiters as 4-byte sequences
1043ada6f083SXin LI  * representing the corresponding ordered sets, with K28.5
1044ada6f083SXin LI  * represented as 0xBC, and the D symbols as the corresponding
1045ada6f083SXin LI  * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
1046ada6f083SXin LI  * is represented as 0xBC 0xB5 0x55 0x55.
1047ada6f083SXin LI  *
1048ada6f083SXin LI  * Requested by Kahou Lei <kahou82@gmail.com>.
1049ada6f083SXin LI  */
1050ada6f083SXin LI #define DLT_FC_2_WITH_FRAME_DELIMS	225
1051ada6f083SXin LI 
1052ada6f083SXin LI /*
1053ada6f083SXin LI  * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
1054ada6f083SXin LI  *
1055ada6f083SXin LI  * The pseudo-header starts with a one-byte version number; for version 2,
1056ada6f083SXin LI  * the pseudo-header is:
1057ada6f083SXin LI  *
1058ada6f083SXin LI  * struct dl_ipnetinfo {
10595fd1ea08SHans Petter Selasky  *     uint8_t   dli_version;
10605fd1ea08SHans Petter Selasky  *     uint8_t   dli_family;
10615fd1ea08SHans Petter Selasky  *     uint16_t  dli_htype;
10625fd1ea08SHans Petter Selasky  *     uint32_t  dli_pktlen;
10635fd1ea08SHans Petter Selasky  *     uint32_t  dli_ifindex;
10645fd1ea08SHans Petter Selasky  *     uint32_t  dli_grifindex;
10655fd1ea08SHans Petter Selasky  *     uint32_t  dli_zsrc;
10665fd1ea08SHans Petter Selasky  *     uint32_t  dli_zdst;
1067ada6f083SXin LI  * };
1068ada6f083SXin LI  *
1069ada6f083SXin LI  * dli_version is 2 for the current version of the pseudo-header.
1070ada6f083SXin LI  *
1071ada6f083SXin LI  * dli_family is a Solaris address family value, so it's 2 for IPv4
1072ada6f083SXin LI  * and 26 for IPv6.
1073ada6f083SXin LI  *
1074ada6f083SXin LI  * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
1075ada6f083SXin LI  * packets, and 2 for packets arriving from another zone on the same
1076ada6f083SXin LI  * machine.
1077ada6f083SXin LI  *
1078ada6f083SXin LI  * dli_pktlen is the length of the packet data following the pseudo-header
1079ada6f083SXin LI  * (so the captured length minus dli_pktlen is the length of the
1080ada6f083SXin LI  * pseudo-header, assuming the entire pseudo-header was captured).
1081ada6f083SXin LI  *
1082ada6f083SXin LI  * dli_ifindex is the interface index of the interface on which the
1083ada6f083SXin LI  * packet arrived.
1084ada6f083SXin LI  *
1085ada6f083SXin LI  * dli_grifindex is the group interface index number (for IPMP interfaces).
1086ada6f083SXin LI  *
1087ada6f083SXin LI  * dli_zsrc is the zone identifier for the source of the packet.
1088ada6f083SXin LI  *
1089ada6f083SXin LI  * dli_zdst is the zone identifier for the destination of the packet.
1090ada6f083SXin LI  *
1091ada6f083SXin LI  * A zone number of 0 is the global zone; a zone number of 0xffffffff
1092ada6f083SXin LI  * means that the packet arrived from another host on the network, not
1093ada6f083SXin LI  * from another zone on the same machine.
1094ada6f083SXin LI  *
1095ada6f083SXin LI  * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
1096ada6f083SXin LI  * which of those it is.
1097ada6f083SXin LI  */
1098ada6f083SXin LI #define DLT_IPNET		226
1099ada6f083SXin LI 
1100ada6f083SXin LI /*
1101ada6f083SXin LI  * CAN (Controller Area Network) frames, with a pseudo-header as supplied
1102ada6f083SXin LI  * by Linux SocketCAN, and with multi-byte numerical fields in that header
1103ada6f083SXin LI  * in big-endian byte order.
1104ada6f083SXin LI  *
1105ada6f083SXin LI  * See Documentation/networking/can.txt in the Linux source.
1106ada6f083SXin LI  *
1107ada6f083SXin LI  * Requested by Felix Obenhuber <felix@obenhuber.de>.
1108ada6f083SXin LI  */
1109ada6f083SXin LI #define DLT_CAN_SOCKETCAN	227
1110ada6f083SXin LI 
1111ada6f083SXin LI /*
1112ada6f083SXin LI  * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
1113ada6f083SXin LI  * whether it's v4 or v6.  Requested by Darren Reed <Darren.Reed@Sun.COM>.
1114ada6f083SXin LI  */
1115ada6f083SXin LI #define DLT_IPV4		228
1116ada6f083SXin LI #define DLT_IPV6		229
1117ada6f083SXin LI 
1118ada6f083SXin LI /*
1119ada6f083SXin LI  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
1120ada6f083SXin LI  * nothing), and with no FCS at the end of the frame; requested by
1121ada6f083SXin LI  * Jon Smirl <jonsmirl@gmail.com>.
1122ada6f083SXin LI  */
1123ada6f083SXin LI #define DLT_IEEE802_15_4_NOFCS	230
1124ada6f083SXin LI 
1125ada6f083SXin LI /*
1126ada6f083SXin LI  * Raw D-Bus:
1127ada6f083SXin LI  *
1128*6f9cba8fSJoseph Mingrone  *	https://www.freedesktop.org/wiki/Software/dbus
1129ada6f083SXin LI  *
1130ada6f083SXin LI  * messages:
1131ada6f083SXin LI  *
1132*6f9cba8fSJoseph Mingrone  *	https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
1133ada6f083SXin LI  *
1134ada6f083SXin LI  * starting with the endianness flag, followed by the message type, etc.,
1135ada6f083SXin LI  * but without the authentication handshake before the message sequence:
1136ada6f083SXin LI  *
1137*6f9cba8fSJoseph Mingrone  *	https://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
1138ada6f083SXin LI  *
1139ada6f083SXin LI  * Requested by Martin Vidner <martin@vidner.net>.
1140ada6f083SXin LI  */
1141ada6f083SXin LI #define DLT_DBUS		231
1142ada6f083SXin LI 
1143ada6f083SXin LI /*
1144ada6f083SXin LI  * Juniper-private data link type, as per request from
1145ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
1146ada6f083SXin LI  */
1147ada6f083SXin LI #define DLT_JUNIPER_VS			232
1148ada6f083SXin LI #define DLT_JUNIPER_SRX_E2E		233
1149ada6f083SXin LI #define DLT_JUNIPER_FIBRECHANNEL	234
1150ada6f083SXin LI 
1151ada6f083SXin LI /*
1152ada6f083SXin LI  * DVB-CI (DVB Common Interface for communication between a PC Card
1153ada6f083SXin LI  * module and a DVB receiver).  See
1154ada6f083SXin LI  *
1155*6f9cba8fSJoseph Mingrone  *	https://www.kaiser.cx/pcap-dvbci.html
1156ada6f083SXin LI  *
1157ada6f083SXin LI  * for the specification.
1158ada6f083SXin LI  *
1159ada6f083SXin LI  * Requested by Martin Kaiser <martin@kaiser.cx>.
1160ada6f083SXin LI  */
1161ada6f083SXin LI #define DLT_DVB_CI		235
1162ada6f083SXin LI 
1163ada6f083SXin LI /*
1164ada6f083SXin LI  * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
1165ada6f083SXin LI  * *not* the same as, 27.010).  Requested by Hans-Christoph Schemmel
1166ada6f083SXin LI  * <hans-christoph.schemmel@cinterion.com>.
1167ada6f083SXin LI  */
1168ada6f083SXin LI #define DLT_MUX27010		236
1169ada6f083SXin LI 
1170ada6f083SXin LI /*
1171ada6f083SXin LI  * STANAG 5066 D_PDUs.  Requested by M. Baris Demiray
1172ada6f083SXin LI  * <barisdemiray@gmail.com>.
1173ada6f083SXin LI  */
1174ada6f083SXin LI #define DLT_STANAG_5066_D_PDU	237
1175ada6f083SXin LI 
1176ada6f083SXin LI /*
1177ada6f083SXin LI  * Juniper-private data link type, as per request from
1178ada6f083SXin LI  * Hannes Gredler <hannes@juniper.net>.
1179ada6f083SXin LI  */
1180ada6f083SXin LI #define DLT_JUNIPER_ATM_CEMIC	238
1181ada6f083SXin LI 
1182ada6f083SXin LI /*
1183ada6f083SXin LI  * NetFilter LOG messages
1184ada6f083SXin LI  * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
1185ada6f083SXin LI  *
1186ada6f083SXin LI  * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
1187ada6f083SXin LI  */
1188ada6f083SXin LI #define DLT_NFLOG		239
1189ada6f083SXin LI 
1190ada6f083SXin LI /*
1191ada6f083SXin LI  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1192ada6f083SXin LI  * for Ethernet packets with a 4-byte pseudo-header and always
1193ada6f083SXin LI  * with the payload including the FCS, as supplied by their
1194ada6f083SXin LI  * netANALYZER hardware and software.
1195ada6f083SXin LI  *
1196ada6f083SXin LI  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
1197ada6f083SXin LI  */
1198ada6f083SXin LI #define DLT_NETANALYZER		240
1199ada6f083SXin LI 
1200ada6f083SXin LI /*
1201ada6f083SXin LI  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1202ada6f083SXin LI  * for Ethernet packets with a 4-byte pseudo-header and FCS and
1203ada6f083SXin LI  * with the Ethernet header preceded by 7 bytes of preamble and
1204ada6f083SXin LI  * 1 byte of SFD, as supplied by their netANALYZER hardware and
1205ada6f083SXin LI  * software.
1206ada6f083SXin LI  *
1207ada6f083SXin LI  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
1208ada6f083SXin LI  */
1209ada6f083SXin LI #define DLT_NETANALYZER_TRANSPARENT	241
1210ada6f083SXin LI 
1211ada6f083SXin LI /*
1212ada6f083SXin LI  * IP-over-InfiniBand, as specified by RFC 4391.
1213ada6f083SXin LI  *
1214ada6f083SXin LI  * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
1215ada6f083SXin LI  */
1216ada6f083SXin LI #define DLT_IPOIB		242
1217ada6f083SXin LI 
1218ada6f083SXin LI /*
1219ada6f083SXin LI  * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
1220ada6f083SXin LI  *
1221ada6f083SXin LI  * Requested by Guy Martin <gmsoft@tuxicoman.be>.
1222ada6f083SXin LI  */
1223ada6f083SXin LI #define DLT_MPEG_2_TS		243
1224ada6f083SXin LI 
1225ada6f083SXin LI /*
1226ada6f083SXin LI  * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
1227ada6f083SXin LI  * used by their ng40 protocol tester.
1228ada6f083SXin LI  *
1229ada6f083SXin LI  * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
1230ada6f083SXin LI  */
1231ada6f083SXin LI #define DLT_NG40		244
1232ada6f083SXin LI 
1233ada6f083SXin LI /*
1234ada6f083SXin LI  * Pseudo-header giving adapter number and flags, followed by an NFC
1235ada6f083SXin LI  * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
1236ada6f083SXin LI  * as specified by NFC Forum Logical Link Control Protocol Technical
1237ada6f083SXin LI  * Specification LLCP 1.1.
1238ada6f083SXin LI  *
1239ada6f083SXin LI  * Requested by Mike Wakerly <mikey@google.com>.
1240ada6f083SXin LI  */
1241ada6f083SXin LI #define DLT_NFC_LLCP		245
1242ada6f083SXin LI 
1243ada6f083SXin LI /*
1244ada6f083SXin LI  * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
1245ada6f083SXin LI  *
1246ada6f083SXin LI  * DLT_PFSYNC has different values on different platforms, and all of
1247ada6f083SXin LI  * them collide with something used elsewhere.  On platforms that
1248ada6f083SXin LI  * don't already define it, define it as 246.
1249ada6f083SXin LI  */
1250ada6f083SXin LI #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
1251ada6f083SXin LI #define DLT_PFSYNC		246
1252ada6f083SXin LI #endif
1253ada6f083SXin LI 
1254ada6f083SXin LI /*
1255ada6f083SXin LI  * Raw InfiniBand packets, starting with the Local Routing Header.
1256ada6f083SXin LI  *
1257ada6f083SXin LI  * Requested by Oren Kladnitsky <orenk@mellanox.com>.
1258ada6f083SXin LI  */
1259ada6f083SXin LI #define DLT_INFINIBAND		247
1260ada6f083SXin LI 
1261ada6f083SXin LI /*
1262ada6f083SXin LI  * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
1263ada6f083SXin LI  *
1264ada6f083SXin LI  * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
1265ada6f083SXin LI  */
1266ada6f083SXin LI #define DLT_SCTP		248
1267ada6f083SXin LI 
1268ada6f083SXin LI /*
1269ada6f083SXin LI  * USB packets, beginning with a USBPcap header.
1270ada6f083SXin LI  *
1271ada6f083SXin LI  * Requested by Tomasz Mon <desowin@gmail.com>
1272ada6f083SXin LI  */
1273ada6f083SXin LI #define DLT_USBPCAP		249
1274ada6f083SXin LI 
1275ada6f083SXin LI /*
1276ada6f083SXin LI  * Schweitzer Engineering Laboratories "RTAC" product serial-line
1277ada6f083SXin LI  * packets.
1278ada6f083SXin LI  *
1279ada6f083SXin LI  * Requested by Chris Bontje <chris_bontje@selinc.com>.
1280ada6f083SXin LI  */
1281ada6f083SXin LI #define DLT_RTAC_SERIAL		250
1282ada6f083SXin LI 
1283ada6f083SXin LI /*
1284ada6f083SXin LI  * Bluetooth Low Energy air interface link-layer packets.
1285ada6f083SXin LI  *
1286ada6f083SXin LI  * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
1287ada6f083SXin LI  */
1288ada6f083SXin LI #define DLT_BLUETOOTH_LE_LL	251
1289ada6f083SXin LI 
1290ada6f083SXin LI /*
1291*6f9cba8fSJoseph Mingrone  * DLT type for upper-protocol layer PDU saves from Wireshark.
1292ada6f083SXin LI  *
1293*6f9cba8fSJoseph Mingrone  * the actual contents are determined by two TAGs, one or more of
1294*6f9cba8fSJoseph Mingrone  * which is stored with each packet:
1295ada6f083SXin LI  *
1296*6f9cba8fSJoseph Mingrone  *   EXP_PDU_TAG_DISSECTOR_NAME      the name of the Wireshark dissector
1297ada6f083SXin LI  * 				     that can make sense of the data stored.
1298*6f9cba8fSJoseph Mingrone  *
1299*6f9cba8fSJoseph Mingrone  *   EXP_PDU_TAG_HEUR_DISSECTOR_NAME the name of the Wireshark heuristic
1300*6f9cba8fSJoseph Mingrone  *				     dissector that can make sense of the
1301*6f9cba8fSJoseph Mingrone  *				     data stored.
1302ada6f083SXin LI  */
1303ada6f083SXin LI #define DLT_WIRESHARK_UPPER_PDU	252
1304ada6f083SXin LI 
1305ada6f083SXin LI /*
1306ada6f083SXin LI  * DLT type for the netlink protocol (nlmon devices).
1307ada6f083SXin LI  */
1308ada6f083SXin LI #define DLT_NETLINK		253
1309ada6f083SXin LI 
1310ada6f083SXin LI /*
1311ada6f083SXin LI  * Bluetooth Linux Monitor headers for the BlueZ stack.
1312ada6f083SXin LI  */
1313ada6f083SXin LI #define DLT_BLUETOOTH_LINUX_MONITOR	254
1314ada6f083SXin LI 
1315ada6f083SXin LI /*
1316ada6f083SXin LI  * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
1317ada6f083SXin LI  * captured by Ubertooth.
1318ada6f083SXin LI  */
1319ada6f083SXin LI #define DLT_BLUETOOTH_BREDR_BB	255
1320ada6f083SXin LI 
1321ada6f083SXin LI /*
1322ada6f083SXin LI  * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
1323ada6f083SXin LI  */
1324ada6f083SXin LI #define DLT_BLUETOOTH_LE_LL_WITH_PHDR	256
1325ada6f083SXin LI 
1326ada6f083SXin LI /*
1327ada6f083SXin LI  * PROFIBUS data link layer.
1328ada6f083SXin LI  */
1329ada6f083SXin LI #define DLT_PROFIBUS_DL		257
1330ada6f083SXin LI 
1331ada6f083SXin LI /*
1332ada6f083SXin LI  * Apple's DLT_PKTAP headers.
1333ada6f083SXin LI  *
1334ada6f083SXin LI  * Sadly, the folks at Apple either had no clue that the DLT_USERn values
1335ada6f083SXin LI  * are for internal use within an organization and partners only, and
1336ada6f083SXin LI  * didn't know that the right way to get a link-layer header type is to
1337ada6f083SXin LI  * ask tcpdump.org for one, or knew and didn't care, so they just
1338ada6f083SXin LI  * used DLT_USER2, which causes problems for everything except for
1339ada6f083SXin LI  * their version of tcpdump.
1340ada6f083SXin LI  *
1341ada6f083SXin LI  * So I'll just give them one; hopefully this will show up in a
1342ada6f083SXin LI  * libpcap release in time for them to get this into 10.10 Big Sur
1343ada6f083SXin LI  * or whatever Mavericks' successor is called.  LINKTYPE_PKTAP
13445fd1ea08SHans Petter Selasky  * will be 258 *even on macOS*; that is *intentional*, so that
1345ada6f083SXin LI  * PKTAP files look the same on *all* OSes (different OSes can have
1346ada6f083SXin LI  * different numerical values for a given DLT_, but *MUST NOT* have
1347ada6f083SXin LI  * different values for what goes in a file, as files can be moved
1348ada6f083SXin LI  * between OSes!).
1349ada6f083SXin LI  *
1350ada6f083SXin LI  * When capturing, on a system with a Darwin-based OS, on a device
1351ada6f083SXin LI  * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this
1352ada6f083SXin LI  * version of libpcap, the DLT_ value for the pcap_t  will be DLT_PKTAP,
1353ada6f083SXin LI  * and that will continue to be DLT_USER2 on Darwin-based OSes. That way,
1354ada6f083SXin LI  * binary compatibility with Mavericks is preserved for programs using
1355ada6f083SXin LI  * this version of libpcap.  This does mean that if you were using
13565fd1ea08SHans Petter Selasky  * DLT_USER2 for some capture device on macOS, you can't do so with
1357ada6f083SXin LI  * this version of libpcap, just as you can't with Apple's libpcap -
13585fd1ea08SHans Petter Selasky  * on macOS, they define DLT_PKTAP to be DLT_USER2, so programs won't
1359ada6f083SXin LI  * be able to distinguish between PKTAP and whatever you were using
1360ada6f083SXin LI  * DLT_USER2 for.
1361ada6f083SXin LI  *
1362ada6f083SXin LI  * If the program saves the capture to a file using this version of
1363ada6f083SXin LI  * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be
1364ada6f083SXin LI  * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes.
1365ada6f083SXin LI  * That way, the file will *not* be a DLT_USER2 file.  That means
1366ada6f083SXin LI  * that the latest version of tcpdump, when built with this version
1367ada6f083SXin LI  * of libpcap, and sufficiently recent versions of Wireshark will
1368ada6f083SXin LI  * be able to read those files and interpret them correctly; however,
1369ada6f083SXin LI  * Apple's version of tcpdump in OS X 10.9 won't be able to handle
1370ada6f083SXin LI  * them.  (Hopefully, Apple will pick up this version of libpcap,
1371ada6f083SXin LI  * and the corresponding version of tcpdump, so that tcpdump will
1372ada6f083SXin LI  * be able to handle the old LINKTYPE_USER2 captures *and* the new
1373ada6f083SXin LI  * LINKTYPE_PKTAP captures.)
1374ada6f083SXin LI  */
1375ada6f083SXin LI #ifdef __APPLE__
1376ada6f083SXin LI #define DLT_PKTAP	DLT_USER2
1377ada6f083SXin LI #else
1378ada6f083SXin LI #define DLT_PKTAP	258
1379ada6f083SXin LI #endif
1380ada6f083SXin LI 
1381ada6f083SXin LI /*
1382ada6f083SXin LI  * Ethernet packets preceded by a header giving the last 6 octets
1383ada6f083SXin LI  * of the preamble specified by 802.3-2012 Clause 65, section
1384ada6f083SXin LI  * 65.1.3.2 "Transmit".
1385ada6f083SXin LI  */
1386ada6f083SXin LI #define DLT_EPON	259
1387ada6f083SXin LI 
1388ada6f083SXin LI /*
1389ada6f083SXin LI  * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
1390ada6f083SXin LI  * in the PICMG HPM.2 specification.
1391ada6f083SXin LI  */
1392ada6f083SXin LI #define DLT_IPMI_HPM_2	260
1393ada6f083SXin LI 
1394ada6f083SXin LI /*
1395ada6f083SXin LI  * per  Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
1396ada6f083SXin LI  */
1397ada6f083SXin LI #define DLT_ZWAVE_R1_R2  261
1398ada6f083SXin LI #define DLT_ZWAVE_R3     262
1399ada6f083SXin LI 
1400ada6f083SXin LI /*
1401ada6f083SXin LI  * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
1402ada6f083SXin LI  * Digital Lighting Management room bus serial protocol captures.
1403ada6f083SXin LI  */
1404ada6f083SXin LI #define DLT_WATTSTOPPER_DLM     263
1405ada6f083SXin LI 
1406ada6f083SXin LI /*
1407ada6f083SXin LI  * ISO 14443 contactless smart card messages.
1408ada6f083SXin LI  */
1409ada6f083SXin LI #define DLT_ISO_14443	264
1410ada6f083SXin LI 
1411ada6f083SXin LI /*
1412ada6f083SXin LI  * Radio data system (RDS) groups.  IEC 62106.
1413ada6f083SXin LI  * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
1414ada6f083SXin LI  */
1415ada6f083SXin LI #define DLT_RDS		265
1416ada6f083SXin LI 
1417ada6f083SXin LI /*
14185fd1ea08SHans Petter Selasky  * USB packets, beginning with a Darwin (macOS, etc.) header.
14195fd1ea08SHans Petter Selasky  */
14205fd1ea08SHans Petter Selasky #define DLT_USB_DARWIN	266
14215fd1ea08SHans Petter Selasky 
14225fd1ea08SHans Petter Selasky /*
14235fd1ea08SHans Petter Selasky  * OpenBSD DLT_OPENFLOW.
14245fd1ea08SHans Petter Selasky  */
14255fd1ea08SHans Petter Selasky #define DLT_OPENFLOW	267
14265fd1ea08SHans Petter Selasky 
14275fd1ea08SHans Petter Selasky /*
14285fd1ea08SHans Petter Selasky  * SDLC frames containing SNA PDUs.
14295fd1ea08SHans Petter Selasky  */
14305fd1ea08SHans Petter Selasky #define DLT_SDLC	268
14315fd1ea08SHans Petter Selasky 
14325fd1ea08SHans Petter Selasky /*
14335fd1ea08SHans Petter Selasky  * per "Selvig, Bjorn" <b.selvig@ti.com> used for
14345fd1ea08SHans Petter Selasky  * TI protocol sniffer.
14355fd1ea08SHans Petter Selasky  */
14365fd1ea08SHans Petter Selasky #define DLT_TI_LLN_SNIFFER	269
14375fd1ea08SHans Petter Selasky 
14385fd1ea08SHans Petter Selasky /*
14395fd1ea08SHans Petter Selasky  * per: Erik de Jong <erikdejong at gmail.com> for
14405fd1ea08SHans Petter Selasky  *   https://github.com/eriknl/LoRaTap/releases/tag/v0.1
14415fd1ea08SHans Petter Selasky  */
14425fd1ea08SHans Petter Selasky #define DLT_LORATAP             270
14435fd1ea08SHans Petter Selasky 
14445fd1ea08SHans Petter Selasky /*
14455fd1ea08SHans Petter Selasky  * per: Stefanha at gmail.com for
1446*6f9cba8fSJoseph Mingrone  *   https://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html
14475fd1ea08SHans Petter Selasky  * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h
1448*6f9cba8fSJoseph Mingrone  * for: https://qemu-project.org/Features/VirtioVsock
14495fd1ea08SHans Petter Selasky  */
14505fd1ea08SHans Petter Selasky #define DLT_VSOCK               271
14515fd1ea08SHans Petter Selasky 
14525fd1ea08SHans Petter Selasky /*
14535fd1ea08SHans Petter Selasky  * Nordic Semiconductor Bluetooth LE sniffer.
14545fd1ea08SHans Petter Selasky  */
14555fd1ea08SHans Petter Selasky #define DLT_NORDIC_BLE		272
14565fd1ea08SHans Petter Selasky 
14575fd1ea08SHans Petter Selasky /*
14585fd1ea08SHans Petter Selasky  * Excentis DOCSIS 3.1 RF sniffer (XRA-31)
14595fd1ea08SHans Petter Selasky  *   per: bruno.verstuyft at excentis.com
1460*6f9cba8fSJoseph Mingrone  *        https://www.xra31.com/xra-header
14615fd1ea08SHans Petter Selasky  */
14625fd1ea08SHans Petter Selasky #define DLT_DOCSIS31_XRA31	273
14635fd1ea08SHans Petter Selasky 
14645fd1ea08SHans Petter Selasky /*
14655fd1ea08SHans Petter Selasky  * mPackets, as specified by IEEE 802.3br Figure 99-4, starting
14665fd1ea08SHans Petter Selasky  * with the preamble and always ending with a CRC field.
14675fd1ea08SHans Petter Selasky  */
14685fd1ea08SHans Petter Selasky #define DLT_ETHERNET_MPACKET	274
14695fd1ea08SHans Petter Selasky 
14705fd1ea08SHans Petter Selasky /*
14715fd1ea08SHans Petter Selasky  * DisplayPort AUX channel monitoring data as specified by VESA
1472*6f9cba8fSJoseph Mingrone  * DisplayPort(DP) Standard preceded by a pseudo-header.
14735fd1ea08SHans Petter Selasky  *    per dirk.eibach at gdsys.cc
14745fd1ea08SHans Petter Selasky  */
14755fd1ea08SHans Petter Selasky #define DLT_DISPLAYPORT_AUX	275
14765fd1ea08SHans Petter Selasky 
14775fd1ea08SHans Petter Selasky /*
147857e22627SCy Schubert  * Linux cooked sockets v2.
147957e22627SCy Schubert  */
148057e22627SCy Schubert #define DLT_LINUX_SLL2	276
148157e22627SCy Schubert 
148257e22627SCy Schubert /*
1483*6f9cba8fSJoseph Mingrone  * Sercos Monitor, per Manuel Jacob <manuel.jacob at steinbeis-stg.de>
1484*6f9cba8fSJoseph Mingrone  */
1485*6f9cba8fSJoseph Mingrone #define DLT_SERCOS_MONITOR 277
1486*6f9cba8fSJoseph Mingrone 
1487*6f9cba8fSJoseph Mingrone /*
1488*6f9cba8fSJoseph Mingrone  * OpenVizsla http://openvizsla.org is open source USB analyzer hardware.
1489*6f9cba8fSJoseph Mingrone  * It consists of FPGA with attached USB phy and FTDI chip for streaming
1490*6f9cba8fSJoseph Mingrone  * the data to the host PC.
1491*6f9cba8fSJoseph Mingrone  *
1492*6f9cba8fSJoseph Mingrone  * Current OpenVizsla data encapsulation format is described here:
1493*6f9cba8fSJoseph Mingrone  * https://github.com/matwey/libopenvizsla/wiki/OpenVizsla-protocol-description
1494*6f9cba8fSJoseph Mingrone  *
1495*6f9cba8fSJoseph Mingrone  */
1496*6f9cba8fSJoseph Mingrone #define DLT_OPENVIZSLA	        278
1497*6f9cba8fSJoseph Mingrone 
1498*6f9cba8fSJoseph Mingrone /*
1499*6f9cba8fSJoseph Mingrone  * The Elektrobit High Speed Capture and Replay (EBHSCR) protocol is produced
1500*6f9cba8fSJoseph Mingrone  * by a PCIe Card for interfacing high speed automotive interfaces.
1501*6f9cba8fSJoseph Mingrone  *
1502*6f9cba8fSJoseph Mingrone  * The specification for this frame format can be found at:
1503*6f9cba8fSJoseph Mingrone  *   https://www.elektrobit.com/ebhscr
1504*6f9cba8fSJoseph Mingrone  *
1505*6f9cba8fSJoseph Mingrone  * for Guenter.Ebermann at elektrobit.com
1506*6f9cba8fSJoseph Mingrone  *
1507*6f9cba8fSJoseph Mingrone  */
1508*6f9cba8fSJoseph Mingrone #define DLT_EBHSCR	        279
1509*6f9cba8fSJoseph Mingrone 
1510*6f9cba8fSJoseph Mingrone /*
1511*6f9cba8fSJoseph Mingrone  * The https://fd.io vpp graph dispatch tracer produces pcap trace files
1512*6f9cba8fSJoseph Mingrone  * in the format documented here:
1513*6f9cba8fSJoseph Mingrone  * https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/developers/vnet.html#graph-dispatcher-pcap-tracing
1514*6f9cba8fSJoseph Mingrone  */
1515*6f9cba8fSJoseph Mingrone #define DLT_VPP_DISPATCH	280
1516*6f9cba8fSJoseph Mingrone 
1517*6f9cba8fSJoseph Mingrone /*
1518*6f9cba8fSJoseph Mingrone  * Broadcom Ethernet switches (ROBO switch) 4 bytes proprietary tagging format.
1519*6f9cba8fSJoseph Mingrone  */
1520*6f9cba8fSJoseph Mingrone #define DLT_DSA_TAG_BRCM	281
1521*6f9cba8fSJoseph Mingrone #define DLT_DSA_TAG_BRCM_PREPEND	282
1522*6f9cba8fSJoseph Mingrone 
1523*6f9cba8fSJoseph Mingrone /*
1524*6f9cba8fSJoseph Mingrone  * IEEE 802.15.4 with pseudo-header and optional meta-data TLVs, PHY payload
1525*6f9cba8fSJoseph Mingrone  * exactly as it appears in the spec (no padding, no nothing), and FCS if
1526*6f9cba8fSJoseph Mingrone  * specified by FCS Type TLV;  requested by James Ko <jck@exegin.com>.
1527*6f9cba8fSJoseph Mingrone  * Specification at https://github.com/jkcko/ieee802.15.4-tap
1528*6f9cba8fSJoseph Mingrone  */
1529*6f9cba8fSJoseph Mingrone #define DLT_IEEE802_15_4_TAP    283
1530*6f9cba8fSJoseph Mingrone 
1531*6f9cba8fSJoseph Mingrone /*
1532*6f9cba8fSJoseph Mingrone  * Marvell (Ethertype) Distributed Switch Architecture proprietary tagging format.
1533*6f9cba8fSJoseph Mingrone  */
1534*6f9cba8fSJoseph Mingrone #define DLT_DSA_TAG_DSA		284
1535*6f9cba8fSJoseph Mingrone #define DLT_DSA_TAG_EDSA	285
1536*6f9cba8fSJoseph Mingrone 
1537*6f9cba8fSJoseph Mingrone /*
1538*6f9cba8fSJoseph Mingrone  * Payload of lawful intercept packets using the ELEE protocol;
1539*6f9cba8fSJoseph Mingrone  * https://socket.hr/draft-dfranusic-opsawg-elee-00.xml
1540*6f9cba8fSJoseph Mingrone  * https://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi?url=https://socket.hr/draft-dfranusic-opsawg-elee-00.xml&modeAsFormat=html/ascii
1541*6f9cba8fSJoseph Mingrone  */
1542*6f9cba8fSJoseph Mingrone #define DLT_ELEE		286
1543*6f9cba8fSJoseph Mingrone 
1544*6f9cba8fSJoseph Mingrone /*
1545*6f9cba8fSJoseph Mingrone  * Serial frames transmitted between a host and a Z-Wave chip.
1546*6f9cba8fSJoseph Mingrone  */
1547*6f9cba8fSJoseph Mingrone #define DLT_Z_WAVE_SERIAL	287
1548*6f9cba8fSJoseph Mingrone 
1549*6f9cba8fSJoseph Mingrone /*
1550*6f9cba8fSJoseph Mingrone  * USB 2.0, 1.1, and 1.0 packets as transmitted over the cable.
1551*6f9cba8fSJoseph Mingrone  */
1552*6f9cba8fSJoseph Mingrone #define DLT_USB_2_0		288
1553*6f9cba8fSJoseph Mingrone 
1554*6f9cba8fSJoseph Mingrone /*
1555*6f9cba8fSJoseph Mingrone  * ATSC Link-Layer Protocol (A/330) packets.
1556*6f9cba8fSJoseph Mingrone  */
1557*6f9cba8fSJoseph Mingrone #define DLT_ATSC_ALP		289
1558*6f9cba8fSJoseph Mingrone 
1559*6f9cba8fSJoseph Mingrone /*
1560ada6f083SXin LI  * In case the code that includes this file (directly or indirectly)
1561ada6f083SXin LI  * has also included OS files that happen to define DLT_MATCHING_MAX,
1562ada6f083SXin LI  * with a different value (perhaps because that OS hasn't picked up
1563ada6f083SXin LI  * the latest version of our DLT definitions), we undefine the
1564ada6f083SXin LI  * previous value of DLT_MATCHING_MAX.
1565ada6f083SXin LI  */
1566ada6f083SXin LI #ifdef DLT_MATCHING_MAX
1567ada6f083SXin LI #undef DLT_MATCHING_MAX
1568ada6f083SXin LI #endif
1569*6f9cba8fSJoseph Mingrone #define DLT_MATCHING_MAX	289	/* highest value in the "matching" range */
1570ada6f083SXin LI 
1571ada6f083SXin LI /*
1572ada6f083SXin LI  * DLT and savefile link type values are split into a class and
1573ada6f083SXin LI  * a member of that class.  A class value of 0 indicates a regular
1574ada6f083SXin LI  * DLT_/LINKTYPE_ value.
1575ada6f083SXin LI  */
1576ada6f083SXin LI #define DLT_CLASS(x)		((x) & 0x03ff0000)
1577ada6f083SXin LI 
1578ada6f083SXin LI /*
1579ada6f083SXin LI  * NetBSD-specific generic "raw" link type.  The class value indicates
1580ada6f083SXin LI  * that this is the generic raw type, and the lower 16 bits are the
1581ada6f083SXin LI  * address family we're dealing with.  Those values are NetBSD-specific;
1582ada6f083SXin LI  * do not assume that they correspond to AF_ values for your operating
1583ada6f083SXin LI  * system.
1584ada6f083SXin LI  */
1585ada6f083SXin LI #define	DLT_CLASS_NETBSD_RAWAF	0x02240000
1586ada6f083SXin LI #define	DLT_NETBSD_RAWAF(af)	(DLT_CLASS_NETBSD_RAWAF | (af))
1587ada6f083SXin LI #define	DLT_NETBSD_RAWAF_AF(x)	((x) & 0x0000ffff)
1588ada6f083SXin LI #define	DLT_IS_NETBSD_RAWAF(x)	(DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
1589ada6f083SXin LI 
1590ada6f083SXin LI #endif /* !_NET_DLT_H_ */
1591