INET Framework for OMNeT++/OMNEST
inet::TcpOpenCommand Class Reference

Class generated from inet/transportlayer/contract/tcp/TcpCommand.msg:116 by opp_msgtool. More...

#include <TcpCommand_m.h>

Inheritance diagram for inet::TcpOpenCommand:
inet::TcpCommand

Public Member Functions

 TcpOpenCommand ()
 
 TcpOpenCommand (const TcpOpenCommand &other)
 
virtual ~TcpOpenCommand ()
 
TcpOpenCommandoperator= (const TcpOpenCommand &other)
 
virtual TcpOpenCommanddup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual const L3AddressgetLocalAddr () const
 
virtual L3AddressgetLocalAddrForUpdate ()
 
virtual void setLocalAddr (const L3Address &localAddr)
 
virtual const L3AddressgetRemoteAddr () const
 
virtual L3AddressgetRemoteAddrForUpdate ()
 
virtual void setRemoteAddr (const L3Address &remoteAddr)
 
virtual int getLocalPort () const
 
virtual void setLocalPort (int localPort)
 
virtual int getRemotePort () const
 
virtual void setRemotePort (int remotePort)
 
virtual bool getFork () const
 
virtual void setFork (bool fork)
 
virtual const char * getTcpAlgorithmClass () const
 
virtual void setTcpAlgorithmClass (const char *tcpAlgorithmClass)
 
- Public Member Functions inherited from inet::TcpCommand
 TcpCommand ()
 
 TcpCommand (const TcpCommand &other)
 
virtual ~TcpCommand ()
 
TcpCommandoperator= (const TcpCommand &other)
 
virtual int getUserId () const
 
virtual void setUserId (int userId)
 

Protected Member Functions

bool operator== (const TcpOpenCommand &)=delete
 
- Protected Member Functions inherited from inet::TcpCommand
bool operator== (const TcpCommand &)=delete
 

Protected Attributes

L3Address localAddr
 
L3Address remoteAddr
 
int localPort = -1
 
int remotePort = -1
 
bool fork = false
 
::omnetpp::opp_string tcpAlgorithmClass
 
- Protected Attributes inherited from inet::TcpCommand
int userId = -1
 

Private Member Functions

void copy (const TcpOpenCommand &other)
 

Detailed Description

Class generated from inet/transportlayer/contract/tcp/TcpCommand.msg:116 by opp_msgtool.

//
// Control info to be used for active or passive TCP open.
//
// localAddr, remoteAddr, localPort, remotePort should be self-explanatory.
// localAddr is optional because TCP can learn it from IP when a packet
// is received from the peer; localPort is optional because TCP supports
// ephemeral ports.
//
// The fork parameter is used with passive open, and controls what happens
// when an incoming connection is received. With fork=true, it emulates
// the Unix accept(2) syscall semantics: a new connection structure
// is created for the connection (with a new connId, see in ~TcpCommand),
// and the connection structure with the old connId remains listening.
// With fork=false, all the above does not happen: the first connection
// is accepted (with the original connId), and further incoming connections
// will be refused by TCP by sending an RST segment.
//
// The tcpAlgorithmClass field allows per-connection TCP configuration.
// The tcpAlgorithmClass field may contain name of class subclassed from
// TcpAlgorithm, respectively.
// If not set, module parameters with similar names are used.
//
// @see ~TcpCommandCode, ~ITcp
//
class TcpOpenCommand extends TcpCommand
{
    L3Address localAddr; // may be left empty
    L3Address remoteAddr;// required for active open
    int localPort = -1;       // required for passive open
    int remotePort = -1;      // required for active open
    bool fork = false;        // used only for passive open
    string tcpAlgorithmClass; // TCP congestion control algorithm; leave empty for default
}

Constructor & Destructor Documentation

◆ TcpOpenCommand() [1/2]

inet::TcpOpenCommand::TcpOpenCommand ( )

◆ TcpOpenCommand() [2/2]

inet::TcpOpenCommand::TcpOpenCommand ( const TcpOpenCommand other)

◆ ~TcpOpenCommand()

virtual inet::TcpOpenCommand::~TcpOpenCommand ( )
virtual

Member Function Documentation

◆ copy()

void inet::TcpOpenCommand::copy ( const TcpOpenCommand other)
private

◆ dup()

virtual TcpOpenCommand* inet::TcpOpenCommand::dup ( ) const
inlineoverridevirtual

Reimplemented from inet::TcpCommand.

312 {return new TcpOpenCommand(*this);}

◆ getFork()

virtual bool inet::TcpOpenCommand::getFork ( ) const
virtual

◆ getLocalAddr()

◆ getLocalAddrForUpdate()

virtual L3Address& inet::TcpOpenCommand::getLocalAddrForUpdate ( )
inlinevirtual
317 { return const_cast<L3Address&>(const_cast<TcpOpenCommand*>(this)->getLocalAddr());}

◆ getLocalPort()

◆ getRemoteAddr()

virtual const L3Address& inet::TcpOpenCommand::getRemoteAddr ( ) const
virtual

◆ getRemoteAddrForUpdate()

virtual L3Address& inet::TcpOpenCommand::getRemoteAddrForUpdate ( )
inlinevirtual
321 { return const_cast<L3Address&>(const_cast<TcpOpenCommand*>(this)->getRemoteAddr());}

◆ getRemotePort()

virtual int inet::TcpOpenCommand::getRemotePort ( ) const
virtual

◆ getTcpAlgorithmClass()

virtual const char* inet::TcpOpenCommand::getTcpAlgorithmClass ( ) const
virtual

◆ operator=()

TcpOpenCommand& inet::TcpOpenCommand::operator= ( const TcpOpenCommand other)

◆ operator==()

bool inet::TcpOpenCommand::operator== ( const TcpOpenCommand )
protecteddelete

◆ parsimPack()

virtual void inet::TcpOpenCommand::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual

Reimplemented from inet::TcpCommand.

Referenced by inet::doParsimPacking().

◆ parsimUnpack()

virtual void inet::TcpOpenCommand::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual

Reimplemented from inet::TcpCommand.

Referenced by inet::doParsimUnpacking().

◆ setFork()

virtual void inet::TcpOpenCommand::setFork ( bool  fork)
virtual

Referenced by inet::TcpSocket::listen().

◆ setLocalAddr()

virtual void inet::TcpOpenCommand::setLocalAddr ( const L3Address localAddr)
virtual

◆ setLocalPort()

virtual void inet::TcpOpenCommand::setLocalPort ( int  localPort)
virtual

◆ setRemoteAddr()

virtual void inet::TcpOpenCommand::setRemoteAddr ( const L3Address remoteAddr)
virtual

◆ setRemotePort()

virtual void inet::TcpOpenCommand::setRemotePort ( int  remotePort)
virtual

◆ setTcpAlgorithmClass()

virtual void inet::TcpOpenCommand::setTcpAlgorithmClass ( const char *  tcpAlgorithmClass)
virtual

Member Data Documentation

◆ fork

bool inet::TcpOpenCommand::fork = false
protected

◆ localAddr

L3Address inet::TcpOpenCommand::localAddr
protected

◆ localPort

int inet::TcpOpenCommand::localPort = -1
protected

◆ remoteAddr

L3Address inet::TcpOpenCommand::remoteAddr
protected

◆ remotePort

int inet::TcpOpenCommand::remotePort = -1
protected

◆ tcpAlgorithmClass

::omnetpp::opp_string inet::TcpOpenCommand::tcpAlgorithmClass
protected

The documentation for this class was generated from the following file:
inet::TcpOpenCommand::getLocalAddr
virtual const L3Address & getLocalAddr() const
inet::TcpOpenCommand::TcpOpenCommand
TcpOpenCommand()
inet::TcpOpenCommand::getRemoteAddr
virtual const L3Address & getRemoteAddr() const