Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754812Ab0AEVmQ (ORCPT ); Tue, 5 Jan 2010 16:42:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754286Ab0AEVmO (ORCPT ); Tue, 5 Jan 2010 16:42:14 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:34914 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754200Ab0AEVmO (ORCPT ); Tue, 5 Jan 2010 16:42:14 -0500 Date: Tue, 05 Jan 2010 13:42:18 -0800 (PST) Message-Id: <20100105.134218.258781374.davem@davemloft.net> To: cfriesen@nortel.com Cc: mst@redhat.com, eric.dumazet@gmail.com, nhorman@tuxdriver.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] net: packet: option to only pass skb protocol From: David Miller In-Reply-To: <4B43AEF6.6050701@nortel.com> References: <20100105185732.GA30346@redhat.com> <4B43AEF6.6050701@nortel.com> X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 828 Lines: 18 From: "Chris Friesen" Date: Tue, 05 Jan 2010 15:28:22 -0600 > On 01/05/2010 12:57 PM, Michael S. Tsirkin wrote: >> When sending packets with a packet socket it is often necessary to set >> protocol in msg_name: otherwise the protocol field in the skb will not >> be set correctly. > > What about automatically detecting the protocol from the data being sent > to avoid the necessity of specifying it in the first place? This limits packet socket usage to only protocols the kernel is aware of, defeating part of the usefulness of the packet socket facility. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/