nl:: Inet:: TunEndPoint
#include <src/inet/TunEndPoint.h>
Objects of this class represent tunnel interfaces.
Summary
Nest Inet Layer encapsulates methods for interacting on both POSIX systems and LwIP systems with an IP-in-IP tunneling mechanism for supporting the Weave tunnel agent.
Inheritance
Inherits from: nl::Inet::EndPointBasis
Public types |
|
---|---|
@11
|
enum Basic dynamic state of the underlying tunnel. |
OnPacketReceivedFunct)(TunEndPoint *endPoint, Weave::System::PacketBuffer *message)
|
typedefvoid(*
Type of packet receive event handler. |
OnReceiveErrorFunct)(TunEndPoint *endPoint, INET_ERROR err)
|
typedefvoid(*
Type of error event handler. |
RouteOp{
|
enum Operation when setting route to tunnel interface. |
RouteOp
|
typedef Operation when setting route to tunnel interface. |
Public attributes |
|
---|---|
OnPacketReceived
|
The endpoint's packet receive event handler delegate.
|
OnReceiveError
|
|
mAppState
|
void *
Pointer to application-specific state object.
|
mState
|
enum nl::Inet::TunEndPoint::@11
Basic dynamic state of the underlying tunnel.
|
Public functions |
|
---|---|
Free(void)
|
void
Close the tunnel and release handle on the object.
|
GetTunnelInterfaceId(void)
|
InterfaceId
Get the tunnel interface identifier.
|
Init(InetLayer *inetLayer)
|
void
Initialize the Tunnel EndPoint object.
|
InterfaceDown(void)
|
Deactivate the tunnel interface.
|
InterfaceUp(void)
|
Activate the tunnel interface.
|
IsInterfaceUp(void) const
|
bool
Extract the activation state of the tunnel interface.
|
Open(void)
|
Open a tunnel pseudo interface and create a handle to it.
|
Open(const char *intfName)
|
|
Send(Weave::System::PacketBuffer *message)
|
Send an IPv6 packet to the tun device to be sent out.
|
Public types
@11
@11
Basic dynamic state of the underlying tunnel.
Objects are initialized in the "open" state, proceed to the "closed" state when they are ready to be recycled.
OnPacketReceivedFunct
void(* OnPacketReceivedFunct)(TunEndPoint *endPoint, Weave::System::PacketBuffer *message)
Type of packet receive event handler.
Type of delegate to a higher layer to act upon receipt of an IPv6 packet from the tunnel.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
OnReceiveErrorFunct
void(* OnReceiveErrorFunct)(TunEndPoint *endPoint, INET_ERROR err)
Type of error event handler.
Type of delegate to a higher layer to act upon error processing an IPv6 packet from the tunnel.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
RouteOp
RouteOp
RouteOp
enum nl::Inet::TunEndPoint::RouteOp RouteOp
Operation when setting route to tunnel interface.
Values of this enumerated type are used when setting a route for the encapsulated tunnel.
Public attributes
OnPacketReceived
OnPacketReceivedFunct OnPacketReceived
The endpoint's packet receive event handler delegate.
OnReceiveError
OnReceiveErrorFunct OnReceiveError
mAppState
void * mAppState
Pointer to application-specific state object.
mState
enum nl::Inet::TunEndPoint::@11 mState
Basic dynamic state of the underlying tunnel.
Objects are initialized in the "open" state, proceed to the "closed" state when they are ready to be recycled.
Public functions
Free
void Free( void )
Close the tunnel and release handle on the object.
Close the tunnel pseudo interface device and decrement the reference count of the InetLayer object.
GetTunnelInterfaceId
InterfaceId GetTunnelInterfaceId( void )
Get the tunnel interface identifier.
Details | |
---|---|
Returns |
The tunnel interface identifier.
|
Init
void Init( InetLayer *inetLayer )
Initialize the Tunnel EndPoint object.
Details | |||
---|---|---|---|
Parameters |
|
InterfaceDown
INET_ERROR InterfaceDown( void )
Deactivate the tunnel interface.
Details | |||||
---|---|---|---|---|---|
Return Values |
|
InterfaceUp
INET_ERROR InterfaceUp( void )
Activate the tunnel interface.
Details | |||||
---|---|---|---|---|---|
Return Values |
|
IsInterfaceUp
bool IsInterfaceUp( void ) const
Extract the activation state of the tunnel interface.
Details | |
---|---|
Returns |
true if the tunnel interface is active, otherwise false . |
Open
INET_ERROR Open( void )
Open a tunnel pseudo interface and create a handle to it.
Details | |
---|---|
Returns |
INET_NO_ERROR on success, else a corresponding INET mapped OS error.
|
Open
INET_ERROR Open( const char *intfName )
Send
INET_ERROR Send( Weave::System::PacketBuffer *message )
Send an IPv6 packet to the tun device to be sent out.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|