On Sun, Jun 14, 2015 at 11:45:47AM +0200, Daniel Borkmann wrote:
> On 06/14/2015 10:36 AM, Vadim Kochan wrote:
> ...
> >>I.e. why not letting  pcap_get_hdr_length() handle the additional
> >>sll size in order to avoid putting upper layer logic into the
> >>backend section (it should be decoupled from this, also for
> >>performance reasons)?
> >>
> >>That also leaves me wondering, if it would be easier/possible to
> >>add two internal/pseudp pcap magic types that just are pcap-us + sll
> >>and pcap-ns + sll format, and since this number is unknown to others,
> >>we'd need an automatic detection, that would remap the default to
> >>the cooked type magics. Perhaps that could shrink the extra fast-path
> >>logic we need to handle this (it would just need to have some extra
> >>logic with the pcap file header itself, the rest might only be the
> >>mapping of pkt-hdr, but no extra backend changes would be needed)?
> >>
> >>What do you think?
> >I will try to rework this better.
> 
> Great, let me know if you stumble upon some obstacles. I think we're
> almost there when we get this resolved.
> 
> Thanks again,
> Daniel

OK, I reworked to new series v2 where I did not touch I/O pcap modules
only in few lines because of adding "h" union to keep all kinds of pcap 
hdrs in pcap_pkthdr_t.

I did some testing:
    - default pcap sniffing,
    - --coked options used,
    - only netlink interface,
    - radiotap (-R option),
    - different I/O types,
    - opening netsniff-ng's pcap in wireshark & vice-versa,
    
But did not test the case when TX from pcap to DEV.

The main change is to adding SLL hdr struct at the end of default & nsec
pcap types, so it was only needed to make right len & caplen
modifications, so it was not needed to add additional pcap types.

Regards,

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to