This module contains numeric constants that would be expected in the socket module, but are not exposed there.
For some platforms (eg. python up to 3.5 on Linux), there is an IN module that exposes them; and they are gathered from there.
As a fallback, the numbers are hardcoded. Any hints on where to get them from are appreciated; possible options are parsing C header files (at build time?) or interacting with shared libraries for obtaining the symbols. The right way would probably be including them in Python.