All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Duncan Roe <duncan_roe@optusnet.com.au>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libnetfilter_log] src: doc: revise doxygen for module "Netlink message helper functions"
Date: Tue, 7 Sep 2021 01:04:24 +0200	[thread overview]
Message-ID: <20210906230424.GA356@salvia> (raw)
In-Reply-To: <20210905023320.29740-1-duncan_roe@optusnet.com.au>

On Sun, Sep 05, 2021 at 12:33:20PM +1000, Duncan Roe wrote:
> Adjust style to work better in a man page.
> Document actual return values.

All good, except one chunk I'm ambivalent.

> Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
> ---
>  src/nlmsg.c | 53 +++++++++++++++++++++++++----------------------------
>  1 file changed, 25 insertions(+), 28 deletions(-)
> 
> diff --git a/src/nlmsg.c b/src/nlmsg.c
> index 3ebb364..399b19a 100644
> --- a/src/nlmsg.c
> +++ b/src/nlmsg.c
> @@ -18,15 +18,15 @@
>   */
>  
>  /**
> - * nflog_nlmsg_put_header - reserve and prepare room for nflog Netlink header
> - * \param buf memory already allocated to store the Netlink header
> - * \param type message type one of the enum nfulnl_msg_types
> - * \param family protocol family to be an object of
> - * \param qnum queue number to be an object of
> + * nflog_nlmsg_put_header - convert memory buffer into an nflog Netlink header

this is not just converting as in a cast, I understand "reserve and
prepare room" might not be so clear to understand.

> + * \param buf pointer to memory buffer
> + * \param type either NFULNL_MSG_PACKET or NFULNL_MSG_CONFIG

I'd keep above a reference to 'enum nfulnl_msg_types'.

> + * \param family protocol family
> + * \param qnum queue number

I remember you posted a patch to rename qh to gh, from queue handler
to group handler. You could rename this to 'group number'.

>   *
> - * This function creates Netlink header in the memory buffer passed
> - * as parameter that will send to nfnetlink log. This function
> - * returns a pointer to the Netlink header structure.
> + * Creates a Netlink header in _buf_ followed by
> + * a log\-subsystem\-specific extra header.

This function is adding the netlink + nfnetlink headers to the buffer
as well as setting up the header fields accordingly.

> + * \return pointer to created Netlink header structure
>   */
>  struct nlmsghdr *
>  nflog_nlmsg_put_header(char *buf, uint8_t type, uint8_t family, uint16_t qnum)

  reply	other threads:[~2021-09-06 23:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  2:33 [PATCH libnetfilter_log] src: doc: revise doxygen for module "Netlink message helper functions" Duncan Roe
2021-09-06 23:04 ` Pablo Neira Ayuso [this message]
2021-09-07  7:06   ` Duncan Roe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906230424.GA356@salvia \
    --to=pablo@netfilter.org \
    --cc=duncan_roe@optusnet.com.au \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.