Skip to content

Commit

Permalink
Added using CRA/CRI values in the controller for MRP intervals (#11471)
Browse files Browse the repository at this point in the history
Controller is using default MRP retransmission interval values
for all of the devices. According to spec it should use
discovered CRA and CRI values for that purpose and set MRP
parameters independently for every single device.

* Added storing MRP intervals values in the CHIPDevice,
SecureSession and UnathenticatedSession.
* Added setting MRP intervals for sessions using discovered
device data or if they are not available with the default values.
* Added setting ReliableMessageContext config when creating
every new ExchangeContext based on MRP intervals got from the
SessionHandle
* Changed INITIAL retransmission interval name in the Reliable
Message module to IDLE as that is compatible with the spec
  • Loading branch information
kkasperczyk-no authored and pull[bot] committed May 19, 2022
1 parent e7af4b4 commit 1314180
Show file tree
Hide file tree
Showing 17 changed files with 129 additions and 36 deletions.
4 changes: 2 additions & 2 deletions src/app/server/Dnssd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ CHIP_ERROR DnssdServer::AdvertiseOperational()
.SetPeerId(fabricInfo.GetPeerId())
.SetMac(mac)
.SetPort(GetSecuredPort())
.SetMRPRetryIntervals(Optional<uint32_t>(CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL),
.SetMRPRetryIntervals(Optional<uint32_t>(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL),
Optional<uint32_t>(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL))
.SetTcpSupported(Optional<bool>(INET_CONFIG_ENABLE_TCP_ENDPOINT))
.EnableIpV4(true);
Expand Down Expand Up @@ -344,7 +344,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi
#endif

advertiseParameters
.SetMRPRetryIntervals(Optional<uint32_t>(CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL),
.SetMRPRetryIntervals(Optional<uint32_t>(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL),
Optional<uint32_t>(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL))
.SetTcpSupported(Optional<bool>(INET_CONFIG_ENABLE_TCP_ENDPOINT));

Expand Down
2 changes: 2 additions & 0 deletions src/channel/ChannelContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ void ChannelContext::EnterCasePairingState()
EnterFailedState(CHIP_ERROR_NO_MEMORY);
return;
}
session.Value().GetUnauthenticatedSession()->SetMRPIntervals(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL,
CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL);

ExchangeContext * ctxt = mExchangeManager->NewContext(session.Value(), prepare.mCasePairingSession);
VerifyOrReturn(ctxt != nullptr);
Expand Down
13 changes: 11 additions & 2 deletions src/controller/CHIPDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ void Device::OnNewConnection(SessionHandle session)
// we need to restore the session counters along with the session information.
Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value());
VerifyOrReturn(secureSession != nullptr);

secureSession->SetMRPIntervals(mMrpIdleInterval, mMrpActiveInterval);

MessageCounter & localCounter = secureSession->GetSessionMessageCounter().GetLocalMessageCounter();
if (localCounter.SetCounter(mLocalMessageCounter) != CHIP_NO_ERROR)
{
Expand Down Expand Up @@ -420,11 +423,13 @@ CHIP_ERROR Device::CloseSession()
return CHIP_NO_ERROR;
}

CHIP_ERROR Device::UpdateAddress(const Transport::PeerAddress & addr)
CHIP_ERROR Device::UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, uint32_t mrpActiveInterval)
{
bool didLoad;

mDeviceAddress = addr;
mDeviceAddress = addr;
mMrpIdleInterval = mrpIdleInterval;
mMrpActiveInterval = mrpActiveInterval;

ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(didLoad));

Expand All @@ -439,6 +444,7 @@ CHIP_ERROR Device::UpdateAddress(const Transport::PeerAddress & addr)

Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value());
secureSession->SetPeerAddress(addr);
secureSession->SetMRPIntervals(mrpIdleInterval, mrpActiveInterval);

return CHIP_NO_ERROR;
}
Expand Down Expand Up @@ -552,6 +558,9 @@ CHIP_ERROR Device::WarmupCASESession()
{
return CHIP_ERROR_NO_MEMORY;
}

session.Value().GetUnauthenticatedSession()->SetMRPIntervals(mMrpIdleInterval, mMrpActiveInterval);

Messaging::ExchangeContext * exchange = mExchangeMgr->NewContext(session.Value(), &mCASESession);
VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL);

Expand Down
25 changes: 18 additions & 7 deletions src/controller/CHIPDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,17 +348,19 @@ class Device : public Messaging::ExchangeDelegate, public SessionEstablishmentDe

/**
* @brief
* Update address of the device.
* Update data of the device.
*
* This function will set new IP address and port of the device. Since the device settings might
* have been moved from RAM to the persistent storage, the function will load the device settings
* first, before making the changes.
* This function will set new IP address, port and MRP retransmission intervals of the device.
* Since the device settings might have been moved from RAM to the persistent storage, the function
* will load the device settings first, before making the changes.
*
* @param[in] addr Address of the device to be set.
* @param[in] addr Address of the device to be set.
* @param[in] mrpIdleInterval MRP idle retransmission interval of the device to be set.
* @param[in] mrpActiveInterval MRP active retransmision interval of the device to be set.
*
* @return CHIP_NO_ERROR if the address has been updated, an error code otherwise.
* @return CHIP_NO_ERROR if the data has been updated, an error code otherwise.
*/
CHIP_ERROR UpdateAddress(const Transport::PeerAddress & addr);
CHIP_ERROR UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, uint32_t mrpActiveInterval);
/**
* @brief
* Return whether the current device object is actively associated with a paired CHIP
Expand All @@ -384,6 +386,12 @@ class Device : public Messaging::ExchangeDelegate, public SessionEstablishmentDe

void SetAddress(const Inet::IPAddress & deviceAddr) { mDeviceAddress.SetIPAddress(deviceAddr); }

void GetMRPIntervals(uint32_t & idleInterval, uint32_t & activeInterval) const
{
idleInterval = mMrpIdleInterval;
activeInterval = mMrpActiveInterval;
}

PASESessionSerializable & GetPairing() { return mPairing; }

uint8_t GetNextSequenceNumber() { return mSequenceNumber++; };
Expand Down Expand Up @@ -486,6 +494,9 @@ class Device : public Messaging::ExchangeDelegate, public SessionEstablishmentDe
*/
Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any);

uint32_t mMrpIdleInterval = CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL;
uint32_t mMrpActiveInterval = CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL;

Inet::InetLayer * mInetLayer = nullptr;

bool mActive = false;
Expand Down
9 changes: 8 additions & 1 deletion src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,9 @@ void DeviceController::OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & no
interfaceId = nodeData.mInterfaceId;
}

err = device->UpdateAddress(Transport::PeerAddress::UDP(nodeData.mAddress, nodeData.mPort, interfaceId));
err = device->UpdateDeviceData(Transport::PeerAddress::UDP(nodeData.mAddress, nodeData.mPort, interfaceId),
nodeData.GetMrpRetryIntervalIdle().ValueOr(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL),
nodeData.GetMrpRetryIntervalActive().ValueOr(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL));
SuccessOrExit(err);

PersistDevice(device);
Expand Down Expand Up @@ -693,6 +695,7 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam
CHIP_ERROR err = CHIP_NO_ERROR;
Device * device = nullptr;
Transport::PeerAddress peerAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any);
uint32_t mrpIdleInterval, mrpActiveInterval;

Messaging::ExchangeContext * exchangeCtxt = nullptr;
Optional<SessionHandle> session;
Expand Down Expand Up @@ -789,6 +792,10 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam
session = mSystemState->SessionMgr()->CreateUnauthenticatedSession(params.GetPeerAddress());
VerifyOrExit(session.HasValue(), err = CHIP_ERROR_NO_MEMORY);

// TODO: In some cases like PASE over IP, CRA and CRI values from commissionable node service should be used
device->GetMRPIntervals(mrpIdleInterval, mrpActiveInterval);
session.Value().GetUnauthenticatedSession()->SetMRPIntervals(mrpIdleInterval, mrpActiveInterval);

exchangeCtxt = mSystemState->ExchangeMgr()->NewContext(session.Value(), &mPairingSession);
VerifyOrExit(exchangeCtxt != nullptr, err = CHIP_ERROR_INTERNAL);

Expand Down
14 changes: 13 additions & 1 deletion src/messaging/ExchangeMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,19 @@ CHIP_ERROR ExchangeManager::Shutdown()

ExchangeContext * ExchangeManager::NewContext(SessionHandle session, ExchangeDelegate * delegate)
{
return mContextPool.CreateObject(this, mNextExchangeId++, session, true, delegate);
ExchangeContext * context = mContextPool.CreateObject(this, mNextExchangeId++, session, true, delegate);

uint32_t mrpIdleInterval = CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL;
uint32_t mrpActiveInterval = CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL;

session.GetMRPIntervals(GetSessionManager(), mrpIdleInterval, mrpActiveInterval);

ReliableMessageProtocolConfig mrpConfig;
mrpConfig.mIdleRetransTimeoutTick = mrpIdleInterval >> CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT;
mrpConfig.mActiveRetransTimeoutTick = mrpActiveInterval >> CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT;
context->GetReliableMessageContext()->SetConfig(mrpConfig);

return context;
}

CHIP_ERROR ExchangeManager::RegisterUnsolicitedMessageHandlerForProtocol(Protocols::Id protocolId, ExchangeDelegate * delegate)
Expand Down
4 changes: 2 additions & 2 deletions src/messaging/ReliableMessageContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ bool ReliableMessageContext::HasPiggybackAckPending() const
return mFlags.Has(Flags::kFlagAckMessageCounterIsValid);
}

uint64_t ReliableMessageContext::GetInitialRetransmitTimeoutTick()
uint64_t ReliableMessageContext::GetIdleRetransmitTimeoutTick()
{
return mConfig.mInitialRetransTimeoutTick;
return mConfig.mIdleRetransTimeoutTick;
}

uint64_t ReliableMessageContext::GetActiveRetransmitTimeoutTick()
Expand Down
6 changes: 3 additions & 3 deletions src/messaging/ReliableMessageContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ class ReliableMessageContext
bool HasPiggybackAckPending() const;

/**
* Get the initial retransmission interval. It would be the time to wait before
* Get the idle retransmission interval. It would be the time to wait before
* retransmission after first failure.
*
* @return the initial retransmission interval.
* @return the idle retransmission interval.
*/
uint64_t GetInitialRetransmitTimeoutTick();
uint64_t GetIdleRetransmitTimeoutTick();

/**
* Get the active retransmit interval. It would be the time to wait before
Expand Down
2 changes: 1 addition & 1 deletion src/messaging/ReliableMessageMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ CHIP_ERROR ReliableMessageMgr::AddToRetransTable(ReliableMessageContext * rc, Re

void ReliableMessageMgr::StartRetransmision(RetransTableEntry * entry)
{
entry->nextRetransTimeTick = static_cast<uint16_t>(entry->ec->GetInitialRetransmitTimeoutTick() +
entry->nextRetransTimeTick = static_cast<uint16_t>(entry->ec->GetIdleRetransmitTimeoutTick() +
GetTickCounterFromTimeDelta(System::SystemClock().GetMonotonicTimestamp()));

// Check if the timer needs to be started and start it.
Expand Down
16 changes: 8 additions & 8 deletions src/messaging/ReliableMessageProtocolConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ namespace Messaging {
#endif // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL

/**
* @def CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
* @def CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
*
* @brief
* Initial retransmission interval, or time to wait before retransmission after first
* Initial base retransmission interval, or time to wait before retransmission after first
* failure in milliseconds.
*
* This is the default value, that might be adjusted by end device depending on its
* needs (e.g. sleeping period) using Service Discovery TXT record CRI key.
*/
#ifndef CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
#define CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL (5000)
#endif // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
#ifndef CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
#define CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL (5000)
#endif // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL

/**
* @def CHIP_CONFIG_RMP_DEFAULT_ACK_TIMEOUT_TICK
Expand Down Expand Up @@ -118,12 +118,12 @@ namespace Messaging {
*/
struct ReliableMessageProtocolConfig
{
uint32_t mInitialRetransTimeoutTick; /**< Configurable timeout in msec for retransmission of the first sent message. */
uint32_t mActiveRetransTimeoutTick; /**< Configurable timeout in msec for retransmission of all subsequent messages. */
uint32_t mIdleRetransTimeoutTick; /**< Configurable timeout in msec for retransmission of the first sent message. */
uint32_t mActiveRetransTimeoutTick; /**< Configurable timeout in msec for retransmission of all subsequent messages. */
};

const ReliableMessageProtocolConfig gDefaultReliableMessageProtocolConfig = {
CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL >> CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT,
CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL >> CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT,
CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL >> CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT
};

Expand Down
14 changes: 7 additions & 7 deletions src/messaging/tests/TestReliableMessageProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext)
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down Expand Up @@ -297,7 +297,7 @@ void CheckCloseExchangeAndResendApplicationMessage(nlTestSuite * inSuite, void *
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down Expand Up @@ -359,7 +359,7 @@ void CheckFailedMessageRetainOnSend(nlTestSuite * inSuite, void * inContext)
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down Expand Up @@ -455,7 +455,7 @@ void CheckResendApplicationMessageWithPeerExchange(nlTestSuite * inSuite, void *
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down Expand Up @@ -592,7 +592,7 @@ void CheckResendSessionEstablishmentMessageWithPeerExchange(nlTestSuite * inSuit
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down Expand Up @@ -1146,7 +1146,7 @@ void CheckLostResponseWithPiggyback(nlTestSuite * inSuite, void * inContext)
// Make sure that we resend our message before the other side does.
ReliableMessageContext * rc = exchange->GetReliableMessageContext();
rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down Expand Up @@ -1182,7 +1182,7 @@ void CheckLostResponseWithPiggyback(nlTestSuite * inSuite, void * inContext)
// that we are very unlikely to actually trigger the resends on the receiver
// when we trigger the resends on the sender.
receiverRc->SetConfig({
4, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
4, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
4, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});

Expand Down
4 changes: 2 additions & 2 deletions src/protocols/secure_channel/tests/TestPASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void SecurePairingHandshakeTestCommon(nlTestSuite * inSuite, void * inContext, P
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});
gLoopback.mContext = &ctx;
Expand Down Expand Up @@ -245,7 +245,7 @@ void SecurePairingFailedHandshake(nlTestSuite * inSuite, void * inContext)
NL_TEST_ASSERT(inSuite, rc != nullptr);

rc->SetConfig({
1, // CHIP_CONFIG_MRP_DEFAULT_INITIAL_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL
1, // CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL
});
gLoopback.mContext = &ctx;
Expand Down
15 changes: 15 additions & 0 deletions src/transport/SecureSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ class SecureSession
void SetPeerAddress(const PeerAddress & address) { mPeerAddress = address; }

NodeId GetPeerNodeId() const { return mPeerNodeId; }

void GetMRPIntervals(uint32_t & idleInterval, uint32_t & activeInterval)
{
idleInterval = mMRPIdleInterval;
activeInterval = mMRPActiveInterval;
}

void SetMRPIntervals(uint32_t idleInterval, uint32_t activeInterval)
{
mMRPIdleInterval = idleInterval;
mMRPActiveInterval = activeInterval;
}

uint16_t GetLocalSessionId() const { return mLocalSessionId; }
uint16_t GetPeerSessionId() const { return mPeerSessionId; }
FabricIndex GetFabricIndex() const { return mFabric; }
Expand Down Expand Up @@ -98,6 +111,8 @@ class SecureSession

PeerAddress mPeerAddress;
System::Clock::Timestamp mLastActivityTime = System::Clock::kZero;
uint32_t mMRPIdleInterval = 0;
uint32_t mMRPActiveInterval = 0;
CryptoContext mCryptoContext;
SessionMessageCounter mSessionMessageCounter;
};
Expand Down
19 changes: 19 additions & 0 deletions src/transport/SessionHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,23 @@ const PeerAddress * SessionHandle::GetPeerAddress(SessionManager * sessionManage
return &GetUnauthenticatedSession()->GetPeerAddress();
}

CHIP_ERROR SessionHandle::GetMRPIntervals(SessionManager * sessionManager, uint32_t & mrpIdleInterval, uint32_t & mrpActiveInterval)
{
if (IsSecure())
{
SecureSession * secureSession = sessionManager->GetSecureSession(*this);
if (secureSession == nullptr)
{
return CHIP_ERROR_INVALID_ARGUMENT;
}
secureSession->GetMRPIntervals(mrpIdleInterval, mrpActiveInterval);

return CHIP_NO_ERROR;
}

GetUnauthenticatedSession()->GetMRPIntervals(mrpIdleInterval, mrpActiveInterval);

return CHIP_NO_ERROR;
}

} // namespace chip
2 changes: 2 additions & 0 deletions src/transport/SessionHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class SessionHandle
// torn down, at the very least.
const Transport::PeerAddress * GetPeerAddress(SessionManager * sessionManager) const;

CHIP_ERROR GetMRPIntervals(SessionManager * sessionManager, uint32_t & mrpIdleInterval, uint32_t & mrpActiveInterval);

Transport::UnauthenticatedSessionHandle GetUnauthenticatedSession() const { return mUnauthenticatedSessionHandle.Value(); }

private:
Expand Down
Loading

0 comments on commit 1314180

Please sign in to comment.