From owner-svn-src-all@freebsd.org Fri Mar 18 04:22:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29EA7AD4951; Fri, 18 Mar 2016 04:22:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D09C01233; Fri, 18 Mar 2016 04:22:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2I4M7qo094541; Fri, 18 Mar 2016 04:22:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2I4M7NZ094540; Fri, 18 Mar 2016 04:22:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201603180422.u2I4M7NZ094540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Mar 2016 04:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297010 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 04:22:09 -0000 Author: adrian Date: Fri Mar 18 04:22:07 2016 New Revision: 297010 URL: https://svnweb.freebsd.org/changeset/base/297010 Log: Add parsing for AP channel report IE. Eg: TP-LINK_D579 60:e3:27:e1:d5:79 10 54M -72:-95 100 EP SSID RATES DSPARMS<10> XRATES<12,24,48,96> COUNTRY APCHANREP APCHANREP TIM<050400010000> ERP<0x4> HTCAP HTINFO ???<4a0e14000a002c01c800140005001900> RSN WME BSSLOAD VEN Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Fri Mar 18 04:09:27 2016 (r297009) +++ head/sbin/ifconfig/ifieee80211.c Fri Mar 18 04:22:07 2016 (r297010) @@ -2727,6 +2727,26 @@ printbssload(const char *tag, const uint } } +static void +printapchanrep(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen) +{ + printf("%s", tag); + if (verbose) { + const struct ieee80211_ap_chan_report_ie *ap = + (const struct ieee80211_ap_chan_report_ie *) ie; + const char *sep = ""; + int i; + + printf("i_class); + + for (i = 3; i < ielen; i++) { + printf("%s%u", sep, ie[i]); + sep = ","; + } + printf("]>"); + } +} + static const char * wpa_cipher(const u_int8_t *sel) { @@ -3129,11 +3149,8 @@ iename(int elemid) case IEEE80211_ELEMID_MEASREP: return " MEASREP"; case IEEE80211_ELEMID_QUIET: return " QUIET"; case IEEE80211_ELEMID_IBSSDFS: return " IBSSDFS"; - case IEEE80211_ELEMID_APCHANREP:return " APCHANREP"; case IEEE80211_ELEMID_TPC: return " TPC"; case IEEE80211_ELEMID_CCKM: return " CCKM"; - case IEEE80211_ELEMID_VHT_CAP: return " VHTCAP"; - case IEEE80211_ELEMID_VHT_OPMODE: return " VHTOPMODE"; case IEEE80211_ELEMID_VHT_PWR_ENV: return " VHTPWRENV"; } return " ???"; @@ -3208,6 +3225,9 @@ printies(const u_int8_t *vp, int ielen, case IEEE80211_ELEMID_BSSLOAD: printbssload(" BSSLOAD", vp, 2+vp[1], maxcols); break; + case IEEE80211_ELEMID_APCHANREP: + printapchanrep(" APCHANREP", vp, 2+vp[1], maxcols); + break; default: if (verbose) printie(iename(vp[0]), vp, 2+vp[1], maxcols);