ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] 0.99.8 col_append_str fails

From: Jason Dick <jasonkdick@xxxxxxxxx>
Date: Mon, 3 Mar 2008 07:39:03 -0800 (PST)
Thanks for the follow-up.  Found the tutorial you mentioned and tried exactly that.  It seems that as soon as is set the text for the column, I cannot change it any more.  I tried a number of permutations and still the result is I can set it COL_INFO only once.

This a plugin dissector and everything else seems to work just fine.  I would like to add some more info to the COL_INFO for various message types that I dissect.

Any idea what changes were made to the plugin API?  

Thanks,
Jason

----- Original Message ----
From: "Maynard, Chris" <Christopher.Maynard@xxxxxxxxx>
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Sent: Sunday, March 2, 2008 5:10:47 PM
Subject: Re: [Wireshark-dev] 0.99.8 col_append_str fails

Is this a plugin dissector or normal dissector?  If it's a plugin, it
seems you're not the only one experiencing this problem, although I
highly doubt that it's a Wireshark bug.  There have been some changes to
the plugin API somewhat recently and I think your problem may be related
to that.  You might try first to re-read the most recent README.plugins
and possibly even reviewing the following tutorial:
http://www.codeproject.com/KB/IP/custom_dissector.aspx.  In addition,
it's probably a good idea to compare your plugin files with the
Wireshark built-in plugin files.

- Chris

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Jason Dick
Sent: Sunday, March 02, 2008 3:01 PM
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] 0.99.8 col_append_str fails

I am writing a dissector for a custom protocol and found that I am
unable to add additional information to the INFO column.  See the
following code:

if (check_col(pinfo->cinfo, COL_INFO)) {
  col_append_str(pinfo->cinfo, COL_INFO, "  more info");
}

It appears that after the initial setting of the column, pinfo->cinfo is
no longer writable.  That is 

col_get_writable(pinfo->cinfo) 

always returns false.  It still returns false even after I run:

col_set_writable(pinfo->cinfo, 1);

Has anyone else run across this?  I thought I had this working for
another dissector on 0.99.6 but I don't have that code with me right
now.

Thanks for any thoughts, comments, ideas -- Jason



-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you
are not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data
corruption, interception, tampering, unauthorized amendment and
viruses. We only send and receive emails on the basis that we are
not liable for any such corruption, interception, tampering,
amendment or viruses or any consequence thereof.
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev





      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs