bcd07676d58a564b888822e42f0c961acd98974b
[obnox/wireshark/wip.git] / packet-nfsauth.c
1 /* packet-nfsauth.c
2  * Stubs for Sun's NFS AUTH RPC service
3  *
4  * Ronnie Sahlberg
5  *
6  * $Id: packet-nfsauth.c,v 1.1 2002/05/16 08:51:17 sahlberg Exp $
7  *
8  * Ethereal - Network traffic analyzer
9  * By Gerald Combs <gerald@ethereal.com>
10  * Copyright 1998 Gerald Combs
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
39 static int proto_nfsauth = -1;
40
41 static gint ett_nfsauth = -1;
42
43 #define NFSAUTH_PROGRAM 100231
44
45 #define NFSAUTHPROC_NULL                0
46 #define NFSAUTH1_ACCESS                 1
47 /* proc number, "proc name", dissect_request, dissect_reply */
48 /* NULL as function pointer means: type of arguments is "void". */
49 static const vsff nfsauth1_proc[] = {
50         { NFSAUTHPROC_NULL,     "NULL",
51                 NULL,   NULL },
52         { NFSAUTH1_ACCESS,      "ACCESS",
53                 NULL,   NULL },
54         { 0,    NULL,   NULL,   NULL }
55 };
56
57 void
58 proto_register_nfsauth(void)
59 {
60 #if 0
61         static hf_register_info hf[] = {
62         };
63 #endif
64
65         static gint *ett[] = {
66                 &ett_nfsauth,
67         };
68
69         proto_nfsauth = proto_register_protocol("NFSAUTH", "NFSAUTH", "nfsauth");
70 #if 0
71         proto_register_field_array(proto_nfsauth, hf, array_length(hf));
72 #endif
73         proto_register_subtree_array(ett, array_length(ett));
74 }
75
76 void
77 proto_reg_handoff_nfsauth(void)
78 {
79         /* Register the protocol as RPC */
80         rpc_init_prog(proto_nfsauth, NFSAUTH_PROGRAM, ett_nfsauth);
81         /* Register the procedure tables */
82         rpc_init_proc_table(NFSAUTH_PROGRAM, 1, nfsauth1_proc);
83 }