Fwd: socket filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Stepen. My kernel is 2.6.27.45 :).

I am taking bpf string like "host <ip>" from command prompt and doing
"pcap_compile_nopcap". Create my filter and do setsockopt but I am not
able to get result i wanted. May be i am doing something wrong in
creating filters. I am using link type as DLT_RAW.



On Fri, Aug 20, 2010 at 10:34 AM, Stephen Hemminger
<shemminger@xxxxxxxxxx> wrote:
> On Fri, 20 Aug 2010 09:57:33 +0530
> krunal patel <krunal.raj@xxxxxxxxx> wrote:
>
>> Hi,
>>
>> There are ioctl's for attaching bpf like filters to socket. I found it
>> in kernel documentation.
>>     setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &Filter, sizeof(Filter));
>> I doubt is can we attach filters in case of netlink socket.
>> I am logging all packets using ULOG target and using ulogd.
>> Is it possible to use same ioctl for netlink socket we create in ulogd?
>
> You can use socket filters on netlink sockets since  2.6.26
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux