Documentation question
Hi Pablo,
Deprecated nfq_set_queue_flags documents flag NFQA_CFG_F_FAIL_OPEN for kernel to accept packets if the kernel queue gets full.
Does this still work with libmnl?I'm thinking we need a new "Library Setup [CURRENT]" section to document available flags (including e.g. NFQA_CFG_F_GSO that examples/nf-queue.c uses).
Maybe we need Attribute helper functions as well? (documentation *and* new code).
Cheers ... Duncan.
Florian Westphal
maintainerQuoted 4 lines · Duncan Roe
Deprecated
nfq_set_queue_flagsdocuments flagNFQA_CFG_F_FAIL_OPENfor kernel to accept packets if the kernel queue gets full.Does this still work with libmnl?
Yes.
Quoted 3 lines
I'm thinking we need a new "Library Setup
[CURRENT]" section to document available flags (including e.g.NFQA_CFG_F_GSOthatexamples/nf-queue.cuses).
Makes sense, thanks.
Quoted 2 lines
Maybe we need Attribute helper functions as well? (documentation *and* new code).
If you think it makes it easier, sure, why not.
But it would be something like this:
void nfq_nlmsg_cfg_put_flags(struct nlmsghdr *nlh, uint32_t flags)
{
mnl_attr_put_u32(nlh, NFQA_CFG_FLAGS, htonl(flags));
mnl_attr_put_u32(nlh, NFQA_CFG_MASK, htonl(flags));
}I'm not sure that warrants a library helper.
Quoted 19 lines · Florian Westphal
Quoted 4 lines · Duncan Roe
Deprecated
nfq_set_queue_flagsdocuments flagNFQA_CFG_F_FAIL_OPENfor kernel to accept packets if the kernel queue gets full.Does this still work with libmnl?
Yes.
Quoted 3 lines
I'm thinking we need a new "Library Setup
[CURRENT]" section to document available flags (including e.g.NFQA_CFG_F_GSOthatexamples/nf-queue.cuses).Makes sense, thanks.
Quoted 2 lines
Maybe we need Attribute helper functions as well? (documentation *and* new code).
If you think it makes it easier, sure, why not.
But it would be something like this:
Quoted 7 lines
void
nfq_nlmsg_cfg_put_flags(struct nlmsghdr *nlh, uint32_t flags){ mnl_attr_put_u32(nlh, NFQA_CFG_FLAGS, htonl(flags)); mnl_attr_put_u32(nlh, NFQA_CFG_MASK, htonl(flags)); }I'm not sure that warrants a library helper.
Many of the existing helper functions are 2-liners, some even 1 line. These little functions often have more lines of doxygen documentation than of code.
So I think the extra helpers would fit in fine.
Cheers ... Duncan.