Coverage Report

Created: 2026-01-02 06:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-dcerpc-iwbemloginclientid.c
Line
Count
Source
1
/* DO NOT EDIT
2
  This file was automatically generated by Pidl
3
  from iwbemloginclientid.idl and iwbemloginclientid.cnf.
4
5
  Pidl is a perl based IDL compiler for DCE/RPC idl files.
6
  It is maintained by the Samba team, not the Wireshark team.
7
  Instructions on how to download and install Pidl can be
8
  found at https://wiki.wireshark.org/Pidl
9
*/
10
11
12
#include "config.h"
13
#include <string.h>
14
#include <wsutil/array.h>
15
#include <epan/packet.h>
16
#include <epan/tfs.h>
17
18
#include "packet-dcerpc.h"
19
#include "packet-dcerpc-nt.h"
20
#include "packet-windows-common.h"
21
#include "packet-dcerpc-iwbemloginclientid.h"
22
void proto_register_dcerpc_IWbemLoginClientID(void);
23
void proto_reg_handoff_dcerpc_IWbemLoginClientID(void);
24
25
/* Ett declarations */
26
static int ett_IWbemLoginClientID_SetClientInfo_orpcthis;
27
static int ett_IWbemLoginClientID_SetClientInfo_orpcthat;
28
static int ett_dcerpc_IWbemLoginClientID;
29
static int ett_IWbemLoginClientID_ORPCTHIS;
30
static int ett_IWbemLoginClientID_ORPCTHAT;
31
32
33
/* Header field declarations */
34
static int hf_IWbemLoginClientID_SetClientInfo_lClientProcId;
35
static int hf_IWbemLoginClientID_SetClientInfo_lReserved;
36
static int hf_IWbemLoginClientID_SetClientInfo_orpcthat;
37
static int hf_IWbemLoginClientID_SetClientInfo_orpcthis;
38
static int hf_IWbemLoginClientID_SetClientInfo_wszClientMachine;
39
static int hf_IWbemLoginClientID_opnum;
40
static int hf_IWbemLoginClientID_werror;
41
42
static int proto_dcerpc_IWbemLoginClientID;
43
/* Version information */
44
45
46
static e_guid_t uuid_dcerpc_IWbemLoginClientID = {
47
  0xd4781cd6, 0xe5d3, 0x44df,
48
  { 0xad, 0x94, 0x93, 0x0e, 0xfe, 0x48, 0xa8, 0x87 }
49
};
50
static uint16_t ver_dcerpc_IWbemLoginClientID = 0;
51
52
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
53
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_wszClientMachine(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
54
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_wszClientMachine_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
55
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_lClientProcId(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
56
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_lReserved(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
57
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
58
static unsigned IWbemLoginClientID_dissect_element_SetClientInfo_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_);
59
  #include "packet-dcom.h"
60
/* SetClientInfo */
61
static unsigned
62
IWbemLoginClientID_dissect_element_SetClientInfo_orpcthis(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
63
0
{
64
0
  proto_item *sub_item;
65
0
  proto_tree *sub_tree;
66
0
  sub_item = proto_tree_add_item(tree, hf_IWbemLoginClientID_SetClientInfo_orpcthis, tvb, offset, 0, ENC_NA);
67
0
  sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLoginClientID_SetClientInfo_orpcthis);
68
0
  offset = dissect_dcom_this(tvb, offset, pinfo, sub_tree, di, drep);
69
0
  return offset;
70
0
}
71
static unsigned
72
IWbemLoginClientID_dissect_element_SetClientInfo_orpcthat_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
73
0
{
74
0
  proto_item *sub_item;
75
0
  proto_tree *sub_tree;
76
0
  sub_item = proto_tree_add_item(tree, hf_IWbemLoginClientID_SetClientInfo_orpcthat, tvb, offset, 0, ENC_NA);
77
0
  sub_tree = proto_item_add_subtree(sub_item, ett_IWbemLoginClientID_SetClientInfo_orpcthat);
78
0
  offset = dissect_dcom_that(tvb, offset, pinfo, sub_tree, di, drep);
79
0
  return offset;
80
0
}
81
82
83
/* IDL: struct { */
84
/* IDL: } */
85
86
unsigned
87
IWbemLoginClientID_dissect_struct_ORPCTHIS(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
88
0
{
89
0
  proto_item *item = NULL;
90
0
  unsigned old_offset;
91
92
0
  old_offset = offset;
93
94
0
  if (parent_tree) {
95
0
    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
96
0
  }
97
98
99
0
  proto_item_set_len(item, offset-old_offset);
100
101
102
0
  return offset;
103
0
}
104
105
106
/* IDL: struct { */
107
/* IDL: } */
108
109
unsigned
110
IWbemLoginClientID_dissect_struct_ORPCTHAT(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_, int hf_index _U_, uint32_t param _U_)
111
0
{
112
0
  proto_item *item = NULL;
113
0
  unsigned old_offset;
114
115
0
  old_offset = offset;
116
117
0
  if (parent_tree) {
118
0
    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
119
0
  }
120
121
122
0
  proto_item_set_len(item, offset-old_offset);
123
124
125
0
  return offset;
126
0
}
127
128
/* IDL: WERROR iwbemloginclientid_opnum0( */
129
/* IDL:  */
130
/* IDL: ); */
131
132
static unsigned
133
IWbemLoginClientID_dissect_iwbemloginclientid_opnum0_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
134
0
{
135
0
  uint32_t status;
136
137
0
  di->dcerpc_procedure_name="iwbemloginclientid_opnum0";
138
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLoginClientID_werror, &status);
139
140
0
  if (status != 0)
141
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
142
143
0
  return offset;
144
0
}
145
146
static unsigned
147
IWbemLoginClientID_dissect_iwbemloginclientid_opnum0_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
148
0
{
149
0
  di->dcerpc_procedure_name="iwbemloginclientid_opnum0";
150
0
  return offset;
151
0
}
152
153
/* IDL: WERROR iwbemloginclientid_opnum1( */
154
/* IDL:  */
155
/* IDL: ); */
156
157
static unsigned
158
IWbemLoginClientID_dissect_iwbemloginclientid_opnum1_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
159
0
{
160
0
  uint32_t status;
161
162
0
  di->dcerpc_procedure_name="iwbemloginclientid_opnum1";
163
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLoginClientID_werror, &status);
164
165
0
  if (status != 0)
166
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
167
168
0
  return offset;
169
0
}
170
171
static unsigned
172
IWbemLoginClientID_dissect_iwbemloginclientid_opnum1_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
173
0
{
174
0
  di->dcerpc_procedure_name="iwbemloginclientid_opnum1";
175
0
  return offset;
176
0
}
177
178
/* IDL: WERROR iwbemloginclientid_opnum2( */
179
/* IDL:  */
180
/* IDL: ); */
181
182
static unsigned
183
IWbemLoginClientID_dissect_iwbemloginclientid_opnum2_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
184
0
{
185
0
  uint32_t status;
186
187
0
  di->dcerpc_procedure_name="iwbemloginclientid_opnum2";
188
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLoginClientID_werror, &status);
189
190
0
  if (status != 0)
191
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
192
193
0
  return offset;
194
0
}
195
196
static unsigned
197
IWbemLoginClientID_dissect_iwbemloginclientid_opnum2_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
198
0
{
199
0
  di->dcerpc_procedure_name="iwbemloginclientid_opnum2";
200
0
  return offset;
201
0
}
202
203
static unsigned
204
IWbemLoginClientID_dissect_element_SetClientInfo_wszClientMachine(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
205
0
{
206
0
  offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLoginClientID_dissect_element_SetClientInfo_wszClientMachine_, NDR_POINTER_UNIQUE, "Pointer to WszClientMachine (uint16)",hf_IWbemLoginClientID_SetClientInfo_wszClientMachine);
207
208
0
  return offset;
209
0
}
210
211
static unsigned
212
IWbemLoginClientID_dissect_element_SetClientInfo_wszClientMachine_(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
213
0
{
214
0
  char *data;
215
216
0
  offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(uint16_t), hf_IWbemLoginClientID_SetClientInfo_wszClientMachine, false, &data);
217
0
  proto_item_append_text(tree, ": %s", data);
218
219
0
  return offset;
220
0
}
221
222
static unsigned
223
IWbemLoginClientID_dissect_element_SetClientInfo_lClientProcId(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
224
0
{
225
0
  offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLoginClientID_SetClientInfo_lClientProcId, 0);
226
227
0
  return offset;
228
0
}
229
230
static unsigned
231
IWbemLoginClientID_dissect_element_SetClientInfo_lReserved(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
232
0
{
233
0
  offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLoginClientID_SetClientInfo_lReserved, 0);
234
235
0
  return offset;
236
0
}
237
238
static unsigned
239
IWbemLoginClientID_dissect_element_SetClientInfo_orpcthat(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
240
0
{
241
0
  offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, IWbemLoginClientID_dissect_element_SetClientInfo_orpcthat_, NDR_POINTER_REF, "Pointer to Orpcthat (ORPCTHAT)",hf_IWbemLoginClientID_SetClientInfo_orpcthat);
242
243
0
  return offset;
244
0
}
245
246
/* IDL: WERROR SetClientInfo( */
247
/* IDL: [in] ORPCTHIS orpcthis, */
248
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *wszClientMachine, */
249
/* IDL: [in] uint32 lClientProcId, */
250
/* IDL: [in] uint32 lReserved, */
251
/* IDL: [out] [ref] ORPCTHAT *orpcthat */
252
/* IDL: ); */
253
254
static unsigned
255
IWbemLoginClientID_dissect_SetClientInfo_response(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
256
0
{
257
0
  uint32_t status;
258
259
0
  di->dcerpc_procedure_name="SetClientInfo";
260
0
  offset = IWbemLoginClientID_dissect_element_SetClientInfo_orpcthat(tvb, offset, pinfo, tree, di, drep);
261
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
262
263
0
  offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_IWbemLoginClientID_werror, &status);
264
265
0
  if (status != 0)
266
0
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str_ext(pinfo->pool, status, &WERR_errors_ext, "Unknown DOS error 0x%08x"));
267
268
0
  return offset;
269
0
}
270
271
static unsigned
272
IWbemLoginClientID_dissect_SetClientInfo_request(tvbuff_t *tvb _U_, unsigned offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, uint8_t *drep _U_)
273
0
{
274
0
  di->dcerpc_procedure_name="SetClientInfo";
275
0
  offset = IWbemLoginClientID_dissect_element_SetClientInfo_orpcthis(tvb, offset, pinfo, tree, di, drep);
276
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
277
0
  offset = IWbemLoginClientID_dissect_element_SetClientInfo_wszClientMachine(tvb, offset, pinfo, tree, di, drep);
278
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
279
0
  offset = IWbemLoginClientID_dissect_element_SetClientInfo_lClientProcId(tvb, offset, pinfo, tree, di, drep);
280
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
281
0
  offset = IWbemLoginClientID_dissect_element_SetClientInfo_lReserved(tvb, offset, pinfo, tree, di, drep);
282
0
  offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
283
0
  return offset;
284
0
}
285
286
287
static const dcerpc_sub_dissector IWbemLoginClientID_dissectors[] = {
288
  { 0, "iwbemloginclientid_opnum0",
289
     IWbemLoginClientID_dissect_iwbemloginclientid_opnum0_request, IWbemLoginClientID_dissect_iwbemloginclientid_opnum0_response},
290
  { 1, "iwbemloginclientid_opnum1",
291
     IWbemLoginClientID_dissect_iwbemloginclientid_opnum1_request, IWbemLoginClientID_dissect_iwbemloginclientid_opnum1_response},
292
  { 2, "iwbemloginclientid_opnum2",
293
     IWbemLoginClientID_dissect_iwbemloginclientid_opnum2_request, IWbemLoginClientID_dissect_iwbemloginclientid_opnum2_response},
294
  { 3, "SetClientInfo",
295
     IWbemLoginClientID_dissect_SetClientInfo_request, IWbemLoginClientID_dissect_SetClientInfo_response},
296
  { 0, NULL, NULL, NULL }
297
};
298
299
void proto_register_dcerpc_IWbemLoginClientID(void)
300
14
{
301
14
  static hf_register_info hf[] = {
302
14
  { &hf_IWbemLoginClientID_SetClientInfo_lClientProcId,
303
14
    { "LClientProcId", "IWbemLoginClientID.SetClientInfo.lClientProcId", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
304
14
  { &hf_IWbemLoginClientID_SetClientInfo_lReserved,
305
14
    { "LReserved", "IWbemLoginClientID.SetClientInfo.lReserved", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
306
14
  { &hf_IWbemLoginClientID_SetClientInfo_orpcthat,
307
14
    { "Orpcthat", "IWbemLoginClientID.SetClientInfo.orpcthat", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
308
14
  { &hf_IWbemLoginClientID_SetClientInfo_orpcthis,
309
14
    { "Orpcthis", "IWbemLoginClientID.SetClientInfo.orpcthis", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
310
14
  { &hf_IWbemLoginClientID_SetClientInfo_wszClientMachine,
311
14
    { "WszClientMachine", "IWbemLoginClientID.SetClientInfo.wszClientMachine", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
312
14
  { &hf_IWbemLoginClientID_opnum,
313
14
    { "Operation", "IWbemLoginClientID.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
314
14
  { &hf_IWbemLoginClientID_werror,
315
14
    { "Windows Error", "IWbemLoginClientID.werror", FT_UINT32, BASE_HEX|BASE_EXT_STRING, &WERR_errors_ext, 0, NULL, HFILL }},
316
14
  };
317
318
319
14
  static int *ett[] = {
320
14
    &ett_IWbemLoginClientID_SetClientInfo_orpcthis,
321
14
    &ett_IWbemLoginClientID_SetClientInfo_orpcthat,
322
14
    &ett_dcerpc_IWbemLoginClientID,
323
14
    &ett_IWbemLoginClientID_ORPCTHIS,
324
14
    &ett_IWbemLoginClientID_ORPCTHAT,
325
14
  };
326
327
14
  proto_dcerpc_IWbemLoginClientID = proto_register_protocol("IWBEMLOGINCLIENTID (pidl)", "IWBEMLOGINCLIENTID", "IWbemLoginClientID");
328
14
  proto_register_field_array(proto_dcerpc_IWbemLoginClientID, hf, array_length (hf));
329
14
  proto_register_subtree_array(ett, array_length(ett));
330
14
}
331
332
void proto_reg_handoff_dcerpc_IWbemLoginClientID(void)
333
14
{
334
14
  dcerpc_init_uuid(proto_dcerpc_IWbemLoginClientID, ett_dcerpc_IWbemLoginClientID,
335
14
    &uuid_dcerpc_IWbemLoginClientID, ver_dcerpc_IWbemLoginClientID,
336
14
    IWbemLoginClientID_dissectors, hf_IWbemLoginClientID_opnum);
337
14
}