From owner-freebsd-wireless@FreeBSD.ORG Sun Oct 26 01:05:48 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CCFF74B for ; Sun, 26 Oct 2014 01:05:48 +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 671EC1E8 for ; Sun, 26 Oct 2014 01:05:48 +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=Q9hrnH6PVb7Rrqa09IWcBYZZCUjn3Q0PiTfhSupeGWFiTE7BHfuqeRNWYe7MA942iAkWqgUI4RXH sprymvLm9ug9s92b1jZ6n6satexf5DVXRvMotQSwpuB7w6+Bbcbb Received: from [192.168.11.5] (46.229.54.117 [46.229.54.117]) by mx.zohomail.com with SMTPS id 1414285540227411.6076544807504; Sat, 25 Oct 2014 18:05:40 -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: Sun, 26 Oct 2014 03:05:36 +0200 Message-ID: <1414285536.12280.6.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 ZCF-710TPL UW UB SF_TD_EXT SGR3_1_23094_577 X-ZohoMail-Owner: <1414285536.12280.6.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: Sun, 26 Oct 2014 01:05:48 -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 > 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 for injections. But since new pcap API was introduced, we can see that the monitor mode is not only for monitoring. > On 23 October 2014 17:21, clutton wrote: > > Hi list. > > > > I'm porting a Linux application [reaver], and have a tough time figuring > > out what is wrong. > > > > The way how Linux users use it doesn't work I mean building packet like > > radiotap_header+frame+payload and use pcap_inject() for injections. > > > > Nevertheless, using the same packets with sockets work like a charm. > > Since I didn't find any working example with packet injections > > conjugates with pcap_inject for FreeBSD, I starting think it doesn't > > work on FreeBSD platform. > > > > Right now, I started using LD_PRELOAD with my own version of libpcap, > > because after end of day it uses write(), but why it is ruins my packets > > is not obvious for me yet. > > > > May be somebody could explain me? May be it's well known not fixable > > bug, and I'm just wasting my time. > > > > I really want to do this using libpcap! Using sockets is quicker > > approach for me, but you know, fixing libpcap will bring a lot of others > > apps to FreeBSD realm. > > > > > > _______________________________________________ > > freebsd-wireless@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"