From owner-freebsd-net@FreeBSD.ORG Thu Nov 6 16:00:24 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 9EDCB106575C for ; Thu, 6 Nov 2008 16:00:18 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 57EB78FC13 for ; Thu, 6 Nov 2008 16:00:09 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so268081yxb.13 for ; Thu, 06 Nov 2008 08:00:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=DVL0M5ZbGIFtKES/vndfP+yuR8RyrpPsRkcbTMMBqzU=; b=t7FXW3WM/4ddGbih5Qm3KdkkeujTnr++GtmcooJKY4pxGYWeKw5AsgB3iGKN1/vZWq GBagbgyJUbxBAS0AmORMQnT9pDNa1YYjZaIDwJh2rpQyDM+2omlEql9ghTC4QofqHeq2 0QgxMJ56rklcDIpbpCTgZs5kwD3b5TQ+T+AO8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=nJuKYFK4XQJgARZ9/Er/2xk863TjRvZPOF4SoVN17eE0UL86IVYCuzdS9uXoD4vawy XhCf/FsidOxHB5ceOmVw9ak1jkgkEaL/9Os8gPBL4T2rQKHucZoYAVgOJ0gKM+ZAxv6P 3OxfX8NG+WpBd1GFsJ0zAA+TozyGz3iU+e8sg= Received: by 10.151.114.6 with SMTP id r6mr1612697ybm.62.1225986606373; Thu, 06 Nov 2008 07:50:06 -0800 (PST) Received: by 10.150.211.7 with HTTP; Thu, 6 Nov 2008 07:50:06 -0800 (PST) Message-ID: Date: Thu, 6 Nov 2008 17:50:06 +0200 From: "Ivo Vachkov" To: "FreeBSD Net" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: BPF question 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: Thu, 06 Nov 2008 16:00:24 -0000 Hello all, I am using simple write() calls to send packets over BPF file descriptor. The BPF file descriptor is in buffered read mode (I assume this is the default and I do not set it explicitly). From what I see my write() calls are somewhat buffered. Since timing is relatively important for my project I'd like to ask if there is a way "flush" the write buffer. Setting O_DIRECT flag on the file descriptor doesn't seem to have any effect. /ipv -- "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." Dennis Ritchie