From: Johannes Berg Date: Tue, 16 Sep 2008 18:45:34 +0000 (+0200) Subject: add command to set mesh ID X-Git-Tag: v0.9~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82d028d00de39f43d51f8069951639ddc0c90042;p=thirdparty%2Fiw.git add command to set mesh ID --- diff --git a/interface.c b/interface.c index 58734c9..2137665 100644 --- a/interface.c +++ b/interface.c @@ -201,3 +201,23 @@ static int handle_interface_set(struct nl_cb *cb, } COMMAND(set, monitor, " [...]", NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_set); + +static int handle_interface_meshid(struct nl_cb *cb, + struct nl_msg *msg, + int argc, char **argv) +{ + char *mesh_id = NULL; + + if (argc != 1) + return 1; + + mesh_id = argv[0]; + + NLA_PUT(msg, NL80211_ATTR_MESH_ID, strlen(mesh_id), mesh_id); + + return 0; + nla_put_failure: + return -ENOBUFS; +} +COMMAND(set, meshid, "", + NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_meshid);