processor load, the period of the statistics processing, which
is determined by a timer, can be easily controlled.
2) Packet Dumping: The statistics layer makes use of
pcap’s dumping feature to copy packets to permanent storage
for later retrieval. Sttyciar can support software which operates
in the core of a network, thus it is useful to be able to
capture and analyse all traffic passing through the software.
The packets are stored in pcap’s standard format which can
be analysed by software such as Wireshark [10].
D. User Interface
Sttyciar’s user interface component provides various features
to simplify implementation of Sttyciar-based software
that provide a GUI. This component can easily list available
network interfaces and allow the end-user to select which
interfaces will be involved in a packet processing session. The
user interface component also offers a real-time visualisation
of the information collected by the statistics layer in a graph
or tabular format.
V. IMPLEMENTATION TOOLS
A. Qt Framework
The Sttyciar framework uses external tools to support robust
operation and an intuitive API. The Qt framework [11]
supports Sttyciar’s multi-threaded environment which is key
to ensuring high performance. Qt provides various tools to
assist with overcoming shared resource issues which arise
when packets and network interface buffers are accessed by
different threads very frequently. Thread-safety is implemented
using the QMutex, QSemaphore and QWaitCondition Qt
classes. The QThread class, which specifies operations which
must occur in as separate thread, ensures that implementations
using the Sttyciar framework will scale properly to multicore
systems as shown in section VII. Sttyciar also uses Qt’s
container classes for lists (using the QList class) and buffers
(using the QQueue class).
B. Smart Pointers
Smart pointers, provided by the Boost libraries [12], play
a critical role in ensuring that Sttyciar is able to manage
memory efficiently. Due to Sttyciar’s potentially high data
throughput, a memory leak caused by misuse of pointers would
result in a memory leak filling up dynamic memory very
quickly. Smart pointers ensure that this does not occur, since
all packets received from the network are copied from the
memory allocated by pcap into memory allocated by smart
pointers. These smart pointers, which are compatible with
Qt container classes, are then placed in the buffers to be
processed. Once processing is complete, the smart pointers
automatically remove the packets from memory.
VI. IMPLEMENTATION
Sttyciar was used in an implementation of a network hardware
emulator. This implementation allowed for a desktop PC
or server to run as either a TCP/IP compatible switch or hub
from within either the Windows or Linux OS’s. Using this