This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to change copyright info in Help>About Wireshark>Wireshark

0
1

Hi, I built wireshark 2.2.4 in cent os using following command: make uninstall, ./autogen.sh, ./configure, make clean, make, make install, Now for some internal purpose I want to change copyright info in Help>About Wireshark>Wireshark. How to that?

P.S: I went through code and found that get_copyright_info() in wsutil/copyright_info.c is the function to change. But it seems ws_version_info.c has dependency on copyright_info.c and ws_version_info.c has soft link with wiretap/ws_version_info.c. So if i change any of the ws_version_info.c it will throw compilation error.

asked 13 Jul '17, 01:19

Abhisek's gravatar image

Abhisek
16111216
accept rate: 0%

I don't get it, if you change the text in get_copyright_info() and recompile it does not work?

(13 Jul '17, 07:26) Anders ♦

I am afraid of trying the change and re-compilation, because I had a bad experience with ws_version_info.c file change.If you even touch the file ws_version_info.c the whole wireshark code will not further compile any more time. Now I already modified many wireshark file as per my needs, so if in this moment if i try to change wsutil/copyright_info.c(which is a dependent of ws_version_info.c), it may push me to do a hell of lot rework. So my request/question is that anyone have any idea on changing wsutil/copyright_info.c and successfully recompilation after that OR any other way to change copyright information.

(14 Jul '17, 00:46) Abhisek

2 Answers:

0

P.S: I went through code and found that get_copyright_info() in wsutil/copyright_info.c is the function to change.

Yes it is.

But it seems ws_version_info.c has dependency on copyright_info.c

show_version(), in ws_version_info.c, calls get_copyright_info(), so, yes, there is a link-time dependency.

ws_version_info.c has soft link with wiretap/ws_version_info.c

Yes, if you build with autotools, the build process makes wiretap/ws_version_info.c a symbolic link to ws_version_info.c.

So if i change any of the ws_version_info.c it will throw compilation error.

First of all, you don't need to change ws_version_info.c to change the copyright notice, you only have to change wsutil/copyright_info.c. (Yes, that is true, as I just created a version of Wireshark that credits "Roland the Headless Thomson Gunner" with the copyright, by editing wsutil/copyright_info.c to change the string in get_copyright_info(), without changing ws_version_info.c, and recompiling.)

Second, the only version of ws_version_info.c in the Wireshark source is the one in the top-level directory, so that's the only one you should change. And if you change it, it'll compile. (Yes, that is true, as I just created a version of Wireshark that not only gives Mr. Zevon's character credit for Wireshark, but appends "(Or so it is claimed.)" on the line after the copyright notice, by editing the top-level ws_version_info.c to add that message to the format string, and recompiling.)

answered 15 Jul '17, 22:39

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

This is the answer I am waiting... Thanks a lot... One thing I want to share, though i changed only the top level ws_version_info.c, the compilation was failed by autotool... So any idea on that?

(16 Jul '17, 00:03) Abhisek

So any idea on that?

You probably did something wrong. Nobody else has reported a problem when they edited the top-level ws_version_info.c and tried compiling. (And, again, if you just want to change the copyright message, you don't need to change ws_version_info.c.)

(16 Jul '17, 00:50) Guy Harris ♦♦

0

If modifying the string returned by get_copyright_info() causes compilation errors you have a broken build environment.

How are you modifying the info, presumably you ARE just changing the string contents?

What ARE the build errors you get?

answered 14 Jul '17, 01:25

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%