[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMw6YJL46LTiKC_mVSNGxqmXOfhwvEFFrLpOPLZHgrYEep5T2w@mail.gmail.com>
Date: Wed, 3 Sep 2014 10:32:47 +0300
From: Vadim Kochan <vadim4j@...il.com>
To: netdev@...r.kernel.org
Subject: Re: iproute2 util: Change signature of rtnl dump filters to use
struct params
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@...il.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,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists