Set canonical port based on protocol