Create a packet of the connection under studies in respect with the quantity of packets already generated.
[rp,p,pi]=NARVAL_I_StudyConnection(rp,nd,nf,cs,ct,pi)
packet manager.
source node.
destination node.
connection size.
connection type.
packet index.
packet.
NARVAL_I_StudyConnection creates the packet of index pi inside the connection under studies. rp corresponds to the packet manager. nd is the connection source node. nf represents the connection target node. cs represents the connection type as 0 for UDP, 1 for TCP and 2 for MPTCP.
[path]=NARVAL_F_NARVALPath();//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]=NARVAL_F_Random_i_j(n);//generation of connection extreme nodes L=1000;//network square area side t=1;//current time [probroute]=NARVAL_I_StartRouteProb(rt1,rt2,rt3,rt4,rt5,pt,n,L);//initialization of the route manager network=NARVAL_I_EmptyBufferNet(n,bs);//initialization of the reception network matrix networks=NARVAL_I_EmptyBufferNet(n,bs);//initialization of the emission network matrix tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix rp=NARVAL_I_EmptyPacketMan(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; rtmin=1; rtmax=50; [swi,rti]=NARVAL_I_TcpStartPar(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]=NARVAL_I_StudyConnection(rp,nd,nf,cs,ct,pi);//application of NARVAL_I_StudyConnection rp(1:2,:)//new state of the packet manager p//packet to send pi//new index [rp,p,pi]=NARVAL_I_StudyConnection(rp,nd,nf,cs,ct,pi);//application of NARVAL_I_StudyConnection rp(1:2,:)//new state of the packet manager p//packet to send pi//new index | ![]() | ![]() |