Function

int packetMatches (PacketInfo * info, Stream * stream)

Arguments

info
the PacketInfo for the packet
stream
The Stream for the stream

SRS Refs

3.2.1.9a

A packet is said to match a Stream if the addresses and ports match. The source and destination are allowed to be swapped however. This accounts for packets travelling in the reverse direction.


Function

Stream* findStream (PacketInfo * info)

Arguments

info
The packet you wish to locate the Stream for

SRS Refs

3.2.1.9a

This function searches the hash table and if it finds the stream related to this packet, it returns a pointer to it. Otherwise it returns NULL.


Function

Stream* addStream (PacketInfo * info)

Arguments

info
The packet you wish to create a stream entry for

SRS Refs

3.2.1.9a

This function assumes that the stream does not already exist in the hash table. If it already exists a duplicate stream will be created.


Function

Stream* newStream (PacketInfo * info)

Arguments

info
The packet for which to create the stream

SRS Refs

3.2.1.9

Returns NULL if there is an error creating a Stream


Function

void freeStream (Stream* stream)

Arguments

stream
the Stream to free

SRS Refs

3.2.1.9

Function

void initStreamsHash ( void)

Arguments

void
no arguments

Description

SRS Refs

3.2.1.9a

Function

int tcp_hash (PacketInfo * info)

Arguments

SRS Refs

3.2.1.9a

Note that the same hash is given for packets in either direction


Function

PacketInfo* mergeWithStream (PacketInfo * info)

Arguments

info
The packet info to add to the stream

SRS Refs

3.2.1.9a

Some values are added, while others aren't..


Function

void averageInfo (PacketInfo * info)

Arguments

info
The PacketInfo

SRS Refs

3.2.1.9a

This function also calculates the throughput for the stream


Function

void streamsReset ( void)

Arguments

void
no arguments

Description

SRS Refs

3.2.1.9a