From: Eric Wong Date: 2013-04-03T05:59:34+09:00 Subject: [ruby-core:53903] Re: [ruby-trunk - Feature #7476] missing "IP_TRANSPARENT" constant for IP sockets. Tanaka Akira wrote: > 2013/2/24 ko1 (Koichi Sasada) : > > > Feature #7476: missing "IP_TRANSPARENT" constant for IP sockets. > > https://bugs.ruby-lang.org/issues/7476#change-36913 > > > There is a missing constant for IP_TRANSPARENT on linux. > > to set the TPROXY on a socket I use: > > s.setsockopt(Socket::SOL_IP, 19, 1) > > The 19 suppose to be as a constant named: IP_TRANSPARENT or Socket::IP_TRANSPARENT. > > This is Linux-specific and only defined in linux headers > such as /usr/include/linux/in.h. > > I'm not sure applications can safely use such headers. We already have Linux-specific constants (e.g. TCP_CORK) and *BSD-specific constants (e.g. TCP_NOPUSH), so I don't think we should make it hard for users to take advantage of non-portable features on their favorite OS. I vote for adding IP_TRANSPARENT (and any other OS-specific constants users request).