Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-04-2008, 01:58 AM   #1
LQ Newbie
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
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 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.
Old 07-03-2009, 04:22 AM   #2
Registered: Jul 2007
Posts: 36
Blog Entries: 1

Rep: Reputation: 15
below mention link may be helpful,

Last edited by kumar_bst; 07-03-2009 at 05:00 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP - can't get to sockets to communicate ivanatora Programming 3 11-08-2007 07:54 AM
sockets usage in kernel modules cipicip Programming 3 12-22-2005 10:10 AM
Kernel module using netlink sockets arunka Programming 1 03-31-2005 08:42 AM
Netlink Sockets Problem gio123 Programming 3 01-23-2005 07:17 PM
Adding Routes using Netlink Sockets mpls_linux Linux - Networking 0 05-22-2004 10:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration