Perform the displacement of a UDP packet inside a reception network.
[Net,R] = NL_I_PacketUDPIntraNet(I,P,Net,R)
Node index.
UDP packet.
Network matrix.
Packet manager.
NL_I_PacketUDPIntraNet performs the displacement of the UDP packet P towards the buffer of the node I of the reception network Net. R corresponds to the packet manager.
[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 ct=0;//connection type selection index: creation of UDP connections swmin=1;//initial sliding window rtmin=1;//initial retransmission time rtmax=50;//maximal retransmission time pr=0.90;//probability threshold [swi,rti]=NL_I_TCPNetworkInit(n,swmin,rtmin);//initialization of the TCP parameters for each node [networks,rp]=NL_I_ConnectionManager(nd,n,bs,cpmax,networks,rp,ct,pr);//generation of connections [swi,rti,network,networks,rp]=NL_I_Emission2Reception(swi,rti,rtmax,network,networks,n,bs,rp,t,probroute);//emission of packets on the reception network ind=find(network(:,$) <> 0);//UDP packets present on the network i=ind(1);//selection of the first one p=network(i,1);//first packet r=rp(p,$);//route followed by this packet path=NL_R_PathERT(evstr('rt'+string(r)),rp(p,2),rp(p,3),n);//path extraction i//initial values p//packet index path//path cack=0.8; closs=0.8; network(i,:) [j,ack]=NL_I_PathNextNode(i,path);//calculation of the next node where the packet should be transmitted j//node where the packet should be propagated [network,rp]=NL_I_PacketUDPIntraNet(j,p,network,rp);//application of NL_I_PacketUDPIntraNet network(j,:)//buffer of the node j | ![]() | ![]() |