Added stubs for various RPC routines:
[obnox/wireshark/wip.git] / packet-portmap.c
1 /* packet-portmap.c
2  * Routines for portmap dissection
3  *
4  * $Id: packet-portmap.c,v 1.1 1999/11/10 17:23:53 nneul Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@unicom.net>
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-portmap.h"
39
40 static int proto_portmap = -1;
41
42 /* proc number, "proc name", dissect_request, dissect_reply */
43 /* NULL as function pointer means: take the generic one. */
44 const vsff portmap1_proc[] = {
45         { PORTMAPPROC_NULL,     "NULL",         NULL,                           NULL },
46         { PORTMAPPROC_SET,      "SET",          NULL,                           NULL },
47         { PORTMAPPROC_UNSET,    "UNSET",                NULL,                           NULL },
48         { PORTMAPPROC_GETPORT,  "GETPORT",              NULL,                           NULL },
49         { PORTMAPPROC_DUMP,     "DUMP",         NULL,                           NULL },
50         { PORTMAPPROC_CALLIT,   "CALLIT",               NULL,                           NULL },
51         { 0,    NULL,           NULL,                           NULL }
52 };
53 /* end of Portmap version 1 */
54
55 const vsff portmap2_proc[] = {
56         { PORTMAPPROC_NULL,     "NULL",         NULL,                           NULL },
57         { PORTMAPPROC_SET,      "SET",          NULL,                           NULL },
58         { PORTMAPPROC_UNSET,    "UNSET",                NULL,                           NULL },
59         { PORTMAPPROC_GETPORT,  "GETPORT",              NULL,                           NULL },
60         { PORTMAPPROC_DUMP,     "DUMP",         NULL,                           NULL },
61         { PORTMAPPROC_CALLIT,   "CALLIT",               NULL,                           NULL },
62     { 0,    NULL,       NULL,               NULL }
63 };
64 /* end of Portmap version 2 */
65
66
67 void
68 proto_register_portmap(void)
69 {
70         proto_portmap = proto_register_protocol("Portmap", "PORTMAP");
71
72         /* Register the protocol as RPC */
73         rpc_init_prog(proto_portmap, PORTMAP_PROGRAM, ETT_PORTMAP);
74         /* Register the procedure tables */
75         rpc_init_proc_table(PORTMAP_PROGRAM, 1, portmap1_proc);
76         rpc_init_proc_table(PORTMAP_PROGRAM, 2, portmap2_proc);
77 }
78