From Hannes Gredler: make the IS-IS dissector more verbose in the INFO
[obnox/wireshark/wip.git] / packet-dcerpc.h
index 92ec7e100cabe6be12a74b5a203fc90941ad5cde..1fd58d436915bbedaf86ae47a069150be1d0c1b5 100644 (file)
@@ -1,22 +1,22 @@
 /* packet-dcerpc.h
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc.h,v 1.9 2002/01/25 08:35:59 guy Exp $
+ * $Id: packet-dcerpc.h,v 1.19 2002/08/28 21:00:12 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -74,21 +74,26 @@ typedef struct _e_dce_dg_common_hdr_t {
 
 
 
-#define PDU_REQ        0
-#define PDU_PING       1
-#define PDU_RESP       2
-#define PDU_FAULT      3
-#define PDU_WORKING    4
-#define PDU_NOCALL     5
-#define PDU_REJECT     6
-#define PDU_ACK        7
-#define PDU_FACK       9
-#define PDU_BIND      11
-#define PDU_BIND_ACK  12
-#define PDU_BIND_NAK  13
-#define PDU_ALTER     14
-#define PDU_ALTER_ACK 15
-#define PDU_AUTH3     16
+#define PDU_REQ         0
+#define PDU_PING        1
+#define PDU_RESP        2
+#define PDU_FAULT       3
+#define PDU_WORKING     4
+#define PDU_NOCALL      5
+#define PDU_REJECT      6
+#define PDU_ACK         7
+#define PDU_CL_CANCEL   8
+#define PDU_FACK        9
+#define PDU_CANCEL_ACK 10
+#define PDU_BIND       11
+#define PDU_BIND_ACK   12
+#define PDU_BIND_NAK   13
+#define PDU_ALTER      14
+#define PDU_ALTER_ACK  15
+#define PDU_AUTH3      16
+#define PDU_SHUTDOWN   17
+#define PDU_CO_CANCEL  18
+#define PDU_ORPHANED   19
 
 /*
  * helpers for packet-dcerpc.c and packet-dcerpc-ndr.c
@@ -99,33 +104,39 @@ guint16 dcerpc_tvb_get_ntohs (tvbuff_t *tvb, gint offset, char *drep);
 guint32 dcerpc_tvb_get_ntohl (tvbuff_t *tvb, gint offset, char *drep);
 void dcerpc_tvb_get_uuid (tvbuff_t *tvb, gint offset, char *drep, e_uuid_t *uuid);
 int dissect_dcerpc_uint8 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                          proto_tree *tree, char *drep, 
+                          proto_tree *tree, char *drep,
                           int hfindex, guint8 *pdata);
 int dissect_dcerpc_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                           proto_tree *tree, char *drep, 
+                           proto_tree *tree, char *drep,
                            int hfindex, guint16 *pdata);
 int dissect_dcerpc_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                           proto_tree *tree, char *drep, 
+                           proto_tree *tree, char *drep,
                            int hfindex, guint32 *pdata);
+int dissect_dcerpc_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                           proto_tree *tree, char *drep,
+                           int hfindex, unsigned char *pdata);
 
 
 /*
  * NDR routines for subdissectors.
  */
 int dissect_ndr_uint8 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                       proto_tree *tree, char *drep, 
+                       proto_tree *tree, char *drep,
                        int hfindex, guint8 *pdata);
 int dissect_ndr_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                        proto_tree *tree, char *drep, 
+                        proto_tree *tree, char *drep,
                         int hfindex, guint16 *pdata);
 int dissect_ndr_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                        proto_tree *tree, char *drep, 
+                        proto_tree *tree, char *drep,
                         int hfindex, guint32 *pdata);
+int dissect_ndr_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                        proto_tree *tree, char *drep,
+                        int hfindex, unsigned char *pdata);
 int dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                        proto_tree *tree, char *drep, 
+                        proto_tree *tree, char *drep,
                         int hfindex, e_uuid_t *pdata);
 int dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                         proto_tree *tree, char *drep, 
+                         proto_tree *tree, char *drep,
                          int hfindex, e_ctx_hnd *pdata);
 
 
@@ -134,15 +145,22 @@ typedef int (dcerpc_dissect_fnct_t)(tvbuff_t *tvb, int offset, packet_info *pinf
 #define NDR_POINTER_REF                1
 #define NDR_POINTER_UNIQUE     2
 #define NDR_POINTER_PTR                3
+
 int dissect_ndr_pointer (tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                        proto_tree *tree, char *drep, 
-                        dcerpc_dissect_fnct_t *fnct, int type, int hf_index);
+                        proto_tree *tree, char *drep,
+                        dcerpc_dissect_fnct_t *fnct, int type, char *text, int hf_index, int levels);
 
 /* dissect a NDR unidimensional conformant array */
 int dissect_ndr_ucarray(tvbuff_t *tvb, gint offset, packet_info *pinfo,
-                        proto_tree *tree, char *drep, 
+                        proto_tree *tree, char *drep,
                         dcerpc_dissect_fnct_t *fnct);
 
+/* dissect a NDR unidimensional conformant and varying array */
+int dissect_ndr_ucvarray(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                        proto_tree *tree, char *drep,
+                        dcerpc_dissect_fnct_t *fnct);
+
+
 
 typedef struct _dcerpc_sub_dissector {
     guint16 num;
@@ -152,7 +170,7 @@ typedef struct _dcerpc_sub_dissector {
 } dcerpc_sub_dissector;
 
 /* registration function for subdissectors */
-void dcerpc_init_uuid (int proto, int ett, e_uuid_t *uuid, guint16 ver, dcerpc_sub_dissector *procs);
+void dcerpc_init_uuid (int proto, int ett, e_uuid_t *uuid, guint16 ver, dcerpc_sub_dissector *procs, int opnum_hf);
 
 /* Private data structure to pass to DCERPC dissector. This is used to
    pass transport specific information down to the dissector from the
@@ -175,8 +193,8 @@ typedef struct _dcerpc_call_value {
     e_uuid_t uuid;
     guint16 ver;
     guint16 opnum;
-    gint32 req_frame;
-    gint32 rep_frame;
+    guint32 req_frame;
+    guint32 rep_frame;
     guint32 max_ptr;
     void *private_data;
 } dcerpc_call_value;
@@ -186,8 +204,18 @@ typedef struct _dcerpc_info {
        guint32 call_id;        /* Context id for this call */
        guint16 smb_fid;        /* FID for DCERPC over SMB */
        gboolean request;
+       gboolean conformant_run;
+       gint32 conformant_eaten; /* how many bytes did the conformant run eat?*/
+       guint32 array_max_count;        /* max_count for conformant arrays */
+       guint32 array_max_count_offset;
+       guint32 array_offset;
+       guint32 array_offset_offset;
+       guint32 array_actual_count;
+       guint32 array_actual_count_offset;
        int hf_index;
+       int levels;                    /* number of levels upwards in the tree to append text*/
        dcerpc_call_value *call_data;
+       void *private_data;
 } dcerpc_info;
 
 #endif /* packet-dcerpc.h */