Ethereal-dev: Re: [Ethereal-dev] packet-giop.c enhancements: ServiceContexts, RTCORBA prioriti

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

From: Craig Rodrigues <rodrigc@xxxxxxxxx>
Date: Mon, 17 Feb 2003 22:29:30 -0500
On Mon, Feb 17, 2003 at 06:34:29PM -0800, Guy Harris wrote:
> I've checked in a change to dissect those with a new
> "decode_UnencodedServiceContext()" routine, which just shows the
> sequence length and the sequence data; for sequence contexts known in
> the sense that the vscid is 0 and the scid is < max_service_context_id,
> but for which there is not yet a dissector,
> "decode_UnknownServiceContext()" is still used, so it at least dissects
> the endianness item.

Did you even take the time to look at my patch?  I already had the
logic to do that, and I did not need to add a new
decode_UnencodedServiceContext() function, because both
decode_UnencodedServiceContext() and decode_UnknownServiceContext()
both dump the service context as char data.  Since you seem
to have ignored my previous patch, I will post the code:


    temp_offset1 = *offset;
    /* The OMG has vscid of 0 reserved */
    if( vscid != 0 || scid > max_service_context_id ) {
        decode_UnknownServiceContext(tvb, tree, offset, stream_is_be, boundary,
                                     vscid, scid);
        continue;
    }

    temp_offset = *offset;
    /* get sequence length, new endianness and boundary for encapsulation */
    seqlen_cd = get_CDR_encap_info(tvb, sub_tree1, offset,
                               stream_is_be, boundary,
                               &encapsulation_is_be , &encapsulation_boundary);

    if (tree) {
      tf_st1 = proto_tree_add_text (tree, tvb, temp_offset, sizeof(seqlen_cd) + se
qlen_cd , service_context_name);
      sub_tree1 = proto_item_add_subtree (tf_st1, ett_giop_scl_st1);
    }

    if (seqlen_cd == 0)
        continue;

    /* See CORBA 3.0.2 standard, section Section 15.3.3 "Encapsulation",
     * for how CDR types can be marshalled into a sequence<octet>.
     * The first octet in the sequence determines endian order,
     * 0 == big-endian, 1 == little-endian
     */

    switch(scid)
    {
        case 0x0a: /* RTCorbaPriority */
           decode_RTCorbaPriority(tvb, sub_tree1, offset,
                                  encapsulation_is_be, seqlen_cd);
           break;
        default:

           /* Need to fill these in as we learn them */
           *offset = temp_offset1;
           temp_offset1 = decode_UnknownServiceContext(tvb, sub_tree1, offset, str
eam_is_be,
                                        boundary, vscid, scid);
           break;
    }

  } /* for seqlen  */





The logic I had was a lot simpler than what you've changed it to,
and it did the same job for both your giop-broken.pcap file,
and for RT-CORBA priorities.  The default: case
for switch(scid) is merely a placeholder so that the
dissector functions for the rest of the scid values 
for the case statements can be filled in at a later date.

Are you basically going to ignore my requests to incorporate
my code and keep going forward with your changes?
You still have stuff in there which is wrong, ie. wrong
boundary is being passed for RTCorbaPriority but you don't
seem to be listening to what I am saying.

You seem to be marching along, and making all sorts of
style and semantic changes, so it is harder for me to follow along 
what is going on, and where the problems are.

I have not had problems contributing things to Ethereal in
the past, but I am finding this experience to be very
annoying, and I am seriously tempted to keep my changes
to myself and my users instead of contributing them to the
Ethereal mainline.

-- 
Craig Rodrigues        
http://home.attbi.com/~rodrigc
rodrigc@xxxxxxxxx