Switch to a 3-step approach:
Step 1: trace the packets
Step 2: store events in a database (currently temp. SQLite)
Step 3: report using queries on the database