Create a packet of the connection under studies in respect with the quantity of packets already generated.
[R,P,Pi] = NL_I_Connection(R,I,J,S,T,Pi)
Packet manager.
Source node.
Destination node.
Connection size.
Connection type.
Packet index.
Packet.
NL_I_Connection creates the packet P of index inside the connection under studies. R corresponds to the packet manager. I is the connection source node. J represents the connection target node. S is the connection type as 0 for UDP, 1 for TCP and 2 for MPTCP.
[path]=NL_F_NLPath();//path to NARVAL module path=path+'/demos/';//folder path load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables load(path+'topo_100.graph','g');//loading of the network graph n=100;//network size bs=15;//constant buffer size [nd,nf]=NL_F_RandIntNiNj(n);//generation of connection extreme nodes L=1000;//network square area side t=1;//current time [probroute]=NL_I_RouteManagerInit(rt1,rt2,rt3,rt4,rt5,pt,n,L);//initialization of the route manager network=NL_I_NetworkMatrixInit(n,bs);//initialization of the reception network matrix networks=NL_I_NetworkMatrixInit(n,bs);//initialization of the emission network matrix tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix rp=NL_I_PacketManagerInit(tpmax);//initialization of the packet manager cpmax=5;//maximal quantity of packets per connection cs=1000;//connection size ct=1;//connection type: TCP swmin=1;//initial sliding window rtmin=1;//initial retransmission time rtmax=50;//maximal retransmission time [swi,rti]=NL_I_TCPNetworkInit(n,swmin,rtmin);//initialization of the TCP parameters for each node pi=1;//initialization of the connection packet index rp(1:2,:)//packet manager initial state [rp,p,pi]=NL_I_Connection(rp,nd,nf,cs,ct,pi);//application of NL_I_Connection rp(1:2,:)//new state of the packet manager p//packet to send pi//new index [rp,p,pi]=NL_I_Connection(rp,nd,nf,cs,ct,pi);//application of NL_I_Connection rp(1:2,:)//new state of the packet manager p//packet to send pi//new index | ![]() | ![]() |