[docs] fix typos in comments (#3417)

This commit is contained in:
Abtin Keshavarzian
2019-01-02 10:24:08 -08:00
committed by Jonathan Hui
parent 49945221dd
commit 42c46368f1
20 changed files with 28 additions and 29 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
*/
/**
* This enum represents OpenThread time synchronization status.
* This enumeration represents OpenThread time synchronization status.
*
*/
typedef enum otNetworkTimeStatus
+1 -1
View File
@@ -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.
+4 -4
View File
@@ -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,
+1 -1
View File
@@ -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.
*
+1 -1
View File
@@ -142,7 +142,7 @@ otError Dhcp6Server::UpdateService(void)
}
}
// alreay added
// already added
if (found)
{
continue;
+1 -1
View File
@@ -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;
+1 -2
View File
@@ -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
+2 -2
View File
@@ -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.
*
+1 -1
View File
@@ -513,7 +513,7 @@ private:
} OT_TOOL_PACKED_END;
/**
* This class implements Sntp client.
* This class implements SNTP client.
*
*/
class Client
+1 -1
View File
@@ -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; }
+2 -2
View File
@@ -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.
*
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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());
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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());
}
}
+2 -2
View File
@@ -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.
*
+1 -1
View File
@@ -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)