Looking at /etc/services on AIX 6.1, I noticed some bizarre port numbers which exceed the 16-bit maximum port number for TCP (i.e. they are higher than 65535.)
sco_printer 70000/tcp sco_spooler # For System V print IPC
sco_s5_port 70001/tcp lpNet_s5_port # For future use
The file appears to be the original. That is, no other application has changed it:
# lppchk -c bos.net.tcp.client
This is the OS version:
# oslevel -r
6100-02
Is this a bug, since it seems meaningless to have these entries?
The OS simply takes the bottom 16 bits of the port number and connects to that. So, for comparison, I can telnet to the ssh port (22), by connecting to port 65536+22 = 65558. I.e. the 2^16 bit (65536) gets masked off.
root@hostname:/ >telnet localhost 65558
Trying...
Connected to loopback.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.0
Protocol mismatch.
Connection closed.
I tried this on another port too. Also, the same behaviour on Linux. So, presumably connecting to port 70000/tcp is really the same as connecting to 70000-65536 = 4464/tcp.