1 /* packet-dcerpc-tapi.c
2 * Routines for DCERPC TAPI packet disassembly
3 * Copyright 2002, Ronnie Sahlberg
5 * $Id: packet-dcerpc-tapi.c,v 1.1 2002/06/02 12:33:15 sahlberg Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 /* The IDL file for this interface can be extracted by grepping for idl
34 #include <epan/packet.h>
35 #include "packet-dcerpc.h"
36 #include "packet-dcerpc-nt.h"
37 #include "packet-dcerpc-tapi.h"
40 static int proto_dcerpc_tapi = -1;
41 static int hf_tapi_rc = -1;
42 static int hf_tapi_hnd = -1;
43 static int hf_tapi_unknown_long = -1;
44 static int hf_tapi_unknown_string = -1;
45 static int hf_tapi_unknown_bytes = -1;
47 static gint ett_dcerpc_tapi = -1;
50 IDL [ uuid(2f5f6520-ca46-1067-b319-00dd010662da),
52 IDL implicit_handle(handle_t rpc_binding)
56 static e_uuid_t uuid_dcerpc_tapi = {
57 0x2f5f6520, 0xca46, 0x1067,
58 { 0xb3, 0x19, 0x00, 0xdd, 0x01, 0x06, 0x62, 0xda }
61 static guint16 ver_dcerpc_tapi = 1;
65 IDL [out] [context_handle] void *element_1,
66 IDL [in] long element_2,
67 IDL [out] long element_3,
68 IDL [in] [string] [ref] wchar_t *element_4,
69 IDL [in] [string] [ref] wchar_t *element_5
73 dissect_tapi_UNKNOWN_00_rqst(tvbuff_t *tvb, int offset,
74 packet_info *pinfo, proto_tree *tree,
77 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
78 hf_tapi_unknown_long, NULL);
80 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
81 dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
82 "unknown string", hf_tapi_unknown_string, 0);
84 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
85 dissect_ndr_nt_UNICODE_STRING_str, NDR_POINTER_REF,
86 "unknown string", hf_tapi_unknown_string, 0);
91 dissect_tapi_UNKNOWN_00_reply(tvbuff_t *tvb, int offset,
92 packet_info *pinfo, proto_tree *tree,
95 offset = dissect_ndr_ctx_hnd(tvb, offset, pinfo, tree, drep,
98 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
99 hf_tapi_unknown_long, NULL);
101 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
108 IDL long Function_01(
109 IDL [in] [context_handle] void *element_6,
110 IDL [in,out] [size_is(element_8)] [length_is(???)] char element_7[*],
111 IDL [in] long element_8
115 dissect_tapi_TYPE_1(tvbuff_t *tvb, int offset,
116 packet_info *pinfo, proto_tree *tree,
121 di=pinfo->private_data;
122 if(di->conformant_run){
123 /* this call is to make ethereal eat the array header for the conformant run */
124 offset =dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, NULL);
129 proto_tree_add_item(tree, hf_tapi_unknown_bytes, tvb, offset,
130 di->array_actual_count, FALSE);
131 offset += di->array_actual_count;
137 dissect_tapi_UNKNOWN_01_rqst(tvbuff_t *tvb, int offset,
138 packet_info *pinfo, proto_tree *tree,
141 offset = dissect_ndr_ctx_hnd(tvb, offset, pinfo, tree, drep,
144 offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep,
145 dissect_tapi_TYPE_1, NDR_POINTER_REF,
146 "unknown array", -1, 0);
148 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
149 hf_tapi_unknown_long, NULL);
154 dissect_tapi_UNKNOWN_01_reply(tvbuff_t *tvb, int offset,
155 packet_info *pinfo, proto_tree *tree,
158 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
166 IDL void Function_02(
171 dissect_tapi_UNKNOWN_02_rqst(tvbuff_t *tvb _U_, int offset _U_,
172 packet_info *pinfo _U_, proto_tree *tree _U_,
178 dissect_tapi_UNKNOWN_02_reply(tvbuff_t *tvb _U_, int offset _U_,
179 packet_info *pinfo _U_, proto_tree *tree _U_,
188 static dcerpc_sub_dissector dcerpc_tapi_dissectors[] = {
189 { TAPI_UNKNOWN_00, "TAPI_UNKNOWN_00",
190 dissect_tapi_UNKNOWN_00_rqst,
191 dissect_tapi_UNKNOWN_00_reply },
192 { TAPI_UNKNOWN_01, "TAPI_UNKNOWN_01",
193 dissect_tapi_UNKNOWN_01_rqst,
194 dissect_tapi_UNKNOWN_01_reply },
195 { TAPI_UNKNOWN_02, "TAPI_UNKNOWN_02",
196 dissect_tapi_UNKNOWN_02_rqst,
197 dissect_tapi_UNKNOWN_02_reply },
199 {0, NULL, NULL, NULL }
203 proto_register_dcerpc_tapi(void)
205 static hf_register_info hf[] = {
207 "Return code", "tapi.rc", FT_UINT32, BASE_HEX,
208 VALS(NT_errors), 0x0, "TAPI return code", HFILL }},
210 "Context Handle", "tapi.hnd", FT_BYTES, BASE_NONE,
211 NULL, 0x0, "Context handle", HFILL }},
212 { &hf_tapi_unknown_long, {
213 "Unknown long", "tapi.unknown.long", FT_UINT32, BASE_HEX,
214 NULL, 0x0, "Unknown long. If you know what this is, contact ethereal developers.", HFILL }},
215 { &hf_tapi_unknown_string, {
216 "Unknown string", "tapi.unknown.string", FT_STRING, BASE_HEX,
217 NULL, 0x0, "Unknown string. If you know what this is, contact ethereal developers.", HFILL }},
218 { &hf_tapi_unknown_bytes, {
219 "Unknown bytes", "tapi.unknown.bytes", FT_BYTES, BASE_HEX,
220 NULL, 0x0, "Unknown bytes. If you know what this is, contact ethereal developers.", HFILL }}
223 static gint *ett[] = {
227 proto_dcerpc_tapi = proto_register_protocol(
228 "Microsoft Telephony API Service", "TAPI", "tapi");
230 proto_register_field_array(proto_dcerpc_tapi, hf,
233 proto_register_subtree_array(ett, array_length(ett));
237 proto_reg_handoff_dcerpc_tapi(void)
239 /* Register protocol as dcerpc */
241 dcerpc_init_uuid(proto_dcerpc_tapi, ett_dcerpc_tapi,
242 &uuid_dcerpc_tapi, ver_dcerpc_tapi,
243 dcerpc_tapi_dissectors);