Wireshark-bugs: [Wireshark-bugs] [Bug 4153] The plugins which were working fine on ethereal are

Date: Mon, 26 Oct 2009 00:14:39 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4153





--- Comment #2 from Gurpreet <gforgurpreet@xxxxxxxxx>  2009-10-26 00:14:26 PDT ---
(In reply to comment #1)
> As you know plugins aren't portable between versions. Binary for sure, on the
> source level the APIs are subject to change. That may result in either failed
> compile (when functions or their prototypes change) or failed runs (when
> semantics and API checks).
> Wireshark is stricter with regards to header fields. That seems to be what's
> going on here. 
> 

Hi There,

Thanks for your reply. When I re-checked my plugin code, i have found that
"if(check_col(pinfo->cinfo, COL_PROTOCOL))" is never getting hit.
this if statement is always false.
Can you please help me in this?

I have pasted my code below:
void dissect_abisdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{



        guint16   len;                  
        guint16   actualdatalength;    
        guint     ablen;               

        int       type;                   
        int       offset = 0;              

        guint16   muxheader_length = 0;    
        guint16   totallength = 0;        
        guint16   getlen = 0;             



        len = tvb_get_ntohs(tvb, offset+4) & (0x0FFF); /* Get the length field
of MUX header */

        actualdatalength = tvb_length(tvb); /* Get the GRE payload length i.e.,
tvb buffer length */



        /* Set the string "ABISDATA" into the Protocol column field of Ethereal
Decoder display */
        if(check_col(pinfo->cinfo, COL_PROTOCOL))
                col_set_str(pinfo->cinfo, COL_PROTOCOL, "ABISDATA");



        /* Plugin starts dissecting the pacekts from here*/
        if(tree){
                proto_item *ti = NULL;
                proto_tree *abisdata_tree = NULL;
.....


Can you please help me in this.


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