Actually, both the Single Unix Specification and the HPUX man pages are
pretty definite that the correct spelling of the parameter to getsockopt
is "IPPROTO_TCP"; which in fact is what we are using in existing calls.
This SOL_TCP thing is simply wrong.
regards, tom lane