TunnelApp

Package: inet.applications.tunapp

TunnelApp

simple module

(no description)

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
interfaceTableModule string
interface string
protocol string "udp"
destinationAddress string ""
destinationPort int -1
localPort int -1
stopOperationExtraTime double -1s

extra time after lifecycle stop operation finished

stopOperationTimeout double 2s

timeout value for lifecycle stop operation

Properties

Name Value Description
lifecycleSupport
display i=block/app

Gates

Name Direction Size Description
socketIn input
socketOut output

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
InterfaceTableinet::InterfaceTable::findInterfaceByNamefindInterfaceByName

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
socketInPacket0 (UdpStatusInd::UDP_I_DATA)UdpDscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, L4PortInd, NetworkProtocolInd, SocketInd, TosInd, TransportProtocolInd
socketInPacket4 (TunSocketIndication::TUN_I_DATA)TunInterfaceInd, NetworkProtocolInd, PacketProtocolTag, SocketInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
socketOutPacket0 (UdpCommandCode::UDP_C_DATA)UdpDispatchProtocolReq, SocketReq
socketOutPacket4 (TunCommandCode::TUN_C_DATA)TunInterfaceReq, SocketReq
socketOutRequest1 (TunCommandCode::TUN_C_OPEN)TunOpenCommandTunInterfaceReq, SocketReq
socketOutRequest1 (UdpCommandCode::UDP_C_BIND)UdpBindCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest2 (UdpCommandCode::UDP_C_CONNECT)UdpConnectCommandUdpDispatchProtocolReq, SocketReq

Shared Tagging operations (observed)

tagTypetagAction
clearTags
DispatchProtocolReqaddTagIfAbsent
InterfaceReqaddTagIfAbsent
SocketIndfindTag, getTag
SocketReqaddTagIfAbsent
TransportProtocolIndgetTag

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatafindTag

Source code

simple TunnelApp like IApp
{
    parameters:
        string interfaceTableModule;
        string interface;
        string protocol @enum("udp","ipv4") = default("udp");
        string destinationAddress = default("");
        int destinationPort = default(-1);
        int localPort = default(-1);
        @lifecycleSupport;
        double stopOperationExtraTime @unit(s) = default(-1s);    // extra time after lifecycle stop operation finished
        double stopOperationTimeout @unit(s) = default(2s);    // timeout value for lifecycle stop operation
        @display("i=block/app");
    gates:
        input socketIn;
        output socketOut;
}
File: src/inet/applications/tunapp/TunnelApp.ned