guint32 dfid;
struct _9p_str name;
};
+#if 0
struct _9p_rrename {
};
+#endif
struct _9p_treadlink {
guint32 fid;
};
guint32 fid;
struct _9p_str name;
};
+#if 0
struct _9p_rlink {
};
+#endif
struct _9p_tmkdir {
guint32 fid;
struct _9p_str name;
guint32 newdirfid;
struct _9p_str newname;
};
+#if 0
struct _9p_rrenameat {
};
+#endif
struct _9p_tunlinkat {
guint32 dirfid;
struct _9p_str name;
guint32 flags;
};
+#if 0
struct _9p_runlinkat {
};
+#endif
struct _9p_tawrite {
guint32 fid;
guint8 datacheck;
};
struct _9p_hashval {
- int len;
+ size_t len;
char *data;
};
g_free(value);
}
-static struct _9p_hashval *_9p_hash_new_val(int len)
+static struct _9p_hashval *_9p_hash_new_val(size_t len)
{
struct _9p_hashval *val;
val = (struct _9p_hashval *)g_malloc(sizeof(struct _9p_hashval));
return val ? *(enum _9p_version*)val->data : _9P;
}
-static void conv_set_fid(packet_info *pinfo, guint32 fid, const char *path, int len)
+static void conv_set_fid(packet_info *pinfo, guint32 fid, const char *path, size_t len)
{
struct _9p_hashval *val;
const char *mname;
char *tmppath, *tmps;
gint len, reportedlen;
+ size_t stringlen;
tvbuff_t *next_tvb;
proto_item *ti;
proto_tree *ninep_tree, *tmp_tree;
offset +=4;
tmppath = (char*)g_malloc(MAXPATHLEN);
- len = g_strlcpy(tmppath, conv_get_fid(pinfo, fid), MAXPATHLEN);
+ stringlen = g_strlcpy(tmppath, conv_get_fid(pinfo, fid), MAXPATHLEN);
proto_item_append_text(ti, " (%s)", tmppath);
fid = tvb_get_letohl(tvb, offset);
proto_tree_add_item(tmp_tree, hf_9P_parmsz, tvb, offset, 2, ENC_LITTLE_ENDIAN);
tmps = tvb_get_string(tvb, offset+2, tmplen);
- len += g_strlcat(tmppath, "/", MAXPATHLEN);
- len += g_strlcat(tmppath, tmps, MAXPATHLEN);
+ stringlen += g_strlcat(tmppath, "/", MAXPATHLEN);
+ stringlen += g_strlcat(tmppath, tmps, MAXPATHLEN);
g_free(tmps);
offset += tmplen + 2;
}
- conv_set_fid(pinfo, fid, tmppath, len+1);
+ conv_set_fid(pinfo, fid, tmppath, stringlen+1);
g_free(tmppath);
conv_set_tag(pinfo, tag, ninemsg, fid);
offset += 8;
tv.secs = tvb_get_letoh64(tvb,offset);
- tv.nsecs = tvb_get_letoh64(tvb,offset+8);;
+ tv.nsecs = (guint32)tvb_get_letoh64(tvb,offset+8);;
proto_tree_add_time(ninep_tree, hf_9P_atime, tvb, offset, 16, &tv);
offset += 16;
tv.secs = tvb_get_letoh64(tvb,offset);
- tv.nsecs = tvb_get_letoh64(tvb,offset+8);;
+ tv.nsecs = (guint32)tvb_get_letoh64(tvb,offset+8);;
proto_tree_add_time(ninep_tree, hf_9P_mtime, tvb, offset, 16, &tv);
offset += 16;
tv.secs = tvb_get_letoh64(tvb,offset);
- tv.nsecs = tvb_get_letoh64(tvb,offset+8);;
+ tv.nsecs = (guint32)tvb_get_letoh64(tvb,offset+8);;
proto_tree_add_time(ninep_tree, hf_9P_ctime, tvb, offset, 16, &tv);
offset += 16;
tv.secs = tvb_get_letoh64(tvb,offset);
- tv.nsecs = tvb_get_letoh64(tvb,offset+8);;
+ tv.nsecs = (guint32)tvb_get_letoh64(tvb,offset+8);;
proto_tree_add_time(ninep_tree, hf_9P_btime, tvb, offset, 16, &tv);
offset += 16;
offset += 8;
tv.secs = tvb_get_letoh64(tvb,offset);
- tv.nsecs = tvb_get_letoh64(tvb,offset+8);;
+ tv.nsecs = (guint32)tvb_get_letoh64(tvb,offset+8);;
proto_tree_add_time(ninep_tree, hf_9P_atime, tvb, offset, 16, &tv);
offset += 16;
tv.secs = tvb_get_letoh64(tvb,offset);
- tv.nsecs = tvb_get_letoh64(tvb,offset+8);;
+ tv.nsecs = (guint32)tvb_get_letoh64(tvb,offset+8);;
proto_tree_add_time(ninep_tree, hf_9P_mtime, tvb, offset, 16, &tv);
offset += 16;