From owner-svn-src-all@FreeBSD.ORG Tue May 1 16:15:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1D87106581A; Tue, 1 May 2012 16:15:35 +0000 (UTC) (envelope-from monthadar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9292C8FC16; Tue, 1 May 2012 16:15:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q41GFZJv034281; Tue, 1 May 2012 16:15:35 GMT (envelope-from monthadar@svn.freebsd.org) Received: (from monthadar@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q41GFZa1034278; Tue, 1 May 2012 16:15:35 GMT (envelope-from monthadar@svn.freebsd.org) Message-Id: <201205011615.q41GFZa1034278@svn.freebsd.org> From: Monthadar Al Jaberi Date: Tue, 1 May 2012 16:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234893 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 01 May 2012 16:15:35 -0000 Author: monthadar Date: Tue May 1 16:15:34 2012 New Revision: 234893 URL: http://svn.freebsd.org/changeset/base/234893 Log: * Added new command to ifconfig to activate Mesh Gate Announcement called meshgate with corresponding explanation; Approved by: adrian Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue May 1 16:14:18 2012 (r234892) +++ head/sbin/ifconfig/ifconfig.8 Tue May 1 16:15:34 2012 (r234893) @@ -1979,6 +1979,12 @@ Enable or disable forwarding packets by By default .Cm meshforward is enabled. +.It Cm meshgate +This attribute specifies whether or not the mesh STA activates mesh gate +announcements. +By default +.Cm meshgate +is disabled. .It Cm meshmetric Ar protocol Set the specified .Ar protocol Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Tue May 1 16:14:18 2012 (r234892) +++ head/sbin/ifconfig/ifieee80211.c Tue May 1 16:15:34 2012 (r234893) @@ -1883,6 +1883,12 @@ DECL_CMD_FUNC(set80211meshforward, val, } static +DECL_CMD_FUNC(set80211meshgate, val, d) +{ + set80211(s, IEEE80211_IOC_MESH_GATE, d, 0, NULL); +} + +static DECL_CMD_FUNC(set80211meshpeering, val, d) { set80211(s, IEEE80211_IOC_MESH_AP, d, 0, NULL); @@ -4832,6 +4838,12 @@ end: else LINE_CHECK("-meshforward"); } + if (get80211val(s, IEEE80211_IOC_MESH_GATE, &val) != -1) { + if (val) + LINE_CHECK("meshgate"); + else + LINE_CHECK("-meshgate"); + } if (get80211len(s, IEEE80211_IOC_MESH_PR_METRIC, data, 12, &len) != -1) { data[len] = '\0'; @@ -5271,6 +5283,8 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD_ARG("meshttl", set80211meshttl), DEF_CMD("meshforward", 1, set80211meshforward), DEF_CMD("-meshforward", 0, set80211meshforward), + DEF_CMD("meshgate", 1, set80211meshgate), + DEF_CMD("-meshgate", 0, set80211meshgate), DEF_CMD("meshpeering", 1, set80211meshpeering), DEF_CMD("-meshpeering", 0, set80211meshpeering), DEF_CMD_ARG("meshmetric", set80211meshmetric),