aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-04-26 00:19:24 +0000
committerTim Potter <tpot@samba.org>2003-04-26 00:19:24 +0000
commit6eca21154b0c5a8797c5d0ebb6f7c3733555652d (patch)
treefdb006a9a615661dcd89e8cf99e1ae555d513376
parentb0c8b2da8810de0e4c2c3d7ab4b3367116285ec1 (diff)
New DCERPC pipe for Windows service control. Implemented only stubs so far.
svn path=/trunk/; revision=7567
-rw-r--r--Makefile.am4
-rw-r--r--Makefile.nmake3
-rw-r--r--packet-dcerpc-svcctl.c111
-rw-r--r--packet-dcerpc-svcctl.h44
4 files changed, 160 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 8a7d40c044..5332ff119e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.577 2003/04/25 21:09:34 guy Exp $
+# $Id: Makefile.am,v 1.578 2003/04/26 00:19:24 tpot Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@@ -164,6 +164,7 @@ DISSECTOR_SRC = \
packet-dcerpc-secidmap.c \
packet-dcerpc-spoolss.c \
packet-dcerpc-srvsvc.c \
+ packet-dcerpc-svcctl.c \
packet-dcerpc-tapi.c \
packet-dcerpc-tkn4int.c \
packet-dcerpc-ubikdisk.c \
@@ -549,6 +550,7 @@ noinst_HEADERS = \
packet-dcerpc-samr.h \
packet-dcerpc-spoolss.h \
packet-dcerpc-srvsvc.h \
+ packet-dcerpc-svcctl.h \
packet-dcerpc-tapi.h \
packet-dcerpc-wkssvc.h \
packet-dcerpc.h \
diff --git a/Makefile.nmake b/Makefile.nmake
index 359840beef..4ae9f79943 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -1,7 +1,7 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
-# $Id: Makefile.nmake,v 1.295 2003/04/25 21:09:34 guy Exp $
+# $Id: Makefile.nmake,v 1.296 2003/04/26 00:19:24 tpot Exp $
include config.nmake
include <win32.mak>
@@ -106,6 +106,7 @@ DISSECTOR_SRC = \
packet-dcerpc-secidmap.c \
packet-dcerpc-spoolss.c \
packet-dcerpc-srvsvc.c \
+ packet-dcerpc-svcctl.c \
packet-dcerpc-tapi.c \
packet-dcerpc-tkn4int.c \
packet-dcerpc-ubikdisk.c \
diff --git a/packet-dcerpc-svcctl.c b/packet-dcerpc-svcctl.c
new file mode 100644
index 0000000000..e2029cc2ce
--- /dev/null
+++ b/packet-dcerpc-svcctl.c
@@ -0,0 +1,111 @@
+/* packet-dcerpc-svcctl.c
+ * Routines for SMB \PIPE\svcctl packet disassembly
+ * Copyright 2003, Tim Potter <tpot@samba.org>
+ *
+ * $Id: packet-dcerpc-svcctl.c,v 1.1 2003/04/26 00:19:23 tpot Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * 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
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include "packet-dcerpc.h"
+#include "packet-dcerpc-svcctl.h"
+
+static int proto_dcerpc_svcctl = -1;
+static int hf_svcctl_opnum = -1;
+
+static gint ett_dcerpc_svcctl = -1;
+
+static e_uuid_t uuid_dcerpc_svcctl = {
+ 0x367abb81, 0x9844, 0x35f1,
+ { 0xad, 0x32, 0x98, 0xf0, 0x38, 0x00, 0x10, 0x03 }
+};
+
+static guint16 ver_dcerpc_svcctl = 2;
+
+static dcerpc_sub_dissector dcerpc_svcctl_dissectors[] = {
+ { SVC_CLOSE, "Close", NULL, NULL },
+ { SVC_STOP_SERVICE, "Stop", NULL, NULL },
+ { SVC_DELETE, "Delete", NULL, NULL },
+ { SVC_UNKNOWN_3, "Unknown 0x03", NULL, NULL },
+ { SVC_GET_SVC_SEC, "Get security", NULL, NULL },
+ { SVC_CHANGE_SVC_CONFIG, "Change config", NULL, NULL },
+ { SVC_ENUM_SVCS_STATUS, "Enum status", NULL, NULL },
+ { SVC_OPEN_SC_MAN, "Open SC Manager", NULL, NULL },
+ { SVC_OPEN_SERVICE, "Open service", NULL, NULL },
+ { SVC_QUERY_SVC_CONFIG, "Query config", NULL, NULL },
+ { SVC_START_SERVICE, "Start", NULL, NULL },
+ { SVC_QUERY_DISP_NAME, "Query display name", NULL, NULL },
+ { SVC_OPEN_SC_MAN_A, "Open SC Manager A", NULL, NULL },
+ { SVC_OPEN_SERVICE_A, "Open Service A", NULL, NULL },
+ {0, NULL, NULL, NULL}
+};
+
+static const value_string svcctl_opnum_vals[] = {
+ { SVC_CLOSE, "Close" },
+ { SVC_STOP_SERVICE, "Stop" },
+ { SVC_DELETE, "Delete" },
+ { SVC_UNKNOWN_3, "Unknown 0x03" },
+ { SVC_GET_SVC_SEC, "Get security" },
+ { SVC_CHANGE_SVC_CONFIG, "Change config" },
+ { SVC_ENUM_SVCS_STATUS, "Enum status" },
+ { SVC_OPEN_SC_MAN, "Open SC Manager" },
+ { SVC_OPEN_SERVICE, "Open service" },
+ { SVC_QUERY_SVC_CONFIG, "Query config" },
+ { SVC_START_SERVICE, "Start" },
+ { SVC_QUERY_DISP_NAME, "Query display name" },
+ { SVC_OPEN_SC_MAN_A, "Open SC Manager A" },
+ { SVC_OPEN_SERVICE_A, "Open Service A" },
+ { 0, NULL }
+};
+
+void
+proto_register_dcerpc_svcctl(void)
+{
+ static hf_register_info hf[] = {
+ { &hf_svcctl_opnum,
+ { "Operation", "svcctl.opnum", FT_UINT16, BASE_DEC,
+ VALS(svcctl_opnum_vals), 0x0, "Operation", HFILL }},
+ };
+
+ static gint *ett[] = {
+ &ett_dcerpc_svcctl,
+ };
+
+ proto_dcerpc_svcctl = proto_register_protocol(
+ "Microsoft Service Control", "SVCCTL", "svcctl");
+
+ proto_register_field_array(proto_dcerpc_svcctl, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_dcerpc_svcctl(void)
+{
+ /* Register protocol as dcerpc */
+
+ dcerpc_init_uuid(proto_dcerpc_svcctl, ett_dcerpc_svcctl,
+ &uuid_dcerpc_svcctl, ver_dcerpc_svcctl,
+ dcerpc_svcctl_dissectors, hf_svcctl_opnum);
+}
diff --git a/packet-dcerpc-svcctl.h b/packet-dcerpc-svcctl.h
new file mode 100644
index 0000000000..f67d132f6b
--- /dev/null
+++ b/packet-dcerpc-svcctl.h
@@ -0,0 +1,44 @@
+/* packet-dcerpc-svcctl.h
+ * Routines for SMB \PIPE\svcctl packet disassembly
+ * Copyright 2003, Tim Potter <tpot@samba.org>
+ *
+ * $Id: packet-dcerpc-svcctl.h,v 1.1 2003/04/26 00:19:23 tpot Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * 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
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PACKET_DCERPC_SVCCTL_H
+#define __PACKET_DCERPC_SVCCTL_H
+
+#define SVC_CLOSE 0x00
+#define SVC_STOP_SERVICE 0x01
+#define SVC_DELETE 0x02
+#define SVC_UNKNOWN_3 0x03
+#define SVC_GET_SVC_SEC 0x04
+#define SVC_CHANGE_SVC_CONFIG 0x0b
+#define SVC_ENUM_SVCS_STATUS 0x0e
+#define SVC_OPEN_SC_MAN 0x0f
+#define SVC_OPEN_SERVICE 0x10
+#define SVC_QUERY_SVC_CONFIG 0x11
+#define SVC_START_SERVICE 0x13
+#define SVC_QUERY_DISP_NAME 0x14
+#define SVC_OPEN_SC_MAN_A 0x1b
+#define SVC_OPEN_SERVICE_A 0x1c
+
+#endif