Wireshark-bugs: [Wireshark-bugs] [Bug 7300] patch: Add frame.interface support for pcapng LINKTY
Date: Wed, 20 Jun 2012 16:26:03 -0700 (PDT)

--- Comment #3 from Stephen Donnelly <[email protected]> 2012-06-20 16:26:03 PDT ---
(In reply to comment #2)
> I'd prefer to have main part of this code in libpcap.
>  - interface_id in pcap_pkthdr.

You mean create a custom sf_pkthdr with new magic number, savefile support etc?

I assume that struct pcap_pkthdr can't be changed without breaking

> If not possible, well:
> 1/ use some define instead of 197...

I noticed that get_pcap_linktype() in dumpcap.c has a lot of code like "if
(linktype == 7)", so I was assuming that using bpf.h DLT_* defines was frowned

I didn't want to use wtap_wtap_encap_to_pcap_encap() or vice versa in
capture_loop_write_packet_cb() as those calls perform linear searches.

Any suggestions on where I could cache the mapping?

> 2/ g_malloc() can't fail

Will fix.

Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.