27.11.2012 Views

Disegno e implementazione di un framework per ... - Luca Deri - Ntop

Disegno e implementazione di un framework per ... - Luca Deri - Ntop

Disegno e implementazione di un framework per ... - Luca Deri - Ntop

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.

Attraverso questa struttura dati, si correlano tutti gli oggetti apparte-<br />

nenti <strong>un</strong>a determinata pagina web, fino a formare <strong>un</strong> albero relativo alla<br />

pagina web presa in esame, in figura 4.8 <strong>un</strong> esempio <strong>di</strong> come potrebbe es-<br />

sere l’albero delle richieste costruito a partire da <strong>un</strong>a richiesta iniziale, <strong>per</strong><br />

como<strong>di</strong>tà sono stati eleminati i riferimenti alle richieste padre.<br />

Fig. 4.8: Tracciamento degli oggetti presenti in <strong>un</strong>a pagina web.<br />

La costruzione <strong>di</strong> quest’albero, viene effettuata aderendo alla metodolo-<br />

gia illustrata in 3.4.4. Nel <strong>framework</strong> è stato implementato <strong>un</strong> metodo stati-<br />

co, il quale, preso in ingresso <strong>un</strong> oggetto <strong>di</strong> tipo Trace, avente la richiesta che<br />

si vuole analizzare, <strong>un</strong>a lista <strong>di</strong> oggetti Entry, che rappresentano le possibili<br />

richieste HTTP correlate, restituisce <strong>un</strong> oggetto Trace, rappresentante l’al-<br />

bero delle richieste correlate relative alla richiesta presente all’oggetto Trace<br />

passato come argomento.<br />

Algoritmo<br />

Il metodo inizialmente controlla che la richiesta non sia <strong>per</strong> <strong>un</strong> oggetto <strong>di</strong><br />

tipo favicon, le quali solitamente non hanno il campo referer settato e non<br />

66

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

Saved successfully!

Ooh no, something went wrong!