This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

How to set packet metadata in realtime?

asked Nov 02 '17

Hello, I'd like to know if there is a mechanism/interface in tshark to modify packets while they are being live captured and before they are written into a .pcapng file.

What I'd like to accomplish is to set some metadata(I think the opt_comment field would be suitable for that) in the next incomming packet(s) after an external trigger.

If it's not possible with tshark, do you have any ideas how it could be done with another tool?

Thanks in advance!

1 Answer

0

answered Nov 03 '17

Hello, I'd like to know if there is a mechanism/interface in tshark to modify packets while they are being live captured and before they are written into a .pcapng file.

No, there isn't.

What I'd like to accomplish is to set some metadata(I think the opt_comment field would be suitable for that) in the next incomming packet(s) after an external trigger.

If it's not possible with tshark, do you have any ideas how it could be done with another tool?

The only tool I know of that could do that would be a C compiler. :-)

I.e., I know of no packet-capturing tool that will do that for you, so you'd either have to write your own or modify an existing one.

cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.