blob: e57d993b965e846ffc5670d470d198a08ce8e604 [file] [log] [blame]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001/*
2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 */
The Android Open Source Project2949f582009-03-03 19:30:46 -080021
JP Abgrall53f17a92014-02-12 14:02:41 -080022#define NETDISSECT_REWORKED
The Android Open Source Project2949f582009-03-03 19:30:46 -080023#ifdef HAVE_CONFIG_H
24#include "config.h"
25#endif
26
27#include <tcpdump-stdinc.h>
28
The Android Open Source Project2949f582009-03-03 19:30:46 -080029#include "interface.h"
JP Abgrall53f17a92014-02-12 14:02:41 -080030#include "extract.h"
The Android Open Source Project2949f582009-03-03 19:30:46 -080031#include "addrtoname.h"
32#include "ethertype.h"
The Android Open Source Project2949f582009-03-03 19:30:46 -080033#include "ether.h"
34
Elliott Hughes892a68b2015-10-19 14:43:53 -070035const struct tok ethertype_values[] = {
The Android Open Source Project2949f582009-03-03 19:30:46 -080036 { ETHERTYPE_IP, "IPv4" },
37 { ETHERTYPE_MPLS, "MPLS unicast" },
38 { ETHERTYPE_MPLS_MULTI, "MPLS multicast" },
39 { ETHERTYPE_IPV6, "IPv6" },
40 { ETHERTYPE_8021Q, "802.1Q" },
JP Abgrall53f17a92014-02-12 14:02:41 -080041 { ETHERTYPE_8021Q9100, "802.1Q-9100" },
42 { ETHERTYPE_8021QinQ, "802.1Q-QinQ" },
43 { ETHERTYPE_8021Q9200, "802.1Q-9200" },
The Android Open Source Project2949f582009-03-03 19:30:46 -080044 { ETHERTYPE_VMAN, "VMAN" },
45 { ETHERTYPE_PUP, "PUP" },
46 { ETHERTYPE_ARP, "ARP"},
47 { ETHERTYPE_REVARP, "Reverse ARP"},
48 { ETHERTYPE_NS, "NS" },
49 { ETHERTYPE_SPRITE, "Sprite" },
50 { ETHERTYPE_TRAIL, "Trail" },
51 { ETHERTYPE_MOPDL, "MOP DL" },
52 { ETHERTYPE_MOPRC, "MOP RC" },
53 { ETHERTYPE_DN, "DN" },
54 { ETHERTYPE_LAT, "LAT" },
55 { ETHERTYPE_SCA, "SCA" },
JP Abgrall53f17a92014-02-12 14:02:41 -080056 { ETHERTYPE_TEB, "TEB" },
The Android Open Source Project2949f582009-03-03 19:30:46 -080057 { ETHERTYPE_LANBRIDGE, "Lanbridge" },
58 { ETHERTYPE_DECDNS, "DEC DNS" },
59 { ETHERTYPE_DECDTS, "DEC DTS" },
60 { ETHERTYPE_VEXP, "VEXP" },
61 { ETHERTYPE_VPROD, "VPROD" },
62 { ETHERTYPE_ATALK, "Appletalk" },
63 { ETHERTYPE_AARP, "Appletalk ARP" },
64 { ETHERTYPE_IPX, "IPX" },
65 { ETHERTYPE_PPP, "PPP" },
JP Abgrall53f17a92014-02-12 14:02:41 -080066 { ETHERTYPE_MPCP, "MPCP" },
The Android Open Source Project2949f582009-03-03 19:30:46 -080067 { ETHERTYPE_SLOW, "Slow Protocols" },
68 { ETHERTYPE_PPPOED, "PPPoE D" },
69 { ETHERTYPE_PPPOES, "PPPoE S" },
70 { ETHERTYPE_EAPOL, "EAPOL" },
JP Abgrall53f17a92014-02-12 14:02:41 -080071 { ETHERTYPE_RRCP, "RRCP" },
72 { ETHERTYPE_MS_NLB_HB, "MS NLB heartbeat" },
The Android Open Source Project2949f582009-03-03 19:30:46 -080073 { ETHERTYPE_JUMBO, "Jumbo" },
74 { ETHERTYPE_LOOPBACK, "Loopback" },
75 { ETHERTYPE_ISO, "OSI" },
76 { ETHERTYPE_GRE_ISO, "GRE-OSI" },
JP Abgrall53f17a92014-02-12 14:02:41 -080077 { ETHERTYPE_CFM_OLD, "CFM (old)" },
78 { ETHERTYPE_CFM, "CFM" },
Elliott Hughes892a68b2015-10-19 14:43:53 -070079 { ETHERTYPE_IEEE1905_1, "IEEE1905.1" },
JP Abgrall53f17a92014-02-12 14:02:41 -080080 { ETHERTYPE_LLDP, "LLDP" },
Elliott Hughes892a68b2015-10-19 14:43:53 -070081 { ETHERTYPE_TIPC, "TIPC"},
JP Abgrall53f17a92014-02-12 14:02:41 -080082 { ETHERTYPE_GEONET_OLD, "GeoNet (old)"},
83 { ETHERTYPE_GEONET, "GeoNet"},
84 { ETHERTYPE_CALM_FAST, "CALM FAST"},
Elliott Hughes892a68b2015-10-19 14:43:53 -070085 { ETHERTYPE_AOE, "AoE" },
The Android Open Source Project2949f582009-03-03 19:30:46 -080086 { 0, NULL}
87};
88
89static inline void
JP Abgrall53f17a92014-02-12 14:02:41 -080090ether_hdr_print(netdissect_options *ndo,
91 const u_char *bp, u_int length)
The Android Open Source Project2949f582009-03-03 19:30:46 -080092{
93 register const struct ether_header *ep;
Elliott Hughes892a68b2015-10-19 14:43:53 -070094 uint16_t ether_type;
JP Abgrall53f17a92014-02-12 14:02:41 -080095
The Android Open Source Project2949f582009-03-03 19:30:46 -080096 ep = (const struct ether_header *)bp;
97
Elliott Hughes892a68b2015-10-19 14:43:53 -070098 ND_PRINT((ndo, "%s > %s",
99 etheraddr_string(ndo, ESRC(ep)),
100 etheraddr_string(ndo, EDST(ep))));
The Android Open Source Project2949f582009-03-03 19:30:46 -0800101
JP Abgrall53f17a92014-02-12 14:02:41 -0800102 ether_type = EXTRACT_16BITS(&ep->ether_type);
103 if (!ndo->ndo_qflag) {
104 if (ether_type <= ETHERMTU)
Elliott Hughes892a68b2015-10-19 14:43:53 -0700105 ND_PRINT((ndo, ", 802.3"));
106 else
107 ND_PRINT((ndo, ", ethertype %s (0x%04x)",
JP Abgrall53f17a92014-02-12 14:02:41 -0800108 tok2str(ethertype_values,"Unknown", ether_type),
109 ether_type));
The Android Open Source Project2949f582009-03-03 19:30:46 -0800110 } else {
JP Abgrall53f17a92014-02-12 14:02:41 -0800111 if (ether_type <= ETHERMTU)
Elliott Hughes892a68b2015-10-19 14:43:53 -0700112 ND_PRINT((ndo, ", 802.3"));
113 else
114 ND_PRINT((ndo, ", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ether_type)));
The Android Open Source Project2949f582009-03-03 19:30:46 -0800115 }
116
Elliott Hughes892a68b2015-10-19 14:43:53 -0700117 ND_PRINT((ndo, ", length %u: ", length));
The Android Open Source Project2949f582009-03-03 19:30:46 -0800118}
119
JP Abgrall53f17a92014-02-12 14:02:41 -0800120/*
121 * Print an Ethernet frame.
122 * This might be encapsulated within another frame; we might be passed
123 * a pointer to a function that can print header information for that
124 * frame's protocol, and an argument to pass to that function.
125 */
The Android Open Source Project2949f582009-03-03 19:30:46 -0800126void
JP Abgrall53f17a92014-02-12 14:02:41 -0800127ether_print(netdissect_options *ndo,
128 const u_char *p, u_int length, u_int caplen,
129 void (*print_encap_header)(netdissect_options *ndo, const u_char *), const u_char *encap_header_arg)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800130{
131 struct ether_header *ep;
JP Abgrall53f17a92014-02-12 14:02:41 -0800132 u_int orig_length;
The Android Open Source Project2949f582009-03-03 19:30:46 -0800133 u_short ether_type;
134 u_short extracted_ether_type;
135
JP Abgrall53f17a92014-02-12 14:02:41 -0800136 if (caplen < ETHER_HDRLEN || length < ETHER_HDRLEN) {
137 ND_PRINT((ndo, "[|ether]"));
The Android Open Source Project2949f582009-03-03 19:30:46 -0800138 return;
139 }
140
JP Abgrall53f17a92014-02-12 14:02:41 -0800141 if (ndo->ndo_eflag) {
142 if (print_encap_header != NULL)
143 (*print_encap_header)(ndo, encap_header_arg);
144 ether_hdr_print(ndo, p, length);
145 }
146 orig_length = length;
The Android Open Source Project2949f582009-03-03 19:30:46 -0800147
148 length -= ETHER_HDRLEN;
149 caplen -= ETHER_HDRLEN;
150 ep = (struct ether_header *)p;
151 p += ETHER_HDRLEN;
152
JP Abgrall53f17a92014-02-12 14:02:41 -0800153 ether_type = EXTRACT_16BITS(&ep->ether_type);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800154
JP Abgrall53f17a92014-02-12 14:02:41 -0800155recurse:
The Android Open Source Project2949f582009-03-03 19:30:46 -0800156 /*
157 * Is it (gag) an 802.3 encapsulation?
158 */
159 if (ether_type <= ETHERMTU) {
160 /* Try to print the LLC-layer header & higher layers */
Elliott Hughes892a68b2015-10-19 14:43:53 -0700161 if (llc_print(ndo, p, length, caplen, ESRC(ep), EDST(ep),
The Android Open Source Project2949f582009-03-03 19:30:46 -0800162 &extracted_ether_type) == 0) {
163 /* ether_type not known, print raw packet */
JP Abgrall53f17a92014-02-12 14:02:41 -0800164 if (!ndo->ndo_eflag) {
165 if (print_encap_header != NULL)
166 (*print_encap_header)(ndo, encap_header_arg);
167 ether_hdr_print(ndo, (u_char *)ep, orig_length);
168 }
The Android Open Source Project2949f582009-03-03 19:30:46 -0800169
JP Abgrall53f17a92014-02-12 14:02:41 -0800170 if (!ndo->ndo_suppress_default_print)
Elliott Hughes892a68b2015-10-19 14:43:53 -0700171 ND_DEFAULTPRINT(p, caplen);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800172 }
JP Abgrall53f17a92014-02-12 14:02:41 -0800173 } else if (ether_type == ETHERTYPE_8021Q ||
174 ether_type == ETHERTYPE_8021Q9100 ||
175 ether_type == ETHERTYPE_8021Q9200 ||
176 ether_type == ETHERTYPE_8021QinQ) {
177 /*
178 * Print VLAN information, and then go back and process
179 * the enclosed type field.
180 */
181 if (caplen < 4 || length < 4) {
182 ND_PRINT((ndo, "[|vlan]"));
183 return;
184 }
185 if (ndo->ndo_eflag) {
Elliott Hughes892a68b2015-10-19 14:43:53 -0700186 uint16_t tag = EXTRACT_16BITS(p);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800187
Elliott Hughes892a68b2015-10-19 14:43:53 -0700188 ND_PRINT((ndo, "%s, ", ieee8021q_tci_string(tag)));
JP Abgrall53f17a92014-02-12 14:02:41 -0800189 }
190
191 ether_type = EXTRACT_16BITS(p + 2);
192 if (ndo->ndo_eflag && ether_type > ETHERMTU)
193 ND_PRINT((ndo, "ethertype %s, ", tok2str(ethertype_values,"0x%04x", ether_type)));
194 p += 4;
195 length -= 4;
196 caplen -= 4;
197 goto recurse;
198 } else if (ether_type == ETHERTYPE_JUMBO) {
199 /*
200 * Alteon jumbo frames.
201 * See
202 *
203 * http://tools.ietf.org/html/draft-ietf-isis-ext-eth-01
204 *
205 * which indicates that, following the type field,
206 * there's an LLC header and payload.
207 */
208 /* Try to print the LLC-layer header & higher layers */
Elliott Hughes892a68b2015-10-19 14:43:53 -0700209 if (llc_print(ndo, p, length, caplen, ESRC(ep), EDST(ep),
JP Abgrall53f17a92014-02-12 14:02:41 -0800210 &extracted_ether_type) == 0) {
211 /* ether_type not known, print raw packet */
212 if (!ndo->ndo_eflag) {
213 if (print_encap_header != NULL)
214 (*print_encap_header)(ndo, encap_header_arg);
215 ether_hdr_print(ndo, (u_char *)ep, orig_length);
216 }
217
218 if (!ndo->ndo_suppress_default_print)
Elliott Hughes892a68b2015-10-19 14:43:53 -0700219 ND_DEFAULTPRINT(p, caplen);
JP Abgrall53f17a92014-02-12 14:02:41 -0800220 }
221 } else {
222 if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
223 /* ether_type not known, print raw packet */
224 if (!ndo->ndo_eflag) {
225 if (print_encap_header != NULL)
226 (*print_encap_header)(ndo, encap_header_arg);
227 ether_hdr_print(ndo, (u_char *)ep, orig_length);
228 }
229
230 if (!ndo->ndo_suppress_default_print)
Elliott Hughes892a68b2015-10-19 14:43:53 -0700231 ND_DEFAULTPRINT(p, caplen);
JP Abgrall53f17a92014-02-12 14:02:41 -0800232 }
233 }
The Android Open Source Project2949f582009-03-03 19:30:46 -0800234}
235
236/*
237 * This is the top level routine of the printer. 'p' points
238 * to the ether header of the packet, 'h->ts' is the timestamp,
239 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
240 * is the number of bytes actually captured.
241 */
242u_int
JP Abgrall53f17a92014-02-12 14:02:41 -0800243ether_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
244 const u_char *p)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800245{
JP Abgrall53f17a92014-02-12 14:02:41 -0800246 ether_print(ndo, p, h->len, h->caplen, NULL, NULL);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800247
248 return (ETHER_HDRLEN);
249}
250
251/*
JP Abgrall53f17a92014-02-12 14:02:41 -0800252 * This is the top level routine of the printer. 'p' points
253 * to the ether header of the packet, 'h->ts' is the timestamp,
254 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
255 * is the number of bytes actually captured.
256 *
257 * This is for DLT_NETANALYZER, which has a 4-byte pseudo-header
258 * before the Ethernet header.
259 */
260u_int
261netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
262 const u_char *p)
263{
264 /*
265 * Fail if we don't have enough data for the Hilscher pseudo-header.
266 */
267 if (h->len < 4 || h->caplen < 4) {
Elliott Hughes892a68b2015-10-19 14:43:53 -0700268 ND_PRINT((ndo, "[|netanalyzer]"));
JP Abgrall53f17a92014-02-12 14:02:41 -0800269 return (h->caplen);
270 }
271
272 /* Skip the pseudo-header. */
273 ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL);
274
275 return (4 + ETHER_HDRLEN);
276}
277
278/*
279 * This is the top level routine of the printer. 'p' points
280 * to the ether header of the packet, 'h->ts' is the timestamp,
281 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
282 * is the number of bytes actually captured.
283 *
284 * This is for DLT_NETANALYZER_TRANSPARENT, which has a 4-byte
285 * pseudo-header, a 7-byte Ethernet preamble, and a 1-byte Ethernet SOF
286 * before the Ethernet header.
287 */
288u_int
289netanalyzer_transparent_if_print(netdissect_options *ndo,
290 const struct pcap_pkthdr *h,
291 const u_char *p)
292{
293 /*
294 * Fail if we don't have enough data for the Hilscher pseudo-header,
295 * preamble, and SOF.
296 */
297 if (h->len < 12 || h->caplen < 12) {
Elliott Hughes892a68b2015-10-19 14:43:53 -0700298 ND_PRINT((ndo, "[|netanalyzer-transparent]"));
JP Abgrall53f17a92014-02-12 14:02:41 -0800299 return (h->caplen);
300 }
301
302 /* Skip the pseudo-header, preamble, and SOF. */
303 ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL);
304
305 return (12 + ETHER_HDRLEN);
306}
307
308/*
309 * Prints the packet payload, given an Ethernet type code for the payload's
310 * protocol.
The Android Open Source Project2949f582009-03-03 19:30:46 -0800311 *
312 * Returns non-zero if it can do so, zero if the ethertype is unknown.
The Android Open Source Project2949f582009-03-03 19:30:46 -0800313 */
314
315int
JP Abgrall53f17a92014-02-12 14:02:41 -0800316ethertype_print(netdissect_options *ndo,
317 u_short ether_type, const u_char *p,
318 u_int length, u_int caplen)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800319{
The Android Open Source Project2949f582009-03-03 19:30:46 -0800320 switch (ether_type) {
321
322 case ETHERTYPE_IP:
JP Abgrall53f17a92014-02-12 14:02:41 -0800323 ip_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800324 return (1);
325
The Android Open Source Project2949f582009-03-03 19:30:46 -0800326 case ETHERTYPE_IPV6:
JP Abgrall53f17a92014-02-12 14:02:41 -0800327 ip6_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800328 return (1);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800329
330 case ETHERTYPE_ARP:
331 case ETHERTYPE_REVARP:
JP Abgrall53f17a92014-02-12 14:02:41 -0800332 arp_print(ndo, p, length, caplen);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800333 return (1);
334
335 case ETHERTYPE_DN:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700336 decnet_print(ndo, p, length, caplen);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800337 return (1);
338
339 case ETHERTYPE_ATALK:
JP Abgrall53f17a92014-02-12 14:02:41 -0800340 if (ndo->ndo_vflag)
Elliott Hughes892a68b2015-10-19 14:43:53 -0700341 ND_PRINT((ndo, "et1 "));
342 atalk_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800343 return (1);
344
345 case ETHERTYPE_AARP:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700346 aarp_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800347 return (1);
348
349 case ETHERTYPE_IPX:
JP Abgrall53f17a92014-02-12 14:02:41 -0800350 ND_PRINT((ndo, "(NOV-ETHII) "));
Elliott Hughes892a68b2015-10-19 14:43:53 -0700351 ipx_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800352 return (1);
353
Elliott Hughes892a68b2015-10-19 14:43:53 -0700354 case ETHERTYPE_ISO:
355 isoclns_print(ndo, p + 1, length - 1, length - 1);
356 return(1);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800357
358 case ETHERTYPE_PPPOED:
359 case ETHERTYPE_PPPOES:
JP Abgrall53f17a92014-02-12 14:02:41 -0800360 case ETHERTYPE_PPPOED2:
361 case ETHERTYPE_PPPOES2:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700362 pppoe_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800363 return (1);
364
365 case ETHERTYPE_EAPOL:
JP Abgrall53f17a92014-02-12 14:02:41 -0800366 eap_print(ndo, p, length);
367 return (1);
368
369 case ETHERTYPE_RRCP:
370 rrcp_print(ndo, p - 14 , length + 14);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800371 return (1);
372
373 case ETHERTYPE_PPP:
374 if (length) {
Elliott Hughes892a68b2015-10-19 14:43:53 -0700375 ND_PRINT((ndo, ": "));
376 ppp_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800377 }
378 return (1);
379
JP Abgrall53f17a92014-02-12 14:02:41 -0800380 case ETHERTYPE_MPCP:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700381 mpcp_print(ndo, p, length);
JP Abgrall53f17a92014-02-12 14:02:41 -0800382 return (1);
383
The Android Open Source Project2949f582009-03-03 19:30:46 -0800384 case ETHERTYPE_SLOW:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700385 slow_print(ndo, p, length);
JP Abgrall53f17a92014-02-12 14:02:41 -0800386 return (1);
387
388 case ETHERTYPE_CFM:
389 case ETHERTYPE_CFM_OLD:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700390 cfm_print(ndo, p, length);
JP Abgrall53f17a92014-02-12 14:02:41 -0800391 return (1);
392
393 case ETHERTYPE_LLDP:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700394 lldp_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800395 return (1);
396
397 case ETHERTYPE_LOOPBACK:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700398 loopback_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800399 return (1);
400
401 case ETHERTYPE_MPLS:
402 case ETHERTYPE_MPLS_MULTI:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700403 mpls_print(ndo, p, length);
The Android Open Source Project2949f582009-03-03 19:30:46 -0800404 return (1);
405
JP Abgrall53f17a92014-02-12 14:02:41 -0800406 case ETHERTYPE_TIPC:
407 tipc_print(ndo, p, length, caplen);
408 return (1);
409
410 case ETHERTYPE_MS_NLB_HB:
411 msnlb_print(ndo, p);
412 return (1);
413
414 case ETHERTYPE_GEONET_OLD:
415 case ETHERTYPE_GEONET:
416 geonet_print(ndo, p-14, p, length);
417 return (1);
418
419 case ETHERTYPE_CALM_FAST:
420 calm_fast_print(ndo, p-14, p, length);
421 return (1);
422
Elliott Hughes892a68b2015-10-19 14:43:53 -0700423 case ETHERTYPE_AOE:
424 aoe_print(ndo, p, length);
425 return (1);
426
The Android Open Source Project2949f582009-03-03 19:30:46 -0800427 case ETHERTYPE_LAT:
428 case ETHERTYPE_SCA:
429 case ETHERTYPE_MOPRC:
430 case ETHERTYPE_MOPDL:
Elliott Hughes892a68b2015-10-19 14:43:53 -0700431 case ETHERTYPE_IEEE1905_1:
The Android Open Source Project2949f582009-03-03 19:30:46 -0800432 /* default_print for now */
433 default:
434 return (0);
435 }
436}
437
438
439/*
440 * Local Variables:
441 * c-style: whitesmith
442 * c-basic-offset: 8
443 * End:
444 */
445