From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 24 May 2001 15:50:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 24 May 2001 15:50:10 -0400 Received: from ns.suse.de ([213.95.15.193]:5899 "HELO Cantor.suse.de") by vger.kernel.org with SMTP id ; Thu, 24 May 2001 15:50:05 -0400 Date: Thu, 24 May 2001 21:49:06 +0200 From: Andi Kleen To: David Ford Cc: linux-kernel@vger.kernel.org Subject: Re: Selectively refusing TCP connections Message-ID: <20010524214906.A16906@gruyere.muc.suse.de> In-Reply-To: <20010523202332.A31402@gruyere.muc.suse.de> <3B0D5DE0.4090906@blue-labs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B0D5DE0.4090906@blue-labs.org>; from david@blue-labs.org on Thu, May 24, 2001 at 12:15:44PM -0700 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2001 at 12:15:44PM -0700, David Ford wrote: > Is there an example somewhere of this? I don't have one handy, but basically you have to hack libpcap a bit to push the generated filters using SO_ATTACH_FILTER onto a socket. The format (LPF) understood by the kernel is a superset of the BPF stack machine code generated by libpcap. See linux/filter.h and the BPF documentation. It's main drawback is that it doesn't support variable length headers properly. -Andi