Date: Sun, 23 Nov 2003 19:11:12 -0500
To: ethereal-dev@xxxxxxxxxxxx
From: Nathaniel Lally <nate@xxxxxxxxx>
Subject: odd size report
is there something that would cause a size misreport on a 32 byte icmp
echo request using the following code?
hfinfo = proto_registrar_get_byname("data");
if (hfinfo != NULL) {
finfos = proto_get_finfo_ptr_array(edt->tree, hfinfo->id);
if (finfos && (g_ptr_array_len(finfos) != 0)) {
finfo = g_ptr_array_index(finfos, 0);
data = tvb_get_ptr(finfo->ds_tvb, finfo->start, finfo->length);
data_s = finfo->length;
fprintf(stderr, "size %d start %d\n", data_s, finfo->start);
} else {
fprintf(stderr, "no finfo for %s\n", hfinfo->abbrev);
}
}
i am working on a packet generation framework and i am trying to place the
contents of icmp data into a buffer
yet it cuts off the last 6 bytes for some reason- on a 74 byte packet-
tvb_length reports 68.
I would think somewhere a tvb_subset is being called or something that i
can't find.
-Nate