* netlink_netfilter bind failure
@ 2010-01-19 16:38 net expert
0 siblings, 0 replies; only message in thread
From: net expert @ 2010-01-19 16:38 UTC (permalink / raw)
To: netfilter-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-19 16:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 16:38 netlink_netfilter bind failure net expert
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).