Ethereal-dev: [Ethereal-dev] [patch] D-Link wifi bridge protocol

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

From: m0sia <m0sia@xxxxxxxxxxx>
Date: Wed, 22 Feb 2006 15:19:58 +0500
Hello everybody,
	I'm using two D-Link DWL-2000 AP+ in bridge-mode. They use some odd
protocol. Before 802.2 header there is two bytes of src mac address. I
don't know, why they do so, but I made a little patch to decode this
packets.

Best Regards, m0sia.
--- epan/dissectors/packet-ieee80211.c.orig	2006-02-22 14:44:56.585757112 +0500
+++ epan/dissectors/packet-ieee80211.c	2006-02-22 14:44:25.908420776 +0500
@@ -3203,6 +3203,12 @@
             encap_type = ENCAP_ETHERNET;
           else if (octet1 == 0xff && octet2 == 0xff)
             encap_type = ENCAP_IPX;
+	  /* Some odd wifi bridges(ex. D-LINK) uses 2 bytes of src address
+	     before 802.2 header */
+          if (memcmp(&octet1, pinfo->src.data+2, 1) == 0 &&
+              memcmp(&octet2, pinfo->src.data+5, 1) == 0) {
+            next_tvb = tvb_new_subset(tvb, hdr_len+2,-1,-1);
+          }
         }
       }
       CATCH2(BoundsError, ReportedBoundsError) {