cast port to integer