LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-07-2010, 01:55 PM   #1
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 165
Blog Entries: 1

Rep: Reputation: 22
Netlink Sockets


I am trying to make a health monitor from a kernel module to a userspace service. I read about netlink sockets, but everything I have read says you must modify netlink.h to include your new netlink family type, and compile the kernel.
Code:
#define NETLINK_MYLINK  17
The entire reason I am using a kernel module is so I dont have to recompile the kernel, and can do everything with a stock kernel. Could I just define my family inside my kernel module rather than in netlink.h?

If not I noticed there are also some families that if nothing else is using them I could just use those. Like any of these.
Code:
#define NETLINK_UNUSED          1
#define NETLINK_GENERIC         16
Thanks.
 
Old 05-09-2010, 08:12 AM   #2
ForzaItalia2006
Member
 
Registered: Dec 2009
Location: Walldorf, Germany
Distribution: (X)Ubuntu, Arch, Gentoo
Posts: 205

Rep: Reputation: 67
Hey,

I'm not completely sure if this solves your problem, because I don't remember the complete functionality of 'Generic Netlink' and I'm too lazy to read the article again :-), but please check out this:

http://lwn.net/Articles/208755/

Generic netlink allows you to multiplex the available netlink busses, so maybe you could reuse existing busses without defining your own family.

- Andi -
 
Old 05-09-2010, 12:20 PM   #3
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 165

Original Poster
Blog Entries: 1

Rep: Reputation: 22
It looks like that might work.

Thanks.
 
  


Reply



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
Facing problem while using netlink sockets avyadavnitw Programming 0 07-08-2009 11:48 AM
Problem w/ rmmod from netlink sockets ranthal Linux - Kernel 1 06-25-2009 05:58 PM
Generic Netlink sockets krishna123 Linux - Networking 0 03-04-2009 01:30 AM
A question about netlink sockets alfrag Linux - Newbie 1 12-26-2008 08:48 AM
Netlink Sockets Problem gio123 Programming 3 01-23-2005 06:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:18 PM.

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