Thread (6 messages) 6 messages, 4 authors, 2011-11-18

Registering for only Specific Packets from Net-Filter!!!!

From: shivanth <hidden>
Date: 2011-11-17 17:10:27

On 11/17/2011 2:06 PM, Abhijit Pawar wrote:
On 11/17/2011 12:03 PM, Mulyadi Santosa wrote:
quoted
On Wed, Nov 16, 2011 at 17:50, Kesava Srinivas[off-list ref]  wrote:
quoted
HI Guys,

I'm a Newbie to Linux Kernel Development. Need some Clarification in
understanding Net-Filter Hooks.

Can I register only for the Necessary Packets [Ex: IPSEC etc...] from the
Net-Filters?? AFAIK ; Net-Filter Module send the Packets to the
Corresponding Module based on pre-defined HOOKS. Let us say; there are Many
Packets reaching that Hooks; and if I am Interested only in some Packets
from Net-Filter module; can I do that ???
something like:
iptables [some rules] -j ULOG
?

Check "man iptables" and see if that suits your need. FYI ULOG target
uses netlink to deliver the packet to user space for further
processing.

Hi Kesava Srinivas,
If this is for any application in user space, I would recommend you take 
a look at libPcap.

Regards,
Abhijit Pawar
Why don't you check for the  type of the received packet ( taken from
the queue) in your hook function and process it if matches your
requirement else just return NF_ACCEPT  so that it is processed by other
hooks.
Regards
Shivanth
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help