Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] removed functions fast way to find substitutes?

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Fri, 21 Nov 2014 09:16:47 +0000
On 21 November 2014 08:48, Semjon <semgo@xxxxxx> wrote:
Hello,

I maintain a dissector for a proprietary protocol of my employer and now
and then I grab me some current wireshark-sources and check if my
dissector code is still compatible which - in recent times-
unfortunately often it is not due to changes in the wireshark lib / API.

So everytime my code fails to compile/link I have to check which
functions were removed and which new functions do I have to use now.
One of my current problems is with

tvb_get_faked_unicode(...)

which isn't available anymore.
In my Protocol I have some Ascii-encoded String but which comes as two
bytes per character. Example:
{0x0031, 0x0032, 0x0033, 0x0034, 0x0000} in tvb should display in
GUI/Tree/PacketList as "1234"
I used to call:

tvb_get_faked_unicode(NULL,tvb, 20, ((tvb_length(tvb)-20)/2),ENC_BIG_ENDIAN)

and display result as %s in col_append_fstr() or as FT_STRING in
proto_tree_add_string().

So could anyone give me a hint, is there a function still available for
this type of encoding or do I have to write something.

In general is there a fast/convenient way - other than manually looking
through the sources after functions that might do what i want - to check
if this function X is now replaced by function Y.


No changelog as such, but there is the git log that details all committed changes, and the Wireshark Gerrit that has all changes often with some discussion about them.

You can also use git blame at the place where the old function was to find the change that removed it.

Finally, it sounds as though you're tracking trunk which is truly living on the bleeding edge.  You may be better off tracking the stable branch, currently 1.12.x, as there's much less change in the API there, although when that branch is replaced by the new release you'll get all the API changes, but they should mostly be in one big hit.

--
Graham Bloice