From owner-freebsd-net@FreeBSD.ORG Mon Jan 14 15:07:39 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF13216A5B9 for ; Mon, 14 Jan 2008 15:07:39 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from s200aog16.obsmtp.com (s200aog16.obsmtp.com [207.126.144.130]) by mx1.freebsd.org (Postfix) with SMTP id EAB2A13C506 for ; Mon, 14 Jan 2008 15:07:37 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from source ([217.206.187.80]) by eu1sys200aob016.postini.com ([207.126.147.11]) with SMTP; Mon, 14 Jan 2008 15:07:36 UTC Received: from bill.mintel.co.uk (bill.mintel.co.uk [10.0.0.89]) by rodney.mintel.co.uk (Postfix) with ESMTP id 7D7A218141E for ; Mon, 14 Jan 2008 15:07:36 +0000 (GMT) Message-ID: <478B7AB7.5010208@tomjudge.com> Date: Mon, 14 Jan 2008 15:07:35 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Programming interface MAC filter without enabling PROMISC on an interface from user space. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 15:07:39 -0000 Hi, I have just started experimenting with OpenLLDP and come across a little bit of a nasty. When it opens the interface, it puts it into PROMISC mode, which I don't really want to happen. Is there any way to add the LLDP MAC address (01-80-C2-00-00-0E) to the interface mac filter from user space, so that the interface does not have to be set to PROMISC? The OpenLLDP uses BPF to interface with the network stack as it has to send and receive RAW Ethernet frames (ether type 88-CC). If this is not possible where would one start with moving the LLDP implementation into the kernel. I was thinking of 3 options: * Having a virtual interface (like vlan/carp) that attaches to a parent that processes the packages. * A netgraph node to processes the packets and send responses. * A core protocol handler that deals with the hole thing for any Ethernet capable interface. Any help with this would be greatly appreciated. Tom