2 * Routines for DCOM generics
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifndef __PACKET_DCERPC_DCOM_H
26 #define __PACKET_DCERPC_DCOM_H
29 extern const value_string dcom_hresult_vals[];
30 extern const value_string dcom_variant_type_vals[];
33 extern int dcom_prefs_display_unmarshalling_details;
36 /* the essential DCOM this and that, starting every call */
38 dissect_dcom_this(tvbuff_t *tvb, int offset,
39 packet_info *pinfo, proto_tree *tree, guint8 *drep);
41 dissect_dcom_that(tvbuff_t *tvb, int offset,
42 packet_info *pinfo, proto_tree *tree, guint8 *drep);
45 /* dissection of somewhat more simple data types */
46 #define dissect_dcom_BOOLEAN dissect_ndr_uint8
47 #define dissect_dcom_BYTE dissect_ndr_uint8
48 #define dissect_dcom_WORD dissect_ndr_uint16
49 #define dissect_dcom_DWORD dissect_ndr_uint32
50 #define dissect_dcom_I8 dissect_ndr_uint64
51 #define dissect_dcom_ID dissect_ndr_duint32
52 #define dissect_dcom_UUID dissect_ndr_uuid_t
53 #define dissect_dcom_FILETIME dissect_ndr_duint32 /* ToBeDone */
54 #define dissect_dcom_VARIANT_BOOL dissect_ndr_uint16
55 #define dissect_dcom_FLOAT dissect_ndr_float
56 #define dissect_dcom_DOUBLE dissect_ndr_double
57 #define dissect_dcom_DATE dissect_ndr_double
60 dissect_dcom_append_UUID(tvbuff_t *tvb, int offset,
61 packet_info *pinfo, proto_tree *tree, guint8 *drep,
62 int hfindex, gchar *field_name, int field_index);
63 extern gchar* dcom_uuid_to_str(e_uuid_t *uuid);
66 dissect_dcom_indexed_WORD(tvbuff_t *tvb, int offset, packet_info *pinfo,
67 proto_tree *tree, guint8 *drep,
68 int hfindex, guint16 * pu16WORD, int field_index);
71 dissect_dcom_indexed_DWORD(tvbuff_t *tvb, int offset, packet_info *pinfo,
72 proto_tree *tree, guint8 *drep,
73 int hfindex, guint32 * pu32DWORD, int field_index);
76 dissect_dcom_HRESULT(tvbuff_t *tvb, int offset,
77 packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 * pu32hresult);
80 dissect_dcom_indexed_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo,
81 proto_tree *tree, guint8 *drep,
82 guint32 * pu32hresult, int field_index);
85 dissect_dcom_COMVERSION(tvbuff_t *tvb, int offset,
86 packet_info *pinfo, proto_tree *tree, guint8 *drep,
87 guint16 * pu16version_major, guint16 * pu16version_minor);
90 dissect_dcom_LPWSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo,
91 proto_tree *tree, guint8 *drep, int hfindex,
92 gchar *psz_buffer, guint32 u32max_buffer);
95 dissect_dcom_indexed_LPWSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo,
96 proto_tree *tree, guint8 *drep, int hfindex,
97 gchar *pszStr, guint32 u32MaxStr, int field_index);
100 dissect_dcom_BSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo,
101 proto_tree *tree, guint8 *drep, int hfindex,
102 gchar *psz_buffer, guint32 u32max_buffer);
105 dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo,
106 proto_tree *tree, guint8 *drep, int hfindex);
109 dissect_dcom_STDOBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo,
110 proto_tree *tree, guint8 *drep, int hfindex);
113 dissect_dcom_OBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo,
114 proto_tree *tree, guint8 *drep, int hfindex);
117 dissect_dcom_MInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
118 proto_tree *tree, guint8 *drep, int hfindex);
120 dissect_dcom_PMInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
121 proto_tree *tree, guint8 *drep, int hfindex);
124 dissect_dcom_VARTYPE(tvbuff_t *tvb, int offset,
125 packet_info *pinfo, proto_tree *tree, guint8 *drep,
126 guint16 *pu16Vartype);
129 dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo,
130 proto_tree *tree, guint8 *drep, int hfindex);
132 /* dcom "dcerpc internal" unmarshalling */
134 dissect_dcom_dcerpc_array_size(tvbuff_t *tvb, gint offset, packet_info *pinfo,
135 proto_tree *tree, guint8 *drep, guint32 *pu32array_size);
138 dissect_dcom_dcerpc_pointer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
139 proto_tree *tree, guint8 *drep, guint32 *pu32pointer);
141 /* mark things to be done */
143 dissect_dcom_tobedone_data(tvbuff_t *tvb, int offset,
144 packet_info *pinfo, proto_tree *tree, guint8 *drep, int length);
146 /* very simple parameter-profiles dissectors (for very simple requests ;-) */
147 /* request: no parameters */
149 dissect_dcom_simple_rqst(tvbuff_t *tvb, int offset,
150 packet_info *pinfo, proto_tree *tree, guint8 *drep);
151 /* response: only HRESULT */
153 dissect_dcom_simple_resp(tvbuff_t *tvb, int offset,
154 packet_info *pinfo, proto_tree *tree, guint8 *drep);
156 void dcom_register_server_coclass(int proto, int ett,
157 e_uuid_t *uuid, guint16 ver,
158 dcerpc_sub_dissector *sub_dissectors, int opnum_hf);
160 #endif /* packet-dcerpc-dcom.h */