Ethereal-dev: [Ethereal-dev] Nasty Fragmentation: Help me

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Sofia Altieri" <sofiaaltieri@xxxxxxxxxxx>
Date: Mon, 27 Mar 2006 15:05:39 +0000
Hello List,
I'm on my way to complete my plugin. One of the last issues I must deal with is fragmentation.
I've implemented it following the scheme suggested in the Dev Guide. No way!

The following instruction is executed:

------------------------------------------------------------------------------------------------------------------------

if (check_col (pinfo->cinfo, COL_INFO)

    if (frag_msg)

        col_append_fstr(pinfo->cinfo, COL_INFO, "(Message reassembled)");

-------------------------------------------------------------------------------------------------------------------------



where *frag_msg* is a fragment_data pointer initialized at this point:



--------------------------------------------------------------------------------------------------------------------------
frag_msg = fragment_add_seq_check(tvb, offset, pinfo, mg_seqid, msg_fragment_table, msg_reassembled_table, pkth->seq - msg_num, !(flags&EOM_FLAG))
---------------------------------------------------------------------------------------------------------------------------


Now, the problems are:

A) Even if actually the last fragmented packet has COL_INFO = "Message Reassmebled" I do not see the whole content in the hex pane (like, for instance, IP reassembled packets)

B) When I reload (or change) the capture file it throws a SIGSEGV in fragment_table_init(&msg_reassembled_table), precisely:

fragment_table_init()->g_hash_table_size()->range_copy()->g_free()->free()

Why?! I think it has to do with offset values i use in process_reassambled(..) and in fragment_add_seq_check(...)

So, does offset have to change depending on whether it's the first packet or not? Because the first packet has a( PKT+MSG) header the others don't (they have just PKT header), so I guess while the first packet must include both headers (then the offset must be 0 because we have to "insert" the whole tvb into msg_fragment_table) the others must be inserted skipping PKT header (then offset = 16). I've had a look at both the code in reassemble.c and other dissectors, and it looks like it works like mine, but I must be wrong somewhere! The question is, where? : D

thanx

_________________________________________________________________
SMS + facili! Prova un nuovo modo, più comodo, di inviare SMS! http://join2.msn.com/?page=messenger/mm&ST=1&pgmarket=it-it