From owner-freebsd-net@FreeBSD.ORG Sun Jul 18 22:19:29 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D41AE16A4CE; Sun, 18 Jul 2004 22:19:29 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DC1743D45; Sun, 18 Jul 2004 22:19:29 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 3565A65473; Sun, 18 Jul 2004 23:19:27 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 89263-02; Sun, 18 Jul 2004 23:19:26 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 5DC9D653E6; Sun, 18 Jul 2004 23:19:26 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 26ECA61AA; Sun, 18 Jul 2004 23:19:25 +0100 (BST) Date: Sun, 18 Jul 2004 23:19:25 +0100 From: Bruce M Simpson To: Robert Watson Message-ID: <20040718221925.GE87575@empiric.dek.spc.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: "'net@freebsd.org'" Subject: Re: Question on SOCK_RAW, implement a bpf->other host tee X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2004 22:19:29 -0000 On Sun, Jul 18, 2004 at 05:38:22PM -0400, Robert Watson wrote: > > I have swapped the ip_len, ip_off fields. > > Are you sure you need to do this? I thought BPF/PCAP provided those > fields in network byte order already, in which case you shouldn't need to > touch these fields unless you need to adjust them. I think Don is referring to the fact that IP_HDRINCL in our stack expects to see these fields in host byte order (as per my update of the ip(4) manual page quite recently). Raw socket stuff being different from bpf stuff. BMS