tcpdump mailing list archives
Re: vlan tagged packets and libpcap breakage
From: Ani Sinha <ani () aristanetworks com>
Date: Mon, 17 Dec 2012 11:49:15 -0800
On Mon, Dec 17, 2012 at 2:35 AM, Guy Harris <guy () alum mit edu> wrote:
On Dec 17, 2012, at 1:50 AM, "David Laight" <David.Laight () ACULAB COM> wrote:How are you going to tell whether a feature is present in a non-Linux kernel ?The Linux memory-mapped capture mechanism is not present in a non-Linux kernel, so all the libpcap work involved here would, if necessary on other platforms, have to be done >differently on those platforms. Those platforms would have to have their own mechanisms to indicate whether any changes to filter code, processing of VLAN tags supplied out ofband, etc. would need to be done.
Actually lib-pcap has these pcap-<platform>.c files that are kind of like platform specific drivers that plug into platform independent code like gencode.c or bpf_filter.c. These platform specific drivers are responsible for getting packets from the kernel and running filters (kernel or userland) on it. So all linux specific code to get a packet and packet metadata from the kernel can neatly reside in pcap-linux.c. Unfortunately though, in this specific problem involving filtering with vlan tags, both code generation (gentags.c) and code running the filter (bpf_filter.c) will have to be aware of linux specific semantics. Due to the issues that Bill had explained earlier in the thread, we can not rely on post processing before installing the kernel filter. Therefore, we need to generate a filter that can be directly installed in the kernel. For the same reason, bpf_filter() code also needs to change - be aware of linux specific semantics. _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Re: vlan tagged packets and libpcap breakage, (continued)
- Re: vlan tagged packets and libpcap breakage Stephen Hemminger (Dec 13)
- Message not available
- Re: vlan tagged packets and libpcap breakage Ani Sinha (Dec 12)
- Re: vlan tagged packets and libpcap breakage Ani Sinha (Dec 12)
- Re: vlan tagged packets and libpcap breakage Daniel Borkmann (Dec 13)
- Re: vlan tagged packets and libpcap breakage Ani Sinha (Dec 13)
- Re: vlan tagged packets and libpcap breakage Daniel Borkmann (Dec 13)
- Re: vlan tagged packets and libpcap breakage Ani Sinha (Dec 13)
- Re: vlan tagged packets and libpcap breakage David Laight (Dec 17)
- Re: vlan tagged packets and libpcap breakage Guy Harris (Dec 17)
- Re: vlan tagged packets and libpcap breakage Daniel Borkmann (Dec 17)
- Re: vlan tagged packets and libpcap breakage Ani Sinha (Dec 17)