<net/dlt.h> - Add some more DLTs
[dragonfly.git] / sys / net / dlt.h
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 /* 147 - 162 unused */
188
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 */
213 /*
214  * This used to be "USB packets, beginning with a USB setup header;
215  * requested by Paolo Abeni <paolo.abeni@email.it>."
216  *
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
219  * header.
220  *
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.
223  *
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.)
229  */
230 #define DLT_USB_FREEBSD         186
231 #define DLT_USB                 186
232
233 #define DLT_BLUETOOTH_HCI_H4    187     /* Bluetooth HCI UART transport layer
234                                          * (part H:4) */
235 #define DLT_IEEE802_16_MAC_CPS  188     /* IEEE 802.16 MAC Common Part
236                                          * Sublayer */
237 #define DLT_USB_LINUX           189     /* USB packets plus Linux USB header */
238 #define DLT_CAN20B              190     /* Controller Area Network (CAN)
239                                          * v. 2.0B */
240 #define DLT_IEEE802_15_4_LINUX  191     /* IEEE 802.15.4, with address fields
241                                          * padded */
242 #define DLT_PPI                 192     /* Per Packet Information encapsulated
243                                          * packets */
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
250                                          * pseudo-header */
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
256                                             * pseudo-header */
257 #define DLT_AX25_KISS           202     /* AX.25 packet with a 1-byte KISS
258                                          * header */
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 */
266
267 /* 208 unused */
268
269 #define DLT_IPMB_LINUX          209     /* IPMB with a Linux-specific
270                                          * pseudo-header */
271 #define DLT_FLEXRAY             210     /* FlexRay automotive bus */
272 #define DLT_MOST                211     /* Media Oriented Systems Transport
273                                          * (MOST) bus */
274 #define DLT_LIN                 212     /* Local Interconnect Network
275                                          * (LIN) bus */
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
281
282 /*
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.
287  */
288 #define DLT_LINUX_EVDEV         216
289
290 /*
291  * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
292  *
293  * Requested by Harald Welte <laforge@gnumonks.org>.
294  */
295 #define DLT_GSMTAP_UM           217
296 #define DLT_GSMTAP_ABIS         218
297
298 /*
299  * MPLS, with an MPLS label as the link-layer header.
300  * Requested by Michele Marchetto <michele@openbsd.org> on behalf
301  * of OpenBSD.
302  */
303 #define DLT_MPLS                219
304
305 /*
306  * USB packets, beginning with a Linux USB header, with the USB header
307  * padded to 64 bytes; required for memory-mapped access.
308  */
309 #define DLT_USB_LINUX_MMAPPED   220
310
311 /*
312  * DECT packets, with a pseudo-header; requested by
313  * Matthias Wenzel <tcpdump@mazzoo.de>.
314  */
315 #define DLT_DECT                221
316
317 /*
318  * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
319  * Date: Mon, 11 May 2009 11:18:30 -0500
320  *
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.
324  *
325  */
326 #define DLT_AOS                 222
327
328 /*
329  * Wireless HART (Highway Addressable Remote Transducer)
330  * From the HART Communication Foundation
331  * IES/PAS 62591
332  *
333  * Requested by Sam Roberts <vieuxtech@gmail.com>.
334  */
335 #define DLT_WIHART              223
336
337 /*
338  * Fibre Channel FC-2 frames, beginning with a Frame_Header.
339  * Requested by Kahou Lei <kahou82@gmail.com>.
340  */
341 #define DLT_FC_2                224
342
343 /*
344  * Fibre Channel FC-2 frames, beginning with an encoding of the
345  * SOF, and ending with an encoding of the EOF.
346  *
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.
352  *
353  * Requested by Kahou Lei <kahou82@gmail.com>.
354  */
355 #define DLT_FC_2_WITH_FRAME_DELIMS      225
356
357 /*
358  * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
359  *
360  * The pseudo-header starts with a one-byte version number; for version 2,
361  * the pseudo-header is:
362  *
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;
372  * };
373  *
374  * dli_version is 2 for the current version of the pseudo-header.
375  *
376  * dli_family is a Solaris address family value, so it's 2 for IPv4
377  * and 26 for IPv6.
378  *
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
381  * machine.
382  *
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).
386  *
387  * dli_ifindex is the interface index of the interface on which the
388  * packet arrived.
389  *
390  * dli_grifindex is the group interface index number (for IPMP interfaces).
391  *
392  * dli_zsrc is the zone identifier for the source of the packet.
393  *
394  * dli_zdst is the zone identifier for the destination of the packet.
395  *
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.
399  *
400  * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
401  * which of those it is.
402  */
403 #define DLT_IPNET               226
404
405 /*
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.
409  *
410  * See Documentation/networking/can.txt in the Linux source.
411  *
412  * Requested by Felix Obenhuber <felix@obenhuber.de>.
413  */
414 #define DLT_CAN_SOCKETCAN       227
415
416 /*
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>.
419  */
420 #define DLT_IPV4                228
421 #define DLT_IPV6                229
422
423 /*
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>.
427  */
428 #define DLT_IEEE802_15_4_NOFCS  230
429
430 /*
431  * Raw D-Bus:
432  *
433  *      http://www.freedesktop.org/wiki/Software/dbus
434  *
435  * messages:
436  *
437  *      http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
438  *
439  * starting with the endianness flag, followed by the message type, etc.,
440  * but without the authentication handshake before the message sequence:
441  *
442  *      http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
443  *
444  * Requested by Martin Vidner <martin@vidner.net>.
445  */
446 #define DLT_DBUS                231
447
448 /*
449  * Juniper-private data link type, as per request from
450  * Hannes Gredler <hannes@juniper.net>.
451  */
452 #define DLT_JUNIPER_VS                  232
453 #define DLT_JUNIPER_SRX_E2E             233
454 #define DLT_JUNIPER_FIBRECHANNEL        234
455
456 /*
457  * DVB-CI (DVB Common Interface for communication between a PC Card
458  * module and a DVB receiver).  See
459  *
460  *      http://www.kaiser.cx/pcap-dvbci.html
461  *
462  * for the specification.
463  *
464  * Requested by Martin Kaiser <martin@kaiser.cx>.
465  */
466 #define DLT_DVB_CI              235
467
468 /*
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>.
472  */
473 #define DLT_MUX27010            236
474
475 /*
476  * STANAG 5066 D_PDUs.  Requested by M. Baris Demiray
477  * <barisdemiray@gmail.com>.
478  */
479 #define DLT_STANAG_5066_D_PDU   237
480
481 /*
482  * Juniper-private data link type, as per request from
483  * Hannes Gredler <hannes@juniper.net>.
484  */
485 #define DLT_JUNIPER_ATM_CEMIC   238
486
487 /*
488  * NetFilter LOG messages
489  * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
490  *
491  * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
492  */
493 #define DLT_NFLOG               239
494
495 /*
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.
500  *
501  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
502  */
503 #define DLT_NETANALYZER         240
504
505 /*
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
510  * software.
511  *
512  * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
513  */
514 #define DLT_NETANALYZER_TRANSPARENT     241
515
516 /*
517  * IP-over-InfiniBand, as specified by RFC 4391.
518  *
519  * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
520  */
521 #define DLT_IPOIB               242
522
523 /*
524  * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
525  *
526  * Requested by Guy Martin <gmsoft@tuxicoman.be>.
527  */
528 #define DLT_MPEG_2_TS           243
529
530 /*
531  * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
532  * used by their ng40 protocol tester.
533  *
534  * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
535  */
536 #define DLT_NG40                244
537
538 /*
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.
543  *
544  * Requested by Mike Wakerly <mikey@google.com>.
545  */
546 #define DLT_NFC_LLCP            245
547
548 /*
549  * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
550  *
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.
554  */
555 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
556 #define DLT_PFSYNC              246
557 #endif
558
559 /*
560  * Raw InfiniBand packets, starting with the Local Routing Header.
561  *
562  * Requested by Oren Kladnitsky <orenk@mellanox.com>.
563  */
564 #define DLT_INFINIBAND          247
565
566 /*
567  * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
568  *
569  * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
570  */
571 #define DLT_SCTP                248
572
573 /*
574  * USB packets, beginning with a USBPcap header.
575  *
576  * Requested by Tomasz Mon <desowin@gmail.com>
577  */
578 #define DLT_USBPCAP             249
579
580 /*
581  * Schweitzer Engineering Laboratories "RTAC" product serial-line
582  * packets.
583  *
584  * Requested by Chris Bontje <chris_bontje@selinc.com>.
585  */
586 #define DLT_RTAC_SERIAL         250
587
588 /*
589  * Bluetooth Low Energy air interface link-layer packets.
590  *
591  * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
592  */
593 #define DLT_BLUETOOTH_LE_LL     251
594
595 /*
596  * DLT type for upper-protocol layer PDU saves from wireshark.
597  *
598  * the actual contents are determined by two TAGs stored with each
599  * packet:
600  *   EXP_PDU_TAG_LINKTYPE          the link type (LINKTYPE_ value) of the
601  *                                 original packet.
602  *
603  *   EXP_PDU_TAG_PROTO_NAME        the name of the wireshark dissector
604  *                                 that can make sense of the data stored.
605  */
606 #define DLT_WIRESHARK_UPPER_PDU 252
607
608 /*
609  * DLT type for the netlink protocol (nlmon devices).
610  */
611 #define DLT_NETLINK             253
612
613 /*
614  * Bluetooth Linux Monitor headers for the BlueZ stack.
615  */
616 #define DLT_BLUETOOTH_LINUX_MONITOR     254
617
618 /*
619  * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
620  * captured by Ubertooth.
621  */
622 #define DLT_BLUETOOTH_BREDR_BB  255
623
624 /*
625  * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
626  */
627 #define DLT_BLUETOOTH_LE_LL_WITH_PHDR   256
628
629 /*
630  * PROFIBUS data link layer.
631  */
632 #define DLT_PROFIBUS_DL         257
633
634 /*
635  * Apple's DLT_PKTAP headers.
636  *
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.
643  *
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
651  * between OSes!).
652  *
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
663  * DLT_USER2 for.
664  *
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.)
677  */
678 #ifdef __APPLE__
679 #define DLT_PKTAP       DLT_USER2
680 #else
681 #define DLT_PKTAP       258
682 #endif
683
684 /*
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".
688  */
689 #define DLT_EPON        259
690
691 /*
692  * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
693  * in the PICMG HPM.2 specification.
694  */
695 #define DLT_IPMI_HPM_2  260
696
697 /*
698  * per  Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
699  */
700 #define DLT_ZWAVE_R1_R2  261
701 #define DLT_ZWAVE_R3     262
702
703 /*
704  * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
705  * Digital Lighting Management room bus serial protocol captures.
706  */
707 #define DLT_WATTSTOPPER_DLM     263
708
709 /*
710  * ISO 14443 contactless smart card messages.
711  */
712 #define DLT_ISO_14443   264
713
714 /*
715  * Radio data system (RDS) groups.  IEC 62106.
716  * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
717  */
718 #define DLT_RDS         265
719
720 /*
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.
726  */
727 #ifdef DLT_MATCHING_MAX
728 #undef DLT_MATCHING_MAX
729 #endif
730 #define DLT_MATCHING_MAX        265     /* highest value in the "matching" range */
731
732 #endif  /* !_NET_DLT_H_ */