From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [libnftnl PATCH v2] utils: Add helpers for interface name wildcards
Date: Wed, 16 Jul 2025 18:12:08 +0200 [thread overview]
Message-ID: <aHfPWDRFey2444T-@orbyte.nwl.cc> (raw)
In-Reply-To: <aHe69yUQ3X_j--K6@calendula>
On Wed, Jul 16, 2025 at 04:45:11PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Jul 16, 2025 at 04:43:02PM +0200, Pablo Neira Ayuso wrote:
> > On Wed, Jul 16, 2025 at 04:39:54PM +0200, Pablo Neira Ayuso wrote:
> > > On Wed, Jul 16, 2025 at 12:01:55PM +0200, Phil Sutter wrote:
> > > > Hi,
> > > >
> > > > On Wed, Jul 16, 2025 at 11:44:59AM +0200, Florian Westphal wrote:
> > > > > Phil Sutter <phil@nwl.cc> wrote:
> > > > > > #include <string.h>
> > > > > > #include <stdlib.h>
> > > > > > +#include <libmnl/libmnl.h>
> > > > >
> > > > > Why is this include needed?
> > > >
> > > > Because of:
> > > >
> > > > | In file included from udata.c:9:
> > > > | ../include/utils.h:88:40: warning: 'struct nlattr' declared inside parameter list will not be visible outside of this definition or declaration
> > > > | 88 | const char *mnl_attr_get_ifname(struct nlattr *attr);
> > > > | | ^~~~~~
> > >
> > > I think this helper belongs to src/netlink.c
This was about libnftnl, I put the helpers into src/utils.c there with
nftnl_ prefix.
> > Not a deal breaker, Florian's proposal is also fine.
>
> Actually, my suggestion would be to add it to nftables/src/mnl.c with
> mnl_nft_ prefix (not to src/netlink.c), if it turns out this is useful
> to other projects, it could be moved there to libnftnl.
I also added it to nftables' src/mnl.c with mnl_ prefix, will change
that to mnl_nft_ as suggested.
Just realized nft.8 needs an update, too. Luckily, documentation is
pretty forgiving when it comes to typos and other goofs. ;)
Cheers, Phil
next prev parent reply other threads:[~2025-07-16 16:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 15:15 [libnftnl PATCH v2] utils: Add helpers for interface name wildcards Phil Sutter
2025-07-16 9:44 ` Florian Westphal
2025-07-16 10:01 ` Phil Sutter
2025-07-16 10:07 ` Florian Westphal
2025-07-16 10:11 ` Phil Sutter
2025-07-16 14:39 ` Pablo Neira Ayuso
2025-07-16 14:42 ` Pablo Neira Ayuso
2025-07-16 14:45 ` Pablo Neira Ayuso
2025-07-16 16:12 ` Phil Sutter [this message]
2025-07-16 14:38 ` Pablo Neira Ayuso
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=aHfPWDRFey2444T-@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).