Ethereal-dev: [Ethereal-dev] SAP dissector update

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

From: Heikki Vatiainen <hessu@xxxxxxxxx>
Date: Mon, 16 Oct 2000 22:43:00 +0300
The Session Announcement Protocol version 2 is now RFC 2974. Since
draft-ietf-mmusic-sap-v2-03.txt, the only change that concerns a
dissector seems to be that the optional timeout field no longer
exists.


Index: packet-sap.c
===================================================================
RCS file: /cvsroot/ethereal/packet-sap.c,v
retrieving revision 1.11
diff -u -r1.11 packet-sap.c
--- packet-sap.c	2000/08/25 13:05:32	1.11
+++ packet-sap.c	2000/10/16 19:24:49
@@ -1,6 +1,6 @@
 /* packet-sap.c
  * Routines for sap packet dissection
- * <draft-ietf-mmusic-sap-v2-03.txt>
+ * RFC 2974
  *
  * Heikki Vatiainen <hessu@xxxxxxxxx>
  *
@@ -132,7 +132,6 @@
         int sap_version, is_ipv6, is_del, is_enc, is_comp, addr_len;
         guint8 auth_len;
         guint16 tmp1;
-        guint32 tmp2;
 
         proto_item *si, *sif;
         proto_tree *sap_tree, *sap_flags_tree;
@@ -217,16 +216,13 @@
 
                   offset += auth_data_len;
           }
-
-          if (is_enc) { /* Encrypted payload implies valid timeout in the SAP header */
-                  tmp2 = pntohl(pd+offset);
-                  proto_tree_add_text(sap_tree, NullTVB, offset, 4, "Timeout: %u", tmp2);
-                  offset += sizeof(guint32);
-          }
-
           if (is_enc || is_comp) {
+                  char *mangle;
+                  if (is_enc && is_comp) mangle = "compressed and encrypted";
+                  else if (is_enc) mangle = "encrypted";
+                  else mangle = "compressed";
                   proto_tree_add_text(sap_tree, NullTVB, offset, END_OF_FRAME,
-                                      "Rest of the packet is encrypted or compressed");
+                                      "The rest of the packet is %s", mangle);
                   return;
           }