Squelch a complaint from Visual C++ 6.0 (the code was OK beforehand, at
[obnox/wireshark/wip.git] / packet-ypxfr.c
1 /* packet-ypxfr.c
2  * Routines for ypxfr dissection
3  *
4  * $Id: packet-ypxfr.c,v 1.3 2000/01/07 22:05:42 guy Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@zing.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * Copied from packet-smb.c
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31
32 #ifdef HAVE_SYS_TYPES_H
33 #include <sys/types.h>
34 #endif
35
36
37 #include "packet-rpc.h"
38 #include "packet-ypxfr.h"
39
40 static int proto_ypxfr = -1;
41
42 static gint ett_ypxfr = -1;
43
44 /* proc number, "proc name", dissect_request, dissect_reply */
45 /* NULL as function pointer means: take the generic one. */
46 const vsff ypxfr1_proc[] = {
47         { YPXFRPROC_NULL,       "NULL",         NULL,                           NULL },
48         { YPXFRPROC_GETMAP,     "GETMAP",               NULL,                           NULL },
49         { 0,    NULL,           NULL,                           NULL }
50 };
51 /* end of YPXFR version 1 */
52
53 void
54 proto_register_ypxfr(void)
55 {
56         static gint *ett[] = {
57                 &ett_ypxfr
58         };
59
60         proto_ypxfr = proto_register_protocol("Yellow Pages Transfer", "ypxfr");
61         proto_register_subtree_array(ett, array_length(ett));
62
63         /* Register the protocol as RPC */
64         rpc_init_prog(proto_ypxfr, YPXFR_PROGRAM, ett_ypxfr);
65         /* Register the procedure tables */
66         rpc_init_proc_table(YPXFR_PROGRAM, 1, ypxfr1_proc);
67 }
68