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