2 * Routines for nlm dissection
4 * $Id: packet-nlm.c,v 1.2 1999/11/15 14:32:16 nneul 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;
45 /* proc number, "proc name", dissect_request, dissect_reply */
46 /* NULL as function pointer means: take the generic one. */
47 /* NLM protocol version 3 */
48 const vsff nlm3_proc[] = {
49 { 0, "NULL", NULL, NULL },
50 { 1, "TEST", NULL, NULL },
51 { 2, "LOCK", NULL, NULL },
52 { 3, "CANCEL", NULL, NULL },
53 { 4, "UNLOCK", NULL, NULL },
54 { 5, "GRANTED", NULL, NULL },
55 { 6, "TEST_MSG", NULL, NULL },
56 { 7, "LOCK_MSG", NULL, NULL },
57 { 8, "CANCEL_MSG", NULL, NULL },
58 { 9, "UNLOCK_MSG", NULL, NULL },
59 { 10, "GRANTED_MSG", NULL, NULL },
60 { 11, "TEST_RES", NULL, NULL },
61 { 12, "LOCK_RES", NULL, NULL },
62 { 13, "CANCEL_RES", NULL, NULL },
63 { 14, "UNLOCK_RES", NULL, NULL },
64 { 15, "GRANTED_RES", NULL, NULL },
65 { 20, "SHARE", NULL, NULL },
66 { 21, "UNSHARE", NULL, NULL },
67 { 22, "NM_LOCK", NULL, NULL },
68 { 23, "FREE_ALL", NULL, NULL },
69 { 0, NULL, NULL, NULL }
71 /* end of NLM protocol version 3 */
75 proto_register_nlm(void)
77 proto_nlm = proto_register_protocol("Network Lock Manager Protocol", "nlm");
79 /* Register the protocol as RPC */
80 rpc_init_prog(proto_nlm, NLM_PROGRAM, ETT_NLM);
81 /* Register the procedure table */
82 rpc_init_proc_table(NLM_PROGRAM, 3, nlm3_proc);