[PATCH 03/16] flow: Add helper to determine a flow's protocol