change PortManager API to allow specifying additional flags when registering a port