[PATCH v2 08/22] flow: Add helper to determine a flow's protocol