Feature #7476
closedmissing "IP_TRANSPARENT" constant for IP sockets.
Description
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.
Updated by usa (Usaku NAKAMURA) almost 12 years ago
- Category set to ext
- Status changed from Open to Assigned
- Assignee set to akr (Akira Tanaka)
- Target version set to 2.0.0
Updated by mame (Yusuke Endoh) over 11 years ago
- Tracker changed from Bug to Feature
Looks a feature request.
--
Yusuke Endoh mame@tsg.ne.jp
Updated by ko1 (Koichi Sasada) over 11 years ago
- Target version changed from 2.0.0 to 2.1.0
ping -> akr
Updated by akr (Akira Tanaka) over 11 years ago
2013/2/24 ko1 (Koichi Sasada) redmine@ruby-lang.org:
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.¶
Tanaka Akira
Updated by normalperson (Eric Wong) over 11 years ago
Tanaka Akira akr@fsij.org wrote:
2013/2/24 ko1 (Koichi Sasada) redmine@ruby-lang.org:
Feature #7476: missing "IP_TRANSPARENT" constant for IP sockets.
https://bugs.ruby-lang.org/issues/7476#change-36913There 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).
Updated by akr (Akira Tanaka) over 11 years ago
2013/4/3 Eric Wong normalperson@yhbt.net:
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.
It is not my concern.
TCP_CORK is defined in /usr/include/netinet/tcp.h which is a glibc header.
Tanaka Akira
Updated by hsbt (Hiroshi SHIBATA) almost 11 years ago
- Target version changed from 2.1.0 to 2.2.0
Updated by akr (Akira Tanaka) over 10 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset r45830.
- ext/socket/mkconstants.rb: Add IP_TRANSPARENT.
IP_TRANSPARENT is provieded since glibc-2.12.
Reported by Eliezer Croitoru. [ruby-core:50372] [Bug #7476]
Updated by akr (Akira Tanaka) over 10 years ago
It seems glibc-2.12 provides IP_TRANSPARENT.
So there is no problem to use it now.