protocol detection