Date: Tue, 1 May 2012 16:15:35 +0000 (UTC) From: Monthadar Al Jaberi <monthadar@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r234893 - head/sbin/ifconfig Message-ID: <201205011615.q41GFZa1034278@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205011615.q41GFZa1034278>