From owner-freebsd-wireless@FreeBSD.ORG Fri Oct 24 00:47:56 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2E7E6DF for ; Fri, 24 Oct 2014 00:47:56 +0000 (UTC) Received: from sender1.zohomail.com (sender1.zohomail.com [74.201.84.156]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEF98AAF for ; Fri, 24 Oct 2014 00:47:56 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version; b=Mcps630mgNS1DI9lYARL+eHsLzjx8yGKihipARtvNXbQkeCPYLS456e0TJVV6Pf2bNhtm1T3yc+t xgcq+z8soHnCxJeY4GRfM/R6vKO0o0OP0dL4Tpvryd4KVdJTNBdT Received: from [192.168.11.5] (46.229.54.117 [46.229.54.117]) by mx.zohomail.com with SMTPS id 1414111674975696.4650645893962; Thu, 23 Oct 2014 17:47:54 -0700 (PDT) Subject: Re: pcap_inject() ruins my handmade packets From: clutton To: freebsd-wireless@freebsd.org In-Reply-To: References: <1414110110.1395.14.camel@eva02.mbsd> Content-Type: text/plain; charset="UTF-8" Date: Fri, 24 Oct 2014 03:47:51 +0300 Message-ID: <1414111671.1395.25.camel@eva02.mbsd> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-ZohoMail: Ss SS_10 UW UB UW UB SF_TD_EXT SGR3_1_23094_55 X-ZohoMail-Owner: <1414111671.1395.25.camel@eva02.mbsd>+zmo_0_ X-ZohoMail-Sender: 46.229.54.117 X-Zoho-Virus-Status: 2 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2014 00:47:56 -0000 On Thu, 2014-10-23 at 17:32 -0700, Adrian Chadd wrote: > Which version of FreeBSD are you using? > > I only recently fixed raw frame injection in monitor mode in > FreeBSD-11. How are you trying to do raw frame injection? > > > -adrian HEAD, but I didn't update it more then month. I'm not using monitor mode, just ordinary one when I'm connected to AP, and ahdemo. Seems raw write works with both types well, and pcap_inject() doesn't. The scenario is that: handle = pcap_open_live(dev, BUFSIZ, 1, 0, errbuf); // tried without promisk, didn't help pcap_set_datalink(handle, DLT_IEEE802_11_RADIO); // I've tried others datalinks, and also skipping setting this like Linux users do, changing datalink here changes the way how packet is corrupted BUILD_PACKET_STEP() pcap_inject(handle, packet, packet_len);