9 |
10 | // opp_msgc version check
11 | #define MSGC_VERSION 0x0403
12 | #if (MSGC_VERSION!=OMNETPP_VERSION)
13 | # error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
14 | #endif
15 |
16 | // cplusplus {{
17 | #include "DCN_IPPacket.h"
18 | // }}
19 |
20 |
21 |
22 | /**
23 | * Class generated from model/packets/DCN_TCPPacket.msg by opp_msgc.
24 | *
25 | * packet DCN_TCPPacket extends DCN_IPPacket
26 | * {
27 | * @customize(true);
28 | * kind enum(DCN_EthPacketType) = DCN_TCP_PACKET;
29 | * transportProtocol = IP_PROT_TCP;
30 | * }
31 | *
32 | *
33 | * DCN_TCPPacket_Base is only useful if it gets subclassed, and DCN_TCPPacket is derived from it.
34 | * The minimum code to be written for DCN_TCPPacket is the following:
35 | *
36 | *
37 | * class DCN_TCPPacket : public DCN_TCPPacket_Base
38 | * {
39 | * private:
40 | * void copy(const DCN_TCPPacket& other) { ... }
41 |
42 | * public:
43 | * DCN_TCPPacket(const char *name=NULL, int kind=0) : DCN_TCPPacket_Base(name,kind) {}
44 | * DCN_TCPPacket(const DCN_TCPPacket& other) : DCN_TCPPacket_Base(other) {copy(other);}
45 | * DCN_TCPPacket& operator=(const DCN_TCPPacket& other) {if (this==&other) return *this; DCN_TCPPacket_Base::operator=(other); copy(other); return *this;}
46 | * virtual DCN_TCPPacket *dup() const {return new DCN_TCPPacket(*this);}
47 | * // ADD CODE HERE to redefine and implement pure virtual functions from DCN_TCPPacket_Base
48 | * };
49 | *
50 | *
51 | * The following should go into a .cc (.cpp) file:
52 | *
53 | *
54 | * Register_Class(DCN_TCPPacket);
55 | *
56 | */
57 | class DCN_TCPPacket_Base : public ::DCN_IPPacket
58 | {
59 | protected:
60 |
61 | private:
62 | void copy(const DCN_TCPPacket_Base& other);
63 |
64 | protected:
65 | // protected and unimplemented operator==(), to prevent accidental usage
66 | bool operator==(const DCN_TCPPacket_Base&);
67 | // make constructors protected to avoid instantiation
68 | DCN_TCPPacket_Base(const char *name=NULL, int kind=0);
69 | DCN_TCPPacket_Base(const DCN_TCPPacket_Base& other);
70 | // make assignment operator protected to force the user override it
71 | DCN_TCPPacket_Base& operator=(const DCN_TCPPacket_Base& other);
72 |
73 | public:
74 | virtual ~DCN_TCPPacket_Base();
75 | virtual DCN_TCPPacket_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class DCN_TCPPacket");}
76 | virtual void parsimPack(cCommBuffer *b);
77 | virtual void parsimUnpack(cCommBuffer *b);
78 |
79 | // field getter/setter methods
80 | };
81 |
82 |
83 | #endif // _DCN_TCPPACKET_M_H_
84 |
--------------------------------------------------------------------------------
/src/model/common/ServerStream.ned:
--------------------------------------------------------------------------------
1 | //
2 | // This program is free software: you can redistribute it and/or modify
3 | // it under the terms of the GNU Lesser General Public License as published by
4 | // the Free Software Foundation, either version 3 of the License, or
5 | // (at your option) any later version.
6 | //
7 | // This program is distributed in the hope that it will be useful,
8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | // GNU Lesser General Public License for more details.
11 | //
12 | // You should have received a copy of the GNU Lesser General Public License
13 | // along with this program. If not, see http://www.gnu.org/licenses/.
14 | //
15 |
16 | package datacenter.model.common;
17 |
18 | simple Stream
19 | {
20 | parameters:
21 | @class(Stream);
22 | double simTimeLimit @unit(s) = default(0s); // This limit is ignored if set to 0
23 | bool emitStatsOnGlobalSignal = default(false); // added for BklgSchedApplication
24 | }
25 |
26 | simple SendStream extends Stream
27 | {
28 | parameters:
29 | @class(SendStream);
30 | @signal[streamTxBytes](type="long");
31 | @signal[streamPktPath](type="long");
32 | @signal[txTimestamp](type="simtime_t");
33 | @signal[txPacketPtr](type="cPacket*"); // Used by MAAdjustRateToThreshold
34 | @statistic[streamTxBytes](title="Bytes sent in the stream"; unit=bytes; record=vector?,sum?; interpolationmode=none);
35 | @statistic[streamPktPath](title="Paths taken by packets in this stream";record=histogram?);
36 | @statistic[txTimestamp](title="timestamp of packet sent";unit=s;record=vector?,count?,sum?,stats?;interpolationmode=none);
37 | }
38 |
39 | simple ReceiveStream extends Stream
40 | {
41 | parameters:
42 | @class(ReceiveStream);
43 | @signal[streamRxBytes](type="long");
44 | @signal[streamRxLatency](type="simtime_t");
45 | @signal[outOfOrderArrival](type="simtime_t");
46 | @signal[streamPktPath](type="long");
47 | @signal[pktSeqNo](type="long");
48 | @signal[rxTimestamp](type="simtime_t");
49 | @signal[rxPacketPtr](type="cPacket*"); // Used by MAAdjustRateToThreshold
50 | @statistic[streamRxBytes](title="Bytes received in the stream"; unit=bytes; record=vector?,sum?; interpolationmode=none);
51 | @statistic[streamRxLatency](title="received packet latency";unit=s;record=vector?,stats?);
52 | @statistic[outOfOrderArrival](title="the amount of time a packet is out-of-order by"; unit=s;record=vector?,stats?);
53 | @statistic[streamPktPath](title="Paths taken by packets in this stream";record=histogram?);
54 | @statistic[pktSeqNo](title="sequence no of received packet";record=vector?,count?,sum?,stats?;interpolationmode=none);
55 | @statistic[rxTimestamp](title="timestamp of received packet";unit=s;record=vector?,count?,sum?,stats?;interpolationmode=none);
56 | }
57 |
--------------------------------------------------------------------------------
/src/model/networks/testNetworks/PacketSizeTest.ned.renamed_to_avoid_warnings:
--------------------------------------------------------------------------------
1 | //
2 | // This program is free software: you can redistribute it and/or modify
3 | // it under the terms of the GNU Lesser General Public License as published by
4 | // the Free Software Foundation, either version 3 of the License, or
5 | // (at your option) any later version.
6 | //
7 | // This program is distributed in the hope that it will be useful,
8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | // GNU Lesser General Public License for more details.
11 | //
12 | // You should have received a copy of the GNU Lesser General Public License
13 | // along with this program. If not, see http://www.gnu.org/licenses/.
14 | //
15 |
16 | package datacenter.model.networks.testNetworks;
17 | import datacenter.model.node.server.Server;
18 | import datacenter.model.common.L2Queue;
19 | import ned.DatarateChannel;
20 |
21 | network PacketSizeTest
22 | {
23 | parameters:
24 | // Need these parameters for the server's to work
25 | **.tree_depth = 1;
26 | **.int_switches = 0;
27 | **.int_switch_down_ports = 0;
28 | **.tor_switch_up_ports = 1;
29 | **.tor_switch_down_ports = 1;
30 | **.switch_up_ports = 0;
31 | **.switch_down_ports = 0;
32 | **.switch_switch_link_speed = 1000000000;
33 | **.server_switch_link_speed = 1000000000;
34 | **.numberOfPaths = 1;
35 |
36 | types:
37 | channel Link_1Gbps extends DatarateChannel
38 | {
39 | datarate = 1 Gbps;
40 | }
41 |
42 | submodules:
43 | Server_0: Server {
44 | parameters:
45 | address = 0;
46 | @display("p=100,100");
47 | gates:
48 | }
49 | Server_1: Server {
50 | parameters:
51 | address = 1;
52 | @display("p=300,100");
53 | gates:
54 | }
55 | queue: L2Queue {
56 | @display("p=200,100");
57 | @statistic[rxBytes](title="received packet byte length"; unit=bytes; record=vector,count,sum,histogram; interpolationmode=none);
58 | @statistic[txBytes](title="transmitting packet byte length"; unit=bytes; record=vector,count,sum,histogram; interpolationmode=none);
59 | @statistic[qlenBytes](title="queue length (bytes)"; record=vector,timeavg,max; interpolationmode=sample-hold);
60 | @statistic[qlenPkts](title="queue length (pkts)"; record=vector,timeavg,max; interpolationmode=sample-hold);
61 | @statistic[drop](title="dropped packet byte length"; unit=bytes; record=vector,min,max,mean,count,sum; interpolationmode=none);
62 | }
63 |
64 | connections allowunconnected:
65 | Server_0.port$o --> Link_1Gbps --> queue.in;
66 | queue.line <--> Link_1Gbps <--> Server_1.port;
67 | }
68 |
--------------------------------------------------------------------------------
/src/model/node/resequencingLayer/HybridResequencer.h:
--------------------------------------------------------------------------------
1 | //
2 | // This program is free software: you can redistribute it and/or modify
3 | // it under the terms of the GNU Lesser General Public License as published by
4 | // the Free Software Foundation, either version 3 of the License, or
5 | // (at your option) any later version.
6 | //
7 | // This program is distributed in the hope that it will be useful,
8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | // GNU Lesser General Public License for more details.
11 | //
12 | // You should have received a copy of the GNU Lesser General Public License
13 | // along with this program. If not, see http://www.gnu.org/licenses/.
14 | //
15 |
16 | #ifndef HYBRIDRESEQUENCER_H_
17 | #define HYBRIDRESEQUENCER_H_
18 |
19 | #include