checkAPIs.pl: support for new-style dissectors in check_hf_entries
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-frsapi.c
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 = -1;
23
24 static int hf_frsapi_opnum = -1;
25
26 static gint ett_dcerpc_frsapi = -1;
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 guint16 ver_dcerpc_frsapi = 1;
41
42
43 static 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 {
60
61         static hf_register_info hf[] = {
62
63                 { &hf_frsapi_opnum,
64                   { "Operation", "frsapi.opnum", FT_UINT16, BASE_DEC,
65                    NULL, 0x0, NULL, HFILL }},
66         };
67
68
69         static gint *ett[] = {
70                 &ett_dcerpc_frsapi,
71         };
72
73
74         proto_dcerpc_frsapi = proto_register_protocol(
75                 "Microsoft File Replication Service API", "FRSAPI", "frsapi");
76
77         proto_register_field_array(proto_dcerpc_frsapi, hf, array_length(hf));
78
79         proto_register_subtree_array(ett, array_length(ett));
80
81 }
82
83
84 void
85 proto_reg_handoff_dcerpc_frsapi(void)
86 {
87         /* register protocol as dcerpc */
88
89         dcerpc_init_uuid(
90                 proto_dcerpc_frsapi, ett_dcerpc_frsapi, &uuid_dcerpc_frsapi,
91                 ver_dcerpc_frsapi, dcerpc_frsapi_dissectors, hf_frsapi_opnum);
92 }
93
94 /*
95  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
96  *
97  * Local variables:
98  * c-basic-offset: 8
99  * tab-width: 8
100  * indent-tabs-mode: t
101  * End:
102  *
103  * vi: set shiftwidth=8 tabstop=8 noexpandtab:
104  * :indentSize=8:tabSize=8:noTabs=false:
105  */