All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vadim Kochan <vadim4j@gmail.com>
To: netdev@vger.kernel.org
Subject: Re: iproute2 util: Change signature of rtnl dump filters to use struct params
Date: Wed, 3 Sep 2014 10:32:47 +0300	[thread overview]
Message-ID: <CAMw6YJL46LTiKC_mVSNGxqmXOfhwvEFFrLpOPLZHgrYEep5T2w@mail.gmail.com> (raw)
In-Reply-To: <CAMw6YJJq1MP+r6=8KrhBi9bPUS8E1JJjb3qOjbjVf4Ano0AVsA@mail.gmail.com>

Sorry, this it not patch for probably applying, it was get into
patchwork queue after I copy pasted
here the diff, this is only for discussing.

Regards,

On Wed, Sep 3, 2014 at 2:46 AM, Vadim Kochan <vadim4j@gmail.com> wrote:
> Hi all,
>
> I am thinking about to make some refactoring and change the signature
> of all rtnl dump filters to form:
>
> diff --git a/include/libnetlink.h b/include/libnetlink.h
> index fe7d5d3..9514e67 100644
> --- a/include/libnetlink.h
> +++ b/include/libnetlink.h
> @@ -39,8 +39,14 @@ extern int rtnl_dump_request(struct rtnl_handle
> *rth, int type, void *req,
>                              int len)
>         __attribute__((warn_unused_result));
>
> -typedef int (*rtnl_filter_t)(const struct sockaddr_nl *,
> -                            struct nlmsghdr *n, void *);
> +struct nl_param
> +{
> +       struct sockaddr_nl *who;
> +       struct nlmsghdr *n;
> +       void *arg;
> +};
> +
> +typedef int (*rtnl_filter_t)(struct nl_param *p);
>
>  struct rtnl_dump_filter_arg
>  {
>
> What do you think?
>
> Regards,

      reply	other threads:[~2014-09-03  7:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 23:46 iproute2 util: Change signature of rtnl dump filters to use struct params Vadim Kochan
2014-09-03  7:32 ` Vadim Kochan [this message]

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=CAMw6YJL46LTiKC_mVSNGxqmXOfhwvEFFrLpOPLZHgrYEep5T2w@mail.gmail.com \
    --to=vadim4j@gmail.com \
    --cc=netdev@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.