Deleted Added
full compact
print-ether.c (172686) print-ether.c (190207)
1/*
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

--- 4 unchanged lines hidden (view full) ---

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 *
1/*
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

--- 4 unchanged lines hidden (view full) ---

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 *
21 * $FreeBSD: head/contrib/tcpdump/print-ether.c 172686 2007-10-16 02:31:48Z mlaier $
21 * $FreeBSD: head/contrib/tcpdump/print-ether.c 190207 2009-03-21 18:30:25Z rpaulo $
22 */
23#ifndef lint
24static const char rcsid[] _U_ =
22 */
23#ifndef lint
24static const char rcsid[] _U_ =
25 "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.95.2.6 2006/02/20 18:15:03 hannes Exp $ (LBL)";
25 "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.105.2.1 2008-02-06 10:49:22 guy Exp $ (LBL)";
26#endif
27
28#ifdef HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <tcpdump-stdinc.h>
33

--- 28 unchanged lines hidden (view full) ---

62 { ETHERTYPE_DECDNS, "DEC DNS" },
63 { ETHERTYPE_DECDTS, "DEC DTS" },
64 { ETHERTYPE_VEXP, "VEXP" },
65 { ETHERTYPE_VPROD, "VPROD" },
66 { ETHERTYPE_ATALK, "Appletalk" },
67 { ETHERTYPE_AARP, "Appletalk ARP" },
68 { ETHERTYPE_IPX, "IPX" },
69 { ETHERTYPE_PPP, "PPP" },
26#endif
27
28#ifdef HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <tcpdump-stdinc.h>
33

--- 28 unchanged lines hidden (view full) ---

62 { ETHERTYPE_DECDNS, "DEC DNS" },
63 { ETHERTYPE_DECDTS, "DEC DTS" },
64 { ETHERTYPE_VEXP, "VEXP" },
65 { ETHERTYPE_VPROD, "VPROD" },
66 { ETHERTYPE_ATALK, "Appletalk" },
67 { ETHERTYPE_AARP, "Appletalk ARP" },
68 { ETHERTYPE_IPX, "IPX" },
69 { ETHERTYPE_PPP, "PPP" },
70 { ETHERTYPE_MPCP, "MPCP" },
70 { ETHERTYPE_SLOW, "Slow Protocols" },
71 { ETHERTYPE_PPPOED, "PPPoE D" },
72 { ETHERTYPE_PPPOES, "PPPoE S" },
73 { ETHERTYPE_EAPOL, "EAPOL" },
71 { ETHERTYPE_SLOW, "Slow Protocols" },
72 { ETHERTYPE_PPPOED, "PPPoE D" },
73 { ETHERTYPE_PPPOES, "PPPoE S" },
74 { ETHERTYPE_EAPOL, "EAPOL" },
75 { ETHERTYPE_RRCP, "RRCP" },
74 { ETHERTYPE_JUMBO, "Jumbo" },
75 { ETHERTYPE_LOOPBACK, "Loopback" },
76 { ETHERTYPE_ISO, "OSI" },
77 { ETHERTYPE_GRE_ISO, "GRE-OSI" },
76 { ETHERTYPE_JUMBO, "Jumbo" },
77 { ETHERTYPE_LOOPBACK, "Loopback" },
78 { ETHERTYPE_ISO, "OSI" },
79 { ETHERTYPE_GRE_ISO, "GRE-OSI" },
80 { ETHERTYPE_CFM_OLD, "CFM (old)" },
81 { ETHERTYPE_CFM, "CFM" },
82 { ETHERTYPE_LLDP, "LLDP" },
78 { 0, NULL}
79};
80
81static inline void
82ether_hdr_print(register const u_char *bp, u_int length)
83{
84 register const struct ether_header *ep;
85 ep = (const struct ether_header *)bp;

--- 204 unchanged lines hidden (view full) ---

290 case ETHERTYPE_PPPOES2:
291 pppoe_print(p, length);
292 return (1);
293
294 case ETHERTYPE_EAPOL:
295 eap_print(gndo, p, length);
296 return (1);
297
83 { 0, NULL}
84};
85
86static inline void
87ether_hdr_print(register const u_char *bp, u_int length)
88{
89 register const struct ether_header *ep;
90 ep = (const struct ether_header *)bp;

--- 204 unchanged lines hidden (view full) ---

295 case ETHERTYPE_PPPOES2:
296 pppoe_print(p, length);
297 return (1);
298
299 case ETHERTYPE_EAPOL:
300 eap_print(gndo, p, length);
301 return (1);
302
303 case ETHERTYPE_RRCP:
304 rrcp_print(gndo, p - 14 , length + 14);
305 return (1);
306
298 case ETHERTYPE_PPP:
299 if (length) {
300 printf(": ");
301 ppp_print(p, length);
302 }
303 return (1);
304
307 case ETHERTYPE_PPP:
308 if (length) {
309 printf(": ");
310 ppp_print(p, length);
311 }
312 return (1);
313
314 case ETHERTYPE_MPCP:
315 mpcp_print(p, length);
316 return (1);
317
305 case ETHERTYPE_SLOW:
306 slow_print(p, length);
307 return (1);
308
318 case ETHERTYPE_SLOW:
319 slow_print(p, length);
320 return (1);
321
322 case ETHERTYPE_CFM:
323 case ETHERTYPE_CFM_OLD:
324 cfm_print(p, length);
325 return (1);
326
327 case ETHERTYPE_LLDP:
328 lldp_print(p, length);
329 return (1);
330
309 case ETHERTYPE_LOOPBACK:
310 return (1);
311
312 case ETHERTYPE_MPLS:
313 case ETHERTYPE_MPLS_MULTI:
314 mpls_print(p, length);
315 return (1);
316

--- 18 unchanged lines hidden ---
331 case ETHERTYPE_LOOPBACK:
332 return (1);
333
334 case ETHERTYPE_MPLS:
335 case ETHERTYPE_MPLS_MULTI:
336 mpls_print(p, length);
337 return (1);
338

--- 18 unchanged lines hidden ---