summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authormonthadar <monthadar@FreeBSD.org>2012-05-01 16:15:34 +0000
committermonthadar <monthadar@FreeBSD.org>2012-05-01 16:15:34 +0000
commit4369a1aa49babd15eafa2ad5990a809f802e2814 (patch)
treefddea7ed2386ea4a5f433fb66ef9a735c720fff2 /sbin/ifconfig
parent973bb2517d3400b57af72d6e6a3c6b603751829a (diff)
downloadFreeBSD-src-4369a1aa49babd15eafa2ad5990a809f802e2814.zip
FreeBSD-src-4369a1aa49babd15eafa2ad5990a809f802e2814.tar.gz
* Added new command to ifconfig to activate Mesh Gate Announcement called
meshgate with corresponding explanation; Approved by: adrian
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.86
-rw-r--r--sbin/ifconfig/ifieee80211.c14
2 files changed, 20 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 0cd24b3..2b16dd1 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -1979,6 +1979,12 @@ Enable or disable forwarding packets by a mesh interface.
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
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index 3ecdf0e..599f508 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -1883,6 +1883,12 @@ DECL_CMD_FUNC(set80211meshforward, val, d)
}
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),
OpenPOWER on IntegriCloud