<< NARVAL_I_AddConnections NARVAL NARVAL_I_BufferExchange >>

NARVAL >> NARVAL > NARVAL_I_AddPackets2Net

NARVAL_I_AddPackets2Net

Add new packets of a single connection inside an emission network matrix.

Calling Sequence

[net,rp] = NARVAL_I_AddPackets2Net(vp,net,rp)

Parameters

vp :

vector of connection packets.

net :

emission network matrix.

rp :

packet manager.

Description

NARVAL_I_AddPackets2Net adds new packets vp of a single connection inside the emission network matrix net. Packets are assumed to be already stored inside the packet manager rp.

Examples

n=100;//network size
bs=15;//constant buffer size
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
nc=5;//quantity of new connections
en=[];//emission node
dn=[];//destination node
for i=1:nc
[nd,nf]=NARVAL_F_Random_i_j(n);//generation of connection extreme nodes
en=[en nd];
dn=[dn nf];
end
cpmax=6;//maximal connection size
cs=int(cpmax*rand(1,nc))+1;//size of each connection
cpt=ones(1,nc);//connection type: in this case TCP
[rp,ps,csn]=NARVAL_I_AddConnections(rp,en,dn,cpt,cs);//generation of connection packets inside the packet manager
networks(en,:)//emission network matrix initial state for each new connection starting node
ip=[];
for k=1:length(csn)
ip=ip($)+1:sum(csn(1:k));//index of all packets belonging to each connection
[networks,rp]=NARVAL_I_AddPackets2Net(ps(ip),networks,rp);//application of NARVAL_I_AddPackets2Net
end
rp(1:sum(csn),:)//new state of the packet manager
networks(en,:)//new state of the emission network matrix for each new connection starting node

Dependency

NARVAL_I_BufferExtract, NARVAL_I_BufferExchange, NARVAL_I_DeletePackets

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_I_AddConnections NARVAL NARVAL_I_BufferExchange >>