01.07.2013 Views

Th`ese de Doctorat de l'université Paris VI Pierre et Marie Curie Mlle ...

Th`ese de Doctorat de l'université Paris VI Pierre et Marie Curie Mlle ...

Th`ese de Doctorat de l'université Paris VI Pierre et Marie Curie Mlle ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table A.2: Java co<strong>de</strong> for updating the CST table<br />

No<strong>de</strong> IngressRouter;<br />

InterfaceInfo trafficStatistics;<br />

for(int j=0; j < CSTtable.length; j++)<br />

{<br />

IngressRouter = CSTtable[j].g<strong>et</strong>IngressRouter();<br />

trafficStatistics = IngressRouter.g<strong>et</strong>No<strong>de</strong>Info(1);<br />

if (trafficStatistics.g<strong>et</strong>InLoad() > 0)<br />

{<br />

CSTtable[j].s<strong>et</strong>Active(true);<br />

CSTtable[j].s<strong>et</strong>RealRate((IngressRouter.g<strong>et</strong>No<strong>de</strong>Info(0)).g<strong>et</strong>OutLoad());<br />

CSTtable[j].s<strong>et</strong>OfferedRate((IngressRouter.g<strong>et</strong>No<strong>de</strong>Info(1)).g<strong>et</strong>InLoad());<br />

}<br />

else<br />

{<br />

CSTtable[j].s<strong>et</strong>Active(false);<br />

}<br />

}<br />

- trafficStatistics is a field that contains the statistics information regarding<br />

one interface of the IngressRouter router.<br />

- g<strong>et</strong>No<strong>de</strong>Info(int if ) is a m<strong>et</strong>hod that allows to collect the traffic statistics<br />

at interface if of the ingress router.<br />

- s<strong>et</strong>Active(boolean), s<strong>et</strong>RealRate(double) and s<strong>et</strong>OfferedRate(double):<br />

these three m<strong>et</strong>hods update the CST table with the information on the state,<br />

the transmission rate and the offered rate of each connection, respectively.<br />

- g<strong>et</strong>InLoad() and g<strong>et</strong>OutLoad(): these two m<strong>et</strong>hods r<strong>et</strong>urn, respectively,<br />

the incoming and outgoing traffic statistics for a particular interface<br />

of the ingress router.<br />

101

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!