lkml.org 
[lkml]   [1999]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: LPF linux packet filter
On Sun, Oct 24, 1999 at 08:38:38AM +0300, CyberPsychotic wrote:

> Just curious is there any documentation covering linux packet
> filter filters behind Documentation/filter.txt, net/core/filter.c and
> include/linux/filter.h available? Or are there any codes which use this
> feature, so I could peep for sample usage :)

It really is as simple as it looks -- I used it for implementing the PPP
active-filter / pass-filter options. Assuming you're getting a BPF-like
filter "program" from user space (the user-space code can hack into libpcap
to generate it), just call sk_chk_filter to make sure it's sane, then call
sk_run_filter to check a packet against the filter.

--
Your fault: core dumped

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.172 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site