encode port info on inports/outports