Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

We do not support calling the TShark main function more than once, and never will, so there is, no solution to make your program, as written, work, and there will never be such a solution.

If you want to process multiple capture files within one invocation of your program, you will need to modify TShark so that, for example, its version of cf_close() does all the necessary work that the Wireshark version, in file.c does, and probably other changes, and then take the part of the main function that reads and processes the file, make it into a subroutine, and call it twice.

That's going to be a lot of work. I have not looked into what you would have to do, and will not do so, so I, at least, will not be able to give you any more help on doing that.

You could, instead, just run TShark twice from a script. I would VERY STRONGLY suggest that you consider that rather than trying to do some MAJOR hacking on a program that's not simple.