mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 15:32:35 +00:00
Added option ip-transparent (socket option IP_TRANSPARENT)
This commit is contained in:
parent
e765898d38
commit
d109e3131b
7 changed files with 23 additions and 0 deletions
3
CHANGES
3
CHANGES
|
@ -142,6 +142,9 @@ New features:
|
|||
Added options -r and -R for raw dump of transferred data to files.
|
||||
Test: OPTION_RAW_DUMP
|
||||
|
||||
Added option ip-transparent (socket option IP_TRANSPARENT)
|
||||
Thanks to Wang Shanker for sending a patch.
|
||||
|
||||
####################### V 1.7.3.4:
|
||||
|
||||
Corrections:
|
||||
|
|
|
@ -2116,6 +2116,10 @@ dit(bf(tt(ip-multicast-loop=<bool>)))
|
|||
label(OPTION_IP_MULTICAST_TTL)
|
||||
dit(bf(tt(ip-multicast-ttl=<byte>)))
|
||||
Sets the TTL used for outgoing multicast traffic. Default is 1.
|
||||
label(OPTOIN_IP_TRANSPARENT)
|
||||
dit(bf(tt(ip-transparent)))
|
||||
Sets the IP_TRANSPARENT socket option.
|
||||
This option might require root privilege.
|
||||
label(OPTION_RES_DEBUG)dit(bf(tt(res-debug)))
|
||||
label(OPTION_RES_AAONLY)dit(bf(tt(res-aaonly)))
|
||||
label(OPTION_RES_USEVC)dit(bf(tt(res-usevc)))
|
||||
|
|
3
filan.c
3
filan.c
|
@ -745,6 +745,9 @@ int ipan(int fd, FILE *outfile) {
|
|||
#ifdef IP_RECVTOS
|
||||
{IP_RECVTOS, "IP_RECVTOS"},
|
||||
#endif
|
||||
#ifdef IP_TRANSPARENT
|
||||
{IP_TRANSPARENT, "IP_TRANSPARENT"},
|
||||
#endif
|
||||
#ifdef IP_MTU
|
||||
{IP_MTU, "IP_MTU"},
|
||||
#endif
|
||||
|
|
3
xio-ip.c
3
xio-ip.c
|
@ -50,6 +50,9 @@ const struct optdesc opt_ip_mtu_discover={"ip-mtu-discover","mtudiscover",OPT_IP
|
|||
#ifdef IP_MTU
|
||||
const struct optdesc opt_ip_mtu = { "ip-mtu", "mtu", OPT_IP_MTU, GROUP_SOCK_IP, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IP, IP_MTU };
|
||||
#endif
|
||||
#ifdef IP_TRANSPARENT
|
||||
const struct optdesc opt_ip_transparent = {"ip-transparent", "transparent", OPT_IP_TRANSPARENT, GROUP_SOCK_IP, PH_PREBIND, TYPE_BOOL, OFUNC_SOCKOPT, SOL_IP, IP_TRANSPARENT};
|
||||
#endif
|
||||
#ifdef IP_FREEBIND
|
||||
const struct optdesc opt_ip_freebind= { "ip-freebind","freebind", OPT_IP_FREEBIND,GROUP_SOCK_IP, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IP, IP_FREEBIND };
|
||||
#endif
|
||||
|
|
1
xio-ip.h
1
xio-ip.h
|
@ -26,6 +26,7 @@ extern const struct optdesc opt_ip_pktoptions;
|
|||
extern const struct optdesc opt_ip_add_membership;
|
||||
extern const struct optdesc opt_ip_recvdstaddr;
|
||||
extern const struct optdesc opt_ip_recvif;
|
||||
extern const struct optdesc opt_ip_transparent;
|
||||
|
||||
extern const struct optdesc opt_res_debug;
|
||||
extern const struct optdesc opt_res_aaonly;
|
||||
|
|
|
@ -719,6 +719,9 @@ const struct optname optionnames[] = {
|
|||
IF_IP ("ip-router-alert", &opt_ip_router_alert)
|
||||
#endif
|
||||
IF_IP ("ip-tos", &opt_ip_tos)
|
||||
#ifdef IP_TRANSPARENT
|
||||
IF_IP ("ip-transparent", &opt_ip_transparent)
|
||||
#endif
|
||||
IF_IP ("ip-ttl", &opt_ip_ttl)
|
||||
#ifdef IP_FREEBIND
|
||||
IF_IP ("ipfreebind", &opt_ip_freebind)
|
||||
|
@ -1691,6 +1694,9 @@ const struct optname optionnames[] = {
|
|||
#endif
|
||||
IF_IP ("tos", &opt_ip_tos)
|
||||
IF_TERMIOS("tostop", &opt_tostop)
|
||||
#ifdef IP_TRANSPARENT
|
||||
IF_IP ("transparent", &opt_ip_transparent)
|
||||
#endif
|
||||
IF_OPEN ("trunc", &opt_o_trunc)
|
||||
#if HAVE_FTRUNCATE64
|
||||
IF_ANY ("truncate", &opt_ftruncate64)
|
||||
|
|
|
@ -423,6 +423,9 @@ enum e_optcode {
|
|||
OPT_IP_ROUTER_ALERT,
|
||||
#endif
|
||||
OPT_IP_TOS,
|
||||
#ifdef IP_TRANSPARENT
|
||||
OPT_IP_TRANSPARENT,
|
||||
#endif
|
||||
OPT_IP_TTL,
|
||||
OPT_ISIG, /* termios.c_lflag */
|
||||
OPT_ISPEED, /* termios.c_ispeed */
|
||||
|
|
Loading…
Reference in a new issue