netlink_netfilter bind failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux