2 * Routines for nlm dissection
4 * $Id: packet-nlm.c,v 1.3 1999/11/16 11:42:42 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@unicom.net>
8 * Copyright 1998 Gerald Combs
10 * Copied from packet-mount.c
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.
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.
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.
33 #ifdef HAVE_SYS_TYPES_H
34 #include <sys/types.h>
38 #include "packet-rpc.h"
39 #include "packet-nlm.h"
42 static int proto_nlm = -1;
44 static gint ett_nlm = -1;
46 /* proc number, "proc name", dissect_request, dissect_reply */
47 /* NULL as function pointer means: take the generic one. */
48 /* NLM protocol version 3 */
49 const vsff nlm3_proc[] = {
50 { 0, "NULL", NULL, NULL },
51 { 1, "TEST", NULL, NULL },
52 { 2, "LOCK", NULL, NULL },
53 { 3, "CANCEL", NULL, NULL },
54 { 4, "UNLOCK", NULL, NULL },
55 { 5, "GRANTED", NULL, NULL },
56 { 6, "TEST_MSG", NULL, NULL },
57 { 7, "LOCK_MSG", NULL, NULL },
58 { 8, "CANCEL_MSG", NULL, NULL },
59 { 9, "UNLOCK_MSG", NULL, NULL },
60 { 10, "GRANTED_MSG", NULL, NULL },
61 { 11, "TEST_RES", NULL, NULL },
62 { 12, "LOCK_RES", NULL, NULL },
63 { 13, "CANCEL_RES", NULL, NULL },
64 { 14, "UNLOCK_RES", NULL, NULL },
65 { 15, "GRANTED_RES", NULL, NULL },
66 { 20, "SHARE", NULL, NULL },
67 { 21, "UNSHARE", NULL, NULL },
68 { 22, "NM_LOCK", NULL, NULL },
69 { 23, "FREE_ALL", NULL, NULL },
70 { 0, NULL, NULL, NULL }
72 /* end of NLM protocol version 3 */
76 proto_register_nlm(void)
78 static gint *ett[] = {
82 proto_nlm = proto_register_protocol("Network Lock Manager Protocol", "nlm");
83 proto_register_subtree_array(ett, array_length(ett));
85 /* Register the protocol as RPC */
86 rpc_init_prog(proto_nlm, NLM_PROGRAM, ett_nlm);
87 /* Register the procedure table */
88 rpc_init_proc_table(NLM_PROGRAM, 3, nlm3_proc);