mdavidsaver / cashark

Wireshark dissector plugin for EPICS protocols
Other
24 stars 11 forks source link

Include formatted time in `pkt.cols.info` #11

Open mdavidsaver opened 2 years ago

mdavidsaver commented 2 years ago

cf. https://epics.anl.gov/tech-talk/2021/msg02039.php

On 11/24/21 6:07 PM, Shankar, Murali via Tech-talk wrote:

Hello,

I am trying to track down some connectivity issues. I am using the wireshark LUA plugin to process a packet dump from production. Being a wireshark newbie, I was wondering if anyone know how to print the timestamp_sec and timestamp_nsec as part of rendering the ca_monitor event here - https://github.com/mdavidsaver/cashark/blob/master/ca.lua#L694 https://github.com/mdavidsaver/cashark/blob/master/ca.lua#L694. I am using wireshark-1.10.14 that ships as part of RHEL7...

mdavidsaver commented 2 years ago

The time, when available, is already being formatted[1]. At least the seconds part.

Including the fraction part would take some effort. The Lua os.date() does not seem to understand fractional seconds, so this would need to be done explicitly with some string manipulation. (like epicsTimeToStrftime() does)

It might also mean some restructuring of how parse_dbr() interacts with its callers to eg. move more of the printing into parse_dbr().

mdavidsaver commented 2 years ago

I'm not planning to work on this immediately. If someone else is inclined to do, please make a note here.