LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Netlink sockets usage to communicate b/w user and kernel space. (https://www.linuxquestions.org/questions/linux-newbie-8/netlink-sockets-usage-to-communicate-b-w-user-and-kernel-space-632883/)

vinodkr83 04-04-2008 12:58 AM

Netlink sockets usage to communicate b/w user and kernel space.
 
Hi All,

While creating a netlink socket in the Kernel space i read in a website lwn.net/Articles/131802/ that, if the second argument to

struct sock *netlink_kernel_create(int unit,
void (*input)(struct sock *sk, int len));
is NULL, that is, if the call back function to handle is NULL, user space cannot write a message to the socket.

Is this right??

My requirement is i need to send a message from user space to kernel space. But, i don't want any callback function to handle the message received from the netlink socket. So i have specified the second argument in netlink_kernel_create as NULL. But after reading the article in the site, i think i should re-write some part of the code.

Kindly tell me whether it is mandatory to mention a function pointer as second argument if i want to send a message from user to kernel space by writing in the socket created.

kumar_bst 07-03-2009 03:22 AM

below mention link may be helpful,
http://www.linuxjournal.com/article/8498


All times are GMT -5. The time now is 11:04 AM.