Skip to contentSkip to conversation

Communication between kernel modules (what's the proper way?)

DISCUSSION JC 2 participants 2 messages Sep 13, 2005 – Sep 14, 2005 netfilter

lore
Share & tools
lore

JC

author
#0 lore raw

Somewhat out of topic for the mailing list, but I guess the developers here could advise me on the matter:

I have developed two modules that use hooks to manipulate packets, and I wish for them to communicate with each other. The proper way to communicate with userspace is by using ioctls. But what is a proper way to use to pass data between the two modules, bearing in mind these are my modules and I cant apply for a system call...?

regards,
Ioannis

#1 lore raw
Quoted 8 lines · JC

Somewhat out of topic for the mailing list, but I guess the developers here could advise me on the matter:

I have developed two modules that use hooks to manipulate packets, and I wish for them to communicate with each other. The proper way to communicate with userspace is by using ioctls. But what is a proper way to use to pass data between the two modules, bearing in mind these are my modules and I cant apply for a system call...?

This isn't netfilter related at all, but it's related with kernel programming.

You could do it by means of kernel notifiers (linux/notifier.h). You can export a notifier_block that can be used to [un]register callbacks (notifier_chain_[un]register) by both modules.

--
Pablo