mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Option name so-protocol is preferred to so-prototype
This commit is contained in:
parent
1502f0cdcb
commit
6b83ddf5f2
4 changed files with 16 additions and 7 deletions
|
@ -1981,9 +1981,9 @@ label(OPTION_SO_TYPE)dit(bf(tt(type=<type>)))
|
||||||
[link(int)(TYPE_INT)]. Address resolution is not affected by this option.
|
[link(int)(TYPE_INT)]. Address resolution is not affected by this option.
|
||||||
Under Linux, 1 means stream oriented socket, 2 means datagram socket, and 3
|
Under Linux, 1 means stream oriented socket, 2 means datagram socket, and 3
|
||||||
means raw socket.
|
means raw socket.
|
||||||
label(OPTION_SO_PROTOTYPE)dit(bf(tt(prototype)))
|
label(OPTION_SO_PROTOCOL)dit(bf(tt(protocol)))
|
||||||
Sets the protocol of the socket, specified as third argument to the
|
Sets the protocol of the socket, specified as third argument to the
|
||||||
code(socket()) or code(socketpair()) calls, to <prototype>
|
code(socket()) or code(socketpair()) calls, to <protocol>
|
||||||
[link(int)(TYPE_INT)]. Address resolution is not affected by this option.
|
[link(int)(TYPE_INT)]. Address resolution is not affected by this option.
|
||||||
6 means TCP, 17 means UDP.
|
6 means TCP, 17 means UDP.
|
||||||
COMMENT(label(OPTION_USELOOPBACK)dit(bf(tt(useloopback)))
|
COMMENT(label(OPTION_USELOOPBACK)dit(bf(tt(useloopback)))
|
||||||
|
|
|
@ -173,7 +173,7 @@ const struct optdesc opt_so_dontlinger = {"so-dontlinger", "dontlinger", OPT_SO
|
||||||
#endif
|
#endif
|
||||||
/* the SO_PROTOTYPE is OS defined on Solaris, HP-UX; we lend this for a more
|
/* the SO_PROTOTYPE is OS defined on Solaris, HP-UX; we lend this for a more
|
||||||
general purpose */
|
general purpose */
|
||||||
const struct optdesc opt_so_prototype = {"so-prototype", "prototype", OPT_SO_PROTOTYPE, GROUP_SOCKET,PH_SOCKET, TYPE_INT,OFUNC_SPEC, SOL_SOCKET,SO_PROTOTYPE };
|
const struct optdesc opt_so_prototype = {"so-protocol", "protocol", OPT_SO_PROTOTYPE, GROUP_SOCKET,PH_SOCKET, TYPE_INT,OFUNC_SPEC, SOL_SOCKET,SO_PROTOCOL };
|
||||||
#ifdef FIOSETOWN
|
#ifdef FIOSETOWN
|
||||||
const struct optdesc opt_fiosetown = { "fiosetown", NULL, OPT_FIOSETOWN, GROUP_SOCKET, PH_PASTSOCKET, TYPE_INT, OFUNC_IOCTL, FIOSETOWN };
|
const struct optdesc opt_fiosetown = { "fiosetown", NULL, OPT_FIOSETOWN, GROUP_SOCKET, PH_PASTSOCKET, TYPE_INT, OFUNC_IOCTL, FIOSETOWN };
|
||||||
#endif
|
#endif
|
||||||
|
|
16
xio-socket.h
16
xio-socket.h
|
@ -5,10 +5,18 @@
|
||||||
#ifndef __xio_socket_h_included
|
#ifndef __xio_socket_h_included
|
||||||
#define __xio_socket_h_included 1
|
#define __xio_socket_h_included 1
|
||||||
|
|
||||||
/* SO_PROTOTYPE is OS defined on Solaris, HP-UX; we lend this for a more
|
/* SO_PROTOTYPE is defined on Solaris, HP-UX
|
||||||
general purpose */
|
SO_PROTOCOL in Linux, is the better name, but came much later */
|
||||||
#ifndef SO_PROTOTYPE
|
#ifdef SO_PROTOCOL
|
||||||
#define SO_PROTOTYPE 0x9999
|
# undef SO_PROTOTYPE
|
||||||
|
# define SO_PROTOTYPE SO_PROTOCOL
|
||||||
|
#else
|
||||||
|
# ifdef SO_PROTOTYPE
|
||||||
|
# define SO_PROTOCOL SO_PROTOTYPE
|
||||||
|
# else
|
||||||
|
# define SO_PROTOCOL 0x9999
|
||||||
|
# define SO_PROTOTYPE SO_PROTOCOL
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const struct addrdesc xioaddr_socket_connect;
|
extern const struct addrdesc xioaddr_socket_connect;
|
||||||
|
|
|
@ -1519,6 +1519,7 @@ const struct optname optionnames[] = {
|
||||||
IF_SOCKET ("so-priority", &opt_so_priority)
|
IF_SOCKET ("so-priority", &opt_so_priority)
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_PROTOTYPE
|
#ifdef SO_PROTOTYPE
|
||||||
|
IF_SOCKET ("so-protocol", &opt_so_prototype)
|
||||||
IF_SOCKET ("so-prototype", &opt_so_prototype)
|
IF_SOCKET ("so-prototype", &opt_so_prototype)
|
||||||
#endif
|
#endif
|
||||||
IF_SOCKET ("so-rcvbuf", &opt_so_rcvbuf)
|
IF_SOCKET ("so-rcvbuf", &opt_so_rcvbuf)
|
||||||
|
|
Loading…
Reference in a new issue