Thanks again, Duncan! Have a wonderful weekend. On Sat, Feb 20, 2021 at 1:27 AM Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> wrote: > > On Fri, Feb 19, 2021 at 08:38:14AM -0700, Psyspy 22 wrote: > > Hello, > > > > I am using the example in the library's git repo. > > > > 1. Do I need to copy the payload to another buffer? I saw a few > > examples (using the deprecated API) that use pktb_alloc to allocate > > memory and then copy payload to it. > > At the moment, yes. > > > > 2. How do I parse the payload? Let's say the IP and TCP headers. Can I > > use the nfq_ip_get_hdr helper function or is it deprecated too? > > nfq_ip_get_hdr is part of the modern interface. Anything using struct pkt_buff > is (the old ones use struct nfq_data). > > https://netfilter.org/projects/libnetfilter_queue/doxygen/html/modules.html > documents all functions and whether they are deprecated > > > > Thanks, > > psyspy > > Cheers ... Duncan.