Some time ago I wrote a program that reads Microsoft IIS web log files and
converts them into PCAP-NG format. I then wrote a matching dissector to
produce nice neat output. I want to rewrite it because:
1. The field names and data types are defined in the first record of the
PCAP-NG file - this is how the dissector knows the layout of the file
2. Each data record is encapsulated in a dummy Ethernet frame and I want to
eliminate this
3. I'd like to make it more general so that it can also deal with CSV, TSV
and, later, variable format log records
My plan is to:
1. Insert the field name and data type information into a new IDB option
block
2. Write a plugin_if function to enable a dissector to get a pointer to the
IDB information and hence get my hands on the field names and data types
3. Define a new link type for the IDB; working name is Text Data Format (TDF)
* I understand that I have to ask for this (a value for DLT_TDF) from
the tcpdump-work...@lists.tcpdump.org<mailto:tcpdump-work...@lists.tcpdump.org>
* This means that the TDF records would be below (within) the Frame
4. Add a new WTAP_ENCAP_TDF definition in wtap.h
5. Add an appropriate entry to the pcap_to_wtap_map[] array in pcap-common.c
6. Write a dissector for the TDF records (dissect_tdf)
7. Use dissector_add_uint("wtap_encap", WTAP_ENCAP_TDF, tdf_handle) to hook
the dissector into the correct point in the table
Does this look like a reasonable plan?
Have a missed an existing feature that I should be using? I remember seeing
Graham Bloises presentation on three ways to write dissectors; C, LUA and
something else. Wasn't the something else about using a high-level description
of the packets. I'd look it up but I'm on a plane at the moment.
Thanks and regards...Paul
PS: Bit of an update. Just made the changes to eliminate the Ethernet headers
(with dummy DLT_TDF value), modified my dissector and it works! Wow - that was
a lot simpler than I thought.
______________________________________________________________________
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
Any views or opinions expressed are solely those of the author and do not
necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be intercepted,
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of e-mail transmission.
Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour
House, Coopers End Lane, Stansted, Essex CM24 1SJ
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe