Ethereal-dev: [Ethereal-dev] Updates for packet-dcerpc-tkn4int.c

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

From: Jaime Fournier <jafour1@xxxxxxxxx>
Date: Wed, 9 Apr 2003 19:40:58 -0700 (PDT)
Please review, and submit this patch.
This is the first of many updates I need to submit,
once I have cleaned them up, and removed external
macros. Included is a trace of tkn4int packets.

Thanks!

=====
Jaime Fournier

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
--- realcvs/packet-dcerpc-tkn4int.c	Fri Nov  8 13:42:40 2002
+++ ethereal/packet-dcerpc-tkn4int.c	Wed Apr  9 17:26:16 2003
@@ -5,7 +5,7 @@
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/fsint/tkn4int.idl
  *     
- * $Id: packet-dcerpc-tkn4int.c,v 1.2 2002/11/08 19:42:40 guy Exp $
+ * $Id: packet-dcerpc-tkn4int.c,v 1.18 2003/04/09 22:26:09 root Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@xxxxxxxxxxxx>
@@ -39,69 +39,867 @@
 
 #include <glib.h>
 #include <epan/packet.h>
-#include "packet-dcerpc.h"
+#include "packet-dcerpc.h" 
+#include "packet-dcerpc-dce122.h"
 
+static int proto_TKN4Int = -1;
 
-static int proto_tkn4int = -1;
-static int hf_tkn4int_opnum = -1;
+static gint ett_TKN4Int = -1;
 
 
-static gint ett_tkn4int = -1;
+static e_uuid_t uuid_TKN4Int =
+  { 0x4d37f2dd, 0xed96, 0x0000, {0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x00,
+				 0x00}
+};
+static guint16 ver_TKN4Int = 4;
+static int hf_tkn4int_tokenrevoke_cell_high = -1;
+static int hf_tkn4int_tokenrevoke_cell_low = -1;
+static int hf_tkn4int_tokenrevoke_volume_high = -1;
+static int hf_tkn4int_tokenrevoke_volume = -1;
+static int hf_tkn4int_tokenrevoke_vnode = -1;
+static int hf_tkn4int_tokenrevoke_unique = -1;
+static int hf_tkn4int_tokenrevoke_tokenid_high = -1;
+static int hf_tkn4int_tokenrevoke_tokenid_low = -1;
+static int hf_tkn4int_tokenrevoke_type_high = -1;
+static int hf_tkn4int_tokenrevoke_type_low = -1;
+static int hf_tkn4int_tokenrevoke_flags = -1;
+static int hf_tkn4int_tokenrevoke_outflags = -1;
+static int hf_tkn4int_tokenrevoke_errorids_high = -1;
+static int hf_tkn4int_tokenrevoke_errorids_low = -1;
+static int hf_tkn4int_tokenrevoke_a_tokenida_high = -1;
+static int hf_tkn4int_tokenrevoke_a_tokenid_low = -1;
+static int hf_tkn4int_tokenrevoke_a_expirationtime = -1;
+static int hf_tkn4int_tokenrevoke_a_type_high = -1;
+static int hf_tkn4int_tokenrevoke_a_type_low = -1;
+static int hf_tkn4int_tokenrevoke_a_beginrange = -1;
+static int hf_tkn4int_tokenrevoke_a_endrange = -1;
+static int hf_tkn4int_tokenrevoke_a_beginrangeext = -1;
+static int hf_tkn4int_tokenrevoke_a_endrangeext = -1;
+static int hf_tkn4int_tokenrevoke_colachoice_high = -1;
+static int hf_tkn4int_tokenrevoke_colachoice_low = -1;
+static int hf_tkn4int_tokenrevoke_b_tokenid_high = -1;
+static int hf_tkn4int_tokenrevoke_b_tokenid_low = -1;
+static int hf_tkn4int_tokenrevoke_b_expirationtime = -1;
+static int hf_tkn4int_tokenrevoke_b_type_high = -1;
+static int hf_tkn4int_tokenrevoke_b_type_low = -1;
+static int hf_tkn4int_tokenrevoke_b_beginrange = -1;
+static int hf_tkn4int_tokenrevoke_b_endrange = -1;
+static int hf_tkn4int_tokenrevoke_b_beginrangeext = -1;
+static int hf_tkn4int_tokenrevoke_b_endrangeext = -1;
+static int hf_tkn4int_tokenrevoke_colbchoice_high = -1;
+static int hf_tkn4int_tokenrevoke_colbchoice_low = -1;
+static int hf_tkn4int_tokenrevoke_l_type = -1;
+static int hf_tkn4int_tokenrevoke_l_whence = -1;
+static int hf_tkn4int_tokenrevoke_l_start_pos = -1;
+static int hf_tkn4int_tokenrevoke_l_end_pos = -1;
+static int hf_tkn4int_tokenrevoke_l_pid = -1;
+static int hf_tkn4int_tokenrevoke_l_sysid = -1;
+static int hf_tkn4int_tokenrevoke_l_fstype = -1;
+static int hf_tkn4int_tokenrevoke_l_start_pos_ext = -1;
+static int hf_tkn4int_tokenrevoke_l_end_pos_ext = -1;
+
+static int
+tkn4int_dissect_tokenrevoke_rqst (tvbuff_t * tvb, int offset,
+				  packet_info * pinfo, proto_tree * tree,
+				  char *drep)
+{
+  guint64 volume, tokenid, type, errorids;
+  guint32 volume_high, volume_low, colachoice_high, colachoice_low,
+    colbchoice_high, colbchoice_low, tokenid_high, tokenid_low, type_high,
+    type_low, errorids_high, errorids_low;
+  guint32 a_tokenid_high, a_tokenid_low, a_expirationtime, a_type_high,
+    a_type_low, a_beginrange, a_endrange, a_beginrangeext, a_endrangeext;
+  guint32 b_tokenid_high, b_tokenid_low, b_expirationtime, b_type_high,
+    b_type_low, b_beginrange, b_endrange, b_beginrangeext, b_endrangeext;
+  guint32 vnode, flags, outflags;
+  guint32 l_start_pos, l_end_pos, l_pid, l_sysid, l_fstype, l_start_pos_ext,
+    l_end_pos_ext, inode;
+  guint16 l_type, l_whence;
+
+  /*
+   * AFS_BULKMAX = 32
+   afsFid fid;             # useful hint 
+   */
+  offset += 12;
+
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_cell_high, NULL);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_cell_low, NULL);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_volume_high,
+			&volume_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_volume, &volume_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_vnode, &vnode);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_unique, NULL);
+
+  /*
+     afsHyper tokenID;
+     afsHyper type;          # mask 
+     unsigned32 flags;       # input flags to RPC
+     unsigned32 outFlags;    # output flags from RPC 
+     afsHyper errorIDs;      # (mask[dude] == 1) <==> dude not revoked 
+   */
+
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_tokenid_high,
+			&tokenid_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_tokenid_low,
+			&tokenid_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_type_high, &type_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_type_low, &type_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_flags, &flags);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_outflags, &outflags);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_errorids_high,
+			&errorids_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_errorids_low,
+			&errorids_low);
+
+  volume = volume_high | volume_low;
+  tokenid = tokenid_high | tokenid_low;
+  type = type_high | type_low;
+  errorids = errorids_high | errorids_low;
+
+  /* afsToken columnA;       # the offer 
+
+     unsigned32 tokenID_hi;
+     unsigned32 tokenID_lo;
+     unsigned32 expirationTime;
+     unsigned32 type_hi;
+     unsigned32 type_lo;
+     unsigned32 beginRange;
+     unsigned32 endRange;
+     unsigned32 beginRangeExt;
+     unsigned32 endRangeExt;
+   */
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_tokenida_high,
+			&a_tokenid_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_tokenid_low,
+			&a_tokenid_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_expirationtime,
+			&a_expirationtime);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_type_high,
+			&a_type_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_type_low, &a_type_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_beginrange,
+			&a_beginrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_endrange, &a_endrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_beginrangeext,
+			&a_beginrangeext);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_endrangeext,
+			&a_endrangeext);
+
+  /*
+     afsHyper colAChoice;    # the accepted token types 
+   */
+
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colachoice_high,
+			&colachoice_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colachoice_low,
+			&colachoice_low);
+
+  /*
+     the other token to be offered
+
+     afsToken columnB;       # the offer 
+   */
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_tokenid_high,
+			&b_tokenid_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_tokenid_low,
+			&b_tokenid_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_expirationtime,
+			&b_expirationtime);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_type_high,
+			&b_type_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_type_low, &b_type_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_beginrange,
+			&b_beginrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_endrange, &b_endrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_beginrangeext,
+			&b_beginrangeext);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_endrangeext,
+			&b_endrangeext);
+
+  /*
+     afsHyper colBChoice;    # the accepted token types 
+   */
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colbchoice_high,
+			&colbchoice_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colbchoice_low,
+			&colbchoice_low);
+
+
+
+  /* afsRevokeDesc Flags */
+#define AFS_REVOKE_COL_A_VALID  0x1
+#define AFS_REVOKE_COL_B_VALID  0x2
+#define AFS_REVOKE_FORCED_REVOCATION  0x4
+#define AFS_REVOKE_DUE_TO_GC  0x8
+#define AFS_REVOKE_NO_QUEUED_ASYNC  0x10
+
+
+  /*
+     afsRecordLock recordLock; # the blocker's info 
+   */
+  offset =
+    dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_type, &l_type);
+  offset =
+    dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_whence, &l_whence);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_start_pos,
+			&l_start_pos);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_end_pos, &l_end_pos);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_pid, &l_pid);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_sysid, &l_sysid);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_fstype, &l_fstype);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_start_pos_ext,
+			&l_start_pos_ext);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_end_pos_ext,
+			&l_end_pos_ext);
+
+
+  inode = ((volume << 16) + vnode) & 0x7fffffff;
+
+  if (check_col (pinfo->cinfo, COL_INFO))
+    col_append_fstr (pinfo->cinfo, COL_INFO,
+		     " :FSID:%llu inode:%u type: %llu tokenid: %llu", volume,
+		     inode, type, tokenid);
+
+  if (errorids)
+    {
+      if (check_col (pinfo->cinfo, COL_INFO))
+	col_append_fstr (pinfo->cinfo, COL_INFO, " : errorids: %u", errorids);
+    }
+
+  if (flags)
+    {
+      if (check_col (pinfo->cinfo, COL_INFO))
+	col_append_str (pinfo->cinfo, COL_INFO, " Flags=");
+
+      if ((flags & AFS_REVOKE_COL_A_VALID) == AFS_REVOKE_COL_A_VALID)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":COL_A_VALID");
+	}
+      if ((flags & AFS_REVOKE_COL_B_VALID) == AFS_REVOKE_COL_B_VALID)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":COL_B_VALID");
+	}
+      if ((flags & AFS_REVOKE_FORCED_REVOCATION) ==
+	  AFS_REVOKE_FORCED_REVOCATION)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":FORCED_REVOCATION");
+	}
+      if ((flags & AFS_REVOKE_DUE_TO_GC) == AFS_REVOKE_DUE_TO_GC)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":DUE_TO_GC");
+	}
+      if ((flags & AFS_REVOKE_NO_QUEUED_ASYNC) == AFS_REVOKE_NO_QUEUED_ASYNC)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":NO_QUEUED_ASYNC");
+	}
 
 
-static e_uuid_t uuid_tkn4int = { 0x4d37f2dd, 0xed96, 0x0000, { 0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x00, 0x00 } };
-static guint16  ver_tkn4int = 4;
+    }				/* (flags) */
 
+  return offset;
+}
+static int
+tkn4int_dissect_tokenrevoke_resp (tvbuff_t * tvb, int offset,
+				  packet_info * pinfo, proto_tree * tree,
+				  char *drep)
+{
+  guint64 volume, tokenid, type, errorids;
+  guint32 volume_high, volume_low, colachoice_high, colachoice_low,
+    colbchoice_high, colbchoice_low, tokenid_high, tokenid_low, type_high,
+    type_low, errorids_high, errorids_low;
+  guint32 a_tokenid_high, a_tokenid_low, a_expirationtime, a_type_high,
+    a_type_low, a_beginrange, a_endrange, a_beginrangeext, a_endrangeext;
+  guint32 b_tokenid_high, b_tokenid_low, b_expirationtime, b_type_high,
+    b_type_low, b_beginrange, b_endrange, b_beginrangeext, b_endrangeext;
+  guint32 vnode, flags, outflags;
+  guint32 l_start_pos, l_end_pos, l_pid, l_sysid, l_fstype, l_start_pos_ext,
+    l_end_pos_ext, inode;
+  guint16 l_type, l_whence;
+
+  /*
+   * AFS_BULKMAX = 32
+   afsFid fid;             # useful hint 
+   */
+  offset += 12;
+
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_cell_high, NULL);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_cell_low, NULL);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_volume_high,
+			&volume_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_volume, &volume_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_vnode, &vnode);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_unique, NULL);
+
+  /*
+     afsHyper tokenID;
+     afsHyper type;          # mask 
+     unsigned32 flags;       # input flags to RPC
+     unsigned32 outFlags;    # output flags from RPC 
+     afsHyper errorIDs;      # (mask[dude] == 1) <==> dude not revoked 
+   */
+
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_tokenid_high,
+			&tokenid_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_tokenid_low,
+			&tokenid_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_type_high, &type_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_type_low, &type_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_flags, &flags);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_outflags, &outflags);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_errorids_high,
+			&errorids_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_errorids_low,
+			&errorids_low);
+
+  volume = volume_high | volume_low;
+  tokenid = tokenid_high | tokenid_low;
+  type = type_high | type_low;
+  errorids = errorids_high | errorids_low;
+
+  /* afsToken columnA;       # the offer 
+
+     unsigned32 tokenID_hi;
+     unsigned32 tokenID_lo;
+     unsigned32 expirationTime;
+     unsigned32 type_hi;
+     unsigned32 type_lo;
+     unsigned32 beginRange;
+     unsigned32 endRange;
+     unsigned32 beginRangeExt;
+     unsigned32 endRangeExt;
+   */
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_tokenida_high,
+			&a_tokenid_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_tokenid_low,
+			&a_tokenid_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_expirationtime,
+			&a_expirationtime);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_type_high,
+			&a_type_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_type_low, &a_type_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_beginrange,
+			&a_beginrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_endrange, &a_endrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_beginrangeext,
+			&a_beginrangeext);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_a_endrangeext,
+			&a_endrangeext);
+
+  /*
+     afsHyper colAChoice;    # the accepted token types 
+   */
+
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colachoice_high,
+			&colachoice_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colachoice_low,
+			&colachoice_low);
+
+  /*
+     the other token to be offered
+
+     afsToken columnB;       # the offer 
+   */
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_tokenid_high,
+			&b_tokenid_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_tokenid_low,
+			&b_tokenid_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_expirationtime,
+			&b_expirationtime);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_type_high,
+			&b_type_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_type_low, &b_type_low);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_beginrange,
+			&b_beginrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_endrange, &b_endrange);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_beginrangeext,
+			&b_beginrangeext);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_b_endrangeext,
+			&b_endrangeext);
+
+  /*
+     afsHyper colBChoice;    # the accepted token types 
+   */
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colbchoice_high,
+			&colbchoice_high);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_colbchoice_low,
+			&colbchoice_low);
+
+
+
+  /* afsRevokeDesc Flags */
+#define AFS_REVOKE_COL_A_VALID  0x1
+#define AFS_REVOKE_COL_B_VALID  0x2
+#define AFS_REVOKE_FORCED_REVOCATION  0x4
+#define AFS_REVOKE_DUE_TO_GC  0x8
+#define AFS_REVOKE_NO_QUEUED_ASYNC  0x10
+
+
+  /*
+     afsRecordLock recordLock; # the blocker's info 
+   */
+  offset =
+    dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_type, &l_type);
+  offset =
+    dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_whence, &l_whence);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_start_pos,
+			&l_start_pos);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_end_pos, &l_end_pos);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_pid, &l_pid);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_sysid, &l_sysid);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_fstype, &l_fstype);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_start_pos_ext,
+			&l_start_pos_ext);
+  offset =
+    dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
+			hf_tkn4int_tokenrevoke_l_end_pos_ext,
+			&l_end_pos_ext);
+
+  inode = ((volume << 16) + vnode) & 0x7fffffff;
+
+  if (check_col (pinfo->cinfo, COL_INFO))
+    col_append_fstr (pinfo->cinfo, COL_INFO,
+		     " :FSID:%llu inode:%u type: %llu tokenid: %llu", volume,
+		     inode, type, tokenid);
+
+  if (check_col (pinfo->cinfo, COL_INFO))
+    col_append_fstr (pinfo->cinfo, COL_INFO, " st: %s",
+		     val_to_str (errorids, dce_error_vals, ""));
+
+
+  if (flags)
+    {
+      if (check_col (pinfo->cinfo, COL_INFO))
+	col_append_str (pinfo->cinfo, COL_INFO, " Flags=");
+
+      if ((flags & AFS_REVOKE_COL_A_VALID) == AFS_REVOKE_COL_A_VALID)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":COL_A_VALID");
+	}
+      if ((flags & AFS_REVOKE_COL_B_VALID) == AFS_REVOKE_COL_B_VALID)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":COL_B_VALID");
+	}
+      if ((flags & AFS_REVOKE_FORCED_REVOCATION) ==
+	  AFS_REVOKE_FORCED_REVOCATION)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":FORCED_REVOCATION");
+	}
+      if ((flags & AFS_REVOKE_DUE_TO_GC) == AFS_REVOKE_DUE_TO_GC)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":DUE_TO_GC");
+	}
+      if ((flags & AFS_REVOKE_NO_QUEUED_ASYNC) == AFS_REVOKE_NO_QUEUED_ASYNC)
+	{
+	  if (check_col (pinfo->cinfo, COL_INFO))
+	    col_append_str (pinfo->cinfo, COL_INFO, ":NO_QUEUED_ASYNC");
+	}
 
-static dcerpc_sub_dissector tkn4int_dissectors[] = {
-    { 0, "Probe", NULL, NULL},
-    { 1, "InitTokenState", NULL, NULL},
-    { 2, "TokenRevoke", NULL, NULL},
-    { 3, "GetCellName", NULL, NULL},
-    { 4, "GetLock", NULL, NULL},
-    { 5, "GetCE", NULL, NULL},
-    { 6, "GetServerInterfaces", NULL, NULL},
-    { 7, "SetParams", NULL, NULL},
-    { 8, "AsyncGrant", NULL, NULL},
-    { 0, NULL, NULL, NULL }
 
-};
+    }				/* (flags) */
+
+  return offset;
+}
 
 
-static const value_string tkn4int_opnum_vals[] = {
-    { 0, "Probe" },
-    { 1, "InitTokenState" },
-    { 2, "TokenRevoke" },
-    { 3, "GetCellName" },
-    { 4, "GetLock" },
-    { 5, "GetCE" },
-    { 6, "GetServerInterfaces" },
-    { 7, "SetParams" },
-    { 8, "AsyncGrant" },
-    { 0, NULL }
+static dcerpc_sub_dissector TKN4Int_dissectors[] = {
+  {0, "Probe", NULL, NULL},
+  {1, "InitTokenState", NULL, NULL},
+  {2, "TokenRevoke", tkn4int_dissect_tokenrevoke_rqst,
+   tkn4int_dissect_tokenrevoke_resp},
+  {3, "GetCellName", NULL, NULL},
+  {4, "GetLock", NULL, NULL},
+  {5, "GetCE", NULL, NULL},
+  {6, "GetServerInterfaces", NULL, NULL},
+  {7, "SetParams", NULL, NULL},
+  {8, "AsyncGrant", NULL, NULL},
+  {0, NULL, NULL, NULL},
 
 };
 
 void
-proto_register_tkn4int (void)
+proto_register_TKN4Int (void)
 {
-	static hf_register_info hf[] = {
-	  { &hf_tkn4int_opnum,
-	    { "Operation", "tkn4int.opnum", FT_UINT16, BASE_DEC,
-	      VALS(tkn4int_opnum_vals), 0x0, "Operation", HFILL }}
-	};
-
-	static gint *ett[] = {
-		&ett_tkn4int,
-	};
-	proto_tkn4int = proto_register_protocol ("DCE/RPC TokenServer Calls", "TKN4Int", "tkn4int");
-	proto_register_field_array (proto_tkn4int, hf, array_length (hf));
-	proto_register_subtree_array (ett, array_length (ett));
+  static hf_register_info hf[] = {
+    {&hf_tkn4int_tokenrevoke_cell_high,
+     {"hf_tkn4int_tokenrevoke_cell_high",
+      "hf_tkn4int_tokenrevoke_cell_high", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_cell_low,
+     {"hf_tkn4int_tokenrevoke_cell_low",
+      "hf_tkn4int_tokenrevoke_cell_low", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_volume_high,
+     {"hf_tkn4int_tokenrevoke_volume_high",
+      "hf_tkn4int_tokenrevoke_volume_high", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_volume,
+     {"hf_tkn4int_tokenrevoke_volume",
+      "hf_tkn4int_tokenrevoke_volume", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_vnode,
+     {"hf_tkn4int_tokenrevoke_vnode",
+      "hf_tkn4int_tokenrevoke_vnode", FT_UINT32, BASE_DEC, NULL, 0x0, "",
+      HFILL}},
+    {&hf_tkn4int_tokenrevoke_unique,
+     {"hf_tkn4int_tokenrevoke_unique",
+      "hf_tkn4int_tokenrevoke_unique", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_tokenid_high,
+     {"hf_tkn4int_tokenrevoke_tokenid_high",
+      "hf_tkn4int_tokenrevoke_tokenid_high", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_tokenid_low,
+     {"hf_tkn4int_tokenrevoke_tokenid_low",
+      "hf_tkn4int_tokenrevoke_tokenid_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_type_high,
+     {"hf_tkn4int_tokenrevoke_type_high",
+      "hf_tkn4int_tokenrevoke_type_high", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_type_low,
+     {"hf_tkn4int_tokenrevoke_type_low",
+      "hf_tkn4int_tokenrevoke_type_low", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_flags,
+     {"hf_tkn4int_tokenrevoke_flags",
+      "hf_tkn4int_tokenrevoke_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "",
+      HFILL}},
+    {&hf_tkn4int_tokenrevoke_outflags,
+     {"hf_tkn4int_tokenrevoke_outflags",
+      "hf_tkn4int_tokenrevoke_outflags", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_errorids_high,
+     {"hf_tkn4int_tokenrevoke_errorids_high",
+      "hf_tkn4int_tokenrevoke_errorids_high", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_errorids_low,
+     {"hf_tkn4int_tokenrevoke_errorids_low",
+      "hf_tkn4int_tokenrevoke_errorids_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_tokenida_high,
+     {"hf_tkn4int_tokenrevoke_a_tokenida_high",
+      "hf_tkn4int_tokenrevoke_a_tokenida_high", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_tokenid_low,
+     {"hf_tkn4int_tokenrevoke_a_tokenid_low",
+      "hf_tkn4int_tokenrevoke_a_tokenid_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_expirationtime,
+     {"hf_tkn4int_tokenrevoke_a_expirationtime",
+      "hf_tkn4int_tokenrevoke_a_expirationtime", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_type_high,
+     {"hf_tkn4int_tokenrevoke_a_type_high",
+      "hf_tkn4int_tokenrevoke_a_type_high", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_type_low,
+     {"hf_tkn4int_tokenrevoke_a_type_low",
+      "hf_tkn4int_tokenrevoke_a_type_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_beginrange,
+     {"hf_tkn4int_tokenrevoke_a_beginrange",
+      "hf_tkn4int_tokenrevoke_a_beginrange", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_endrange,
+     {"hf_tkn4int_tokenrevoke_a_endrange",
+      "hf_tkn4int_tokenrevoke_a_endrange", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_beginrangeext,
+     {"hf_tkn4int_tokenrevoke_a_beginrangeext",
+      "hf_tkn4int_tokenrevoke_a_beginrangeext", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_a_endrangeext,
+     {"hf_tkn4int_tokenrevoke_a_endrangeext",
+      "hf_tkn4int_tokenrevoke_a_endrangeext", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_colachoice_high,
+     {"hf_tkn4int_tokenrevoke_colachoice_high",
+      "hf_tkn4int_tokenrevoke_colachoice_high", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_colachoice_low,
+     {"hf_tkn4int_tokenrevoke_colachoice_low",
+      "hf_tkn4int_tokenrevoke_colachoice_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_tokenid_high,
+     {"hf_tkn4int_tokenrevoke_b_tokenid_high",
+      "hf_tkn4int_tokenrevoke_b_tokenid_high", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_tokenid_low,
+     {"hf_tkn4int_tokenrevoke_b_tokenid_low",
+      "hf_tkn4int_tokenrevoke_b_tokenid_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_expirationtime,
+     {"hf_tkn4int_tokenrevoke_b_expirationtime",
+      "hf_tkn4int_tokenrevoke_b_expirationtime", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_type_high,
+     {"hf_tkn4int_tokenrevoke_b_type_high",
+      "hf_tkn4int_tokenrevoke_b_type_high", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_type_low,
+     {"hf_tkn4int_tokenrevoke_b_type_low",
+      "hf_tkn4int_tokenrevoke_b_type_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_beginrange,
+     {"hf_tkn4int_tokenrevoke_b_beginrange",
+      "hf_tkn4int_tokenrevoke_b_beginrange", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_endrange,
+     {"hf_tkn4int_tokenrevoke_b_endrange",
+      "hf_tkn4int_tokenrevoke_b_endrange", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_beginrangeext,
+     {"hf_tkn4int_tokenrevoke_b_beginrangeext",
+      "hf_tkn4int_tokenrevoke_b_beginrangeext", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_b_endrangeext,
+     {"hf_tkn4int_tokenrevoke_b_endrangeext",
+      "hf_tkn4int_tokenrevoke_b_endrangeext", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_colbchoice_high,
+     {"hf_tkn4int_tokenrevoke_colbchoice_high",
+      "hf_tkn4int_tokenrevoke_colbchoice_high", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_colbchoice_low,
+     {"hf_tkn4int_tokenrevoke_colbchoice_low",
+      "hf_tkn4int_tokenrevoke_colbchoice_low", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_type,
+     {"hf_tkn4int_tokenrevoke_l_type",
+      "hf_tkn4int_tokenrevoke_l_type", FT_UINT16, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_whence,
+     {"hf_tkn4int_tokenrevoke_l_whence",
+      "hf_tkn4int_tokenrevoke_l_whence", FT_UINT16, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_start_pos,
+     {"hf_tkn4int_tokenrevoke_l_start_pos",
+      "hf_tkn4int_tokenrevoke_l_start_pos", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_end_pos,
+     {"hf_tkn4int_tokenrevoke_l_end_pos",
+      "hf_tkn4int_tokenrevoke_l_end_pos", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_pid,
+     {"hf_tkn4int_tokenrevoke_l_pid",
+      "hf_tkn4int_tokenrevoke_l_pid", FT_UINT32, BASE_DEC, NULL, 0x0, "",
+      HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_sysid,
+     {"hf_tkn4int_tokenrevoke_l_sysid",
+      "hf_tkn4int_tokenrevoke_l_sysid", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_fstype,
+     {"hf_tkn4int_tokenrevoke_l_fstype",
+      "hf_tkn4int_tokenrevoke_l_fstype", FT_UINT32, BASE_DEC, NULL, 0x0,
+      "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_start_pos_ext,
+     {"hf_tkn4int_tokenrevoke_l_start_pos_ext",
+      "hf_tkn4int_tokenrevoke_l_start_pos_ext", FT_UINT32, BASE_DEC,
+      NULL, 0x0, "", HFILL}},
+    {&hf_tkn4int_tokenrevoke_l_end_pos_ext,
+     {"hf_tkn4int_tokenrevoke_l_end_pos_ext",
+      "hf_tkn4int_tokenrevoke_l_end_pos_ext", FT_UINT32, BASE_DEC, NULL,
+      0x0, "", HFILL}},
+
+  };
+
+  static gint *ett[] = {
+    &ett_TKN4Int,
+  };
+  proto_TKN4Int =
+    proto_register_protocol ("DCE/RPC TokenServer Calls", "TKN4Int",
+			     "tkn4int");
+  proto_register_field_array (proto_TKN4Int, hf, array_length (hf));
+  proto_register_subtree_array (ett, array_length (ett));
 }
 
 void
-proto_reg_handoff_tkn4int (void)
+proto_reg_handoff_TKN4Int (void)
 {
-	/* Register the protocol as dcerpc */
-	dcerpc_init_uuid (proto_tkn4int, ett_tkn4int, &uuid_tkn4int, ver_tkn4int, tkn4int_dissectors, hf_tkn4int_opnum);
+  /* Register the protocol as dcerpc */
+  dcerpc_init_uuid (proto_TKN4Int, ett_TKN4Int, &uuid_TKN4Int, ver_TKN4Int,
+		    TKN4Int_dissectors, -1);
 }

Attachment: tkn4int.gz
Description: tkn4int.gz