Ethereal-dev: Re: [Ethereal-dev] IP defragment

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

From: "Ronnie Sahlberg" <rsahlber@xxxxxxxxxxxxxx>
Date: Tue, 17 Apr 2001 22:01:48 +1000
Hi list

New version of ip defragmentation patch.
Please consider for cvs

Most noticeable in the gui is that the subtree for fragments has been
changed slightly.
A few other small fixes.

----- Original Message -----
From: "Guy Harris"

> Another thing you'll need to do is to arrange that if not all the data
> in a fragment is present - i.e., if "tvb_reported_length(tvb)" is
> creater than "tvb_length(tvb)" - you don't add it to the fragment hash
> table.  This can happen if the capture was done with a snapshot length

fixed

> 1) a generic "error" flag that can be set on a frame, with an
>    expression such as "error" checking it

Perhaps an api in packet-frame.c, if a dissector called either directly or
indirectly
from dissect_frame() sets pinfo->error (to some PACKET_ERROR_xxx value)
, then packet-frame.c will :
1, proto_tree_add_uint(..., hf_error, ...)
2, col_set_str(..., COL_INFO, error_string )
    where the matching error_string is defined in the same headerfile as
PACKET_ERROR_xxx

I could add something like this when ip-defragmentation is
finished/accepted.

>
> or
>
> 2) a way of marking a protocol tree item as an error indication,
>    which could not only be filtered for with a special
>    expression such as "error" but could perhaps also be made a
>    different color (defaulting, perhaps, to the standard color,
>    but allowing the user to specify a different color).
>

INFO column is set to [Illegal fragments] to show that the packet failed
defragmentation.

enjoy
    ronnie s

Attachment: captures.tgz
Description: application/compressed

Attachment: packet-ip.c
Description: Binary data