Ethereal-dev: [Ethereal-dev] tvb_get_ntohl and other

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: Tue, 21 Mar 2006 09:51:45 +0000
Hello List,

I'm fetching all values defined in my proto with tvb_get_ntoh(l/s). This because this routine converts byte from *network* order to host order. Skimming through other dissectors I've noticed that tvb_get_letoh(l/s) routines are often used. Now:

a) Why should I use tvb_get_letoh(l/s) routines if a more general tvb_get_ntoh(l/s) routine exists?


Other question:

My proto refragments. I've used routines defined in reassemble.h to reassemble fragments. When sniffing, ethereal tells me which packets are fragments but it doesn't reassemble anything. it seems like it does not recognize the last packet and doesn't proceed with reassemblation.

Before posting the code I'd like to solve it myself, then I'll ask u a couple of things

1) in fragment_add_seq_check (tvb, offset, pinfo, ....) what value must offset have? The beginning of packet? The beginning of the packet after the header? (In the first case shouldn'it always be set to 0?)

b) in process_reassembled_data (....., proto_tree * tree) must tree be an existent tree, like my proto_tree?

Thank you : )

_________________________________________________________________
Ricerche online pi� semplici e veloci con MSN Toolbar! http://toolbar.msn.it/