|
INET Framework for OMNeT++/OMNEST
|
Implements the SCTP protocol.
More...
#include <Sctp.h>
|
| void | printInfoAssocMap () |
| |
| void | printVTagMap () |
| |
| void | removeAssociation (SctpAssociation *assoc) |
| |
| virtual | ~Sctp () |
| |
| virtual void | initialize (int stage) override |
| |
| virtual int | numInitStages () const override |
| |
| virtual void | handleMessage (cMessage *msg) override |
| |
| virtual void | finish () override |
| |
| virtual void | send_to_ip (Packet *msg) |
| |
| AssocStat * | getAssocStat (uint32_t assocId) |
| |
| void | updateSockPair (SctpAssociation *assoc, L3Address localAddr, L3Address remoteAddr, int32_t localPort, int32_t remotePort) |
| | To be called from SctpAssociation when socket pair changes. More...
|
| |
| void | addLocalAddress (SctpAssociation *assoc, L3Address address) |
| |
| void | addLocalAddressToAllRemoteAddresses (SctpAssociation *assoc, L3Address address, std::vector< L3Address > remAddresses) |
| |
| bool | addRemoteAddress (SctpAssociation *assoc, L3Address localAddress, L3Address remoteAddress) |
| |
| void | removeLocalAddressFromAllRemoteAddresses (SctpAssociation *assoc, L3Address address, std::vector< L3Address > remAddresses) |
| |
| void | removeRemoteAddressFromAllAssociations (SctpAssociation *assoc, L3Address address, std::vector< L3Address > locAddresses) |
| |
| void | addForkedAssociation (SctpAssociation *assoc, SctpAssociation *newAssoc, L3Address localAddr, L3Address remoteAddr, int32_t localPort, int32_t remotePort) |
| | Update assocs socket pair, and register newAssoc (which'll keep LISTENing). More...
|
| |
| uint16_t | getEphemeralPort () |
| | To be called from SctpAssociation: reserves an ephemeral port for the connection. More...
|
| |
| SctpAssociation * | getAssoc (int32_t assocId) |
| |
| SctpAssociation * | findAssocWithVTag (uint32_t peerVTag, uint32_t remotePort, uint32_t localPort) |
| |
| SctpAssociation * | findAssocForInitAck (SctpInitAckChunk *initack, L3Address srcAddr, L3Address destAddr, uint32_t srcPort, uint32_t destPort, bool findListen) |
| |
| SctpVTagMap | getVTagMap () |
| |
| void | bindPortForUDP () |
| |
| SocketOptions * | collectSocketOptions () |
| | Getter and Setter for the socket options. More...
|
| |
| void | setSocketOptions (SocketOptions *options) |
| |
| int | getMaxInitRetrans () |
| |
| int | getMaxInitRetransTimeout () |
| |
| double | getRtoInitial () |
| |
| double | getRtoMin () |
| |
| double | getRtoMax () |
| |
| int | getSackFrequency () |
| |
| double | getSackPeriod () |
| |
| int | getMaxBurst () |
| |
| int | getFragPoint () |
| |
| int | getNagle () |
| |
| bool | getEnableHeartbeats () |
| |
| int | getPathMaxRetrans () |
| |
| int | getAssocMaxRtx () |
| |
| double | getHbInterval () |
| |
| void | setRtoInitial (double rtoInitial) |
| |
| void | setRtoMin (double rtoMin) |
| |
| void | setRtoMax (double rtoMax) |
| |
| void | setInterfaceId (int id) |
| |
| int | getInterfaceId () |
| |
Implements the SCTP protocol.
This section describes the internal architecture of the SCTP model.
You may want to check the SCTPSocket class which makes it easier to use SCTP from applications.
The SCTP protocol implementation is composed of several classes (discussion follows below):
- SCTP: the module class
- SctpAssociation: manages an association
- SctpSendQueue, SctpReceiveQueue: abstract base classes for various types of send and receive queues
- SctpAlgorithm: abstract base class for SCTP algorithms
SCTP subclassed from cSimpleModule. It manages socketpair-to-association mapping, and dispatches segments and user commands to the appropriate SctpAssociation object.
SctpAssociation manages the association, with the help of other objects. SctpAssociation itself implements the basic SCTP "machinery": takes care of the state machine, stores the state variables (TCB), sends/receives etc.
SctpAssociation internally relies on 3 objects. The first two are subclassed from SctpSendQueue and SctpReceiveQueue. They manage the actual data stream, so SctpAssociation itself only works with sequence number variables. This makes it possible to easily accomodate need for various types of simulated data transfer: real byte stream, "virtual" bytes (byte counts only), and sequence of cMessage objects (where every message object is mapped to a SCTP sequence number range).
Currently implemented send queue and receive queue classes are SctpVirtualDataSendQueue and SctpVirtualDataRcvQueue which implement queues with "virtual" bytes (byte counts only).
The third object is subclassed from SctpAlgorithm. Control over retransmissions, congestion control and ACK sending are "outsourced" from SctpAssociation into SctpAlgorithm: delayed acks, slow start, fast rexmit, etc. are all implemented in SctpAlgorithm subclasses.
The concrete SctpAlgorithm class to use can be chosen per association (in OPEN) or in a module parameter.
◆ AssocStatMap
◆ SctpAppAssocMap
◆ SctpAssocMap
◆ SctpVTagMap
◆ ~Sctp()
| inet::sctp::Sctp::~Sctp |
( |
| ) |
|
|
virtual |
150 EV_DEBUG <<
"delete SctpMain\n";
156 EV_DEBUG <<
"clear assocStatMap ptr=" << &
assocStatMap <<
"\n";
162 EV_DEBUG <<
"after clearing maps\n";
◆ addForkedAssociation()
Update assocs socket pair, and register newAssoc (which'll keep LISTENing).
Also, assoc will get a new assocId (and newAssoc will live on with its old assocId).
810 EV_INFO <<
"addForkedConnection assocId=" << assoc->assocId <<
" newId=" << newAssoc->assocId <<
"\n";
813 if (assoc->assocId == elem.second->assocId) {
814 keyAssoc = elem.first;
820 ASSERT(found ==
true);
823 updateSockPair(assoc, localAddr, remoteAddr, localPort, remotePort);
824 updateSockPair(newAssoc, keyAssoc.localAddr, keyAssoc.remoteAddr, keyAssoc.localPort, keyAssoc.remotePort);
828 key.appGateIndex = assoc->appGateIndex;
829 key.assocId = assoc->assocId;
831 assoc->listeningAssocId = assoc->assocId;
833 EV_INFO <<
"id = " <<
id << endl;
834 key.assocId = assoc->assocId = id;
835 EV_INFO <<
"listeningAssocId set to " << assoc->listeningAssocId <<
" new assocId = " << assoc->assocId << endl;
839 key.appGateIndex = newAssoc->appGateIndex;
840 key.assocId = newAssoc->assocId;
Referenced by inet::sctp::SctpAssociation::processInitArrived().
◆ addLocalAddress()
681 key.localAddr = assoc->localAddr;
682 key.remoteAddr = assoc->remoteAddr;
683 key.localPort = assoc->localPort;
684 key.remotePort = assoc->remotePort;
688 ASSERT(i->second == assoc);
689 if (key.localAddr.isUnspecified()) {
695 EV_INFO <<
"no actual sockPair found\n";
696 key.localAddr = address;
699 EV_INFO <<
"addLocalAddress " << address <<
" number of connections now=" <<
sizeAssocMap <<
"\n";
Referenced by inet::sctp::SctpAssociation::processInitArrived(), and inet::sctp::SctpAssociation::sendInit().
◆ addLocalAddressToAllRemoteAddresses()
◆ addRemoteAddress()
◆ bindPortForUDP()
| void inet::sctp::Sctp::bindPortForUDP |
( |
| ) |
|
78 udpSockId = getEnvir()->getUniqueNumber();
◆ collectSocketOptions()
Getter and Setter for the socket options.
355 SocketOptions *sockOptions =
new SocketOptions();
356 sockOptions->maxInitRetrans = par(
"maxInitRetrans");
358 sockOptions->rtoInitial = par(
"rtoInitial");
359 sockOptions->rtoMin = par(
"rtoMin");
360 sockOptions->rtoMax = par(
"rtoMax");
361 sockOptions->sackFrequency = par(
"sackFrequency");
362 sockOptions->sackPeriod = par(
"sackPeriod");
363 sockOptions->maxBurst = par(
"maxBurst");
364 sockOptions->fragPoint = par(
"fragPoint");
365 sockOptions->nagle = par(
"nagleEnabled").boolValue() ? 1 : 0;
366 sockOptions->enableHeartbeats = par(
"enableHeartbeats");
367 sockOptions->pathMaxRetrans = par(
"pathMaxRetrans");
368 sockOptions->hbInterval = par(
"hbInterval");
369 sockOptions->assocMaxRtx = par(
"assocMaxRetrans");
Referenced by handleMessage().
◆ findAssocForApp()
| SctpAssociation * inet::sctp::Sctp::findAssocForApp |
( |
int32_t |
appGateIndex, |
|
|
int32_t |
assocId |
|
) |
| |
|
protected |
616 key.appGateIndex = appGateIndex;
617 key.assocId = assocId;
618 EV_INFO <<
"findAssoc for appGateIndex " << appGateIndex <<
" and assoc " << assocId <<
"\n";
Referenced by handleMessage().
◆ findAssocForFd()
| int32_t inet::sctp::Sctp::findAssocForFd |
( |
int32_t |
fd | ) |
|
|
protected |
625 SctpAssociation *assoc =
nullptr;
629 return assoc->assocId;
Referenced by handleMessage().
◆ findAssocForInitAck()
549 SctpAssociation *assoc =
nullptr;
550 int numberAddresses = initAckChunk->getAddressesArraySize();
551 for (int32_t j = 0; j < numberAddresses; j++) {
554 assoc =
findAssocForMessage(initAckChunk->getAddresses(j), destAddr, srcPort, destPort, findListen);
Referenced by handleMessage().
◆ findAssocForMessage()
566 key.localAddr = destAddr;
567 key.remoteAddr = srcAddr;
568 key.localPort = destPort;
569 key.remotePort = srcPort;
571 EV_DEBUG <<
"findAssocForMessage: srcAddr=" << destAddr <<
" destAddr=" << srcAddr <<
" srcPort=" << destPort <<
" destPort=" << srcPort <<
"\n";
580 key.localAddr = L3Address();
588 if (findListen ==
true) {
591 key.remoteAddr = L3Address();
600 key.localAddr = L3Address();
609 EV_INFO <<
"giving up on trying to find assoc for localAddr=" << srcAddr <<
" remoteAddr=" << destAddr <<
" localPort=" << srcPort <<
" remotePort=" << destPort <<
"\n";
Referenced by findAssocForInitAck(), and handleMessage().
◆ findAssocWithVTag()
| SctpAssociation * inet::sctp::Sctp::findAssocWithVTag |
( |
uint32_t |
peerVTag, |
|
|
uint32_t |
remotePort, |
|
|
uint32_t |
localPort |
|
) |
| |
533 EV_DEBUG <<
"findAssocWithVTag: peerVTag=" << peerVTag <<
" srcPort=" << remotePort <<
" destPort=" << localPort <<
"\n";
538 if ((elem.second.peerVTag == peerVTag && elem.second.localPort == localPort
539 && elem.second.remotePort == remotePort)
540 || (elem.second.localVTag == peerVTag && elem.second.localPort == localPort
541 && elem.second.remotePort == remotePort))
Referenced by handleMessage().
◆ finish()
| void inet::sctp::Sctp::finish |
( |
| ) |
|
|
overridevirtual |
984 EV_INFO << getFullPath() <<
": finishing SCTP with "
987 for (AssocStatMap::const_iterator iterator =
assocStatMap.begin();
990 const Sctp::AssocStat& assoc = iterator->second;
992 EV_DETAIL <<
"Association " << assoc.assocId <<
": started at " << assoc.start
993 <<
" and finished at " << assoc.stop <<
" --> lifetime: " << assoc.lifeTime << endl;
994 EV_DETAIL <<
"Association " << assoc.assocId <<
": sent bytes=" << assoc.sentBytes
995 <<
", acked bytes=" << assoc.ackedBytes <<
", throughput=" << assoc.throughput <<
" bit/s" << endl;
996 EV_DETAIL <<
"Association " << assoc.assocId <<
": transmitted Bytes="
997 << assoc.transmittedBytes <<
", retransmitted Bytes=" << assoc.transmittedBytes - assoc.ackedBytes << endl;
998 EV_DETAIL <<
"Association " << assoc.assocId <<
": number of Fast RTX="
999 << assoc.numFastRtx <<
", number of Timer-Based RTX=" << assoc.numT3Rtx
1000 <<
", path failures=" << assoc.numPathFailures <<
", ForwardTsns=" << assoc.numForwardTsn << endl;
1003 recordScalar(
"Association Lifetime", assoc.lifeTime);
1004 recordScalar(
"Acked Bytes", assoc.ackedBytes);
1005 recordScalar(
"Throughput [bit/s]", assoc.throughput);
1006 recordScalar(
"Transmitted Bytes", assoc.transmittedBytes);
1007 recordScalar(
"Fast RTX", assoc.numFastRtx);
1008 recordScalar(
"Timer-Based RTX", assoc.numT3Rtx);
1009 recordScalar(
"Duplicate Acks", assoc.numDups);
1012 recordScalar(
"Sum of R Gap Ranges", assoc.sumRGapRanges);
1013 recordScalar(
"Sum of NR Gap Ranges", assoc.sumNRGapRanges);
1014 recordScalar(
"Overfull SACKs", assoc.numOverfullSACKs);
1015 recordScalar(
"Drops Because New TSN Greater Than Highest TSN", assoc.numDropsBecauseNewTsnGreaterThanHighestTsn);
1016 recordScalar(
"Drops Because No Room In Buffer", assoc.numDropsBecauseNoRoomInBuffer);
1017 recordScalar(
"Chunks Reneged", assoc.numChunksReneged);
1019 recordScalar(
"Number of AUTH chunks sent", assoc.numAuthChunksSent);
1020 recordScalar(
"Number of AUTH chunks accepted", assoc.numAuthChunksAccepted);
1021 recordScalar(
"Number of AUTH chunks rejected", assoc.numAuthChunksRejected);
1022 recordScalar(
"Number of StreamReset requests sent", assoc.numResetRequestsSent);
1023 recordScalar(
"Number of StreamReset requests performed", assoc.numResetRequestsPerformed);
1024 if (par(
"fairStart").doubleValue() > 0.0) {
1025 recordScalar(
"fair acked bytes", assoc.fairAckedBytes);
1026 recordScalar(
"fair start time", assoc.fairStart);
1027 recordScalar(
"fair stop time", assoc.fairStop);
1028 recordScalar(
"fair lifetime", assoc.fairLifeTime);
1029 recordScalar(
"fair throughput", assoc.fairThroughput);
1033 if (assoc.numEndToEndMessages > 0 && (assoc.cumEndToEndDelay / assoc.numEndToEndMessages) > 0) {
1034 uint32_t msgnum = assoc.numEndToEndMessages - assoc.startEndToEndDelay;
1035 if (assoc.stopEndToEndDelay > 0)
1036 msgnum -= (assoc.numEndToEndMessages - assoc.stopEndToEndDelay);
1037 recordScalar(
"Average End to End Delay", assoc.cumEndToEndDelay / msgnum);
1040 recordScalar(
"RTXMethod", par(
"RTXMethod").intValue());
◆ getAssoc()
◆ getAssocMaxRtx()
| int inet::sctp::Sctp::getAssocMaxRtx |
( |
| ) |
|
|
inline |
◆ getAssocStat()
| AssocStat* inet::sctp::Sctp::getAssocStat |
( |
uint32_t |
assocId | ) |
|
|
inline |
◆ getEnableHeartbeats()
| bool inet::sctp::Sctp::getEnableHeartbeats |
( |
| ) |
|
|
inline |
◆ getEphemeralPort()
| uint16_t inet::sctp::Sctp::getEphemeralPort |
( |
| ) |
|
◆ getFragPoint()
| int inet::sctp::Sctp::getFragPoint |
( |
| ) |
|
|
inline |
◆ getHbInterval()
| double inet::sctp::Sctp::getHbInterval |
( |
| ) |
|
|
inline |
◆ getInterfaceId()
| int inet::sctp::Sctp::getInterfaceId |
( |
| ) |
|
|
inline |
◆ getMaxBurst()
| int inet::sctp::Sctp::getMaxBurst |
( |
| ) |
|
|
inline |
◆ getMaxInitRetrans()
| int inet::sctp::Sctp::getMaxInitRetrans |
( |
| ) |
|
|
inline |
◆ getMaxInitRetransTimeout()
| int inet::sctp::Sctp::getMaxInitRetransTimeout |
( |
| ) |
|
|
inline |
◆ getNagle()
| int inet::sctp::Sctp::getNagle |
( |
| ) |
|
|
inline |
◆ getPathMaxRetrans()
| int inet::sctp::Sctp::getPathMaxRetrans |
( |
| ) |
|
|
inline |
◆ getRtoInitial()
| double inet::sctp::Sctp::getRtoInitial |
( |
| ) |
|
|
inline |
◆ getRtoMax()
| double inet::sctp::Sctp::getRtoMax |
( |
| ) |
|
|
inline |
◆ getRtoMin()
| double inet::sctp::Sctp::getRtoMin |
( |
| ) |
|
|
inline |
◆ getSackFrequency()
| int inet::sctp::Sctp::getSackFrequency |
( |
| ) |
|
|
inline |
◆ getSackPeriod()
| double inet::sctp::Sctp::getSackPeriod |
( |
| ) |
|
|
inline |
◆ getVTagMap()
◆ handleMessage()
| void inet::sctp::Sctp::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overridevirtual |
169 bool findListen =
false;
171 EV_INFO <<
"\n\nSctpMain handleMessage at " << getFullPath() <<
"\n";
173 if (msg->isSelfMessage()) {
174 EV_DEBUG <<
"selfMessage\n";
176 SctpAssociation *assoc = (SctpAssociation *)msg->getContextPointer();
178 bool ret = assoc->processTimer(msg);
184 else if (msg->arrivedOn(
"ipIn")) {
185 EV_INFO <<
"Message from IP\n";
187 Packet *packet = check_and_cast<Packet *>(msg);
191 SctpHeader *sctpmsg = (packet->peekAtFront<SctpHeader>().get()->dup());
192 int chunkLength =
B(sctpmsg->getChunkLength()).get();
195 if (!
pktdrop && (packet->hasBitError())) {
196 EV_WARN <<
"Packet has bit-error. delete it\n";
203 if (
pktdrop && packet->hasBitError()) {
204 EV_WARN <<
"Packet has bit-error. Call Pktdrop\n";
207 srcAddr = packet->getTag<
L3AddressInd>()->getSrcAddress();
208 destAddr = packet->getTag<
L3AddressInd>()->getDestAddress();
209 EV_INFO <<
"srcAddr=" << srcAddr <<
" destAddr=" << destAddr <<
"\n";
211 if (((sctpmsg->getSctpChunks(0)))->getSctpChunkType() ==
INIT || ((sctpmsg->getSctpChunks(0)))->getSctpChunkType() ==
INIT_ACK)
214 SctpAssociation *assoc =
findAssocForMessage(srcAddr, destAddr, sctpmsg->getSrcPort(), sctpmsg->getDestPort(), findListen);
215 if (!assoc &&
sctpAssocMap.size() > 0 && (((sctpmsg->getSctpChunks(0)))->getSctpChunkType() ==
INIT_ACK)) {
216 SctpInitAckChunk *initack = check_and_cast<SctpInitAckChunk *>((SctpChunk *)(sctpmsg->getSctpChunks(0)));
217 assoc =
findAssocForInitAck(initack, srcAddr, destAddr, sctpmsg->getSrcPort(), sctpmsg->getDestPort(), findListen);
219 if (!assoc &&
sctpAssocMap.size() > 0 && (((sctpmsg->getSctpChunks(0)))->getSctpChunkType() ==
ERRORTYPE
220 || (sctpmsg->getSctpChunksArraySize() > 1 &&
221 (((sctpmsg->getSctpChunks(1)))->getSctpChunkType() ==
ASCONF || ((sctpmsg->getSctpChunks(1)))->getSctpChunkType() ==
ASCONF_ACK))))
223 assoc =
findAssocWithVTag(sctpmsg->getVTag(), sctpmsg->getSrcPort(), sctpmsg->getDestPort());
226 EV_INFO <<
"no assoc found msg=" << sctpmsg->getName() <<
"\n";
228 if (!
pktdrop && packet->hasBitError()) {
233 Ptr<SctpHeader> sctpmsgptr(sctpmsg);
234 if (((sctpmsg->getSctpChunks(0)))->getSctpChunkType() ==
SHUTDOWN_ACK)
236 else if (((sctpmsg->getSctpChunks(0)))->getSctpChunkType() !=
ABORT &&
244 EV_INFO <<
"assoc " << assoc->assocId <<
" found\n";
245 bool ret = assoc->processSctpMessage(sctpmsg, srcAddr, destAddr);
247 EV_DEBUG <<
"SctpMain:: removeAssociation \n";
262 EV_DEBUG <<
"must be from app\n";
263 auto&
tags = check_and_cast<ITaggedObject *>(msg)->getTags();
264 int32_t assocId =
tags.getTag<SocketReq>()->getSocketId();
265 EV_INFO <<
"assocId = " << assocId << endl;
267 auto controlInfo =
tags.getTag<SctpSendReq>();
269 auto indication = cmsg->addTag<SctpCommandReq>();
270 indication->setSocketId(controlInfo->getSocketId());
273 cmsg->addTag<SocketInd>()->setSocketId(assocId);
274 send(cmsg,
"appOut");
278 int32_t appGateIndex;
280 Ptr<const SctpCommandReq> controlInfo =
tags.findTag<SctpOpenReq>();
282 controlInfo =
tags.findTag<SctpSendReq>();
284 controlInfo =
tags.findTag<SctpCommandReq>();
286 controlInfo =
tags.findTag<SctpAvailableReq>();
288 controlInfo =
tags.findTag<SctpResetReq>();
290 controlInfo =
tags.findTag<SctpInfoReq>();
292 std::cout <<
"!!!!!!!!!Unknown Tag!!!!!!!!\n";
299 if (controlInfo->getGate() != -1)
300 appGateIndex = controlInfo->getGate();
302 appGateIndex = msg->getArrivalGate()->isVector() ? msg->getArrivalGate()->getIndex() : 0;
303 if (controlInfo && assocId == -1) {
304 fd = controlInfo->getFd();
307 EV_INFO <<
"msg arrived from app for assoc " << assocId <<
"\n";
311 EV_INFO <<
"no assoc found. msg=" << msg->getName() <<
" number of assocs = " <<
assocList.size() <<
"\n";
313 if (strcmp(msg->getName(),
"PassiveOPEN") == 0 || strcmp(msg->getName(),
"Associate") == 0) {
316 const auto& open =
tags.findTag<SctpOpenReq>();
317 EV_INFO <<
"Looking for assoc with remoteAddr=" << open->getRemoteAddr() <<
", remotePort=" << open->getRemotePort() <<
", localPort=" << open->getLocalPort() <<
"\n";
319 EV_DETAIL <<
"remoteAddr=" << (elem)->remoteAddr <<
", remotePort=" << (elem)->remotePort <<
", localPort=" << (elem)->localPort <<
"\n";
320 if ((elem)->remoteAddr == open->getRemoteAddr() && (elem)->localPort == open->getLocalPort() && (elem)->remotePort == open->getRemotePort()) {
326 if (
assocList.size() == 0 || assoc ==
nullptr) {
327 assoc =
new SctpAssociation(
this, appGateIndex, assocId,
rt,
ift);
330 key.appGateIndex = appGateIndex;
331 key.assocId = assocId;
333 EV_INFO <<
"SCTP association created for appGateIndex " << appGateIndex <<
" and assoc " << assocId <<
"\n";
334 bool ret = assoc->processAppCommand(msg,
const_cast<SctpCommandReq *
>(controlInfo.get()));
342 EV_INFO <<
"assoc found\n";
343 bool ret = assoc->processAppCommand(msg,
const_cast<SctpCommandReq *
>(controlInfo.get()));
◆ initialize()
| void inet::sctp::Sctp::initialize |
( |
int |
stage | ) |
|
|
overridevirtual |
85 cSimpleModule::initialize(stage);
88 ift.reference(
this,
"interfaceTableModule",
true);
89 rt.reference(
this,
"routingTableModule",
true);
99 cModule *netw = getSimulation()->getSystemModule();
100 if (netw->hasPar(
"testTimeout")) {
103 const char *crcModeString = par(
"crcMode");
110 cModuleType *moduleType = cModuleType::get(
"inet.transportlayer.sctp.SctpCrcInsertion");
111 auto crcInsertion = check_and_cast<SctpCrcInsertion *>(moduleType->create(
"crcInsertion",
this));
112 crcInsertion->finalizeParameters();
113 crcInsertion->callInitialize();
114 crcInsertion->setCrcMode(
crcMode);
116 #ifdef INET_WITH_IPv4
117 auto ipv4 =
dynamic_cast<INetfilter *
>(findModuleByPath(
"^.ipv4.ip"));
118 if (ipv4 !=
nullptr) {
119 ipv4->registerHook(0, crcInsertion);
122 #ifdef INET_WITH_IPv6
123 auto ipv6 =
dynamic_cast<INetfilter *
>(findModuleByPath(
"^.ipv6.ipv6"));
125 ipv6->registerHook(0, crcInsertion);
128 if (par(
"udpEncapsEnabled")) {
129 EV_INFO <<
"udpEncapsEnabled" << endl;
130 cModuleType *moduleType = cModuleType::get(
"inet.transportlayer.sctp.SctpUdpHook");
131 auto udpHook = check_and_cast<SctpUdpHook *>(moduleType->create(
"udpHook",
this));
132 udpHook->finalizeParameters();
133 udpHook->callInitialize();
134 #ifdef INET_WITH_IPv4
135 auto ipv4 =
dynamic_cast<INetfilter *
>(findModuleByPath(
"^.ipv4.ip"));
137 ipv4->registerHook(0, udpHook);
139 #ifdef INET_WITH_IPv6
140 auto ipv6 =
dynamic_cast<INetfilter *
>(findModuleByPath(
"^.ipv6.ipv6"));
142 ipv6->registerHook(0, udpHook);
◆ numInitStages()
| virtual int inet::sctp::Sctp::numInitStages |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ printInfoAssocMap()
| void inet::sctp::Sctp::printInfoAssocMap |
( |
| ) |
|
39 SctpAssociation *assoc;
41 EV_DETAIL <<
"Number of Assocs: " <<
sizeAssocMap <<
"\n";
47 EV_DETAIL <<
"assocId: " << assoc->assocId <<
" src: " << key.localAddr <<
" dst: " << key.remoteAddr <<
" lPort: " << key.localPort <<
" rPort: " << key.remotePort <<
" fd: " << assoc->fd <<
"\n";
Referenced by addForkedAssociation(), addLocalAddress(), addLocalAddressToAllRemoteAddresses(), addRemoteAddress(), inet::sctp::SctpAssociation::cloneAssociation(), findAssocForMessage(), findAssocWithVTag(), handleMessage(), removeAssociation(), removeLocalAddressFromAllRemoteAddresses(), removeRemoteAddressFromAllAssociations(), inet::sctp::SctpAssociation::sendInit(), and updateSockPair().
◆ printVTagMap()
| void inet::sctp::Sctp::printVTagMap |
( |
| ) |
|
58 EV_DETAIL <<
"Number of Assocs: " <<
sctpVTagMap.size() <<
"\n";
64 EV_DETAIL <<
"assocId: " << assocId <<
" peerVTag: " << key.peerVTag
65 <<
" localVTag: " << key.localVTag
66 <<
" localPort: " << key.localPort <<
" rPort: " << key.remotePort <<
"\n";
Referenced by findAssocWithVTag().
◆ refreshDisplay()
| void inet::sctp::Sctp::refreshDisplay |
( |
| ) |
const |
|
overrideprotectedvirtual |
450 if (getEnvir()->disable_tracing) {
453 getDisplayString().setTagArg(
"t", 0,
"");
461 int32_t numCLOSED = 0, numLISTEN = 0, numSYN_SENT = 0, numSYN_RCVD = 0,
462 numESTABLISHED = 0, numCLOSE_WAIT = 0, numLAST_ACK = 0, numFIN_WAIT_1 = 0,
463 numFIN_WAIT_2 = 0, numCLOSING = 0, numTIME_WAIT = 0;
465 for (
auto i = sctpAppConnMap.begin(); i != sctpAppConnMap.end(); ++i) {
466 int32_t state = (*i).second->getFsmState();
505 sprintf(buf2 + strlen(buf2),
"closed:%d ", numCLOSED);
507 sprintf(buf2 + strlen(buf2),
"listen:%d ", numLISTEN);
509 sprintf(buf2 + strlen(buf2),
"syn_sent:%d ", numSYN_SENT);
511 sprintf(buf2 + strlen(buf2),
"syn_rcvd:%d ", numSYN_RCVD);
512 if (numESTABLISHED > 0)
513 sprintf(buf2 + strlen(buf2),
"estab:%d ", numESTABLISHED);
514 if (numCLOSE_WAIT > 0)
515 sprintf(buf2 + strlen(buf2),
"close_wait:%d ", numCLOSE_WAIT);
517 sprintf(buf2 + strlen(buf2),
"last_ack:%d ", numLAST_ACK);
518 if (numFIN_WAIT_1 > 0)
519 sprintf(buf2 + strlen(buf2),
"fin_wait_1:%d ", numFIN_WAIT_1);
520 if (numFIN_WAIT_2 > 0)
521 sprintf(buf2 + strlen(buf2),
"fin_wait_2:%d ", numFIN_WAIT_2);
523 sprintf(buf2 + strlen(buf2),
"closing:%d ", numCLOSING);
524 if (numTIME_WAIT > 0)
525 sprintf(buf2 + strlen(buf2),
"time_wait:%d ", numTIME_WAIT);
526 getDisplayString().setTagArg(
"t", 0, buf2);
◆ removeAssociation()
850 const int32_t
id = assoc->assocId;
852 EV_INFO <<
"Deleting SCTP connection " << assoc <<
" id= " <<
id << endl;
856 auto assocStatMapIterator =
assocStatMap.find(assoc->assocId);
858 assocStatMapIterator->second.stop = simTime();
859 assocStatMapIterator->second.lifeTime = assocStatMapIterator->second.stop - assocStatMapIterator->second.start;
860 assocStatMapIterator->second.throughput = assocStatMapIterator->second.ackedBytes * 8 / assocStatMapIterator->second.lifeTime.dbl();
868 sctpAssocMapIterator !=
sctpAssocMap.end(); sctpAssocMapIterator++)
870 if (sctpAssocMapIterator->second !=
nullptr) {
871 SctpAssociation *myAssoc = sctpAssocMapIterator->second;
872 if (myAssoc->assocId == assoc->assocId) {
873 if (myAssoc->T1_InitTimer) {
874 myAssoc->stopTimer(myAssoc->T1_InitTimer);
876 if (myAssoc->T2_ShutdownTimer) {
877 myAssoc->stopTimer(myAssoc->T2_ShutdownTimer);
879 if (myAssoc->T5_ShutdownGuardTimer) {
880 myAssoc->stopTimer(myAssoc->T5_ShutdownGuardTimer);
882 if (myAssoc->SackTimer) {
883 myAssoc->stopTimer(myAssoc->SackTimer);
885 if (myAssoc->StartAddIP) {
886 myAssoc->stopTimer(myAssoc->StartAddIP);
907 for (
auto pathMapIterator = assoc->sctpPathMap.begin();
908 pathMapIterator != assoc->sctpPathMap.end(); pathMapIterator++)
910 const SctpPathVariables *path = pathMapIterator->second;
911 snprintf(str,
sizeof(str),
"Number of Fast Retransmissions %d:%s",
912 assoc->assocId, path->remoteAddress.str().c_str());
913 recordScalar(str, path->numberOfFastRetransmissions);
914 snprintf(str,
sizeof(str),
"Number of Timer-Based Retransmissions %d:%s",
915 assoc->assocId, path->remoteAddress.str().c_str());
916 recordScalar(str, path->numberOfTimerBasedRetransmissions);
917 snprintf(str,
sizeof(str),
"Number of Heartbeats Sent %d:%s",
918 assoc->assocId, path->remoteAddress.str().c_str());
919 recordScalar(str, path->numberOfHeartbeatsSent);
920 snprintf(str,
sizeof(str),
"Number of Heartbeats Received %d:%s",
921 assoc->assocId, path->remoteAddress.str().c_str());
922 recordScalar(str, path->numberOfHeartbeatsRcvd);
923 snprintf(str,
sizeof(str),
"Number of Heartbeat ACKs Sent %d:%s",
924 assoc->assocId, path->remoteAddress.str().c_str());
925 recordScalar(str, path->numberOfHeartbeatAcksSent);
926 snprintf(str,
sizeof(str),
"Number of Heartbeat ACKs Received %d:%s",
927 assoc->assocId, path->remoteAddress.str().c_str());
928 recordScalar(str, path->numberOfHeartbeatAcksRcvd);
929 snprintf(str,
sizeof(str),
"Number of Duplicates %d:%s",
930 assoc->assocId, path->remoteAddress.str().c_str());
931 recordScalar(str, path->numberOfDuplicates);
932 snprintf(str,
sizeof(str),
"Number of Bytes received from %d:%s",
933 assoc->assocId, path->remoteAddress.str().c_str());
934 recordScalar(str, path->numberOfBytesReceived);
936 for (uint16_t i = 0; i < assoc->inboundStreams; i++) {
937 snprintf(str,
sizeof(str),
"Bytes received on stream %d of assoc %d",
939 recordScalar(str, assoc->getState()->streamThroughput[i]);
941 recordScalar(
"Blocking TSNs Moved", assoc->state->blockingTsnsMoved);
944 assoc->deleteStreams();
948 for (
auto i = assoc->getRetransmissionQueue()->payloadQueue.begin();
949 i != assoc->getRetransmissionQueue()->payloadQueue.end(); i++)
951 auto j = assoc->getTransmissionQueue()->payloadQueue.find(i->second->tsn);
952 if (j != assoc->getTransmissionQueue()->payloadQueue.end()) {
953 assoc->getTransmissionQueue()->payloadQueue.erase(j);
957 delete assoc->getRetransmissionQueue();
958 delete assoc->getTransmissionQueue();
961 key.appGateIndex = assoc->appGateIndex;
962 key.assocId = assoc->assocId;
Referenced by finish(), handleMessage(), inet::sctp::SctpAssociation::process_RCV_Message(), inet::sctp::SctpAssociation::process_TIMEOUT_HEARTBEAT(), inet::sctp::SctpAssociation::process_TIMEOUT_RTX(), inet::sctp::SctpAssociation::process_TIMEOUT_SHUTDOWN(), inet::sctp::SctpAssociation::processTimer(), and inet::sctp::SctpAssociation::updateCounters().
◆ removeLocalAddressFromAllRemoteAddresses()
739 for (
auto& remAddresse : remAddresses) {
740 key.localAddr = address;
741 key.remoteAddr = (remAddresse);
742 key.localPort = assoc->localPort;
743 key.remotePort = assoc->remotePort;
747 ASSERT(j->second == assoc);
752 EV_INFO <<
"no actual sockPair found\n";
Referenced by inet::sctp::SctpAssociation::processAsconfAckArrived().
◆ removeRemoteAddressFromAllAssociations()
762 for (
auto& locAddresse : locAddresses) {
763 key.localAddr = (locAddresse);
764 key.remoteAddr = address;
765 key.localPort = assoc->localPort;
766 key.remotePort = assoc->remotePort;
770 ASSERT(j->second == assoc);
775 EV_INFO <<
"no actual sockPair found\n";
Referenced by inet::sctp::SctpAssociation::processAsconfArrived().
◆ send_to_ip()
| void inet::sctp::Sctp::send_to_ip |
( |
Packet * |
msg | ) |
|
|
virtual |
◆ sendAbortFromMain()
375 const auto& msg = makeShared<SctpHeader>();
377 EV_DEBUG <<
"\n\nSctp::sendAbortFromMain()\n";
379 msg->setSrcPort(sctpmsg->getDestPort());
380 msg->setDestPort(sctpmsg->getSrcPort());
384 msg->setChecksumOk(
true);
386 SctpAbortChunk *abortChunk =
new SctpAbortChunk();
387 abortChunk->setSctpChunkType(
ABORT);
388 if (sctpmsg->getSctpChunksArraySize() > 0 && ((sctpmsg->getSctpChunks(0)))->getSctpChunkType() ==
INIT) {
389 const SctpInitChunk *initChunk = check_and_cast<const SctpInitChunk *>(sctpmsg->getSctpChunks(0));
390 abortChunk->setT_Bit(0);
391 msg->setVTag(initChunk->getInitTag());
394 abortChunk->setT_Bit(1);
395 msg->setVTag(sctpmsg->getVTag());
398 msg->appendSctpChunks(abortChunk);
399 Packet *pkt =
new Packet(
"ABORT");
401 auto addresses = pkt->addTag<L3AddressReq>();
402 addresses->setSrcAddress(fromAddr);
403 addresses->setDestAddress(toAddr);
404 IL3AddressType *addressType = toAddr.getAddressType();
Referenced by handleMessage().
◆ sendShutdownCompleteFromMain()
412 const auto& msg = makeShared<SctpHeader>();
414 EV_DEBUG <<
"\n\nSCTP:sendShutdownCompleteFromMain \n";
416 msg->setSrcPort(sctpmsg->getDestPort());
417 msg->setDestPort(sctpmsg->getSrcPort());
421 msg->setChecksumOk(
true);
423 SctpShutdownCompleteChunk *scChunk =
new SctpShutdownCompleteChunk();
426 msg->setVTag(sctpmsg->getVTag());
429 msg->appendSctpChunks(scChunk);
431 Packet *pkt =
new Packet(
"SHUTDOWN_COMPLETE");
432 auto addresses = pkt->addTag<L3AddressReq>();
433 addresses->setSrcAddress(fromAddr);
434 addresses->setDestAddress(toAddr);
435 IL3AddressType *addressType = toAddr.getAddressType();
Referenced by handleMessage().
◆ setInterfaceId()
| void inet::sctp::Sctp::setInterfaceId |
( |
int |
id | ) |
|
|
inline |
◆ setRtoInitial()
| void inet::sctp::Sctp::setRtoInitial |
( |
double |
rtoInitial | ) |
|
|
inline |
◆ setRtoMax()
| void inet::sctp::Sctp::setRtoMax |
( |
double |
rtoMax | ) |
|
|
inline |
◆ setRtoMin()
| void inet::sctp::Sctp::setRtoMin |
( |
double |
rtoMin | ) |
|
|
inline |
◆ setSocketOptions()
| void inet::sctp::Sctp::setSocketOptions |
( |
SocketOptions * |
options | ) |
|
|
inline |
◆ updateSockPair()
To be called from SctpAssociation when socket pair changes.
645 EV_INFO <<
"updateSockPair: localAddr: " << localAddr <<
" remoteAddr=" << remoteAddr <<
" localPort=" << localPort <<
" remotePort=" << remotePort <<
"\n";
647 key.localAddr = (assoc->localAddr = localAddr);
648 key.remoteAddr = (assoc->remoteAddr = remoteAddr);
649 key.localPort = assoc->localPort = localPort;
650 key.remotePort = assoc->remotePort = remotePort;
654 if (elem.second == assoc &&
655 elem.first.localAddr == key.localAddr &&
656 elem.first.remoteAddr == key.remoteAddr &&
657 elem.first.localPort == key.localPort
658 && elem.first.remotePort == key.remotePort)
663 if (i->second == assoc) {
669 EV_INFO <<
"updateSockPair assoc=" << assoc->assocId <<
" localAddr=" << key.localAddr <<
" remoteAddr=" << key.remoteAddr <<
" localPort=" << key.localPort <<
" remotePort=" << remotePort <<
"\n";
673 EV_DEBUG <<
"assoc inserted in sctpAssocMap\n";
Referenced by addForkedAssociation(), inet::sctp::SctpAssociation::process_ASSOCIATE(), inet::sctp::SctpAssociation::process_OPEN_PASSIVE(), and inet::sctp::SctpAssociation::processInitArrived().
◆ addIP
| bool inet::sctp::Sctp::addIP |
◆ assocList
◆ assocStatMap
Referenced by inet::sctp::SctpAssociation::addAuthChunkIfNecessary(), inet::sctp::SctpAssociation::createForwardTsnChunk(), inet::sctp::SctpAssociation::createSack(), finish(), inet::sctp::SctpAssociation::makeRoomForTsn(), inet::sctp::SctpAssociation::pathStatusIndication(), inet::sctp::SctpAssociation::process_RCV_Message(), inet::sctp::SctpAssociation::process_SEND(), inet::sctp::SctpAssociation::process_TIMEOUT_RTX(), inet::sctp::SctpAssociation::processAddInAndOutResetRequestArrived(), inet::sctp::SctpAssociation::processAsconfArrived(), inet::sctp::SctpAssociation::processDataArrived(), inet::sctp::SctpAssociation::processOutAndResponseArrived(), inet::sctp::SctpAssociation::processResetResponseArrived(), inet::sctp::SctpAssociation::processTimer(), inet::sctp::SctpAssociation::pushUlp(), removeAssociation(), inet::sctp::SctpAssociation::retransmitAsconf(), inet::sctp::SctpAssociation::retransmitCookieEcho(), inet::sctp::SctpAssociation::sendAbort(), inet::sctp::SctpAssociation::sendAddOutgoingStreamsRequest(), inet::sctp::SctpAssociation::sendAsconf(), inet::sctp::SctpAssociation::sendAsconfAck(), inet::sctp::SctpAssociation::sendCookieAck(), inet::sctp::SctpAssociation::sendCookieEcho(), inet::sctp::SctpAssociation::sendHeartbeat(), inet::sctp::SctpAssociation::sendHeartbeatAck(), inet::sctp::SctpAssociation::sendInvalidStreamError(), inet::sctp::SctpAssociation::sendOnPath(), inet::sctp::SctpAssociation::sendOutgoingRequestAndResponse(), inet::sctp::SctpAssociation::sendSack(), inet::sctp::SctpAssociation::sendShutdown(), inet::sctp::SctpAssociation::sendStreamResetRequest(), inet::sctp::SctpAssociation::stateEntered(), and ~Sctp().
◆ auth
| bool inet::sctp::Sctp::auth |
◆ crcMode
◆ ift
◆ interfaceId
| int inet::sctp::Sctp::interfaceId = -1 |
◆ nextEphemeralPort
| uint16_t inet::sctp::Sctp::nextEphemeralPort |
|
protected |
◆ numGapReports
| uint32_t inet::sctp::Sctp::numGapReports |
◆ numPacketsDropped
| uint32_t inet::sctp::Sctp::numPacketsDropped |
◆ numPacketsReceived
| uint32_t inet::sctp::Sctp::numPacketsReceived |
◆ numPktDropReports
| uint64_t inet::sctp::Sctp::numPktDropReports |
◆ pktdrop
| bool inet::sctp::Sctp::pktdrop |
◆ rt
◆ sackNow
| bool inet::sctp::Sctp::sackNow |
◆ sctpAppAssocMap
◆ sctpAssocMap
Referenced by addForkedAssociation(), addLocalAddress(), addLocalAddressToAllRemoteAddresses(), addRemoteAddress(), findAssocForMessage(), finish(), handleMessage(), printInfoAssocMap(), removeAssociation(), removeLocalAddressFromAllRemoteAddresses(), removeRemoteAddressFromAllAssociations(), and updateSockPair().
◆ sctpVTagMap
◆ sizeAssocMap
| int32_t inet::sctp::Sctp::sizeAssocMap |
|
protected |
◆ socketOptions
◆ testTimeout
| simtime_t inet::sctp::Sctp::testTimeout |
◆ udpSocket
◆ udpSockId
| int inet::sctp::Sctp::udpSockId |
The documentation for this class was generated from the following files:
void setOutputGate(cGate *toUdp)
Sets the gate on which to send to UDP.
Definition: UdpSocket.h:117
@ SCTP_S_SHUTDOWN_PENDING
Definition: SctpAssociation.h:51
@ SCTP_I_SENDSOCKETOPTIONS
Definition: SctpCommand_m.h:217
double hbInterval
Definition: SctpSocket.h:37
uint64_t numPktDropReports
Definition: Sctp.h:204
int udpSockId
Definition: Sctp.h:172
@ SCTP_S_ESTABLISHED
Definition: SctpAssociation.h:50
UdpSocket udpSocket
Definition: Sctp.h:171
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25
int32_t sizeAssocMap
Definition: Sctp.h:180
@ SCTP_S_SHUTDOWN_RECEIVED
Definition: SctpAssociation.h:53
void printVTagMap()
Definition: Sctp.cc:54
simtime_t testTimeout
Definition: Sctp.h:196
uint32_t numPacketsReceived
Definition: Sctp.h:198
int fragPoint
Definition: SctpSocket.h:33
void printInfoAssocMap()
Definition: Sctp.cc:37
SctpAssocMap sctpAssocMap
Definition: Sctp.h:168
void sendAbortFromMain(Ptr< SctpHeader > &sctpMsg, L3Address fromAddr, L3Address toAddr)
Definition: Sctp.cc:373
@ CRC_COMPUTED
Definition: CrcMode_m.h:59
int assocMaxRtx
Definition: SctpSocket.h:38
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
static int32_t getNewAssocId()
Generates a new integer, to be used as assocId.
Definition: SctpSocket.h:144
std::vector< T >::iterator find(std::vector< T > &v, const Tk &a)
Definition: stlutils.h:44
int maxInitRetransTimeout
Definition: SctpSocket.h:26
CrcMode parseCrcMode(const char *crcModeString, bool allowDisable)
Definition: CrcMode.cc:14
@ ASCONF
Definition: SctpAssociation.h:121
#define SCTP_TIMEOUT_INIT_REXMIT_MAX
Definition: SctpAssociation.h:238
AssocStatMap assocStatMap
Definition: Sctp.h:160
@ ABORT
Definition: SctpAssociation.h:108
void registerService(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a service primitive (SDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:14
ModuleRefByPar< IInterfaceTable > ift
Definition: Sctp.h:178
#define SCTP_UDP_PORT
Definition: Sctp.h:31
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
SctpAssociation * findAssocForMessage(L3Address srcAddr, L3Address destAddr, uint32_t srcPort, uint32_t destPort, bool findListen)
Definition: Sctp.cc:562
int interfaceId
Definition: Sctp.h:205
@ SCTP_S_SHUTDOWN_SENT
Definition: SctpAssociation.h:52
@ ASCONF_ACK
Definition: SctpAssociation.h:117
#define SCTP_COMMON_HEADER
Definition: SctpAssociation.h:203
intscale< b, 1, 8 > B
Definition: Units.h:1168
uint16_t nextEphemeralPort
Definition: Sctp.h:182
int nagle
Definition: SctpSocket.h:34
CrcMode crcMode
Definition: Sctp.h:206
SocketOptions * collectSocketOptions()
Getter and Setter for the socket options.
Definition: Sctp.cc:353
@ SHUTDOWN_ACK
Definition: SctpAssociation.h:110
@ SCTP_C_GETSOCKETOPTIONS
Definition: SctpCommand_m.h:150
@ INIT
Definition: SctpAssociation.h:103
void insertTransportProtocolHeader(Packet *packet, const Protocol &protocol, const Ptr< TransportHeaderBase > &header)
Definition: L4Tools.cc:77
double rtoMin
Definition: SctpSocket.h:28
INET_API InitStage INITSTAGE_TRANSPORT_LAYER
Initialization of transport-layer protocols.
int pathMaxRetrans
Definition: SctpSocket.h:36
SocketOptions * socketOptions
Definition: Sctp.h:174
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
@ SCTP_S_COOKIE_ECHOED
Definition: SctpAssociation.h:49
SctpAppAssocMap sctpAppAssocMap
Definition: Sctp.h:167
value< int64_t, units::b > b
Definition: Units.h:1241
void removeAssociation(SctpAssociation *assoc)
Definition: Sctp.cc:846
int32_t findAssocForFd(int32_t fd)
Definition: Sctp.cc:623
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
SctpVTagMap sctpVTagMap
Definition: Sctp.h:162
#define SCTP_ABORT_CHUNK_LENGTH
Definition: SctpAssociation.h:209
double sackPeriod
Definition: SctpSocket.h:31
@ SCTP_S_SHUTDOWN_ACK_SENT
Definition: SctpAssociation.h:54
@ SCTP_S_COOKIE_WAIT
Definition: SctpAssociation.h:48
SctpAssociation * findAssocForApp(int32_t appGateIndex, int32_t assocId)
Definition: Sctp.cc:613
int maxInitRetrans
Definition: SctpSocket.h:25
@ ERRORTYPE
Definition: SctpAssociation.h:111
int sackFrequency
Definition: SctpSocket.h:30
bool auth
Definition: Sctp.h:200
@ SCTP_S_CLOSED
Definition: SctpAssociation.h:47
@ IPv6
Definition: L3Address.h:36
bool enableHeartbeats
Definition: SctpSocket.h:35
SctpAssociation * findAssocWithVTag(uint32_t peerVTag, uint32_t remotePort, uint32_t localPort)
Definition: Sctp.cc:530
static const Protocol sctp
Definition: Protocol.h:108
bool pktdrop
Definition: Sctp.h:202
* tags
Definition: IUdp-gates.txt:3
bool sackNow
Definition: Sctp.h:203
SctpAssociation * getAssoc(int32_t assocId)
Definition: Sctp.cc:968
void updateSockPair(SctpAssociation *assoc, L3Address localAddr, L3Address remoteAddr, int32_t localPort, int32_t remotePort)
To be called from SctpAssociation when socket pair changes.
Definition: Sctp.cc:642
SctpAssociation * findAssocForInitAck(SctpInitAckChunk *initack, L3Address srcAddr, L3Address destAddr, uint32_t srcPort, uint32_t destPort, bool findListen)
Definition: Sctp.cc:547
int maxBurst
Definition: SctpSocket.h:32
uint32_t numPacketsDropped
Definition: Sctp.h:199
std::list< SctpAssociation * > assocList
Definition: Sctp.h:169
@ INIT_ACK
Definition: SctpAssociation.h:104
#define SCTP_SHUTDOWN_ACK_LENGTH
Definition: SctpAssociation.h:213
void registerProtocol(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a protocol primitive (PDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:83
int getSocketId() const override
Returns the internal socket Id.
Definition: UdpSocket.h:108
virtual void send_to_ip(Packet *msg)
Definition: Sctp.cc:441
@ SHUTDOWN_COMPLETE
Definition: SctpAssociation.h:114
void sendShutdownCompleteFromMain(Ptr< SctpHeader > &sctpMsg, L3Address fromAddr, L3Address toAddr)
Definition: Sctp.cc:410
double rtoMax
Definition: SctpSocket.h:29
ModuleRefByPar< IRoutingTable > rt
Definition: Sctp.h:177
double rtoInitial
Definition: SctpSocket.h:27