From owner-freebsd-net@FreeBSD.ORG Tue May 20 06:20:50 2003 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 2B6D237B401 for ; Tue, 20 May 2003 06:20:50 -0700 (PDT) Received: from mail-3.tiscali.it (mail-3.tiscali.it [195.130.225.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE81B43FB1 for ; Tue, 20 May 2003 06:20:48 -0700 (PDT) (envelope-from gianz@radiance.it) Received: from mail.radiance.ods.org (217.133.190.91) by mail-3.tiscali.it (6.7.016) id 3EC4E8FB001DFC0D for freebsd-net@freebsd.org; Tue, 20 May 2003 15:20:46 +0200 Received: (qmail 16770 invoked by uid 1030); 20 May 2003 13:20:42 -0000 Date: Tue, 20 May 2003 15:20:42 +0200 From: Giampaolo Fresi Roglia To: freebsd-net@freebsd.org Message-ID: <20030520132042.GA16689@radiance.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline User-Agent: Mutt/1.4i X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: [BPF Read and Write] Strange behaviour? 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: Tue, 20 May 2003 13:20:50 -0000 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, I must access to bpf in order to rewrite network traffic from a device to another one in both directions; I open 2 bpf descriptors, one for every device I must use and I found a strange behaviour: when I try to write a packet to bpf, it seems to me the driver drops silently some packets, even if the buffer associated with bpf is not full. I tried my program on FreeBSD 4.7, 4.8 and 5.0 (RELEASE). FreeBSD 5.0 behaves correctly unlike 4.7 and 4.8. I wonder if I am wrong with something, or if I can use a workaround for this... I attach part of the code I used to access bpf... Thanks in advance. -- Giampaolo Fresi Roglia GPG Key at http://security.dico.unimi.it/~gianz/gianz.gpg CERT-IT Computer Emergency Response Team ITaly http://security.dico.unimi.it --6TrnltStXW4iwmi0--