From: net expert <netexpert201@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: netlink_netfilter bind failure
Date: Tue, 19 Jan 2010 10:38:12 -0600 [thread overview]
Message-ID: <e8b4413d1001190838p2975d4fbg22abd072993a25ee@mail.gmail.com> (raw)
Hello,
I am trying to create small user space application to listen for
netfilter configuration message. Following is the snapshot of my code.
I am getting a bind failure (Operation not permitted error) when I try
to bind socket to specific netlink messages. Can someone please help
me here ?
nlSocketId = socket(PF_NETLINK, SOCK_RAW, NETLINK_NETFILTER);
if (nlSocketId == -1)
perror("socket create failure\n");
memset(&nlSockAddr, 0x00, sizeof(nlSockAddr));
nlSockAddr.nl_family = AF_NETLINK;
nlSockAddr.nl_groups = NFNLGRP_CONNTRACK_NEW;
if ( bind(nlSocketId, (struct sockaddr *) &nlSockAddr,
sizeof(nlSockAddr)) == -1)
{
perror("bind failure");
}
-NP
reply other threads:[~2010-01-19 16:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=e8b4413d1001190838p2975d4fbg22abd072993a25ee@mail.gmail.com \
--to=netexpert201@gmail.com \
--cc=netfilter-devel@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 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).