Add outport and inport functionality to protocol