From: fordearlinux@gmail.com (shivanth)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Registering for only Specific Packets from Net-Filter!!!!
Date: Thu, 17 Nov 2011 22:40:27 +0530 [thread overview]
Message-ID: <4EC54003.8050609@gmail.com> (raw)
In-Reply-To: <4EC4C7A2.4030501@gmail.com>
On 11/17/2011 2:06 PM, Abhijit Pawar wrote:
> On 11/17/2011 12:03 PM, Mulyadi Santosa wrote:
>> On Wed, Nov 16, 2011 at 17:50, Kesava Srinivas<vunnavafuture@gmail.com> wrote:
>>> 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
next prev parent reply other threads:[~2011-11-17 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 10:50 Registering for only Specific Packets from Net-Filter!!!! Kesava Srinivas
2011-11-17 6:33 ` Mulyadi Santosa
2011-11-17 8:36 ` Abhijit Pawar
2011-11-17 17:10 ` shivanth [this message]
2011-11-18 4:37 ` Kesava Srinivas
2011-11-18 13:44 ` Mulyadi Santosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC54003.8050609@gmail.com \
--to=fordearlinux@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.