nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* source: xio-sctp.c */ |
2 | /* Copyright Gerhard Rieger 2008 */ |
||
3 | /* Published under the GNU General Public License V.2, see file COPYING */ |
||
4 | |||
5 | /* this file contains the source for SCTP related functions and options */ |
||
6 | |||
7 | #include "xiosysincludes.h" |
||
8 | |||
9 | #if WITH_SCTP |
||
10 | |||
11 | #include "xioopen.h" |
||
12 | #include "xio-listen.h" |
||
13 | #include "xio-ip4.h" |
||
14 | #include "xio-ipapp.h" |
||
15 | #include "xio-sctp.h" |
||
16 | |||
17 | /****** SCTP addresses ******/ |
||
18 | |||
19 | #if WITH_IP4 || WITH_IP6 |
||
20 | const struct xioaddr_endpoint_desc xioaddr_sctp_connect2 = { XIOADDR_SYS, "sctp-connect", 2, XIOBIT_ALL, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_CHILD|GROUP_RETRY, XIOSHUT_DOWN, XIOCLOSE_CLOSE, xioopen_ipapp_connect, SOCK_STREAM, IPPROTO_SCTP, PF_UNSPEC HELP(":<host>:<port>") }; |
||
21 | const union xioaddr_desc *xioaddrs_sctp_connect[] = { |
||
22 | (union xioaddr_desc *)&xioaddr_sctp_connect2, |
||
23 | NULL |
||
24 | }; |
||
25 | |||
26 | #if WITH_LISTEN |
||
27 | const struct xioaddr_endpoint_desc xioaddr_sctp_listen1 = { XIOADDR_SYS, "sctp-listen", 1, XIOBIT_ALL, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_LISTEN|GROUP_CHILD|GROUP_RANGE|GROUP_RETRY, XIOSHUT_DOWN, XIOCLOSE_CLOSE, xioopen_ipapp_listen, SOCK_STREAM, IPPROTO_SCTP, PF_UNSPEC HELP(":<port>") }; |
||
28 | const union xioaddr_desc *xioaddrs_sctp_listen[] = { |
||
29 | (union xioaddr_desc *)&xioaddr_sctp_listen1, |
||
30 | NULL |
||
31 | }; |
||
32 | #endif /* WITH_LISTEN */ |
||
33 | #endif /* WITH_IP4 || WITH_IP6 */ |
||
34 | |||
35 | #if WITH_IP4 |
||
36 | const struct xioaddr_endpoint_desc xioaddr_sctp4_connect2 = { XIOADDR_SYS, "sctp4-connect", 2, XIOBIT_ALL, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_IP_SCTP|GROUP_CHILD|GROUP_RETRY, XIOSHUT_DOWN, XIOCLOSE_CLOSE, xioopen_ipapp_connect, SOCK_STREAM, IPPROTO_SCTP, PF_INET HELP(":<host>:<port>") }; |
||
37 | const union xioaddr_desc *xioaddrs_sctp4_connect[] = { |
||
38 | (union xioaddr_desc *)&xioaddr_sctp4_connect2, |
||
39 | NULL |
||
40 | }; |
||
41 | |||
42 | #if WITH_LISTEN |
||
43 | const struct xioaddr_endpoint_desc xioaddr_sctp4_listen1 = { XIOADDR_SYS, "sctp4-listen", 1, XIOBIT_ALL, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP4|GROUP_IP_SCTP|GROUP_LISTEN|GROUP_CHILD|GROUP_RANGE|GROUP_RETRY, XIOSHUT_DOWN, XIOCLOSE_CLOSE, xioopen_ipapp_listen, SOCK_STREAM, IPPROTO_SCTP, PF_INET HELP(":<port>") }; |
||
44 | const union xioaddr_desc *xioaddrs_sctp4_listen[] = { |
||
45 | (union xioaddr_desc *)&xioaddr_sctp4_listen1, |
||
46 | NULL |
||
47 | }; |
||
48 | #endif /* WITH_LISTEN */ |
||
49 | #endif /* WITH_IP4 */ |
||
50 | |||
51 | #if WITH_IP6 |
||
52 | const struct xioaddr_endpoint_desc xioaddr_sctp6_connect2 = { XIOADDR_SYS, "sctp6-connect", 2, XIOBIT_ALL, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_CHILD|GROUP_RETRY, XIOSHUT_DOWN, XIOCLOSE_CLOSE, xioopen_ipapp_connect, SOCK_STREAM, IPPROTO_SCTP, PF_INET6 HELP(":<host>:<port>") }; |
||
53 | const union xioaddr_desc *xioaddrs_sctp6_connect[] = { |
||
54 | (union xioaddr_desc *)&xioaddr_sctp6_connect2, |
||
55 | NULL |
||
56 | }; |
||
57 | |||
58 | #if WITH_LISTEN |
||
59 | const struct xioaddr_endpoint_desc xioaddr_sctp6_listen1 = { XIOADDR_SYS, "sctp6-listen", 1, XIOBIT_ALL, GROUP_FD|GROUP_SOCKET|GROUP_SOCK_IP6|GROUP_IP_SCTP|GROUP_LISTEN|GROUP_CHILD|GROUP_RANGE|GROUP_RETRY, XIOSHUT_DOWN, XIOCLOSE_CLOSE, xioopen_ipapp_listen, SOCK_STREAM, IPPROTO_SCTP, PF_INET6 HELP(":<port>") }; |
||
60 | const union xioaddr_desc *xioaddrs_sctp6_listen[] = { |
||
61 | (union xioaddr_desc *)&xioaddr_sctp6_listen1, |
||
62 | NULL |
||
63 | }; |
||
64 | #endif /* WITH_LISTEN */ |
||
65 | #endif /* WITH_IP6 */ |
||
66 | |||
67 | /****** SCTP address options ******/ |
||
68 | |||
69 | #ifdef SCTP_NODELAY |
||
70 | 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 }; |
||
71 | #endif |
||
72 | #ifdef SCTP_MAXSEG |
||
73 | 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 }; |
||
74 | 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}; |
||
75 | #endif |
||
76 | |||
77 | #endif /* WITH_SCTP */ |