From owner-freebsd-net@FreeBSD.ORG Sun Feb 20 23:18:29 2011 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 510171065670 for ; Sun, 20 Feb 2011 23:18:29 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id D93538FC17 for ; Sun, 20 Feb 2011 23:18:28 +0000 (UTC) Received: by fxm19 with SMTP id 19so2041439fxm.13 for ; Sun, 20 Feb 2011 15:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=YAkF7JCmW73RuLJQwraaL8/uBmVCFMDPcr+Pc7Uypkc=; b=UFmgRGfTNFrE2wkq1rCRAILne/juxS52DdVO0ImlIQBbm2kweCGByAZGkxkdb2A6Rp KZ2r+37R8vsM/Ig/qkrFXhKMFU3oN9glj/KChEL6S9srGCuA87NR7PA9ugTV4edTW8DH r0D+RPwNnl3YrrzSZdqDGtSwB4K0xojM1dcV4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=RvprfHJ/vIbmgPt8ldZ6gKC+1+rCtPh6q28siJzi+yyYBSLOfjVCIWbFqFmrCTOTh3 GmavthCMmyW9a79QR9or/3k90dajGqX83bbr1KPmhTjHia7YvKd77qBuAhRyZZS+sM52 KSbeYdywELqNjcVNaYdG/QupJzc3KVx5WDhvc= MIME-Version: 1.0 Received: by 10.223.104.147 with SMTP id p19mr1002417fao.6.1298242591110; Sun, 20 Feb 2011 14:56:31 -0800 (PST) Received: by 10.223.67.133 with HTTP; Sun, 20 Feb 2011 14:56:31 -0800 (PST) Date: Sun, 20 Feb 2011 17:56:31 -0500 Message-ID: From: Adam Stylinski To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Radiotap, BPF, and related system calls 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: Sun, 20 Feb 2011 23:18:29 -0000 Hello, I'm somewhat of a novice C programmer endeavoring in a project to write my own protocol which will sit on top of the 1480 byte 802.3 frames (which are on top of 802.11 frames) to accomplish remote file transmission. The communication will be one way, but one roadblock I'm running into is discovering the exact system calls I have to make to send raw frames. I want to work on the higher level API as opposed to the kernel level (for one I'd like the 802.11 layer to auto fragment the 802.3 frames for me). The exact protocol will require two cards in monitor mode so that raw injection and blind reception can occur. Control signals will be transmitted over a TCP socket via the internet. I've found documentation that points to the system independent radiotap specification, and from there I've seen documentation which talks about initializing the ioctl through a BPF clone to be utilized by userland applications. I'm sure that wireshark and other wireless utilities use this, but there is a boat load of code I've been looking through to find the precise call which opens up the device ioctl, initiates the the tap, and gives me simple functions to construct and transmit my simple frames. I've found in the headers many references to the structs themselves, but I'm not sure where to start to initiate communication through the device. Any 802.11 experts on this list that could perhaps give me some specific instruction or point me to a man page / example code which does this? Thanks in advance for whatever you can offer me.