summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-rras.c
blob: 1e0de13dd752766bb52a2f994eb341441fddb625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/* packet-dcerpc-rras.c
 * Routines for the rras (Routing and Remote Access service) MSRPC interface
 * Copyright 2005 Jean-Baptiste Marchand <jbm@hsc.fr>
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */


#include "config.h"

#include <epan/packet.h>
#include "packet-dcerpc.h"
#include "packet-dcerpc-rras.h"

void proto_register_dcerpc_rras(void);
void proto_reg_handoff_dcerpc_rras(void);

static int proto_dcerpc_rras;

static int hf_rras_opnum;

static int ett_dcerpc_rras;

/*
 * The rras MSRPC interface is typically reached using the ncacn_np transport
 * and the \pipe\ROUTER named pipe as endpoint.
 */

static e_guid_t uuid_dcerpc_rras = {
	0x8f09f000, 0xb7ed, 0x11ce,
	{ 0xbb, 0xd2, 0x00, 0x00, 0x1a, 0x18, 0x1c, 0xad }
};

static uint16_t ver_dcerpc_rras;


static const dcerpc_sub_dissector dcerpc_rras_dissectors[] = {
	{ RRAS_ADMIN_SERVER_GETINFO,
		"MprAdminServerGetInfo", NULL, NULL },
	{ RRAS_ADMIN_CONNECTION_ENUM,
		"RasAdminConnectionEnum", NULL, NULL },
	{ RRAS_ADMIN_CONNECTION_GETINFO,
		"RasAdminConnectionGetInfo", NULL, NULL },
	{ RRAS_ADMIN_CONNECTION_CLEARSTATS,
		"RasAdminConnectionClearStats", NULL, NULL },
	{ RRAS_ADMIN_PORT_ENUM,
		"RasAdminPortEnum", NULL, NULL },
	{ RRAS_ADMIN_PORT_GETINFO,
		"RasAdminPortGetInfo", NULL, NULL },
	{ RRAS_ADMIN_PORT_CLEARSTATS,
		"RasAdminPortClearStats", NULL, NULL },
	{ RRAS_ADMIN_PORT_RESET,
		"RasAdminPortReset", NULL, NULL },
	{ RRAS_ADMIN_PORT_DISCONNECT,
		"RasAdminPortDisconnect", NULL, NULL },
	{ RRAS_RI_TRANS_SET_GLOBALINFO,
		"RouterInterfaceTransportSetGlobalInfo", NULL, NULL },
	{ RRAS_RI_TRANS_GET_GLOBALINFO,
		"RouterInterfaceTransportGetGlobalInfo", NULL, NULL },
	{ RRAS_RI_GET_HANDLE,
		"RouterInterfaceGetHandle", NULL, NULL },
	{ RRAS_RI_CREATE,
		"RouterInterfaceCreate", NULL, NULL },
	{ RRAS_RI_GETINFO,
		"RouterInterfaceGetInfo", NULL, NULL },
	{ RRAS_RI_SETINFO,
		"RouterInterfaceSetInfo", NULL, NULL },
	{ RRAS_RI_DELETE,
		"RouterInterfaceDelete", NULL, NULL },
	{ RRAS_TRANS_REMOVE,
		"RouterInterfaceTransportRemove", NULL, NULL },
	{ RRAS_TRANS_ADD,
		"RouterInterfaceTransportAdd", NULL, NULL },
	{ RRAS_TRANS_GETINFO,
		"RouterInterfaceTransportGetInfo", NULL, NULL },
	{ RRAS_TRANS_SETINFO,
		"RouterInterfaceTransportSetInfo", NULL, NULL },
	{ RRAS_RI_ENUM,
		"RouterInterfaceEnum", NULL, NULL },
	{ RRAS_RI_CONNECT,
		"RouterInterfaceConnect", NULL, NULL },
	{ RRAS_RI_DISCONNECT,
		"RouterInterfaceDisconnect", NULL, NULL },
	{ RRAS_RI_UPDATE_ROUTES,
		"RouterInterfaceUpdateRoutes", NULL, NULL },
	{ RRAS_RI_QUERY_UPDATE_RESULT,
		"RouterInterfaceQueryUpdateResult", NULL, NULL },
	{ RRAS_RI_UPDATE_PB_INFO,
		"RouterInterfaceUpdatePhonebookInfo", NULL, NULL },
	{ RRAS_MIB_ENTRY_CREATE, "MIBEntryCreate", NULL, NULL },
	{ RRAS_MIB_ENTRY_DELETE, "MIBEntryDelete", NULL, NULL },
	{ RRAS_MIB_ENTRY_SET, "MIBEntrySet", NULL, NULL },
	{ RRAS_MIB_ENTRY_GET, "MIBEntryGet", NULL, NULL },
	{ RRAS_MIB_GET_FIRST, "MIBEntryGetFirst", NULL, NULL },
	{ RRAS_MIB_GET_NEXT, "MIBEntryGetNext", NULL, NULL },
	{ RRAS_GET_TRAP_INFO, "MIBGetTrapInfo", NULL, NULL },
	{ RRAS_SET_TRAP_INFO, "MIBSetTrapInfo", NULL, NULL },
	{ RRAS_ADMIN_CONNECTION_NOTIFICATION,
		"RasAdminConnectionNotification", NULL, NULL },
	{ RRAS_ADMIN_SEND_USER_MSG, "RasAdminSendUserMessage", NULL, NULL },
	{ RRAS_ROUTER_DEVICE_ENUM, "RouterDeviceEnum", NULL, NULL },
	{ RRAS_RI_TRANSPORT_CREATE,
		"RouterInterfaceTransportCreate", NULL, NULL },
	{ RRAS_RI_DEV_GETINFO, "RouterInterfaceDeviceGetInfo", NULL, NULL },
	{ RRAS_RI_DEV_SETINFO, "RouterInterfaceDeviceSetInfo", NULL, NULL },
	{ RRAS_RI_SET_CRED_EX, "RouterInterfaceSetCredentialsEx", NULL, NULL },
	{ RRAS_RI_GET_CRED_EX, "RouterInterfaceGetCredentialsEx", NULL, NULL },
	{ RRAS_ADMIN_CONNECTION_REM_QUARANT,
		"RasAdminConnectionRemoveQuarantine", NULL, NULL },
	{ 0, NULL, NULL,  NULL }
};


void
proto_register_dcerpc_rras(void)
{

	static hf_register_info hf[] = {

		{ &hf_rras_opnum,
		  { "Operation", "rras.opnum", FT_UINT16, BASE_DEC,
		   NULL, 0x0, NULL, HFILL }},
	};


	static int *ett[] = {
		&ett_dcerpc_rras,
	};


	proto_dcerpc_rras = proto_register_protocol("Microsoft Routing and Remote Access Service", "RRAS", "rras");

	proto_register_field_array(proto_dcerpc_rras, hf, array_length(hf));

	proto_register_subtree_array(ett, array_length(ett));

}


void
proto_reg_handoff_dcerpc_rras(void)
{
	/* register protocol as dcerpc */

	dcerpc_init_uuid(
		proto_dcerpc_rras, ett_dcerpc_rras, &uuid_dcerpc_rras,
		ver_dcerpc_rras, dcerpc_rras_dissectors, hf_rras_opnum);
}

/*
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
 *
 * Local variables:
 * c-basic-offset: 8
 * tab-width: 8
 * indent-tabs-mode: t
 * End:
 *
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
 * :indentSize=8:tabSize=8:noTabs=false:
 */