mirror of
https://github.com/espressif/openthread.git
synced 2026-09-30 21:07:39 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user