2005-01-20 05:06:38 +00:00
|
|
|
/* packet-dcerpc-rras.c
|
2011-09-21 23:42:55 +00:00
|
|
|
* Routines for the rras (Routing and Remote Access service) MSRPC interface
|
2005-01-20 05:06:38 +00:00
|
|
|
* Copyright 2005 Jean-Baptiste Marchand <jbm@hsc.fr>
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-01-20 05:06:38 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2005-01-20 05:06:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <epan/packet.h>
|
|
|
|
#include "packet-dcerpc.h"
|
|
|
|
#include "packet-dcerpc-rras.h"
|
|
|
|
|
|
|
|
static int proto_dcerpc_rras = -1;
|
|
|
|
|
2013-01-26 21:42:36 +00:00
|
|
|
static int hf_rras_opnum = -1;
|
2005-01-20 05:06:38 +00:00
|
|
|
|
|
|
|
static gint ett_dcerpc_rras = -1;
|
|
|
|
|
2011-09-21 23:42:55 +00:00
|
|
|
/*
|
2005-01-20 05:06:38 +00:00
|
|
|
* The rras MSRPC interface is typically reached using the ncacn_np transport
|
|
|
|
* and the \pipe\ROUTER named pipe as endpoint.
|
|
|
|
*/
|
|
|
|
|
|
|
|
static e_uuid_t uuid_dcerpc_rras = {
|
|
|
|
0x8f09f000, 0xb7ed, 0x11ce,
|
|
|
|
{ 0xbb, 0xd2, 0x00, 0x00, 0x1a, 0x18, 0x1c, 0xad }
|
|
|
|
};
|
|
|
|
|
2011-09-21 23:42:55 +00:00
|
|
|
static guint16 ver_dcerpc_rras = 0;
|
2005-01-20 05:06:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
static dcerpc_sub_dissector dcerpc_rras_dissectors[] = {
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_SERVER_GETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"MprAdminServerGetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_CONNECTION_ENUM,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminConnectionEnum", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_CONNECTION_GETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminConnectionGetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_CONNECTION_CLEARSTATS,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminConnectionClearStats", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_PORT_ENUM,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminPortEnum", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_PORT_GETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminPortGetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_PORT_CLEARSTATS,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminPortClearStats", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_PORT_RESET,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminPortReset", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_PORT_DISCONNECT,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminPortDisconnect", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_TRANS_SET_GLOBALINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceTransportSetGlobalInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_TRANS_GET_GLOBALINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceTransportGetGlobalInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_GET_HANDLE,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceGetHandle", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_CREATE,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceCreate", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_GETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceGetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_SETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceSetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_DELETE,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceDelete", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_TRANS_REMOVE,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceTransportRemove", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_TRANS_ADD,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceTransportAdd", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_TRANS_GETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceTransportGetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_TRANS_SETINFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceTransportSetInfo", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_ENUM,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceEnum", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_CONNECT,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceConnect", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_DISCONNECT,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceDisconnect", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_UPDATE_ROUTES,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceUpdateRoutes", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_QUERY_UPDATE_RESULT,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RouterInterfaceQueryUpdateResult", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_UPDATE_PB_INFO,
|
2005-01-20 05:06:38 +00:00
|
|
|
"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 },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_ADMIN_CONNECTION_NOTIFICATION,
|
2005-01-20 05:06:38 +00:00
|
|
|
"RasAdminConnectionNotification", NULL, NULL },
|
|
|
|
{ RRAS_ADMIN_SEND_USER_MSG, "RasAdminSendUserMessage", NULL, NULL },
|
|
|
|
{ RRAS_ROUTER_DEVICE_ENUM, "RouterDeviceEnum", NULL, NULL },
|
2011-09-21 23:42:55 +00:00
|
|
|
{ RRAS_RI_TRANSPORT_CREATE,
|
2005-01-20 05:06:38 +00:00
|
|
|
"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[] = {
|
|
|
|
|
2011-09-21 23:42:55 +00:00
|
|
|
{ &hf_rras_opnum,
|
2005-01-20 05:06:38 +00:00
|
|
|
{ "Operation", "rras.opnum", FT_UINT16, BASE_DEC,
|
2011-09-21 23:42:55 +00:00
|
|
|
NULL, 0x0, NULL, HFILL }},
|
2005-01-20 05:06:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static gint *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);
|
|
|
|
}
|