aboutsummaryrefslogtreecommitdiffstats
path: root/epan/etypes.h
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-06-29 16:05:56 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-06-29 16:05:56 +0000
commit3dd1b0c0de009a3ffe09032c0a0db89b9e1bc4a9 (patch)
tree1f45e136fb8bf7800eb18d88aa83998b453d727e /epan/etypes.h
parentabe9ce28a5d53e5795ad808e1c9185c2635841fb (diff)
Based on Guy's suggestion from the user mailing list, dissect Ethernet frames with a type/len field in the range of 1501-1535 as invalid, and add an expert info to make it that much easier to find such invalid frames.
Also did some whitespace cleanup, converting tabs to spaces since most of the file was spaced, not tabbed, and swapped the order that the lg and ig bits get added to the tree because I think it looks better reading bits left-to-right. TODO: I'm not entirely sure what to do in capture_eth() if that invalid range is encountered, so for now I just added some #if 0'd code as a placeholder. Ref: http://www.wireshark.org/lists/wireshark-users/201106/msg00127.html svn path=/trunk/; revision=37832
Diffstat (limited to 'epan/etypes.h')
-rw-r--r--epan/etypes.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/etypes.h b/epan/etypes.h
index a1a452063a..35c6281977 100644
--- a/epan/etypes.h
+++ b/epan/etypes.h
@@ -27,10 +27,15 @@
/*
* Maximum length of an IEEE 802.3 frame; Ethernet type/length values
- * greater than it are types, Ethernet type/length values less than or
- * equal to it are lengths.
+ * less than or equal to it are lengths.
*/
-#define IEEE_802_3_MAX_LEN 1500
+#define IEEE_802_3_MAX_LEN 1500
+
+/*
+ * Minimum length of an Ethernet II frame; Ethernet type/length values
+ * greater than or equal to it are types.
+ */
+#define ETHERNET_II_MIN_LEN 1536
#ifndef ETHERTYPE_UNK
#define ETHERTYPE_UNK 0x0000