Remove Preferred and Valid Lifetimes from otNetifAddress. (#1110)

- Replace Preferred and Valid Lifetimes with a flag.
- Introduce new otDhcpAddress type for maintaining Preferred and Valid Lifetimes.
- Reduces RAM usage by 128 bytes.
This commit is contained in:
Jonathan Hui
2017-01-04 13:37:25 -08:00
committed by GitHub
parent 85ee5e6493
commit d61b878d34
17 changed files with 90 additions and 66 deletions
@@ -1338,8 +1338,8 @@ OTNODEAPI int32_t OTCALL otNodeAddIpAddr(otNode* aNode, const char *aAddr)
if (error != kThreadError_None) return error;
aAddress.mPrefixLength = 64;
aAddress.mPreferredLifetime = 0xffffffff;
aAddress.mValidLifetime = 0xffffffff;
aAddress.mPreferred = true;
aAddress.mValid = true;
auto result = otAddUnicastAddress(aNode->mInstance, &aAddress);
otLogFuncExit();
return result;