source and destination ports can go beyond 32768 on many OSes.
short type is signed 16 bit, so not suitable.
switching to ints.