Where are the constants for the socket options documented?

Using the method setsockopt, I can set various options on a socket, for
example Socket::SO_REUSEADDR. I would like to know

  • What constants are available (meaning, spelling),
  • Which value they take, and
  • What is the default value (for a given socket type)

I googled for a while, but aside from a few examples, I could not find
any documentation on this subject. Does somebody know where I should
look?

(Note: I have crossposted this question at

since I couldn’t get a response here).