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