netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan Roe <duncan_roe@optusnet.com.au>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH libnetfilter_queue 1/1] Retire 2 libnfnetlink-specific functions
Date: Tue, 24 Oct 2023 11:51:10 +1100	[thread overview]
Message-ID: <20231024005110.19686-2-duncan_roe@optusnet.com.au> (raw)
In-Reply-To: <20231024005110.19686-1-duncan_roe@optusnet.com.au>

Remove nfq_nfnlh() and nfq_open_nfnl() from public access.

As outlined near the foot of
https://www.spinics.net/lists/netfilter-devel/msg82762.html,
nfq_open_nfnl() and nfq_nfnlh() are "problematic" to move to libmnl.

These functions are only of use to users writing libnfnetlink programs,
and libnfnetlink is going away.

Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
 .gitignore                                      | 1 +
 include/libnetfilter_queue/libnetfilter_queue.h | 2 --
 src/libnetfilter_queue.c                        | 5 +++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index ae3e740..b64534a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ Makefile.in
 /libnetfilter_queue.pc
 
 /examples/nf-queue
+/examples/nfq6
 /doxygen/doxyfile.stamp
 /doxygen/html/
 /doxygen/man/
diff --git a/include/libnetfilter_queue/libnetfilter_queue.h b/include/libnetfilter_queue/libnetfilter_queue.h
index ec727fc..c5d4cc7 100644
--- a/include/libnetfilter_queue/libnetfilter_queue.h
+++ b/include/libnetfilter_queue/libnetfilter_queue.h
@@ -28,7 +28,6 @@ struct nfq_data;
 
 extern int nfq_errno;
 
-extern struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h);
 extern int nfq_fd(struct nfq_handle *h);
 
 typedef int  nfq_callback(struct nfq_q_handle *gh, struct nfgenmsg *nfmsg,
@@ -36,7 +35,6 @@ typedef int  nfq_callback(struct nfq_q_handle *gh, struct nfgenmsg *nfmsg,
 
 
 extern struct nfq_handle *nfq_open(void);
-extern struct nfq_handle *nfq_open_nfnl(struct nfnl_handle *nfnlh);
 extern int nfq_close(struct nfq_handle *h);
 
 extern int nfq_bind_pf(struct nfq_handle *h, uint16_t pf);
diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
index bf67a19..e8de90a 100644
--- a/src/libnetfilter_queue.c
+++ b/src/libnetfilter_queue.c
@@ -237,9 +237,11 @@ static int __nfq_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[],
 	return qh->cb(qh, nfmsg, &nfqa, qh->data);
 }
 
+static struct nfq_handle *nfq_open_nfnl(struct nfnl_handle *nfnlh);
+static struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h);
+
 /* public interface */
 
-EXPORT_SYMBOL
 struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h)
 {
 	return h->nfnlh;
@@ -413,7 +415,6 @@ struct nfq_handle *nfq_open(void)
  *
  * \return a pointer to a new queue handle or NULL on failure.
  */
-EXPORT_SYMBOL
 struct nfq_handle *nfq_open_nfnl(struct nfnl_handle *nfnlh)
 {
 	struct nfnl_callback pkt_cb = {
-- 
2.35.8


  reply	other threads:[~2023-10-24  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24  0:51 [PATCH libnetfilter_queue 0/1] libnfnetlink dependency elimination Duncan Roe
2023-10-24  0:51 ` Duncan Roe [this message]
2023-10-24  8:57   ` [PATCH libnetfilter_queue 1/1] Retire 2 libnfnetlink-specific functions Pablo Neira Ayuso
2023-10-25 22:30     ` 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=20231024005110.19686-2-duncan_roe@optusnet.com.au \
    --to=duncan_roe@optusnet.com.au \
    --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).