/* packet-nlm.c
* Routines for nlm dissection
*
- * $Id: packet-nlm.c,v 1.33 2002/12/03 02:07:07 guy Exp $
+ * $Id: packet-nlm.c,v 1.36 2004/02/25 09:31:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
{
nlm_msg_res_unmatched_data *umd;
nlm_msg_res_unmatched_data *old_umd;
- char *cookie;
/* allocate and build the unmatched structure for this request */
umd=g_malloc(sizeof(nlm_msg_res_unmatched_data));
umd->ns.secs=pinfo->fd->abs_secs;
umd->ns.nsecs=pinfo->fd->abs_usecs*1000;
umd->cookie_len=tvb_get_ntohl(tvb, offset);
- cookie=g_malloc(umd->cookie_len);
- tvb_memcpy(tvb, (guint8 *)cookie, offset+4, umd->cookie_len);
- umd->cookie=cookie;
+ umd->cookie=tvb_memdup(tvb, offset+4, umd->cookie_len);
/* remove any old duplicates */
old_umd=g_hash_table_lookup(nlm_msg_res_unmatched, (gconstpointer)umd);
offset = dissect_rpc_string(tvb,lock_tree,
hf_nlm_lock_caller_name, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree,"fh");
+ offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh", NULL);
offset = dissect_rpc_data(tvb, lock_tree, hf_nlm_lock_owner, offset);
offset = dissect_rpc_string(tvb,lock_tree,
hf_nlm_lock_caller_name, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh");
+ offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh", NULL);
offset = dissect_rpc_data(tvb, lock_tree, hf_nlm_lock_owner, offset);
proto_register_subtree_array(ett, array_length(ett));
nlm_module = prefs_register_protocol(proto_nlm, NULL);
- prefs_register_bool_preference(nlm_module, "nlm_msg_res_matching",
+ prefs_register_bool_preference(nlm_module, "msg_res_matching",
"Match MSG/RES packets for async NLM",
"Whether the dissector will track and match MSG and RES calls for asynchronous NLM",
&nlm_match_msgres);