print-llc.c (172686) | print-llc.c (190207) |
---|---|
1/* 2 * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997 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 --- 7 unchanged lines hidden (view full) --- 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 * Code by Matt Thomas, Digital Equipment Corporation 22 * with an awful lot of hacking by Jeffrey Mogul, DECWRL 23 * | 1/* 2 * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997 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 --- 7 unchanged lines hidden (view full) --- 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 * Code by Matt Thomas, Digital Equipment Corporation 22 * with an awful lot of hacking by Jeffrey Mogul, DECWRL 23 * |
24 * $FreeBSD: head/contrib/tcpdump/print-llc.c 172686 2007-10-16 02:31:48Z mlaier $ | 24 * $FreeBSD: head/contrib/tcpdump/print-llc.c 190207 2009-03-21 18:30:25Z rpaulo $ |
25 */ 26 27#ifndef lint 28static const char rcsid[] _U_ = | 25 */ 26 27#ifndef lint 28static const char rcsid[] _U_ = |
29 "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.61.2.10 2007/02/08 07:07:51 guy Exp $"; | 29 "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.75 2007-04-13 09:43:11 hannes Exp $"; |
30#endif 31 32#ifdef HAVE_CONFIG_H 33#include "config.h" 34#endif 35 36#include <tcpdump-stdinc.h> 37 --- 64 unchanged lines hidden (view full) --- 102 { 0, NULL } 103}; 104 105 106static const struct tok cisco_values[] = { 107 { PID_CISCO_CDP, "CDP" }, 108 { PID_CISCO_VTP, "VTP" }, 109 { PID_CISCO_DTP, "DTP" }, | 30#endif 31 32#ifdef HAVE_CONFIG_H 33#include "config.h" 34#endif 35 36#include <tcpdump-stdinc.h> 37 --- 64 unchanged lines hidden (view full) --- 102 { 0, NULL } 103}; 104 105 106static const struct tok cisco_values[] = { 107 { PID_CISCO_CDP, "CDP" }, 108 { PID_CISCO_VTP, "VTP" }, 109 { PID_CISCO_DTP, "DTP" }, |
110 { PID_CISCO_UDLD, "UDLD" }, 111 { PID_CISCO_PVST, "PVST" }, |
|
110 { 0, NULL } 111}; 112 113static const struct tok bridged_values[] = { 114 { PID_RFC2684_ETH_FCS, "Ethernet + FCS" }, 115 { PID_RFC2684_ETH_NOFCS, "Ethernet w/o FCS" }, 116 { PID_RFC2684_802_4_FCS, "802.4 + FCS" }, 117 { PID_RFC2684_802_4_NOFCS, "802.4 w/o FCS" }, --- 320 unchanged lines hidden (view full) --- 438 ret = ether_encap_print(et, p, length, caplen, 439 extracted_ethertype); 440 if (ret) 441 return (ret); 442 } 443 break; 444 445 case OUI_CISCO: | 112 { 0, NULL } 113}; 114 115static const struct tok bridged_values[] = { 116 { PID_RFC2684_ETH_FCS, "Ethernet + FCS" }, 117 { PID_RFC2684_ETH_NOFCS, "Ethernet w/o FCS" }, 118 { PID_RFC2684_802_4_FCS, "802.4 + FCS" }, 119 { PID_RFC2684_802_4_NOFCS, "802.4 w/o FCS" }, --- 320 unchanged lines hidden (view full) --- 440 ret = ether_encap_print(et, p, length, caplen, 441 extracted_ethertype); 442 if (ret) 443 return (ret); 444 } 445 break; 446 447 case OUI_CISCO: |
446 if (et == PID_CISCO_CDP) { 447 cdp_print(p, length, caplen); 448 return (1); 449 } 450 break; | 448 switch (et) { 449 case PID_CISCO_CDP: 450 cdp_print(p, length, caplen); 451 return (1); 452 case PID_CISCO_DTP: 453 dtp_print(p, length); 454 return (1); 455 case PID_CISCO_UDLD: 456 udld_print(p, length); 457 return (1); 458 case PID_CISCO_VTP: 459 vtp_print(p, length); 460 return (1); 461 case PID_CISCO_PVST: 462 stp_print(p, length); 463 return (1); 464 default: 465 break; 466 } |
451 452 case OUI_RFC2684: 453 switch (et) { 454 455 case PID_RFC2684_ETH_FCS: 456 case PID_RFC2684_ETH_NOFCS: 457 /* 458 * XXX - remove the last two bytes for --- 77 unchanged lines hidden --- | 467 468 case OUI_RFC2684: 469 switch (et) { 470 471 case PID_RFC2684_ETH_FCS: 472 case PID_RFC2684_ETH_NOFCS: 473 /* 474 * XXX - remove the last two bytes for --- 77 unchanged lines hidden --- |