Ethereal-dev: [Ethereal-dev] Extend 802.1Q dissector for 802.1QinQ

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "杜丙尧" <dubingyao@xxxxxxxxx>
Date: Sun, 2 Jul 2006 03:31:16 +0800
Hi list,

I extend the  802.1Q dessector for resolving 802.1QinQ packets,whose ethertype field values is 0x9100 (default in the realization of the most important verdors).
I hope it will be added in the next version.

This attachments  are patches files.
 
Some Requirement:
 
 * The IEEE 802.1Q-in-Q VLAN Tag is purpose to expand the VLAN space
 * by tagging the tagged packets,thus producing a "double-tagged" frame.
 * The expanded VLAN space allows the service provider to provide certain
 * services,such as Internet access on specific VLANs for specific customers,
 * and yet still allows the service provider to provide other types of
 * services for their other customers on other VLANs.
 
 
Thanks.
DuBingyao
*** epan/dissectors/packet-ethertype.c.old	2006-07-01 02:11:10.000000000 +0800
--- epan/dissectors/packet-ethertype.c	2006-07-01 02:32:25.000000000 +0800
***************
*** 72,77 ****
--- 72,78 ----
      {ETHERTYPE_INTEL_ANS,			"Intel ANS probe"		},
      {ETHERTYPE_MS_NLB_HEARTBEAT,	"MS NLB heartbeat"	},
      {ETHERTYPE_VLAN,				"802.1Q Virtual LAN"		},
+     {ETHERTYPE_QINQ,				"802.1QinQ Virtual LAN"		},
      {ETHERTYPE_EAPOL,				"802.1X Authentication"         },
      {ETHERTYPE_RSN_PREAUTH,			"802.11i Pre-Authentication"    },
      {ETHERTYPE_MPLS,				"MPLS label switched packet"	},
***************
*** 146,151 ****
--- 147,153 ----
        capture_ipx(ld);
        break;
      case ETHERTYPE_VLAN:
+     case ETHERTYPE_QINQ:
        capture_vlan(pd, offset, len, ld);
        break;
      case ETHERTYPE_VINES_IP:
*** epan/etypes.h.old	2006-07-01 02:08:53.000000000 +0800
--- epan/etypes.h	2006-06-29 21:37:16.000000000 +0800
***************
*** 168,173 ****
--- 168,177 ----
  #define ETHERTYPE_VLAN		0x8100	/* 802.1Q Virtual LAN */
  #endif
  
+ #ifndef ETHERTYPE_QINQ
+ #define ETHERTYPE_QINQ		0x9100	/* 802.1QinQ Virtual LAN */
+ #endif
+ 
  #ifndef ETHERTYPE_SNMP
  #define ETHERTYPE_SNMP		0x814c	/* SNMP over Ethernet, RFC 1089 */
  #endif
*** epan/dissectors/packet-vlan.c.old	2006-07-01 03:26:30.000000000 +0800
--- epan/dissectors/packet-vlan.c	2006-07-01 03:05:46.000000000 +0800
***************
*** 165,168 ****
--- 165,169 ----
  
    vlan_handle = create_dissector_handle(dissect_vlan, proto_vlan);
    dissector_add("ethertype", ETHERTYPE_VLAN, vlan_handle);
+   dissector_add("ethertype", ETHERTYPE_QINQ, vlan_handle);
  }
*** AUTHORS.old	2006-07-01 01:52:41.000000000 +0800
--- AUTHORS	2006-07-01 01:50:15.000000000 +0800
***************
*** 2444,2449 ****
--- 2444,2450 ----
  }
  
  Du Bingyao		<dubingyao[AT]gmail.com> {
+ 	Extend 802.1Q dissector for 802.1QinQ
  	OICQ
  }
  
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev