Packet Headers
Hi all,
I was trying to get used to libipq and netfilter for the last two couple of days, and I am quite amazed how easy it is to filter packets from userspace using these tools. I have one question though which I couldn't manage to find the answer to in the documentations at netfilter.org, and I think maybe because it is trivial. When I get a packet through the libipq if I use only IPQ_COPY_META as the argument in the ipq_set_mode function, I will get only the headers. If I use IPQ_COPY_PACKET then i will get both packet data and headers. The problem I have is what "headers" are we talking about "IP headers" (that is TCP header + IP header ) or a packet header at the physical level where there is also the header of the MAC and PHY layer appended in front of the TCP and IP headers?
Regards,
Oumer
Quoted 14 lines · Oumer Teyeb
Hi all,
I was trying to get used to libipq and netfilter for the last two couple of days, and I am quite amazed how easy it is to filter packets from userspace using these tools. I have one question though which I couldn't manage to find the answer to in the documentations at netfilter.org, and I think maybe because it is trivial. When I get a packet through the libipq if I use only
IPQ_COPY_METAas the argument in theipq_set_modefunction, I will get only the headers. If I useIPQ_COPY_PACKETthen i will get both packet data and headers. The problem I have is what "headers" are we talking about "IP headers" (that is TCP header + IP header ) or a packet header at the physical level where there is also the header of the MAC and PHY layer appended in front of the TCP and IP headers?
IP + TCP headers.
Joost