diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-01-12 10:24:47 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-01-12 10:24:47 +0000 |
commit | eaa1cf2ea26f6d669a41559667f93504236cc7cb (patch) | |
tree | 0912cc4ec72ee4b73a251e1d04cdedf309d35d23 /packet-mount.c | |
parent | 8d23398cc4b3173bd4ea867c387ebdf94935f26c (diff) |
From Ronnie Sahlberg: file handle to file name resolution in NFS and
related protocols.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4533 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-mount.c')
-rw-r--r-- | packet-mount.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/packet-mount.c b/packet-mount.c index f81103d4e0..acd2eb664c 100644 --- a/packet-mount.c +++ b/packet-mount.c @@ -1,7 +1,7 @@ /* packet-mount.c * Routines for mount dissection * - * $Id: packet-mount.c,v 1.27 2001/07/12 08:52:59 guy Exp $ + * $Id: packet-mount.c,v 1.28 2002/01/12 10:24:46 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -113,6 +113,24 @@ dissect_fhstatus(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree static int dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { + if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){ + rpc_call_info_value *civ=pinfo->private_data; + + if(civ->request && (civ->proc==1)){ + unsigned char *host, *name; + int len; + + host=ip_to_str(pinfo->dst.data); + len=tvb_get_ntohl(tvb, offset); + + name=g_malloc(strlen(host)+1+len+1); + sprintf(name,"%s:%*s", host, len, tvb_get_ptr(tvb, offset+4, len)); + + nfs_name_snoop_add_name(civ->xid, tvb, -1, strlen(name), 0, 0, name); + } + } + + if ( tree ) { offset = dissect_rpc_string(tvb,pinfo,tree,hf_mount_path,offset,NULL); |