usteer2: rename to rrmd

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-09-20 15:33:51 +02:00
parent 203f5ca2e6
commit 1c2e5c91d9
15 changed files with 23 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usteer2
PKG_NAME:=rrmd
PKG_RELEASE:=1
PKG_LICENSE:=ISC
@@ -8,11 +8,11 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
include $(INCLUDE_DIR)/package.mk
define Package/usteer2
define Package/rrmd
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+ucrun
TITLE:=wifi client steering
TITLE:=radio resource management
endef
define Build/Compile/Default
@@ -20,8 +20,8 @@ define Build/Compile/Default
endef
Build/Compile = $(Build/Compile/Default)
define Package/usteer2/install
define Package/rrmd/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,usteer2))
$(eval $(call BuildPackage,rrmd))

View File

@@ -7,7 +7,7 @@ USE_PROCD=1
start_service() {
procd_open_instance
procd_set_param command /usr/bin/usteer.uc
procd_set_param command /usr/bin/rrmd.uc
procd_set_param respawn 3600 5 0
procd_close_instance
}

View File

@@ -1,17 +1,17 @@
#!/usr/bin/ucrun
push(REQUIRE_SEARCH_PATH, '/usr/share/usteer/*.uc');
push(REQUIRE_SEARCH_PATH, '/usr/share/rrmd/*.uc');
global.nl80211 = require("nl80211");
global.fs = require('fs');
global.ulog = {
identity: 'usteer',
identity: 'rrm',
channels: [ 'stdio', 'syslog' ],
};
global.ubus = {
object: 'usteer2',
object: 'rrm',
connect: function() {
printf('connected to ubus\n');

View File

@@ -10,7 +10,7 @@ function result(error, event, text, data) {
}
const actions = {
// ubus call usteer2 command '{"action": "kick", "addr": "1c:57:dc:37:3c:b1", "reason": 5, "ban_time": 30 }'
// ubus call rrmd command '{"action": "kick", "addr": "1c:57:dc:37:3c:b1", "reason": 5, "ban_time": 30 }'
kick: function(msg) {
if (!global.station.kick(msg))
return result(1, msg.event, 'station ' + msg.addr + ' is unknown', { action: 'kick', addr: msg.addr });
@@ -18,9 +18,9 @@ const actions = {
return result(0, 0, 'station ' + msg.addr + ' was kicked', { action: 'kick', addr: msg.addr });
},
// ubus call usteer2 command '{"action": "beacon_request", "addr": "4e:7f:3e:2c:8a:68", "params": "channel": 1}'
// ubus call usteer2 command '{"action": "beacon_request", "addr": "4e:7f:3e:2c:8a:68", "params": "ssid": "Pluto" }'
// ubus call usteer2 get_beacon_request '{"addr": "4e:7f:3e:2c:8a:68"}'
// ubus call rrmd command '{"action": "beacon_request", "addr": "4e:7f:3e:2c:8a:68", "params": "channel": 1}'
// ubus call rrmd command '{"action": "beacon_request", "addr": "4e:7f:3e:2c:8a:68", "params": "ssid": "Pluto" }'
// ubus call rrmd get_beacon_request '{"addr": "4e:7f:3e:2c:8a:68"}'
beacon_request: function(msg) {
if (!global.station.beacon_request(msg))
return result(1, msg.event, 'station ' + msg.addr + ' is unknown', { action: 'beacon_request', addr: msg.addr });
@@ -28,7 +28,7 @@ const actions = {
return result(0, 0, 'station ' + msg.addr + ' beacon-request sent', { action: 'beacon_request', addr: msg.addr });
},
// ubus call usteer2 command '{"action": "channel_switch", "bssid": "34:eF:b6:aF:48:b1", "channel": 4 }'
// ubus call rrmd command '{"action": "channel_switch", "bssid": "34:eF:b6:aF:48:b1", "channel": 4 }'
channel_switch: function(msg) {
if (!global.local.switch_chan(msg))
return result(1, msg.event, 'BSS ' + msg.bssid + ' failed to trigger channel switch', { action: 'channel_switch', bssid: msg.bssid });
@@ -36,7 +36,7 @@ const actions = {
return result(0, msg.event, 'BSS ' + msg.bssid + ' triggered channel switch', { action: 'channel_switch', bssid: msg.bssid });
},
// ubus call usteer2 command '{"action": "tx_power", "bssid": "34:eF:b6:aF:48:b1", "level": 20}'
// ubus call rrmd command '{"action": "tx_power", "bssid": "34:eF:b6:aF:48:b1", "level": 20}'
tx_power: function(msg) {
if (!global.phy.txpower(msg))
return result(1, msg.event, 'BSS ' + msg.bssid + ' failed to set TX power', { action: 'tx_power', bssid: msg.bssid });
@@ -45,7 +45,7 @@ const actions = {
return result(0, msg.event, 'BSS ' + msg.bssid + ' changed TX power', { action: 'tx_power', bssid: msg.bssid, level });
},
// ubus call usteer2 command '{"action": "bss_transition", "addr": "4e:7f:3e:2c:8a:68", "neighbors": ["34:ef:b6:af:48:b1"] }'
// ubus call rrmd command '{"action": "bss_transition", "addr": "4e:7f:3e:2c:8a:68", "neighbors": ["34:ef:b6:af:48:b1"] }'
bss_transition: function(msg) {
if (!global.station.bss_transition(msg))
return result(1, msg.event, 'BSS transition ' + msg.addr + ' failed to trigger', { action: 'bss_transition', addr: msg.addr });
@@ -53,7 +53,7 @@ const actions = {
return result(0, 0, 'BSS transition ' + msg.addr + ' triggered');
},
// ubus call usteer2 command '{"action": "neighbors", "neighbors": [ [ "00:11:22:33:44:55", "OpenWifi", "34efb6af48b1af4900005301070603010300" ], [ "aa:bb:cc:dd:ee:ff", "OpenWifi2", "34efb6af48b1af4900005301070603010300" ] ] }'
// ubus call rrmd command '{"action": "neighbors", "neighbors": [ [ "00:11:22:33:44:55", "OpenWifi", "34efb6af48b1af4900005301070603010300" ], [ "aa:bb:cc:dd:ee:ff", "OpenWifi2", "34efb6af48b1af4900005301070603010300" ] ] }'
neighbors: function(msg) {
if (!global.neighbor.remote(msg))
return result(1, msg.event, 'Failed to set neighbors', { action: 'neighbors' });

View File

@@ -3,7 +3,7 @@ return {
station_expiry: 120,
init: function() {
let options = uci.get_all('usteer2', '@base[-1]');
let options = uci.get_all('rrmd', '@base[-1]');
for (let key in options)
this[key] = options[key];
},

View File

@@ -91,7 +91,7 @@ function hapd_subunsub(path, sub) {
if (!status)
return;
let cfg = uci.get_all('usteer2', status.uci_section);
let cfg = uci.get_all('rrmd', status.uci_section);
if (!cfg)
cfg = {};

View File

@@ -1,7 +1,7 @@
let policies = {};
return {
init: function() {
let config = global.uci.get_all('usteer2');
let config = global.uci.get_all('rrmd');
for (let section in config) {
if (config[section]['.type'] != 'policy' || !config[section].name)
continue;

View File

@@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git
PKG_MIRROR_HASH:=246a66992df8137726f38b4cdcf463fb78ab90191b9b110b7889cd72ecef8e58
PKG_MIRROR_HASH:=4e8353d5e5be5adf607ef7fe1087786e0a56d90f5695ecec89620844306e751b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-05-29
PKG_SOURCE_VERSION:=1fe5413ec595e697930b1e31d826bf6844b5ac74
PKG_SOURCE_VERSION:=214f74425fa65409adde65f9043d5924e0ca935c
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -46,7 +46,7 @@ packages:
- ucentral-tools
- udhcprelay
- ugps
- usteer2
- rrmd
- ucrun
- ucode
- unetd