Version 1.8.0.0
[socat.git] / xio-sctp.c
blob482b83631758e130fc44f3b9f1c2d3c9bf5b43a4
1 /* source: xio-sctp.c */
2 /* Copyright Gerhard Rieger and contributors (see file CHANGES) */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 /* this file contains the source for SCTP related functions and options */
7 #include "xiosysincludes.h"
9 #if WITH_SCTP
11 #include "xioopen.h"
12 #include "xio-listen.h"
13 #include "xio-ip4.h"
14 #include "xio-ipapp.h"
15 #include "xio-sctp.h"
17 /****** SCTP addresses ******/
19 #if WITH_IP4 || WITH_IP6
20 const struct addrdesc xioaddr_sctp_connect = { "SCTP-CONNECT", 1+XIO_RDWR, xioopen_ipapp_connect, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_CHILD|GROUP_RETRY, SOCK_STREAM, IPPROTO_SCTP, PF_UNSPEC HELP(":<host>:<port>") };
21 #if WITH_LISTEN
22 const struct addrdesc xioaddr_sctp_listen = { "SCTP-LISTEN", 1+XIO_RDWR, xioopen_ipapp_listen, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_LISTEN|GROUP_CHILD|GROUP_RANGE|GROUP_RETRY, SOCK_STREAM, IPPROTO_SCTP, PF_UNSPEC HELP(":<port>") };
23 #endif
24 #endif
26 #if WITH_IP4
27 const struct addrdesc xioaddr_sctp4_connect = { "SCTP4-CONNECT", 1+XIO_RDWR, xioopen_ipapp_connect, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_IP_SCTP|GROUP_CHILD|GROUP_RETRY, SOCK_STREAM, IPPROTO_SCTP, PF_INET HELP(":<host>:<port>") };
28 #if WITH_LISTEN
29 const struct addrdesc xioaddr_sctp4_listen = { "SCTP4-LISTEN", 1+XIO_RDWR, xioopen_ipapp_listen, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_IP_SCTP|GROUP_LISTEN|GROUP_CHILD|GROUP_RANGE|GROUP_RETRY, SOCK_STREAM, IPPROTO_SCTP, PF_INET HELP(":<port>") };
30 #endif
31 #endif /* WITH_IP4 */
33 #if WITH_IP6
34 const struct addrdesc xioaddr_sctp6_connect = { "SCTP6-CONNECT", 1+XIO_RDWR, xioopen_ipapp_connect, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_CHILD|GROUP_RETRY, SOCK_STREAM, IPPROTO_SCTP, PF_INET6 HELP(":<host>:<port>") };
35 #if WITH_LISTEN
36 const struct addrdesc xioaddr_sctp6_listen = { "SCTP6-LISTEN", 1+XIO_RDWR, xioopen_ipapp_listen, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_LISTEN|GROUP_CHILD|GROUP_RANGE|GROUP_RETRY, SOCK_STREAM, IPPROTO_SCTP, PF_INET6 HELP(":<port>") };
37 #endif
38 #endif /* WITH_IP6 */
40 /****** SCTP address options ******/
42 #ifdef SCTP_NODELAY
43 const struct optdesc opt_sctp_nodelay = { "sctp-nodelay", "nodelay", OPT_SCTP_NODELAY, GROUP_IP_SCTP, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_SCTP, SCTP_NODELAY };
44 #endif
45 #ifdef SCTP_MAXSEG
46 const struct optdesc opt_sctp_maxseg = { "sctp-maxseg", "mss", OPT_SCTP_MAXSEG, GROUP_IP_SCTP, PH_PASTSOCKET,TYPE_INT, OFUNC_SOCKOPT, SOL_SCTP, SCTP_MAXSEG };
47 const struct optdesc opt_sctp_maxseg_late={"sctp-maxseg-late","mss-late",OPT_SCTP_MAXSEG_LATE,GROUP_IP_SCTP,PH_CONNECTED,TYPE_INT,OFUNC_SOCKOPT, SOL_SCTP, SCTP_MAXSEG};
48 #endif
50 #endif /* WITH_SCTP */