Next: Step (1c): Procedure when
Up: Finding Connections in the
Previous: Analysis of Deviations
In this section, we show how to compute deviations, defined by Def. 4 in an efficient manner.
Suppose we have a given packet stream
as an array of
elements in main memory.
Also suppose that we have traffic data
, packets in which are stored in chronological order as they were captured in a storage disk, which is a source of packet streams for comparing with
to compute deviations.
It is essential that
should be scanned once sequentially for efficient implementation.
The entire structure of the implementation is described in the following steps.
- Until we reach the end of
repeat the following.
- Take the next packet
to the previous one taken from
.
- Retrieve the entry of the packet stream to which
belongs from a hash, or create a new entry in the hash when there is no packet stream to which
belongs or
is the first packet of a connection.
- Do some computation on the entry of the packet stream in the hash to update the values relating to the deviation for that packet stream.
- Traverse the hash to iterate all the entries of the packet streams to get the deviations for them.
The key to the hash is the 4-tuple TCP connection parameters together with the direction of packet
.
We will describe the details of the step (1c) in the next section.
We denote that the entry of the packet stream
is retrieved at step (1b) and that the packet taken at step (1a) is the
th packet of
.
We also denote that
.
Subsections
Next: Step (1c): Procedure when
Up: Finding Connections in the
Previous: Analysis of Deviations
Yoda
2000-11-20