commit | ec93c24007ca35bddfefd151ea46e0fe6983ddf6 | [log] [tgz] |
---|---|---|
author | Abtin Keshavarzian <abtink@google.com> | Tue Jul 11 13:21:34 2023 -0700 |
committer | GitHub <noreply@github.com> | Tue Jul 11 13:21:34 2023 -0700 |
tree | 1e74afdf5e1ea8e0accb153b4eecc37f3d6c883a | |
parent | edb7f05047c8367f6f70a56a889dad167f2bc4da [diff] |
[srp-server] simplify sub-type services (#9208) This commit updates and simplifies how `Srp::Server` stores the sub-type services. The earlier implementation treated each sub-type as its own service, which was tracked by a `Service` object. This design allowed sub-type services to be registered and deleted individually. However, the latest SRP RFC draft requires SRP servers to treat updates to a service and all its sub-types as atomic. This means that when a service and its sub-types are being updated, the SRP Update message must contain the entirety of information about that service and its sub-types. As a result of this change, we can simplify the server implementation by tracking sub-types as an array of sub-type names in the `Service` object. This commit also updates the way the server commits a received SRP update info into its existing data. Previously, the server would try to merge the new information into existing `Host` and `Service` objects. However, this could be inefficient, as it would require moving heap-allocated items like "txt data" and/or array of host IPv6 addresses from one object to another. The new `CommitSrpUpdate()` implementation now starts from the new `Host` object that is constructed as the received SRP Update message from the client is parsed. Any previously registered services that are not present in the new `Host` object are then moved into it. This commit adds new public OT APIs for retrieving the sub-types associated with a service and making it easier to iterate over the list of registered services by a host. Due to fundamental changes in how services are stored by the `Srp::Server` class, some existing public `otSrpServer` APIs for filtering and iterating over services are being removed.
OpenThread released by Google is...
...an open-source implementation of the Thread networking protocol. Google Nest has released OpenThread to make the technology used in Nest products more broadly available to developers to accelerate the development of products for the connected home.
...OS and platform agnostic, with a narrow platform abstraction layer and a small memory footprint, making it highly portable. It supports both system-on-chip (SoC) and network co-processor (NCP) designs.
...a Thread Certified Component, implementing all features defined in the Thread 1.3.0 specification, including all Thread networking layers (IPv6, 6LoWPAN, IEEE 802.15.4 with MAC security, Mesh Link Establishment, Mesh Routing) and device roles, as well as Border Router support.
More information about Thread can be found at threadgroup.org. Thread is a registered trademark of the Thread Group, Inc.
All end-user documentation and guides are located at openthread.io. If you're looking to do things like...
...then openthread.io is the place for you.
Note: For users in China, end-user documentation is available at openthread.google.cn.
If you're interested in contributing to OpenThread, read on.
We would love for you to contribute to OpenThread and help make it even better than it is today! See our Contributing Guidelines for more information.
Contributors are required to abide by our Code of Conduct and Coding Conventions and Style Guide.
OpenThread is released under the BSD 3-Clause license. See the LICENSE
file for more information.
Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group.
OpenThread support is available on GitHub: