From owner-freebsd-wireless@FreeBSD.ORG Thu Oct 30 16:13:12 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 D498ACF1 for ; Thu, 30 Oct 2014 16:13:12 +0000 (UTC) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BB40E68 for ; Thu, 30 Oct 2014 16:13:12 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id a1so5999330wgh.6 for ; Thu, 30 Oct 2014 09:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=4dFO1cU35Cpcyl3962tWU2Xj0g9V4oCeI4oRNHemxHI=; b=lOZXb69fzEhK1WjZBI+jFsWpGQ5TNi3A07Z2YFNBL0toJnlSQDfCE4AO/XeCfx4Et/ xMJhLy02XY6jVQi1BsITGajFGzGY3b3i9Cqn08fxpXz+C3Ee2XaORtSWHnOUnoZgi9j8 I3h8RmR8PJL+xJwW2tloSwdxX0RpdXFkUKviE9xv05FE8dMFwgimCXRq4uTTShhrwMq2 6FyZMfoD+e7xwzRkFQn1QASx8si3eiksmTcx5VVhWGbEFHZLvzqutknQXU4PFS9XOT9J tGB3tL1TdnjbZ/2uxoQF6y+OdI/a00vePf4uuVu4cSIPJNVQ1Jc6/qyuZWSr1wL5yTCp mqWQ== MIME-Version: 1.0 X-Received: by 10.194.80.100 with SMTP id q4mr21707651wjx.15.1414685590704; Thu, 30 Oct 2014 09:13:10 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Thu, 30 Oct 2014 09:13:10 -0700 (PDT) In-Reply-To: <1414685517.8086.15.camel@eva02.mbsd> References: <1414110110.1395.14.camel@eva02.mbsd> <1414285536.12280.6.camel@eva02.mbsd> <1414685517.8086.15.camel@eva02.mbsd> Date: Thu, 30 Oct 2014 09:13:10 -0700 X-Google-Sender-Auth: XaSFQLBQca7-E6xtO5HRAjacmf4 Message-ID: Subject: Re: pcap_inject() ruins my handmade packets From: Adrian Chadd To: clutton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-wireless@freebsd.org" 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: Thu, 30 Oct 2014 16:13:13 -0000 Hah, what was your actual code that worked? And hm, there are some things in the radiotap header that the raw transmit path pays attention to. -adrian On 30 October 2014 09:11, clutton wrote: > On Sat, 2014-10-25 at 19:54 -0700, Adrian Chadd wrote: >> On 25 October 2014 18:05, clutton wrote: >> > 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 >> >> >> > >> > Any ideas? Why this doesn't work for me using pcap and works using >> > sockets? >> > https://www.kernel.org/doc/Documentation/networking/mac80211-injection= .txt >> > >> > As I understand monitor mode can be used for injections now, is it >> > right? >> > >> > As I remember some discussion here (a long time ago) said that the >> > monitor mode is for monitoring :) and people should use other modes fo= r >> > injections. But since new pcap API was introduced, we can see that the >> > monitor mode is not only for monitoring. >> >> It should be working. I haven't coded anything up recently to use >> monitor mode and inject, but I do know it now works. >> >> >> >> -adrian > > I finally made the =C2=ABreaver=C2=BB work, I even got banned by my AP. T= he > problem is the pcap library, not the source of the program. > > Before sending any patches I think I need familiarize myself with > libpcap more. Because it's pretty scary to patch program which has > comments like this: > > * Back in 2002, Donald Lee at Cray wanted a DLT_ for > * IP-over-FC: > [skip] > * 11 years later, Christian Svensson wanted to map > * various ARPHRD_ values to DLT_FC_2 and > * DLT_FC_2_WITH_FRAME_DELIMS for raw Fibre Channel > * frames: > > One more question: no radiotap headers currently can be injected. Right? > The underlie levels just ignore DLT_IEEE802_11_RADIO dlt. > > > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or= g"