<< NL_I_PacketUDPIntraNet NL_I: Internet NL_I_PacketsLocation >>

NARVAL >> NL_I: Internet > NL_I_PacketsAckNetwork

NL_I_PacketsAckNetwork

Acknowledge a TCP/MPTCP packet inside an emission network matrix and a packet manager.

Calling Sequence

[Rn,Sn,N,R,Net] = NL_I_PacketsAckNetwork(R,Net,P,S)

Arguments

R :

Packet manager.

Net :

Emission network matrix.

P :

Current packet.

S :

Sliding window.

:

Route ID followed by P.

:

Connection source node.

N :

Quantity of packets belonging to the same connection (P) after the acknowledgement.

Description

NL_I_PacketsAckNetwork acknowledges the TCP or MPTCP packet of index P inside the emission network matrix Net. is the current sliding window of the defined connection. The sliding window is shifted to the next packet with the value Ack=0. Thereafter all acknowledged packets must be deleted from the packet manager R. corresponds to the connection source node. is the route index followed by P. N represents the quantity of packets of the same connection under consideration after the acknowledgement process. Then it remains N packets that have not yet reached the destination node.

Examples

n=100;//network size
[nd,nf]=NL_F_RandIntNiNj(n);//generation of the connection extreme nodes  
bs=15;//constant buffer size
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
cpt=1;//connection type: TCP
cpmax=6;//quantity of connection packets
[rp,ps,npn]=NL_I_PMAddConnections(rp,nd,nf,cpt,cpmax);//packet manager update with connection packets between nd and nf
ip=[];//list of connection packets
for k=1:length(npn)
ip=ip($)+1:sum(npn(1:k));
[networks,rp]=NL_I_AddPackets2Network(ps(ip),networks,rp);//emission network matrix update with connection packets
end
rp(1:cpmax,:)//initial state of the packet manager, no acknowledged packet
vect=[1 2];//vector of packets under consideration
[rp]=NL_I_PacketAck(rp,vect);//the packets 1 and 2 are acknowledged, their sixth slot in the packet manager is now equal to 1 (0 before) 
rp(1:6,:)//new state of the packet manager, packets 1 and 2 are now acknowledged
sw=3;//sliding window of the connection under studies
p=2;//packet under consideration
networks(nd,:)//initial state of the emission network matrix, no acknowledged packet
[rn,sn,ncp,rp,networks]=NL_I_PacketsAckNetwork(rp,networks,p,sw);//application of NL_I_PacketsAckNetwork
networks(nd,:)//new state of the emission network matrix, acknowledged packets 1 and 2 are now deleted from the emission network matrix
rp(1:6,:)
rn
sn
ncp

Dependency

NL_I_NodeBufferExtract, , NL_I_PMDeletePackets

Report an issue
<< NL_I_PacketUDPIntraNet NL_I: Internet NL_I_PacketsLocation >>