Blame pcap/dlt.h

Packit 209cc3
/*-
Packit 209cc3
 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
Packit 209cc3
 *	The Regents of the University of California.  All rights reserved.
Packit 209cc3
 *
Packit 209cc3
 * This code is derived from the Stanford/CMU enet packet filter,
Packit 209cc3
 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
Packit 209cc3
 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
Packit 209cc3
 * Berkeley Laboratory.
Packit 209cc3
 *
Packit 209cc3
 * Redistribution and use in source and binary forms, with or without
Packit 209cc3
 * modification, are permitted provided that the following conditions
Packit 209cc3
 * are met:
Packit 209cc3
 * 1. Redistributions of source code must retain the above copyright
Packit 209cc3
 *    notice, this list of conditions and the following disclaimer.
Packit 209cc3
 * 2. Redistributions in binary form must reproduce the above copyright
Packit 209cc3
 *    notice, this list of conditions and the following disclaimer in the
Packit 209cc3
 *    documentation and/or other materials provided with the distribution.
Packit 209cc3
 * 3. Neither the name of the University nor the names of its contributors
Packit 209cc3
 *    may be used to endorse or promote products derived from this software
Packit 209cc3
 *    without specific prior written permission.
Packit 209cc3
 *
Packit 209cc3
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
Packit 209cc3
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 209cc3
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 209cc3
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
Packit 209cc3
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 209cc3
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 209cc3
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 209cc3
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 209cc3
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 209cc3
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 209cc3
 * SUCH DAMAGE.
Packit 209cc3
 *
Packit 209cc3
 *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
#ifndef lib_pcap_dlt_h
Packit 209cc3
#define lib_pcap_dlt_h
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Link-layer header type codes.
Packit 209cc3
 *
Packit 209cc3
 * Do *NOT* add new values to this list without asking
Packit 209cc3
 * "tcpdump-workers@lists.tcpdump.org" for a value.  Otherwise, you run
Packit 209cc3
 * the risk of using a value that's already being used for some other
Packit 209cc3
 * purpose, and of having tools that read libpcap-format captures not
Packit 209cc3
 * being able to handle captures with your new DLT_ value, with no hope
Packit 209cc3
 * that they will ever be changed to do so (as that would destroy their
Packit 209cc3
 * ability to read captures using that value for that other purpose).
Packit 209cc3
 *
Packit 209cc3
 * See
Packit 209cc3
 *
Packit 209cc3
 *	https://www.tcpdump.org/linktypes.html
Packit 209cc3
 *
Packit 209cc3
 * for detailed descriptions of some of these link-layer header types.
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * These are the types that are the same on all platforms, and that
Packit 209cc3
 * have been defined by <net/bpf.h> for ages.
Packit 209cc3
 */
Packit 209cc3
#define DLT_NULL	0	/* BSD loopback encapsulation */
Packit 209cc3
#define DLT_EN10MB	1	/* Ethernet (10Mb) */
Packit 209cc3
#define DLT_EN3MB	2	/* Experimental Ethernet (3Mb) */
Packit 209cc3
#define DLT_AX25	3	/* Amateur Radio AX.25 */
Packit 209cc3
#define DLT_PRONET	4	/* Proteon ProNET Token Ring */
Packit 209cc3
#define DLT_CHAOS	5	/* Chaos */
Packit 209cc3
#define DLT_IEEE802	6	/* 802.5 Token Ring */
Packit 209cc3
#define DLT_ARCNET	7	/* ARCNET, with BSD-style header */
Packit 209cc3
#define DLT_SLIP	8	/* Serial Line IP */
Packit 209cc3
#define DLT_PPP		9	/* Point-to-point Protocol */
Packit 209cc3
#define DLT_FDDI	10	/* FDDI */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * These are types that are different on some platforms, and that
Packit 209cc3
 * have been defined by <net/bpf.h> for ages.  We use #ifdefs to
Packit 209cc3
 * detect the BSDs that define them differently from the traditional
Packit 209cc3
 * libpcap <net/bpf.h>
Packit 209cc3
 *
Packit 209cc3
 * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
Packit 209cc3
 * but I don't know what the right #define is for BSD/OS.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ATM_RFC1483	11	/* LLC-encapsulated ATM */
Packit 209cc3
Packit 209cc3
#ifdef __OpenBSD__
Packit 209cc3
#define DLT_RAW		14	/* raw IP */
Packit 209cc3
#else
Packit 209cc3
#define DLT_RAW		12	/* raw IP */
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Given that the only OS that currently generates BSD/OS SLIP or PPP
Packit 209cc3
 * is, well, BSD/OS, arguably everybody should have chosen its values
Packit 209cc3
 * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
Packit 209cc3
 * didn't.  So it goes.
Packit 209cc3
 */
Packit 209cc3
#if defined(__NetBSD__) || defined(__FreeBSD__)
Packit 209cc3
#ifndef DLT_SLIP_BSDOS
Packit 209cc3
#define DLT_SLIP_BSDOS	13	/* BSD/OS Serial Line IP */
Packit 209cc3
#define DLT_PPP_BSDOS	14	/* BSD/OS Point-to-point Protocol */
Packit 209cc3
#endif
Packit 209cc3
#else
Packit 209cc3
#define DLT_SLIP_BSDOS	15	/* BSD/OS Serial Line IP */
Packit 209cc3
#define DLT_PPP_BSDOS	16	/* BSD/OS Point-to-point Protocol */
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * 17 was used for DLT_PFLOG in OpenBSD; it no longer is.
Packit 209cc3
 *
Packit 209cc3
 * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG
Packit 209cc3
 * as 117 so that pflog captures would use a link-layer header type
Packit 209cc3
 * value that didn't collide with any other values.  On all
Packit 209cc3
 * platforms other than OpenBSD, we defined DLT_PFLOG as 117,
Packit 209cc3
 * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG.
Packit 209cc3
 *
Packit 209cc3
 * OpenBSD eventually switched to using 117 for DLT_PFLOG as well.
Packit 209cc3
 *
Packit 209cc3
 * Don't use 17 for anything else.
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and
Packit 209cc3
 * macOS; don't use it for anything else.  (FreeBSD uses 121, which
Packit 209cc3
 * collides with DLT_HHDLC, even though it doesn't use 18 for
Packit 209cc3
 * anything and doesn't appear to have ever used it for anything.)
Packit 209cc3
 *
Packit 209cc3
 * We define it as 18 on those platforms; it is, unfortunately, used
Packit 209cc3
 * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC
Packit 209cc3
 * in general.  As the packet format for it, like that for
Packit 209cc3
 * DLT_PFLOG, is not only OS-dependent but OS-version-dependent,
Packit 209cc3
 * we don't support printing it in tcpdump except on OSes that
Packit 209cc3
 * have the relevant header files, so it's not that useful on
Packit 209cc3
 * other platforms.
Packit 209cc3
 */
Packit 209cc3
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
Packit 209cc3
#define DLT_PFSYNC	18
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
#define DLT_ATM_CLIP	19	/* Linux Classical-IP over ATM */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Apparently Redback uses this for its SmartEdge 400/800.  I hope
Packit 209cc3
 * nobody else decided to use it, too.
Packit 209cc3
 */
Packit 209cc3
#define DLT_REDBACK_SMARTEDGE	32
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * These values are defined by NetBSD; other platforms should refrain from
Packit 209cc3
 * using them for other purposes, so that NetBSD savefiles with link
Packit 209cc3
 * types of 50 or 51 can be read as this type on all platforms.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
Packit 209cc3
#define DLT_PPP_ETHER	51	/* PPP over Ethernet */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
Packit 209cc3
 * a link-layer type of 99 for the tcpdump it supplies.  The link-layer
Packit 209cc3
 * header has 6 bytes of unknown data, something that appears to be an
Packit 209cc3
 * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
Packit 209cc3
 * I've seen.
Packit 209cc3
 */
Packit 209cc3
#define DLT_SYMANTEC_FIREWALL	99
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Values between 100 and 103 are used in capture file headers as
Packit 209cc3
 * link-layer header type LINKTYPE_ values corresponding to DLT_ types
Packit 209cc3
 * that differ between platforms; don't use those values for new DLT_
Packit 209cc3
 * new types.
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Values starting with 104 are used for newly-assigned link-layer
Packit 209cc3
 * header type values; for those link-layer header types, the DLT_
Packit 209cc3
 * value returned by pcap_datalink() and passed to pcap_open_dead(),
Packit 209cc3
 * and the LINKTYPE_ value that appears in capture files, are the
Packit 209cc3
 * same.
Packit 209cc3
 *
Packit 209cc3
 * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
Packit 209cc3
 * the highest such value.
Packit 209cc3
 */
Packit 209cc3
#define DLT_MATCHING_MIN	104
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * This value was defined by libpcap 0.5; platforms that have defined
Packit 209cc3
 * it with a different value should define it here with that value -
Packit 209cc3
 * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
Packit 209cc3
 * whatever value that happens to be, so programs will correctly
Packit 209cc3
 * handle files with that link type regardless of the value of
Packit 209cc3
 * DLT_C_HDLC.
Packit 209cc3
 *
Packit 209cc3
 * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
Packit 209cc3
 * compatibility with programs written for BSD/OS.
Packit 209cc3
 *
Packit 209cc3
 * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
Packit 209cc3
 * for source compatibility with programs written for libpcap 0.5.
Packit 209cc3
 */
Packit 209cc3
#define DLT_C_HDLC	104	/* Cisco HDLC */
Packit 209cc3
#define DLT_CHDLC	DLT_C_HDLC
Packit 209cc3
Packit 209cc3
#define DLT_IEEE802_11	105	/* IEEE 802.11 wireless */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
Packit 209cc3
 * except when it isn't.  (I.e., sometimes it's just raw IP, and
Packit 209cc3
 * sometimes it isn't.)  We currently handle it as DLT_LINUX_SLL,
Packit 209cc3
 * so that we don't have to worry about the link-layer header.)
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
Packit 209cc3
 * with other values.
Packit 209cc3
 * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
Packit 209cc3
 * (DLCI, etc.).
Packit 209cc3
 */
Packit 209cc3
#define DLT_FRELAY	107
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
Packit 209cc3
 * that the AF_ type in the link-layer header is in network byte order.
Packit 209cc3
 *
Packit 209cc3
 * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
Packit 209cc3
 * we don't use 12 for it in OSes other than OpenBSD.
Packit 209cc3
 */
Packit 209cc3
#ifdef __OpenBSD__
Packit 209cc3
#define DLT_LOOP	12
Packit 209cc3
#else
Packit 209cc3
#define DLT_LOOP	108
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
Packit 209cc3
 * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
Packit 209cc3
 * than OpenBSD.
Packit 209cc3
 */
Packit 209cc3
#ifdef __OpenBSD__
Packit 209cc3
#define DLT_ENC		13
Packit 209cc3
#else
Packit 209cc3
#define DLT_ENC		109
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Values between 110 and 112 are reserved for use in capture file headers
Packit 209cc3
 * as link-layer types corresponding to DLT_ types that might differ
Packit 209cc3
 * between platforms; don't use those values for new DLT_ types
Packit 209cc3
 * other than the corresponding DLT_ types.
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Linux cooked sockets.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LINUX_SLL	113
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Apple LocalTalk hardware.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LTALK	114
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Acorn Econet.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ECONET	115
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Reserved for use with OpenBSD ipfilter.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPFILTER	116
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * OpenBSD DLT_PFLOG.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PFLOG	117
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Registered for Cisco-internal use.
Packit 209cc3
 */
Packit 209cc3
#define DLT_CISCO_IOS	118
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * For 802.11 cards using the Prism II chips, with a link-layer
Packit 209cc3
 * header including Prism monitor mode information plus an 802.11
Packit 209cc3
 * header.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PRISM_HEADER	119
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
Packit 209cc3
 * (see Doug Ambrisko's FreeBSD patches).
Packit 209cc3
 */
Packit 209cc3
#define DLT_AIRONET_HEADER	120
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Sigh.
Packit 209cc3
 *
Packit 209cc3
 * 121 was reserved for Siemens HiPath HDLC on 2002-01-25, as
Packit 209cc3
 * requested by Tomas Kukosa.
Packit 209cc3
 *
Packit 209cc3
 * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that
Packit 209cc3
 * assigned 121 as DLT_PFSYNC.  In current versions, its libpcap
Packit 209cc3
 * does DLT_ <-> LINKTYPE_ mapping, mapping DLT_PFSYNC to a
Packit 209cc3
 * LINKTYPE_PFSYNC value of 246, so it should write out DLT_PFSYNC
Packit 209cc3
 * dump files with 246 as the link-layer header type.  (Earlier
Packit 209cc3
 * versions might not have done mapping, in which case they would
Packit 209cc3
 * have written them out with a link-layer header type of 121.)
Packit 209cc3
 *
Packit 209cc3
 * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC;
Packit 209cc3
 * its libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would
Packit 209cc3
 * write out DLT_PFSYNC dump files with use 18 as the link-layer
Packit 209cc3
 * header type.
Packit 209cc3
 *
Packit 209cc3
 * NetBSD, DragonFly BSD, and Darwin also use 18 for DLT_PFSYNC; in
Packit 209cc3
 * current versions, their libpcaps do DLT_ <-> LINKTYPE_ mapping,
Packit 209cc3
 * mapping DLT_PFSYNC to a LINKTYPE_PFSYNC value of 246, so they
Packit 209cc3
 * should write out DLT_PFSYNC dump files with 246 as the link-layer
Packit 209cc3
 * header type.  (Earlier versions might not have done mapping,
Packit 209cc3
 * in which case they'd work the same way OpenBSD does, writing
Packit 209cc3
 * them out with a link-layer header type of 18.)
Packit 209cc3
 *
Packit 209cc3
 * We'll define DLT_PFSYNC as:
Packit 209cc3
 *
Packit 209cc3
 *    18 on NetBSD, OpenBSD, DragonFly BSD, and Darwin;
Packit 209cc3
 *
Packit 209cc3
 *    121 on FreeBSD;
Packit 209cc3
 *
Packit 209cc3
 *    246 everywhere else.
Packit 209cc3
 *
Packit 209cc3
 * We'll define DLT_HHDLC as 121 on everything except for FreeBSD;
Packit 209cc3
 * anybody who wants to compile, on FreeBSD, code that uses DLT_HHDLC
Packit 209cc3
 * is out of luck.
Packit 209cc3
 *
Packit 209cc3
 * We'll define LINKTYPE_PFSYNC as 246 on *all* platforms, so that
Packit 209cc3
 * savefiles written using *this* code won't use 18 or 121 for PFSYNC,
Packit 209cc3
 * they'll all use 246.
Packit 209cc3
 *
Packit 209cc3
 * Code that uses pcap_datalink() to determine the link-layer header
Packit 209cc3
 * type of a savefile won't, when built and run on FreeBSD, be able
Packit 209cc3
 * to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC capture
Packit 209cc3
 * files, as pcap_datalink() will give 121 for both of them.  Code
Packit 209cc3
 * that doesn't, such as the code in Wireshark, will be able to
Packit 209cc3
 * distinguish between them.
Packit 209cc3
 *
Packit 209cc3
 * FreeBSD's libpcap won't map a link-layer header type of 18 - i.e.,
Packit 209cc3
 * DLT_PFSYNC files from OpenBSD and possibly older versions of NetBSD,
Packit 209cc3
 * DragonFly BSD, and macOS - to DLT_PFSYNC, so code built with FreeBSD's
Packit 209cc3
 * libpcap won't treat those files as DLT_PFSYNC files.
Packit 209cc3
 *
Packit 209cc3
 * Other libpcaps won't map a link-layer header type of 121 to DLT_PFSYNC;
Packit 209cc3
 * this means they can read DLT_HHDLC files, if any exist, but won't
Packit 209cc3
 * treat pcap files written by any older versions of FreeBSD libpcap that
Packit 209cc3
 * didn't map to 246 as DLT_PFSYNC files.
Packit 209cc3
 */
Packit 209cc3
#ifdef __FreeBSD__
Packit 209cc3
#define DLT_PFSYNC		121
Packit 209cc3
#else
Packit 209cc3
#define DLT_HHDLC		121
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * This is for RFC 2625 IP-over-Fibre Channel.
Packit 209cc3
 *
Packit 209cc3
 * This is not for use with raw Fibre Channel, where the link-layer
Packit 209cc3
 * header starts with a Fibre Channel frame header; it's for IP-over-FC,
Packit 209cc3
 * where the link-layer header starts with an RFC 2625 Network_Header
Packit 209cc3
 * field.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IP_OVER_FC		122
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * This is for Full Frontal ATM on Solaris with SunATM, with a
Packit 209cc3
 * pseudo-header followed by an AALn PDU.
Packit 209cc3
 *
Packit 209cc3
 * There may be other forms of Full Frontal ATM on other OSes,
Packit 209cc3
 * with different pseudo-headers.
Packit 209cc3
 *
Packit 209cc3
 * If ATM software returns a pseudo-header with VPI/VCI information
Packit 209cc3
 * (and, ideally, packet type information, e.g. signalling, ILMI,
Packit 209cc3
 * LANE, LLC-multiplexed traffic, etc.), it should not use
Packit 209cc3
 * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
Packit 209cc3
 * and the like don't have to infer the presence or absence of a
Packit 209cc3
 * pseudo-header and the form of the pseudo-header.
Packit 209cc3
 */
Packit 209cc3
#define DLT_SUNATM		123	/* Solaris+SunATM */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Reserved as per request from Kent Dahlgren <kent@praesum.com>
Packit 209cc3
 * for private use.
Packit 209cc3
 */
Packit 209cc3
#define DLT_RIO                 124     /* RapidIO */
Packit 209cc3
#define DLT_PCI_EXP             125     /* PCI Express */
Packit 209cc3
#define DLT_AURORA              126     /* Xilinx Aurora link layer */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Header for 802.11 plus a number of bits of link-layer information
Packit 209cc3
 * including radio information, used by some recent BSD drivers as
Packit 209cc3
 * well as the madwifi Atheros driver for Linux.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Reserved for the TZSP encapsulation, as per request from
Packit 209cc3
 * Chris Waters <chris.waters@networkchemistry.com>
Packit 209cc3
 * TZSP is a generic encapsulation for any other link type,
Packit 209cc3
 * which includes a means to include meta-information
Packit 209cc3
 * with the packet, e.g. signal strength and channel
Packit 209cc3
 * for 802.11 packets.
Packit 209cc3
 */
Packit 209cc3
#define DLT_TZSP                128     /* Tazmen Sniffer Protocol */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * BSD's ARCNET headers have the source host, destination host,
Packit 209cc3
 * and type at the beginning of the packet; that's what's handed
Packit 209cc3
 * up to userland via BPF.
Packit 209cc3
 *
Packit 209cc3
 * Linux's ARCNET headers, however, have a 2-byte offset field
Packit 209cc3
 * between the host IDs and the type; that's what's handed up
Packit 209cc3
 * to userland via PF_PACKET sockets.
Packit 209cc3
 *
Packit 209cc3
 * We therefore have to have separate DLT_ values for them.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ARCNET_LINUX	129	/* ARCNET */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link types, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
Packit 209cc3
 * for passing on chassis-internal metainformation such as
Packit 209cc3
 * QOS profiles, etc..
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_MLPPP       130
Packit 209cc3
#define DLT_JUNIPER_MLFR        131
Packit 209cc3
#define DLT_JUNIPER_ES          132
Packit 209cc3
#define DLT_JUNIPER_GGSN        133
Packit 209cc3
#define DLT_JUNIPER_MFR         134
Packit 209cc3
#define DLT_JUNIPER_ATM2        135
Packit 209cc3
#define DLT_JUNIPER_SERVICES    136
Packit 209cc3
#define DLT_JUNIPER_ATM1        137
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
Packit 209cc3
 * <dieter@apple.com>.  The header that's presented is an Ethernet-like
Packit 209cc3
 * header:
Packit 209cc3
 *
Packit 209cc3
 *	#define FIREWIRE_EUI64_LEN	8
Packit 209cc3
 *	struct firewire_header {
Packit 209cc3
 *		u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
Packit 209cc3
 *		u_char  firewire_shost[FIREWIRE_EUI64_LEN];
Packit 209cc3
 *		u_short firewire_type;
Packit 209cc3
 *	};
Packit 209cc3
 *
Packit 209cc3
 * with "firewire_type" being an Ethernet type value, rather than,
Packit 209cc3
 * for example, raw GASP frames being handed up.
Packit 209cc3
 */
Packit 209cc3
#define DLT_APPLE_IP_OVER_IEEE1394	138
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Various SS7 encapsulations, as per a request from Jeff Morriss
Packit 209cc3
 * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
Packit 209cc3
 */
Packit 209cc3
#define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info, followed by MTP2 */
Packit 209cc3
#define DLT_MTP2		140	/* MTP2, without pseudo-header */
Packit 209cc3
#define DLT_MTP3		141	/* MTP3, without pseudo-header or MTP2 */
Packit 209cc3
#define DLT_SCCP		142	/* SCCP, without pseudo-header or MTP2 or MTP3 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DOCSIS MAC frames.
Packit 209cc3
 */
Packit 209cc3
#define DLT_DOCSIS		143
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Linux-IrDA packets. Protocol defined at http://www.irda.org.
Packit 209cc3
 * Those packets include IrLAP headers and above (IrLMP...), but
Packit 209cc3
 * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
Packit 209cc3
 * framing can be handled by the hardware and depend on the bitrate.
Packit 209cc3
 * This is exactly the format you would get capturing on a Linux-IrDA
Packit 209cc3
 * interface (irdaX), but not on a raw serial port.
Packit 209cc3
 * Note the capture is done in "Linux-cooked" mode, so each packet include
Packit 209cc3
 * a fake packet header (struct sll_header). This is because IrDA packet
Packit 209cc3
 * decoding is dependant on the direction of the packet (incomming or
Packit 209cc3
 * outgoing).
Packit 209cc3
 * When/if other platform implement IrDA capture, we may revisit the
Packit 209cc3
 * issue and define a real DLT_IRDA...
Packit 209cc3
 * Jean II
Packit 209cc3
 */
Packit 209cc3
#define DLT_LINUX_IRDA		144
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Reserved for IBM SP switch and IBM Next Federation switch.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IBM_SP		145
Packit 209cc3
#define DLT_IBM_SN		146
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Reserved for private use.  If you have some link-layer header type
Packit 209cc3
 * that you want to use within your organization, with the capture files
Packit 209cc3
 * using that link-layer header type not ever be sent outside your
Packit 209cc3
 * organization, you can use these values.
Packit 209cc3
 *
Packit 209cc3
 * No libpcap release will use these for any purpose, nor will any
Packit 209cc3
 * tcpdump release use them, either.
Packit 209cc3
 *
Packit 209cc3
 * Do *NOT* use these in capture files that you expect anybody not using
Packit 209cc3
 * your private versions of capture-file-reading tools to read; in
Packit 209cc3
 * particular, do *NOT* use them in products, otherwise you may find that
Packit 209cc3
 * people won't be able to use tcpdump, or snort, or Ethereal, or... to
Packit 209cc3
 * read capture files from your firewall/intrusion detection/traffic
Packit 209cc3
 * monitoring/etc. appliance, or whatever product uses that DLT_ value,
Packit 209cc3
 * and you may also find that the developers of those applications will
Packit 209cc3
 * not accept patches to let them read those files.
Packit 209cc3
 *
Packit 209cc3
 * Also, do not use them if somebody might send you a capture using them
Packit 209cc3
 * for *their* private type and tools using them for *your* private type
Packit 209cc3
 * would have to read them.
Packit 209cc3
 *
Packit 209cc3
 * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
Packit 209cc3
 * as per the comment above, and use the type you're given.
Packit 209cc3
 */
Packit 209cc3
#define DLT_USER0		147
Packit 209cc3
#define DLT_USER1		148
Packit 209cc3
#define DLT_USER2		149
Packit 209cc3
#define DLT_USER3		150
Packit 209cc3
#define DLT_USER4		151
Packit 209cc3
#define DLT_USER5		152
Packit 209cc3
#define DLT_USER6		153
Packit 209cc3
#define DLT_USER7		154
Packit 209cc3
#define DLT_USER8		155
Packit 209cc3
#define DLT_USER9		156
Packit 209cc3
#define DLT_USER10		157
Packit 209cc3
#define DLT_USER11		158
Packit 209cc3
#define DLT_USER12		159
Packit 209cc3
#define DLT_USER13		160
Packit 209cc3
#define DLT_USER14		161
Packit 209cc3
#define DLT_USER15		162
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * For future use with 802.11 captures - defined by AbsoluteValue
Packit 209cc3
 * Systems to store a number of bits of link-layer information
Packit 209cc3
 * including radio information:
Packit 209cc3
 *
Packit 209cc3
 *	http://www.shaftnet.org/~pizza/software/capturefrm.txt
Packit 209cc3
 *
Packit 209cc3
 * but it might be used by some non-AVS drivers now or in the
Packit 209cc3
 * future.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
Packit 209cc3
 * for passing on chassis-internal metainformation such as
Packit 209cc3
 * QOS profiles, etc..
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_MONITOR     164
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * BACnet MS/TP frames.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BACNET_MS_TP	165
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
Packit 209cc3
 *
Packit 209cc3
 * This is used in some OSes to allow a kernel socket filter to distinguish
Packit 209cc3
 * between incoming and outgoing packets, on a socket intended to
Packit 209cc3
 * supply pppd with outgoing packets so it can do dial-on-demand and
Packit 209cc3
 * hangup-on-lack-of-demand; incoming packets are filtered out so they
Packit 209cc3
 * don't cause pppd to hold the connection up (you don't want random
Packit 209cc3
 * input packets such as port scans, packets from old lost connections,
Packit 209cc3
 * etc. to force the connection to stay up).
Packit 209cc3
 *
Packit 209cc3
 * The first byte of the PPP header (0xff03) is modified to accomodate
Packit 209cc3
 * the direction - 0x00 = IN, 0x01 = OUT.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PPP_PPPD		166
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Names for backwards compatibility with older versions of some PPP
Packit 209cc3
 * software; new software should use DLT_PPP_PPPD.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PPP_WITH_DIRECTION	DLT_PPP_PPPD
Packit 209cc3
#define DLT_LINUX_PPP_WITHDIRECTION	DLT_PPP_PPPD
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
Packit 209cc3
 * for passing on chassis-internal metainformation such as
Packit 209cc3
 * QOS profiles, cookies, etc..
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_PPPOE       167
Packit 209cc3
#define DLT_JUNIPER_PPPOE_ATM   168
Packit 209cc3
Packit 209cc3
#define DLT_GPRS_LLC		169	/* GPRS LLC */
Packit 209cc3
#define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
Packit 209cc3
#define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
Packit 209cc3
 * monitoring equipment.
Packit 209cc3
 */
Packit 209cc3
#define DLT_GCOM_T1E1		172
Packit 209cc3
#define DLT_GCOM_SERIAL		173
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.  The DLT_ is used
Packit 209cc3
 * for internal communication to Physical Interface Cards (PIC)
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_PIC_PEER    174
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Link types requested by Gregor Maier <gregor@endace.com> of Endace
Packit 209cc3
 * Measurement Systems.  They add an ERF header (see
Packit 209cc3
 * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
Packit 209cc3
 * the link-layer header.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ERF_ETH		175	/* Ethernet */
Packit 209cc3
#define DLT_ERF_POS		176	/* Packet-over-SONET */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
Packit 209cc3
 * for vISDN (http://www.orlandi.com/visdn/).  Its link-layer header
Packit 209cc3
 * includes additional information before the LAPD header, so it's
Packit 209cc3
 * not necessarily a generic LAPD header.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LINUX_LAPD		177
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.
Packit 209cc3
 * The DLT_ are used for prepending meta-information
Packit 209cc3
 * like interface index, interface name
Packit 209cc3
 * before standard Ethernet, PPP, Frelay & C-HDLC Frames
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_ETHER       178
Packit 209cc3
#define DLT_JUNIPER_PPP         179
Packit 209cc3
#define DLT_JUNIPER_FRELAY      180
Packit 209cc3
#define DLT_JUNIPER_CHDLC       181
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Multi Link Frame Relay (FRF.16)
Packit 209cc3
 */
Packit 209cc3
#define DLT_MFR                 182
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.
Packit 209cc3
 * The DLT_ is used for internal communication with a
Packit 209cc3
 * voice Adapter Card (PIC)
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_VP          183
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Arinc 429 frames.
Packit 209cc3
 * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
Packit 209cc3
 * Every frame contains a 32bit A429 label.
Packit 209cc3
 * More documentation on Arinc 429 can be found at
Packit 209cc3
 * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
Packit 209cc3
 */
Packit 209cc3
#define DLT_A429                184
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Arinc 653 Interpartition Communication messages.
Packit 209cc3
 * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
Packit 209cc3
 * Please refer to the A653-1 standard for more information.
Packit 209cc3
 */
Packit 209cc3
#define DLT_A653_ICM            185
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * This used to be "USB packets, beginning with a USB setup header;
Packit 209cc3
 * requested by Paolo Abeni <paolo.abeni@email.it>."
Packit 209cc3
 *
Packit 209cc3
 * However, that header didn't work all that well - it left out some
Packit 209cc3
 * useful information - and was abandoned in favor of the DLT_USB_LINUX
Packit 209cc3
 * header.
Packit 209cc3
 *
Packit 209cc3
 * This is now used by FreeBSD for its BPF taps for USB; that has its
Packit 209cc3
 * own headers.  So it is written, so it is done.
Packit 209cc3
 *
Packit 209cc3
 * For source-code compatibility, we also define DLT_USB to have this
Packit 209cc3
 * value.  We do it numerically so that, if code that includes this
Packit 209cc3
 * file (directly or indirectly) also includes an OS header that also
Packit 209cc3
 * defines DLT_USB as 186, we don't get a redefinition warning.
Packit 209cc3
 * (NetBSD 7 does that.)
Packit 209cc3
 */
Packit 209cc3
#define DLT_USB_FREEBSD		186
Packit 209cc3
#define DLT_USB			186
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Bluetooth HCI UART transport layer (part H:4); requested by
Packit 209cc3
 * Paolo Abeni.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BLUETOOTH_HCI_H4	187
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
Packit 209cc3
 * <cruz_petagay@bah.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_16_MAC_CPS	188
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * USB packets, beginning with a Linux USB header; requested by
Packit 209cc3
 * Paolo Abeni <paolo.abeni@email.it>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_USB_LINUX		189
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Controller Area Network (CAN) v. 2.0B packets.
Packit 209cc3
 * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
Packit 209cc3
 * Used to dump CAN packets coming from a CAN Vector board.
Packit 209cc3
 * More documentation on the CAN v2.0B frames can be found at
Packit 209cc3
 * http://www.can-cia.org/downloads/?269
Packit 209cc3
 */
Packit 209cc3
#define DLT_CAN20B              190
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IEEE 802.15.4, with address fields padded, as is done by Linux
Packit 209cc3
 * drivers; requested by Juergen Schimmer.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_15_4_LINUX	191
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Per Packet Information encapsulated packets.
Packit 209cc3
 * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PPI			192
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
Packit 209cc3
 * requested by Charles Clancy.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_16_MAC_CPS_RADIO	193
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.
Packit 209cc3
 * The DLT_ is used for internal communication with a
Packit 209cc3
 * integrated service module (ISM).
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_ISM         194
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
Packit 209cc3
 * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
Packit 209cc3
 * For this one, we expect the FCS to be present at the end of the frame;
Packit 209cc3
 * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used.
Packit 209cc3
 *
Packit 209cc3
 * We keep the name DLT_IEEE802_15_4 as an alias for backwards
Packit 209cc3
 * compatibility, but, again, this should *only* be used for 802.15.4
Packit 209cc3
 * frames that include the FCS.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_15_4_WITHFCS	195
Packit 209cc3
#define DLT_IEEE802_15_4		DLT_IEEE802_15_4_WITHFCS
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Various link-layer types, with a pseudo-header, for SITA
Packit 209cc3
 * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
Packit 209cc3
 */
Packit 209cc3
#define DLT_SITA		196
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Various link-layer types, with a pseudo-header, for Endace DAG cards;
Packit 209cc3
 * encapsulates Endace ERF records.  Requested by Stephen Donnelly
Packit 209cc3
 * <stephen@endace.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ERF			197
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Special header prepended to Ethernet packets when capturing from a
Packit 209cc3
 * u10 Networks board.  Requested by Phil Mulholland
Packit 209cc3
 * <phil@u10networks.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_RAIF1		198
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IPMB packet for IPMI, beginning with a 2-byte header, followed by
Packit 209cc3
 * the I2C slave address, followed by the netFn and LUN, etc..
Packit 209cc3
 * Requested by Chanthy Toeung <chanthy.toeung@ca.kontron.com>.
Packit 209cc3
 *
Packit 209cc3
 * XXX - this used to be called DLT_IPMB, back when we got the
Packit 209cc3
 * impression from the email thread requesting it that the packet
Packit 209cc3
 * had no extra 2-byte header.  We've renamed it; if anybody used
Packit 209cc3
 * DLT_IPMB and assumed no 2-byte header, this will cause the compile
Packit 209cc3
 * to fail, at which point we'll have to figure out what to do about
Packit 209cc3
 * the two header types using the same DLT_/LINKTYPE_ value.  If that
Packit 209cc3
 * doesn't happen, we'll assume nobody used it and that the redefinition
Packit 209cc3
 * is safe.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPMB_KONTRON	199
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.
Packit 209cc3
 * The DLT_ is used for capturing data on a secure tunnel interface.
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_ST          200
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
Packit 209cc3
 * that includes direction information; requested by Paolo Abeni.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR	201
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * AX.25 packet with a 1-byte KISS header; see
Packit 209cc3
 *
Packit 209cc3
 *	http://www.ax25.net/kiss.htm
Packit 209cc3
 *
Packit 209cc3
 * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_AX25_KISS		202
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * LAPD packets from an ISDN channel, starting with the address field,
Packit 209cc3
 * with no pseudo-header.
Packit 209cc3
 * Requested by Varuna De Silva <varunax@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LAPD		203
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * PPP, with a one-byte direction pseudo-header prepended - zero means
Packit 209cc3
 * "received by this host", non-zero (any non-zero value) means "sent by
Packit 209cc3
 * this host" - as per Will Barker <w.barker@zen.co.uk>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PPP_WITH_DIR	204	/* Don't confuse with DLT_PPP_WITH_DIRECTION */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Cisco HDLC, with a one-byte direction pseudo-header prepended - zero
Packit 209cc3
 * means "received by this host", non-zero (any non-zero value) means
Packit 209cc3
 * "sent by this host" - as per Will Barker <w.barker@zen.co.uk>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_C_HDLC_WITH_DIR	205
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Frame Relay, with a one-byte direction pseudo-header prepended - zero
Packit 209cc3
 * means "received by this host" (DCE -> DTE), non-zero (any non-zero
Packit 209cc3
 * value) means "sent by this host" (DTE -> DCE) - as per Will Barker
Packit 209cc3
 * <w.barker@zen.co.uk>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_FRELAY_WITH_DIR	206
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * LAPB, with a one-byte direction pseudo-header prepended - zero means
Packit 209cc3
 * "received by this host" (DCE -> DTE), non-zero (any non-zero value)
Packit 209cc3
 * means "sent by this host" (DTE -> DCE)- as per Will Barker
Packit 209cc3
 * <w.barker@zen.co.uk>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LAPB_WITH_DIR	207
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * 208 is reserved for an as-yet-unspecified proprietary link-layer
Packit 209cc3
 * type, as requested by Will Barker.
Packit 209cc3
 */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
Packit 209cc3
 * <avn@pigeonpoint.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPMB_LINUX		209
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * FlexRay automotive bus - http://www.flexray.com/ - as requested
Packit 209cc3
 * by Hannes Kaelber <hannes.kaelber@x2e.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_FLEXRAY		210
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Media Oriented Systems Transport (MOST) bus for multimedia
Packit 209cc3
 * transport - http://www.mostcooperation.com/ - as requested
Packit 209cc3
 * by Hannes Kaelber <hannes.kaelber@x2e.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_MOST		211
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Local Interconnect Network (LIN) bus for vehicle networks -
Packit 209cc3
 * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
Packit 209cc3
 * <hannes.kaelber@x2e.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LIN			212
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * X2E-private data link type used for serial line capture,
Packit 209cc3
 * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_X2E_SERIAL		213
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * X2E-private data link type used for the Xoraya data logger
Packit 209cc3
 * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_X2E_XORAYA		214
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
Packit 209cc3
 * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
Packit 209cc3
 * of 0 as preamble, one octet of SFD, one octet of frame length+
Packit 209cc3
 * reserved bit, and then the MAC-layer data, starting with the
Packit 209cc3
 * frame control field).
Packit 209cc3
 *
Packit 209cc3
 * Requested by Max Filippov <jcmvbkbc@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_15_4_NONASK_PHY	215
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * David Gibson <david@gibson.dropbear.id.au> requested this for
Packit 209cc3
 * captures from the Linux kernel /dev/input/eventN devices. This
Packit 209cc3
 * is used to communicate keystrokes and mouse movements from the
Packit 209cc3
 * Linux kernel to display systems, such as Xorg.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LINUX_EVDEV		216
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Harald Welte <laforge@gnumonks.org>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_GSMTAP_UM		217
Packit 209cc3
#define DLT_GSMTAP_ABIS		218
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * MPLS, with an MPLS label as the link-layer header.
Packit 209cc3
 * Requested by Michele Marchetto <michele@openbsd.org> on behalf
Packit 209cc3
 * of OpenBSD.
Packit 209cc3
 */
Packit 209cc3
#define DLT_MPLS		219
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * USB packets, beginning with a Linux USB header, with the USB header
Packit 209cc3
 * padded to 64 bytes; required for memory-mapped access.
Packit 209cc3
 */
Packit 209cc3
#define DLT_USB_LINUX_MMAPPED	220
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DECT packets, with a pseudo-header; requested by
Packit 209cc3
 * Matthias Wenzel <tcpdump@mazzoo.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_DECT		221
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1@nasa.gov>
Packit 209cc3
 * Date: Mon, 11 May 2009 11:18:30 -0500
Packit 209cc3
 *
Packit 209cc3
 * DLT_AOS. We need it for AOS Space Data Link Protocol.
Packit 209cc3
 *   I have already written dissectors for but need an OK from
Packit 209cc3
 *   legal before I can submit a patch.
Packit 209cc3
 *
Packit 209cc3
 */
Packit 209cc3
#define DLT_AOS                 222
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Wireless HART (Highway Addressable Remote Transducer)
Packit 209cc3
 * From the HART Communication Foundation
Packit 209cc3
 * IES/PAS 62591
Packit 209cc3
 *
Packit 209cc3
 * Requested by Sam Roberts <vieuxtech@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_WIHART		223
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Fibre Channel FC-2 frames, beginning with a Frame_Header.
Packit 209cc3
 * Requested by Kahou Lei <kahou82@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_FC_2		224
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Fibre Channel FC-2 frames, beginning with an encoding of the
Packit 209cc3
 * SOF, and ending with an encoding of the EOF.
Packit 209cc3
 *
Packit 209cc3
 * The encodings represent the frame delimiters as 4-byte sequences
Packit 209cc3
 * representing the corresponding ordered sets, with K28.5
Packit 209cc3
 * represented as 0xBC, and the D symbols as the corresponding
Packit 209cc3
 * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
Packit 209cc3
 * is represented as 0xBC 0xB5 0x55 0x55.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Kahou Lei <kahou82@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_FC_2_WITH_FRAME_DELIMS	225
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed@Sun.COM>.
Packit 209cc3
 *
Packit 209cc3
 * The pseudo-header starts with a one-byte version number; for version 2,
Packit 209cc3
 * the pseudo-header is:
Packit 209cc3
 *
Packit 209cc3
 * struct dl_ipnetinfo {
Packit 209cc3
 *     uint8_t   dli_version;
Packit 209cc3
 *     uint8_t   dli_family;
Packit 209cc3
 *     uint16_t  dli_htype;
Packit 209cc3
 *     uint32_t  dli_pktlen;
Packit 209cc3
 *     uint32_t  dli_ifindex;
Packit 209cc3
 *     uint32_t  dli_grifindex;
Packit 209cc3
 *     uint32_t  dli_zsrc;
Packit 209cc3
 *     uint32_t  dli_zdst;
Packit 209cc3
 * };
Packit 209cc3
 *
Packit 209cc3
 * dli_version is 2 for the current version of the pseudo-header.
Packit 209cc3
 *
Packit 209cc3
 * dli_family is a Solaris address family value, so it's 2 for IPv4
Packit 209cc3
 * and 26 for IPv6.
Packit 209cc3
 *
Packit 209cc3
 * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
Packit 209cc3
 * packets, and 2 for packets arriving from another zone on the same
Packit 209cc3
 * machine.
Packit 209cc3
 *
Packit 209cc3
 * dli_pktlen is the length of the packet data following the pseudo-header
Packit 209cc3
 * (so the captured length minus dli_pktlen is the length of the
Packit 209cc3
 * pseudo-header, assuming the entire pseudo-header was captured).
Packit 209cc3
 *
Packit 209cc3
 * dli_ifindex is the interface index of the interface on which the
Packit 209cc3
 * packet arrived.
Packit 209cc3
 *
Packit 209cc3
 * dli_grifindex is the group interface index number (for IPMP interfaces).
Packit 209cc3
 *
Packit 209cc3
 * dli_zsrc is the zone identifier for the source of the packet.
Packit 209cc3
 *
Packit 209cc3
 * dli_zdst is the zone identifier for the destination of the packet.
Packit 209cc3
 *
Packit 209cc3
 * A zone number of 0 is the global zone; a zone number of 0xffffffff
Packit 209cc3
 * means that the packet arrived from another host on the network, not
Packit 209cc3
 * from another zone on the same machine.
Packit 209cc3
 *
Packit 209cc3
 * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
Packit 209cc3
 * which of those it is.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPNET		226
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * CAN (Controller Area Network) frames, with a pseudo-header as supplied
Packit 209cc3
 * by Linux SocketCAN, and with multi-byte numerical fields in that header
Packit 209cc3
 * in big-endian byte order.
Packit 209cc3
 *
Packit 209cc3
 * See Documentation/networking/can.txt in the Linux source.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Felix Obenhuber <felix@obenhuber.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_CAN_SOCKETCAN	227
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
Packit 209cc3
 * whether it's v4 or v6.  Requested by Darren Reed <Darren.Reed@Sun.COM>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPV4		228
Packit 209cc3
#define DLT_IPV6		229
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
Packit 209cc3
 * nothing), and with no FCS at the end of the frame; requested by
Packit 209cc3
 * Jon Smirl <jonsmirl@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IEEE802_15_4_NOFCS	230
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Raw D-Bus:
Packit 209cc3
 *
Packit 209cc3
 *	http://www.freedesktop.org/wiki/Software/dbus
Packit 209cc3
 *
Packit 209cc3
 * messages:
Packit 209cc3
 *
Packit 209cc3
 *	http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
Packit 209cc3
 *
Packit 209cc3
 * starting with the endianness flag, followed by the message type, etc.,
Packit 209cc3
 * but without the authentication handshake before the message sequence:
Packit 209cc3
 *
Packit 209cc3
 *	http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
Packit 209cc3
 *
Packit 209cc3
 * Requested by Martin Vidner <martin@vidner.net>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_DBUS		231
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_VS			232
Packit 209cc3
#define DLT_JUNIPER_SRX_E2E		233
Packit 209cc3
#define DLT_JUNIPER_FIBRECHANNEL	234
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DVB-CI (DVB Common Interface for communication between a PC Card
Packit 209cc3
 * module and a DVB receiver).  See
Packit 209cc3
 *
Packit 209cc3
 *	http://www.kaiser.cx/pcap-dvbci.html
Packit 209cc3
 *
Packit 209cc3
 * for the specification.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Martin Kaiser <martin@kaiser.cx>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_DVB_CI		235
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
Packit 209cc3
 * *not* the same as, 27.010).  Requested by Hans-Christoph Schemmel
Packit 209cc3
 * <hans-christoph.schemmel@cinterion.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_MUX27010		236
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * STANAG 5066 D_PDUs.  Requested by M. Baris Demiray
Packit 209cc3
 * <barisdemiray@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_STANAG_5066_D_PDU	237
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Juniper-private data link type, as per request from
Packit 209cc3
 * Hannes Gredler <hannes@juniper.net>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_JUNIPER_ATM_CEMIC	238
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * NetFilter LOG messages
Packit 209cc3
 * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
Packit 209cc3
 *
Packit 209cc3
 * Requested by Jakub Zawadzki <darkjames-ws@darkjames.pl>
Packit 209cc3
 */
Packit 209cc3
#define DLT_NFLOG		239
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
Packit 209cc3
 * for Ethernet packets with a 4-byte pseudo-header and always
Packit 209cc3
 * with the payload including the FCS, as supplied by their
Packit 209cc3
 * netANALYZER hardware and software.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
Packit 209cc3
 */
Packit 209cc3
#define DLT_NETANALYZER		240
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
Packit 209cc3
 * for Ethernet packets with a 4-byte pseudo-header and FCS and
Packit 209cc3
 * with the Ethernet header preceded by 7 bytes of preamble and
Packit 209cc3
 * 1 byte of SFD, as supplied by their netANALYZER hardware and
Packit 209cc3
 * software.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Holger P. Frommer <HPfrommer@hilscher.com>
Packit 209cc3
 */
Packit 209cc3
#define DLT_NETANALYZER_TRANSPARENT	241
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IP-over-InfiniBand, as specified by RFC 4391.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Petr Sumbera <petr.sumbera@oracle.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPOIB		242
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
Packit 209cc3
 *
Packit 209cc3
 * Requested by Guy Martin <gmsoft@tuxicoman.be>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_MPEG_2_TS		243
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
Packit 209cc3
 * used by their ng40 protocol tester.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_NG40		244
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Pseudo-header giving adapter number and flags, followed by an NFC
Packit 209cc3
 * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
Packit 209cc3
 * as specified by NFC Forum Logical Link Control Protocol Technical
Packit 209cc3
 * Specification LLCP 1.1.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Mike Wakerly <mikey@google.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_NFC_LLCP		245
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
Packit 209cc3
 *
Packit 209cc3
 * DLT_PFSYNC has different values on different platforms, and all of
Packit 209cc3
 * them collide with something used elsewhere.  On platforms that
Packit 209cc3
 * don't already define it, define it as 246.
Packit 209cc3
 */
Packit 209cc3
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
Packit 209cc3
#define DLT_PFSYNC		246
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Raw InfiniBand packets, starting with the Local Routing Header.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Oren Kladnitsky <orenk@mellanox.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_INFINIBAND		247
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
Packit 209cc3
 *
Packit 209cc3
 * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_SCTP		248
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * USB packets, beginning with a USBPcap header.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Tomasz Mon <desowin@gmail.com>
Packit 209cc3
 */
Packit 209cc3
#define DLT_USBPCAP		249
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Schweitzer Engineering Laboratories "RTAC" product serial-line
Packit 209cc3
 * packets.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Chris Bontje <chris_bontje@selinc.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_RTAC_SERIAL		250
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Bluetooth Low Energy air interface link-layer packets.
Packit 209cc3
 *
Packit 209cc3
 * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BLUETOOTH_LE_LL	251
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DLT type for upper-protocol layer PDU saves from wireshark.
Packit 209cc3
 *
Packit 209cc3
 * the actual contents are determined by two TAGs stored with each
Packit 209cc3
 * packet:
Packit 209cc3
 *   EXP_PDU_TAG_LINKTYPE          the link type (LINKTYPE_ value) of the
Packit 209cc3
 *				   original packet.
Packit 209cc3
 *
Packit 209cc3
 *   EXP_PDU_TAG_PROTO_NAME        the name of the wireshark dissector
Packit 209cc3
 * 				   that can make sense of the data stored.
Packit 209cc3
 */
Packit 209cc3
#define DLT_WIRESHARK_UPPER_PDU	252
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DLT type for the netlink protocol (nlmon devices).
Packit 209cc3
 */
Packit 209cc3
#define DLT_NETLINK		253
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Bluetooth Linux Monitor headers for the BlueZ stack.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BLUETOOTH_LINUX_MONITOR	254
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as
Packit 209cc3
 * captured by Ubertooth.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BLUETOOTH_BREDR_BB	255
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Bluetooth Low Energy link layer packets, as captured by Ubertooth.
Packit 209cc3
 */
Packit 209cc3
#define DLT_BLUETOOTH_LE_LL_WITH_PHDR	256
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * PROFIBUS data link layer.
Packit 209cc3
 */
Packit 209cc3
#define DLT_PROFIBUS_DL		257
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Apple's DLT_PKTAP headers.
Packit 209cc3
 *
Packit 209cc3
 * Sadly, the folks at Apple either had no clue that the DLT_USERn values
Packit 209cc3
 * are for internal use within an organization and partners only, and
Packit 209cc3
 * didn't know that the right way to get a link-layer header type is to
Packit 209cc3
 * ask tcpdump.org for one, or knew and didn't care, so they just
Packit 209cc3
 * used DLT_USER2, which causes problems for everything except for
Packit 209cc3
 * their version of tcpdump.
Packit 209cc3
 *
Packit 209cc3
 * So I'll just give them one; hopefully this will show up in a
Packit 209cc3
 * libpcap release in time for them to get this into 10.10 Big Sur
Packit 209cc3
 * or whatever Mavericks' successor is called.  LINKTYPE_PKTAP
Packit 209cc3
 * will be 258 *even on macOS*; that is *intentional*, so that
Packit 209cc3
 * PKTAP files look the same on *all* OSes (different OSes can have
Packit 209cc3
 * different numerical values for a given DLT_, but *MUST NOT* have
Packit 209cc3
 * different values for what goes in a file, as files can be moved
Packit 209cc3
 * between OSes!).
Packit 209cc3
 *
Packit 209cc3
 * When capturing, on a system with a Darwin-based OS, on a device
Packit 209cc3
 * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this
Packit 209cc3
 * version of libpcap, the DLT_ value for the pcap_t  will be DLT_PKTAP,
Packit 209cc3
 * and that will continue to be DLT_USER2 on Darwin-based OSes. That way,
Packit 209cc3
 * binary compatibility with Mavericks is preserved for programs using
Packit 209cc3
 * this version of libpcap.  This does mean that if you were using
Packit 209cc3
 * DLT_USER2 for some capture device on macOS, you can't do so with
Packit 209cc3
 * this version of libpcap, just as you can't with Apple's libpcap -
Packit 209cc3
 * on macOS, they define DLT_PKTAP to be DLT_USER2, so programs won't
Packit 209cc3
 * be able to distinguish between PKTAP and whatever you were using
Packit 209cc3
 * DLT_USER2 for.
Packit 209cc3
 *
Packit 209cc3
 * If the program saves the capture to a file using this version of
Packit 209cc3
 * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be
Packit 209cc3
 * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes.
Packit 209cc3
 * That way, the file will *not* be a DLT_USER2 file.  That means
Packit 209cc3
 * that the latest version of tcpdump, when built with this version
Packit 209cc3
 * of libpcap, and sufficiently recent versions of Wireshark will
Packit 209cc3
 * be able to read those files and interpret them correctly; however,
Packit 209cc3
 * Apple's version of tcpdump in OS X 10.9 won't be able to handle
Packit 209cc3
 * them.  (Hopefully, Apple will pick up this version of libpcap,
Packit 209cc3
 * and the corresponding version of tcpdump, so that tcpdump will
Packit 209cc3
 * be able to handle the old LINKTYPE_USER2 captures *and* the new
Packit 209cc3
 * LINKTYPE_PKTAP captures.)
Packit 209cc3
 */
Packit 209cc3
#ifdef __APPLE__
Packit 209cc3
#define DLT_PKTAP	DLT_USER2
Packit 209cc3
#else
Packit 209cc3
#define DLT_PKTAP	258
Packit 209cc3
#endif
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Ethernet packets preceded by a header giving the last 6 octets
Packit 209cc3
 * of the preamble specified by 802.3-2012 Clause 65, section
Packit 209cc3
 * 65.1.3.2 "Transmit".
Packit 209cc3
 */
Packit 209cc3
#define DLT_EPON	259
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format"
Packit 209cc3
 * in the PICMG HPM.2 specification.
Packit 209cc3
 */
Packit 209cc3
#define DLT_IPMI_HPM_2	260
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * per  Joshua Wright <jwright@hasborg.com>, formats for Zwave captures.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ZWAVE_R1_R2  261
Packit 209cc3
#define DLT_ZWAVE_R3     262
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * per Steve Karg <skarg@users.sourceforge.net>, formats for Wattstopper
Packit 209cc3
 * Digital Lighting Management room bus serial protocol captures.
Packit 209cc3
 */
Packit 209cc3
#define DLT_WATTSTOPPER_DLM     263
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * ISO 14443 contactless smart card messages.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ISO_14443	264
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Radio data system (RDS) groups.  IEC 62106.
Packit 209cc3
 * Per Jonathan Brucker <jonathan.brucke@gmail.com>.
Packit 209cc3
 */
Packit 209cc3
#define DLT_RDS		265
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * USB packets, beginning with a Darwin (macOS, etc.) header.
Packit 209cc3
 */
Packit 209cc3
#define DLT_USB_DARWIN	266
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * OpenBSD DLT_OPENFLOW.
Packit 209cc3
 */
Packit 209cc3
#define DLT_OPENFLOW	267
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * SDLC frames containing SNA PDUs.
Packit 209cc3
 */
Packit 209cc3
#define DLT_SDLC	268
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * per "Selvig, Bjorn" <b.selvig@ti.com> used for
Packit 209cc3
 * TI protocol sniffer.
Packit 209cc3
 */
Packit 209cc3
#define DLT_TI_LLN_SNIFFER	269
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * per: Erik de Jong <erikdejong at gmail.com> for
Packit 209cc3
 *   https://github.com/eriknl/LoRaTap/releases/tag/v0.1
Packit 209cc3
 */
Packit 209cc3
#define DLT_LORATAP             270
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * per: Stefanha at gmail.com for
Packit 209cc3
 *   http://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html
Packit 209cc3
 * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h
Packit 209cc3
 * for: http://qemu-project.org/Features/VirtioVsock
Packit 209cc3
 */
Packit 209cc3
#define DLT_VSOCK               271
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Nordic Semiconductor Bluetooth LE sniffer.
Packit 209cc3
 */
Packit 209cc3
#define DLT_NORDIC_BLE		272
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Excentis DOCSIS 3.1 RF sniffer (XRA-31)
Packit 209cc3
 *   per: bruno.verstuyft at excentis.com
Packit 209cc3
 *        http://www.xra31.com/xra-header
Packit 209cc3
 */
Packit 209cc3
#define DLT_DOCSIS31_XRA31	273
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * mPackets, as specified by IEEE 802.3br Figure 99-4, starting
Packit 209cc3
 * with the preamble and always ending with a CRC field.
Packit 209cc3
 */
Packit 209cc3
#define DLT_ETHERNET_MPACKET	274
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DisplayPort AUX channel monitoring data as specified by VESA
Packit 209cc3
 * DisplayPort(DP) Standard preceeded by a pseudo-header.
Packit 209cc3
 *    per dirk.eibach at gdsys.cc
Packit 209cc3
 */
Packit 209cc3
#define DLT_DISPLAYPORT_AUX	275
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * Linux cooked sockets v2.
Packit 209cc3
 */
Packit 209cc3
#define DLT_LINUX_SLL2	276
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * In case the code that includes this file (directly or indirectly)
Packit 209cc3
 * has also included OS files that happen to define DLT_MATCHING_MAX,
Packit 209cc3
 * with a different value (perhaps because that OS hasn't picked up
Packit 209cc3
 * the latest version of our DLT definitions), we undefine the
Packit 209cc3
 * previous value of DLT_MATCHING_MAX.
Packit 209cc3
 */
Packit 209cc3
#ifdef DLT_MATCHING_MAX
Packit 209cc3
#undef DLT_MATCHING_MAX
Packit 209cc3
#endif
Packit 209cc3
#define DLT_MATCHING_MAX	276	/* highest value in the "matching" range */
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * DLT and savefile link type values are split into a class and
Packit 209cc3
 * a member of that class.  A class value of 0 indicates a regular
Packit 209cc3
 * DLT_/LINKTYPE_ value.
Packit 209cc3
 */
Packit 209cc3
#define DLT_CLASS(x)		((x) & 0x03ff0000)
Packit 209cc3
Packit 209cc3
/*
Packit 209cc3
 * NetBSD-specific generic "raw" link type.  The class value indicates
Packit 209cc3
 * that this is the generic raw type, and the lower 16 bits are the
Packit 209cc3
 * address family we're dealing with.  Those values are NetBSD-specific;
Packit 209cc3
 * do not assume that they correspond to AF_ values for your operating
Packit 209cc3
 * system.
Packit 209cc3
 */
Packit 209cc3
#define	DLT_CLASS_NETBSD_RAWAF	0x02240000
Packit 209cc3
#define	DLT_NETBSD_RAWAF(af)	(DLT_CLASS_NETBSD_RAWAF | (af))
Packit 209cc3
#define	DLT_NETBSD_RAWAF_AF(x)	((x) & 0x0000ffff)
Packit 209cc3
#define	DLT_IS_NETBSD_RAWAF(x)	(DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
Packit 209cc3
Packit 209cc3
#endif /* !defined(lib_pcap_dlt_h) */