Commit Graph

108 Commits

Author SHA1 Message Date
Jonathan Hui b1c19ed091 Apply realm-local scope to mesh-local addresses for source address selection. (#1000) 2016-11-22 08:43:22 -08:00
Jonathan Hui d8aae52899 Only FTDs handle Discovery Requests and send Discovery Responses. (#998) 2016-11-21 19:04:37 +00:00
Jonathan Hui 050365e4fc Move meshcop code into meshcop dir. (#988) 2016-11-19 07:02:34 +00:00
Shu Chen 848863910b Enable local Pending Dataset when device detaches from the network (#954)
* Enable local Pending Dataset when device detaches from the network

* Remove a dead code in Mle::Stop()
2016-11-10 04:40:40 +08:00
Shu Chen 1f445bad48 Security Policy feature enhancement. (#948)
* Initialize the Security Policy Tlv in Active Dataset

* Apply Security Policy configuration from Active Dataset

* Do not include NetworkMasterKey Tlv in MGMT_GET.rsp if Security Policy 'O' bit is disabled

* THCI: add startNativeCommissioner() and sendBeacons() support
2016-11-09 01:19:46 -08:00
Shu Chen 15008f07f8 Include local Dataset Timestamp TLVs in Child ID Request message after reset (#922)
* Include local Datasets Timestamp TLVs in Child ID Request message when network Datasets is not
  available (probably after reset)

* Enable local Datasets as network Datasets if parent do not indicate that it has different Datasets

* Remove the logic for Leader: set active timestamp to 0 if it is not initialized. Since Leader will
  always has active timestamp now.
2016-11-02 23:05:16 -07:00
Jonathan Hui 6d0cfceadb Remove Link Reject and link-local RLOC. (#913) 2016-11-02 21:16:26 -07:00
Xiao Ma 30c9dfc0bc Copy TLVs from Active Dataset to Pending Dataset which are not included in MGMT_PENDING_SET request message. (#915) 2016-11-02 11:23:19 -07:00
Shu Chen a21db36a5b Implement reattach process using stored dataset (#894) 2016-10-31 08:56:52 -07:00
Jonathan Hui f0a5239a59 Clean up MessageInfo class. (#888) 2016-10-27 09:42:48 -07:00
Xiao Ma 4caec455c3 Optimizate orhpaned MLE Announce message. (#886) 2016-10-26 09:08:43 -07:00
Łukasz Duda 78d4b678e3 MPL: Introduce multicast forwarding. (#827)
* Message: Add a new optional parameter to Clone method.

* MPL: Introduce MPL Forwarding

This commit introduces MPL Forwarding for Routers.
All references to MPL Seed have been replaced with MPL Seed Id.
2016-10-24 11:34:15 -07:00
Jonathan Hui 35e7fbf733 Update otLog*() to not require line separators. (#854) 2016-10-20 19:55:12 -07:00
Abtin Keshavarzian dcc527cf23 mle.cpp: Ensure to init the mLeaderAloc and set it with correct prefix len (#857)
This commit fixes an issue with the unicast address `mLeaderAloc`
to ensure that it is initialized properly and its prefix length is
correctly configured.
2016-10-20 17:56:37 -07:00
Xiao Ma 27327a63a1 Ensure thread device has synced with latest Dataset before sending MLE Announce. (#845) 2016-10-20 10:40:10 -07:00
Nick Banks 7a19067515 Some Logging Cleanup (#810)
* Remove unnecessary WPP definition.
* Various other small fixes.
2016-10-20 10:30:53 -07:00
Jonathan Hui 1a4e884e5a Set the Key Source field for 802.15.4 Key ID Mode 2. (#821) 2016-10-17 09:17:43 -07:00
Shu Chen 2153e51ce5 Add Leader ALOC feature support (#797)
* Add Leader ALOC feature support

* Avoid using leader aloc magic number
2016-10-13 08:45:34 -07:00
Jonathan Hui c28042ce97 Add Thread Certification 9.2.17 to automated test. (#786) 2016-10-12 20:41:11 -07:00
Robert Quattlebaum 104ca6d10d Cleanup error code usage. Avoid raising errors when value is unchanged. (#787)
This change is attempting to address two issues:

1.  Returning `kThreadError_Busy`, when `kThreadError_Already`,
    `kThreadError_InvalidState`, or even the lazy
    `kThreadError_Failed` would be more-appropriate/less-misleading.
2.  Setters returning an error when the value to be changed is already
    set to the requested value.

Number one hurts debuggability. Number two makes the code more fragile.
The cases where both intersect can be maddening.

This change replaces cases inappropriately returning
`kThreadError_Busy` with a better, more specific error code. It also
makes some "setter" functions (Including `otInterfaceUp()` and
`otThreadStart()`) return success if the value is already set.
2016-10-12 14:18:55 -07:00
Shu Chen 87be717ad6 Include timestamp tlv in Child ID Response only when it is necessary (#794) 2016-10-12 09:21:28 -07:00
Shu Chen 6bbec68c8b Set active timestamp to 0 if there is no valid active operational dataset. (#782) 2016-10-11 09:09:05 -07:00
Jonathan Hui f3ef4046db Steering data. (#743) 2016-10-10 09:40:08 -07:00
Jonathan Hui aeee0b9b1a Return error if message buffer allocation fails. (#768) 2016-10-07 15:51:20 -07:00
Jonathan Hui eb2277ab60 Add Thread Certification 9.2.9 to automated test. (#756) 2016-10-06 12:29:08 -07:00
Hubert Miś 06535536de Add key rotation timer and key switch guard timer. (#732) (#751) 2016-10-06 09:11:40 -07:00
Robert Lubos 2c21e83d89 Handle router selection jitter timeout only once (#758) 2016-10-06 09:04:46 -07:00
Jonathan Hui 118ef08167 Update Thread Certification 5.5.4,5 to current test plan. (#755)
- Restrict child to only process Route TLV from parent.
2016-10-05 22:06:49 -07:00
Jonathan Hui c24b7cfaed Add Thread Certification 9.2.7 to automated test. (#750) 2016-10-05 10:02:08 -07:00
Jonathan Hui e673479eba Do not reattach to same partition when Leader connectivity is lost. (#752) 2016-10-05 09:51:20 -07:00
Nick Banks 79d99e7a91 Refactor OpenThread Global Variables into a Single Context Structure (#357)
* Refactor OpenThread to contain all global/static variables in a single context structure.
2016-10-04 15:23:25 -07:00
Jonathan Hui 671964c2d4 MLE Announce. (#736) 2016-10-04 10:26:30 -07:00
Lu Wang 78bc4a245a Dataset Mgmt Certificate test clean up (#739)
* Dataset Mgmt Certificate test clean up

- Fix bug of reading commissioner session id after rx MGMT_ACTIVE_SET/MGMT_PENDING_SET
- Restore ML16 address after modifying meshlocal prefix if the node keeps attaching
- Fix bug of THCI
2016-10-03 20:55:51 -07:00
Nick Banks fbc5245d79 Enable Windows WPP Logging Support (#678)
* Enable support for WPP logging.
2016-10-03 10:45:25 -07:00
Jonathan Hui 9bd290ec33 Only accept Data Response when Network Data, Active, and Pending Datasets are known. (#708) 2016-09-28 10:11:00 -07:00
Jonathan Hui eb99d87b71 Operational Dataset management cleanup. (#704)
- Reduce stack pressure when setting datasets via the API.
- Remove pending timestamp and delay timer from active dataset when updating.
- Always manage delay timer based on the network copy of the pending dataset.
2016-09-28 09:06:30 -07:00
Lu Wang 8dce81964f Enhance Mle::HandleDataResponse (#692)
* Enhance Mle::HandleDataResponse

* Send DataRequest when vn_version is greater and no dataset included
2016-09-27 10:01:30 -07:00
Jonathan Hui 6abc9808ac Set macMaxFrameRetries to 3. (#672)
- Move logic to invalidate Thread links to MeshForwarder.
2016-09-26 12:21:40 -07:00
Xiao Ma a74e0496b8 Delay a random jitter period prior to request a Router ID for REED. (#554)
* Delay a random jitter period prior to request a Router ID for REED.

* Update Cert_5_1_09_REEDAttachConnectivity.py to pass Travis check.

* Add CLI to set/get the ROUTER_SELECTION_JITTER and update Certification scripts.

  - add 'posix-ncp' to allow failure list in .travis.yml.
2016-09-26 10:03:09 -07:00
Shu Chen d71939d331 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
2016-09-25 20:50:28 -07:00
Buke Po d283c29f23 Support network diagnostic feature. (#652)
* support network diagnostic

* add network diagnostic THCI implementation
2016-09-23 21:06:08 -07:00
Jonathan Hui 4742419be6 Implement Network Data TLV in Child Update messages. (#659) 2016-09-23 10:19:55 -07:00
Łukasz Duda 465affadb9 MPL: Seed-id field handling (#663)
* MPL: Fix seed-id field handling. Add Pad1 and PadN options.

This commit fixes issue #599 by allowing MPL module to elide its seed-id
as well as retrieve elided seed-id from RLOC.

Additionally Pad options have been introduced and bug with incorrect
parsing of Pad1 option has been fixed.

* Lowpan: Introduce compression and decompression of Pad1 and PadN options.

This commit fixes issue #599.
2016-09-23 09:06:27 -07:00
Jonathan Hui d848ed12e8 Use static_cast instead of reinterpret_cast when possible. (#667) 2016-09-22 15:14:23 -07:00
Marcin K Szczodrak 94d36cd3a5 ensure that OT does not crash when thread message info points to NULL (#660) 2016-09-22 10:54:16 -07:00
Robert Lubos de579eef1c Fixed bug with incorrect Router Id 62. (#625) 2016-09-20 09:03:16 -07:00
Nick Banks 9a2beff1e9 Windows Core Build Support (#582)
* Support #define to overwrite what openthread-config file to use, since Windows does support autoconf.
2016-09-19 12:00:30 -07:00
Jonathan Hui b082d965e9 Implement DATA_RESUBMIT_DELAY. (#586) 2016-09-16 08:43:52 -07:00
Lu Wang 5c28c02e40 Include timestamp TLV (#564)
* Include timestamp TLV
* Keep one copy of timestamp
2016-09-14 21:13:43 -07:00
Jonathan Hui 44350178ad Change copyright to The OpenThread Authors. (#583)
- Add a top-level file named AUTHORS which identifies the copyright
holders of the project.
2016-09-13 15:57:11 -07:00