xref: /dragonfly/sys/net/dlt.h (revision d8d5b238)
1 /*
2  * Copyright (c) 1990, 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from the Stanford/CMU enet packet filter,
6  * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7  * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8  * Berkeley Laboratory.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. Neither the name of the University nor the names of its contributors
19  *    may be used to endorse or promote products derived from this software
20  *    without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  *
34  *      @(#)bpf.h	8.1 (Berkeley) 6/10/93
35  *	@(#)bpf.h	1.34 (LBL)     6/16/96
36  *
37  * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.34.2.24 2007/09/19 02:52:12 guy Exp $ (LBL)
38  *
39  * $FreeBSD: src/sys/net/bpf.h,v 1.21.2.4 2002/07/05 14:40:00 fenner Exp $
40  * $DragonFly: src/sys/net/bpf.h,v 1.12 2008/03/14 09:52:10 matthias Exp $
41  */
42 
43 #ifndef _NET_DLT_H_
44 #define _NET_DLT_H_
45 
46 /*
47  * Data-link level type codes.
48  */
49 #define DLT_NULL	0	/* no link-layer encapsulation */
50 #define DLT_EN10MB	1	/* Ethernet (10Mb) */
51 #define DLT_EN3MB	2	/* Experimental Ethernet (3Mb) */
52 #define DLT_AX25	3	/* Amateur Radio AX.25 */
53 #define DLT_PRONET	4	/* Proteon ProNET Token Ring */
54 #define DLT_CHAOS	5	/* Chaos */
55 #define DLT_IEEE802	6	/* 802.5 Token Ring */
56 #define DLT_ARCNET	7	/* ARCNET */
57 #define DLT_SLIP	8	/* Serial Line IP */
58 #define DLT_PPP		9	/* Point-to-point Protocol */
59 #define DLT_FDDI	10	/* FDDI */
60 #define DLT_ATM_RFC1483	11	/* LLC/SNAP encapsulated atm */
61 #define DLT_RAW		12	/* raw IP */
62 
63 /* 13 - 14 unused */
64 
65 #define DLT_SLIP_BSDOS	15	/* BSD/OS Serial Line IP */
66 #define DLT_PPP_BSDOS	16	/* BSD/OS Point-to-point Protocol */
67 #define DLT_PFSYNC	18	/* Packet filter state syncing */
68 #define DLT_ATM_CLIP	19	/* Linux Classical-IP over ATM */
69 
70 /* 20 - 31 unused */
71 
72 #define DLT_REDBACK_SMARTEDGE	32	/* Redback SmartEdge 400/800 */
73 
74 /* 33 - 49 unused */
75 
76 #define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
77 #define DLT_PPP_ETHER	51	/* PPP over Ethernet */
78 
79 /* 52 - 98 unused */
80 
81 #define DLT_SYMANTEC_FIREWALL	99	/* Symantec Enterprise Firewall */
82 
83 /*
84  * Values starting with 104 are used for newly-assigned link-layer
85  * header type values; for those link-layer header types, the DLT_
86  * value returned by pcap_datalink() and passed to pcap_open_dead(),
87  * and the LINKTYPE_ value that appears in capture files, are the
88  * same.
89  *
90  * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
91  * the highest such value.
92  */
93 #define DLT_MATCHING_MIN	104
94 
95 /* 100 - 103 unused */
96 
97 #define DLT_C_HDLC		104	/* Cisco HDLC */
98 #define DLT_CHDLC		DLT_C_HDLC
99 #define DLT_IEEE802_11		105	/* IEEE 802.11 wireless */
100 #define DLT_FRELAY		107	/* Q.922 Frame Relay */
101 #define DLT_LOOP		108	/* loopback */
102 #define DLT_ENC			109	/* Encapsulated packets for IPsec */
103 
104 /* 110 - 112 unused */
105 
106 #define DLT_LINUX_SLL		113	/* Linux cooked sockets */
107 #define DLT_LTALK		114	/* Apple LocalTalk hardware */
108 #define DLT_ECONET		115	/* Acorn Econet */
109 #define DLT_IPFILTER		116	/* OpenBSD ipfilter */
110 #define DLT_PFLOG		117	/* Packet filter logging */
111 #define DLT_CISCO_IOS		118	/* Cisco-internal use */
112 #define DLT_PRISM_HEADER	119	/* 802.11 plus Prism II radio header */
113 #define DLT_AIRONET_HEADER	120	/* 802.11 plus Aironet radio header */
114 #define DLT_HHDLC		121	/* Siemens HiPath HDLC */
115 #define DLT_IP_OVER_FC		122	/* RFC2625 IP-over-Fibre Channel */
116 #define DLT_SUNATM		123	/* Solaris+SunATM */
117 #define DLT_RIO			124	/* RapidIO */
118 #define DLT_PCI_EXP		125	/* PCI Express */
119 #define DLT_AURORA		126	/* Xilinx Aurora link layer */
120 #ifndef DLT_IEEE802_11_RADIO
121 #define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
122 #endif
123 #define DLT_TZSP		128	/* Tazmen Sniffer Protocol */
124 #define DLT_ARCNET_LINUX	129	/* Linux ARCNET */
125 #define DLT_JUNIPER_MLPPP	130	/* Juniper private */
126 #define DLT_JUNIPER_MLFR	131	/* Juniper private */
127 #define DLT_JUNIPER_ES		132	/* Juniper private */
128 #define DLT_JUNIPER_GGSN	133	/* Juniper private */
129 #define DLT_JUNIPER_MFR		134	/* Juniper private */
130 #define DLT_JUNIPER_ATM2	135	/* Juniper private */
131 #define DLT_JUNIPER_SERVICES	136	/* Juniper private */
132 #define DLT_JUNIPER_ATM1	137	/* Juniper private */
133 #define DLT_APPLE_IP_OVER_IEEE1394 138	/* Apple IP-over-IEEE 1394 */
134 #define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info,
135 					 * followed by MTP2 */
136 #define DLT_MTP2		140	/* MTP2, w/o pseudo-header */
137 #define DLT_MTP3		141	/* MTP3, w/o pseudo-header or MTP2 */
138 #define DLT_SCCP		142	/* SCCP, w/o pseudo-header or MTP2
139 					 * or MTP3 */
140 #define DLT_DOCSIS		143	/* DOCSIS MAC frames */
141 #define DLT_LINUX_IRDA		144	/* Linux IrDA */
142 #define DLT_IBM_SP		145	/* IBM SP switch */
143 #define DLT_IBM_SN		146	/* IBM Next Federation switch */
144 
145 /*
146  * Reserved for private use.  If you have some link-layer header type
147  * that you want to use within your organization, with the capture files
148  * using that link-layer header type not ever be sent outside your
149  * organization, you can use these values.
150  *
151  * No libpcap release will use these for any purpose, nor will any
152  * tcpdump release use them, either.
153  *
154  * Do *NOT* use these in capture files that you expect anybody not using
155  * your private versions of capture-file-reading tools to read; in
156  * particular, do *NOT* use them in products, otherwise you may find that
157  * people won't be able to use tcpdump, or snort, or Ethereal, or... to
158  * read capture files from your firewall/intrusion detection/traffic
159  * monitoring/etc. appliance, or whatever product uses that DLT_ value,
160  * and you may also find that the developers of those applications will
161  * not accept patches to let them read those files.
162  *
163  * Also, do not use them if somebody might send you a capture using them
164  * for *their* private type and tools using them for *your* private type
165  * would have to read them.
166  *
167  * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
168  * as per the comment above, and use the type you're given.
169  */
170 #define DLT_USER0		147
171 #define DLT_USER1		148
172 #define DLT_USER2		149
173 #define DLT_USER3		150
174 #define DLT_USER4		151
175 #define DLT_USER5		152
176 #define DLT_USER6		153
177 #define DLT_USER7		154
178 #define DLT_USER8		155
179 #define DLT_USER9		156
180 #define DLT_USER10		157
181 #define DLT_USER11		158
182 #define DLT_USER12		159
183 #define DLT_USER13		160
184 #define DLT_USER14		161
185 #define DLT_USER15		162
186 
187 #define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
188 #define DLT_JUNIPER_MONITOR	164	/* Juniper private */
189 #define DLT_BACNET_MS_TP	165	/* BACnet MS/TP */
190 #define DLT_PPP_PPPD		166	/* Linux PPP variant */
191 #define DLT_JUNIPER_PPPOE	167	/* Juniper private */
192 #define DLT_JUNIPER_PPPOE_ATM	168	/* Juniper private */
193 #define DLT_GPRS_LLC		169	/* GPRS LLC */
194 #define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
195 #define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
196 #define DLT_GCOM_T1E1		172	/* Gcom's T1/E1 */
197 #define DLT_GCOM_SERIAL		173	/* Gcom's T1/E1 */
198 #define DLT_JUNIPER_PIC_PEER	174	/* Juniper private */
199 #define DLT_ERF_ETH		175	/* Ethernet plus ERF header */
200 #define DLT_ERF_POS		176	/* Packet-over-SONET plus ERF header */
201 #define DLT_LINUX_LAPD		177	/* raw LAPD plus addition info */
202 #define DLT_JUNIPER_ETHER	178	/* Juniper private */
203 #define DLT_JUNIPER_PPP		179	/* Juniper private */
204 #define DLT_JUNIPER_FRELAY	180	/* Juniper private */
205 #define DLT_JUNIPER_CHDLC	181	/* Juniper private */
206 #define DLT_MFR                 182	/* Multi Link Frame Relay (FRF.16) */
207 #define DLT_JUNIPER_VP          183	/* Juniper private */
208 #define DLT_A429                184	/* Arinc 429 frames */
209 #define DLT_A653_ICM            185	/* Arinc 653 Interpartition
210 					 * Communication messages */
211 /*
212  * This used to be "USB packets, beginning with a USB setup header;
213  * requested by Paolo Abeni <paolo.abeni@email.it>."
214  *
215  * However, that header didn't work all that well - it left out some
216  * useful information - and was abandoned in favor of the DLT_USB_LINUX
217  * header.
218  *
219  * This is now used by FreeBSD for its BPF taps for USB; that has its
220  * own headers.  So it is written, so it is done.
221  *
222  * For source-code compatibility, we also define DLT_USB to have this
223  * value.  We do it numerically so that, if code that includes this
224  * file (directly or indirectly) also includes an OS header that also
225  * defines DLT_USB as 186, we don't get a redefinition warning.
226  * (NetBSD 7 does that.)
227  */
228 #define DLT_USB_FREEBSD		186
229 #define DLT_USB			186
230 
231 #define DLT_BLUETOOTH_HCI_H4	187	/* Bluetooth HCI UART transport layer
232 					 * (part H:4) */
233 #define DLT_IEEE802_16_MAC_CPS	188	/* IEEE 802.16 MAC Common Part
234 					 * Sublayer */
235 #define DLT_USB_LINUX		189	/* USB packets plus Linux USB header */
236 #define DLT_CAN20B		190	/* Controller Area Network (CAN)
237 					 * v. 2.0B */
238 #define DLT_IEEE802_15_4_LINUX	191	/* IEEE 802.15.4, with address fields
239 					 * padded */
240 #define DLT_PPI			192	/* Per Packet Information encapsulated
241 					 * packets */
242 #define DLT_IEEE802_16_MAC_CPS_RADIO 193 /* 802.16 MAC Common Part Sublayer
243 					  * plus a radiotap radio header */
244 #define DLT_JUNIPER_ISM		194	/* Juniper private */
245 #define DLT_IEEE802_15_4	195	/* IEEE 802.15.4 */
246 #define DLT_SITA		196	/* SITA plus a pseudo-header */
247 #define DLT_ERF			197	/* Endace ERF records plus
248 					 * pseudo-header */
249 #define DLT_RAIF1		198	/* Ethernet plus special header */
250 #define DLT_IPMB		199	/* IPMB packet for IPMI */
251 #define DLT_JUNIPER_ST		200	/* Juniper private */
252 #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 /* Bluetooth HCI UART transport
253 					    * layer (part H:4) plus
254 					    * pseudo-header */
255 #define DLT_AX25_KISS		202	/* AX.25 packet with a 1-byte KISS
256 					 * header */
257 #define DLT_LAPD		203	/* LAPD packets from an ISDN channel,
258 					 * starting with the address field,
259 					 * with no pseudo-header */
260 #define DLT_PPP_WITH_DIR	204	/* PPP */
261 #define DLT_C_HDLC_WITH_DIR	205	/* Cisco HDLC */
262 #define DLT_FRELAY_WITH_DIR	206	/* Frame Relay */
263 #define DLT_LAPB_WITH_DIR	207	/* LAPB */
264 
265 /* 208 unused */
266 
267 #define DLT_IPMB_LINUX		209	/* IPMB with a Linux-specific
268 					 * pseudo-header */
269 #define DLT_FLEXRAY		210	/* FlexRay automotive bus */
270 #define DLT_MOST		211	/* Media Oriented Systems Transport
271 					 * (MOST) bus */
272 #define DLT_LIN			212	/* Local Interconnect Network
273 					 * (LIN) bus */
274 #define DLT_X2E_SERIAL		213	/* X2E-private */
275 #define DLT_X2E_XORAYA		214	/* X2E-private */
276 #define DLT_IEEE802_15_4_NONASK_PHY 215	/* IEEE 802.15.4, with the PHY-level
277 					 * data for non-ASK PHYs */
278 #define DLT_IEEE802_15_4_NONASK_PHY	215
279 
280 /*
281  * David Gibson <david@gibson.dropbear.id.au> requested this for
282  * captures from the Linux kernel /dev/input/eventN devices. This
283  * is used to communicate keystrokes and mouse movements from the
284  * Linux kernel to display systems, such as Xorg.
285  */
286 #define DLT_LINUX_EVDEV		216
287 
288 /*
289  * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
290  *
291  * Requested by Harald Welte <laforge@gnumonks.org>.
292  */
293 #define DLT_GSMTAP_UM		217
294 #define DLT_GSMTAP_ABIS		218
295 
296 /*
297  * MPLS, with an MPLS label as the link-layer header.
298  * Requested by Michele Marchetto <michele@openbsd.org> on behalf
299  * of OpenBSD.
300  */
301 #define DLT_MPLS		219
302 
303 /*
304  * USB packets, beginning with a Linux USB header, with the USB header
305  * padded to 64 bytes; required for memory-mapped access.
306  */
307 #define DLT_USB_LINUX_MMAPPED	220
308 
309 /*
310  * DECT packets, with a pseudo-header; requested by
311  * Matthias Wenzel <tcpdump@mazzoo.de>.
312  */
313 #define DLT_DECT		221
314 
315 /*
316  * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
317  * Date: Mon, 11 May 2009 11:18:30 -0500
318  *
319  * DLT_AOS. We need it for AOS Space Data Link Protocol.
320  *   I have already written dissectors for but need an OK from
321  *   legal before I can submit a patch.
322  *
323  */
324 #define DLT_AOS                 222
325 
326 /*
327  * Wireless HART (Highway Addressable Remote Transducer)
328  * From the HART Communication Foundation
329  * IES/PAS 62591
330  *
331  * Requested by Sam Roberts <vieuxtech@gmail.com>.
332  */
333 #define DLT_WIHART		223
334 
335 /*
336  * Fibre Channel FC-2 frames, beginning with a Frame_Header.
337  * Requested by Kahou Lei <kahou82@gmail.com>.
338  */
339 #define DLT_FC_2		224
340 
341 /*
342  * Fibre Channel FC-2 frames, beginning with an encoding of the
343  * SOF, and ending with an encoding of the EOF.
344  *
345  * The encodings represent the frame delimiters as 4-byte sequences
346  * representing the corresponding ordered sets, with K28.5
347  * represented as 0xBC, and the D symbols as the corresponding
348  * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
349  * is represented as 0xBC 0xB5 0x55 0x55.
350  *
351  * Requested by Kahou Lei <kahou82@gmail.com>.
352  */
353 #define DLT_FC_2_WITH_FRAME_DELIMS	225
354 
355 /*
356  * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
357  *
358  * The pseudo-header starts with a one-byte version number; for version 2,
359  * the pseudo-header is:
360  *
361  * struct dl_ipnetinfo {
362  *     u_int8_t   dli_version;
363  *     u_int8_t   dli_family;
364  *     u_int16_t  dli_htype;
365  *     u_int32_t  dli_pktlen;
366  *     u_int32_t  dli_ifindex;
367  *     u_int32_t  dli_grifindex;
368  *     u_int32_t  dli_zsrc;
369  *     u_int32_t  dli_zdst;
370  * };
371  *
372  * dli_version is 2 for the current version of the pseudo-header.
373  *
374  * dli_family is a Solaris address family value, so it's 2 for IPv4
375  * and 26 for IPv6.
376  *
377  * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
378  * packets, and 2 for packets arriving from another zone on the same
379  * machine.
380  *
381  * dli_pktlen is the length of the packet data following the pseudo-header
382  * (so the captured length minus dli_pktlen is the length of the
383  * pseudo-header, assuming the entire pseudo-header was captured).
384  *
385  * dli_ifindex is the interface index of the interface on which the
386  * packet arrived.
387  *
388  * dli_grifindex is the group interface index number (for IPMP interfaces).
389  *
390  * dli_zsrc is the zone identifier for the source of the packet.
391  *
392  * dli_zdst is the zone identifier for the destination of the packet.
393  *
394  * A zone number of 0 is the global zone; a zone number of 0xffffffff
395  * means that the packet arrived from another host on the network, not
396  * from another zone on the same machine.
397  *
398  * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
399  * which of those it is.
400  */
401 #define DLT_IPNET		226
402 
403 /*
404  * CAN (Controller Area Network) frames, with a pseudo-header as supplied
405  * by Linux SocketCAN, and with multi-byte numerical fields in that header
406  * in big-endian byte order.
407  *
408  * See Documentation/networking/can.txt in the Linux source.
409  *
410  * Requested by Felix Obenhuber <felix@obenhuber.de>.
411  */
412 #define DLT_CAN_SOCKETCAN	227
413 
414 /*
415  * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
416  * whether it's v4 or v6.  Requested by Darren Reed <Darren.Reed@Sun.COM>.
417  */
418 #define DLT_IPV4		228
419 #define DLT_IPV6		229
420 
421 /*
422  * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
423  * nothing), and with no FCS at the end of the frame; requested by
424  * Jon Smirl <jonsmirl@gmail.com>.
425  */
426 #define DLT_IEEE802_15_4_NOFCS	230
427 
428 /*
429  * Raw D-Bus:
430  *
431  *	http://www.freedesktop.org/wiki/Software/dbus
432  *
433  * messages:
434  *
435  *	http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
436  *
437  * starting with the endianness flag, followed by the message type, etc.,
438  * but without the authentication handshake before the message sequence:
439  *
440  *	http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
441  *
442  * Requested by Martin Vidner <martin@vidner.net>.
443  */
444 #define DLT_DBUS		231
445 
446 /*
447  * Juniper-private data link type, as per request from
448  * Hannes Gredler <hannes@juniper.net>.
449  */
450 #define DLT_JUNIPER_VS			232
451 #define DLT_JUNIPER_SRX_E2E		233
452 #define DLT_JUNIPER_FIBRECHANNEL	234
453 
454 /*
455  * DVB-CI (DVB Common Interface for communication between a PC Card
456  * module and a DVB receiver).  See
457  *
458  *	http://www.kaiser.cx/pcap-dvbci.html
459  *
460  * for the specification.
461  *
462  * Requested by Martin Kaiser <martin@kaiser.cx>.
463  */
464 #define DLT_DVB_CI		235
465 
466 /*
467  * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
468  * *not* the same as, 27.010).  Requested by Hans-Christoph Schemmel
469  * <hans-christoph.schemmel@cinterion.com>.
470  */
471 #define DLT_MUX27010		236
472 
473 /*
474  * STANAG 5066 D_PDUs.  Requested by M. Baris Demiray
475  * <barisdemiray@gmail.com>.
476  */
477 #define DLT_STANAG_5066_D_PDU	237
478 
479 /*
480  * Juniper-private data link type, as per request from
481  * Hannes Gredler <hannes@juniper.net>.
482  */
483 #define DLT_JUNIPER_ATM_CEMIC	238
484 
485 /*
486  * NetFilter LOG messages
487  * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
488  *
489  * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
490  */
491 #define DLT_NFLOG		239
492 
493 /*
494  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
495  * for Ethernet packets with a 4-byte pseudo-header and always
496  * with the payload including the FCS, as supplied by their
497  * netANALYZER hardware and software.
498  *
499  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
500  */
501 #define DLT_NETANALYZER		240
502 
503 /*
504  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
505  * for Ethernet packets with a 4-byte pseudo-header and FCS and
506  * with the Ethernet header preceded by 7 bytes of preamble and
507  * 1 byte of SFD, as supplied by their netANALYZER hardware and
508  * software.
509  *
510  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
511  */
512 #define DLT_NETANALYZER_TRANSPARENT	241
513 
514 /*
515  * IP-over-InfiniBand, as specified by RFC 4391.
516  *
517  * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
518  */
519 #define DLT_IPOIB		242
520 
521 /*
522  * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
523  *
524  * Requested by Guy Martin <gmsoft@tuxicoman.be>.
525  */
526 #define DLT_MPEG_2_TS		243
527 
528 /*
529  * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
530  * used by their ng40 protocol tester.
531  *
532  * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
533  */
534 #define DLT_NG40		244
535 
536 /*
537  * Pseudo-header giving adapter number and flags, followed by an NFC
538  * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
539  * as specified by NFC Forum Logical Link Control Protocol Technical
540  * Specification LLCP 1.1.
541  *
542  * Requested by Mike Wakerly <mikey@google.com>.
543  */
544 #define DLT_NFC_LLCP		245
545 
546 /*
547  * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
548  *
549  * DLT_PFSYNC has different values on different platforms, and all of
550  * them collide with something used elsewhere.  On platforms that
551  * don't already define it, define it as 246.
552  */
553 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
554 #define DLT_PFSYNC		246
555 #endif
556 
557 /*
558  * Raw InfiniBand packets, starting with the Local Routing Header.
559  *
560  * Requested by Oren Kladnitsky <orenk@mellanox.com>.
561  */
562 #define DLT_INFINIBAND		247
563 
564 /*
565  * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
566  *
567  * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
568  */
569 #define DLT_SCTP		248
570 
571 /*
572  * USB packets, beginning with a USBPcap header.
573  *
574  * Requested by Tomasz Mon <desowin@gmail.com>
575  */
576 #define DLT_USBPCAP		249
577 
578 /*
579  * Schweitzer Engineering Laboratories "RTAC" product serial-line
580  * packets.
581  *
582  * Requested by Chris Bontje <chris_bontje@selinc.com>.
583  */
584 #define DLT_RTAC_SERIAL		250
585 
586 /*
587  * Bluetooth Low Energy air interface link-layer packets.
588  *
589  * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
590  */
591 #define DLT_BLUETOOTH_LE_LL	251
592 
593 /*
594  * DLT type for upper-protocol layer PDU saves from wireshark.
595  *
596  * the actual contents are determined by two TAGs stored with each
597  * packet:
598  *   EXP_PDU_TAG_LINKTYPE          the link type (LINKTYPE_ value) of the
599  *				   original packet.
600  *
601  *   EXP_PDU_TAG_PROTO_NAME        the name of the wireshark dissector
602  * 				   that can make sense of the data stored.
603  */
604 #define DLT_WIRESHARK_UPPER_PDU	252
605 
606 /*
607  * DLT type for the netlink protocol (nlmon devices).
608  */
609 #define DLT_NETLINK		253
610 
611 /*
612  * Bluetooth Linux Monitor headers for the BlueZ stack.
613  */
614 #define DLT_BLUETOOTH_LINUX_MONITOR	254
615 
616 /*
617  * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
618  * captured by Ubertooth.
619  */
620 #define DLT_BLUETOOTH_BREDR_BB	255
621 
622 /*
623  * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
624  */
625 #define DLT_BLUETOOTH_LE_LL_WITH_PHDR	256
626 
627 /*
628  * PROFIBUS data link layer.
629  */
630 #define DLT_PROFIBUS_DL		257
631 
632 /*
633  * Apple's DLT_PKTAP headers.
634  *
635  * Sadly, the folks at Apple either had no clue that the DLT_USERn values
636  * are for internal use within an organization and partners only, and
637  * didn't know that the right way to get a link-layer header type is to
638  * ask tcpdump.org for one, or knew and didn't care, so they just
639  * used DLT_USER2, which causes problems for everything except for
640  * their version of tcpdump.
641  *
642  * So I'll just give them one; hopefully this will show up in a
643  * libpcap release in time for them to get this into 10.10 Big Sur
644  * or whatever Mavericks' successor is called.  LINKTYPE_PKTAP
645  * will be 258 *even on OS X*; that is *intentional*, so that
646  * PKTAP files look the same on *all* OSes (different OSes can have
647  * different numerical values for a given DLT_, but *MUST NOT* have
648  * different values for what goes in a file, as files can be moved
649  * between OSes!).
650  *
651  * When capturing, on a system with a Darwin-based OS, on a device
652  * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this
653  * version of libpcap, the DLT_ value for the pcap_t  will be DLT_PKTAP,
654  * and that will continue to be DLT_USER2 on Darwin-based OSes. That way,
655  * binary compatibility with Mavericks is preserved for programs using
656  * this version of libpcap.  This does mean that if you were using
657  * DLT_USER2 for some capture device on OS X, you can't do so with
658  * this version of libpcap, just as you can't with Apple's libpcap -
659  * on OS X, they define DLT_PKTAP to be DLT_USER2, so programs won't
660  * be able to distinguish between PKTAP and whatever you were using
661  * DLT_USER2 for.
662  *
663  * If the program saves the capture to a file using this version of
664  * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be
665  * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes.
666  * That way, the file will *not* be a DLT_USER2 file.  That means
667  * that the latest version of tcpdump, when built with this version
668  * of libpcap, and sufficiently recent versions of Wireshark will
669  * be able to read those files and interpret them correctly; however,
670  * Apple's version of tcpdump in OS X 10.9 won't be able to handle
671  * them.  (Hopefully, Apple will pick up this version of libpcap,
672  * and the corresponding version of tcpdump, so that tcpdump will
673  * be able to handle the old LINKTYPE_USER2 captures *and* the new
674  * LINKTYPE_PKTAP captures.)
675  */
676 #ifdef __APPLE__
677 #define DLT_PKTAP	DLT_USER2
678 #else
679 #define DLT_PKTAP	258
680 #endif
681 
682 /*
683  * Ethernet packets preceded by a header giving the last 6 octets
684  * of the preamble specified by 802.3-2012 Clause 65, section
685  * 65.1.3.2 "Transmit".
686  */
687 #define DLT_EPON	259
688 
689 /*
690  * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
691  * in the PICMG HPM.2 specification.
692  */
693 #define DLT_IPMI_HPM_2	260
694 
695 /*
696  * per  Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
697  */
698 #define DLT_ZWAVE_R1_R2  261
699 #define DLT_ZWAVE_R3     262
700 
701 /*
702  * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
703  * Digital Lighting Management room bus serial protocol captures.
704  */
705 #define DLT_WATTSTOPPER_DLM     263
706 
707 /*
708  * ISO 14443 contactless smart card messages.
709  */
710 #define DLT_ISO_14443	264
711 
712 /*
713  * Radio data system (RDS) groups.  IEC 62106.
714  * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
715  */
716 #define DLT_RDS		265
717 
718 /*
719  * In case the code that includes this file (directly or indirectly)
720  * has also included OS files that happen to define DLT_MATCHING_MAX,
721  * with a different value (perhaps because that OS hasn't picked up
722  * the latest version of our DLT definitions), we undefine the
723  * previous value of DLT_MATCHING_MAX.
724  */
725 #ifdef DLT_MATCHING_MAX
726 #undef DLT_MATCHING_MAX
727 #endif
728 #define DLT_MATCHING_MAX	265	/* highest value in the "matching" range */
729 
730 #endif	/* !_NET_DLT_H_ */
731