class WeaveTunnelConnectionMgr
Defined at line 80 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/weave-tunneling/WeaveTunnelConnectionMgr.h
This class encapsulates all the Weave tunnel connection states
and the associated management logic and functions. An instance
of this class would be used to manage the tunnel over each
interface through which the Weave tunnel to the Service would
exist.
Public Members
ConnectPolicyCallback mServiceConnDelayPolicyCallback
Public Methods
void WeaveTunnelConnectionMgr ()
WEAVE_ERROR Init (WeaveTunnelAgent * tunAgent, TunnelType tunType, SrcInterfaceType srcIntfType, const char * connIntfName)
Initialize the WeaveTunnelConnectionMgr.
void Shutdown ()
Shutdown the WeaveTunnelConnectionMgr.
WEAVE_ERROR ConfigureConnTimeout (uint16_t maxTimeoutSecs)
Configure the TCP user timeout.
void ConfigureTunnelLivenessInterval (uint16_t livenessIntervalSecs)
Configure the Tunnel Liveness interval.
void SetInterfaceName (const char * intfName)
Set InterfaceName for Tunnel connection.
void SetInterfaceType (const SrcInterfaceType srcIntfType)
Set SrcInterfaceType for Tunnel connection.
void ServiceMgrStatusHandler (void * appState, WEAVE_ERROR err, StatusReport * report)
Handler invoked if the Service Manager failed to establish the TCP connection to the Service.
void HandleServiceConnectionComplete (WeaveConnection * con, WEAVE_ERROR conErr)
Handler invoked when Service TCP connection is completed. The device proceeds to initiate Tunnel control
commands to the Service from this function.
void HandleServiceConnectionClosed (WeaveConnection * con, WEAVE_ERROR conErr)
Handler invoked when Service TCP connection is closed. The device tries to re-establish the connection to
the Service if the mServiceConKeepAlive is set to true.
void RecvdFromService (WeaveConnection * con, const WeaveMessageInfo * msgInfo, PacketBuffer * message)
Handler to receive tunneled IPv6 packets from the Service TCP connection and forward to the Tunnel
EndPoint interface after decapsulating the raw IPv6 packet from inside the tunnel header.
void DefaultReconnectPolicyCallback (void *const appstate, ReconnectParam & reconnectParam, uint32_t & delayMsec)
WEAVE_ERROR TryConnectingNow ()
Attempt to establish a connection to the Service.
void ServiceTunnelClose (WEAVE_ERROR err)
Close the Service tunnel.
void StopAndReconnectTunnelConn (ReconnectParam & reconnParam)
Stop Service tunnel connection and attempt to reconnect again.
nl::Weave::WeaveConnection * GetTunnelConnection ()
Get a pointer to the Weave Tunnel Connection object for this
Tunnel Connection Manager.
Enumerations
enum TunnelConnectionState
| Name | Value |
|---|---|
| kState_NotConnected | 0 |
| kState_Connecting | 1 |
| kState_ConnectionEstablished | 2 |
| kState_TunnelOpen | 3 |
| kState_TunnelClosing | 4 |
| kState_ReconnectRecvd | 5 |
Defined at line 86 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/weave-tunneling/WeaveTunnelConnectionMgr.h
enum TunnelConnNotifyReasons
| Name | Value |
|---|---|
| kStatus_TunDown | 0 |
| kStatus_TunPrimaryUp | 1 |
| kStatus_TunPrimaryConnError | 2 |
| kStatus_TunBackupConnError | 3 |
| kStatus_TunFailoverToBackup | 4 |
| kStatus_TunBackupOnlyDown | 5 |
| kStatus_TunBackupUp | 6 |
| kStatus_TunPrimaryAndBackupUp | 7 |
| kStatus_TunPrimaryReconnectRcvd | 8 |
| kStatus_TunBackupReconnectRcvd | 9 |
| kStatus_TunPrimaryLiveness | 10 |
| kStatus_TunBackupLiveness | 11 |
| kStatus_TunPrimaryConnEstablished | 12 |
| kStatus_TunBackupConnEstablished | 13 |
Defined at line 96 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/weave-tunneling/WeaveTunnelConnectionMgr.h
Friends
class WeaveTunnelControl
class WeaveTunnelAgent