Coverage Report

Created: 2025-12-27 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-dcerpc-rs_misc.c
Line
Count
Source
1
/* packet-dcerpc-rs_misc.c
2
 *
3
 * Routines for dcerpc RS-MISC
4
 * Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.com>
5
 * This information is based off the released idl files from opengroup.
6
 * ftp://ftp.opengroup.org/pub/dce122/dce/src/security.tar.gz security/idl/rs_misc.idl
7
 *
8
 * Wireshark - Network traffic analyzer
9
 * By Gerald Combs <gerald@wireshark.org>
10
 * Copyright 1998 Gerald Combs
11
 *
12
 * SPDX-License-Identifier: GPL-2.0-or-later
13
 */
14
15
#include "config.h"
16
17
18
#include <epan/packet.h>
19
#include "packet-dcerpc.h"
20
21
void proto_register_rs_misc (void);
22
void proto_reg_handoff_rs_misc (void);
23
24
static int proto_rs_misc;
25
static int hf_rs_misc_opnum;
26
static int hf_rs_misc_login_get_info_rqst_var;
27
static int hf_rs_misc_login_get_info_rqst_key_size;
28
static int hf_rs_misc_login_get_info_rqst_key_t;
29
30
31
static int ett_rs_misc;
32
33
34
static e_guid_t uuid_rs_misc = { 0x4c878280, 0x5000, 0x0000, { 0x0d, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00, 0x00 } };
35
static uint16_t ver_rs_misc = 1;
36
37
38
static int
39
rs_misc_dissect_login_get_info_rqst (tvbuff_t *tvb, int offset,
40
  packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
41
0
{
42
43
0
  uint32_t key_size;
44
0
  const uint8_t *key_t1 = NULL;
45
46
0
  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
47
0
      hf_rs_misc_login_get_info_rqst_var, NULL);
48
0
  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
49
0
      hf_rs_misc_login_get_info_rqst_key_size, &key_size);
50
51
0
  if (key_size){ /* Not able to yet decipher the OTHER versions of this call just yet. */
52
53
0
    proto_tree_add_item_ret_string(tree, hf_rs_misc_login_get_info_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA, pinfo->pool, &key_t1);
54
0
    offset += key_size;
55
56
0
    col_append_fstr(pinfo->cinfo, COL_INFO,
57
0
        "rs_login_get_info Request for: %s ", key_t1);
58
0
  } else {
59
0
    col_append_str(pinfo->cinfo, COL_INFO,
60
0
        "rs_login_get_info Request (other)");
61
0
  }
62
63
0
  return offset;
64
0
}
65
66
67
static const dcerpc_sub_dissector rs_misc_dissectors[] = {
68
  { 0, "login_get_info", rs_misc_dissect_login_get_info_rqst, NULL},
69
  { 1, "wait_until_consistent", NULL, NULL},
70
  { 2, "check_consistency", NULL, NULL},
71
  { 0, NULL, NULL, NULL }
72
};
73
74
void
75
proto_register_rs_misc (void)
76
14
{
77
14
  static hf_register_info hf[] = {
78
14
  { &hf_rs_misc_opnum,
79
14
    { "Operation", "rs_misc.opnum", FT_UINT16, BASE_DEC,
80
14
    NULL, 0x0, NULL, HFILL }},
81
14
  { &hf_rs_misc_login_get_info_rqst_var,
82
14
    { "Var", "rs_misc.login_get_info_rqst_var", FT_UINT32, BASE_DEC,
83
14
    NULL, 0x0, NULL, HFILL }},
84
14
  { &hf_rs_misc_login_get_info_rqst_key_size,
85
14
    { "Key Size", "rs_misc.login_get_info_rqst_key_size", FT_UINT32, BASE_DEC,
86
14
    NULL, 0x0, NULL, HFILL }},
87
14
  { &hf_rs_misc_login_get_info_rqst_key_t,
88
14
    { "Key", "rs_misc.login_get_info_rqst_key_t", FT_STRING, BASE_NONE,
89
14
    NULL, 0x0, NULL, HFILL }}
90
14
  };
91
92
14
  static int *ett[] = {
93
14
    &ett_rs_misc,
94
14
  };
95
14
  proto_rs_misc = proto_register_protocol ("DCE/RPC RS_MISC", "rs_misc", "rs_misc");
96
14
  proto_register_field_array (proto_rs_misc, hf, array_length (hf));
97
14
  proto_register_subtree_array (ett, array_length (ett));
98
14
}
99
100
void
101
proto_reg_handoff_rs_misc (void)
102
14
{
103
  /* Register the protocol as dcerpc */
104
14
  dcerpc_init_uuid (proto_rs_misc, ett_rs_misc, &uuid_rs_misc, ver_rs_misc, rs_misc_dissectors, hf_rs_misc_opnum);
105
14
}
106
107
/*
108
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
109
 *
110
 * Local variables:
111
 * c-basic-offset: 8
112
 * tab-width: 8
113
 * indent-tabs-mode: t
114
 * End:
115
 *
116
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
117
 * :indentSize=8:tabSize=8:noTabs=false:
118
 */