Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] [PATCH] Dissect EAP-FAST

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

Date Prev · Date Next · Thread Prev · Thread Next
From: Jouni Malinen <jkmaline@xxxxxxxxx>
Date: Thu, 30 Sep 2004 18:50:25 -0700
The attached patch adds support for dissecting EAP-FAST packets. In
addition, it adds version field displaying for EAP-TTLS since the
latest TTLS draft defines a new version mechanism (which matches with
both EAP-PEAP and EAP-FAST in design).

-- 
Jouni Malinen                                            PGP id EFC895FA
Index: epan/dissectors/packet-eap.c
===================================================================
--- epan/dissectors/packet-eap.c	(revision 11903)
+++ epan/dissectors/packet-eap.c	(working copy)
@@ -78,6 +78,7 @@
 #define EAP_TYPE_AKA	23
 #define EAP_TYPE_PEAP	25
 #define EAP_TYPE_MSCHAPV2 26
+#define EAP_TYPE_FAST	43
 
 static const value_string eap_type_vals[] = {
   {EAP_TYPE_ID,  "Identity [RFC3748]" },
@@ -122,7 +123,7 @@
   { 40,          "DeviceConnect EAP [Pitard]" },
   { 41,          "EAP-SPEKE [Zick]" },
   { 42,          "EAP-MOBAC [Rixom]" },
-  { 43,          "EAP-FAST [Cam-Winget]" },
+  {EAP_TYPE_FAST,"EAP-FAST [Cam-Winget]" },
   { 44,          "ZoneLabs EAP (ZLXEAP) [Bogue]" },
   { 45,          "EAP-Link [Zick]" },
   { 254,         "RESERVED for the Expanded Type [RFC3748]" },
@@ -799,6 +800,7 @@
       /*********************************************************************
                                   EAP-TLS
       **********************************************************************/
+      case EAP_TYPE_FAST:
       case EAP_TYPE_PEAP:
       case EAP_TYPE_TTLS:
       case EAP_TYPE_TLS:
@@ -821,9 +823,12 @@
 			      has_length                      ? "Length ":"",
 			      more_fragments                  ? "More "  :"",
 			      test_flag(flags,EAP_TLS_FLAG_S) ? "Start " :"");
-	  if (eap_type == EAP_TYPE_PEAP) {
+	  if (eap_type == EAP_TYPE_PEAP || eap_type == EAP_TYPE_TTLS ||
+	      eap_type == EAP_TYPE_FAST) {
 	    proto_tree_add_text(eap_tree, tvb, offset, 1,
-				"PEAP version %d",
+				"%s version %d",
+				eap_type == EAP_TYPE_PEAP ? "PEAP" :
+				(eap_type == EAP_TYPE_TTLS ? "TTLS" : "FAST"),
 				flags & EAP_PEAP_FLAG_VERSION);
 	  }
 	}