From owner-freebsd-wireless@FreeBSD.ORG Wed Oct 12 14:55:03 2011 Return-Path: Delivered-To: wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7383C1065678 for ; Wed, 12 Oct 2011 14:55:03 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 113F08FC16 for ; Wed, 12 Oct 2011 14:55:02 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id p9CEXRFW031760 for ; Wed, 12 Oct 2011 08:33:27 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id p9CEXRmB031757 for ; Wed, 12 Oct 2011 08:33:27 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 12 Oct 2011 08:33:27 -0600 (MDT) From: Warren Block To: wireless@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Wed, 12 Oct 2011 08:33:27 -0600 (MDT) Cc: Subject: Detecting a wireless interface X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 12 Oct 2011 14:55:03 -0000 sysctl dev.ath.0 has lots of things that are suggestive about an interface being wireless (txantenna), but nothing definitive. ifconfig ath0 | egrep 'media:.*Wireless' is inelegant. Is there a better way to detect that an interface is wireless or wired from a shell script?