diff --git a/include/openthread/coap_secure.h b/include/openthread/coap_secure.h index 6ee6c6a98..6c656f446 100644 --- a/include/openthread/coap_secure.h +++ b/include/openthread/coap_secure.h @@ -247,7 +247,7 @@ bool otCoapSecureIsConncetionActive(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. - * @retvak OT_ERROR_INVALID_STATE DTLS connection was not initialized. + * @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized. * */ otError otCoapSecureSendRequest(otInstance * aInstance, diff --git a/include/openthread/message.h b/include/openthread/message.h index 33731261c..879eb3612 100644 --- a/include/openthread/message.h +++ b/include/openthread/message.h @@ -89,7 +89,7 @@ typedef struct otBufferInfo } otBufferInfo; /** - * This enumeration defines the Openthread message priority levels. + * This enumeration defines the OpenThread message priority levels. * */ typedef enum otMessagePriority diff --git a/include/openthread/network_time.h b/include/openthread/network_time.h index 4ef3adef5..44242fafb 100644 --- a/include/openthread/network_time.h +++ b/include/openthread/network_time.h @@ -53,7 +53,7 @@ extern "C" { */ /** - * This enum represents OpenThread time synchronization status. + * This enumeration represents OpenThread time synchronization status. * */ typedef enum otNetworkTimeStatus diff --git a/include/openthread/udp.h b/include/openthread/udp.h index ada854c87..0c81088fb 100644 --- a/include/openthread/udp.h +++ b/include/openthread/udp.h @@ -237,7 +237,7 @@ typedef void (*otUdpForwarder)(otMessage * aMessage, void * aContext); /** - * Set UDP forward callback to deliever UDP packets to host. + * Set UDP forward callback to deliver UDP packets to host. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aForwarder A pointer to a function called to forward UDP packet to host. diff --git a/src/core/coap/coap_secure.hpp b/src/core/coap/coap_secure.hpp index 19e9b2556..454796bc0 100644 --- a/src/core/coap/coap_secure.hpp +++ b/src/core/coap/coap_secure.hpp @@ -109,7 +109,7 @@ public: /** * This method initializes DTLS session with a peer. * - * @param[in] aSockAddr A reference to the remote sockaddr. + * @param[in] aSockAddr A reference to the remote socket address, * @param[in] aCallback A pointer to a function that will be called once DTLS connection is * established. * @@ -168,7 +168,7 @@ public: #ifdef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED /** - * This method sets the Pre Shared Key (PSK) for DTLS sessions + * This method sets the Pre-Shared Key (PSK) for DTLS sessions * identified by a PSK. * DTLS mode "TLS with AES 128 CCM 8" for Application CoAPS. * @@ -272,7 +272,7 @@ public: * * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. - * @retvak OT_ERROR_INVALID_STATE DTLS connection was not initialized. + * @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized. * */ otError SendMessage(Message &aMessage, otCoapResponseHandler aHandler = NULL, void *aContext = NULL); @@ -291,7 +291,7 @@ public: * * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. - * @retvak OT_ERROR_INVALID_STATE DTLS connection was not initialized. + * @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized. * */ otError SendMessage(Message & aMessage, diff --git a/src/core/mac/sub_mac.hpp b/src/core/mac/sub_mac.hpp index eccd0d045..bddeb7899 100644 --- a/src/core/mac/sub_mac.hpp +++ b/src/core/mac/sub_mac.hpp @@ -153,7 +153,7 @@ public: void TransmitDone(Frame &aFrame, Frame *aAckFrame, otError aError); /** - * This method notifies user of `SubMac` that energy sfcan is complete. + * This method notifies user of `SubMac` that energy scan is complete. * * @param[in] aMaxRssi Maximum RSSI seen on the channel, or `SubMac::kInvalidRssiValue` if failed. * diff --git a/src/core/net/dhcp6_server.cpp b/src/core/net/dhcp6_server.cpp index 9a8489e3a..3981948fd 100644 --- a/src/core/net/dhcp6_server.cpp +++ b/src/core/net/dhcp6_server.cpp @@ -142,7 +142,7 @@ otError Dhcp6Server::UpdateService(void) } } - // alreay added + // already added if (found) { continue; diff --git a/src/core/net/dns_headers.hpp b/src/core/net/dns_headers.hpp index 4fea324bf..36154aade 100644 --- a/src/core/net/dns_headers.hpp +++ b/src/core/net/dns_headers.hpp @@ -489,7 +489,7 @@ public: otIp6Address &GetAddress(void) { return mAddress; } private: - otIp6Address mAddress; ///< Ipv6 Address of AAAA Resource Record. + otIp6Address mAddress; ///< IPv6 Address of AAAA Resource Record. } OT_TOOL_PACKED_END; diff --git a/src/core/net/ip6_headers.hpp b/src/core/net/ip6_headers.hpp index 3e923d603..34b37afb7 100644 --- a/src/core/net/ip6_headers.hpp +++ b/src/core/net/ip6_headers.hpp @@ -514,8 +514,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Pad1 Option generation and parsing. Pad1 does not - * followdefault option header structure. + * This class implements IPv6 Pad1 Option generation and parsing. Pad1 does not follow default option header structure. * */ OT_TOOL_PACKED_BEGIN diff --git a/src/core/net/ip6_mpl.hpp b/src/core/net/ip6_mpl.hpp index 42ab1df98..e578436b0 100644 --- a/src/core/net/ip6_mpl.hpp +++ b/src/core/net/ip6_mpl.hpp @@ -287,7 +287,7 @@ public: }; /** - * This method removes MPL Buffered Messsage metadata from the message. + * This method removes MPL Buffered Message metadata from the message. * * @param[in] aMessage A reference to the message. * @@ -297,7 +297,7 @@ public: otError RemoveFrom(Message &aMessage) { return aMessage.SetLength(aMessage.GetLength() - sizeof(*this)); }; /** - * This method updates MPL Buffered Messsage metadata in the message. + * This method updates MPL Buffered Message metadata in the message. * * @param[in] aMessage A reference to the message. * diff --git a/src/core/net/sntp_client.hpp b/src/core/net/sntp_client.hpp index 00395e3f5..6af1ed909 100644 --- a/src/core/net/sntp_client.hpp +++ b/src/core/net/sntp_client.hpp @@ -513,7 +513,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Sntp client. + * This class implements SNTP client. * */ class Client diff --git a/src/core/net/socket.hpp b/src/core/net/socket.hpp index 725174f31..974855366 100644 --- a/src/core/net/socket.hpp +++ b/src/core/net/socket.hpp @@ -168,7 +168,7 @@ public: /** * This method returns a pointer to the Link Info. * - * @returns A poitner to the Link Info. + * @returns A pointer to the Link Info. * */ const void *GetLinkInfo(void) const { return mLinkInfo; } diff --git a/src/core/thread/mesh_forwarder.hpp b/src/core/thread/mesh_forwarder.hpp index 091da3438..a58ac2e5f 100644 --- a/src/core/thread/mesh_forwarder.hpp +++ b/src/core/thread/mesh_forwarder.hpp @@ -65,7 +65,7 @@ enum */ /** - * This class reprents an IPv6 fragment priority entry + * This class represents an IPv6 fragment priority entry * */ class FragmentPriorityEntry @@ -112,7 +112,7 @@ public: uint8_t GetPriority(void) const { return mPriority; } /** - * This method sets the fragment priotity value. + * This method sets the fragment priority value. * * @param[in] aPriority The fragment priority value. * diff --git a/src/core/thread/mesh_forwarder_ftd.cpp b/src/core/thread/mesh_forwarder_ftd.cpp index 918da51bb..e2bba2e33 100644 --- a/src/core/thread/mesh_forwarder_ftd.cpp +++ b/src/core/thread/mesh_forwarder_ftd.cpp @@ -1157,7 +1157,7 @@ otError MeshForwarder::GetForwardFramePriority(const uint8_t * aFrame, } } - // Get priority from Ipv6 header or UDP destination port directly + // Get priority from IPv6 header or UDP destination port directly error = GetFramePriority(aFrame, aFrameLength, aMacSource, aMacDest, aPriority); exit: diff --git a/src/core/thread/mle.hpp b/src/core/thread/mle.hpp index c99fa8b32..ef9e3de01 100644 --- a/src/core/thread/mle.hpp +++ b/src/core/thread/mle.hpp @@ -1724,7 +1724,7 @@ private: otError GetAlocAddress(Ip6::Address &aAddress, uint16_t aAloc16) const; #if OPENTHREAD_ENABLE_SERVICE /** - * This method scans for network data from the leader and updates ip addresses assigned to this + * This method scans for network data from the leader and updates IP addresses assigned to this * interface to make sure that all Service ALOCs (0xfc10-0xfc1f) are properly set. */ void UpdateServiceAlocs(void); diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 3ace125c7..023f5aff3 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -266,7 +266,7 @@ otError MleRouter::HandleChildStart(AttachMode aMode) break; case kAttachAny: - // if attach was started due to receiving MLE Annouce Messageas, all rx-on-when-idle devices would + // If attach was started due to receiving MLE Announce Messages, all rx-on-when-idle devices would // start attach immediately when receiving such Announce message as in Thread 1.1 specification, // Section 4.8.1, // "If the received value is newer and the channel and/or PAN ID in the Announce message differ @@ -1495,7 +1495,7 @@ void MleRouter::UpdateRoutes(const RouteTlv &aRoute, uint8_t aRouterId) if (nextHop == NULL || nextHop == neighbor) { - // route has no nexthop or nexthop is neighbor (sender) + // route has no next hop or next hop is neighbor (sender) if (router != neighbor) { @@ -3188,7 +3188,7 @@ otError MleRouter::RemoveNeighbor(Neighbor &aNeighbor) if (aNeighbor.GetDeviceMode() & ModeTlv::kModeFullThreadDevice) { - // Clear all EID-to-RLOC entries assossiated with the child. + // Clear all EID-to-RLOC entries associated with the child. netif.GetAddressResolver().Remove(aNeighbor.GetRloc16()); } diff --git a/src/core/thread/mle_tlvs.hpp b/src/core/thread/mle_tlvs.hpp index 228b50abf..4f61c40a5 100644 --- a/src/core/thread/mle_tlvs.hpp +++ b/src/core/thread/mle_tlvs.hpp @@ -856,7 +856,7 @@ private: }; uint8_t mRouterIdSequence; uint8_t mRouterIdMask[BitVectorBytes(kMaxRouterId + 1)]; - // Since we do hold 12 (compressable to 11) bits of data per router, each entry occupies 1.5 bytes, consecutively. + // Since we do hold 12 (compressible to 11) bits of data per router, each entry occupies 1.5 bytes, consecutively. // First 4 bits are link qualities, remaining 8 bits are route cost. uint8_t mRouteData[kMaxRouterId + 1 + kMaxRouterId / 2 + 1]; } OT_TOOL_PACKED_END; diff --git a/src/core/thread/router_table.cpp b/src/core/thread/router_table.cpp index 1f4cc42a9..61755fcfd 100644 --- a/src/core/thread/router_table.cpp +++ b/src/core/thread/router_table.cpp @@ -330,7 +330,7 @@ void RouterTable::RemoveNeighbor(Router &aRouter) { netif.GetMle().ResetAdvertiseInterval(); - // Clear all EID-to-RLOC entries assossiated with the router. + // Clear all EID-to-RLOC entries associated with the router. netif.GetAddressResolver().Remove(aRouter.GetRouterId()); } } diff --git a/src/core/thread/router_table.hpp b/src/core/thread/router_table.hpp index b4e610492..d1aa74f39 100644 --- a/src/core/thread/router_table.hpp +++ b/src/core/thread/router_table.hpp @@ -233,7 +233,7 @@ public: /** * This method returns the router for a given router id. * - * @parma[in] aRouterId The router id. + * @param[in] aRouterId The router id. * * @returns A pointer to the router or NULL if the router could not be found. * @@ -243,7 +243,7 @@ public: /** * This method returns the router for a given router id. * - * @parma[in] aRouterId The router id. + * @param[in] aRouterId The router id. * * @returns A pointer to the router or NULL if the router could not be found. * diff --git a/src/core/thread/time_sync_service.hpp b/src/core/thread/time_sync_service.hpp index f6b6da912..d202c0fc1 100644 --- a/src/core/thread/time_sync_service.hpp +++ b/src/core/thread/time_sync_service.hpp @@ -142,7 +142,7 @@ public: * Set the time sync callback to be notified of a network time update. * * @param[in] aCallback The callback to be called when time sync is handled. - * @param[im] aCallbackContext The context to be passed to callback. + * @param[in] aCallbackContext The context to be passed to callback. * */ void SetTimeSyncCallback(otNetworkTimeSyncCallbackFn aCallback, void *aCallbackContext)