|
INET Framework for OMNeT++/OMNEST
|
#include <SctpSocket.h>
|
| | SctpSocket (bool type=true) |
| | Constructor. More...
|
| |
| | SctpSocket (cMessage *msg) |
| | Constructor, to be used with forked sockets (see listen()). More...
|
| |
| | ~SctpSocket () |
| | Destructor. More...
|
| |
| void * | getUserData () const |
| |
| void | setUserData (void *userData) |
| |
| int | getSocketId () const override |
| | Returns the internal connection Id. More...
|
| |
| int | getState () const |
| | Returns the socket state, one of NOT_BOUND, CLOSED, LISTENING, CONNECTING, CONNECTED, etc. More...
|
| |
|
| AddressVector | getLocalAddresses () const |
| |
| int | getLocalPort () const |
| |
| AddressVector | getRemoteAddresses () const |
| |
| int | getRemotePort () const |
| |
| L3Address | getRemoteAddr () const |
| |
|
| void | setOutputGate (cGate *toSctp) |
| | Sets the gate on which to send to SCTP. More...
|
| |
| void | setOutboundStreams (int streams) |
| | Setter and getter methods for socket and API Parameters. More...
|
| |
| void | setInboundStreams (int streams) |
| |
| void | setAppLimited (bool option) |
| |
| void | setStreamReset (int option) |
| |
| void | setStreamPriority (uint32_t stream, uint32_t priority) |
| |
| void | setMaxInitRetrans (int option) |
| |
| void | setMaxInitRetransTimeout (int option) |
| |
| void | setRtoInitial (double option) |
| |
| void | setRtoMin (double option) |
| |
| void | setRtoMax (double option) |
| |
| void | setSackFrequency (int option) |
| |
| void | setSackPeriod (double option) |
| |
| void | setMaxBurst (int option) |
| |
| void | setFragPoint (int option) |
| |
| void | setNagle (int option) |
| |
| void | setPathMaxRetrans (int option) |
| |
| void | setEnableHeartbeats (bool option) |
| |
| void | setHbInterval (double option) |
| |
| void | setRtoInfo (double initial, double max, double min) |
| |
| void | setAssocMaxRtx (int option) |
| |
| void | setUserOptions (SocketOptions *msg) |
| |
| int | getOutboundStreams () |
| |
| int | getInboundStreams () |
| |
| bool | getStreamReset () |
| |
| int | getLastStream () |
| |
| double | getRtoInitial () |
| |
| int | getMaxInitRetransTimeout () |
| |
| int | getMaxInitRetrans () |
| |
| int | getMaxBurst () |
| |
| int | getFragPoint () |
| |
| int | getAssocMaxRtx () |
| |
| void | getSocketOptions () |
| |
| void | bind (int localPort) |
| | Bind the socket to a local port number. More...
|
| |
| void | bind (L3Address localAddr, int localPort) |
| | Bind the socket to a local port number and IP address (useful with multi-homing). More...
|
| |
| void | bindx (AddressVector localAddr, int localPort) |
| |
| void | addAddress (L3Address addr) |
| |
| void | listen (bool fork=true, bool streamReset=false, uint32_t requests=0, uint32_t messagesToPush=0) |
| | Initiates passive OPEN. More...
|
| |
| void | listen (uint32_t requests=0, bool fork=false, uint32_t messagesToPush=0, bool options=false, int32_t fd=-1) |
| |
| void | accept (int socketId) |
| |
| void | connect (L3Address remoteAddress, int32_t remotePort, bool streamReset=false, int32_t prMethod=0, uint32_t numRequests=0) |
| | Active OPEN to the given remote socket. More...
|
| |
| void | connect (int32_t fd, L3Address remoteAddress, int32_t remotePort, uint32_t numRequests, bool options=false) |
| |
| void | connectx (AddressVector remoteAddresses, int32_t remotePort, bool streamReset=false, int32_t prMethod=0, uint32_t numRequests=0) |
| | Active OPEN to the given remote socket. More...
|
| |
| void | accept (int32_t assocId, int32_t fd) |
| |
| void | acceptSocket (int newSockId) |
| |
| virtual void | send (Packet *packet) override |
| | Send data message. More...
|
| |
| void | sendNotification (cMessage *msg) |
| | Send notification. More...
|
| |
| void | sendRequest (cMessage *msg) |
| | Send request. More...
|
| |
| void | close (int id) |
| | Closes the local end of the connection. More...
|
| |
| virtual void | close () override |
| | Close the socket. More...
|
| |
| void | abort () |
| | Aborts the association. More...
|
| |
| void | shutdown (int id=-1) |
| |
| void | requestStatus () |
| | Causes SCTP to reply with a fresh SctpStatusInfo, attached to a dummy message as controlInfo(). More...
|
| |
|
| virtual bool | belongsToSocket (cMessage *msg) const override |
| | Returns true if the message belongs to this socket instance (message has a SctpCommand as controlInfo(), and the assocId in it matches that of the socket.) More...
|
| |
| void | setCallback (ICallback *cb) |
| | Sets a callback object, to be used with processMessage(). More...
|
| |
| void | processMessage (cMessage *msg) override |
| | Examines the message (which should have arrived from SctpMain), updates socket state, and if there is a callback object installed (see setCallback(), class CallbackInterface), dispatches to the appropriate method. More...
|
| |
| void | setState (int state) |
| |
| void | setTunInterface (int id) |
| |
| int | getTunInterface () |
| |
| virtual void | destroy () override |
| | Notify the protocol that the owner of ISocket has destroyed the socket. More...
|
| |
| virtual bool | isOpen () const override |
| |
| virtual | ~ISocket () |
| |
|
| static int32_t | getNewAssocId () |
| | Generates a new integer, to be used as assocId. More...
|
| |
| static const char * | stateName (int state) |
| | Returns name of socket state code returned by state(). More...
|
| |
◆ State
| Enumerator |
|---|
| NOT_BOUND | |
| CLOSED | |
| LISTENING | |
| CONNECTING | |
| CONNECTED | |
| PEER_CLOSED | |
| LOCALLY_CLOSED | |
| SOCKERROR | |
◆ SctpSocket() [1/2]
| inet::SctpSocket::SctpSocket |
( |
bool |
type = true | ) |
|
Constructor.
The connectionId() method returns a valid Id right after constructor call.
◆ SctpSocket() [2/2]
| inet::SctpSocket::SctpSocket |
( |
cMessage * |
msg | ) |
|
Constructor, to be used with forked sockets (see listen()).
The assocId will be picked up from the message: it should have arrived from SctpMain and contain SctpCommmand control info.
46 auto&
tags = check_and_cast<ITaggedObject *>(msg)->getTags();
47 if (
tags.getNumTags() == 0)
48 throw cRuntimeError(
"SctpSocket::SctpSocket(cMessage *): no SctpCommandReq in message (not from SCTP?)");
66 const auto& connectInfo =
tags.findTag<SctpAvailableReq>();
67 assocId = connectInfo->getNewSocketId();
70 localPrt = connectInfo->getLocalPort();
79 const auto& connectInfo =
tags.findTag<SctpConnectReq>();
82 localPrt = connectInfo->getLocalPort();
◆ ~SctpSocket()
| inet::SctpSocket::~SctpSocket |
( |
| ) |
|
◆ abort()
| void inet::SctpSocket::abort |
( |
| ) |
|
◆ accept() [1/2]
| void inet::SctpSocket::accept |
( |
int |
socketId | ) |
|
◆ accept() [2/2]
| void inet::SctpSocket::accept |
( |
int32_t |
assocId, |
|
|
int32_t |
fd |
|
) |
| |
330 auto cmd = cmsg->addTag<SctpCommandReq>();
334 cmd->setSocketId(assId);
◆ acceptSocket()
| void inet::SctpSocket::acceptSocket |
( |
int |
newSockId | ) |
|
342 cmsg->addTag<SctpAvailableReq>()->setSocketId(newSockId);
344 cmsg->addTag<SocketReq>()->setSocketId(newSockId);
Referenced by processMessage().
◆ addAddress()
| void inet::SctpSocket::addAddress |
( |
L3Address |
addr | ) |
|
167 EV_INFO <<
"add address " << addr <<
"\n";
◆ belongsToSocket()
| bool inet::SctpSocket::belongsToSocket |
( |
cMessage * |
msg | ) |
const |
|
overridevirtual |
Returns true if the message belongs to this socket instance (message has a SctpCommand as controlInfo(), and the assocId in it matches that of the socket.)
Implements inet::ISocket.
452 bool ret = (check_and_cast<Indication *>(msg)->getTag<SocketInd>()->
getSocketId() ==
assocId);
◆ bind() [1/2]
| void inet::SctpSocket::bind |
( |
int |
localPort | ) |
|
◆ bind() [2/2]
| void inet::SctpSocket::bind |
( |
L3Address |
localAddr, |
|
|
int |
localPort |
|
) |
| |
Bind the socket to a local port number and IP address (useful with multi-homing).
155 EV_INFO <<
"bind address " << lAddr <<
"\n";
157 throw cRuntimeError(
"SctpSocket::bind(): socket already bound");
◆ bindx()
| void inet::SctpSocket::bindx |
( |
AddressVector |
localAddr, |
|
|
int |
localPort |
|
) |
| |
◆ close() [1/2]
| virtual void inet::SctpSocket::close |
( |
| ) |
|
|
inlineoverridevirtual |
◆ close() [2/2]
| void inet::SctpSocket::close |
( |
int |
id | ) |
|
◆ connect() [1/2]
| void inet::SctpSocket::connect |
( |
int32_t |
fd, |
|
|
L3Address |
remoteAddress, |
|
|
int32_t |
remotePort, |
|
|
uint32_t |
numRequests, |
|
|
bool |
options = false |
|
) |
| |
292 throw cRuntimeError(
"SctpSocket::connect(): connect() or listen() already called");
295 throw cRuntimeError(
"SctpSocket::connect(): one-to-many style socket must be listening");
301 auto openCmd = cmsg->addTag<SctpOpenReq>();
306 EV_INFO <<
"Socket connect. Assoc=" << openCmd->getSocketId() <<
", sockstate=" <<
stateName(
sockstate) <<
"\n";
314 openCmd->setNumRequests(numRequests);
319 cmsg->setContextPointer((
void *)
sOptions);
◆ connect() [2/2]
| void inet::SctpSocket::connect |
( |
L3Address |
remoteAddress, |
|
|
int32_t |
remotePort, |
|
|
bool |
streamReset = false, |
|
|
int32_t |
prMethod = 0, |
|
|
uint32_t |
numRequests = 0 |
|
) |
| |
Active OPEN to the given remote socket.
246 EV_INFO <<
"Connect: call bind first\n";
251 throw cRuntimeError(
"SctpSocket::connect(): connect() or listen() already called");
254 throw cRuntimeError(
"SctpSocket::connect(): one-to-many style socket must be listening");
260 auto openCmd = cmsg->addTag<SctpOpenReq>();
266 EV_INFO <<
"Socket connect. Assoc=" << openCmd->getSocketId() <<
", sockstate=" <<
stateName(
sockstate) <<
"\n";
274 openCmd->setNumRequests(numRequests);
275 openCmd->setPrMethod(prMethod);
276 openCmd->setStreamReset(streamReset);
Referenced by inet::SctpClient::connect(), inet::SctpPeer::connect(), and connectx().
◆ connectx()
| void inet::SctpSocket::connectx |
( |
AddressVector |
remoteAddresses, |
|
|
int32_t |
remotePort, |
|
|
bool |
streamReset = false, |
|
|
int32_t |
prMethod = 0, |
|
|
uint32_t |
numRequests = 0 |
|
) |
| |
Active OPEN to the given remote socket.
The current implementation just calls connect() with the first address of the given list. This behaviour may be improved in the future.
352 connect(remoteAddressList.front(), remotePort, streamReset, prMethod, numRequests);
Referenced by inet::NetPerfMeter::establishConnection().
◆ destroy()
| void inet::SctpSocket::destroy |
( |
| ) |
|
|
overridevirtual |
Notify the protocol that the owner of ISocket has destroyed the socket.
Typically used when the owner of ISocket has crashed.
Implements inet::ISocket.
423 EV <<
"SctpSocket::destroy()\n";
426 auto cmd = msg->addTag<SctpCommandReq>();
◆ getAssocMaxRtx()
| int inet::SctpSocket::getAssocMaxRtx |
( |
| ) |
|
|
inline |
◆ getFragPoint()
| int inet::SctpSocket::getFragPoint |
( |
| ) |
|
|
inline |
◆ getInboundStreams()
| int inet::SctpSocket::getInboundStreams |
( |
| ) |
|
|
inline |
◆ getLastStream()
| int inet::SctpSocket::getLastStream |
( |
| ) |
|
|
inline |
◆ getLocalAddresses()
◆ getLocalPort()
| int inet::SctpSocket::getLocalPort |
( |
| ) |
const |
|
inline |
◆ getMaxBurst()
| int inet::SctpSocket::getMaxBurst |
( |
| ) |
|
|
inline |
◆ getMaxInitRetrans()
| int inet::SctpSocket::getMaxInitRetrans |
( |
| ) |
|
|
inline |
◆ getMaxInitRetransTimeout()
| int inet::SctpSocket::getMaxInitRetransTimeout |
( |
| ) |
|
|
inline |
◆ getNewAssocId()
| static int32_t inet::SctpSocket::getNewAssocId |
( |
| ) |
|
|
inlinestatic |
◆ getOutboundStreams()
| int inet::SctpSocket::getOutboundStreams |
( |
| ) |
|
|
inline |
◆ getRemoteAddr()
| L3Address inet::SctpSocket::getRemoteAddr |
( |
| ) |
const |
|
inline |
◆ getRemoteAddresses()
◆ getRemotePort()
| int inet::SctpSocket::getRemotePort |
( |
| ) |
const |
|
inline |
◆ getRtoInitial()
| double inet::SctpSocket::getRtoInitial |
( |
| ) |
|
|
inline |
◆ getSocketId()
| int inet::SctpSocket::getSocketId |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the internal connection Id.
SCTP uses the (gate index, assocId) pair to identify the connection when it receives a command from the application (or SctpSocket).
Implements inet::ISocket.
Referenced by belongsToSocket(), inet::SctpPeer::connect(), processMessage(), SctpSocket(), inet::SctpClient::sendQueueRequest(), inet::SctpPeer::sendQueueRequest(), inet::SctpClient::sendStreamResetNotification(), inet::SctpClient::setPrimaryPath(), inet::SctpClient::shutdownReceivedArrived(), inet::SctpPeer::shutdownReceivedArrived(), and inet::SctpNatPeer::shutdownReceivedArrived().
◆ getSocketOptions()
| void inet::SctpSocket::getSocketOptions |
( |
| ) |
|
134 EV_INFO <<
"getSocketOptions\n";
136 auto sctpSendReq = cmsg->addTag<SctpSendReq>();
137 sctpSendReq->setSocketId(
assocId);
138 sctpSendReq->setSid(0);
Referenced by bind(), and bindx().
◆ getState()
| int inet::SctpSocket::getState |
( |
| ) |
const |
|
inline |
◆ getStreamReset()
| bool inet::SctpSocket::getStreamReset |
( |
| ) |
|
|
inline |
◆ getTunInterface()
| int inet::SctpSocket::getTunInterface |
( |
| ) |
|
|
inline |
◆ getUserData()
| void* inet::SctpSocket::getUserData |
( |
| ) |
const |
|
inline |
◆ isOpen()
| bool inet::SctpSocket::isOpen |
( |
| ) |
const |
|
overridevirtual |
◆ listen() [1/2]
| void inet::SctpSocket::listen |
( |
bool |
fork = true, |
|
|
bool |
streamReset = false, |
|
|
uint32_t |
requests = 0, |
|
|
uint32_t |
messagesToPush = 0 |
|
) |
| |
Initiates passive OPEN.
If fork=true, you'll have to create a new SctpSocket object for each incoming connection, and this socket will keep listening on the port. If fork=false, the first incoming connection will be accepted, and SCTP will refuse subsequent ones. See SctpOpenCommand documentation (neddoc) for more info.
187 "SctpSocket::listen(): must call bind() before listen()" :
188 "SctpSocket::listen(): connect() or listen() already called");
191 auto openCmd = cmsg->addTag<SctpOpenReq>();
198 openCmd->setFork(fork);
202 openCmd->setNumRequests(requests);
203 openCmd->setStreamReset(reset);
204 openCmd->setMessagesToPush(messagesToPush);
206 EV_INFO <<
"Assoc " << openCmd->getSocketId() <<
": PassiveOPEN to SCTP from SctpSocket:listen()\n";
Referenced by inet::NetPerfMeter::createAndBindSocket(), inet::SctpServer::initialize(), and inet::SctpPeer::initialize().
◆ listen() [2/2]
| void inet::SctpSocket::listen |
( |
uint32_t |
requests = 0, |
|
|
bool |
fork = false, |
|
|
uint32_t |
messagesToPush = 0, |
|
|
bool |
options = false, |
|
|
int32_t |
fd = -1 |
|
) |
| |
215 "SctpSocket::listen(): must call bind() before listen()" :
216 "SctpSocket::listen(): connect() or listen() already called");
219 auto openCmd = cmsg->addTag<SctpOpenReq>();
226 openCmd->setFork(fork);
230 openCmd->setNumRequests(requests);
231 openCmd->setMessagesToPush(messagesToPush);
234 EV_INFO <<
"Assoc " << openCmd->getSocketId() <<
": PassiveOPEN to SCTP from SctpSocket:listen2()\n";
236 cmsg->setContextPointer((
void *)
sOptions);
◆ processMessage()
| void inet::SctpSocket::processMessage |
( |
cMessage * |
msg | ) |
|
|
overridevirtual |
Examines the message (which should have arrived from SctpMain), updates socket state, and if there is a callback object installed (see setCallback(), class CallbackInterface), dispatches to the appropriate method.
The method deletes the message, unless (1) there is a callback object installed AND (2) the message is payload (message kind SCTP_I_DATA or SCTP_I_URGENT_DATA) when the responsibility of destruction is on the socketDataArrived() callback method.
IMPORTANT: for performance reasons, this method doesn't check that the message belongs to this socket, i.e. belongsToSocket(msg) would return true!
Implements inet::ISocket.
463 switch (msg->getKind()) {
465 EV_INFO <<
"SCTP_I_DATA\n";
473 EV_INFO <<
"SCTP_I_NOTIFICATION\n";
486 auto indication = check_and_cast<Indication *>(msg);
490 int newSocketId = indication->getTag<SctpAvailableReq>()->getNewSocketId();
498 EV_INFO <<
"SCTP_I_ESTABLISHED\n";
501 auto indication = check_and_cast<Indication *>(msg);
502 auto connectInfo = indication->getTag<SctpConnectReq>();
505 localPrt = connectInfo->getLocalPort();
506 remotePrt = connectInfo->getRemotePort();
520 EV_INFO <<
"peer closed\n";
533 EV_INFO <<
"SCTP_I_CLOSED called\n";
551 auto *message = check_and_cast<Indication *>(msg);
552 auto status = message->getTagForUpdate<SctpStatusReq>();
567 EV_INFO <<
"SCTP_I_SHUTDOWN_RECEIVED\n";
581 auto&
tags = check_and_cast<ITaggedObject *>(msg)->getTags();
582 auto cmd =
tags.getTag<SctpCommandReq>();
595 auto *indication = check_and_cast<Indication *>(msg);
604 EV_INFO <<
"SCTP_I_ADDRESS_ADDED\n";
605 auto&
tags = check_and_cast<ITaggedObject *>(msg)->getTags();
606 auto cmd =
tags.getTag<SctpCommandReq>();
615 throw cRuntimeError(
"SctpSocket::processMessage(): invalid msg kind %d, one of the SCTP_I_xxx constants expected", msg->getKind());
Referenced by inet::SctpClient::handleMessage(), and inet::SctpPeer::handleMessage().
◆ requestStatus()
| void inet::SctpSocket::requestStatus |
( |
| ) |
|
Causes SCTP to reply with a fresh SctpStatusInfo, attached to a dummy message as controlInfo().
The reply message can be recognized by its message kind SCTP_I_STATUS, or (if a callback object is used) the socketStatusArrived() method of the callback object will be called.
445 auto cmd = msg->addTag<SctpCommandReq>();
◆ send()
| void inet::SctpSocket::send |
( |
Packet * |
packet | ) |
|
|
overridevirtual |
◆ sendNotification()
| void inet::SctpSocket::sendNotification |
( |
cMessage * |
msg | ) |
|
◆ sendRequest()
| void inet::SctpSocket::sendRequest |
( |
cMessage * |
msg | ) |
|
◆ sendToSctp()
| void inet::SctpSocket::sendToSctp |
( |
cMessage * |
msg | ) |
|
|
protected |
121 throw cRuntimeError(
"SctpSocket::sendToSctp(): setOutputGate() must be invoked before socket can be used");
122 EV_INFO <<
"sendToSctp SocketId is set to " <<
assocId << endl;
123 auto&
tags = check_and_cast<ITaggedObject *>(msg)->getTags();
Referenced by abort(), accept(), close(), connect(), destroy(), getSocketOptions(), listen(), requestStatus(), send(), sendNotification(), sendRequest(), setRtoInfo(), setStreamPriority(), and shutdown().
◆ setAppLimited()
| void inet::SctpSocket::setAppLimited |
( |
bool |
option | ) |
|
|
inline |
◆ setAssocMaxRtx()
| void inet::SctpSocket::setAssocMaxRtx |
( |
int |
option | ) |
|
|
inline |
◆ setCallback()
| void inet::SctpSocket::setCallback |
( |
ICallback * |
cb | ) |
|
Sets a callback object, to be used with processMessage().
This callback object may be your simple module itself (if it multiply inherits from CallbackInterface too, that is you declared it as
class MyAppModule : public cSimpleModule, public SctpSocket::CallbackInterface
and redefined the necessary virtual functions; or you may use dedicated class (and objects) for this purpose.
SctpSocket doesn't delete the callback object in the destructor or on any other occasion.
Referenced by inet::SctpClient::initialize(), and inet::SctpPeer::initialize().
◆ setEnableHeartbeats()
| void inet::SctpSocket::setEnableHeartbeats |
( |
bool |
option | ) |
|
|
inline |
◆ setFragPoint()
| void inet::SctpSocket::setFragPoint |
( |
int |
option | ) |
|
|
inline |
◆ setHbInterval()
| void inet::SctpSocket::setHbInterval |
( |
double |
option | ) |
|
|
inline |
◆ setInboundStreams()
| void inet::SctpSocket::setInboundStreams |
( |
int |
streams | ) |
|
|
inline |
◆ setMaxBurst()
| void inet::SctpSocket::setMaxBurst |
( |
int |
option | ) |
|
|
inline |
◆ setMaxInitRetrans()
| void inet::SctpSocket::setMaxInitRetrans |
( |
int |
option | ) |
|
|
inline |
◆ setMaxInitRetransTimeout()
| void inet::SctpSocket::setMaxInitRetransTimeout |
( |
int |
option | ) |
|
|
inline |
◆ setNagle()
| void inet::SctpSocket::setNagle |
( |
int |
option | ) |
|
|
inline |
◆ setOutboundStreams()
| void inet::SctpSocket::setOutboundStreams |
( |
int |
streams | ) |
|
|
inline |
◆ setOutputGate()
| void inet::SctpSocket::setOutputGate |
( |
cGate * |
toSctp | ) |
|
|
inline |
◆ setPathMaxRetrans()
| void inet::SctpSocket::setPathMaxRetrans |
( |
int |
option | ) |
|
|
inline |
◆ setRtoInfo()
| void inet::SctpSocket::setRtoInfo |
( |
double |
initial, |
|
|
double |
max, |
|
|
double |
min |
|
) |
| |
637 auto cmd = msg->addTag<SctpRtoReq>();
639 cmd->setRtoInitial(initial);
◆ setRtoInitial()
| void inet::SctpSocket::setRtoInitial |
( |
double |
option | ) |
|
|
inline |
◆ setRtoMax()
| void inet::SctpSocket::setRtoMax |
( |
double |
option | ) |
|
|
inline |
◆ setRtoMin()
| void inet::SctpSocket::setRtoMin |
( |
double |
option | ) |
|
|
inline |
◆ setSackFrequency()
| void inet::SctpSocket::setSackFrequency |
( |
int |
option | ) |
|
|
inline |
◆ setSackPeriod()
| void inet::SctpSocket::setSackPeriod |
( |
double |
option | ) |
|
|
inline |
◆ setState()
| void inet::SctpSocket::setState |
( |
int |
state | ) |
|
|
inline |
◆ setStreamPriority()
| void inet::SctpSocket::setStreamPriority |
( |
uint32_t |
stream, |
|
|
uint32_t |
priority |
|
) |
| |
◆ setStreamReset()
| void inet::SctpSocket::setStreamReset |
( |
int |
option | ) |
|
|
inline |
◆ setTunInterface()
| void inet::SctpSocket::setTunInterface |
( |
int |
id | ) |
|
|
inline |
◆ setUserData()
| void inet::SctpSocket::setUserData |
( |
void * |
userData | ) |
|
|
inline |
◆ setUserOptions()
◆ shutdown()
| void inet::SctpSocket::shutdown |
( |
int |
id = -1 | ) |
|
◆ stateName()
| const char * inet::SctpSocket::stateName |
( |
int |
state | ) |
|
|
static |
◆ appLimited
| bool inet::SctpSocket::appLimited |
|
protected |
◆ appOptions
◆ assocId
| int inet::SctpSocket::assocId |
|
protected |
Referenced by abort(), belongsToSocket(), close(), connect(), destroy(), getSocketOptions(), listen(), processMessage(), requestStatus(), SctpSocket(), send(), sendToSctp(), setRtoInfo(), setStreamPriority(), and shutdown().
◆ cb
◆ fsmStatus
| int inet::SctpSocket::fsmStatus |
|
protected |
◆ gateToSctp
| cGate* inet::SctpSocket::gateToSctp |
◆ interfaceIdToTun
| int inet::SctpSocket::interfaceIdToTun = -1 |
◆ lastStream
| int inet::SctpSocket::lastStream |
|
protected |
◆ localAddr
◆ localAddresses
◆ localPrt
| int inet::SctpSocket::localPrt |
|
protected |
◆ nextAssocId
| int32_t inet::SctpSocket::nextAssocId = 0 |
|
staticprotected |
◆ oneToOne
| bool inet::SctpSocket::oneToOne |
|
protected |
◆ remoteAddr
◆ remoteAddresses
◆ remotePrt
| int inet::SctpSocket::remotePrt |
|
protected |
◆ sockstate
| int inet::SctpSocket::sockstate |
|
protected |
Referenced by abort(), bind(), bindx(), close(), connect(), connectx(), isOpen(), listen(), processMessage(), SctpSocket(), sendNotification(), and setRtoInfo().
◆ sOptions
◆ userData
| void* inet::SctpSocket::userData |
|
protected |
The documentation for this class was generated from the following files:
@ SCTP_I_RCV_STREAMS_RESETTED
Definition: SctpCommand_m.h:214
bool appLimited
Definition: SctpSocket.h:87
@ SCTP_I_SENDSOCKETOPTIONS
Definition: SctpCommand_m.h:217
SocketOptions * sOptions
Definition: SctpSocket.h:100
double hbInterval
Definition: SctpSocket.h:37
virtual void socketAvailable(SctpSocket *socket, Indication *indication)=0
cGate * gateToSctp
Definition: SctpSocket.h:110
@ SCTP_I_CLOSED
Definition: SctpCommand_m.h:201
@ SCTP_C_OPEN_PASSIVE
Definition: SctpCommand_m.h:131
int getSocketId() const override
Returns the internal connection Id.
Definition: SctpSocket.h:138
@ SCTP_I_SENDQUEUE_FULL
Definition: SctpCommand_m.h:210
@ CONNECTED
Definition: SctpSocket.h:80
@ SCTP_I_RESET_REQUEST_FAILED
Definition: SctpCommand_m.h:215
int fragPoint
Definition: SctpSocket.h:33
@ SCTP_I_SENDQUEUE_ABATED
Definition: SctpCommand_m.h:211
int fsmStatus
Definition: SctpSocket.h:96
double min(const double a, const double b)
Returns the minimum of a and b.
Definition: SctpAssociation.h:261
virtual void socketDataArrived(SctpSocket *socket, Packet *packet, bool urgent)=0
removed InterfaceReq
Definition: IUdp-gates.txt:11
int assocMaxRtx
Definition: SctpSocket.h:38
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
virtual void sendqueueAbatedArrived(SctpSocket *socket, unsigned long int buffer)
Definition: SctpSocket.h:76
@ SCTP_C_SEND
Definition: SctpCommand_m.h:132
static int32_t getNewAssocId()
Generates a new integer, to be used as assocId.
Definition: SctpSocket.h:144
@ SCTP_I_CONN_LOST
Definition: SctpCommand_m.h:207
@ SCTP_C_SHUTDOWN
Definition: SctpCommand_m.h:142
int maxInitRetransTimeout
Definition: SctpSocket.h:26
@ SCTP_I_SEND_STREAMS_RESETTED
Definition: SctpCommand_m.h:213
@ SCTP_C_STATUS
Definition: SctpCommand_m.h:135
@ SCTP_I_CONNECTION_REFUSED
Definition: SctpCommand_m.h:202
int interfaceIdToTun
Definition: SctpSocket.h:111
@ SCTP_C_ACCEPT_SOCKET_ID
Definition: SctpCommand_m.h:153
void acceptSocket(int newSockId)
Definition: SctpSocket.cc:339
@ NOT_BOUND
Definition: SctpSocket.h:80
virtual void socketOptionsArrived(SctpSocket *socket, Indication *indication)
Definition: SctpSocket.h:65
virtual void msgAbandonedArrived(SctpSocket *socket)
Definition: SctpSocket.h:73
@ SCTP_I_DATA
Definition: SctpCommand_m.h:197
@ SCTP_C_ABORT
Definition: SctpCommand_m.h:134
static const char * stateName(int state)
Returns name of socket state code returned by state().
Definition: SctpSocket.cc:99
@ SCTP_I_ESTABLISHED
Definition: SctpCommand_m.h:199
L3Address localAddr
Definition: SctpSocket.h:89
value< double, units::s > s
Definition: Units.h:1235
int nagle
Definition: SctpSocket.h:34
@ SCTP_I_CONNECTION_RESET
Definition: SctpCommand_m.h:203
@ LOCALLY_CLOSED
Definition: SctpSocket.h:80
@ SCTP_C_GETSOCKETOPTIONS
Definition: SctpCommand_m.h:150
@ SCTP_C_DESTROY
Definition: SctpCommand_m.h:154
virtual void socketEstablished(SctpSocket *socket, unsigned long int buffer)
Definition: SctpSocket.h:66
@ SCTP_I_SHUTDOWN_RECEIVED
Definition: SctpCommand_m.h:209
int remotePrt
Definition: SctpSocket.h:95
@ SCTP_I_PEER_CLOSED
Definition: SctpCommand_m.h:200
@ SCTP_C_ASSOCIATE
Definition: SctpCommand_m.h:130
void sendToSctp(cMessage *msg)
Definition: SctpSocket.cc:118
double rtoMin
Definition: SctpSocket.h:28
removed type
Definition: IUdp-gates.txt:7
int pathMaxRetrans
Definition: SctpSocket.h:36
virtual void close() override
Close the socket.
Definition: SctpSocket.h:290
@ CLOSED
Definition: SctpSocket.h:80
virtual void sendRequestArrived(SctpSocket *socket)
Definition: SctpSocket.h:72
@ SCTP_C_SET_RTO_INFO
Definition: SctpCommand_m.h:152
@ SCTP_I_DATA_NOTIFICATION
Definition: SctpCommand_m.h:198
@ SCTP_I_STATUS
Definition: SctpCommand_m.h:205
AddressVector localAddresses
Definition: SctpSocket.h:90
double sackPeriod
Definition: SctpSocket.h:31
virtual void socketDeleted(SctpSocket *socket)
Definition: SctpSocket.h:71
double max(const double a, const double b)
Returns the maximum of a and b.
Definition: SctpAssociation.h:266
virtual void sendqueueFullArrived(SctpSocket *socket)
Definition: SctpSocket.h:75
virtual void socketDataNotificationArrived(SctpSocket *socket, Message *msg)=0
@ SCTP_I_TIMED_OUT
Definition: SctpCommand_m.h:204
int maxInitRetrans
Definition: SctpSocket.h:25
int assocId
Definition: SctpSocket.h:83
int sackFrequency
Definition: SctpSocket.h:30
virtual void socketPeerClosed(SctpSocket *socket)
Definition: SctpSocket.h:67
@ SCTP_C_SET_STREAM_PRIO
Definition: SctpCommand_m.h:149
void connect(L3Address remoteAddress, int32_t remotePort, bool streamReset=false, int32_t prMethod=0, uint32_t numRequests=0)
Active OPEN to the given remote socket.
Definition: SctpSocket.cc:241
bool enableHeartbeats
Definition: SctpSocket.h:35
int localPrt
Definition: SctpSocket.h:92
@ CONNECTING
Definition: SctpSocket.h:80
virtual void socketClosed(SctpSocket *socket)
Definition: SctpSocket.h:68
@ SCTP_I_ABORT
Definition: SctpCommand_m.h:206
static const Protocol sctp
Definition: Protocol.h:108
int sockstate
Definition: SctpSocket.h:85
@ LISTENING
Definition: SctpSocket.h:80
@ SCTP_I_SEND_MSG
Definition: SctpCommand_m.h:208
ICallback * cb
Definition: SctpSocket.h:103
* tags
Definition: IUdp-gates.txt:3
int lastStream
Definition: SctpSocket.h:97
L3Address remoteAddr
Definition: SctpSocket.h:93
@ SCTP_I_ABANDONED
Definition: SctpCommand_m.h:212
void * userData
Definition: SctpSocket.h:104
int maxBurst
Definition: SctpSocket.h:32
int outboundStreams
Definition: SctpSocket.h:44
bool streamReset
Definition: SctpSocket.h:45
virtual void socketStatusArrived(SctpSocket *socket, SctpStatusReq *status)
Definition: SctpSocket.h:70
@ SCTP_C_ACCEPT
Definition: SctpCommand_m.h:151
AddressVector remoteAddresses
Definition: SctpSocket.h:94
void bind(int localPort)
Bind the socket to a local port number.
Definition: SctpSocket.cc:142
bool oneToOne
Definition: SctpSocket.h:86
@ SCTP_C_CLOSE
Definition: SctpCommand_m.h:133
@ SCTP_I_ADDRESS_ADDED
Definition: SctpCommand_m.h:216
@ SOCKERROR
Definition: SctpSocket.h:80
@ PEER_CLOSED
Definition: SctpSocket.h:80
AppSocketOptions * appOptions
Definition: SctpSocket.h:101
void getSocketOptions()
Definition: SctpSocket.cc:132
virtual void addressAddedArrived(SctpSocket *socket, L3Address localAddr, L3Address remoteAddr)
Definition: SctpSocket.h:77
@ SCTP_I_AVAILABLE
Definition: SctpCommand_m.h:218
double rtoMax
Definition: SctpSocket.h:29
double rtoInitial
Definition: SctpSocket.h:27
virtual void socketFailure(SctpSocket *socket, int code)
Definition: SctpSocket.h:69
int inboundStreams
Definition: SctpSocket.h:43
virtual void shutdownReceivedArrived(SctpSocket *socket)
Definition: SctpSocket.h:74