1*76404edcSAsim Jamshed /*- 2*76404edcSAsim Jamshed * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3*76404edcSAsim Jamshed * The Regents of the University of California. All rights reserved. 4*76404edcSAsim Jamshed * 5*76404edcSAsim Jamshed * Some portions Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved. 6*76404edcSAsim Jamshed * Some portions Copyright (C) 2010-2013 Sourcefire, Inc. 7*76404edcSAsim Jamshed * 8*76404edcSAsim Jamshed * This code is derived from the Stanford/CMU enet packet filter, 9*76404edcSAsim Jamshed * (net/enet.c) distributed as part of 4.3BSD, and code contributed 10*76404edcSAsim Jamshed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 11*76404edcSAsim Jamshed * Berkeley Laboratory. 12*76404edcSAsim Jamshed * 13*76404edcSAsim Jamshed * Redistribution and use in source and binary forms, with or without 14*76404edcSAsim Jamshed * modification, are permitted provided that the following conditions 15*76404edcSAsim Jamshed * are met: 16*76404edcSAsim Jamshed * 1. Redistributions of source code must retain the above copyright 17*76404edcSAsim Jamshed * notice, this list of conditions and the following disclaimer. 18*76404edcSAsim Jamshed * 2. Redistributions in binary form must reproduce the above copyright 19*76404edcSAsim Jamshed * notice, this list of conditions and the following disclaimer in the 20*76404edcSAsim Jamshed * documentation and/or other materials provided with the distribution. 21*76404edcSAsim Jamshed * 3. All advertising materials mentioning features or use of this software 22*76404edcSAsim Jamshed * must display the following acknowledgement: 23*76404edcSAsim Jamshed * This product includes software developed by the University of 24*76404edcSAsim Jamshed * California, Berkeley and its contributors. 25*76404edcSAsim Jamshed * 4. Neither the name of the University nor the names of its contributors 26*76404edcSAsim Jamshed * may be used to endorse or promote products derived from this software 27*76404edcSAsim Jamshed * without specific prior written permission. 28*76404edcSAsim Jamshed * 29*76404edcSAsim Jamshed * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 30*76404edcSAsim Jamshed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 31*76404edcSAsim Jamshed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 32*76404edcSAsim Jamshed * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 33*76404edcSAsim Jamshed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34*76404edcSAsim Jamshed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35*76404edcSAsim Jamshed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36*76404edcSAsim Jamshed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37*76404edcSAsim Jamshed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38*76404edcSAsim Jamshed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39*76404edcSAsim Jamshed * SUCH DAMAGE. 40*76404edcSAsim Jamshed * 41*76404edcSAsim Jamshed * @(#)bpf.h 7.1 (Berkeley) 5/7/91 42*76404edcSAsim Jamshed * 43*76404edcSAsim Jamshed * @(#) $Header: /usr/cvsroot/sfeng/ims/src/libraries/daq/daq/sfbpf/sfbpf_dlt.h,v 1.3 2014/06/10 13:38:55 cwaxman Exp $ (LBL) 44*76404edcSAsim Jamshed */ 45*76404edcSAsim Jamshed 46*76404edcSAsim Jamshed /* 47*76404edcSAsim Jamshed * This is just the DLT_* definitions as taken from libpcap-1.0.0's bpf.h. 48*76404edcSAsim Jamshed */ 49*76404edcSAsim Jamshed 50*76404edcSAsim Jamshed #ifndef _SFBPF_DLT_H 51*76404edcSAsim Jamshed #define _SFBPF_DLT_H 52*76404edcSAsim Jamshed 53*76404edcSAsim Jamshed /* 54*76404edcSAsim Jamshed * Data-link level type codes. 55*76404edcSAsim Jamshed * 56*76404edcSAsim Jamshed * Do *NOT* add new values to this list without asking 57*76404edcSAsim Jamshed * "[email protected]" for a value. Otherwise, you run 58*76404edcSAsim Jamshed * the risk of using a value that's already being used for some other 59*76404edcSAsim Jamshed * purpose, and of having tools that read libpcap-format captures not 60*76404edcSAsim Jamshed * being able to handle captures with your new DLT_ value, with no hope 61*76404edcSAsim Jamshed * that they will ever be changed to do so (as that would destroy their 62*76404edcSAsim Jamshed * ability to read captures using that value for that other purpose). 63*76404edcSAsim Jamshed */ 64*76404edcSAsim Jamshed 65*76404edcSAsim Jamshed /* 66*76404edcSAsim Jamshed * These are the types that are the same on all platforms, and that 67*76404edcSAsim Jamshed * have been defined by <net/bpf.h> for ages. 68*76404edcSAsim Jamshed */ 69*76404edcSAsim Jamshed #define DLT_NULL 0 /* BSD loopback encapsulation */ 70*76404edcSAsim Jamshed #define DLT_EN10MB 1 /* Ethernet (10Mb) */ 71*76404edcSAsim Jamshed #define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ 72*76404edcSAsim Jamshed #define DLT_AX25 3 /* Amateur Radio AX.25 */ 73*76404edcSAsim Jamshed #define DLT_PRONET 4 /* Proteon ProNET Token Ring */ 74*76404edcSAsim Jamshed #define DLT_CHAOS 5 /* Chaos */ 75*76404edcSAsim Jamshed #define DLT_IEEE802 6 /* 802.5 Token Ring */ 76*76404edcSAsim Jamshed #define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ 77*76404edcSAsim Jamshed #define DLT_SLIP 8 /* Serial Line IP */ 78*76404edcSAsim Jamshed #define DLT_PPP 9 /* Point-to-point Protocol */ 79*76404edcSAsim Jamshed #define DLT_FDDI 10 /* FDDI */ 80*76404edcSAsim Jamshed 81*76404edcSAsim Jamshed /* 82*76404edcSAsim Jamshed * These are types that are different on some platforms, and that 83*76404edcSAsim Jamshed * have been defined by <net/bpf.h> for ages. We use #ifdefs to 84*76404edcSAsim Jamshed * detect the BSDs that define them differently from the traditional 85*76404edcSAsim Jamshed * libpcap <net/bpf.h> 86*76404edcSAsim Jamshed * 87*76404edcSAsim Jamshed * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, 88*76404edcSAsim Jamshed * but I don't know what the right #define is for BSD/OS. 89*76404edcSAsim Jamshed */ 90*76404edcSAsim Jamshed #define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ 91*76404edcSAsim Jamshed 92*76404edcSAsim Jamshed #ifdef __OpenBSD__ 93*76404edcSAsim Jamshed #define DLT_RAW 14 /* raw IP */ 94*76404edcSAsim Jamshed #else 95*76404edcSAsim Jamshed #define DLT_RAW 12 /* raw IP */ 96*76404edcSAsim Jamshed #endif 97*76404edcSAsim Jamshed 98*76404edcSAsim Jamshed /* 99*76404edcSAsim Jamshed * Given that the only OS that currently generates BSD/OS SLIP or PPP 100*76404edcSAsim Jamshed * is, well, BSD/OS, arguably everybody should have chosen its values 101*76404edcSAsim Jamshed * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they 102*76404edcSAsim Jamshed * didn't. So it goes. 103*76404edcSAsim Jamshed */ 104*76404edcSAsim Jamshed #if defined(__NetBSD__) || defined(__FreeBSD__) 105*76404edcSAsim Jamshed #ifndef DLT_SLIP_BSDOS 106*76404edcSAsim Jamshed #define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ 107*76404edcSAsim Jamshed #define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ 108*76404edcSAsim Jamshed #endif 109*76404edcSAsim Jamshed #else 110*76404edcSAsim Jamshed #define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ 111*76404edcSAsim Jamshed #define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ 112*76404edcSAsim Jamshed #endif 113*76404edcSAsim Jamshed 114*76404edcSAsim Jamshed /* 115*76404edcSAsim Jamshed * 17 is used for DLT_OLD_PFLOG in OpenBSD; 116*76404edcSAsim Jamshed * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below. 117*76404edcSAsim Jamshed * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else. 118*76404edcSAsim Jamshed */ 119*76404edcSAsim Jamshed 120*76404edcSAsim Jamshed #define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ 121*76404edcSAsim Jamshed 122*76404edcSAsim Jamshed /* 123*76404edcSAsim Jamshed * Apparently Redback uses this for its SmartEdge 400/800. I hope 124*76404edcSAsim Jamshed * nobody else decided to use it, too. 125*76404edcSAsim Jamshed */ 126*76404edcSAsim Jamshed #define DLT_REDBACK_SMARTEDGE 32 127*76404edcSAsim Jamshed 128*76404edcSAsim Jamshed /* 129*76404edcSAsim Jamshed * These values are defined by NetBSD; other platforms should refrain from 130*76404edcSAsim Jamshed * using them for other purposes, so that NetBSD savefiles with link 131*76404edcSAsim Jamshed * types of 50 or 51 can be read as this type on all platforms. 132*76404edcSAsim Jamshed */ 133*76404edcSAsim Jamshed #define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ 134*76404edcSAsim Jamshed #define DLT_PPP_ETHER 51 /* PPP over Ethernet */ 135*76404edcSAsim Jamshed 136*76404edcSAsim Jamshed /* 137*76404edcSAsim Jamshed * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses 138*76404edcSAsim Jamshed * a link-layer type of 99 for the tcpdump it supplies. The link-layer 139*76404edcSAsim Jamshed * header has 6 bytes of unknown data, something that appears to be an 140*76404edcSAsim Jamshed * Ethernet type, and 36 bytes that appear to be 0 in at least one capture 141*76404edcSAsim Jamshed * I've seen. 142*76404edcSAsim Jamshed */ 143*76404edcSAsim Jamshed #define DLT_SYMANTEC_FIREWALL 99 144*76404edcSAsim Jamshed 145*76404edcSAsim Jamshed /* 146*76404edcSAsim Jamshed * Values between 100 and 103 are used in capture file headers as 147*76404edcSAsim Jamshed * link-layer types corresponding to DLT_ types that differ 148*76404edcSAsim Jamshed * between platforms; don't use those values for new DLT_ new types. 149*76404edcSAsim Jamshed */ 150*76404edcSAsim Jamshed 151*76404edcSAsim Jamshed /* 152*76404edcSAsim Jamshed * This value was defined by libpcap 0.5; platforms that have defined 153*76404edcSAsim Jamshed * it with a different value should define it here with that value - 154*76404edcSAsim Jamshed * a link type of 104 in a save file will be mapped to DLT_C_HDLC, 155*76404edcSAsim Jamshed * whatever value that happens to be, so programs will correctly 156*76404edcSAsim Jamshed * handle files with that link type regardless of the value of 157*76404edcSAsim Jamshed * DLT_C_HDLC. 158*76404edcSAsim Jamshed * 159*76404edcSAsim Jamshed * The name DLT_C_HDLC was used by BSD/OS; we use that name for source 160*76404edcSAsim Jamshed * compatibility with programs written for BSD/OS. 161*76404edcSAsim Jamshed * 162*76404edcSAsim Jamshed * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, 163*76404edcSAsim Jamshed * for source compatibility with programs written for libpcap 0.5. 164*76404edcSAsim Jamshed */ 165*76404edcSAsim Jamshed #define DLT_C_HDLC 104 /* Cisco HDLC */ 166*76404edcSAsim Jamshed #define DLT_CHDLC DLT_C_HDLC 167*76404edcSAsim Jamshed 168*76404edcSAsim Jamshed #define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ 169*76404edcSAsim Jamshed 170*76404edcSAsim Jamshed /* 171*76404edcSAsim Jamshed * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, 172*76404edcSAsim Jamshed * except when it isn't. (I.e., sometimes it's just raw IP, and 173*76404edcSAsim Jamshed * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, 174*76404edcSAsim Jamshed * so that we don't have to worry about the link-layer header.) 175*76404edcSAsim Jamshed */ 176*76404edcSAsim Jamshed 177*76404edcSAsim Jamshed /* 178*76404edcSAsim Jamshed * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides 179*76404edcSAsim Jamshed * with other values. 180*76404edcSAsim Jamshed * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header 181*76404edcSAsim Jamshed * (DLCI, etc.). 182*76404edcSAsim Jamshed */ 183*76404edcSAsim Jamshed #define DLT_FRELAY 107 184*76404edcSAsim Jamshed 185*76404edcSAsim Jamshed /* 186*76404edcSAsim Jamshed * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except 187*76404edcSAsim Jamshed * that the AF_ type in the link-layer header is in network byte order. 188*76404edcSAsim Jamshed * 189*76404edcSAsim Jamshed * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so 190*76404edcSAsim Jamshed * we don't use 12 for it in OSes other than OpenBSD. 191*76404edcSAsim Jamshed */ 192*76404edcSAsim Jamshed #ifdef __OpenBSD__ 193*76404edcSAsim Jamshed #define DLT_LOOP 12 194*76404edcSAsim Jamshed #else 195*76404edcSAsim Jamshed #define DLT_LOOP 108 196*76404edcSAsim Jamshed #endif 197*76404edcSAsim Jamshed 198*76404edcSAsim Jamshed /* 199*76404edcSAsim Jamshed * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's 200*76404edcSAsim Jamshed * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other 201*76404edcSAsim Jamshed * than OpenBSD. 202*76404edcSAsim Jamshed */ 203*76404edcSAsim Jamshed #ifdef __OpenBSD__ 204*76404edcSAsim Jamshed #define DLT_ENC 13 205*76404edcSAsim Jamshed #else 206*76404edcSAsim Jamshed #define DLT_ENC 109 207*76404edcSAsim Jamshed #endif 208*76404edcSAsim Jamshed 209*76404edcSAsim Jamshed /* 210*76404edcSAsim Jamshed * Values between 110 and 112 are reserved for use in capture file headers 211*76404edcSAsim Jamshed * as link-layer types corresponding to DLT_ types that might differ 212*76404edcSAsim Jamshed * between platforms; don't use those values for new DLT_ types 213*76404edcSAsim Jamshed * other than the corresponding DLT_ types. 214*76404edcSAsim Jamshed */ 215*76404edcSAsim Jamshed 216*76404edcSAsim Jamshed /* 217*76404edcSAsim Jamshed * This is for Linux cooked sockets. 218*76404edcSAsim Jamshed */ 219*76404edcSAsim Jamshed #define DLT_LINUX_SLL 113 220*76404edcSAsim Jamshed 221*76404edcSAsim Jamshed /* 222*76404edcSAsim Jamshed * Apple LocalTalk hardware. 223*76404edcSAsim Jamshed */ 224*76404edcSAsim Jamshed #define DLT_LTALK 114 225*76404edcSAsim Jamshed 226*76404edcSAsim Jamshed /* 227*76404edcSAsim Jamshed * Acorn Econet. 228*76404edcSAsim Jamshed */ 229*76404edcSAsim Jamshed #define DLT_ECONET 115 230*76404edcSAsim Jamshed 231*76404edcSAsim Jamshed /* 232*76404edcSAsim Jamshed * Reserved for use with OpenBSD ipfilter. 233*76404edcSAsim Jamshed */ 234*76404edcSAsim Jamshed #define DLT_IPFILTER 116 235*76404edcSAsim Jamshed 236*76404edcSAsim Jamshed /* 237*76404edcSAsim Jamshed * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023 238*76404edcSAsim Jamshed * in SuSE 6.3, so we can't use 17 for it in capture-file headers. 239*76404edcSAsim Jamshed * 240*76404edcSAsim Jamshed * XXX: is there a conflict with DLT_PFSYNC 18 as well? 241*76404edcSAsim Jamshed */ 242*76404edcSAsim Jamshed #ifdef __OpenBSD__ 243*76404edcSAsim Jamshed #define DLT_OLD_PFLOG 17 244*76404edcSAsim Jamshed #define DLT_PFSYNC 18 245*76404edcSAsim Jamshed #endif 246*76404edcSAsim Jamshed #define DLT_PFLOG 117 247*76404edcSAsim Jamshed 248*76404edcSAsim Jamshed /* 249*76404edcSAsim Jamshed * Registered for Cisco-internal use. 250*76404edcSAsim Jamshed */ 251*76404edcSAsim Jamshed #define DLT_CISCO_IOS 118 252*76404edcSAsim Jamshed 253*76404edcSAsim Jamshed /* 254*76404edcSAsim Jamshed * For 802.11 cards using the Prism II chips, with a link-layer 255*76404edcSAsim Jamshed * header including Prism monitor mode information plus an 802.11 256*76404edcSAsim Jamshed * header. 257*76404edcSAsim Jamshed */ 258*76404edcSAsim Jamshed #define DLT_PRISM_HEADER 119 259*76404edcSAsim Jamshed 260*76404edcSAsim Jamshed /* 261*76404edcSAsim Jamshed * Reserved for Aironet 802.11 cards, with an Aironet link-layer header 262*76404edcSAsim Jamshed * (see Doug Ambrisko's FreeBSD patches). 263*76404edcSAsim Jamshed */ 264*76404edcSAsim Jamshed #define DLT_AIRONET_HEADER 120 265*76404edcSAsim Jamshed 266*76404edcSAsim Jamshed /* 267*76404edcSAsim Jamshed * Reserved for Siemens HiPath HDLC. 268*76404edcSAsim Jamshed */ 269*76404edcSAsim Jamshed #define DLT_HHDLC 121 270*76404edcSAsim Jamshed 271*76404edcSAsim Jamshed /* 272*76404edcSAsim Jamshed * This is for RFC 2625 IP-over-Fibre Channel. 273*76404edcSAsim Jamshed * 274*76404edcSAsim Jamshed * This is not for use with raw Fibre Channel, where the link-layer 275*76404edcSAsim Jamshed * header starts with a Fibre Channel frame header; it's for IP-over-FC, 276*76404edcSAsim Jamshed * where the link-layer header starts with an RFC 2625 Network_Header 277*76404edcSAsim Jamshed * field. 278*76404edcSAsim Jamshed */ 279*76404edcSAsim Jamshed #define DLT_IP_OVER_FC 122 280*76404edcSAsim Jamshed 281*76404edcSAsim Jamshed /* 282*76404edcSAsim Jamshed * This is for Full Frontal ATM on Solaris with SunATM, with a 283*76404edcSAsim Jamshed * pseudo-header followed by an AALn PDU. 284*76404edcSAsim Jamshed * 285*76404edcSAsim Jamshed * There may be other forms of Full Frontal ATM on other OSes, 286*76404edcSAsim Jamshed * with different pseudo-headers. 287*76404edcSAsim Jamshed * 288*76404edcSAsim Jamshed * If ATM software returns a pseudo-header with VPI/VCI information 289*76404edcSAsim Jamshed * (and, ideally, packet type information, e.g. signalling, ILMI, 290*76404edcSAsim Jamshed * LANE, LLC-multiplexed traffic, etc.), it should not use 291*76404edcSAsim Jamshed * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump 292*76404edcSAsim Jamshed * and the like don't have to infer the presence or absence of a 293*76404edcSAsim Jamshed * pseudo-header and the form of the pseudo-header. 294*76404edcSAsim Jamshed */ 295*76404edcSAsim Jamshed #define DLT_SUNATM 123 /* Solaris+SunATM */ 296*76404edcSAsim Jamshed 297*76404edcSAsim Jamshed /* 298*76404edcSAsim Jamshed * Reserved as per request from Kent Dahlgren <[email protected]> 299*76404edcSAsim Jamshed * for private use. 300*76404edcSAsim Jamshed */ 301*76404edcSAsim Jamshed #define DLT_RIO 124 /* RapidIO */ 302*76404edcSAsim Jamshed #define DLT_PCI_EXP 125 /* PCI Express */ 303*76404edcSAsim Jamshed #define DLT_AURORA 126 /* Xilinx Aurora link layer */ 304*76404edcSAsim Jamshed 305*76404edcSAsim Jamshed /* 306*76404edcSAsim Jamshed * Header for 802.11 plus a number of bits of link-layer information 307*76404edcSAsim Jamshed * including radio information, used by some recent BSD drivers as 308*76404edcSAsim Jamshed * well as the madwifi Atheros driver for Linux. 309*76404edcSAsim Jamshed */ 310*76404edcSAsim Jamshed #define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ 311*76404edcSAsim Jamshed 312*76404edcSAsim Jamshed /* 313*76404edcSAsim Jamshed * Reserved for the TZSP encapsulation, as per request from 314*76404edcSAsim Jamshed * Chris Waters <[email protected]> 315*76404edcSAsim Jamshed * TZSP is a generic encapsulation for any other link type, 316*76404edcSAsim Jamshed * which includes a means to include meta-information 317*76404edcSAsim Jamshed * with the packet, e.g. signal strength and channel 318*76404edcSAsim Jamshed * for 802.11 packets. 319*76404edcSAsim Jamshed */ 320*76404edcSAsim Jamshed #define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ 321*76404edcSAsim Jamshed 322*76404edcSAsim Jamshed /* 323*76404edcSAsim Jamshed * BSD's ARCNET headers have the source host, destination host, 324*76404edcSAsim Jamshed * and type at the beginning of the packet; that's what's handed 325*76404edcSAsim Jamshed * up to userland via BPF. 326*76404edcSAsim Jamshed * 327*76404edcSAsim Jamshed * Linux's ARCNET headers, however, have a 2-byte offset field 328*76404edcSAsim Jamshed * between the host IDs and the type; that's what's handed up 329*76404edcSAsim Jamshed * to userland via PF_PACKET sockets. 330*76404edcSAsim Jamshed * 331*76404edcSAsim Jamshed * We therefore have to have separate DLT_ values for them. 332*76404edcSAsim Jamshed */ 333*76404edcSAsim Jamshed #define DLT_ARCNET_LINUX 129 /* ARCNET */ 334*76404edcSAsim Jamshed 335*76404edcSAsim Jamshed /* 336*76404edcSAsim Jamshed * Juniper-private data link types, as per request from 337*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. The DLT_s are used 338*76404edcSAsim Jamshed * for passing on chassis-internal metainformation such as 339*76404edcSAsim Jamshed * QOS profiles, etc.. 340*76404edcSAsim Jamshed */ 341*76404edcSAsim Jamshed #define DLT_JUNIPER_MLPPP 130 342*76404edcSAsim Jamshed #define DLT_JUNIPER_MLFR 131 343*76404edcSAsim Jamshed #define DLT_JUNIPER_ES 132 344*76404edcSAsim Jamshed #define DLT_JUNIPER_GGSN 133 345*76404edcSAsim Jamshed #define DLT_JUNIPER_MFR 134 346*76404edcSAsim Jamshed #define DLT_JUNIPER_ATM2 135 347*76404edcSAsim Jamshed #define DLT_JUNIPER_SERVICES 136 348*76404edcSAsim Jamshed #define DLT_JUNIPER_ATM1 137 349*76404edcSAsim Jamshed 350*76404edcSAsim Jamshed /* 351*76404edcSAsim Jamshed * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund 352*76404edcSAsim Jamshed * <[email protected]>. The header that's presented is an Ethernet-like 353*76404edcSAsim Jamshed * header: 354*76404edcSAsim Jamshed * 355*76404edcSAsim Jamshed * #define FIREWIRE_EUI64_LEN 8 356*76404edcSAsim Jamshed * struct firewire_header { 357*76404edcSAsim Jamshed * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; 358*76404edcSAsim Jamshed * u_char firewire_shost[FIREWIRE_EUI64_LEN]; 359*76404edcSAsim Jamshed * u_short firewire_type; 360*76404edcSAsim Jamshed * }; 361*76404edcSAsim Jamshed * 362*76404edcSAsim Jamshed * with "firewire_type" being an Ethernet type value, rather than, 363*76404edcSAsim Jamshed * for example, raw GASP frames being handed up. 364*76404edcSAsim Jamshed */ 365*76404edcSAsim Jamshed #define DLT_APPLE_IP_OVER_IEEE1394 138 366*76404edcSAsim Jamshed 367*76404edcSAsim Jamshed /* 368*76404edcSAsim Jamshed * Various SS7 encapsulations, as per a request from Jeff Morriss 369*76404edcSAsim Jamshed * <jeff.morriss[AT]ulticom.com> and subsequent discussions. 370*76404edcSAsim Jamshed */ 371*76404edcSAsim Jamshed #define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ 372*76404edcSAsim Jamshed #define DLT_MTP2 140 /* MTP2, without pseudo-header */ 373*76404edcSAsim Jamshed #define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ 374*76404edcSAsim Jamshed #define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ 375*76404edcSAsim Jamshed 376*76404edcSAsim Jamshed /* 377*76404edcSAsim Jamshed * DOCSIS MAC frames. 378*76404edcSAsim Jamshed */ 379*76404edcSAsim Jamshed #define DLT_DOCSIS 143 380*76404edcSAsim Jamshed 381*76404edcSAsim Jamshed /* 382*76404edcSAsim Jamshed * Linux-IrDA packets. Protocol defined at http://www.irda.org. 383*76404edcSAsim Jamshed * Those packets include IrLAP headers and above (IrLMP...), but 384*76404edcSAsim Jamshed * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy 385*76404edcSAsim Jamshed * framing can be handled by the hardware and depend on the bitrate. 386*76404edcSAsim Jamshed * This is exactly the format you would get capturing on a Linux-IrDA 387*76404edcSAsim Jamshed * interface (irdaX), but not on a raw serial port. 388*76404edcSAsim Jamshed * Note the capture is done in "Linux-cooked" mode, so each packet include 389*76404edcSAsim Jamshed * a fake packet header (struct sll_header). This is because IrDA packet 390*76404edcSAsim Jamshed * decoding is dependant on the direction of the packet (incomming or 391*76404edcSAsim Jamshed * outgoing). 392*76404edcSAsim Jamshed * When/if other platform implement IrDA capture, we may revisit the 393*76404edcSAsim Jamshed * issue and define a real DLT_IRDA... 394*76404edcSAsim Jamshed * Jean II 395*76404edcSAsim Jamshed */ 396*76404edcSAsim Jamshed #define DLT_LINUX_IRDA 144 397*76404edcSAsim Jamshed 398*76404edcSAsim Jamshed /* 399*76404edcSAsim Jamshed * Reserved for IBM SP switch and IBM Next Federation switch. 400*76404edcSAsim Jamshed */ 401*76404edcSAsim Jamshed #define DLT_IBM_SP 145 402*76404edcSAsim Jamshed #define DLT_IBM_SN 146 403*76404edcSAsim Jamshed 404*76404edcSAsim Jamshed /* 405*76404edcSAsim Jamshed * Reserved for private use. If you have some link-layer header type 406*76404edcSAsim Jamshed * that you want to use within your organization, with the capture files 407*76404edcSAsim Jamshed * using that link-layer header type not ever be sent outside your 408*76404edcSAsim Jamshed * organization, you can use these values. 409*76404edcSAsim Jamshed * 410*76404edcSAsim Jamshed * No libpcap release will use these for any purpose, nor will any 411*76404edcSAsim Jamshed * tcpdump release use them, either. 412*76404edcSAsim Jamshed * 413*76404edcSAsim Jamshed * Do *NOT* use these in capture files that you expect anybody not using 414*76404edcSAsim Jamshed * your private versions of capture-file-reading tools to read; in 415*76404edcSAsim Jamshed * particular, do *NOT* use them in products, otherwise you may find that 416*76404edcSAsim Jamshed * people won't be able to use tcpdump, or snort, or Ethereal, or... to 417*76404edcSAsim Jamshed * read capture files from your firewall/intrusion detection/traffic 418*76404edcSAsim Jamshed * monitoring/etc. appliance, or whatever product uses that DLT_ value, 419*76404edcSAsim Jamshed * and you may also find that the developers of those applications will 420*76404edcSAsim Jamshed * not accept patches to let them read those files. 421*76404edcSAsim Jamshed * 422*76404edcSAsim Jamshed * Also, do not use them if somebody might send you a capture using them 423*76404edcSAsim Jamshed * for *their* private type and tools using them for *your* private type 424*76404edcSAsim Jamshed * would have to read them. 425*76404edcSAsim Jamshed * 426*76404edcSAsim Jamshed * Instead, ask "[email protected]" for a new DLT_ value, 427*76404edcSAsim Jamshed * as per the comment above, and use the type you're given. 428*76404edcSAsim Jamshed */ 429*76404edcSAsim Jamshed #define DLT_USER0 147 430*76404edcSAsim Jamshed #define DLT_USER1 148 431*76404edcSAsim Jamshed #define DLT_USER2 149 432*76404edcSAsim Jamshed #define DLT_USER3 150 433*76404edcSAsim Jamshed #define DLT_USER4 151 434*76404edcSAsim Jamshed #define DLT_USER5 152 435*76404edcSAsim Jamshed #define DLT_USER6 153 436*76404edcSAsim Jamshed #define DLT_USER7 154 437*76404edcSAsim Jamshed #define DLT_USER8 155 438*76404edcSAsim Jamshed #define DLT_USER9 156 439*76404edcSAsim Jamshed #define DLT_USER10 157 440*76404edcSAsim Jamshed #define DLT_USER11 158 441*76404edcSAsim Jamshed #define DLT_USER12 159 442*76404edcSAsim Jamshed #define DLT_USER13 160 443*76404edcSAsim Jamshed #define DLT_USER14 161 444*76404edcSAsim Jamshed #define DLT_USER15 162 445*76404edcSAsim Jamshed 446*76404edcSAsim Jamshed /* 447*76404edcSAsim Jamshed * For future use with 802.11 captures - defined by AbsoluteValue 448*76404edcSAsim Jamshed * Systems to store a number of bits of link-layer information 449*76404edcSAsim Jamshed * including radio information: 450*76404edcSAsim Jamshed * 451*76404edcSAsim Jamshed * http://www.shaftnet.org/~pizza/software/capturefrm.txt 452*76404edcSAsim Jamshed * 453*76404edcSAsim Jamshed * but it might be used by some non-AVS drivers now or in the 454*76404edcSAsim Jamshed * future. 455*76404edcSAsim Jamshed */ 456*76404edcSAsim Jamshed #define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ 457*76404edcSAsim Jamshed 458*76404edcSAsim Jamshed /* 459*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 460*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. The DLT_s are used 461*76404edcSAsim Jamshed * for passing on chassis-internal metainformation such as 462*76404edcSAsim Jamshed * QOS profiles, etc.. 463*76404edcSAsim Jamshed */ 464*76404edcSAsim Jamshed #define DLT_JUNIPER_MONITOR 164 465*76404edcSAsim Jamshed 466*76404edcSAsim Jamshed /* 467*76404edcSAsim Jamshed * Reserved for BACnet MS/TP. 468*76404edcSAsim Jamshed */ 469*76404edcSAsim Jamshed #define DLT_BACNET_MS_TP 165 470*76404edcSAsim Jamshed 471*76404edcSAsim Jamshed /* 472*76404edcSAsim Jamshed * Another PPP variant as per request from Karsten Keil <[email protected]>. 473*76404edcSAsim Jamshed * 474*76404edcSAsim Jamshed * This is used in some OSes to allow a kernel socket filter to distinguish 475*76404edcSAsim Jamshed * between incoming and outgoing packets, on a socket intended to 476*76404edcSAsim Jamshed * supply pppd with outgoing packets so it can do dial-on-demand and 477*76404edcSAsim Jamshed * hangup-on-lack-of-demand; incoming packets are filtered out so they 478*76404edcSAsim Jamshed * don't cause pppd to hold the connection up (you don't want random 479*76404edcSAsim Jamshed * input packets such as port scans, packets from old lost connections, 480*76404edcSAsim Jamshed * etc. to force the connection to stay up). 481*76404edcSAsim Jamshed * 482*76404edcSAsim Jamshed * The first byte of the PPP header (0xff03) is modified to accomodate 483*76404edcSAsim Jamshed * the direction - 0x00 = IN, 0x01 = OUT. 484*76404edcSAsim Jamshed */ 485*76404edcSAsim Jamshed #define DLT_PPP_PPPD 166 486*76404edcSAsim Jamshed 487*76404edcSAsim Jamshed /* 488*76404edcSAsim Jamshed * Names for backwards compatibility with older versions of some PPP 489*76404edcSAsim Jamshed * software; new software should use DLT_PPP_PPPD. 490*76404edcSAsim Jamshed */ 491*76404edcSAsim Jamshed #define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD 492*76404edcSAsim Jamshed #define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD 493*76404edcSAsim Jamshed 494*76404edcSAsim Jamshed /* 495*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 496*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. The DLT_s are used 497*76404edcSAsim Jamshed * for passing on chassis-internal metainformation such as 498*76404edcSAsim Jamshed * QOS profiles, cookies, etc.. 499*76404edcSAsim Jamshed */ 500*76404edcSAsim Jamshed #define DLT_JUNIPER_PPPOE 167 501*76404edcSAsim Jamshed #define DLT_JUNIPER_PPPOE_ATM 168 502*76404edcSAsim Jamshed 503*76404edcSAsim Jamshed #define DLT_GPRS_LLC 169 /* GPRS LLC */ 504*76404edcSAsim Jamshed #define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ 505*76404edcSAsim Jamshed #define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ 506*76404edcSAsim Jamshed 507*76404edcSAsim Jamshed /* 508*76404edcSAsim Jamshed * Requested by Oolan Zimmer <[email protected]> for use in Gcom's T1/E1 line 509*76404edcSAsim Jamshed * monitoring equipment. 510*76404edcSAsim Jamshed */ 511*76404edcSAsim Jamshed #define DLT_GCOM_T1E1 172 512*76404edcSAsim Jamshed #define DLT_GCOM_SERIAL 173 513*76404edcSAsim Jamshed 514*76404edcSAsim Jamshed /* 515*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 516*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. The DLT_ is used 517*76404edcSAsim Jamshed * for internal communication to Physical Interface Cards (PIC) 518*76404edcSAsim Jamshed */ 519*76404edcSAsim Jamshed #define DLT_JUNIPER_PIC_PEER 174 520*76404edcSAsim Jamshed 521*76404edcSAsim Jamshed /* 522*76404edcSAsim Jamshed * Link types requested by Gregor Maier <[email protected]> of Endace 523*76404edcSAsim Jamshed * Measurement Systems. They add an ERF header (see 524*76404edcSAsim Jamshed * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of 525*76404edcSAsim Jamshed * the link-layer header. 526*76404edcSAsim Jamshed */ 527*76404edcSAsim Jamshed #define DLT_ERF_ETH 175 /* Ethernet */ 528*76404edcSAsim Jamshed #define DLT_ERF_POS 176 /* Packet-over-SONET */ 529*76404edcSAsim Jamshed 530*76404edcSAsim Jamshed /* 531*76404edcSAsim Jamshed * Requested by Daniele Orlandi <[email protected]> for raw LAPD 532*76404edcSAsim Jamshed * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header 533*76404edcSAsim Jamshed * includes additional information before the LAPD header, so it's 534*76404edcSAsim Jamshed * not necessarily a generic LAPD header. 535*76404edcSAsim Jamshed */ 536*76404edcSAsim Jamshed #define DLT_LINUX_LAPD 177 537*76404edcSAsim Jamshed 538*76404edcSAsim Jamshed /* 539*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 540*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. 541*76404edcSAsim Jamshed * The DLT_ are used for prepending meta-information 542*76404edcSAsim Jamshed * like interface index, interface name 543*76404edcSAsim Jamshed * before standard Ethernet, PPP, Frelay & C-HDLC Frames 544*76404edcSAsim Jamshed */ 545*76404edcSAsim Jamshed #define DLT_JUNIPER_ETHER 178 546*76404edcSAsim Jamshed #define DLT_JUNIPER_PPP 179 547*76404edcSAsim Jamshed #define DLT_JUNIPER_FRELAY 180 548*76404edcSAsim Jamshed #define DLT_JUNIPER_CHDLC 181 549*76404edcSAsim Jamshed 550*76404edcSAsim Jamshed /* 551*76404edcSAsim Jamshed * Multi Link Frame Relay (FRF.16) 552*76404edcSAsim Jamshed */ 553*76404edcSAsim Jamshed #define DLT_MFR 182 554*76404edcSAsim Jamshed 555*76404edcSAsim Jamshed /* 556*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 557*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. 558*76404edcSAsim Jamshed * The DLT_ is used for internal communication with a 559*76404edcSAsim Jamshed * voice Adapter Card (PIC) 560*76404edcSAsim Jamshed */ 561*76404edcSAsim Jamshed #define DLT_JUNIPER_VP 183 562*76404edcSAsim Jamshed 563*76404edcSAsim Jamshed /* 564*76404edcSAsim Jamshed * Arinc 429 frames. 565*76404edcSAsim Jamshed * DLT_ requested by Gianluca Varenni <[email protected]>. 566*76404edcSAsim Jamshed * Every frame contains a 32bit A429 label. 567*76404edcSAsim Jamshed * More documentation on Arinc 429 can be found at 568*76404edcSAsim Jamshed * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf 569*76404edcSAsim Jamshed */ 570*76404edcSAsim Jamshed #define DLT_A429 184 571*76404edcSAsim Jamshed 572*76404edcSAsim Jamshed /* 573*76404edcSAsim Jamshed * Arinc 653 Interpartition Communication messages. 574*76404edcSAsim Jamshed * DLT_ requested by Gianluca Varenni <[email protected]>. 575*76404edcSAsim Jamshed * Please refer to the A653-1 standard for more information. 576*76404edcSAsim Jamshed */ 577*76404edcSAsim Jamshed #define DLT_A653_ICM 185 578*76404edcSAsim Jamshed 579*76404edcSAsim Jamshed /* 580*76404edcSAsim Jamshed * USB packets, beginning with a USB setup header; requested by 581*76404edcSAsim Jamshed * Paolo Abeni <[email protected]>. 582*76404edcSAsim Jamshed */ 583*76404edcSAsim Jamshed #define DLT_USB 186 584*76404edcSAsim Jamshed 585*76404edcSAsim Jamshed /* 586*76404edcSAsim Jamshed * Bluetooth HCI UART transport layer (part H:4); requested by 587*76404edcSAsim Jamshed * Paolo Abeni. 588*76404edcSAsim Jamshed */ 589*76404edcSAsim Jamshed #define DLT_BLUETOOTH_HCI_H4 187 590*76404edcSAsim Jamshed 591*76404edcSAsim Jamshed /* 592*76404edcSAsim Jamshed * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz 593*76404edcSAsim Jamshed * <[email protected]>. 594*76404edcSAsim Jamshed */ 595*76404edcSAsim Jamshed #define DLT_IEEE802_16_MAC_CPS 188 596*76404edcSAsim Jamshed 597*76404edcSAsim Jamshed /* 598*76404edcSAsim Jamshed * USB packets, beginning with a Linux USB header; requested by 599*76404edcSAsim Jamshed * Paolo Abeni <[email protected]>. 600*76404edcSAsim Jamshed */ 601*76404edcSAsim Jamshed #define DLT_USB_LINUX 189 602*76404edcSAsim Jamshed 603*76404edcSAsim Jamshed /* 604*76404edcSAsim Jamshed * Controller Area Network (CAN) v. 2.0B packets. 605*76404edcSAsim Jamshed * DLT_ requested by Gianluca Varenni <[email protected]>. 606*76404edcSAsim Jamshed * Used to dump CAN packets coming from a CAN Vector board. 607*76404edcSAsim Jamshed * More documentation on the CAN v2.0B frames can be found at 608*76404edcSAsim Jamshed * http://www.can-cia.org/downloads/?269 609*76404edcSAsim Jamshed */ 610*76404edcSAsim Jamshed #define DLT_CAN20B 190 611*76404edcSAsim Jamshed 612*76404edcSAsim Jamshed /* 613*76404edcSAsim Jamshed * IEEE 802.15.4, with address fields padded, as is done by Linux 614*76404edcSAsim Jamshed * drivers; requested by Juergen Schimmer. 615*76404edcSAsim Jamshed */ 616*76404edcSAsim Jamshed #define DLT_IEEE802_15_4_LINUX 191 617*76404edcSAsim Jamshed 618*76404edcSAsim Jamshed /* 619*76404edcSAsim Jamshed * Per Packet Information encapsulated packets. 620*76404edcSAsim Jamshed * DLT_ requested by Gianluca Varenni <[email protected]>. 621*76404edcSAsim Jamshed */ 622*76404edcSAsim Jamshed #define DLT_PPI 192 623*76404edcSAsim Jamshed 624*76404edcSAsim Jamshed /* 625*76404edcSAsim Jamshed * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; 626*76404edcSAsim Jamshed * requested by Charles Clancy. 627*76404edcSAsim Jamshed */ 628*76404edcSAsim Jamshed #define DLT_IEEE802_16_MAC_CPS_RADIO 193 629*76404edcSAsim Jamshed 630*76404edcSAsim Jamshed /* 631*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 632*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. 633*76404edcSAsim Jamshed * The DLT_ is used for internal communication with a 634*76404edcSAsim Jamshed * integrated service module (ISM). 635*76404edcSAsim Jamshed */ 636*76404edcSAsim Jamshed #define DLT_JUNIPER_ISM 194 637*76404edcSAsim Jamshed 638*76404edcSAsim Jamshed /* 639*76404edcSAsim Jamshed * IEEE 802.15.4, exactly as it appears in the spec (no padding, no 640*76404edcSAsim Jamshed * nothing); requested by Mikko Saarnivala <[email protected]>. 641*76404edcSAsim Jamshed */ 642*76404edcSAsim Jamshed #define DLT_IEEE802_15_4 195 643*76404edcSAsim Jamshed 644*76404edcSAsim Jamshed /* 645*76404edcSAsim Jamshed * Various link-layer types, with a pseudo-header, for SITA 646*76404edcSAsim Jamshed * (http://www.sita.aero/); requested by Fulko Hew ([email protected]). 647*76404edcSAsim Jamshed */ 648*76404edcSAsim Jamshed #define DLT_SITA 196 649*76404edcSAsim Jamshed 650*76404edcSAsim Jamshed /* 651*76404edcSAsim Jamshed * Various link-layer types, with a pseudo-header, for Endace DAG cards; 652*76404edcSAsim Jamshed * encapsulates Endace ERF records. Requested by Stephen Donnelly 653*76404edcSAsim Jamshed * <[email protected]>. 654*76404edcSAsim Jamshed */ 655*76404edcSAsim Jamshed #define DLT_ERF 197 656*76404edcSAsim Jamshed 657*76404edcSAsim Jamshed /* 658*76404edcSAsim Jamshed * Special header prepended to Ethernet packets when capturing from a 659*76404edcSAsim Jamshed * u10 Networks board. Requested by Phil Mulholland 660*76404edcSAsim Jamshed * <[email protected]>. 661*76404edcSAsim Jamshed */ 662*76404edcSAsim Jamshed #define DLT_RAIF1 198 663*76404edcSAsim Jamshed 664*76404edcSAsim Jamshed /* 665*76404edcSAsim Jamshed * IPMB packet for IPMI, beginning with the I2C slave address, followed 666*76404edcSAsim Jamshed * by the netFn and LUN, etc.. Requested by Chanthy Toeung 667*76404edcSAsim Jamshed * <[email protected]>. 668*76404edcSAsim Jamshed */ 669*76404edcSAsim Jamshed #define DLT_IPMB 199 670*76404edcSAsim Jamshed 671*76404edcSAsim Jamshed /* 672*76404edcSAsim Jamshed * Juniper-private data link type, as per request from 673*76404edcSAsim Jamshed * Hannes Gredler <[email protected]>. 674*76404edcSAsim Jamshed * The DLT_ is used for capturing data on a secure tunnel interface. 675*76404edcSAsim Jamshed */ 676*76404edcSAsim Jamshed #define DLT_JUNIPER_ST 200 677*76404edcSAsim Jamshed 678*76404edcSAsim Jamshed /* 679*76404edcSAsim Jamshed * Bluetooth HCI UART transport layer (part H:4), with pseudo-header 680*76404edcSAsim Jamshed * that includes direction information; requested by Paolo Abeni. 681*76404edcSAsim Jamshed */ 682*76404edcSAsim Jamshed #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 683*76404edcSAsim Jamshed 684*76404edcSAsim Jamshed /* 685*76404edcSAsim Jamshed * AX.25 packet with a 1-byte KISS header; see 686*76404edcSAsim Jamshed * 687*76404edcSAsim Jamshed * http://www.ax25.net/kiss.htm 688*76404edcSAsim Jamshed * 689*76404edcSAsim Jamshed * as per Richard Stearn <[email protected]>. 690*76404edcSAsim Jamshed */ 691*76404edcSAsim Jamshed #define DLT_AX25_KISS 202 692*76404edcSAsim Jamshed 693*76404edcSAsim Jamshed /* 694*76404edcSAsim Jamshed * LAPD packets from an ISDN channel, starting with the address field, 695*76404edcSAsim Jamshed * with no pseudo-header. 696*76404edcSAsim Jamshed * Requested by Varuna De Silva <[email protected]>. 697*76404edcSAsim Jamshed */ 698*76404edcSAsim Jamshed #define DLT_LAPD 203 699*76404edcSAsim Jamshed 700*76404edcSAsim Jamshed /* 701*76404edcSAsim Jamshed * Variants of various link-layer headers, with a one-byte direction 702*76404edcSAsim Jamshed * pseudo-header prepended - zero means "received by this host", 703*76404edcSAsim Jamshed * non-zero (any non-zero value) means "sent by this host" - as per 704*76404edcSAsim Jamshed * Will Barker <[email protected]>. 705*76404edcSAsim Jamshed */ 706*76404edcSAsim Jamshed #define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */ 707*76404edcSAsim Jamshed #define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */ 708*76404edcSAsim Jamshed #define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */ 709*76404edcSAsim Jamshed #define DLT_LAPB_WITH_DIR 207 /* LAPB */ 710*76404edcSAsim Jamshed 711*76404edcSAsim Jamshed /* 712*76404edcSAsim Jamshed * 208 is reserved for an as-yet-unspecified proprietary link-layer 713*76404edcSAsim Jamshed * type, as requested by Will Barker. 714*76404edcSAsim Jamshed */ 715*76404edcSAsim Jamshed 716*76404edcSAsim Jamshed /* 717*76404edcSAsim Jamshed * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman 718*76404edcSAsim Jamshed * <[email protected]>. 719*76404edcSAsim Jamshed */ 720*76404edcSAsim Jamshed #define DLT_IPMB_LINUX 209 721*76404edcSAsim Jamshed 722*76404edcSAsim Jamshed /* 723*76404edcSAsim Jamshed * FlexRay automotive bus - http://www.flexray.com/ - as requested 724*76404edcSAsim Jamshed * by Hannes Kaelber <[email protected]>. 725*76404edcSAsim Jamshed */ 726*76404edcSAsim Jamshed #define DLT_FLEXRAY 210 727*76404edcSAsim Jamshed 728*76404edcSAsim Jamshed /* 729*76404edcSAsim Jamshed * Media Oriented Systems Transport (MOST) bus for multimedia 730*76404edcSAsim Jamshed * transport - http://www.mostcooperation.com/ - as requested 731*76404edcSAsim Jamshed * by Hannes Kaelber <[email protected]>. 732*76404edcSAsim Jamshed */ 733*76404edcSAsim Jamshed #define DLT_MOST 211 734*76404edcSAsim Jamshed 735*76404edcSAsim Jamshed /* 736*76404edcSAsim Jamshed * Local Interconnect Network (LIN) bus for vehicle networks - 737*76404edcSAsim Jamshed * http://www.lin-subbus.org/ - as requested by Hannes Kaelber 738*76404edcSAsim Jamshed * <[email protected]>. 739*76404edcSAsim Jamshed */ 740*76404edcSAsim Jamshed #define DLT_LIN 212 741*76404edcSAsim Jamshed 742*76404edcSAsim Jamshed /* 743*76404edcSAsim Jamshed * X2E-private data link type used for serial line capture, 744*76404edcSAsim Jamshed * as requested by Hannes Kaelber <[email protected]>. 745*76404edcSAsim Jamshed */ 746*76404edcSAsim Jamshed #define DLT_X2E_SERIAL 213 747*76404edcSAsim Jamshed 748*76404edcSAsim Jamshed /* 749*76404edcSAsim Jamshed * X2E-private data link type used for the Xoraya data logger 750*76404edcSAsim Jamshed * family, as requested by Hannes Kaelber <[email protected]>. 751*76404edcSAsim Jamshed */ 752*76404edcSAsim Jamshed #define DLT_X2E_XORAYA 214 753*76404edcSAsim Jamshed 754*76404edcSAsim Jamshed /* 755*76404edcSAsim Jamshed * IEEE 802.15.4, exactly as it appears in the spec (no padding, no 756*76404edcSAsim Jamshed * nothing), but with the PHY-level data for non-ASK PHYs (4 octets 757*76404edcSAsim Jamshed * of 0 as preamble, one octet of SFD, one octet of frame length+ 758*76404edcSAsim Jamshed * reserved bit, and then the MAC-layer data, starting with the 759*76404edcSAsim Jamshed * frame control field). 760*76404edcSAsim Jamshed * 761*76404edcSAsim Jamshed * Requested by Max Filippov <[email protected]>. 762*76404edcSAsim Jamshed */ 763*76404edcSAsim Jamshed #define DLT_IEEE802_15_4_NONASK_PHY 215 764*76404edcSAsim Jamshed 765*76404edcSAsim Jamshed /* 766*76404edcSAsim Jamshed * David Gibson <[email protected]> requested this for 767*76404edcSAsim Jamshed * captures from the Linux kernel /dev/input/eventN devices. This 768*76404edcSAsim Jamshed * is used to communicate keystrokes and mouse movements from the 769*76404edcSAsim Jamshed * Linux kernel to display systems, such as Xorg. 770*76404edcSAsim Jamshed */ 771*76404edcSAsim Jamshed #define DLT_LINUX_EVDEV 216 772*76404edcSAsim Jamshed 773*76404edcSAsim Jamshed /* 774*76404edcSAsim Jamshed * GSM Um and Abis interfaces, preceded by a "gsmtap" header. 775*76404edcSAsim Jamshed * 776*76404edcSAsim Jamshed * Requested by Harald Welte <[email protected]>. 777*76404edcSAsim Jamshed */ 778*76404edcSAsim Jamshed #define DLT_GSMTAP_UM 217 779*76404edcSAsim Jamshed #define DLT_GSMTAP_ABIS 218 780*76404edcSAsim Jamshed 781*76404edcSAsim Jamshed /* 782*76404edcSAsim Jamshed * MPLS, with an MPLS label as the link-layer header. 783*76404edcSAsim Jamshed * Requested by Michele Marchetto <[email protected]> on behalf 784*76404edcSAsim Jamshed * of OpenBSD. 785*76404edcSAsim Jamshed */ 786*76404edcSAsim Jamshed #define DLT_MPLS 219 787*76404edcSAsim Jamshed 788*76404edcSAsim Jamshed /* 789*76404edcSAsim Jamshed * USB packets, beginning with a Linux USB header, with the USB header 790*76404edcSAsim Jamshed * padded to 64 bytes; required for memory-mapped access. 791*76404edcSAsim Jamshed */ 792*76404edcSAsim Jamshed #define DLT_USB_LINUX_MMAPPED 220 793*76404edcSAsim Jamshed 794*76404edcSAsim Jamshed /* 795*76404edcSAsim Jamshed * DECT packets, with a pseudo-header; requested by 796*76404edcSAsim Jamshed * Matthias Wenzel <[email protected]>. 797*76404edcSAsim Jamshed */ 798*76404edcSAsim Jamshed #define DLT_DECT 221 799*76404edcSAsim Jamshed 800*76404edcSAsim Jamshed /* 801*76404edcSAsim Jamshed * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <[email protected]> 802*76404edcSAsim Jamshed * Date: Mon, 11 May 2009 11:18:30 -0500 803*76404edcSAsim Jamshed * 804*76404edcSAsim Jamshed * DLT_AOS. We need it for AOS Space Data Link Protocol. 805*76404edcSAsim Jamshed * I have already written dissectors for but need an OK from 806*76404edcSAsim Jamshed * legal before I can submit a patch. 807*76404edcSAsim Jamshed * 808*76404edcSAsim Jamshed */ 809*76404edcSAsim Jamshed #define DLT_AOS 222 810*76404edcSAsim Jamshed 811*76404edcSAsim Jamshed /* 812*76404edcSAsim Jamshed * Wireless HART (Highway Addressable Remote Transducer) 813*76404edcSAsim Jamshed * From the HART Communication Foundation 814*76404edcSAsim Jamshed * IES/PAS 62591 815*76404edcSAsim Jamshed * 816*76404edcSAsim Jamshed * Requested by Sam Roberts <[email protected]>. 817*76404edcSAsim Jamshed */ 818*76404edcSAsim Jamshed #define DLT_WIHART 223 819*76404edcSAsim Jamshed 820*76404edcSAsim Jamshed /* 821*76404edcSAsim Jamshed * Fibre Channel FC-2 frames, beginning with a Frame_Header. 822*76404edcSAsim Jamshed * Requested by Kahou Lei <[email protected]>. 823*76404edcSAsim Jamshed */ 824*76404edcSAsim Jamshed #define DLT_FC_2 224 825*76404edcSAsim Jamshed 826*76404edcSAsim Jamshed /* 827*76404edcSAsim Jamshed * Fibre Channel FC-2 frames, beginning with an encoding of the 828*76404edcSAsim Jamshed * SOF, and ending with an encoding of the EOF. 829*76404edcSAsim Jamshed * 830*76404edcSAsim Jamshed * The encodings represent the frame delimiters as 4-byte sequences 831*76404edcSAsim Jamshed * representing the corresponding ordered sets, with K28.5 832*76404edcSAsim Jamshed * represented as 0xBC, and the D symbols as the corresponding 833*76404edcSAsim Jamshed * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2, 834*76404edcSAsim Jamshed * is represented as 0xBC 0xB5 0x55 0x55. 835*76404edcSAsim Jamshed * 836*76404edcSAsim Jamshed * Requested by Kahou Lei <[email protected]>. 837*76404edcSAsim Jamshed */ 838*76404edcSAsim Jamshed #define DLT_FC_2_WITH_FRAME_DELIMS 225 839*76404edcSAsim Jamshed 840*76404edcSAsim Jamshed /* 841*76404edcSAsim Jamshed * Solaris ipnet pseudo-header; requested by Darren Reed <[email protected]>. 842*76404edcSAsim Jamshed * 843*76404edcSAsim Jamshed * The pseudo-header starts with a one-byte version number; for version 2, 844*76404edcSAsim Jamshed * the pseudo-header is: 845*76404edcSAsim Jamshed * 846*76404edcSAsim Jamshed * struct dl_ipnetinfo { 847*76404edcSAsim Jamshed * u_int8_t dli_version; 848*76404edcSAsim Jamshed * u_int8_t dli_family; 849*76404edcSAsim Jamshed * u_int16_t dli_htype; 850*76404edcSAsim Jamshed * u_int32_t dli_pktlen; 851*76404edcSAsim Jamshed * u_int32_t dli_ifindex; 852*76404edcSAsim Jamshed * u_int32_t dli_grifindex; 853*76404edcSAsim Jamshed * u_int32_t dli_zsrc; 854*76404edcSAsim Jamshed * u_int32_t dli_zdst; 855*76404edcSAsim Jamshed * }; 856*76404edcSAsim Jamshed * 857*76404edcSAsim Jamshed * dli_version is 2 for the current version of the pseudo-header. 858*76404edcSAsim Jamshed * 859*76404edcSAsim Jamshed * dli_family is a Solaris address family value, so it's 2 for IPv4 860*76404edcSAsim Jamshed * and 26 for IPv6. 861*76404edcSAsim Jamshed * 862*76404edcSAsim Jamshed * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing 863*76404edcSAsim Jamshed * packets, and 2 for packets arriving from another zone on the same 864*76404edcSAsim Jamshed * machine. 865*76404edcSAsim Jamshed * 866*76404edcSAsim Jamshed * dli_pktlen is the length of the packet data following the pseudo-header 867*76404edcSAsim Jamshed * (so the captured length minus dli_pktlen is the length of the 868*76404edcSAsim Jamshed * pseudo-header, assuming the entire pseudo-header was captured). 869*76404edcSAsim Jamshed * 870*76404edcSAsim Jamshed * dli_ifindex is the interface index of the interface on which the 871*76404edcSAsim Jamshed * packet arrived. 872*76404edcSAsim Jamshed * 873*76404edcSAsim Jamshed * dli_grifindex is the group interface index number (for IPMP interfaces). 874*76404edcSAsim Jamshed * 875*76404edcSAsim Jamshed * dli_zsrc is the zone identifier for the source of the packet. 876*76404edcSAsim Jamshed * 877*76404edcSAsim Jamshed * dli_zdst is the zone identifier for the destination of the packet. 878*76404edcSAsim Jamshed * 879*76404edcSAsim Jamshed * A zone number of 0 is the global zone; a zone number of 0xffffffff 880*76404edcSAsim Jamshed * means that the packet arrived from another host on the network, not 881*76404edcSAsim Jamshed * from another zone on the same machine. 882*76404edcSAsim Jamshed * 883*76404edcSAsim Jamshed * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates 884*76404edcSAsim Jamshed * which of those it is. 885*76404edcSAsim Jamshed */ 886*76404edcSAsim Jamshed #define DLT_IPNET 226 887*76404edcSAsim Jamshed 888*76404edcSAsim Jamshed /* 889*76404edcSAsim Jamshed * CAN (Controller Area Network) frames, with a pseudo-header as supplied 890*76404edcSAsim Jamshed * by Linux SocketCAN. See Documentation/networking/can.txt in the Linux 891*76404edcSAsim Jamshed * source. 892*76404edcSAsim Jamshed * 893*76404edcSAsim Jamshed * Requested by Felix Obenhuber <[email protected]>. 894*76404edcSAsim Jamshed */ 895*76404edcSAsim Jamshed #define DLT_CAN_SOCKETCAN 227 896*76404edcSAsim Jamshed 897*76404edcSAsim Jamshed /* 898*76404edcSAsim Jamshed * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies 899*76404edcSAsim Jamshed * whether it's v4 or v6. Requested by Darren Reed <[email protected]>. 900*76404edcSAsim Jamshed */ 901*76404edcSAsim Jamshed #define DLT_IPV4 228 902*76404edcSAsim Jamshed #define DLT_IPV6 229 903*76404edcSAsim Jamshed 904*76404edcSAsim Jamshed /* 905*76404edcSAsim Jamshed * DLT and savefile link type values are split into a class and 906*76404edcSAsim Jamshed * a member of that class. A class value of 0 indicates a regular 907*76404edcSAsim Jamshed * DLT_/LINKTYPE_ value. 908*76404edcSAsim Jamshed */ 909*76404edcSAsim Jamshed #define DLT_CLASS(x) ((x) & 0x03ff0000) 910*76404edcSAsim Jamshed 911*76404edcSAsim Jamshed /* 912*76404edcSAsim Jamshed * NetBSD-specific generic "raw" link type. The class value indicates 913*76404edcSAsim Jamshed * that this is the generic raw type, and the lower 16 bits are the 914*76404edcSAsim Jamshed * address family we're dealing with. Those values are NetBSD-specific; 915*76404edcSAsim Jamshed * do not assume that they correspond to AF_ values for your operating 916*76404edcSAsim Jamshed * system. 917*76404edcSAsim Jamshed */ 918*76404edcSAsim Jamshed #define DLT_CLASS_NETBSD_RAWAF 0x02240000 919*76404edcSAsim Jamshed #define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af)) 920*76404edcSAsim Jamshed #define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff) 921*76404edcSAsim Jamshed #define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF) 922*76404edcSAsim Jamshed 923*76404edcSAsim Jamshed #endif /* _SFBPF_DLT_H */ 924