From owner-freebsd-wireless@FreeBSD.ORG Fri Oct 24 00:22:02 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 104DC430 for ; Fri, 24 Oct 2014 00:22:02 +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 EFA588D8 for ; Fri, 24 Oct 2014 00:22:01 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:from:to:content-type:date:message-id:mime-version; b=LFEowDEaX8GVAoDe9j0yW58G3bdssh1jcJmxCD+MChsg0HJE1hDXTDXmPtijvsSlYC9i84sVC8IS 7EMf1DyKZCJMV7NNu8GFVIIuEs+lomfUiFGrh2gC9VUbwixyY3bf Received: from [192.168.11.5] (46.229.54.117 [46.229.54.117]) by mx.zohomail.com with SMTPS id 1414110113895353.4502186945218; Thu, 23 Oct 2014 17:21:53 -0700 (PDT) Subject: pcap_inject() ruins my handmade packets From: clutton To: freebsd-wireless@FreeBSD.org Content-Type: text/plain; charset="UTF-8" Date: Fri, 24 Oct 2014 03:21:50 +0300 Message-ID: <1414110110.1395.14.camel@eva02.mbsd> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit 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:22:02 -0000 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.