2 * Routines for mount dissection
4 * $Id: packet-mount.c,v 1.1 1999/11/11 21:21:59 nneul Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@unicom.net>
8 * Copyright 1998 Gerald Combs
10 * Copied from packet-smb.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.
32 #ifdef HAVE_SYS_TYPES_H
33 #include <sys/types.h>
37 #include "packet-rpc.h"
38 #include "packet-mount.h"
40 static int proto_mount = -1;
41 static int hf_mount_path = -1;
43 /* Dissect a unmount call */
44 int dissect_unmount_call(const u_char *pd, int offset, frame_data *fd,
49 offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_mount_path);
55 /* proc number, "proc name", dissect_request, dissect_reply */
56 /* NULL as function pointer means: take the generic one. */
58 const vsff mount_proc[] = {
59 { 0, "NULL", NULL, NULL },
60 { MOUNTPROC_MOUNT, "MOUNT",
62 { MOUNTPROC_UNMOUNT, "UNMOUNT",
63 dissect_unmount_call, NULL },
64 { 0, NULL, NULL, NULL }
66 /* end of mount version 1 */
70 proto_register_mount(void)
72 static hf_register_info hf[] = {
74 "Path", "mount.path", FT_STRING, BASE_DEC,
78 proto_mount = proto_register_protocol("Mount Service", "mount");
79 proto_register_field_array(proto_mount, hf, array_length(hf));
81 /* Register the protocol as RPC */
82 rpc_init_prog(proto_mount, MOUNT_PROGRAM, ETT_MOUNT);
83 /* Register the procedure tables */
84 rpc_init_proc_table(MOUNT_PROGRAM, 1, mount_proc);