<< NL_I_ShowTrafficChange NL_I: Internet NL_I_TCPNetworkInit >>

NARVAL >> NL_I: Internet > NL_I_TCPInterNetworks

NL_I_TCPInterNetworks

Perform the displacement of a TCP packet from an emission network matrix towards a reception network matrix.

Calling Sequence

[Net,Nets,Pm,Sw,Rt] = NL_I_TCPInterNetworks(I,P,B,Net,Nets,Pm,T,Sw,Rt,RtM)

Arguments

I :

Node index.

P :

TCP packet.

B :

Buffer size.

Net :

Reception network matrix.

Nets :

Emission network matrix.

:

Packet manager.

T :

Current time.

:

Sliding window of each network node.

:

Retransmission time of each network node.

:

Maximum value of the retransmission time parameter.

Description

NL_I_TCPInterNetworks performs the displacement of the TCP packet already located inside the buffer of the node I of the emission network Nets towards the reception network Net. gathers the sliding window of each network node. provides the retransmission time of each network node. corresponds to the maximal retransmission time. represents the packet manager. T is the current time.

Examples

[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=1;//connection type selection index: creation of TCP connections
swmin=1;//initial sliding window
rtmin=1;//initial retransmission time
rtmax=50;//maximal retransmission time
p=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,p);//Generation of connections
ind=find(networks(:,$) <> 0);//location of nodes where connections have been created
i=ind(1);//first node of ind
p=networks(i,1);//its first packet
[network,networks,rp,swi,rti]=NL_I_TCPInterNetworks(i,p,bs,network,networks,rp,t,swi,rti,rtmax);//application of NL_I_TCPInterNetworks  
networks(i,:)
network(i,:)

Dependency

NL_I_NodeBufferExtract

Report an issue
<< NL_I_ShowTrafficChange NL_I: Internet NL_I_TCPNetworkInit >>