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