Re: Documentation question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 21, 2019 at 12:26:17AM +0100, Florian Westphal wrote:
> Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> wrote:
> > 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?
>
> Yes.
> > 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).
>
> Makes sense, thanks.
>
> > 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.

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.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux