Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Parallel Libtrace HOWTO
Introduction to Parallel Libtrace
Libtrace4 introduces a new parallel API which is designed to easily support using multiple threads to perform packet processing and analysis tasks. Complicated issues relating to concurrency, buffer management, hashing and combining results are handled internally by the libtrace library so developers only need to concentrate on writing code to process packets and report results, while still being able to take advantage of multiple cores and/or pipelines.
The new parallel API introduced in libtrace4 is quite different to (and a bit more complex than) the libtrace3 API. This guide aims to incrementally teach the new concepts and functions that appear in parallel libtrace and will hopefully help make it easier for you to get started. We will assume that you are already familiar with how the current libtrace3 API functions: see the original Libtrace tutorial if you need to get up to speed.
We recommend that you read through the following sections, in order, before starting to write any parallel libtrace code. Apologies for the length of this HOWTO -- this parallel programming stuff can be a bit complex at times, so I'm trying to make sure the documentation covers everything you might need to know.