Coverage Report

Created: 2025-02-15 06:25

/src/wireshark/epan/dissectors/packet-dcerpc-frsapi.c
Line
Count
Source
1
/* packet-dcerpc-frsapi.c
2
 * Routines for the frs API (File Replication Service) MSRPC interface
3
 * Copyright 2004 Jean-Baptiste Marchand <jbm@hsc.fr>
4
 *
5
 * Wireshark - Network traffic analyzer
6
 * By Gerald Combs <gerald@wireshark.org>
7
 * Copyright 1998 Gerald Combs
8
 *
9
 * SPDX-License-Identifier: GPL-2.0-or-later
10
 */
11
12
13
#include "config.h"
14
15
#include <epan/packet.h>
16
#include "packet-dcerpc.h"
17
#include "packet-dcerpc-frsapi.h"
18
19
void proto_register_dcerpc_frsapi(void);
20
void proto_reg_handoff_dcerpc_frsapi(void);
21
22
static int proto_dcerpc_frsapi;
23
24
static int hf_frsapi_opnum;
25
26
static int ett_dcerpc_frsapi;
27
28
/*
29
IDL [ uuid(d049b186-814f-11d1-9a3c-00c04fc9b232),
30
IDL  version(1.1),
31
IDL  implicit_handle(handle_t rpc_binding)
32
IDL ] interface frsapi
33
*/
34
35
static e_guid_t uuid_dcerpc_frsapi = {
36
  0xd049b186, 0x814f, 0x11d1,
37
  { 0x9a, 0x3c, 0x00, 0xc0, 0x4f, 0xc9, 0xb2, 0x32 }
38
};
39
40
static uint16_t ver_dcerpc_frsapi = 1;
41
42
43
static const dcerpc_sub_dissector dcerpc_frsapi_dissectors[] = {
44
  {  FRSAPI_VERIFY_PROMOTION,          "VerifyPromotion",        NULL, NULL },
45
  {  FRSAPI_PROMOTION_STATUS,          "PromotionStatus",        NULL, NULL },
46
  {  FRSAPI_START_DEMOTION,            "StartDemotion",          NULL, NULL },
47
  {  FRSAPI_COMMIT_DEMOTION,           "CommitDemotion",         NULL, NULL },
48
  {  FRSAPI_SET_DS_POLLING_INTERVAL_W, "Set_DsPollingIntervalW", NULL, NULL },
49
  {  FRSAPI_GET_DS_POLLING_INTERVAL_W, "Get_DsPollingIntervalW", NULL, NULL },
50
  {  FRSAPI_VERIFY_PROMOTION_W,        "VerifyPromotionW",       NULL, NULL },
51
  {  FRSAPI_INFO_W,                    "InfoW",                  NULL, NULL },
52
  {  FRSAPI_IS_PATH_REPLICATED,        "IsPathReplicated",       NULL, NULL },
53
  {  FRSAPI_WRITER_COMMAND,            "WriterCommand",          NULL, NULL },
54
  { 0, NULL, NULL,  NULL }
55
};
56
57
void
58
proto_register_dcerpc_frsapi(void)
59
14
{
60
61
14
  static hf_register_info hf[] = {
62
63
14
    { &hf_frsapi_opnum,
64
14
      { "Operation", "frsapi.opnum", FT_UINT16, BASE_DEC,
65
14
       NULL, 0x0, NULL, HFILL }},
66
14
  };
67
68
69
14
  static int *ett[] = {
70
14
    &ett_dcerpc_frsapi,
71
14
  };
72
73
74
14
  proto_dcerpc_frsapi = proto_register_protocol("Microsoft File Replication Service API", "FRSAPI", "frsapi");
75
76
14
  proto_register_field_array(proto_dcerpc_frsapi, hf, array_length(hf));
77
78
14
  proto_register_subtree_array(ett, array_length(ett));
79
80
14
}
81
82
83
void
84
proto_reg_handoff_dcerpc_frsapi(void)
85
14
{
86
  /* register protocol as dcerpc */
87
88
14
  dcerpc_init_uuid(
89
14
    proto_dcerpc_frsapi, ett_dcerpc_frsapi, &uuid_dcerpc_frsapi,
90
14
    ver_dcerpc_frsapi, dcerpc_frsapi_dissectors, hf_frsapi_opnum);
91
14
}
92
93
/*
94
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
95
 *
96
 * Local variables:
97
 * c-basic-offset: 8
98
 * tab-width: 8
99
 * indent-tabs-mode: t
100
 * End:
101
 *
102
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
103
 * :indentSize=8:tabSize=8:noTabs=false:
104
 */