Wireshark-bugs: [Wireshark-bugs] [Bug 6787] Move Y.1711 out of MPLS dissector
Date: Tue, 31 Jul 2012 13:25:43 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6787

--- Comment #20 from Bill Meier <wmeier@xxxxxxxxxxx> 2012-07-31 13:25:42 PDT ---
(In reply to comment #19)
> About this line :
> > 
> >     functype = tvb_get_guint8(tvb, offset);  // will do bounds error if no data
> >     col_append_fstr(pinfo->cinfo, COL_INFO, " (Y.1711: %s)",
> >                     (functype == 0x01) ? "CV" :
> >                     (functype == 0x02) ? "FDI" :
> >                     (functype == 0x03) ? "BDI" :
> >                     (functype == 0x07) ? "FDD" :
> >                     "reserved/unknown");
> > 
> It is not possible to use val_to_str(functype, y1711_function_type_vals,
> "Reserved/unknown (%d)) ?

Maybe FF wanted to append text shorter than that in the value-string array ? 

Otherwise, seems reasonable to me.

Also: re:

> >     functype = tvb_get_guint8(tvb, offset);  // will do bounds error if no 

Looking at packet-mpls.c (which calls this dissector), I suspect there should
be some code to determine if there's any more to dissect after

    while(tvb_length_remaining(tvb) {
        ...
        if(...)
            break;
    }

    <test for data remaining ? >

    <continue dissecting>

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.