/freebsd/tools/test/stress2/testcases/tcp/ |
H A D | tcp.c | 56 int tcpsock, msgsock; in reader() local 60 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) in reader() 63 if (setsockopt(tcpsock, in reader() 72 if (bind(tcpsock, in reader() 76 if (listen(tcpsock, 5) < 0) in reader() 84 if ((msgsock = accept(tcpsock, in reader() 104 int tcpsock, on; in writer() local 109 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) in writer() 112 if (setsockopt(tcpsock, in writer() 125 r = connect(tcpsock, (struct sockaddr *) &inetaddr, in writer() [all …]
|
/freebsd/tools/test/stress2/misc/ |
H A D | sendfile.sh | 77 int tcpsock, msgsock; 84 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 87 if (setsockopt(tcpsock, 96 if (bind(tcpsock, 100 if (listen(tcpsock, 5) < 0) 104 if ((msgsock = accept(tcpsock, 132 int tcpsock, on; 144 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 147 if (setsockopt(tcpsock, 153 if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, [all …]
|
H A D | jumbo.sh | 101 int *buf, i, n, msgsock, on, tcpsock; 105 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 108 if (setsockopt(tcpsock, 119 if (bind(tcpsock, 123 if (listen(tcpsock, 5) < 0) 127 if ((msgsock = accept(tcpsock, 155 int i, on, r, tcpsock; 163 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 166 if (setsockopt(tcpsock, 180 r = connect(tcpsock, (struct sockaddr *) &inetaddr, [all …]
|
H A D | msdos18.sh | 99 int on, n, tcpsock, msgsock; 102 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 105 if (setsockopt(tcpsock, 114 if (bind(tcpsock, 118 if (listen(tcpsock, 5) < 0) 122 if ((msgsock = accept(tcpsock, 138 close(tcpsock); 163 int i, on, r, tcpsock; 167 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 170 if (setsockopt(tcpsock, [all …]
|
H A D | tcp4.sh | 70 int tcpsock, msgsock ,on, n, *buf; 74 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 77 if (setsockopt(tcpsock, 86 if (bind(tcpsock, 90 if (listen(tcpsock, 5) < 0) 98 if ((msgsock = accept(tcpsock, 119 int tcpsock, on; 124 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 127 if (setsockopt(tcpsock, 140 r = connect(tcpsock, (struct sockaddr *) &inetaddr, [all …]
|
H A D | sendfile3.sh | 87 int tcpsock, msgsock; 94 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 97 if (setsockopt(tcpsock, 106 if (bind(tcpsock, 110 if (listen(tcpsock, 5) < 0) 114 if ((msgsock = accept(tcpsock, 139 int tcpsock, on; 148 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 151 if (setsockopt(tcpsock, 164 r = connect(tcpsock, (struct sockaddr *) &inetaddr, [all …]
|
H A D | sendfile12.sh | 101 int tcpsock, msgsock; 105 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 108 if (setsockopt(tcpsock, 117 if (bind(tcpsock, 121 if (listen(tcpsock, 5) < 0) 125 if ((msgsock = accept(tcpsock, 158 int i, fd, on, r, tcpsock; 163 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 166 if (setsockopt(tcpsock, 171 if (setsockopt(tcpsock, [all …]
|
H A D | sendfile20.sh | 111 int tcpsock, msgsock; 118 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 121 if (setsockopt(tcpsock, 130 if (bind(tcpsock, 134 if (listen(tcpsock, 5) < 0) 138 if ((msgsock = accept(tcpsock, 166 int tcpsock, on; 178 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 181 if (setsockopt(tcpsock, 187 if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, [all …]
|
H A D | sendfile24.sh | 103 int tcpsock, msgsock; 110 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 113 if (setsockopt(tcpsock, 122 if (bind(tcpsock, 126 if (listen(tcpsock, 5) < 0) 130 if ((msgsock = accept(tcpsock, 156 int tcpsock, on; 166 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 169 if (setsockopt(tcpsock, 174 if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, [all …]
|
H A D | callout_reset_on2.sh | 140 int tcpsock, msgsock; 148 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 151 if (setsockopt(tcpsock, 162 if (bind(tcpsock, 166 if (listen(tcpsock, 5) < 0) 170 if ((msgsock = accept(tcpsock, 199 int tcpsock, on; 212 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 215 if (setsockopt(tcpsock, 228 r = connect(tcpsock, (struct sockaddr *) &inetaddr, [all …]
|
H A D | tcp3.sh | 122 int tcpsock, msgsock; 125 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 128 if (setsockopt(tcpsock, 137 if (bind(tcpsock, 141 if (listen(tcpsock, 5) < 0) 148 if ((msgsock = accept(tcpsock, 169 int tcpsock, on; 173 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 176 if (setsockopt(tcpsock, 189 r = connect(tcpsock, (struct sockaddr *) &inetaddr, [all …]
|
H A D | sendfile11.sh | 102 int tcpsock, msgsock; 106 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 109 if (setsockopt(tcpsock, 118 if (bind(tcpsock, 122 if (listen(tcpsock, 5) < 0) 126 if ((msgsock = accept(tcpsock, 159 int i, fd, on, r, tcpsock; 163 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 166 if (setsockopt(tcpsock, 171 if (setsockopt(tcpsock, [all …]
|
H A D | sendfile19.sh | 110 int tcpsock, msgsock; 117 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 120 if (setsockopt(tcpsock, 129 if (bind(tcpsock, 133 if (listen(tcpsock, 5) < 0) 137 if ((msgsock = accept(tcpsock, 165 int tcpsock, on; 177 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 180 if (setsockopt(tcpsock, 186 if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, [all …]
|
H A D | sendfile25.sh | 104 int tcpsock, msgsock; 111 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 114 if (setsockopt(tcpsock, 123 if (bind(tcpsock, 127 if (listen(tcpsock, 5) < 0) 131 if ((msgsock = accept(tcpsock, 157 int tcpsock, on; 167 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 170 if (setsockopt(tcpsock, 175 if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, [all …]
|
H A D | sendfile8.sh | 110 int tcpsock, msgsock; 115 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 118 if (setsockopt(tcpsock, 127 if (bind(tcpsock, 131 if (listen(tcpsock, 5) < 0) 135 if ((msgsock = accept(tcpsock, 166 int tcpsock, on; 170 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 173 if (setsockopt(tcpsock, 178 if (setsockopt(tcpsock, [all …]
|
H A D | sendfile9.sh | 109 int tcpsock, msgsock; 114 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 117 if (setsockopt(tcpsock, 126 if (bind(tcpsock, 130 if (listen(tcpsock, 5) < 0) 134 if ((msgsock = accept(tcpsock, 165 int tcpsock, on; 169 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 172 if (setsockopt(tcpsock, 177 if (setsockopt(tcpsock, [all …]
|
H A D | callout_reset_on.sh | 169 int tcpsock, msgsock; 177 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 180 if (setsockopt(tcpsock, 191 if (bind(tcpsock, 195 if (listen(tcpsock, 5) < 0) 199 if ((msgsock = accept(tcpsock, 228 int tcpsock, on; 239 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 242 if (setsockopt(tcpsock, 255 r = connect(tcpsock, (struct sockaddr *) &inetaddr, [all …]
|
H A D | sendfile10.sh | 114 int tcpsock, msgsock; 121 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 124 if (setsockopt(tcpsock, 133 if (bind(tcpsock, 137 if (listen(tcpsock, 5) < 0) 142 if ((msgsock = accept(tcpsock, 186 int tcpsock, on; 190 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 193 if (setsockopt(tcpsock, 198 if (setsockopt(tcpsock, [all …]
|
H A D | setsockopt.sh | 84 int tcpsock, on; 89 if ((tcpsock = socket(arc4random() % 64, arc4random() % 10, arc4random() % 10)) != -1) 92 if (tcpsock == -1) 96 if (setsockopt(tcpsock, 101 r = setsockopt(tcpsock, arc4random(), arc4random(), (char *)&on, sizeof(on)); 121 r = connect(tcpsock, (struct sockaddr *) &inetaddr, 126 close(tcpsock); 128 write(tcpsock, "a", 1);
|
H A D | sendfile22.sh | 120 int error, from, i1, msgsock, n, on, port, r, status, tcpsock, to; 143 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 146 if (setsockopt(tcpsock, 161 r = connect(tcpsock, (struct sockaddr *) &inetaddr, 166 close(tcpsock); 190 error = sendfile(from, tcpsock, pos, st.st_size - 204 close(tcpsock); 212 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 215 if (setsockopt(tcpsock, 224 if (bind(tcpsock, [all …]
|
H A D | sendfile13.sh | 184 int tcpsock, msgsock; 195 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 198 if (setsockopt(tcpsock, 207 if (bind(tcpsock, 211 if (listen(tcpsock, 5) < 0) 218 if ((msgsock = accept(tcpsock, 268 int i, fd, on, r, tcpsock; 273 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 276 if (setsockopt(tcpsock, 281 if (setsockopt(tcpsock, [all …]
|
H A D | sendfile14.sh | 176 int tcpsock, msgsock; 188 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 191 if (setsockopt(tcpsock, 200 if (bind(tcpsock, 204 if (listen(tcpsock, 5) < 0) 211 if ((msgsock = accept(tcpsock, 263 int i, fd, on, r, tcpsock; 267 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) 270 if (setsockopt(tcpsock, 275 if (setsockopt(tcpsock, [all …]
|
/freebsd/usr.sbin/nfscbd/ |
H A D | nfscbd.c | 102 int nfssvc_flag, on, sock, tcpsock, ret, mustfreeai = 0; in main() local 254 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in main() 258 if (setsockopt(tcpsock, in main() 266 if (bind(tcpsock, in main() 271 if (listen(tcpsock, 5) < 0) { in main() 275 FD_SET(tcpsock, &sockbits); in main() 276 maxsock = tcpsock; in main() 294 if (FD_ISSET(tcpsock, &ready)) { in main() 296 if ((msgsock = accept(tcpsock, in main()
|
/freebsd/usr.sbin/nfsd/ |
H A D | nfsd.c | 156 int tcp6sock, ip6flag, tcpflag, tcpsock; in main() local 669 if ((tcpsock = socket(AF_INET, SOCK_STREAM, in main() 675 if (setsockopt(tcpsock, SOL_SOCKET, in main() 680 if (bind(tcpsock, ai_tcp->ai_addr, in main() 687 if (listen(tcpsock, -1) < 0) { in main() 692 FD_SET(tcpsock, &sockbits); in main() 693 maxsock = tcpsock; in main() 854 for (tcpsock = 0; tcpsock <= maxsock; tcpsock++) { in main() 855 if (FD_ISSET(tcpsock, &ready)) { in main() 857 if ((msgsock = accept(tcpsock, in main()
|