Ethereal-dev: [Ethereal-dev] Patch to packet-smtp.c - support MS-Exchange commands

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

From: Yaniv Kaul <ykaul@xxxxxxxxxxxx>
Date: Sun, 16 May 2004 11:04:32 +0200
Added support for 3 MS-Exchange, non-RFC compliant commands, per http://support.microsoft.com/default.aspx?scid=kb;en-us;812455:
--- packet-smtp.c	2004-05-14 21:32:52.000000000 +0200
+++ packet-smtp.ynv.c	2004-05-14 21:30:46.000000000 +0200
@@ -302,7 +302,11 @@
 
 	    }
 	  } else {
-
+		if ((linelen >= 7) && line[0] == 'X' && ( (strncasecmp(line, "X-EXPS ", 7) == 0) ||
+			((linelen >=13) && (strncasecmp(line, "X-LINK2STATE ", 13) == 0)) || 
+			((linelen >= 8) && (strncasecmp(line, "XEXCH50 ", 8) == 0)) ))
+				frame_data->pdu_type = SMTP_PDU_CMD;
+		else
 	    /*
 	     * Assume it's message data.
 	     */