New tap for tethereal: io statistics that provides frames/bytes counts for frames...
[obnox/wireshark/wip.git] / packet-dcerpc-rep_proc.c
1 /* packet-dcerpc-rep_proc.c\r
2  *\r
3  * Routines for dcerpc Replica Server Call dissection\r
4  * Copyright 2002, Jaime Fournier <jafour1@yahoo.com>\r
5  * This information is based off the released idl files from opengroup.\r
6  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tgz  file/fsint/rep_proc.idl\r
7  *\r
8  * $Id: packet-dcerpc-rep_proc.c,v 1.1 2002/09/13 10:06:45 sahlberg Exp $\r
9  *\r
10  * Ethereal - Network traffic analyzer\r
11  * By Gerald Combs <gerald@ethereal.com>\r
12  * Copyright 1998 Gerald Combs\r
13  *\r
14  * This program is free software; you can redistribute it and/or\r
15  * modify it under the terms of the GNU General Public License\r
16  * as published by the Free Software Foundation; either version 2\r
17  * of the License, or (at your option) any later version.\r
18  *\r
19  * This program is distributed in the hope that it will be useful,\r
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
22  * GNU General Public License for more details.\r
23  *\r
24  * You should have received a copy of the GNU General Public License\r
25  * along with this program; if not, write to the Free Software\r
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
27  */\r
28 \r
29 #ifdef HAVE_CONFIG_H\r
30 #include "config.h"\r
31 #endif\r
32 \r
33 \r
34 #ifdef HAVE_SYS_TYPES_H\r
35 #include <sys/types.h>\r
36 #endif\r
37 \r
38 #include <string.h>\r
39 \r
40 #include <glib.h>\r
41 #include <epan/packet.h>\r
42 #include "packet-dcerpc.h"\r
43 \r
44 \r
45 static int proto_rep_proc = -1;\r
46 static int hf_rep_proc_opnum = -1;\r
47 \r
48 \r
49 static gint ett_rep_proc = -1;\r
50 \r
51 \r
52 static e_uuid_t uuid_rep_proc = { 0x4d37f2dd, 0xed43, 0x0005, { 0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x00, 0x00 } };\r
53 static guint16  ver_rep_proc = 4;\r
54 \r
55 \r
56 static dcerpc_sub_dissector rep_proc_dissectors[] = {\r
57     { 0, "CheckReplicationConfig", NULL, NULL },\r
58     { 1, "AllCheckReplicationConfig", NULL, NULL },\r
59     { 2, "KeepFilesAlive", NULL , NULL},\r
60     { 3, "GetVolChangedFiles", NULL, NULL },\r
61     { 4, "GetRepStatus", NULL, NULL},\r
62     { 5, "GetRepServerStatus", NULL, NULL},\r
63     { 6, "UpdateSelf", NULL, NULL},\r
64     { 7, "Probe", NULL, NULL},\r
65     { 8, "GetOneRepStatus", NULL, NULL },\r
66     { 9, "GetServerInterfaces", NULL, NULL},\r
67     { 0, NULL, NULL, NULL }\r
68 };\r
69 \r
70 \r
71 static const value_string rep_proc_opnum_vals[] = {\r
72     { 0, "CheckReplicationConfig" },\r
73     { 1, "AllCheckReplicationConfig" },\r
74     { 2, "KeepFilesAlive" },\r
75     { 3, "GetVolChangedFiles" },\r
76     { 4, "GetRepStatus" },\r
77     { 5, "GetRepServerStatus" },\r
78     { 6, "UpdateSelf" },\r
79     { 7, "Probe" },\r
80     { 8, "GetOneRepStatus" },\r
81     { 9, "GetServerInterfaces" },\r
82     { 0, NULL }\r
83 };\r
84 \r
85 \r
86 void\r
87 proto_register_rep_proc (void)\r
88 {\r
89         static hf_register_info hf[] = {\r
90           { &hf_rep_proc_opnum,\r
91             { "Operation", "rep_proc.opnum", FT_UINT16, BASE_DEC,\r
92               VALS(rep_proc_opnum_vals), 0x0, "Operation", HFILL }}\r
93         };\r
94 \r
95         static gint *ett[] = {\r
96                 &ett_rep_proc,\r
97         };\r
98         proto_rep_proc = proto_register_protocol ("AFS (4.0) Replication Server call declarations", "REP_PROC", "rep_proc");\r
99         proto_register_field_array (proto_rep_proc, hf, array_length (hf));\r
100         proto_register_subtree_array (ett, array_length (ett));\r
101 }\r
102 \r
103 void\r
104 proto_reg_handoff_rep_proc (void)\r
105 {\r
106         /* Register the protocol as dcerpc */\r
107         dcerpc_init_uuid (proto_rep_proc, ett_rep_proc, &uuid_rep_proc, ver_rep_proc, rep_proc_dissectors, hf_rep_proc_opnum);\r
108 }\r