summaryrefslogtreecommitdiffstats
path: root/src/libnfnetlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnfnetlink.c')
-rw-r--r--src/libnfnetlink.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
index a836de1..c1c4477 100644
--- a/src/libnfnetlink.c
+++ b/src/libnfnetlink.c
@@ -131,6 +131,16 @@ int nfnl_fd(struct nfnl_handle *h)
return h->fd;
}
+/**
+ * nfnl_portid - returns the Netlink port ID of this socket
+ * @h: nfnetlink handler
+ */
+unsigned int nfnl_portid(const struct nfnl_handle *h)
+{
+ assert(h);
+ return h->local.nl_pid;
+}
+
static int recalc_rebind_subscriptions(struct nfnl_handle *nfnlh)
{
int i, err;