2 * Copyright (c) 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
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
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
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.
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
34 * @(#)bpf.h 8.1 (Berkeley) 6/10/93
35 * @(#)bpf.h 1.34 (LBL) 6/16/96
37 * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.34.2.24 2007/09/19 02:52:12 guy Exp $ (LBL)
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 $
47 * Data-link level type codes.
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 */
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 */
72 #define DLT_REDBACK_SMARTEDGE 32 /* Redback SmartEdge 400/800 */
76 #define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */
77 #define DLT_PPP_ETHER 51 /* PPP over Ethernet */
81 #define DLT_SYMANTEC_FIREWALL 99 /* Symantec Enterprise Firewall */
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
90 * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
91 * the highest such value.
93 #define DLT_MATCHING_MIN 104
95 /* 100 - 103 unused */
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 */
104 /* 110 - 112 unused */
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 */
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
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 */
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.
151 * No libpcap release will use these for any purpose, nor will any
152 * tcpdump release use them, either.
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.
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.
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.
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
187 /* 147 - 162 unused */
189 #define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
190 #define DLT_JUNIPER_MONITOR 164 /* Juniper private */
191 #define DLT_BACNET_MS_TP 165 /* BACnet MS/TP */
192 #define DLT_PPP_PPPD 166 /* Linux PPP variant */
193 #define DLT_JUNIPER_PPPOE 167 /* Juniper private */
194 #define DLT_JUNIPER_PPPOE_ATM 168 /* Juniper private */
195 #define DLT_GPRS_LLC 169 /* GPRS LLC */
196 #define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */
197 #define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */
198 #define DLT_GCOM_T1E1 172 /* Gcom's T1/E1 */
199 #define DLT_GCOM_SERIAL 173 /* Gcom's T1/E1 */
200 #define DLT_JUNIPER_PIC_PEER 174 /* Juniper private */
201 #define DLT_ERF_ETH 175 /* Ethernet plus ERF header */
202 #define DLT_ERF_POS 176 /* Packet-over-SONET plus ERF header */
203 #define DLT_LINUX_LAPD 177 /* raw LAPD plus addition info */
204 #define DLT_JUNIPER_ETHER 178 /* Juniper private */
205 #define DLT_JUNIPER_PPP 179 /* Juniper private */
206 #define DLT_JUNIPER_FRELAY 180 /* Juniper private */
207 #define DLT_JUNIPER_CHDLC 181 /* Juniper private */
208 #define DLT_MFR 182 /* Multi Link Frame Relay (FRF.16) */
209 #define DLT_JUNIPER_VP 183 /* Juniper private */
210 #define DLT_A429 184 /* Arinc 429 frames */
211 #define DLT_A653_ICM 185 /* Arinc 653 Interpartition
212 * Communication messages */
214 * This used to be "USB packets, beginning with a USB setup header;
215 * requested by Paolo Abeni <paolo.abeni@email.it>."
217 * However, that header didn't work all that well - it left out some
218 * useful information - and was abandoned in favor of the DLT_USB_LINUX
221 * This is now used by FreeBSD for its BPF taps for USB; that has its
222 * own headers. So it is written, so it is done.
224 * For source-code compatibility, we also define DLT_USB to have this
225 * value. We do it numerically so that, if code that includes this
226 * file (directly or indirectly) also includes an OS header that also
227 * defines DLT_USB as 186, we don't get a redefinition warning.
228 * (NetBSD 7 does that.)
230 #define DLT_USB_FREEBSD 186
233 #define DLT_BLUETOOTH_HCI_H4 187 /* Bluetooth HCI UART transport layer
235 #define DLT_IEEE802_16_MAC_CPS 188 /* IEEE 802.16 MAC Common Part
237 #define DLT_USB_LINUX 189 /* USB packets plus Linux USB header */
238 #define DLT_CAN20B 190 /* Controller Area Network (CAN)
240 #define DLT_IEEE802_15_4_LINUX 191 /* IEEE 802.15.4, with address fields
242 #define DLT_PPI 192 /* Per Packet Information encapsulated
244 #define DLT_IEEE802_16_MAC_CPS_RADIO 193 /* 802.16 MAC Common Part Sublayer
245 * plus a radiotap radio header */
246 #define DLT_JUNIPER_ISM 194 /* Juniper private */
247 #define DLT_IEEE802_15_4 195 /* IEEE 802.15.4 */
248 #define DLT_SITA 196 /* SITA plus a pseudo-header */
249 #define DLT_ERF 197 /* Endace ERF records plus
251 #define DLT_RAIF1 198 /* Ethernet plus special header */
252 #define DLT_IPMB 199 /* IPMB packet for IPMI */
253 #define DLT_JUNIPER_ST 200 /* Juniper private */
254 #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 /* Bluetooth HCI UART transport
255 * layer (part H:4) plus
257 #define DLT_AX25_KISS 202 /* AX.25 packet with a 1-byte KISS
259 #define DLT_LAPD 203 /* LAPD packets from an ISDN channel,
260 * starting with the address field,
261 * with no pseudo-header */
262 #define DLT_PPP_WITH_DIR 204 /* PPP */
263 #define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */
264 #define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */
265 #define DLT_LAPB_WITH_DIR 207 /* LAPB */
269 #define DLT_IPMB_LINUX 209 /* IPMB with a Linux-specific
271 #define DLT_FLEXRAY 210 /* FlexRay automotive bus */
272 #define DLT_MOST 211 /* Media Oriented Systems Transport
274 #define DLT_LIN 212 /* Local Interconnect Network
276 #define DLT_X2E_SERIAL 213 /* X2E-private */
277 #define DLT_X2E_XORAYA 214 /* X2E-private */
278 #define DLT_IEEE802_15_4_NONASK_PHY 215 /* IEEE 802.15.4, with the PHY-level
279 * data for non-ASK PHYs */
280 #define DLT_IEEE802_15_4_NONASK_PHY 215
283 * David Gibson <david@gibson.dropbear.id.au> requested this for
284 * captures from the Linux kernel /dev/input/eventN devices. This
285 * is used to communicate keystrokes and mouse movements from the
286 * Linux kernel to display systems, such as Xorg.
288 #define DLT_LINUX_EVDEV 216
291 * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
293 * Requested by Harald Welte <laforge@gnumonks.org>.
295 #define DLT_GSMTAP_UM 217
296 #define DLT_GSMTAP_ABIS 218
299 * MPLS, with an MPLS label as the link-layer header.
300 * Requested by Michele Marchetto <michele@openbsd.org> on behalf
306 * USB packets, beginning with a Linux USB header, with the USB header
307 * padded to 64 bytes; required for memory-mapped access.
309 #define DLT_USB_LINUX_MMAPPED 220
312 * DECT packets, with a pseudo-header; requested by
313 * Matthias Wenzel <tcpdump@mazzoo.de>.
318 * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
319 * Date: Mon, 11 May 2009 11:18:30 -0500
321 * DLT_AOS. We need it for AOS Space Data Link Protocol.
322 * I have already written dissectors for but need an OK from
323 * legal before I can submit a patch.
329 * Wireless HART (Highway Addressable Remote Transducer)
330 * From the HART Communication Foundation
333 * Requested by Sam Roberts <vieuxtech@gmail.com>.
335 #define DLT_WIHART 223
338 * Fibre Channel FC-2 frames, beginning with a Frame_Header.
339 * Requested by Kahou Lei <kahou82@gmail.com>.
344 * Fibre Channel FC-2 frames, beginning with an encoding of the
345 * SOF, and ending with an encoding of the EOF.
347 * The encodings represent the frame delimiters as 4-byte sequences
348 * representing the corresponding ordered sets, with K28.5
349 * represented as 0xBC, and the D symbols as the corresponding
350 * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
351 * is represented as 0xBC 0xB5 0x55 0x55.
353 * Requested by Kahou Lei <kahou82@gmail.com>.
355 #define DLT_FC_2_WITH_FRAME_DELIMS 225
358 * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
360 * The pseudo-header starts with a one-byte version number; for version 2,
361 * the pseudo-header is:
363 * struct dl_ipnetinfo {
364 * u_int8_t dli_version;
365 * u_int8_t dli_family;
366 * u_int16_t dli_htype;
367 * u_int32_t dli_pktlen;
368 * u_int32_t dli_ifindex;
369 * u_int32_t dli_grifindex;
370 * u_int32_t dli_zsrc;
371 * u_int32_t dli_zdst;
374 * dli_version is 2 for the current version of the pseudo-header.
376 * dli_family is a Solaris address family value, so it's 2 for IPv4
379 * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
380 * packets, and 2 for packets arriving from another zone on the same
383 * dli_pktlen is the length of the packet data following the pseudo-header
384 * (so the captured length minus dli_pktlen is the length of the
385 * pseudo-header, assuming the entire pseudo-header was captured).
387 * dli_ifindex is the interface index of the interface on which the
390 * dli_grifindex is the group interface index number (for IPMP interfaces).
392 * dli_zsrc is the zone identifier for the source of the packet.
394 * dli_zdst is the zone identifier for the destination of the packet.
396 * A zone number of 0 is the global zone; a zone number of 0xffffffff
397 * means that the packet arrived from another host on the network, not
398 * from another zone on the same machine.
400 * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
401 * which of those it is.
403 #define DLT_IPNET 226
406 * CAN (Controller Area Network) frames, with a pseudo-header as supplied
407 * by Linux SocketCAN, and with multi-byte numerical fields in that header
408 * in big-endian byte order.
410 * See Documentation/networking/can.txt in the Linux source.
412 * Requested by Felix Obenhuber <felix@obenhuber.de>.
414 #define DLT_CAN_SOCKETCAN 227
417 * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
418 * whether it's v4 or v6. Requested by Darren Reed <Darren.Reed@Sun.COM>.
424 * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
425 * nothing), and with no FCS at the end of the frame; requested by
426 * Jon Smirl <jonsmirl@gmail.com>.
428 #define DLT_IEEE802_15_4_NOFCS 230
433 * http://www.freedesktop.org/wiki/Software/dbus
437 * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
439 * starting with the endianness flag, followed by the message type, etc.,
440 * but without the authentication handshake before the message sequence:
442 * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
444 * Requested by Martin Vidner <martin@vidner.net>.
449 * Juniper-private data link type, as per request from
450 * Hannes Gredler <hannes@juniper.net>.
452 #define DLT_JUNIPER_VS 232
453 #define DLT_JUNIPER_SRX_E2E 233
454 #define DLT_JUNIPER_FIBRECHANNEL 234
457 * DVB-CI (DVB Common Interface for communication between a PC Card
458 * module and a DVB receiver). See
460 * http://www.kaiser.cx/pcap-dvbci.html
462 * for the specification.
464 * Requested by Martin Kaiser <martin@kaiser.cx>.
466 #define DLT_DVB_CI 235
469 * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
470 * *not* the same as, 27.010). Requested by Hans-Christoph Schemmel
471 * <hans-christoph.schemmel@cinterion.com>.
473 #define DLT_MUX27010 236
476 * STANAG 5066 D_PDUs. Requested by M. Baris Demiray
477 * <barisdemiray@gmail.com>.
479 #define DLT_STANAG_5066_D_PDU 237
482 * Juniper-private data link type, as per request from
483 * Hannes Gredler <hannes@juniper.net>.
485 #define DLT_JUNIPER_ATM_CEMIC 238
488 * NetFilter LOG messages
489 * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
491 * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
493 #define DLT_NFLOG 239
496 * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
497 * for Ethernet packets with a 4-byte pseudo-header and always
498 * with the payload including the FCS, as supplied by their
499 * netANALYZER hardware and software.
501 * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
503 #define DLT_NETANALYZER 240
506 * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
507 * for Ethernet packets with a 4-byte pseudo-header and FCS and
508 * with the Ethernet header preceded by 7 bytes of preamble and
509 * 1 byte of SFD, as supplied by their netANALYZER hardware and
512 * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
514 #define DLT_NETANALYZER_TRANSPARENT 241
517 * IP-over-InfiniBand, as specified by RFC 4391.
519 * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
521 #define DLT_IPOIB 242
524 * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
526 * Requested by Guy Martin <gmsoft@tuxicoman.be>.
528 #define DLT_MPEG_2_TS 243
531 * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
532 * used by their ng40 protocol tester.
534 * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
539 * Pseudo-header giving adapter number and flags, followed by an NFC
540 * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
541 * as specified by NFC Forum Logical Link Control Protocol Technical
542 * Specification LLCP 1.1.
544 * Requested by Mike Wakerly <mikey@google.com>.
546 #define DLT_NFC_LLCP 245
549 * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
551 * DLT_PFSYNC has different values on different platforms, and all of
552 * them collide with something used elsewhere. On platforms that
553 * don't already define it, define it as 246.
555 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
556 #define DLT_PFSYNC 246
560 * Raw InfiniBand packets, starting with the Local Routing Header.
562 * Requested by Oren Kladnitsky <orenk@mellanox.com>.
564 #define DLT_INFINIBAND 247
567 * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
569 * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
574 * USB packets, beginning with a USBPcap header.
576 * Requested by Tomasz Mon <desowin@gmail.com>
578 #define DLT_USBPCAP 249
581 * Schweitzer Engineering Laboratories "RTAC" product serial-line
584 * Requested by Chris Bontje <chris_bontje@selinc.com>.
586 #define DLT_RTAC_SERIAL 250
589 * Bluetooth Low Energy air interface link-layer packets.
591 * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
593 #define DLT_BLUETOOTH_LE_LL 251
596 * DLT type for upper-protocol layer PDU saves from wireshark.
598 * the actual contents are determined by two TAGs stored with each
600 * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the
603 * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector
604 * that can make sense of the data stored.
606 #define DLT_WIRESHARK_UPPER_PDU 252
609 * DLT type for the netlink protocol (nlmon devices).
611 #define DLT_NETLINK 253
614 * Bluetooth Linux Monitor headers for the BlueZ stack.
616 #define DLT_BLUETOOTH_LINUX_MONITOR 254
619 * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
620 * captured by Ubertooth.
622 #define DLT_BLUETOOTH_BREDR_BB 255
625 * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
627 #define DLT_BLUETOOTH_LE_LL_WITH_PHDR 256
630 * PROFIBUS data link layer.
632 #define DLT_PROFIBUS_DL 257
635 * Apple's DLT_PKTAP headers.
637 * Sadly, the folks at Apple either had no clue that the DLT_USERn values
638 * are for internal use within an organization and partners only, and
639 * didn't know that the right way to get a link-layer header type is to
640 * ask tcpdump.org for one, or knew and didn't care, so they just
641 * used DLT_USER2, which causes problems for everything except for
642 * their version of tcpdump.
644 * So I'll just give them one; hopefully this will show up in a
645 * libpcap release in time for them to get this into 10.10 Big Sur
646 * or whatever Mavericks' successor is called. LINKTYPE_PKTAP
647 * will be 258 *even on OS X*; that is *intentional*, so that
648 * PKTAP files look the same on *all* OSes (different OSes can have
649 * different numerical values for a given DLT_, but *MUST NOT* have
650 * different values for what goes in a file, as files can be moved
653 * When capturing, on a system with a Darwin-based OS, on a device
654 * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this
655 * version of libpcap, the DLT_ value for the pcap_t will be DLT_PKTAP,
656 * and that will continue to be DLT_USER2 on Darwin-based OSes. That way,
657 * binary compatibility with Mavericks is preserved for programs using
658 * this version of libpcap. This does mean that if you were using
659 * DLT_USER2 for some capture device on OS X, you can't do so with
660 * this version of libpcap, just as you can't with Apple's libpcap -
661 * on OS X, they define DLT_PKTAP to be DLT_USER2, so programs won't
662 * be able to distinguish between PKTAP and whatever you were using
665 * If the program saves the capture to a file using this version of
666 * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be
667 * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes.
668 * That way, the file will *not* be a DLT_USER2 file. That means
669 * that the latest version of tcpdump, when built with this version
670 * of libpcap, and sufficiently recent versions of Wireshark will
671 * be able to read those files and interpret them correctly; however,
672 * Apple's version of tcpdump in OS X 10.9 won't be able to handle
673 * them. (Hopefully, Apple will pick up this version of libpcap,
674 * and the corresponding version of tcpdump, so that tcpdump will
675 * be able to handle the old LINKTYPE_USER2 captures *and* the new
676 * LINKTYPE_PKTAP captures.)
679 #define DLT_PKTAP DLT_USER2
681 #define DLT_PKTAP 258
685 * Ethernet packets preceded by a header giving the last 6 octets
686 * of the preamble specified by 802.3-2012 Clause 65, section
687 * 65.1.3.2 "Transmit".
692 * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
693 * in the PICMG HPM.2 specification.
695 #define DLT_IPMI_HPM_2 260
698 * per Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
700 #define DLT_ZWAVE_R1_R2 261
701 #define DLT_ZWAVE_R3 262
704 * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
705 * Digital Lighting Management room bus serial protocol captures.
707 #define DLT_WATTSTOPPER_DLM 263
710 * ISO 14443 contactless smart card messages.
712 #define DLT_ISO_14443 264
715 * Radio data system (RDS) groups. IEC 62106.
716 * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
721 * In case the code that includes this file (directly or indirectly)
722 * has also included OS files that happen to define DLT_MATCHING_MAX,
723 * with a different value (perhaps because that OS hasn't picked up
724 * the latest version of our DLT definitions), we undefine the
725 * previous value of DLT_MATCHING_MAX.
727 #ifdef DLT_MATCHING_MAX
728 #undef DLT_MATCHING_MAX
730 #define DLT_MATCHING_MAX 265 /* highest value in the "matching" range */
732 #endif /* !_NET_DLT_H_ */