| 1 | /* SCTP kernel Implementation |
| 2 | * (C) Copyright IBM Corp. 2001, 2004 |
| 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
| 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
| 5 | * Copyright (c) 2001 Intel Corp. |
| 6 | * Copyright (c) 2001 Nokia, Inc. |
| 7 | * |
| 8 | * The SCTP implementation is free software; |
| 9 | * you can redistribute it and/or modify it under the terms of |
| 10 | * the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2, or (at your option) |
| 12 | * any later version. |
| 13 | * |
| 14 | * The SCTP implementation is distributed in the hope that it |
| 15 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 16 | * ************************ |
| 17 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 18 | * See the GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with GNU CC; see the file COPYING. If not, write to |
| 22 | * the Free Software Foundation, 59 Temple Place - Suite 330, |
| 23 | * Boston, MA 02111-1307, USA. |
| 24 | * |
| 25 | * Please send any bug reports or fixes you make to the |
| 26 | * email address(es): |
| 27 | * lksctp developers <[email protected]> |
| 28 | * |
| 29 | * Or submit a bug report through the following website: |
| 30 | * https://github.com/sctp/lksctp-tools/ |
| 31 | * |
| 32 | * Any bugs reported to us we will try to fix... any fixes shared will |
| 33 | * be incorporated into the next SCTP release. |
| 34 | * |
| 35 | * Written or modified by: |
| 36 | * La Monte H.P. Yarroll <[email protected]> |
| 37 | * Karl Knutson <[email protected]> |
| 38 | * Hui Huang <[email protected]> |
| 39 | * Jon Grimm <[email protected]> |
| 40 | * Sridhar Samudrala <[email protected]> |
| 41 | */ |
| 42 | |
| 43 | /* This is a functional test to verify the various SCTP level socket |
| 44 | * options that can be used to get information about existing SCTP |
| 45 | * associations and to configure certain parameters. |
| 46 | */ |
| 47 | |
| 48 | #include <stdio.h> |
| 49 | #include <unistd.h> |
| 50 | #include <stdlib.h> |
| 51 | #include <string.h> |
| 52 | #include <sys/types.h> |
| 53 | #include <sys/socket.h> |
| 54 | #include <sys/uio.h> |
| 55 | #include <errno.h> |
| 56 | #include <netinet/in.h> |
| 57 | #include <netinet/sctp.h>cxx . . $ `<file>/src/include/netinet/sctp.h`/ |
| 58 | #include <sctputil.h>cxx . . $ `<file>/src/testlib/sctputil.h`/ |
| 59 | |
| 60 | char *TCIDcxx . . $ TCID. = __FILE__; |
| 61 | int TST_TOTALcxx . . $ TST_TOTAL. = 29; |
| 62 | int TST_CNTcxx . . $ TST_CNT. = 0; |
| 63 | |
| 64 | int |
| 65 | maincxx . . $ main(b126dc7c1de90089).(void) |
| 66 | { |
| 67 | int udp_svr_sk, udp_clt_sk, tcp_svr_sk, tcp_clt_sk; |
| 68 | int accept_sk, peeloff_sk; |
| 69 | sockaddr_storage_tcxx . . $ sockaddr_storage_t# udp_svr_loop, udp_clt_loop; |
| 70 | sockaddr_storage_tcxx . . $ sockaddr_storage_t# tcp_svr_loop, tcp_clt_loop; |
| 71 | struct ioveccxx . . $ iovec# iov; |
| 72 | struct msghdrcxx . . $ msghdr# inmessage; |
| 73 | struct msghdrcxx . . $ msghdr# outmessage; |
| 74 | char incmsg[CMSG_SPACEcxx . . $ `<external>/8962547315054503424/socket.h:309:9`!(sizeof(sctp_cmsg_data_t))]; |
| 75 | char outcmsg[CMSG_SPACEcxx . . $ `<external>/8962547315054503424/socket.h:309:9`!(sizeof(struct sctp_sndrcvinfo))]; |
| 76 | struct cmsghdrcxx . . $ cmsghdr# *cmsg; |
| 77 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# *sinfo; |
| 78 | struct ioveccxx . . $ iovec# out_iov; |
| 79 | char *message = "hello, world!\n"; |
| 80 | int error; |
| 81 | int pf_class; |
| 82 | uint32_tcxx . . $ uint32_t# ppid; |
| 83 | uint32_tcxx . . $ uint32_t# stream; |
| 84 | sctp_assoc_tcxx . . $ sctp_assoc_t# udp_svr_associd, udp_clt_associd; |
| 85 | struct sctp_assoc_changecxx . . $ sctp_assoc_change# *sac; |
| 86 | char *big_buffer; |
| 87 | struct sctp_event_subscribecxx . . $ sctp_event_subscribe# subscribe; |
| 88 | struct sctp_initmsgcxx . . $ sctp_initmsg# initmsg; |
| 89 | struct sctp_paddrparamscxx . . $ sctp_paddrparams# paddrparams; |
| 90 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# set_udp_sk_dflt_param, get_udp_sk_dflt_param; |
| 91 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# set_tcp_sk_dflt_param, get_tcp_sk_dflt_param; |
| 92 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# set_udp_assoc_dflt_param; |
| 93 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# get_udp_assoc_dflt_param; |
| 94 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# set_tcp_assoc_dflt_param; |
| 95 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# get_tcp_assoc_dflt_param; |
| 96 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# get_peeloff_assoc_dflt_param; |
| 97 | struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# get_accept_assoc_dflt_param; |
| 98 | struct sctp_paddrinfocxx . . $ sctp_paddrinfo# pinfo; |
| 99 | int dflt_pathmaxrxt; |
| 100 | socklen_tcxx . . $ socklen_t# optlen, addrlen; |
| 101 | struct sctp_statuscxx . . $ sctp_status# status; |
| 102 | struct sctp_assoc_valuecxx . . $ sctp_assoc_value# value; |
| 103 | |
| 104 | /* Rather than fflush() throughout the code, set stdout to |
| 105 | * be unbuffered. |
| 106 | */ |
| 107 | setvbufcxx . . $ setvbuf(4da3ba8c983f31bc).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:158:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, _IONBFcxx . . $ `<external>/232824719582829767/stdio.h:100:9`!, 0); |
| 108 | |
| 109 | /* Set some basic values which depend on the address family. */ |
| 110 | #if TEST_V6 |
| 111 | pf_class = PF_INET6; |
| 112 | |
| 113 | udp_svr_loop.v6.sin6_family = AF_INET6; |
| 114 | udp_svr_loop.v6.sin6_addr = in6addr_loopbackcxx . . $ in6addr_loopback.; |
| 115 | udp_svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1); |
| 116 | |
| 117 | udp_clt_loop.v6.sin6_family = AF_INET6; |
| 118 | udp_clt_loop.v6.sin6_addr = in6addr_loopbackcxx . . $ in6addr_loopback.; |
| 119 | udp_clt_loop.v6.sin6_port = htons(SCTP_TESTPORT_1+1); |
| 120 | |
| 121 | tcp_svr_loop.v6.sin6_family = AF_INET6; |
| 122 | tcp_svr_loop.v6.sin6_addr = in6addr_loopbackcxx . . $ in6addr_loopback.; |
| 123 | tcp_svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1+2); |
| 124 | |
| 125 | tcp_clt_loop.v6.sin6_family = AF_INET6; |
| 126 | tcp_clt_loop.v6.sin6_addr = in6addr_loopbackcxx . . $ in6addr_loopback.; |
| 127 | tcp_clt_loop.v6.sin6_port = htons(SCTP_TESTPORT_1+3); |
| 128 | #else |
| 129 | pf_class = PF_INETcxx . . $ `<external>/8962547315054503424/socket.h:45:9`!; |
| 130 | |
| 131 | udp_svr_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_familycxx . . $ sockaddr_in#sin_family. = AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!; |
| 132 | udp_svr_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_addrcxx . . $ sockaddr_in#sin_addr..s_addrcxx . . $ in_addr#s_addr. = SCTP_IP_LOOPBACKcxx . . $ `src/testlib/sctputil.h:76:9`!; |
| 133 | udp_svr_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_portcxx . . $ sockaddr_in#sin_port. = htonscxx . . $ `<external>/9581057695539925927/in.h:431:12`!(SCTP_TESTPORT_1cxx . . $ `src/testlib/sctputil.h:71:9`!); |
| 134 | |
| 135 | udp_clt_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_familycxx . . $ sockaddr_in#sin_family. = AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!; |
| 136 | udp_clt_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_addrcxx . . $ sockaddr_in#sin_addr..s_addrcxx . . $ in_addr#s_addr. = SCTP_IP_LOOPBACKcxx . . $ `src/testlib/sctputil.h:76:9`!; |
| 137 | udp_clt_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_portcxx . . $ sockaddr_in#sin_port. = htonscxx . . $ `<external>/9581057695539925927/in.h:431:12`!(SCTP_TESTPORT_1cxx . . $ `src/testlib/sctputil.h:71:9`!+1); |
| 138 | |
| 139 | tcp_svr_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_familycxx . . $ sockaddr_in#sin_family. = AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!; |
| 140 | tcp_svr_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_addrcxx . . $ sockaddr_in#sin_addr..s_addrcxx . . $ in_addr#s_addr. = SCTP_IP_LOOPBACKcxx . . $ `src/testlib/sctputil.h:76:9`!; |
| 141 | tcp_svr_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_portcxx . . $ sockaddr_in#sin_port. = htonscxx . . $ `<external>/9581057695539925927/in.h:431:12`!(SCTP_TESTPORT_1cxx . . $ `src/testlib/sctputil.h:71:9`!+2); |
| 142 | |
| 143 | tcp_clt_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_familycxx . . $ sockaddr_in#sin_family. = AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!; |
| 144 | tcp_clt_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_addrcxx . . $ sockaddr_in#sin_addr..s_addrcxx . . $ in_addr#s_addr. = SCTP_IP_LOOPBACKcxx . . $ `src/testlib/sctputil.h:76:9`!; |
| 145 | tcp_clt_loop.v4cxx . . $ $anonymous_type_f8e963888af85862_0#v4..sin_portcxx . . $ sockaddr_in#sin_port. = htonscxx . . $ `<external>/9581057695539925927/in.h:431:12`!(SCTP_TESTPORT_2cxx . . $ `src/testlib/sctputil.h:73:9`!+3); |
| 146 | #endif /* TEST_V6 */ |
| 147 | |
| 148 | /* Create the two endpoints which will talk to each other. */ |
| 149 | udp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 150 | udp_clt_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 151 | |
| 152 | /* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */ |
| 153 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_svr_sk); |
| 154 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_clt_sk); |
| 155 | |
| 156 | /* Bind these sockets to the test ports. */ |
| 157 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_svr_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 158 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_clt_sk, &udp_clt_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_clt_loop)); |
| 159 | |
| 160 | /* Mark udp_svr_sk as being able to accept new associations. */ |
| 161 | test_listencxx . . $ test_listen(9b79fb6aee4c0440).(udp_svr_sk, 1); |
| 162 | |
| 163 | /* TEST #1: SCTP_STATUS socket option. */ |
| 164 | /* Make sure that SCTP_STATUS getsockopt on a socket with no |
| 165 | * association fails. |
| 166 | */ |
| 167 | optlen = sizeof(struct sctp_statuscxx . . $ sctp_status#); |
| 168 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&status, 0, optlen); |
| 169 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_svr_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_STATUScxx . . $ `<external>/17169092326581286071/sctp.h:83:9`!, &status, |
| 170 | &optlen); |
| 171 | if ((error != -1) && (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! != EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!)) |
| 172 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_STATUS) on a " |
| 173 | "socket with no assoc error:%d errno:%d", |
| 174 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 175 | |
| 176 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_STATUS) on a socket with no assoc"); |
| 177 | |
| 178 | /* Send the first message. This will create the association. */ |
| 179 | outmessage.msg_namecxx . . $ msghdr#msg_name. = &udp_svr_loop; |
| 180 | outmessage.msg_namelencxx . . $ msghdr#msg_namelen. = sizeof(udp_svr_loop); |
| 181 | outmessage.msg_iovcxx . . $ msghdr#msg_iov. = &out_iov; |
| 182 | outmessage.msg_iovlencxx . . $ msghdr#msg_iovlen. = 1; |
| 183 | outmessage.msg_controlcxx . . $ msghdr#msg_control. = outcmsg; |
| 184 | outmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(outcmsg); |
| 185 | outmessage.msg_flagscxx . . $ msghdr#msg_flags. = 0; |
| 186 | cmsg = CMSG_FIRSTHDRcxx . . $ `<external>/8962547315054503424/socket.h:304:9`!(&outmessage); |
| 187 | cmsg->cmsg_levelcxx . . $ cmsghdr#cmsg_level. = IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!; |
| 188 | cmsg->cmsg_typecxx . . $ cmsghdr#cmsg_type. = SCTP_SNDRCVcxx . . $ `<external>/17169092326581286071/sctp.h:333:9`!; |
| 189 | cmsg->cmsg_lencxx . . $ cmsghdr#cmsg_len. = CMSG_LENcxx . . $ `<external>/8962547315054503424/socket.h:311:9`!(sizeof(struct sctp_sndrcvinfo)); |
| 190 | outmessage.msg_controllencxx . . $ msghdr#msg_controllen. = cmsg->cmsg_lencxx . . $ cmsghdr#cmsg_len.; |
| 191 | sinfo = (struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# *)CMSG_DATAcxx . . $ `<external>/8962547315054503424/socket.h:299:10`!(cmsg); |
| 192 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(sinfo, 0x00, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 193 | ppid = randcxx . . $ rand(b126dc7c1de90089).(); /* Choose an arbitrary value. */ |
| 194 | stream = 1; |
| 195 | sinfo->sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = ppid; |
| 196 | sinfo->sinfo_streamcxx . . $ sctp_sndrcvinfo#sinfo_stream. = stream; |
| 197 | outmessage.msg_iovcxx . . $ msghdr#msg_iov.->iov_basecxx . . $ iovec#iov_base. = message; |
| 198 | outmessage.msg_iovcxx . . $ msghdr#msg_iov.->iov_lencxx . . $ iovec#iov_len. = strlencxx . . $ strlen(751346f8406fd082).(message) + 1; |
| 199 | test_sendmsgcxx . . $ test_sendmsg(c45a39c477f473e).(udp_clt_sk, &outmessage, 0, strlencxx . . $ strlen(751346f8406fd082).(message)+1); |
| 200 | |
| 201 | /* Initialize inmessage for all receives. */ |
| 202 | big_buffer = test_malloccxx . . $ test_malloc(bfcfa4d6b7f7ef64).(REALLY_BIGcxx . . $ `src/testlib/sctputil.h:65:9`!); |
| 203 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&inmessage, 0, sizeof(inmessage)); |
| 204 | iov.iov_basecxx . . $ iovec#iov_base. = big_buffer; |
| 205 | iov.iov_lencxx . . $ iovec#iov_len. = REALLY_BIGcxx . . $ `src/testlib/sctputil.h:65:9`!; |
| 206 | inmessage.msg_iovcxx . . $ msghdr#msg_iov. = &iov; |
| 207 | inmessage.msg_iovlencxx . . $ msghdr#msg_iovlen. = 1; |
| 208 | inmessage.msg_controlcxx . . $ msghdr#msg_control. = incmsg; |
| 209 | |
| 210 | /* Get the communication up message on udp_svr_sk. */ |
| 211 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 212 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 213 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 214 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 215 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_COMM_UPcxx . . $ SCTP_COMM_UP.); |
| 216 | sac = (struct sctp_assoc_changecxx . . $ sctp_assoc_change# *)iov.iov_basecxx . . $ iovec#iov_base.; |
| 217 | udp_svr_associd = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 218 | |
| 219 | /* Get the communication up message on udp_clt_sk. */ |
| 220 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 221 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_clt_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 222 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 223 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 224 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_COMM_UPcxx . . $ SCTP_COMM_UP.); |
| 225 | sac = (struct sctp_assoc_changecxx . . $ sctp_assoc_change# *)iov.iov_basecxx . . $ iovec#iov_base.; |
| 226 | udp_clt_associd = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 227 | |
| 228 | /* Get the first message which was sent. */ |
| 229 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 230 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 231 | test_check_msg_datacxx . . $ test_check_msg_data(87a4c472fd2f0d28).(&inmessage, error, strlencxx . . $ strlen(751346f8406fd082).(message) + 1, |
| 232 | MSG_EORcxx . . $ `<external>/8962547315054503424/socket.h:228:9`!, stream, ppid); |
| 233 | |
| 234 | /* Get SCTP_STATUS for udp_clt_sk's given association. */ |
| 235 | optlen = sizeof(struct sctp_statuscxx . . $ sctp_status#); |
| 236 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&status, 0, optlen); |
| 237 | status.sstat_assoc_idcxx . . $ sctp_status#sstat_assoc_id. = udp_clt_associd; |
| 238 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_STATUScxx . . $ `<external>/17169092326581286071/sctp.h:83:9`!, &status, &optlen); |
| 239 | |
| 240 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_STATUS)"); |
| 241 | |
| 242 | /* Make sure that SCTP_STATUS getsockopt with invalid associd fails. */ |
| 243 | optlen = sizeof(struct sctp_statuscxx . . $ sctp_status#); |
| 244 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&status, 0, optlen); |
| 245 | status.sstat_assoc_idcxx . . $ sctp_status#sstat_assoc_id. = udp_svr_associd; |
| 246 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_STATUScxx . . $ `<external>/17169092326581286071/sctp.h:83:9`!, &status, |
| 247 | &optlen); |
| 248 | if ((error != -1) && (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! != EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!)) |
| 249 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_STATUS) with " |
| 250 | "associd error: %d errno:%d", error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 251 | |
| 252 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_STATUS) with invalid associd"); |
| 253 | |
| 254 | /* Make sure that SCTP_STATUS getsockopt with NULL associd fails. */ |
| 255 | optlen = sizeof(struct sctp_statuscxx . . $ sctp_status#); |
| 256 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&status, 0, optlen); |
| 257 | status.sstat_assoc_idcxx . . $ sctp_status#sstat_assoc_id. = 0; |
| 258 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_svr_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_STATUScxx . . $ `<external>/17169092326581286071/sctp.h:83:9`!, &status, |
| 259 | &optlen); |
| 260 | if ((error != -1) && (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! != EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!)) |
| 261 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_STATUS) with " |
| 262 | "NULL associd error: %d errno:%d", error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 263 | |
| 264 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_STATUS) with NULL associd"); |
| 265 | |
| 266 | /* Shut down the link. */ |
| 267 | closecxx . . $ close(7864480464b09eea).(udp_clt_sk); |
| 268 | |
| 269 | /* Get the shutdown complete notification. */ |
| 270 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 271 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 272 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 273 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 274 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_SHUTDOWN_COMPcxx . . $ SCTP_SHUTDOWN_COMP.); |
| 275 | |
| 276 | error = 0; |
| 277 | closecxx . . $ close(7864480464b09eea).(udp_svr_sk); |
| 278 | |
| 279 | /* TEST #2: SCTP_EVENTS socket option and SCTP_SHUTDOWN_EVENT |
| 280 | * notification. |
| 281 | */ |
| 282 | /* Create the two endpoints which will talk to each other. */ |
| 283 | udp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 284 | udp_clt_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 285 | |
| 286 | /* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */ |
| 287 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_svr_sk); |
| 288 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_clt_sk); |
| 289 | |
| 290 | /* Bind these sockets to the test ports. */ |
| 291 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_svr_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 292 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_clt_sk, &udp_clt_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_clt_loop)); |
| 293 | |
| 294 | /* Mark udp_svr_sk as being able to accept new associations. */ |
| 295 | test_listencxx . . $ test_listen(9b79fb6aee4c0440).(udp_svr_sk, 1); |
| 296 | |
| 297 | /* Get the default events that are enabled on udp_svr_sk. */ |
| 298 | optlen = sizeof(subscribe); |
| 299 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, &optlen); |
| 300 | |
| 301 | /* Get the default events that are enabled on udp_clt_sk. */ |
| 302 | optlen = sizeof(subscribe); |
| 303 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, &optlen); |
| 304 | |
| 305 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_EVENTS)"); |
| 306 | |
| 307 | /* Disable all the events on udp_svr_sk and udp_clt_sk. */ |
| 308 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&subscribe, 0, sizeof(struct sctp_event_subscribecxx . . $ sctp_event_subscribe#)); |
| 309 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, |
| 310 | sizeof(subscribe)); |
| 311 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_clt_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, |
| 312 | sizeof(subscribe)); |
| 313 | |
| 314 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_EVENTS)"); |
| 315 | |
| 316 | /* Get the updated list of enabled events on udp_svr_sk and |
| 317 | * udp_clt_sk. |
| 318 | */ |
| 319 | optlen = sizeof(subscribe); |
| 320 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, &optlen); |
| 321 | optlen = sizeof(subscribe); |
| 322 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, &optlen); |
| 323 | |
| 324 | /* Send a message. This will create the association. */ |
| 325 | outmessage.msg_iovcxx . . $ msghdr#msg_iov.->iov_basecxx . . $ iovec#iov_base. = message; |
| 326 | outmessage.msg_iovcxx . . $ msghdr#msg_iov.->iov_lencxx . . $ iovec#iov_len. = strlencxx . . $ strlen(751346f8406fd082).(message) + 1; |
| 327 | test_sendmsgcxx . . $ test_sendmsg(c45a39c477f473e).(udp_clt_sk, &outmessage, 0, strlencxx . . $ strlen(751346f8406fd082).(message)+1); |
| 328 | |
| 329 | /* Get the message which was sent. */ |
| 330 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 331 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 332 | test_check_msg_datacxx . . $ test_check_msg_data(87a4c472fd2f0d28).(&inmessage, error, strlencxx . . $ strlen(751346f8406fd082).(message) + 1, |
| 333 | MSG_EORcxx . . $ `<external>/8962547315054503424/socket.h:228:9`!, 0, 0); |
| 334 | /* Verify that we received the msg without any ancillary data. */ |
| 335 | if (inmessage.msg_controllencxx . . $ msghdr#msg_controllen. != 0) |
| 336 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "Receive unexpected ancillary" |
| 337 | "data"); |
| 338 | |
| 339 | /* Enable SCTP_SHUTDOWN_EVENTs on udp_svr_sk. */ |
| 340 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&subscribe, 0, sizeof(struct sctp_event_subscribecxx . . $ sctp_event_subscribe#)); |
| 341 | subscribe.sctp_shutdown_eventcxx . . $ sctp_event_subscribe#sctp_shutdown_event. = 1; |
| 342 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_EVENTScxx . . $ `<external>/17169092326581286071/sctp.h:80:9`!, &subscribe, |
| 343 | sizeof(subscribe)); |
| 344 | |
| 345 | error = 0; |
| 346 | /* Shut down the link. */ |
| 347 | closecxx . . $ close(7864480464b09eea).(udp_clt_sk); |
| 348 | |
| 349 | /* Get the SHUTDOWN_EVENT notification on udp_svr_sk. */ |
| 350 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 351 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 352 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 353 | sizeof(struct sctp_shutdown_eventcxx . . $ sctp_shutdown_event#), |
| 354 | SCTP_SHUTDOWN_EVENTcxx . . $ `<external>/17169092326581286071/sctp.h:674:9`!, 0); |
| 355 | |
| 356 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_EVENTS) - SCTP_SHUTDOWN_EVENT"); |
| 357 | |
| 358 | closecxx . . $ close(7864480464b09eea).(udp_svr_sk); |
| 359 | |
| 360 | /* TEST #3: whether sctp_opt_info equals */ |
| 361 | /* Create the two endpoints which will talk to each other. */ |
| 362 | udp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 363 | udp_clt_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 364 | |
| 365 | /* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */ |
| 366 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_svr_sk); |
| 367 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_clt_sk); |
| 368 | |
| 369 | /* Bind these sockets to the test ports. */ |
| 370 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_svr_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 371 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_clt_sk, &udp_clt_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_clt_loop)); |
| 372 | |
| 373 | /* Mark udp_svr_sk as being able to accept new associations. */ |
| 374 | test_listencxx . . $ test_listen(9b79fb6aee4c0440).(udp_svr_sk, 1); |
| 375 | |
| 376 | /* Send the first message. This will create the association. */ |
| 377 | outmessage.msg_namecxx . . $ msghdr#msg_name. = &udp_svr_loop; |
| 378 | outmessage.msg_namelencxx . . $ msghdr#msg_namelen. = sizeof(udp_svr_loop); |
| 379 | outmessage.msg_iovcxx . . $ msghdr#msg_iov. = &out_iov; |
| 380 | outmessage.msg_iovlencxx . . $ msghdr#msg_iovlen. = 1; |
| 381 | outmessage.msg_controlcxx . . $ msghdr#msg_control. = outcmsg; |
| 382 | outmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(outcmsg); |
| 383 | outmessage.msg_flagscxx . . $ msghdr#msg_flags. = 0; |
| 384 | cmsg = CMSG_FIRSTHDRcxx . . $ `<external>/8962547315054503424/socket.h:304:9`!(&outmessage); |
| 385 | cmsg->cmsg_levelcxx . . $ cmsghdr#cmsg_level. = IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!; |
| 386 | cmsg->cmsg_typecxx . . $ cmsghdr#cmsg_type. = SCTP_SNDRCVcxx . . $ `<external>/17169092326581286071/sctp.h:333:9`!; |
| 387 | cmsg->cmsg_lencxx . . $ cmsghdr#cmsg_len. = CMSG_LENcxx . . $ `<external>/8962547315054503424/socket.h:311:9`!(sizeof(struct sctp_sndrcvinfo)); |
| 388 | outmessage.msg_controllencxx . . $ msghdr#msg_controllen. = cmsg->cmsg_lencxx . . $ cmsghdr#cmsg_len.; |
| 389 | sinfo = (struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo# *)CMSG_DATAcxx . . $ `<external>/8962547315054503424/socket.h:299:10`!(cmsg); |
| 390 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(sinfo, 0x00, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 391 | ppid = randcxx . . $ rand(b126dc7c1de90089).(); /* Choose an arbitrary value. */ |
| 392 | stream = 1; |
| 393 | sinfo->sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = ppid; |
| 394 | sinfo->sinfo_streamcxx . . $ sctp_sndrcvinfo#sinfo_stream. = stream; |
| 395 | outmessage.msg_iovcxx . . $ msghdr#msg_iov.->iov_basecxx . . $ iovec#iov_base. = message; |
| 396 | outmessage.msg_iovcxx . . $ msghdr#msg_iov.->iov_lencxx . . $ iovec#iov_len. = strlencxx . . $ strlen(751346f8406fd082).(message) + 1; |
| 397 | test_sendmsgcxx . . $ test_sendmsg(c45a39c477f473e).(udp_clt_sk, &outmessage, 0, strlencxx . . $ strlen(751346f8406fd082).(message)+1); |
| 398 | |
| 399 | /* Get the communication up message on udp_clt_sk. */ |
| 400 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 401 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_clt_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 402 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 403 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 404 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_COMM_UPcxx . . $ SCTP_COMM_UP.); |
| 405 | sac = (struct sctp_assoc_changecxx . . $ sctp_assoc_change# *)iov.iov_basecxx . . $ iovec#iov_base.; |
| 406 | udp_clt_associd = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 407 | |
| 408 | /* Compare the SCTP_STATUS result between sctp_opt_info and |
| 409 | * getsockopt |
| 410 | */ |
| 411 | { |
| 412 | struct sctp_statuscxx . . $ sctp_status# status1, status2; |
| 413 | |
| 414 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&status1, 0, sizeof(status1)); |
| 415 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&status2, 0, sizeof(status2)); |
| 416 | optlen = sizeof(struct sctp_statuscxx . . $ sctp_status#); |
| 417 | |
| 418 | /* Test SCTP_STATUS for udp_clt_sk's given association. */ |
| 419 | error = sctp_opt_infocxx . . $ sctp_opt_info(b79d9f11efef15f9).(udp_clt_sk,udp_clt_associd,SCTP_STATUScxx . . $ `<external>/17169092326581286071/sctp.h:83:9`!, |
| 420 | (char *)&status1, &optlen); |
| 421 | if (error != 0) |
| 422 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, |
| 423 | "sctp_opt_info(SCTP_STATUS): %s", |
| 424 | strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 425 | |
| 426 | status2.sstat_assoc_idcxx . . $ sctp_status#sstat_assoc_id. = udp_clt_associd; |
| 427 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_clt_sk, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!, SCTP_STATUScxx . . $ `<external>/17169092326581286071/sctp.h:83:9`!, |
| 428 | (char *)&status2, &optlen); |
| 429 | if (error != 0) |
| 430 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, |
| 431 | "getsockopt(SCTP_STATUS): %s", |
| 432 | strerror(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)); |
| 433 | if (strncmpcxx . . $ strncmp(fd278af2f295fa2e).((char *)&status1, (char *)&status2, optlen)) |
| 434 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "sctp_opt_info(SCTP_STAUS)" |
| 435 | "doesn't match getsockopt(SCTP_STATUS)"); |
| 436 | |
| 437 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "sctp_opt_info(SCTP_STATUS)"); |
| 438 | } |
| 439 | error = 0; |
| 440 | /* Shut down the link. */ |
| 441 | closecxx . . $ close(7864480464b09eea).(udp_svr_sk); |
| 442 | closecxx . . $ close(7864480464b09eea).(udp_clt_sk); |
| 443 | |
| 444 | /* TEST #4: SCTP_INITMSG socket option. */ |
| 445 | /* Create a socket. */ |
| 446 | udp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 447 | |
| 448 | /* Bind this socket to the test port. */ |
| 449 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_svr_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 450 | |
| 451 | /* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */ |
| 452 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_svr_sk); |
| 453 | |
| 454 | /* Get the default parameters for association initialization. */ |
| 455 | optlen = sizeof(initmsg); |
| 456 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_INITMSGcxx . . $ `<external>/17169092326581286071/sctp.h:71:9`!, &initmsg, &optlen); |
| 457 | |
| 458 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_INITMSG)"); |
| 459 | |
| 460 | /* Change the parameters for association initialization. */ |
| 461 | initmsg.sinit_num_ostreamscxx . . $ sctp_initmsg#sinit_num_ostreams. = 5; |
| 462 | initmsg.sinit_max_instreamscxx . . $ sctp_initmsg#sinit_max_instreams. = 5; |
| 463 | initmsg.sinit_max_attemptscxx . . $ sctp_initmsg#sinit_max_attempts. = 3; |
| 464 | initmsg.sinit_max_init_timeocxx . . $ sctp_initmsg#sinit_max_init_timeo. = 30; |
| 465 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_INITMSGcxx . . $ `<external>/17169092326581286071/sctp.h:71:9`!, &initmsg, sizeof(initmsg)); |
| 466 | |
| 467 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_INITMSG)"); |
| 468 | |
| 469 | /* Get the updated parameters for association initialization. */ |
| 470 | optlen = sizeof(initmsg); |
| 471 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_INITMSGcxx . . $ `<external>/17169092326581286071/sctp.h:71:9`!, &initmsg, &optlen); |
| 472 | |
| 473 | closecxx . . $ close(7864480464b09eea).(udp_svr_sk); |
| 474 | |
| 475 | /* TEST #5: SCTP_PEER_ADDR_PARAMS socket option. */ |
| 476 | /* Create a socket. */ |
| 477 | udp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 478 | |
| 479 | /* Get the default parameters for this endpoint */ |
| 480 | optlen = sizeof(paddrparams); |
| 481 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 482 | paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address..ss_familycxx . . $ sockaddr_storage#ss_family. = AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!; |
| 483 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, &paddrparams, |
| 484 | &optlen); |
| 485 | |
| 486 | dflt_pathmaxrxt = paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt.; |
| 487 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_PEER_ADDR_PARAMS)"); |
| 488 | |
| 489 | /* Change the default parameters for this endpoint (socket) */ |
| 490 | paddrparams.spp_hbintervalcxx . . $ sctp_paddrparams#spp_hbinterval. = 1000; |
| 491 | paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. = dflt_pathmaxrxt+1; |
| 492 | paddrparams.spp_sackdelaycxx . . $ sctp_paddrparams#spp_sackdelay. = 100; |
| 493 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, &paddrparams, |
| 494 | sizeof(paddrparams)); |
| 495 | |
| 496 | paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. = 0; |
| 497 | |
| 498 | /* Get the updated default parameters for this endpoint. */ |
| 499 | optlen = sizeof(paddrparams); |
| 500 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, &paddrparams, |
| 501 | &optlen); |
| 502 | if (paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. != dflt_pathmaxrxt+1) |
| 503 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 504 | "mismatch"); |
| 505 | |
| 506 | value.assoc_idcxx . . $ sctp_assoc_value#assoc_id. = 0; |
| 507 | optlen = sizeof(value); |
| 508 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_DELAYED_ACK_TIMEcxx . . $ `<external>/17169092326581286071/sctp.h:85:9`!, &value, |
| 509 | &optlen); |
| 510 | if (value.assoc_valuecxx . . $ sctp_assoc_value#assoc_value. != 100) |
| 511 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DELAYED_ACK_TIME) " |
| 512 | "mismatch"); |
| 513 | |
| 514 | value.assoc_idcxx . . $ sctp_assoc_value#assoc_id. = 0; |
| 515 | value.assoc_valuecxx . . $ sctp_assoc_value#assoc_value. = 250; |
| 516 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_DELAYED_ACK_TIMEcxx . . $ `<external>/17169092326581286071/sctp.h:85:9`!, &value, |
| 517 | sizeof(value)); |
| 518 | optlen = sizeof(paddrparams); |
| 519 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, &paddrparams, |
| 520 | &optlen); |
| 521 | if (paddrparams.spp_sackdelaycxx . . $ sctp_paddrparams#spp_sackdelay. != 250) |
| 522 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_DELAYED_ACK_TIME) " |
| 523 | "mismatch"); |
| 524 | |
| 525 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DELAYED_ACK_TIME)"); |
| 526 | |
| 527 | |
| 528 | /* Ensure that prior defaults are preserved for a new endpoint */ |
| 529 | udp_clt_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 530 | optlen = sizeof(paddrparams); |
| 531 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 532 | paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address..ss_familycxx . . $ sockaddr_storage#ss_family. = AF_INETcxx . . $ `<external>/8962547315054503424/socket.h:97:9`!; |
| 533 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, &paddrparams, |
| 534 | &optlen); |
| 535 | if (paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. != dflt_pathmaxrxt) |
| 536 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 537 | "mismatch"); |
| 538 | |
| 539 | |
| 540 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS)"); |
| 541 | |
| 542 | /* Invalid assoc id */ |
| 543 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = 1234; |
| 544 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 545 | &paddrparams, |
| 546 | sizeof(paddrparams)); |
| 547 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 548 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 549 | "invalid associd error:%d, errno:%d\n", |
| 550 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 551 | |
| 552 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 553 | "- one-to-many style invalid associd"); |
| 554 | |
| 555 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_svr_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 556 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_clt_sk, &udp_clt_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_clt_loop)); |
| 557 | |
| 558 | test_listencxx . . $ test_listen(9b79fb6aee4c0440).(udp_svr_sk, 5); |
| 559 | |
| 560 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_svr_sk); |
| 561 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_clt_sk); |
| 562 | |
| 563 | /* Do a connect on a UDP-style socket and establish an association. */ |
| 564 | test_connectcxx . . $ test_connect(18e507052d945257).(udp_clt_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 565 | |
| 566 | /* Receive the COMM_UP notifications and get the associd's */ |
| 567 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 568 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 569 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 570 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 571 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_COMM_UPcxx . . $ SCTP_COMM_UP.); |
| 572 | sac = (struct sctp_assoc_changecxx . . $ sctp_assoc_change# *)iov.iov_basecxx . . $ iovec#iov_base.; |
| 573 | |
| 574 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 575 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 576 | paddrparams.spp_hbintervalcxx . . $ sctp_paddrparams#spp_hbinterval. = 1000; |
| 577 | paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. = dflt_pathmaxrxt+1; |
| 578 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, &paddrparams, |
| 579 | sizeof(paddrparams)); |
| 580 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) - " |
| 581 | "one-to-many style valid associd valid address"); |
| 582 | |
| 583 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 584 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_svr_loop, sizeof(udp_svr_loop)); |
| 585 | paddrparams.spp_hbintervalcxx . . $ sctp_paddrparams#spp_hbinterval. = 1000; |
| 586 | paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. = dflt_pathmaxrxt+1; |
| 587 | |
| 588 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 589 | &paddrparams, |
| 590 | sizeof(paddrparams)); |
| 591 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 592 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 593 | "invalid transport error:%d, errno:%d\n", |
| 594 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 595 | |
| 596 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 597 | "- one-to-many style invalid transport"); |
| 598 | |
| 599 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 600 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 601 | paddrparams.spp_hbintervalcxx . . $ sctp_paddrparams#spp_hbinterval. = 1000; |
| 602 | paddrparams.spp_pathmaxrxtcxx . . $ sctp_paddrparams#spp_pathmaxrxt. = dflt_pathmaxrxt+1; |
| 603 | |
| 604 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 605 | &paddrparams, |
| 606 | sizeof(paddrparams) - 1); |
| 607 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 608 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 609 | "invalid parameter length error:%d, errno:%d\n", |
| 610 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 611 | |
| 612 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 613 | "- one-to-many style invalid parameter length"); |
| 614 | |
| 615 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_DELAYED_ACK_TIMEcxx . . $ `<external>/17169092326581286071/sctp.h:85:9`!, |
| 616 | &value, |
| 617 | sizeof(value) - 1); |
| 618 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 619 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_DELAYED_ACK_TIME) " |
| 620 | "invalid parameter length error:%d, errno:%d\n", |
| 621 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 622 | |
| 623 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DELAYED_ACK_TIME) " |
| 624 | "- one-to-many style invalid parameter length"); |
| 625 | |
| 626 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 627 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 628 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 629 | paddrparams.spp_sackdelaycxx . . $ sctp_paddrparams#spp_sackdelay. = 501; |
| 630 | |
| 631 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 632 | &paddrparams, |
| 633 | sizeof(paddrparams)); |
| 634 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 635 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 636 | "invalid sack delay error:%d, errno:%d\n", |
| 637 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 638 | |
| 639 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 640 | "- one-to-many style invalid sack delay"); |
| 641 | |
| 642 | value.assoc_idcxx . . $ sctp_assoc_value#assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 643 | value.assoc_valuecxx . . $ sctp_assoc_value#assoc_value. = 501; |
| 644 | |
| 645 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_DELAYED_ACK_TIMEcxx . . $ `<external>/17169092326581286071/sctp.h:85:9`!, |
| 646 | &value, |
| 647 | sizeof(value)); |
| 648 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 649 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_DELAYED_ACK_TIME) " |
| 650 | "invalid sack delay error:%d, errno:%d\n", |
| 651 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 652 | |
| 653 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DELAYED_ACK_TIME) " |
| 654 | "- one-to-many style invalid sack delay"); |
| 655 | |
| 656 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 657 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 658 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 659 | paddrparams.spp_pathmtucxx . . $ sctp_paddrparams#spp_pathmtu. = 511; |
| 660 | |
| 661 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 662 | &paddrparams, |
| 663 | sizeof(paddrparams)); |
| 664 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 665 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 666 | "invalid path MTU error:%d, errno:%d\n", |
| 667 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 668 | |
| 669 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 670 | "- one-to-many style invalid path MTU"); |
| 671 | |
| 672 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 673 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 674 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 675 | paddrparams.spp_flagscxx . . $ sctp_paddrparams#spp_flags. = SPP_HB_ENABLEcxx . . $ SPP_HB_ENABLE. | SPP_HB_DISABLEcxx . . $ SPP_HB_DISABLE.; |
| 676 | |
| 677 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 678 | &paddrparams, |
| 679 | sizeof(paddrparams)); |
| 680 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 681 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 682 | "invalid hb enable flags error:%d, errno:%d\n", |
| 683 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 684 | |
| 685 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 686 | "- one-to-many style invalid hb enable flags"); |
| 687 | |
| 688 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 689 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 690 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 691 | paddrparams.spp_flagscxx . . $ sctp_paddrparams#spp_flags. = SPP_PMTUD_ENABLEcxx . . $ SPP_PMTUD_ENABLE. | SPP_PMTUD_DISABLEcxx . . $ SPP_PMTUD_DISABLE.; |
| 692 | |
| 693 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 694 | &paddrparams, |
| 695 | sizeof(paddrparams)); |
| 696 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 697 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 698 | "invalid PMTU discovery enable flags error:%d, errno:%d\n", |
| 699 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 700 | |
| 701 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 702 | "- one-to-many style invalid PMTU discovery enable flags"); |
| 703 | |
| 704 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 705 | paddrparams.spp_assoc_idcxx . . $ sctp_paddrparams#spp_assoc_id. = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 706 | memcpycxx . . $ memcpy(cc817cb175f282d).(&paddrparams.spp_addresscxx . . $ sctp_paddrparams#spp_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 707 | paddrparams.spp_flagscxx . . $ sctp_paddrparams#spp_flags. = SPP_SACKDELAY_ENABLEcxx . . $ SPP_SACKDELAY_ENABLE. | SPP_SACKDELAY_DISABLEcxx . . $ SPP_SACKDELAY_DISABLE.; |
| 708 | |
| 709 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 710 | &paddrparams, |
| 711 | sizeof(paddrparams)); |
| 712 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 713 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 714 | "invalid sack delay enable flags error:%d, errno:%d\n", |
| 715 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 716 | |
| 717 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 718 | "- one-to-many style invalid sack delay enable flags"); |
| 719 | |
| 720 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&paddrparams, 0, sizeof(paddrparams)); |
| 721 | paddrparams.spp_flagscxx . . $ sctp_paddrparams#spp_flags. = SPP_HB_DEMANDcxx . . $ SPP_HB_DEMAND.; |
| 722 | |
| 723 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_PEER_ADDR_PARAMScxx . . $ `<external>/17169092326581286071/sctp.h:78:9`!, |
| 724 | &paddrparams, |
| 725 | sizeof(paddrparams)); |
| 726 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 727 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 728 | "invalid hb demand error:%d, errno:%d\n", |
| 729 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 730 | |
| 731 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_PEER_ADDR_PARAMS) " |
| 732 | "- one-to-many style invalid hb demand"); |
| 733 | |
| 734 | closecxx . . $ close(7864480464b09eea).(udp_svr_sk); |
| 735 | closecxx . . $ close(7864480464b09eea).(udp_clt_sk); |
| 736 | |
| 737 | |
| 738 | /* TEST #6: SCTP_DEFAULT_SEND_PARAM socket option. */ |
| 739 | /* Create and bind 2 UDP-style sockets(udp_svr_sk, udp_clt_sk) and |
| 740 | * 2 TCP-style sockets. (tcp_svr_sk, tcp_clt_sk) |
| 741 | */ |
| 742 | udp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 743 | udp_clt_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_SEQPACKETcxx . . $ `<external>/5956532346368192945/socket_type.h:38:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 744 | tcp_svr_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_STREAMcxx . . $ `<external>/5956532346368192945/socket_type.h:28:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 745 | tcp_clt_sk = test_socketcxx . . $ test_socket(2326284602b0bb2d).(pf_class, SOCK_STREAMcxx . . $ `<external>/5956532346368192945/socket_type.h:28:9`!, IPPROTO_SCTPcxx . . $ `<external>/9581057695539925927/in.h:87:9`!); |
| 746 | |
| 747 | /* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */ |
| 748 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_svr_sk); |
| 749 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(udp_clt_sk); |
| 750 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(tcp_svr_sk); |
| 751 | test_enable_assoc_changecxx . . $ test_enable_assoc_change(d4f767463ce0a6b3).(tcp_clt_sk); |
| 752 | |
| 753 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_svr_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 754 | test_bindcxx . . $ test_bind(18e507052d945257).(udp_clt_sk, &udp_clt_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_clt_loop)); |
| 755 | test_bindcxx . . $ test_bind(18e507052d945257).(tcp_svr_sk, &tcp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(tcp_svr_loop)); |
| 756 | test_bindcxx . . $ test_bind(18e507052d945257).(tcp_clt_sk, &tcp_clt_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(tcp_clt_loop)); |
| 757 | |
| 758 | /* Mark udp_svr_sk and tcp_svr_sk as being able to accept new |
| 759 | * associations. |
| 760 | */ |
| 761 | test_listencxx . . $ test_listen(9b79fb6aee4c0440).(udp_svr_sk, 5); |
| 762 | test_listencxx . . $ test_listen(9b79fb6aee4c0440).(tcp_svr_sk, 5); |
| 763 | |
| 764 | /* Set default send parameters on the unconnected UDP-style sockets. */ |
| 765 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 766 | set_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 1000; |
| 767 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 768 | &set_udp_sk_dflt_param, sizeof(set_udp_sk_dflt_param)); |
| 769 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 770 | set_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 1000; |
| 771 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 772 | &set_udp_sk_dflt_param, sizeof(set_udp_sk_dflt_param)); |
| 773 | |
| 774 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 775 | "one-to-many style socket"); |
| 776 | |
| 777 | /* Get default send parameters on the unconnected UDP-style socket. */ |
| 778 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 779 | optlen = sizeof(get_udp_sk_dflt_param); |
| 780 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 781 | &get_udp_sk_dflt_param, &optlen); |
| 782 | |
| 783 | /* Verify that the get param matches set param. */ |
| 784 | if (set_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 785 | get_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 786 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 787 | "mismatch."); |
| 788 | |
| 789 | /* Get default send parameters on the unconnected UDP-style socket. */ |
| 790 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 791 | optlen = sizeof(get_udp_sk_dflt_param); |
| 792 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 793 | &get_udp_sk_dflt_param, &optlen); |
| 794 | |
| 795 | /* Verify that the get param matches set param. */ |
| 796 | if (set_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 797 | get_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 798 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 799 | "mismatch."); |
| 800 | |
| 801 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 802 | "one-to-many style socket"); |
| 803 | |
| 804 | /* Verify that trying to set send params with an invalid assoc id |
| 805 | * on an UDP-style socket fails. |
| 806 | */ |
| 807 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 808 | set_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 1000; |
| 809 | /* Invalid assoc id */ |
| 810 | set_udp_sk_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = 1234; |
| 811 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 812 | &set_udp_sk_dflt_param, |
| 813 | sizeof(set_udp_sk_dflt_param)); |
| 814 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 815 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 816 | "invalid associd error:%d, errno:%d\n", |
| 817 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 818 | |
| 819 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 820 | "- one-to-many style invalid associd"); |
| 821 | |
| 822 | /* Do a connect on a UDP-style socket and establish an association. */ |
| 823 | test_connectcxx . . $ test_connect(18e507052d945257).(udp_clt_sk, &udp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(udp_svr_loop)); |
| 824 | |
| 825 | /* Receive the COMM_UP notifications and get the associd's */ |
| 826 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 827 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_svr_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 828 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 829 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 830 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_COMM_UPcxx . . $ SCTP_COMM_UP.); |
| 831 | sac = (struct sctp_assoc_changecxx . . $ sctp_assoc_change# *)iov.iov_basecxx . . $ iovec#iov_base.; |
| 832 | udp_svr_associd = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 833 | |
| 834 | inmessage.msg_controllencxx . . $ msghdr#msg_controllen. = sizeof(incmsg); |
| 835 | error = test_recvmsgcxx . . $ test_recvmsg(2284ea468be03a33).(udp_clt_sk, &inmessage, MSG_WAITALLcxx . . $ `<external>/8962547315054503424/socket.h:230:9`!); |
| 836 | test_check_msg_notificationcxx . . $ test_check_msg_notification(bda0d4705bf9b0d0).(&inmessage, error, |
| 837 | sizeof(struct sctp_assoc_changecxx . . $ sctp_assoc_change#), |
| 838 | SCTP_ASSOC_CHANGEcxx . . $ `<external>/17169092326581286071/sctp.h:666:9`!, SCTP_COMM_UPcxx . . $ SCTP_COMM_UP.); |
| 839 | sac = (struct sctp_assoc_changecxx . . $ sctp_assoc_change# *)iov.iov_basecxx . . $ iovec#iov_base.; |
| 840 | udp_clt_associd = sac->sac_assoc_idcxx . . $ sctp_assoc_change#sac_assoc_id.; |
| 841 | |
| 842 | /* Verify that trying to set send params with an assoc id not |
| 843 | * belonging to the socket on an UDP-style socket fails. |
| 844 | */ |
| 845 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_udp_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 846 | set_udp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 3000; |
| 847 | set_udp_assoc_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = udp_clt_associd; |
| 848 | error = setsockoptcxx . . $ setsockopt(506cc1d0fc70fdf1).(udp_svr_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 849 | &set_udp_assoc_dflt_param, |
| 850 | sizeof(set_udp_assoc_dflt_param)); |
| 851 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 852 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "setsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 853 | "associd belonging to another socket " |
| 854 | "error:%d, errno:%d", error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 855 | |
| 856 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 857 | "one-to-many style associd belonging to another socket"); |
| 858 | |
| 859 | /* Set default send parameters of an association on the listening |
| 860 | * UDP-style socket with a valid associd. |
| 861 | */ |
| 862 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_udp_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 863 | set_udp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 3000; |
| 864 | set_udp_assoc_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = udp_svr_associd; |
| 865 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(udp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 866 | &set_udp_assoc_dflt_param, |
| 867 | sizeof(set_udp_assoc_dflt_param)); |
| 868 | |
| 869 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 870 | "one-to-many style valid associd"); |
| 871 | |
| 872 | /* Get default send parameters of an association on the listening |
| 873 | * UDP-style socket with a valid associd. |
| 874 | */ |
| 875 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_udp_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 876 | get_udp_assoc_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = udp_svr_associd ; |
| 877 | optlen = sizeof(get_udp_assoc_dflt_param); |
| 878 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 879 | &get_udp_assoc_dflt_param, &optlen); |
| 880 | |
| 881 | /* Verify that the get param matches the set param. */ |
| 882 | if (get_udp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 883 | set_udp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 884 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 885 | "mismatch."); |
| 886 | |
| 887 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 888 | "one-to-many style valid associd"); |
| 889 | |
| 890 | /* Get default send parameters of an association on the connected |
| 891 | * UDP-style socket with zero associd. This should return the |
| 892 | * socket wide default parameters. |
| 893 | */ |
| 894 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 895 | get_udp_sk_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = 0 ; |
| 896 | optlen = sizeof(get_udp_sk_dflt_param); |
| 897 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 898 | &get_udp_sk_dflt_param, &optlen); |
| 899 | |
| 900 | /* Verify that the get param matches the socket-wide set param. */ |
| 901 | if (get_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 902 | set_udp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 903 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 904 | "mismatch."); |
| 905 | |
| 906 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 907 | "one-to-many style zero associd"); |
| 908 | |
| 909 | peeloff_sk = test_sctp_peeloffcxx . . $ test_sctp_peeloff(9b79fb6aee4c0440).(udp_svr_sk, udp_svr_associd); |
| 910 | |
| 911 | /* Get default send parameters of an association on the peeled off |
| 912 | * UDP-style socket. This should return the association's default |
| 913 | * parameters. |
| 914 | */ |
| 915 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_peeloff_assoc_dflt_param, 0, |
| 916 | sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 917 | get_peeloff_assoc_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = 0 ; |
| 918 | optlen = sizeof(get_peeloff_assoc_dflt_param); |
| 919 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(peeloff_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 920 | &get_peeloff_assoc_dflt_param, &optlen); |
| 921 | |
| 922 | /* Verify that the get param matches the association's set param. */ |
| 923 | if (get_peeloff_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 924 | set_udp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 925 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 926 | "mismatch."); |
| 927 | |
| 928 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 929 | "one-to-many style peeled off socket"); |
| 930 | |
| 931 | /* Set default send parameters on the unconnected TCP-style sockets. */ |
| 932 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 933 | set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 2000; |
| 934 | /* Invalid assoc id, ignored on a TCP-style socket. */ |
| 935 | set_tcp_sk_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = 1234; |
| 936 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(tcp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 937 | &set_tcp_sk_dflt_param, |
| 938 | sizeof(set_tcp_sk_dflt_param)); |
| 939 | |
| 940 | /* Set default send parameters on the unconnected TCP-style sockets. */ |
| 941 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 942 | set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 2000; |
| 943 | /* Invalid assoc id, ignored on a TCP-style socket. */ |
| 944 | set_tcp_sk_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = 1234; |
| 945 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(tcp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 946 | &set_tcp_sk_dflt_param, |
| 947 | sizeof(set_tcp_sk_dflt_param)); |
| 948 | |
| 949 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 950 | "one-to-one style socket"); |
| 951 | |
| 952 | /* Get default send parameters on the unconnected TCP-style socket. */ |
| 953 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 954 | optlen = sizeof(get_tcp_sk_dflt_param); |
| 955 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(tcp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 956 | &get_tcp_sk_dflt_param, &optlen); |
| 957 | |
| 958 | /* Verify that the get param matches set param. */ |
| 959 | if (set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 960 | get_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 961 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 962 | "mismatch."); |
| 963 | |
| 964 | /* Get default send parameters on the unconnected TCP-style socket. */ |
| 965 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 966 | optlen = sizeof(get_tcp_sk_dflt_param); |
| 967 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(tcp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 968 | &get_tcp_sk_dflt_param, &optlen); |
| 969 | |
| 970 | /* Verify that the get param matches set param. */ |
| 971 | if (set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 972 | get_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 973 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 974 | "mismatch."); |
| 975 | |
| 976 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 977 | "one-to-one style socket"); |
| 978 | |
| 979 | /* Do a connect on a TCP-style socket and establish an association. */ |
| 980 | test_connectcxx . . $ test_connect(18e507052d945257).(tcp_clt_sk, &tcp_svr_loop.sacxx . . $ $anonymous_type_f8e963888af85862_0#sa., sizeof(tcp_svr_loop)); |
| 981 | |
| 982 | /* Set default send parameters of an association on the connected |
| 983 | * TCP-style socket. |
| 984 | */ |
| 985 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&set_tcp_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 986 | set_tcp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. = 4000; |
| 987 | set_tcp_assoc_dflt_param.sinfo_assoc_idcxx . . $ sctp_sndrcvinfo#sinfo_assoc_id. = 0; |
| 988 | test_setsockoptcxx . . $ test_setsockopt(57908ac6eaa2fecc).(tcp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 989 | &set_tcp_assoc_dflt_param, |
| 990 | sizeof(set_tcp_assoc_dflt_param)); |
| 991 | |
| 992 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 993 | "one-to-one style assoc"); |
| 994 | |
| 995 | /* Get default send parameters of an association on the connected |
| 996 | * TCP-style socket. |
| 997 | */ |
| 998 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_tcp_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 999 | optlen = sizeof(get_tcp_assoc_dflt_param); |
| 1000 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(tcp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 1001 | &get_tcp_assoc_dflt_param, &optlen); |
| 1002 | |
| 1003 | if (set_tcp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 1004 | get_tcp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 1005 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 1006 | "mismatch."); |
| 1007 | |
| 1008 | /* Get default send parameters on the connected TCP-style socket. */ |
| 1009 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 1010 | optlen = sizeof(get_tcp_sk_dflt_param); |
| 1011 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(tcp_clt_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 1012 | &get_tcp_sk_dflt_param, &optlen); |
| 1013 | |
| 1014 | /* Verify that the get parameters returned matches the set param |
| 1015 | * set for the association, not the socket-wide param. |
| 1016 | */ |
| 1017 | if ((get_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. == |
| 1018 | set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) || |
| 1019 | (get_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 1020 | set_tcp_assoc_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.)) |
| 1021 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 1022 | "mismatch."); |
| 1023 | |
| 1024 | /* Get default send parameters on the listening TCP-style socket. */ |
| 1025 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 1026 | optlen = sizeof(get_tcp_sk_dflt_param); |
| 1027 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(tcp_svr_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 1028 | &get_tcp_sk_dflt_param, &optlen); |
| 1029 | |
| 1030 | /* Verify that the get parameters returned matches the socket-wide |
| 1031 | * set param. |
| 1032 | */ |
| 1033 | if (get_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 1034 | set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 1035 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 1036 | "mismatch."); |
| 1037 | |
| 1038 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 1039 | "one-to-one style assoc"); |
| 1040 | |
| 1041 | accept_sk = test_acceptcxx . . $ test_accept(46fcd054f4a4d98b).(tcp_svr_sk, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, &addrlen); |
| 1042 | |
| 1043 | /* Get default send parameters of an association on the accepted |
| 1044 | * TCP-style socket. |
| 1045 | */ |
| 1046 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&get_accept_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfocxx . . $ sctp_sndrcvinfo#)); |
| 1047 | optlen = sizeof(get_accept_assoc_dflt_param); |
| 1048 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(accept_sk, SCTP_DEFAULT_SEND_PARAMcxx . . $ `<external>/17169092326581286071/sctp.h:79:9`!, |
| 1049 | &get_accept_assoc_dflt_param, &optlen); |
| 1050 | |
| 1051 | error = 0; |
| 1052 | |
| 1053 | /* Verify that the get parameters returned matches the socket-wide |
| 1054 | * set param. |
| 1055 | */ |
| 1056 | if (get_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid. != |
| 1057 | set_tcp_sk_dflt_param.sinfo_ppidcxx . . $ sctp_sndrcvinfo#sinfo_ppid.) |
| 1058 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) " |
| 1059 | "mismatch."); |
| 1060 | |
| 1061 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - " |
| 1062 | "one-to-one style accepted socket"); |
| 1063 | |
| 1064 | /* TEST #7: SCTP_GET_PEER_ADDR_INFO socket option. */ |
| 1065 | /* Try 0 associd and 0 addr */ |
| 1066 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pinfo, 0, sizeof(pinfo)); |
| 1067 | optlen = sizeof(pinfo); |
| 1068 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_GET_PEER_ADDR_INFOcxx . . $ `<external>/17169092326581286071/sctp.h:84:9`!, |
| 1069 | &pinfo, &optlen); |
| 1070 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 1071 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_GET_PEER_ADDR_INFO) " |
| 1072 | "null associd, null addr error:%d, errno:%d\n", |
| 1073 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 1074 | |
| 1075 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - " |
| 1076 | "null associd and null addr"); |
| 1077 | |
| 1078 | /* Try valid associd, but 0 addr */ |
| 1079 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pinfo, 0, sizeof(pinfo)); |
| 1080 | optlen = sizeof(pinfo); |
| 1081 | pinfo.spinfo_assoc_idcxx . . $ sctp_paddrinfo#spinfo_assoc_id. = udp_clt_associd; |
| 1082 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_GET_PEER_ADDR_INFOcxx . . $ `<external>/17169092326581286071/sctp.h:84:9`!, |
| 1083 | &pinfo, &optlen); |
| 1084 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 1085 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_GET_PEER_ADDR_INFO) " |
| 1086 | "valid associd, null addr error:%d, errno:%d\n", |
| 1087 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 1088 | |
| 1089 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - " |
| 1090 | "valid associd and null addr"); |
| 1091 | |
| 1092 | /* Try valid associd, invalid addr */ |
| 1093 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pinfo, 0, sizeof(pinfo)); |
| 1094 | optlen = sizeof(pinfo); |
| 1095 | pinfo.spinfo_assoc_idcxx . . $ sctp_paddrinfo#spinfo_assoc_id. = udp_clt_associd; |
| 1096 | memcpycxx . . $ memcpy(cc817cb175f282d).(&pinfo.spinfo_addresscxx . . $ sctp_paddrinfo#spinfo_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 1097 | error = getsockoptcxx . . $ getsockopt(b79d9f11efef15f9).(udp_clt_sk, SOL_SCTPcxx . . $ `src/include/netinet/sctp.h:48:9`!, SCTP_GET_PEER_ADDR_INFOcxx . . $ `<external>/17169092326581286071/sctp.h:84:9`!, |
| 1098 | &pinfo, &optlen); |
| 1099 | if ((-1 != error) || (EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`! != errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!)) |
| 1100 | tst_brkmcxx . . $ `src/testlib/sctputil.h:116:9`!(TBROK, tst_exit, "getsockopt(SCTP_GET_PEER_ADDR_INFO) " |
| 1101 | "valid associd, invalid addr error:%d, errno:%d\n", |
| 1102 | error, errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!); |
| 1103 | |
| 1104 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - " |
| 1105 | "valid associd and invalid addr"); |
| 1106 | |
| 1107 | /* Try valid associd, valid addr */ |
| 1108 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pinfo, 0, sizeof(pinfo)); |
| 1109 | optlen = sizeof(pinfo); |
| 1110 | pinfo.spinfo_assoc_idcxx . . $ sctp_paddrinfo#spinfo_assoc_id. = udp_clt_associd; |
| 1111 | memcpycxx . . $ memcpy(cc817cb175f282d).(&pinfo.spinfo_addresscxx . . $ sctp_paddrinfo#spinfo_address., &udp_svr_loop, sizeof(udp_svr_loop)); |
| 1112 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(udp_clt_sk, SCTP_GET_PEER_ADDR_INFOcxx . . $ `<external>/17169092326581286071/sctp.h:84:9`!, &pinfo, &optlen); |
| 1113 | |
| 1114 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - " |
| 1115 | "valid associd and valid addr"); |
| 1116 | |
| 1117 | /* Try valid addr, peeled off socket */ |
| 1118 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pinfo, 0, sizeof(pinfo)); |
| 1119 | optlen = sizeof(pinfo); |
| 1120 | pinfo.spinfo_assoc_idcxx . . $ sctp_paddrinfo#spinfo_assoc_id. = 0; |
| 1121 | memcpycxx . . $ memcpy(cc817cb175f282d).(&pinfo.spinfo_addresscxx . . $ sctp_paddrinfo#spinfo_address., &udp_clt_loop, sizeof(udp_clt_loop)); |
| 1122 | test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(peeloff_sk, SCTP_GET_PEER_ADDR_INFOcxx . . $ `<external>/17169092326581286071/sctp.h:84:9`!, &pinfo, &optlen); |
| 1123 | |
| 1124 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - " |
| 1125 | "valid associd and valid addr peeled off socket"); |
| 1126 | |
| 1127 | /* Try valid addr, TCP-style accept socket */ |
| 1128 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pinfo, 0, sizeof(pinfo)); |
| 1129 | optlen = sizeof(pinfo); |
| 1130 | pinfo.spinfo_assoc_idcxx . . $ sctp_paddrinfo#spinfo_assoc_id. = 0; |
| 1131 | memcpycxx . . $ memcpy(cc817cb175f282d).(&pinfo.spinfo_addresscxx . . $ sctp_paddrinfo#spinfo_address., &tcp_clt_loop, sizeof(tcp_clt_loop)); |
| 1132 | error = test_getsockoptcxx . . $ test_getsockopt(55626bc83d624bdb).(accept_sk, SCTP_GET_PEER_ADDR_INFOcxx . . $ `<external>/17169092326581286071/sctp.h:84:9`!, &pinfo, |
| 1133 | &optlen); |
| 1134 | |
| 1135 | tst_resmcxx . . $ `src/testlib/sctputil.h:123:9`!(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - " |
| 1136 | "valid associd and valid addr accepted socket"); |
| 1137 | |
| 1138 | closecxx . . $ close(7864480464b09eea).(udp_svr_sk); |
| 1139 | closecxx . . $ close(7864480464b09eea).(udp_clt_sk); |
| 1140 | closecxx . . $ close(7864480464b09eea).(tcp_svr_sk); |
| 1141 | closecxx . . $ close(7864480464b09eea).(tcp_clt_sk); |
| 1142 | closecxx . . $ close(7864480464b09eea).(accept_sk); |
| 1143 | closecxx . . $ close(7864480464b09eea).(peeloff_sk); |
| 1144 | |
| 1145 | freecxx . . $ free(5d22bdacc48458e8).(big_buffer); |
| 1146 | /* Indicate successful completion. */ |
| 1147 | return 0; |
| 1148 | } |