- To: <linux-newbie@xxxxxxxxxxxxxxx>
- Subject: RE: Query regarding pf_packet sockets
- From: "Prashant Batra (prbatra)" <prbatra@xxxxxxxxx>
- Date: Thu, 22 Mar 2012 09:05:18 +0530
- In-reply-to: <B97B134FACB2024DB45F524AB0A7B7F2063EB8C5@XMB-BGL-419.cisco.com>
- List-id: <linux-newbie.vger.kernel.org>
- Thread-index: Ac0H2vgO67/7jJIET36jNQpuBa6kbQAAcsUw
- Thread-topic: Query regarding pf_packet sockets
Hi ,
I am trying to use PF_PACKET socket along with filters applied on the socket through setsockopt, SO_ATTACH_FILTER.
Now as I create this socket, any packet coming to the kernel would be copied into the socket buffer for this socket.
So, even if I apply the filter, first few packets would always be those which do not match the filter.
Is there a way (some socket option), to make socket passive and active, so that I will set the socket in passive mode after creation,
and then set it as active, after I apply the filter, so that I only receive the filtered packet in user space.
Thanks,
Prashant
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
[Site Home]
[Audio]
[Hams]
[Kernel Newbies]
[Memory]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite Photos]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Linux Resources]
[Fedora Users]