Add Joiner UDP Port feature (#676)

* Add Joiner UDP Port feature

  - Add 'joinerport' cli for configuration

  - Include Joiner UDP Port TLV in discovery response message

  - Joiner use it as destination port during commissioning process
This commit is contained in:
Shu Chen
2016-09-25 20:50:28 -07:00
committed by Jonathan Hui
parent dc2dcbd282
commit d71939d331
11 changed files with 119 additions and 20 deletions
+1
View File
@@ -302,6 +302,7 @@ typedef struct otActiveScanResult
otNetworkName mNetworkName; ///< Thread Network Name
otExtendedPanId mExtendedPanId; ///< Thread Extended PAN ID
uint16_t mPanId; ///< IEEE 802.15.4 PAN ID
uint16_t mJoinerUdpPort; ///< Joiner UDP Port
uint8_t mChannel; ///< IEEE 802.15.4 Channel
int8_t mRssi; ///< RSSI (dBm)
uint8_t mLqi; ///< LQI
+23
View File
@@ -985,6 +985,29 @@ uint32_t otGetLocalLeaderPartitionId(otInstance *aInstance);
*/
void otSetLocalLeaderPartitionId(otInstance *aInstance, uint32_t aPartitionId);
/**
* Get the Joiner UDP Port.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns The Joiner UDP Port number.
*
* @sa otSetJoinerUdpPort
*/
uint16_t otGetJoinerUdpPort(otInstance *aInstance);
/**
* Set the Joiner UDP Port
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aJoinerUdpPort The Joiner UDP Port number.
*
* @retval kThreadErrorNone Successfully set the Joiner UDP Port.
*
* @sa otGetJoinerUdpPort
*/
ThreadError otSetJoinerUdpPort(otInstance *aInstance, uint16_t aJoinerUdpPort);
/**
* @}
*/