TelnetServerConnection

Package: inet.applications.tcpapp

TelnetServerConnection

compound module

This module contains a configurable pre-composed telnet traffic source and traffic sink as part of a telnet server application.

See also: TelnetClientApp, TelnetServerApp

cloner : PacketCloner

This module connects one packet producer to one packet consumer.

Source:
cloner: PacketCloner {
    parameters:
        @display("p=300,200");
} responseProvider : like IPassivePacketSource

PassivePacketSource: This module is a passive packet source which can be pulled for packets from the connected packet...

IPassivePacketSource: This module interface must be implemented by passive packet source modules.

Source:
responseProvider: <default("PassivePacketSource")> like IPassivePacketSource {
    parameters:
        @display("p=100,100");
} responseServer : like IPacketServer

TokenBasedServer: This module repeatedly pulls packets from the connected packet provider and it pushes them into the...

IPacketServer: This module interface is implemented by packet server modules.

Source:
responseServer: <default("TokenBasedServer")> like IPacketServer {
    parameters:
        @display("p=100,200");
} multiplexer : PacketMultiplexer

This module connects multiple packet producers to one packet consumer.

Source:
multiplexer: PacketMultiplexer {
    parameters:
        @display("p=200,300");
} classifier : like IPacketClassifier

PacketClassifier: This module connects one packet producer to multiple packet consumers.

IPacketClassifier: This module interface is implemented by packet classifier modules.

Source:
classifier: <default("PacketClassifier")> like IPacketClassifier {
    parameters:
        classifierClass = default("inet::queueing::PacketCharacterOrEnterClassifier");
        @display("p=500,200");
} characterConsumer : like IPassivePacketSink

PassivePacketSink: This module is a passive packet sink which is pushed with packets by the connected packet producer.

IPassivePacketSink: This module interface must be implemented by passive packet sink modules.

Source:
characterConsumer: <default("PassivePacketSink")> like IPassivePacketSink {
    parameters:
        @display("p=400,300");
} enterTokenGenerator : PacketBasedTokenGenerator

This module generates tokens into the configured ~TokenBasedServer for each consumed packet.

Source:
enterTokenGenerator: PacketBasedTokenGenerator {
    parameters:
        storageModule = default("^.responseServer");
        @display("p=600,300");
} io : TcpServerSocketIo

This module provides TCP server socket handling for generic TCP applications.

Source:
io: TcpServerSocketIo {
    parameters:
        @display("p=300,400");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

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

Properties

Name Value Description
display i=block/app

Gates

Name Direction Size Description
socketIn input
socketOut output

Unassigned submodule parameters

Name Type Default value Description
cloner.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

multiplexer.displayStringTextFormat string "passed %p pk (%l)"

determines the text that is written on top of the submodule

multiplexer.forwardServiceRegistration bool true
multiplexer.forwardProtocolRegistration bool true
enterTokenGenerator.displayStringTextFormat string "processed %p pk (%l)\ngenerated %t tk\nto %s"

determines the text that is written on top of the submodule

enterTokenGenerator.storageModule string "^.responseServer"

module path of the token storage where the tokens are generated via C++ method call

enterTokenGenerator.numTokensPerPacket double 1

number of tokens per consumed packet

enterTokenGenerator.numTokensPerBit double 0

number of tokens per consumed bit

Source code

//
// This module contains a configurable pre-composed telnet traffic source and
// traffic sink as part of a telnet server application.
//
// @see ~TelnetClientApp, ~TelnetServerApp
//
module TelnetServerConnection like IApp
{
    parameters:
        @display("i=block/app");
    gates:
        input socketIn;
        output socketOut;
    submodules:
        cloner: PacketCloner {
            parameters:
                @display("p=300,200");
        }
        responseProvider: <default("PassivePacketSource")> like IPassivePacketSource {
            parameters:
                @display("p=100,100");
        }
        responseServer: <default("TokenBasedServer")> like IPacketServer {
            parameters:
                @display("p=100,200");
        }
        multiplexer: PacketMultiplexer {
            parameters:
                @display("p=200,300");
        }
        classifier: <default("PacketClassifier")> like IPacketClassifier {
            parameters:
                classifierClass = default("inet::queueing::PacketCharacterOrEnterClassifier");
                @display("p=500,200");
        }
        characterConsumer: <default("PassivePacketSink")> like IPassivePacketSink {
            parameters:
                @display("p=400,300");
        }
        enterTokenGenerator: PacketBasedTokenGenerator {
            parameters:
                storageModule = default("^.responseServer");
                @display("p=600,300");
        }
        io: TcpServerSocketIo {
            parameters:
                @display("p=300,400");
        }
    connections:
        io.trafficOut --> cloner.in;
        cloner.out++ --> classifier.in;
        cloner.out++ --> multiplexer.in++;
        responseProvider.out --> responseServer.in;
        responseServer.out --> multiplexer.in++;
        classifier.out++ --> characterConsumer.in;
        classifier.out++ --> enterTokenGenerator.in;
        multiplexer.out --> { @display("m=s"); } --> io.trafficIn;
        io.socketOut --> { @display("m=s"); } --> socketOut;
        socketIn --> { @display("m=s"); } --> io.socketIn;
}
File: src/inet/applications/tcpapp/TelnetServerConnection.ned