Hi everyone, I'm using tshark with Linux environment. In my case, I modified something of packet-camel.c, built and installed all project. Now, I'm going to change some values in packet-camel.c but the the system is still running and it should not be stopped. is there any way to build only packet-camel.c into the lib file? so that we can copy-paste the new lib to replace the old one. At least, it spends just few minutes instead of an hour to build all project. Please help if you have any idea? Thank you so much! asked 09 Apr '15, 23:11 hoangsonk49 |
One Answer:
No need to autogen or configure when you only change the dissector. If you only need the new libwireshark then you could manually copy that after make. Note that it will only be used by a new instance of the tshark process, existing running tshark processes won't pick up the new library. answered 10 Apr '15, 03:49 grahamb ♦ Hi Grahamb, just to clarify. I have a running server with my tshark. Now, I change something in the source code of packet-camel.c and packet-data.c and already "make all" on the Dev server. So, is there any way to apply these updates without installing a whole new wireshark on the running server? In other words, which are the lib of packet-camel.c and packet-data.c generated on Dev server so that I just copy-paste to replace the old one on the running machine? By doing that, I don't have to remove a whole wireshark and install a new one just to update a very small code of one packet, it takes time. As you mentioned, Do i also need to replace the old tshark? Thank you (05 Nov '15, 17:48) hoangsonk49
You need to install a new libwireshark on the running server. You wouldn't need to install a new version of the Wireshark or TShark executables, but, as Graham said, "it will only be used by a new instance of the tshark process, existing running tshark processes won't pick up the new library." There is no library that contains only packet-camel.c and packet-data.c; they're just one of many components of libwireshark, so you'll have to replace libwireshark. (05 Nov '15, 19:19) Guy Harris ♦♦
Hi Harris, I found these libwireshark on the running server. As I understand, in order to apply the new update, I just:
Is it right? (05 Nov '15, 19:46) hoangsonk49 You'll find that most of those entries for libwireshark are symbolic links, you'll just need to replace the targets, e.g. libwireshark.so.3.19. I can't see a need to replace tshark. You'll just need to restart the running instance so it picks up the new libwireshark. (06 Nov '15, 03:45) grahamb ♦ |
What build method are you using, autotools or CMake?
Regardless, the build method should only rebuild that which has changed, e.g. packet-camel.o and libwireshark.
I follow the Development Guide with: ./autogen.sh; ./configure; make; make install, ... But I have to run this procedure every time and it takes time even only one file changes. If there is a way to build only packet-camel.c, so that I build the lib of packet-camel independently and copy-paste to replace the old one. It helps me to save time to reinstall the new tshark