dlt.h revision 1.14 1 1.14 kardel /* $NetBSD: dlt.h,v 1.14 2013/04/07 14:12:05 kardel Exp $ */
2 1.1 thorpej
3 1.13 christos /*-
4 1.13 christos * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
5 1.1 thorpej * The Regents of the University of California. All rights reserved.
6 1.1 thorpej *
7 1.1 thorpej * This code is derived from the Stanford/CMU enet packet filter,
8 1.1 thorpej * (net/enet.c) distributed as part of 4.3BSD, and code contributed
9 1.1 thorpej * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
10 1.1 thorpej * Berkeley Laboratory.
11 1.1 thorpej *
12 1.1 thorpej * Redistribution and use in source and binary forms, with or without
13 1.1 thorpej * modification, are permitted provided that the following conditions
14 1.1 thorpej * are met:
15 1.1 thorpej * 1. Redistributions of source code must retain the above copyright
16 1.1 thorpej * notice, this list of conditions and the following disclaimer.
17 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright
18 1.1 thorpej * notice, this list of conditions and the following disclaimer in the
19 1.1 thorpej * documentation and/or other materials provided with the distribution.
20 1.13 christos * 3. All advertising materials mentioning features or use of this software
21 1.13 christos * must display the following acknowledgement:
22 1.13 christos * This product includes software developed by the University of
23 1.13 christos * California, Berkeley and its contributors.
24 1.13 christos * 4. Neither the name of the University nor the names of its contributors
25 1.1 thorpej * may be used to endorse or promote products derived from this software
26 1.1 thorpej * without specific prior written permission.
27 1.1 thorpej *
28 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 1.1 thorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 1.1 thorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 1.1 thorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 1.1 thorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 1.1 thorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 1.1 thorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 1.1 thorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 1.1 thorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 1.1 thorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 1.1 thorpej * SUCH DAMAGE.
39 1.1 thorpej *
40 1.13 christos * @(#)bpf.h 7.1 (Berkeley) 5/7/91
41 1.13 christos *
42 1.13 christos * @(#) Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.32 2008-12-23 20:13:29 guy Exp (LBL)
43 1.1 thorpej */
44 1.1 thorpej
45 1.1 thorpej #ifndef _NET_DLT_H_
46 1.1 thorpej #define _NET_DLT_H_
47 1.13 christos /*
48 1.13 christos * Link-layer header type codes.
49 1.13 christos *
50 1.13 christos * Do *NOT* add new values to this list without asking
51 1.13 christos * "tcpdump-workers (at) lists.tcpdump.org" for a value. Otherwise, you run
52 1.13 christos * the risk of using a value that's already being used for some other
53 1.13 christos * purpose, and of having tools that read libpcap-format captures not
54 1.13 christos * being able to handle captures with your new DLT_ value, with no hope
55 1.13 christos * that they will ever be changed to do so (as that would destroy their
56 1.13 christos * ability to read captures using that value for that other purpose).
57 1.13 christos *
58 1.13 christos * See
59 1.13 christos *
60 1.13 christos * http://www.tcpdump.org/linktypes.html
61 1.13 christos *
62 1.13 christos * for detailed descriptions of some of these link-layer header types.
63 1.13 christos */
64 1.1 thorpej
65 1.1 thorpej /*
66 1.13 christos * These are the types that are the same on all platforms, and that
67 1.13 christos * have been defined by <net/bpf.h> for ages.
68 1.1 thorpej */
69 1.13 christos #define DLT_NULL 0 /* BSD loopback encapsulation */
70 1.1 thorpej #define DLT_EN10MB 1 /* Ethernet (10Mb) */
71 1.1 thorpej #define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
72 1.1 thorpej #define DLT_AX25 3 /* Amateur Radio AX.25 */
73 1.1 thorpej #define DLT_PRONET 4 /* Proteon ProNET Token Ring */
74 1.1 thorpej #define DLT_CHAOS 5 /* Chaos */
75 1.13 christos #define DLT_IEEE802 6 /* 802.5 Token Ring */
76 1.13 christos #define DLT_ARCNET 7 /* ARCNET, with BSD-style header */
77 1.1 thorpej #define DLT_SLIP 8 /* Serial Line IP */
78 1.1 thorpej #define DLT_PPP 9 /* Point-to-point Protocol */
79 1.1 thorpej #define DLT_FDDI 10 /* FDDI */
80 1.13 christos
81 1.13 christos /*
82 1.13 christos * These are types that are different on some platforms, and that
83 1.13 christos * have been defined by <net/bpf.h> for ages. We use #ifdefs to
84 1.13 christos * detect the BSDs that define them differently from the traditional
85 1.13 christos * libpcap <net/bpf.h>
86 1.13 christos *
87 1.13 christos * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
88 1.13 christos * but I don't know what the right #define is for BSD/OS.
89 1.13 christos */
90 1.13 christos #define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */
91 1.13 christos
92 1.13 christos #ifdef __OpenBSD__
93 1.13 christos #define DLT_RAW 14 /* raw IP */
94 1.13 christos #else
95 1.1 thorpej #define DLT_RAW 12 /* raw IP */
96 1.13 christos #endif
97 1.13 christos
98 1.13 christos /*
99 1.13 christos * Given that the only OS that currently generates BSD/OS SLIP or PPP
100 1.13 christos * is, well, BSD/OS, arguably everybody should have chosen its values
101 1.13 christos * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
102 1.13 christos * didn't. So it goes.
103 1.13 christos */
104 1.13 christos #if defined(__NetBSD__) || defined(__FreeBSD__)
105 1.13 christos #ifndef DLT_SLIP_BSDOS
106 1.1 thorpej #define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */
107 1.1 thorpej #define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */
108 1.14 kardel #define DLT_HIPPI 15 /* HIPPI */
109 1.14 kardel #define DLT_HDLC 16 /* HDLC framing */
110 1.13 christos #endif
111 1.13 christos #else
112 1.13 christos #define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */
113 1.13 christos #define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */
114 1.13 christos #endif
115 1.13 christos
116 1.13 christos /*
117 1.13 christos * 17 was used for DLT_PFLOG in OpenBSD; it no longer is.
118 1.13 christos *
119 1.13 christos * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG
120 1.13 christos * as 117 so that pflog captures would use a link-layer header type
121 1.13 christos * value that didn't collide with any other values. On all
122 1.13 christos * platforms other than OpenBSD, we defined DLT_PFLOG as 117,
123 1.13 christos * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG.
124 1.13 christos *
125 1.13 christos * OpenBSD eventually switched to using 117 for DLT_PFLOG as well.
126 1.13 christos *
127 1.13 christos * Don't use 17 for anything else.
128 1.13 christos */
129 1.13 christos #if defined(__OpenBSD__) || defined(__NetBSD__)
130 1.13 christos #define DLT_OLD_PFLOG 17
131 1.13 christos #endif
132 1.13 christos
133 1.13 christos /*
134 1.13 christos * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and
135 1.13 christos * Mac OS X; don't use it for anything else. (FreeBSD uses 121,
136 1.13 christos * which collides with DLT_HHDLC, even though it doesn't use 18
137 1.13 christos * for anything and doesn't appear to have ever used it for anything.)
138 1.13 christos *
139 1.13 christos * We define it as 18 on those platforms; it is, unfortunately, used
140 1.13 christos * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC
141 1.13 christos * in general. As the packet format for it, like that for
142 1.13 christos * DLT_PFLOG, is not only OS-dependent but OS-version-dependent,
143 1.13 christos * we don't support printing it in tcpdump except on OSes that
144 1.13 christos * have the relevant header files, so it's not that useful on
145 1.13 christos * other platforms.
146 1.13 christos */
147 1.13 christos #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
148 1.13 christos #define DLT_PFSYNC 18
149 1.13 christos #endif
150 1.1 thorpej
151 1.9 dyoung #define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */
152 1.3 bjh21
153 1.13 christos /*
154 1.13 christos * Apparently Redback uses this for its SmartEdge 400/800. I hope
155 1.13 christos * nobody else decided to use it, too.
156 1.13 christos */
157 1.13 christos #define DLT_REDBACK_SMARTEDGE 32
158 1.13 christos
159 1.13 christos /*
160 1.13 christos * These values are defined by NetBSD; other platforms should refrain from
161 1.13 christos * using them for other purposes, so that NetBSD savefiles with link
162 1.13 christos * types of 50 or 51 can be read as this type on all platforms.
163 1.13 christos */
164 1.13 christos #define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */
165 1.13 christos #define DLT_PPP_ETHER 51 /* PPP over Ethernet */
166 1.13 christos
167 1.13 christos /*
168 1.13 christos * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
169 1.13 christos * a link-layer type of 99 for the tcpdump it supplies. The link-layer
170 1.13 christos * header has 6 bytes of unknown data, something that appears to be an
171 1.13 christos * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
172 1.13 christos * I've seen.
173 1.13 christos */
174 1.9 dyoung #define DLT_SYMANTEC_FIREWALL 99
175 1.9 dyoung
176 1.13 christos /*
177 1.13 christos * Values between 100 and 103 are used in capture file headers as
178 1.13 christos * link-layer header type LINKTYPE_ values corresponding to DLT_ types
179 1.13 christos * that differ between platforms; don't use those values for new DLT_
180 1.13 christos * new types.
181 1.13 christos */
182 1.13 christos
183 1.13 christos /*
184 1.13 christos * Values starting with 104 are used for newly-assigned link-layer
185 1.13 christos * header type values; for those link-layer header types, the DLT_
186 1.13 christos * value returned by pcap_datalink() and passed to pcap_open_dead(),
187 1.13 christos * and the LINKTYPE_ value that appears in capture files, are the
188 1.13 christos * same.
189 1.13 christos *
190 1.13 christos * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is
191 1.13 christos * the highest such value.
192 1.13 christos */
193 1.13 christos #define DLT_MATCHING_MIN 104
194 1.13 christos
195 1.13 christos /*
196 1.13 christos * This value was defined by libpcap 0.5; platforms that have defined
197 1.13 christos * it with a different value should define it here with that value -
198 1.13 christos * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
199 1.13 christos * whatever value that happens to be, so programs will correctly
200 1.13 christos * handle files with that link type regardless of the value of
201 1.13 christos * DLT_C_HDLC.
202 1.13 christos *
203 1.13 christos * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
204 1.13 christos * compatibility with programs written for BSD/OS.
205 1.13 christos *
206 1.13 christos * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
207 1.13 christos * for source compatibility with programs written for libpcap 0.5.
208 1.13 christos */
209 1.13 christos #define DLT_C_HDLC 104 /* Cisco HDLC */
210 1.13 christos #define DLT_CHDLC DLT_C_HDLC
211 1.13 christos
212 1.13 christos #define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */
213 1.13 christos
214 1.13 christos /*
215 1.13 christos * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
216 1.13 christos * except when it isn't. (I.e., sometimes it's just raw IP, and
217 1.13 christos * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL,
218 1.13 christos * so that we don't have to worry about the link-layer header.)
219 1.13 christos */
220 1.13 christos
221 1.13 christos /*
222 1.13 christos * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
223 1.13 christos * with other values.
224 1.13 christos * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
225 1.13 christos * (DLCI, etc.).
226 1.13 christos */
227 1.13 christos #define DLT_FRELAY 107
228 1.13 christos
229 1.13 christos /*
230 1.13 christos * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
231 1.13 christos * that the AF_ type in the link-layer header is in network byte order.
232 1.13 christos *
233 1.13 christos * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
234 1.13 christos * we don't use 12 for it in OSes other than OpenBSD.
235 1.13 christos */
236 1.13 christos #ifdef __OpenBSD__
237 1.13 christos #define DLT_LOOP 12
238 1.13 christos #else
239 1.13 christos #define DLT_LOOP 108
240 1.13 christos #endif
241 1.13 christos
242 1.13 christos /*
243 1.13 christos * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
244 1.13 christos * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
245 1.13 christos * than OpenBSD.
246 1.13 christos */
247 1.13 christos #ifdef __OpenBSD__
248 1.13 christos #define DLT_ENC 13
249 1.13 christos #else
250 1.13 christos #define DLT_ENC 109
251 1.13 christos #endif
252 1.13 christos
253 1.13 christos /*
254 1.13 christos * Values between 110 and 112 are reserved for use in capture file headers
255 1.13 christos * as link-layer types corresponding to DLT_ types that might differ
256 1.13 christos * between platforms; don't use those values for new DLT_ types
257 1.13 christos * other than the corresponding DLT_ types.
258 1.13 christos */
259 1.13 christos
260 1.13 christos /*
261 1.13 christos * This is for Linux cooked sockets.
262 1.13 christos */
263 1.13 christos #define DLT_LINUX_SLL 113
264 1.13 christos
265 1.13 christos /*
266 1.13 christos * Apple LocalTalk hardware.
267 1.13 christos */
268 1.13 christos #define DLT_LTALK 114
269 1.13 christos
270 1.13 christos /*
271 1.13 christos * Acorn Econet.
272 1.13 christos */
273 1.13 christos #define DLT_ECONET 115
274 1.13 christos
275 1.13 christos /*
276 1.13 christos * Reserved for use with OpenBSD ipfilter.
277 1.13 christos */
278 1.13 christos #define DLT_IPFILTER 116
279 1.13 christos
280 1.13 christos /*
281 1.13 christos * OpenBSD DLT_PFLOG.
282 1.13 christos */
283 1.13 christos #define DLT_PFLOG 117
284 1.13 christos
285 1.13 christos /*
286 1.13 christos * Registered for Cisco-internal use.
287 1.13 christos */
288 1.13 christos #define DLT_CISCO_IOS 118
289 1.13 christos
290 1.13 christos /*
291 1.13 christos * For 802.11 cards using the Prism II chips, with a link-layer
292 1.13 christos * header including Prism monitor mode information plus an 802.11
293 1.13 christos * header.
294 1.13 christos */
295 1.13 christos #define DLT_PRISM_HEADER 119
296 1.13 christos
297 1.13 christos /*
298 1.13 christos * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
299 1.13 christos * (see Doug Ambrisko's FreeBSD patches).
300 1.13 christos */
301 1.13 christos #define DLT_AIRONET_HEADER 120
302 1.13 christos
303 1.13 christos /*
304 1.13 christos * Sigh.
305 1.13 christos *
306 1.13 christos * This was reserved for Siemens HiPath HDLC on 2002-01-25, as
307 1.13 christos * requested by Tomas Kukosa.
308 1.13 christos *
309 1.13 christos * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that
310 1.13 christos * assigned 121 as DLT_PFSYNC. Its libpcap does DLT_ <-> LINKTYPE_
311 1.13 christos * mapping, so it probably supports capturing on the pfsync device
312 1.13 christos * but not saving the captured data to a pcap file.
313 1.13 christos *
314 1.13 christos * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC;
315 1.13 christos * their libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would
316 1.13 christos * use 18 in pcap files as well.
317 1.13 christos *
318 1.13 christos * NetBSD and DragonFly BSD also use 18 for DLT_PFSYNC; their
319 1.13 christos * libpcaps do DLT_ <-> LINKTYPE_ mapping, and neither has an entry
320 1.13 christos * for DLT_PFSYNC, so it might not be able to write out dump files
321 1.13 christos * with 18 as the link-layer header type. (Earlier versions might
322 1.13 christos * not have done mapping, in which case they'd work the same way
323 1.13 christos * OpenBSD does.)
324 1.13 christos *
325 1.13 christos * Mac OS X defines it as 18, but doesn't appear to use it as of
326 1.13 christos * Mac OS X 10.7.3. Its libpcap does DLT_ <-> LINKTYPE_ mapping.
327 1.13 christos *
328 1.13 christos * We'll define DLT_PFSYNC as 121 on FreeBSD and define it as 18 on
329 1.13 christos * all other platforms. We'll define DLT_HHDLC as 121 on everything
330 1.13 christos * except for FreeBSD; anybody who wants to compile, on FreeBSD, code
331 1.13 christos * that uses DLT_HHDLC is out of luck.
332 1.13 christos *
333 1.13 christos * We'll define LINKTYPE_PFSYNC as 18, *even on FreeBSD*, and map
334 1.13 christos * it, so that savefiles won't use 121 for PFSYNC - they'll all
335 1.13 christos * use 18. Code that uses pcap_datalink() to determine the link-layer
336 1.13 christos * header type of a savefile won't, when built and run on FreeBSD,
337 1.13 christos * be able to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC
338 1.13 christos * capture files; code that doesn't, such as the code in Wireshark,
339 1.13 christos * will be able to distinguish between them.
340 1.13 christos */
341 1.13 christos #ifdef __FreeBSD__
342 1.13 christos #define DLT_PFSYNC 121
343 1.13 christos #else
344 1.13 christos #define DLT_HHDLC 121
345 1.13 christos #endif
346 1.13 christos
347 1.13 christos /*
348 1.13 christos * This is for RFC 2625 IP-over-Fibre Channel.
349 1.13 christos *
350 1.13 christos * This is not for use with raw Fibre Channel, where the link-layer
351 1.13 christos * header starts with a Fibre Channel frame header; it's for IP-over-FC,
352 1.13 christos * where the link-layer header starts with an RFC 2625 Network_Header
353 1.13 christos * field.
354 1.13 christos */
355 1.13 christos #define DLT_IP_OVER_FC 122
356 1.13 christos
357 1.13 christos /*
358 1.13 christos * This is for Full Frontal ATM on Solaris with SunATM, with a
359 1.13 christos * pseudo-header followed by an AALn PDU.
360 1.13 christos *
361 1.13 christos * There may be other forms of Full Frontal ATM on other OSes,
362 1.13 christos * with different pseudo-headers.
363 1.13 christos *
364 1.13 christos * If ATM software returns a pseudo-header with VPI/VCI information
365 1.13 christos * (and, ideally, packet type information, e.g. signalling, ILMI,
366 1.13 christos * LANE, LLC-multiplexed traffic, etc.), it should not use
367 1.13 christos * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
368 1.13 christos * and the like don't have to infer the presence or absence of a
369 1.13 christos * pseudo-header and the form of the pseudo-header.
370 1.13 christos */
371 1.9 dyoung #define DLT_SUNATM 123 /* Solaris+SunATM */
372 1.13 christos
373 1.13 christos /*
374 1.13 christos * Reserved as per request from Kent Dahlgren <kent (at) praesum.com>
375 1.13 christos * for private use.
376 1.13 christos */
377 1.9 dyoung #define DLT_RIO 124 /* RapidIO */
378 1.9 dyoung #define DLT_PCI_EXP 125 /* PCI Express */
379 1.9 dyoung #define DLT_AURORA 126 /* Xilinx Aurora link layer */
380 1.13 christos
381 1.13 christos /*
382 1.13 christos * Header for 802.11 plus a number of bits of link-layer information
383 1.13 christos * including radio information, used by some recent BSD drivers as
384 1.13 christos * well as the madwifi Atheros driver for Linux.
385 1.13 christos */
386 1.13 christos #define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */
387 1.13 christos
388 1.13 christos /*
389 1.13 christos * Reserved for the TZSP encapsulation, as per request from
390 1.13 christos * Chris Waters <chris.waters (at) networkchemistry.com>
391 1.13 christos * TZSP is a generic encapsulation for any other link type,
392 1.13 christos * which includes a means to include meta-information
393 1.13 christos * with the packet, e.g. signal strength and channel
394 1.13 christos * for 802.11 packets.
395 1.13 christos */
396 1.9 dyoung #define DLT_TZSP 128 /* Tazmen Sniffer Protocol */
397 1.13 christos
398 1.13 christos /*
399 1.13 christos * BSD's ARCNET headers have the source host, destination host,
400 1.13 christos * and type at the beginning of the packet; that's what's handed
401 1.13 christos * up to userland via BPF.
402 1.13 christos *
403 1.13 christos * Linux's ARCNET headers, however, have a 2-byte offset field
404 1.13 christos * between the host IDs and the type; that's what's handed up
405 1.13 christos * to userland via PF_PACKET sockets.
406 1.13 christos *
407 1.13 christos * We therefore have to have separate DLT_ values for them.
408 1.13 christos */
409 1.9 dyoung #define DLT_ARCNET_LINUX 129 /* ARCNET */
410 1.13 christos
411 1.13 christos /*
412 1.13 christos * Juniper-private data link types, as per request from
413 1.13 christos * Hannes Gredler <hannes (at) juniper.net>. The DLT_s are used
414 1.13 christos * for passing on chassis-internal metainformation such as
415 1.13 christos * QOS profiles, etc..
416 1.13 christos */
417 1.13 christos #define DLT_JUNIPER_MLPPP 130
418 1.9 dyoung #define DLT_JUNIPER_MLFR 131
419 1.9 dyoung #define DLT_JUNIPER_ES 132
420 1.9 dyoung #define DLT_JUNIPER_GGSN 133
421 1.9 dyoung #define DLT_JUNIPER_MFR 134
422 1.9 dyoung #define DLT_JUNIPER_ATM2 135
423 1.9 dyoung #define DLT_JUNIPER_SERVICES 136
424 1.9 dyoung #define DLT_JUNIPER_ATM1 137
425 1.9 dyoung
426 1.13 christos /*
427 1.13 christos * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
428 1.13 christos * <dieter (at) apple.com>. The header that's presented is an Ethernet-like
429 1.13 christos * header:
430 1.13 christos *
431 1.13 christos * #define FIREWIRE_EUI64_LEN 8
432 1.13 christos * struct firewire_header {
433 1.13 christos * u_char firewire_dhost[FIREWIRE_EUI64_LEN];
434 1.13 christos * u_char firewire_shost[FIREWIRE_EUI64_LEN];
435 1.13 christos * u_short firewire_type;
436 1.13 christos * };
437 1.13 christos *
438 1.13 christos * with "firewire_type" being an Ethernet type value, rather than,
439 1.13 christos * for example, raw GASP frames being handed up.
440 1.13 christos */
441 1.13 christos #define DLT_APPLE_IP_OVER_IEEE1394 138
442 1.13 christos
443 1.13 christos /*
444 1.13 christos * Various SS7 encapsulations, as per a request from Jeff Morriss
445 1.13 christos * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
446 1.13 christos */
447 1.13 christos #define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */
448 1.13 christos #define DLT_MTP2 140 /* MTP2, without pseudo-header */
449 1.13 christos #define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */
450 1.13 christos #define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */
451 1.9 dyoung
452 1.13 christos /*
453 1.13 christos * DOCSIS MAC frames.
454 1.13 christos */
455 1.13 christos #define DLT_DOCSIS 143
456 1.13 christos
457 1.13 christos /*
458 1.13 christos * Linux-IrDA packets. Protocol defined at http://www.irda.org.
459 1.13 christos * Those packets include IrLAP headers and above (IrLMP...), but
460 1.13 christos * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
461 1.13 christos * framing can be handled by the hardware and depend on the bitrate.
462 1.13 christos * This is exactly the format you would get capturing on a Linux-IrDA
463 1.13 christos * interface (irdaX), but not on a raw serial port.
464 1.13 christos * Note the capture is done in "Linux-cooked" mode, so each packet include
465 1.13 christos * a fake packet header (struct sll_header). This is because IrDA packet
466 1.13 christos * decoding is dependant on the direction of the packet (incomming or
467 1.13 christos * outgoing).
468 1.13 christos * When/if other platform implement IrDA capture, we may revisit the
469 1.13 christos * issue and define a real DLT_IRDA...
470 1.13 christos * Jean II
471 1.13 christos */
472 1.13 christos #define DLT_LINUX_IRDA 144
473 1.9 dyoung
474 1.13 christos /*
475 1.13 christos * Reserved for IBM SP switch and IBM Next Federation switch.
476 1.13 christos */
477 1.9 dyoung #define DLT_IBM_SP 145
478 1.9 dyoung #define DLT_IBM_SN 146
479 1.9 dyoung
480 1.13 christos /*
481 1.13 christos * Reserved for private use. If you have some link-layer header type
482 1.13 christos * that you want to use within your organization, with the capture files
483 1.13 christos * using that link-layer header type not ever be sent outside your
484 1.13 christos * organization, you can use these values.
485 1.13 christos *
486 1.13 christos * No libpcap release will use these for any purpose, nor will any
487 1.13 christos * tcpdump release use them, either.
488 1.13 christos *
489 1.13 christos * Do *NOT* use these in capture files that you expect anybody not using
490 1.13 christos * your private versions of capture-file-reading tools to read; in
491 1.13 christos * particular, do *NOT* use them in products, otherwise you may find that
492 1.13 christos * people won't be able to use tcpdump, or snort, or Ethereal, or... to
493 1.13 christos * read capture files from your firewall/intrusion detection/traffic
494 1.13 christos * monitoring/etc. appliance, or whatever product uses that DLT_ value,
495 1.13 christos * and you may also find that the developers of those applications will
496 1.13 christos * not accept patches to let them read those files.
497 1.13 christos *
498 1.13 christos * Also, do not use them if somebody might send you a capture using them
499 1.13 christos * for *their* private type and tools using them for *your* private type
500 1.13 christos * would have to read them.
501 1.13 christos *
502 1.13 christos * Instead, ask "tcpdump-workers (at) lists.tcpdump.org" for a new DLT_ value,
503 1.13 christos * as per the comment above, and use the type you're given.
504 1.13 christos */
505 1.13 christos #define DLT_USER0 147
506 1.13 christos #define DLT_USER1 148
507 1.13 christos #define DLT_USER2 149
508 1.13 christos #define DLT_USER3 150
509 1.13 christos #define DLT_USER4 151
510 1.13 christos #define DLT_USER5 152
511 1.13 christos #define DLT_USER6 153
512 1.13 christos #define DLT_USER7 154
513 1.13 christos #define DLT_USER8 155
514 1.13 christos #define DLT_USER9 156
515 1.13 christos #define DLT_USER10 157
516 1.13 christos #define DLT_USER11 158
517 1.13 christos #define DLT_USER12 159
518 1.13 christos #define DLT_USER13 160
519 1.13 christos #define DLT_USER14 161
520 1.13 christos #define DLT_USER15 162
521 1.13 christos
522 1.13 christos /*
523 1.13 christos * For future use with 802.11 captures - defined by AbsoluteValue
524 1.13 christos * Systems to store a number of bits of link-layer information
525 1.13 christos * including radio information:
526 1.13 christos *
527 1.13 christos * http://www.shaftnet.org/~pizza/software/capturefrm.txt
528 1.13 christos *
529 1.13 christos * but it might be used by some non-AVS drivers now or in the
530 1.13 christos * future.
531 1.13 christos */
532 1.13 christos #define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
533 1.13 christos
534 1.13 christos /*
535 1.13 christos * Juniper-private data link type, as per request from
536 1.13 christos * Hannes Gredler <hannes (at) juniper.net>. The DLT_s are used
537 1.13 christos * for passing on chassis-internal metainformation such as
538 1.13 christos * QOS profiles, etc..
539 1.13 christos */
540 1.13 christos #define DLT_JUNIPER_MONITOR 164
541 1.13 christos
542 1.13 christos /*
543 1.13 christos * BACnet MS/TP frames.
544 1.13 christos */
545 1.11 drochner #define DLT_BACNET_MS_TP 165
546 1.11 drochner
547 1.13 christos /*
548 1.13 christos * Another PPP variant as per request from Karsten Keil <kkeil (at) suse.de>.
549 1.13 christos *
550 1.13 christos * This is used in some OSes to allow a kernel socket filter to distinguish
551 1.13 christos * between incoming and outgoing packets, on a socket intended to
552 1.13 christos * supply pppd with outgoing packets so it can do dial-on-demand and
553 1.13 christos * hangup-on-lack-of-demand; incoming packets are filtered out so they
554 1.13 christos * don't cause pppd to hold the connection up (you don't want random
555 1.13 christos * input packets such as port scans, packets from old lost connections,
556 1.13 christos * etc. to force the connection to stay up).
557 1.13 christos *
558 1.13 christos * The first byte of the PPP header (0xff03) is modified to accomodate
559 1.13 christos * the direction - 0x00 = IN, 0x01 = OUT.
560 1.13 christos */
561 1.13 christos #define DLT_PPP_PPPD 166
562 1.13 christos
563 1.13 christos /*
564 1.13 christos * Names for backwards compatibility with older versions of some PPP
565 1.13 christos * software; new software should use DLT_PPP_PPPD.
566 1.13 christos */
567 1.13 christos #define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD
568 1.13 christos #define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD
569 1.13 christos
570 1.13 christos /*
571 1.13 christos * Juniper-private data link type, as per request from
572 1.13 christos * Hannes Gredler <hannes (at) juniper.net>. The DLT_s are used
573 1.13 christos * for passing on chassis-internal metainformation such as
574 1.13 christos * QOS profiles, cookies, etc..
575 1.13 christos */
576 1.13 christos #define DLT_JUNIPER_PPPOE 167
577 1.13 christos #define DLT_JUNIPER_PPPOE_ATM 168
578 1.11 drochner
579 1.11 drochner #define DLT_GPRS_LLC 169 /* GPRS LLC */
580 1.11 drochner #define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */
581 1.11 drochner #define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */
582 1.11 drochner
583 1.13 christos /*
584 1.13 christos * Requested by Oolan Zimmer <oz (at) gcom.com> for use in Gcom's T1/E1 line
585 1.13 christos * monitoring equipment.
586 1.13 christos */
587 1.11 drochner #define DLT_GCOM_T1E1 172
588 1.11 drochner #define DLT_GCOM_SERIAL 173
589 1.11 drochner
590 1.13 christos /*
591 1.13 christos * Juniper-private data link type, as per request from
592 1.13 christos * Hannes Gredler <hannes (at) juniper.net>. The DLT_ is used
593 1.13 christos * for internal communication to Physical Interface Cards (PIC)
594 1.13 christos */
595 1.13 christos #define DLT_JUNIPER_PIC_PEER 174
596 1.13 christos
597 1.13 christos /*
598 1.13 christos * Link types requested by Gregor Maier <gregor (at) endace.com> of Endace
599 1.13 christos * Measurement Systems. They add an ERF header (see
600 1.13 christos * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
601 1.13 christos * the link-layer header.
602 1.13 christos */
603 1.11 drochner #define DLT_ERF_ETH 175 /* Ethernet */
604 1.11 drochner #define DLT_ERF_POS 176 /* Packet-over-SONET */
605 1.11 drochner
606 1.13 christos /*
607 1.13 christos * Requested by Daniele Orlandi <daniele (at) orlandi.com> for raw LAPD
608 1.13 christos * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header
609 1.13 christos * includes additional information before the LAPD header, so it's
610 1.13 christos * not necessarily a generic LAPD header.
611 1.13 christos */
612 1.13 christos #define DLT_LINUX_LAPD 177
613 1.1 thorpej
614 1.1 thorpej /*
615 1.12 christos * Juniper-private data link type, as per request from
616 1.13 christos * Hannes Gredler <hannes (at) juniper.net>.
617 1.12 christos * The DLT_ are used for prepending meta-information
618 1.12 christos * like interface index, interface name
619 1.12 christos * before standard Ethernet, PPP, Frelay & C-HDLC Frames
620 1.12 christos */
621 1.12 christos #define DLT_JUNIPER_ETHER 178
622 1.12 christos #define DLT_JUNIPER_PPP 179
623 1.12 christos #define DLT_JUNIPER_FRELAY 180
624 1.12 christos #define DLT_JUNIPER_CHDLC 181
625 1.12 christos
626 1.12 christos /*
627 1.12 christos * Multi Link Frame Relay (FRF.16)
628 1.12 christos */
629 1.12 christos #define DLT_MFR 182
630 1.12 christos
631 1.12 christos /*
632 1.12 christos * Juniper-private data link type, as per request from
633 1.13 christos * Hannes Gredler <hannes (at) juniper.net>.
634 1.12 christos * The DLT_ is used for internal communication with a
635 1.12 christos * voice Adapter Card (PIC)
636 1.12 christos */
637 1.12 christos #define DLT_JUNIPER_VP 183
638 1.12 christos
639 1.12 christos /*
640 1.12 christos * Arinc 429 frames.
641 1.12 christos * DLT_ requested by Gianluca Varenni <gianluca.varenni (at) cacetech.com>.
642 1.12 christos * Every frame contains a 32bit A429 label.
643 1.12 christos * More documentation on Arinc 429 can be found at
644 1.12 christos * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
645 1.12 christos */
646 1.12 christos #define DLT_A429 184
647 1.12 christos
648 1.12 christos /*
649 1.12 christos * Arinc 653 Interpartition Communication messages.
650 1.12 christos * DLT_ requested by Gianluca Varenni <gianluca.varenni (at) cacetech.com>.
651 1.12 christos * Please refer to the A653-1 standard for more information.
652 1.12 christos */
653 1.12 christos #define DLT_A653_ICM 185
654 1.12 christos
655 1.12 christos /*
656 1.12 christos * USB packets, beginning with a USB setup header; requested by
657 1.12 christos * Paolo Abeni <paolo.abeni (at) email.it>.
658 1.12 christos */
659 1.12 christos #define DLT_USB 186
660 1.12 christos
661 1.12 christos /*
662 1.12 christos * Bluetooth HCI UART transport layer (part H:4); requested by
663 1.12 christos * Paolo Abeni.
664 1.12 christos */
665 1.12 christos #define DLT_BLUETOOTH_HCI_H4 187
666 1.12 christos
667 1.12 christos /*
668 1.12 christos * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
669 1.12 christos * <cruz_petagay (at) bah.com>.
670 1.12 christos */
671 1.12 christos #define DLT_IEEE802_16_MAC_CPS 188
672 1.12 christos
673 1.12 christos /*
674 1.12 christos * USB packets, beginning with a Linux USB header; requested by
675 1.12 christos * Paolo Abeni <paolo.abeni (at) email.it>.
676 1.12 christos */
677 1.12 christos #define DLT_USB_LINUX 189
678 1.12 christos
679 1.12 christos /*
680 1.12 christos * Controller Area Network (CAN) v. 2.0B packets.
681 1.12 christos * DLT_ requested by Gianluca Varenni <gianluca.varenni (at) cacetech.com>.
682 1.12 christos * Used to dump CAN packets coming from a CAN Vector board.
683 1.12 christos * More documentation on the CAN v2.0B frames can be found at
684 1.12 christos * http://www.can-cia.org/downloads/?269
685 1.12 christos */
686 1.12 christos #define DLT_CAN20B 190
687 1.12 christos
688 1.12 christos /*
689 1.12 christos * IEEE 802.15.4, with address fields padded, as is done by Linux
690 1.12 christos * drivers; requested by Juergen Schimmer.
691 1.12 christos */
692 1.12 christos #define DLT_IEEE802_15_4_LINUX 191
693 1.12 christos
694 1.12 christos /*
695 1.12 christos * Per Packet Information encapsulated packets.
696 1.12 christos * DLT_ requested by Gianluca Varenni <gianluca.varenni (at) cacetech.com>.
697 1.12 christos */
698 1.12 christos #define DLT_PPI 192
699 1.12 christos
700 1.12 christos /*
701 1.12 christos * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
702 1.12 christos * requested by Charles Clancy.
703 1.12 christos */
704 1.12 christos #define DLT_IEEE802_16_MAC_CPS_RADIO 193
705 1.12 christos
706 1.12 christos /*
707 1.12 christos * Juniper-private data link type, as per request from
708 1.13 christos * Hannes Gredler <hannes (at) juniper.net>.
709 1.12 christos * The DLT_ is used for internal communication with a
710 1.12 christos * integrated service module (ISM).
711 1.12 christos */
712 1.12 christos #define DLT_JUNIPER_ISM 194
713 1.12 christos
714 1.12 christos /*
715 1.12 christos * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
716 1.12 christos * nothing); requested by Mikko Saarnivala <mikko.saarnivala (at) sensinode.com>.
717 1.13 christos * For this one, we expect the FCS to be present at the end of the frame;
718 1.13 christos * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used.
719 1.12 christos */
720 1.12 christos #define DLT_IEEE802_15_4 195
721 1.12 christos
722 1.12 christos /*
723 1.12 christos * Various link-layer types, with a pseudo-header, for SITA
724 1.12 christos * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew (at) gmail.com).
725 1.12 christos */
726 1.12 christos #define DLT_SITA 196
727 1.12 christos
728 1.12 christos /*
729 1.12 christos * Various link-layer types, with a pseudo-header, for Endace DAG cards;
730 1.12 christos * encapsulates Endace ERF records. Requested by Stephen Donnelly
731 1.12 christos * <stephen (at) endace.com>.
732 1.12 christos */
733 1.12 christos #define DLT_ERF 197
734 1.12 christos
735 1.12 christos /*
736 1.12 christos * Special header prepended to Ethernet packets when capturing from a
737 1.12 christos * u10 Networks board. Requested by Phil Mulholland
738 1.12 christos * <phil (at) u10networks.com>.
739 1.12 christos */
740 1.12 christos #define DLT_RAIF1 198
741 1.12 christos
742 1.12 christos /*
743 1.12 christos * IPMB packet for IPMI, beginning with the I2C slave address, followed
744 1.12 christos * by the netFn and LUN, etc.. Requested by Chanthy Toeung
745 1.12 christos * <chanthy.toeung (at) ca.kontron.com>.
746 1.12 christos */
747 1.12 christos #define DLT_IPMB 199
748 1.12 christos
749 1.12 christos /*
750 1.12 christos * Juniper-private data link type, as per request from
751 1.13 christos * Hannes Gredler <hannes (at) juniper.net>.
752 1.12 christos * The DLT_ is used for capturing data on a secure tunnel interface.
753 1.12 christos */
754 1.12 christos #define DLT_JUNIPER_ST 200
755 1.12 christos
756 1.12 christos /*
757 1.12 christos * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
758 1.12 christos * that includes direction information; requested by Paolo Abeni.
759 1.12 christos */
760 1.12 christos #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201
761 1.12 christos
762 1.12 christos /*
763 1.12 christos * AX.25 packet with a 1-byte KISS header; see
764 1.12 christos *
765 1.12 christos * http://www.ax25.net/kiss.htm
766 1.12 christos *
767 1.12 christos * as per Richard Stearn <richard (at) rns-stearn.demon.co.uk>.
768 1.12 christos */
769 1.12 christos #define DLT_AX25_KISS 202
770 1.12 christos
771 1.12 christos /*
772 1.12 christos * LAPD packets from an ISDN channel, starting with the address field,
773 1.12 christos * with no pseudo-header.
774 1.12 christos * Requested by Varuna De Silva <varunax (at) gmail.com>.
775 1.12 christos */
776 1.12 christos #define DLT_LAPD 203
777 1.12 christos
778 1.12 christos /*
779 1.12 christos * Variants of various link-layer headers, with a one-byte direction
780 1.12 christos * pseudo-header prepended - zero means "received by this host",
781 1.12 christos * non-zero (any non-zero value) means "sent by this host" - as per
782 1.12 christos * Will Barker <w.barker (at) zen.co.uk>.
783 1.12 christos */
784 1.12 christos #define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
785 1.12 christos #define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */
786 1.12 christos #define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */
787 1.12 christos #define DLT_LAPB_WITH_DIR 207 /* LAPB */
788 1.12 christos
789 1.12 christos /*
790 1.12 christos * 208 is reserved for an as-yet-unspecified proprietary link-layer
791 1.12 christos * type, as requested by Will Barker.
792 1.12 christos */
793 1.12 christos
794 1.12 christos /*
795 1.12 christos * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
796 1.12 christos * <avn (at) pigeonpoint.com>.
797 1.12 christos */
798 1.12 christos #define DLT_IPMB_LINUX 209
799 1.12 christos
800 1.12 christos /*
801 1.12 christos * FlexRay automotive bus - http://www.flexray.com/ - as requested
802 1.12 christos * by Hannes Kaelber <hannes.kaelber (at) x2e.de>.
803 1.12 christos */
804 1.12 christos #define DLT_FLEXRAY 210
805 1.12 christos
806 1.12 christos /*
807 1.12 christos * Media Oriented Systems Transport (MOST) bus for multimedia
808 1.12 christos * transport - http://www.mostcooperation.com/ - as requested
809 1.12 christos * by Hannes Kaelber <hannes.kaelber (at) x2e.de>.
810 1.12 christos */
811 1.12 christos #define DLT_MOST 211
812 1.12 christos
813 1.12 christos /*
814 1.12 christos * Local Interconnect Network (LIN) bus for vehicle networks -
815 1.12 christos * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
816 1.12 christos * <hannes.kaelber (at) x2e.de>.
817 1.12 christos */
818 1.12 christos #define DLT_LIN 212
819 1.12 christos
820 1.12 christos /*
821 1.12 christos * X2E-private data link type used for serial line capture,
822 1.12 christos * as requested by Hannes Kaelber <hannes.kaelber (at) x2e.de>.
823 1.12 christos */
824 1.12 christos #define DLT_X2E_SERIAL 213
825 1.12 christos
826 1.12 christos /*
827 1.12 christos * X2E-private data link type used for the Xoraya data logger
828 1.12 christos * family, as requested by Hannes Kaelber <hannes.kaelber (at) x2e.de>.
829 1.12 christos */
830 1.12 christos #define DLT_X2E_XORAYA 214
831 1.12 christos
832 1.12 christos /*
833 1.12 christos * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
834 1.12 christos * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
835 1.12 christos * of 0 as preamble, one octet of SFD, one octet of frame length+
836 1.12 christos * reserved bit, and then the MAC-layer data, starting with the
837 1.12 christos * frame control field).
838 1.12 christos *
839 1.12 christos * Requested by Max Filippov <jcmvbkbc (at) gmail.com>.
840 1.12 christos */
841 1.12 christos #define DLT_IEEE802_15_4_NONASK_PHY 215
842 1.12 christos
843 1.13 christos /*
844 1.12 christos * David Gibson <david (at) gibson.dropbear.id.au> requested this for
845 1.12 christos * captures from the Linux kernel /dev/input/eventN devices. This
846 1.12 christos * is used to communicate keystrokes and mouse movements from the
847 1.13 christos * Linux kernel to display systems, such as Xorg.
848 1.12 christos */
849 1.12 christos #define DLT_LINUX_EVDEV 216
850 1.12 christos
851 1.12 christos /*
852 1.12 christos * GSM Um and Abis interfaces, preceded by a "gsmtap" header.
853 1.12 christos *
854 1.12 christos * Requested by Harald Welte <laforge (at) gnumonks.org>.
855 1.12 christos */
856 1.12 christos #define DLT_GSMTAP_UM 217
857 1.12 christos #define DLT_GSMTAP_ABIS 218
858 1.12 christos
859 1.12 christos /*
860 1.12 christos * MPLS, with an MPLS label as the link-layer header.
861 1.12 christos * Requested by Michele Marchetto <michele (at) openbsd.org> on behalf
862 1.12 christos * of OpenBSD.
863 1.12 christos */
864 1.12 christos #define DLT_MPLS 219
865 1.12 christos
866 1.12 christos /*
867 1.12 christos * USB packets, beginning with a Linux USB header, with the USB header
868 1.12 christos * padded to 64 bytes; required for memory-mapped access.
869 1.12 christos */
870 1.12 christos #define DLT_USB_LINUX_MMAPPED 220
871 1.12 christos
872 1.12 christos /*
873 1.12 christos * DECT packets, with a pseudo-header; requested by
874 1.12 christos * Matthias Wenzel <tcpdump (at) mazzoo.de>.
875 1.12 christos */
876 1.12 christos #define DLT_DECT 221
877 1.12 christos
878 1.12 christos /*
879 1.12 christos * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <eric.lidwa-1 (at) nasa.gov>
880 1.12 christos * Date: Mon, 11 May 2009 11:18:30 -0500
881 1.12 christos *
882 1.12 christos * DLT_AOS. We need it for AOS Space Data Link Protocol.
883 1.12 christos * I have already written dissectors for but need an OK from
884 1.12 christos * legal before I can submit a patch.
885 1.12 christos *
886 1.12 christos */
887 1.12 christos #define DLT_AOS 222
888 1.12 christos
889 1.12 christos /*
890 1.12 christos * Wireless HART (Highway Addressable Remote Transducer)
891 1.12 christos * From the HART Communication Foundation
892 1.12 christos * IES/PAS 62591
893 1.12 christos *
894 1.12 christos * Requested by Sam Roberts <vieuxtech (at) gmail.com>.
895 1.12 christos */
896 1.12 christos #define DLT_WIHART 223
897 1.12 christos
898 1.12 christos /*
899 1.12 christos * Fibre Channel FC-2 frames, beginning with a Frame_Header.
900 1.12 christos * Requested by Kahou Lei <kahou82 (at) gmail.com>.
901 1.12 christos */
902 1.12 christos #define DLT_FC_2 224
903 1.12 christos
904 1.12 christos /*
905 1.12 christos * Fibre Channel FC-2 frames, beginning with an encoding of the
906 1.12 christos * SOF, and ending with an encoding of the EOF.
907 1.12 christos *
908 1.12 christos * The encodings represent the frame delimiters as 4-byte sequences
909 1.12 christos * representing the corresponding ordered sets, with K28.5
910 1.12 christos * represented as 0xBC, and the D symbols as the corresponding
911 1.12 christos * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
912 1.12 christos * is represented as 0xBC 0xB5 0x55 0x55.
913 1.12 christos *
914 1.12 christos * Requested by Kahou Lei <kahou82 (at) gmail.com>.
915 1.12 christos */
916 1.12 christos #define DLT_FC_2_WITH_FRAME_DELIMS 225
917 1.12 christos
918 1.12 christos /*
919 1.12 christos * Solaris ipnet pseudo-header; requested by Darren Reed <Darren.Reed (at) Sun.COM>.
920 1.12 christos *
921 1.12 christos * The pseudo-header starts with a one-byte version number; for version 2,
922 1.12 christos * the pseudo-header is:
923 1.12 christos *
924 1.12 christos * struct dl_ipnetinfo {
925 1.12 christos * u_int8_t dli_version;
926 1.12 christos * u_int8_t dli_family;
927 1.12 christos * u_int16_t dli_htype;
928 1.12 christos * u_int32_t dli_pktlen;
929 1.12 christos * u_int32_t dli_ifindex;
930 1.12 christos * u_int32_t dli_grifindex;
931 1.12 christos * u_int32_t dli_zsrc;
932 1.12 christos * u_int32_t dli_zdst;
933 1.12 christos * };
934 1.12 christos *
935 1.12 christos * dli_version is 2 for the current version of the pseudo-header.
936 1.12 christos *
937 1.12 christos * dli_family is a Solaris address family value, so it's 2 for IPv4
938 1.12 christos * and 26 for IPv6.
939 1.12 christos *
940 1.12 christos * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
941 1.12 christos * packets, and 2 for packets arriving from another zone on the same
942 1.12 christos * machine.
943 1.12 christos *
944 1.12 christos * dli_pktlen is the length of the packet data following the pseudo-header
945 1.12 christos * (so the captured length minus dli_pktlen is the length of the
946 1.12 christos * pseudo-header, assuming the entire pseudo-header was captured).
947 1.12 christos *
948 1.12 christos * dli_ifindex is the interface index of the interface on which the
949 1.12 christos * packet arrived.
950 1.12 christos *
951 1.12 christos * dli_grifindex is the group interface index number (for IPMP interfaces).
952 1.12 christos *
953 1.12 christos * dli_zsrc is the zone identifier for the source of the packet.
954 1.12 christos *
955 1.12 christos * dli_zdst is the zone identifier for the destination of the packet.
956 1.12 christos *
957 1.12 christos * A zone number of 0 is the global zone; a zone number of 0xffffffff
958 1.12 christos * means that the packet arrived from another host on the network, not
959 1.12 christos * from another zone on the same machine.
960 1.12 christos *
961 1.12 christos * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
962 1.12 christos * which of those it is.
963 1.12 christos */
964 1.13 christos #define DLT_IPNET 226
965 1.12 christos
966 1.12 christos /*
967 1.12 christos * CAN (Controller Area Network) frames, with a pseudo-header as supplied
968 1.12 christos * by Linux SocketCAN. See Documentation/networking/can.txt in the Linux
969 1.12 christos * source.
970 1.12 christos *
971 1.12 christos * Requested by Felix Obenhuber <felix (at) obenhuber.de>.
972 1.12 christos */
973 1.13 christos #define DLT_CAN_SOCKETCAN 227
974 1.12 christos
975 1.12 christos /*
976 1.12 christos * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
977 1.12 christos * whether it's v4 or v6. Requested by Darren Reed <Darren.Reed (at) Sun.COM>.
978 1.12 christos */
979 1.13 christos #define DLT_IPV4 228
980 1.13 christos #define DLT_IPV6 229
981 1.13 christos
982 1.13 christos /*
983 1.13 christos * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
984 1.13 christos * nothing), and with no FCS at the end of the frame; requested by
985 1.13 christos * Jon Smirl <jonsmirl (at) gmail.com>.
986 1.13 christos */
987 1.13 christos #define DLT_IEEE802_15_4_NOFCS 230
988 1.13 christos
989 1.13 christos /*
990 1.13 christos * Raw D-Bus:
991 1.13 christos *
992 1.13 christos * http://www.freedesktop.org/wiki/Software/dbus
993 1.13 christos *
994 1.13 christos * messages:
995 1.13 christos *
996 1.13 christos * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
997 1.13 christos *
998 1.13 christos * starting with the endianness flag, followed by the message type, etc.,
999 1.13 christos * but without the authentication handshake before the message sequence:
1000 1.13 christos *
1001 1.13 christos * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
1002 1.13 christos *
1003 1.13 christos * Requested by Martin Vidner <martin (at) vidner.net>.
1004 1.13 christos */
1005 1.13 christos #define DLT_DBUS 231
1006 1.13 christos
1007 1.13 christos /*
1008 1.13 christos * Juniper-private data link type, as per request from
1009 1.13 christos * Hannes Gredler <hannes (at) juniper.net>.
1010 1.13 christos */
1011 1.13 christos #define DLT_JUNIPER_VS 232
1012 1.13 christos #define DLT_JUNIPER_SRX_E2E 233
1013 1.13 christos #define DLT_JUNIPER_FIBRECHANNEL 234
1014 1.13 christos
1015 1.13 christos /*
1016 1.13 christos * DVB-CI (DVB Common Interface for communication between a PC Card
1017 1.13 christos * module and a DVB receiver). See
1018 1.13 christos *
1019 1.13 christos * http://www.kaiser.cx/pcap-dvbci.html
1020 1.13 christos *
1021 1.13 christos * for the specification.
1022 1.13 christos *
1023 1.13 christos * Requested by Martin Kaiser <martin (at) kaiser.cx>.
1024 1.13 christos */
1025 1.13 christos #define DLT_DVB_CI 235
1026 1.13 christos
1027 1.13 christos /*
1028 1.13 christos * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but
1029 1.13 christos * *not* the same as, 27.010). Requested by Hans-Christoph Schemmel
1030 1.13 christos * <hans-christoph.schemmel (at) cinterion.com>.
1031 1.13 christos */
1032 1.13 christos #define DLT_MUX27010 236
1033 1.13 christos
1034 1.13 christos /*
1035 1.13 christos * STANAG 5066 D_PDUs. Requested by M. Baris Demiray
1036 1.13 christos * <barisdemiray (at) gmail.com>.
1037 1.13 christos */
1038 1.13 christos #define DLT_STANAG_5066_D_PDU 237
1039 1.13 christos
1040 1.13 christos /*
1041 1.13 christos * Juniper-private data link type, as per request from
1042 1.13 christos * Hannes Gredler <hannes (at) juniper.net>.
1043 1.13 christos */
1044 1.13 christos #define DLT_JUNIPER_ATM_CEMIC 238
1045 1.13 christos
1046 1.13 christos /*
1047 1.13 christos * NetFilter LOG messages
1048 1.13 christos * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets)
1049 1.13 christos *
1050 1.13 christos * Requested by Jakub Zawadzki <darkjames-ws (at) darkjames.pl>
1051 1.13 christos */
1052 1.13 christos #define DLT_NFLOG 239
1053 1.13 christos
1054 1.13 christos /*
1055 1.13 christos * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1056 1.13 christos * for Ethernet packets with a 4-byte pseudo-header and always
1057 1.13 christos * with the payload including the FCS, as supplied by their
1058 1.13 christos * netANALYZER hardware and software.
1059 1.13 christos *
1060 1.13 christos * Requested by Holger P. Frommer <HPfrommer (at) hilscher.com>
1061 1.13 christos */
1062 1.13 christos #define DLT_NETANALYZER 240
1063 1.13 christos
1064 1.13 christos /*
1065 1.13 christos * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
1066 1.13 christos * for Ethernet packets with a 4-byte pseudo-header and FCS and
1067 1.13 christos * with the Ethernet header preceded by 7 bytes of preamble and
1068 1.13 christos * 1 byte of SFD, as supplied by their netANALYZER hardware and
1069 1.13 christos * software.
1070 1.13 christos *
1071 1.13 christos * Requested by Holger P. Frommer <HPfrommer (at) hilscher.com>
1072 1.13 christos */
1073 1.13 christos #define DLT_NETANALYZER_TRANSPARENT 241
1074 1.13 christos
1075 1.13 christos /*
1076 1.13 christos * IP-over-Infiniband, as specified by RFC 4391.
1077 1.13 christos *
1078 1.13 christos * Requested by Petr Sumbera <petr.sumbera (at) oracle.com>.
1079 1.13 christos */
1080 1.13 christos #define DLT_IPOIB 242
1081 1.13 christos
1082 1.13 christos /*
1083 1.13 christos * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
1084 1.13 christos *
1085 1.13 christos * Requested by Guy Martin <gmsoft (at) tuxicoman.be>.
1086 1.13 christos */
1087 1.13 christos #define DLT_MPEG_2_TS 243
1088 1.13 christos
1089 1.13 christos /*
1090 1.13 christos * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
1091 1.13 christos * used by their ng40 protocol tester.
1092 1.13 christos *
1093 1.13 christos * Requested by Jens Grimmer <jens.grimmer (at) ng4t.com>.
1094 1.13 christos */
1095 1.13 christos #define DLT_NG40 244
1096 1.13 christos
1097 1.13 christos /*
1098 1.13 christos * Pseudo-header giving adapter number and flags, followed by an NFC
1099 1.13 christos * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
1100 1.13 christos * as specified by NFC Forum Logical Link Control Protocol Technical
1101 1.13 christos * Specification LLCP 1.1.
1102 1.13 christos *
1103 1.13 christos * Requested by Mike Wakerly <mikey (at) google.com>.
1104 1.13 christos */
1105 1.13 christos #define DLT_NFC_LLCP 245
1106 1.13 christos
1107 1.13 christos /*
1108 1.13 christos * 245 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
1109 1.13 christos *
1110 1.13 christos * DLT_PFSYNC has different values on different platforms, and all of
1111 1.13 christos * them collide with something used elsewhere. On platforms that
1112 1.13 christos * don't already define it, define it as 245.
1113 1.13 christos */
1114 1.13 christos #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
1115 1.13 christos #define DLT_PFSYNC 246
1116 1.13 christos #endif
1117 1.13 christos
1118 1.13 christos #define DLT_MATCHING_MAX 246 /* highest value in the "matching" range */
1119 1.12 christos
1120 1.12 christos /*
1121 1.13 christos * DLT and savefile link type values are split into a class and
1122 1.13 christos * a member of that class. A class value of 0 indicates a regular
1123 1.13 christos * DLT_/LINKTYPE_ value.
1124 1.13 christos */
1125 1.13 christos #define DLT_CLASS(x) ((x) & 0x03ff0000)
1126 1.13 christos
1127 1.13 christos /*
1128 1.13 christos * NetBSD-specific generic "raw" link type. The class value indicates
1129 1.13 christos * that this is the generic raw type, and the lower 16 bits are the
1130 1.13 christos * address family we're dealing with. Those values are NetBSD-specific;
1131 1.13 christos * do not assume that they correspond to AF_ values for your operating
1132 1.13 christos * system.
1133 1.13 christos */
1134 1.13 christos #define DLT_CLASS_NETBSD_RAWAF 0x02240000
1135 1.13 christos #define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af))
1136 1.13 christos #define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff)
1137 1.13 christos #define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
1138 1.1 thorpej
1139 1.10 elad #endif /* !_NET_DLT_H_ */
1140