An efficient C implementation of the stream-based flow query language