tcpdump mailing list archives
Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump)
From: Guy Harris <gharris () sonic net>
Date: Wed, 11 Jul 2018 10:05:51 -0700
On Jul 11, 2018, at 7:06 AM, Petr Vorel <pvorel () suse cz> wrote:
It looks like 1) is impossible the need for both to define pcap_create_interface().
Currently, the list isn't set in pcap_create(), it's set in pcap_activate(), so it'd be set in pcap_activate_linux(). You would then either 1) have the "cooked mode" read-a-packet code check handle->linktype for DLT_LINUX_SLL or DLT_LINUX_SLL2 and decide based on that whether to use the SLL or SLL2 header or 2) replace the "cooked" member of the private structure with an enum supporting "raw mode", "SLL cooked mode", and "SLL2 cooked mode", and have the read-a-packet code decide how to process a packet based on that. So how is it impossible to implement 1)? _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Petr Vorel (Jul 10)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Guy Harris (Jul 10)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Petr Vorel (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Petr Vorel (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Petr Vorel (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Guy Harris (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Petr Vorel (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Denis Ovsienko (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Guy Harris (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Denis Ovsienko (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Guy Harris (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Denis Ovsienko (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Guy Harris (Jul 11)
- Re: LINKTYPE_LINUX_SLL2 implementation (libpcap & tcpdump) Guy Harris (Jul 10)