diff --git a/config/netremote-server-config-schema.json b/config/netremote-server-config-schema.json new file mode 100644 index 00000000..8102f793 --- /dev/null +++ b/config/netremote-server-config-schema.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/microsoft/netremote/tree/develop/config/netremote-server-config-schema.json", + "$title": "NetRemote Server", + "description": "NetRemote Server Configuration Schema", + "type": "object", + "additionalProperties": false, + "properties": { + "$schema": { + "type": "string", + "description": "The schema version" + }, + "WifiAccessPointAttributes": { + "type": "object", + "description": "Wifi Access Point Attributes", + "additionalProperties": false, + "properties": { + "Properties": { + "type": "object", + "description": "Unstructured (string) Wifi Access Point Properties", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "Additional properties" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/common/net/wifi/apmanager/AccessPointManager.cxx b/src/common/net/wifi/apmanager/AccessPointManager.cxx index ccfd8768..45e3a1a9 100644 --- a/src/common/net/wifi/apmanager/AccessPointManager.cxx +++ b/src/common/net/wifi/apmanager/AccessPointManager.cxx @@ -126,6 +126,7 @@ AccessPointManager::GetAllAccessPoints() const std::optional AccessPointManager::GetAccessPointAttributes(const std::string& interfaceName) const { + // Note: no locks are used here because m_accessPointAttributes cannot be modified after construction. auto accessPointAttributesIterator = m_accessPointAttributes.find(interfaceName); if (accessPointAttributesIterator == std::cend(m_accessPointAttributes)) { return std::nullopt; diff --git a/src/common/server/config/netremote-server-config-example.json b/src/common/server/config/netremote-server-config-example.json new file mode 100644 index 00000000..ed8d5499 --- /dev/null +++ b/src/common/server/config/netremote-server-config-example.json @@ -0,0 +1,16 @@ +{ + "$schema": "../../../../config/netremote-server-config-schema.json", + "WifiAccessPointAttributes": { + "Properties": { + "wlan0": { + "MacAddress": "00:11:22:33:44:55", + "RfAttenuatorChannelsAttached": "1,3" + }, + "wlp0s3": { + "MacAddress": "AA:BB:CC:DD:EE:FF", + "RfAttenuatorChannelsAttached": "2,4,6", + "Another": "String value" + } + } + } +} \ No newline at end of file