svn commit: r193849 - projects/mesh11s/sbin/ifconfig
Rui Paulo
rpaulo at FreeBSD.org
Tue Jun 9 19:47:37 UTC 2009
Author: rpaulo
Date: Tue Jun 9 19:47:37 2009
New Revision: 193849
URL: http://svn.freebsd.org/changeset/base/193849
Log:
Add meshpeering and meshforward commands to enable disable respective
mesh bits.
Rename list routes to list hwmp.
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sbin/ifconfig/ifieee80211.c
Modified: projects/mesh11s/sbin/ifconfig/ifieee80211.c
==============================================================================
--- projects/mesh11s/sbin/ifconfig/ifieee80211.c Tue Jun 9 19:19:16 2009 (r193848)
+++ projects/mesh11s/sbin/ifconfig/ifieee80211.c Tue Jun 9 19:47:37 2009 (r193849)
@@ -1783,6 +1783,18 @@ DECL_CMD_FUNC(set80211tdmabintval, val,
set80211(s, IEEE80211_IOC_TDMA_BINTERVAL, atoi(val), 0, NULL);
}
+static
+DECL_CMD_FUNC(set80211meshforward, val, d)
+{
+ set80211(s, IEEE80211_IOC_MESH_FWRD, atoi(val), 0, NULL);
+}
+
+static
+DECL_CMD_FUNC(set80211meshpeering, val, d)
+{
+ set80211(s, IEEE80211_IOC_MESH_AP, atoi(val), 0, NULL);
+}
+
static int
regdomain_sort(const void *a, const void *b)
{
@@ -3880,7 +3892,7 @@ list_regdomain(int s, int channelsalso)
}
static void
-list_routes(int s)
+list_hwmp(int s)
{
int i;
struct ieee80211req ireq;
@@ -3950,8 +3962,8 @@ DECL_CMD_FUNC(set80211list, arg, d)
list_countries();
else if (iseq(arg, "mesh"))
list_mesh(s);
- else if (iseq(arg, "routes"))
- list_routes(s);
+ else if (iseq(arg, "hwmp"))
+ list_hwmp(s);
else
errx(1, "Don't know how to list %s for %s", arg, name);
LINE_BREAK();
@@ -4717,6 +4729,22 @@ end:
LINE_BREAK();
list_wme(s);
}
+
+ if (opmode == IEEE80211_M_MBSS) {
+ if (get80211val(s, IEEE80211_IOC_MESH_AP, &val) != -1) {
+ if (val)
+ LINE_CHECK("meshpeering");
+ else
+ LINE_CHECK("-meshpeering");
+ }
+ if (get80211val(s, IEEE80211_IOC_MESH_FWRD, &val) != -1) {
+ if (val)
+ LINE_CHECK("meshforward");
+ else
+ LINE_CHECK("-meshforward");
+ }
+ }
+
LINE_BREAK();
}
@@ -5113,6 +5141,9 @@ static struct cmd ieee80211_cmds[] = {
DEF_CMD_ARG("tdmaslotlen", set80211tdmaslotlen),
DEF_CMD_ARG("tdmabintval", set80211tdmabintval),
+ DEF_CMD_ARG("meshforward", set80211meshforward),
+ DEF_CMD_ARG("meshpeering", set80211meshpeering),
+
/* vap cloning support */
DEF_CLONE_CMD_ARG("wlanaddr", set80211clone_wlanaddr),
DEF_CLONE_CMD_ARG("wlanbssid", set80211clone_wlanbssid),
More information about the svn-src-projects
mailing list