[PATCH v3 07/15] flow: Add helper to determine a flow's protocol