/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | clonefile.c | 153 int do_clone(int sfd, int dfd); 232 if (sfd < 0) { in main() 243 close(sfd); in main() 250 err = do_clone(sfd, dfd); in main() 266 off_t spos = lseek(sfd, 0, SEEK_CUR); in main() 267 off_t slen = lseek(sfd, 0, SEEK_END); in main() 276 close(sfd); in main() 282 do_clone(int sfd, int dfd) in do_clone() argument 286 int err = ioctl(dfd, CF_FICLONE, sfd); in do_clone() 300 .src_fd = sfd, in do_clonerange() [all …]
|
H A D | clone_mmap_write.c | 65 clone_file(int sfd, long long size, const char *dest) in clone_file() argument 74 if (copy_file_range(sfd, 0, dfd, 0, size, 0) < 0) { in clone_file() 106 int sfd, dfd; in main() local 114 sfd = open_file(argv[1]); in main() 115 if (fstat(sfd, &sb) == -1) { in main() 119 dfd = clone_file(sfd, sb.st_size, argv[2]); in main()
|
H A D | clone_mmap_cached.c | 75 int dfd, sfd; in main() local 106 sfd = open(argv[0], O_RDONLY); in main() 107 if (fstat(sfd, &sb) == -1) { in main() 112 smem = mmap_file(sfd, ssize); in main() 139 if (copy_file_range(sfd, &soff, dfd, &doff, ssize, 0) < 0) { in main()
|
/freebsd/tools/test/stress2/misc/ |
H A D | sndstat.sh | 70 int sfd, i, n; 75 if ((sfd = open(path, O_RDONLY)) == -1) 78 read(sfd, buf, sizeof(buf)); 82 close(sfd); 85 if ((sfd = open(path, O_RDONLY)) == -1) 87 if (sfd > 0) 88 close(sfd);
|
H A D | mapwrite.sh | 115 _clone_file(int sfd) 123 if (copy_file_range(sfd, 0, dfd, 0, DATASIZE * NDATA, 0) < 0) { 155 int sfd = _create_file(); 156 int dfd = _clone_file(sfd);
|
/freebsd/contrib/blocklist/test/ |
H A D | srvtest.c | 104 int sfd; in cr() local 107 sfd = socket(af == AF_INET ? PF_INET : PF_INET6, type, 0); in cr() 108 if (sfd == -1) in cr() 128 if (bind(sfd, (const void *)&ss, slen) == -1) in cr() 132 if (listen(sfd, 5) == -1) in cr() 134 return sfd; in cr() 138 handle(int type, int sfd) in handle() argument 145 if ((afd = accept(sfd, (void *)&ss, &alen)) == -1) in handle() 148 afd = sfd; in handle()
|
H A D | cltest.c | 93 int sfd; in main() local 124 if ((sfd = socket(AF_INET, type, 0)) == -1) in main() 129 if (connect(sfd, (const void *)&ss, slen) == -1) in main() 133 if (write(sfd, msg, len) != (ssize_t)len) in main()
|
/freebsd/sbin/ggate/ggatec/ |
H A D | ggatec.c | 294 int sfd; in handshake() local 308 if (sfd == -1) { in handshake() 319 close(sfd); in handshake() 337 close(sfd); in handshake() 344 close(sfd); in handshake() 350 close(sfd); in handshake() 361 close(sfd); in handshake() 371 close(sfd); in handshake() 383 close(sfd); in handshake() 390 close(sfd); in handshake() [all …]
|
/freebsd/sbin/ggate/ggated/ |
H A D | ggated.c | 469 conn->c_sendfd = sfd; in connection_new() 471 conn->c_recvfd = sfd; in connection_new() 496 conn->c_sendfd = sfd; in connection_add() 504 conn->c_recvfd = sfd; in connection_add() 927 sendfail(sfd, ENOMEM, in handshake() 937 sendfail(sfd, errno, NULL); in handshake() 983 int ch, sfd, tmpsfd; in main() local 1056 if (sfd == -1) in main() 1063 g_gate_socket_settings(sfd); in main() 1067 if (listen(sfd, 5) == -1) in main() [all …]
|
/freebsd/contrib/ofed/librdmacm/ |
H A D | preload.c | 482 int sfd, dfd, param, ret; in transpose_socket() local 485 sfd = fd_getd(socket); in transpose_socket() 630 int sfd, dfd, ret; in fork_active() local 635 sfd = fd_getd(socket); in fork_active() 638 real.fcntl(sfd, F_SETFL, 0); in fork_active() 659 real.shutdown(sfd, SHUT_RDWR); in fork_active() 660 real.close(sfd); in fork_active() 680 int lfd, sfd, dfd, ret, param; in fork_passive() local 684 sfd = fd_getd(socket); in fork_passive() 732 real.shutdown(sfd, SHUT_RDWR); in fork_passive() [all …]
|
/freebsd/crypto/openssl/engines/ |
H A D | e_afalg.c | 287 cb->aio_fildes = sfd; in afalg_fin_cipher_aio() 424 actx->bfd = actx->sfd = -1; in afalg_create_sk() 445 actx->sfd = accept(actx->bfd, NULL, 0); in afalg_create_sk() 446 if (actx->sfd < 0) { in afalg_create_sk() 457 if (actx->sfd >= 0) in afalg_create_sk() 458 close(actx->sfd); in afalg_create_sk() 459 actx->bfd = actx->sfd = -1; in afalg_create_sk() 508 sbytes = sendmsg(actx->sfd, &msg, 0); in afalg_start_cipher_sk() 535 sbytes = sendmsg(actx->sfd, &msg, 0); in afalg_start_cipher_sk() 619 close(actx->sfd); in afalg_cipher_init() [all …]
|
/freebsd/sbin/ipf/ipsend/ |
H A D | arp.c | 61 static int sfd = -1; local 89 if (sfd == -1) 90 if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) 96 if (ioctl(sfd, SIOCGARP, (caddr_t)&ar) == -1)
|
/freebsd/sbin/ggate/shared/ |
H A D | ggate.c | 276 g_gate_socket_settings(int sfd) in g_gate_socket_settings() argument 284 if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, in g_gate_socket_settings() 289 if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) in g_gate_socket_settings() 292 if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, &bsize, sizeof(bsize)) == -1) in g_gate_socket_settings() 295 if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &bsize, sizeof(bsize)) == -1) in g_gate_socket_settings() 299 if (setsockopt(sfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) { in g_gate_socket_settings() 303 if (setsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) { in g_gate_socket_settings()
|
/freebsd/crypto/heimdal/kadmin/ |
H A D | kadmind.c | 97 krb5_socket_t sfd = rk_INVALID_SOCKET; in main() local 175 mini_inetd(debug_port, &sfd); in main() 196 sfd = STDIN_FILENO; in main() 202 kadmind_loop(context, keytab, sfd); in main()
|
/freebsd/sbin/swapon/ |
H A D | swapon.c | 412 FILE *sfd; in swap_on_off_md() local 421 sfd = NULL; in swap_on_off_md() 471 sfd = fdopen(fd, "r"); in swap_on_off_md() 472 if (sfd == NULL) { in swap_on_off_md() 477 p = fgetln(sfd, &linelen); in swap_on_off_md() 532 sfd = fdopen(fd, "r"); in swap_on_off_md() 533 if (sfd == NULL) { in swap_on_off_md() 538 p = fgetln(sfd, &linelen); in swap_on_off_md() 591 if (sfd != NULL) in swap_on_off_md() 592 fclose(sfd); in swap_on_off_md()
|
/freebsd/crypto/openssl/test/helpers/ |
H A D | ssltestlib.h | 24 SSL **cssl, int sfd, int cfd); 25 int create_test_sockets(int *cfd, int *sfd);
|
H A D | ssltestlib.c | 910 int afd = -1, cfd = -1, sfd = -1; in create_test_sockets() local 936 while (sfd == -1 || !cfd_connected ) { in create_test_sockets() 937 sfd = accept(afd, NULL, 0); in create_test_sockets() 938 if (sfd == -1 && errno != EAGAIN) in create_test_sockets() 947 if (set_nb(cfd) == -1 || set_nb(sfd) == -1) in create_test_sockets() 951 *sfdp = sfd; in create_test_sockets() 957 if (sfd != -1) in create_test_sockets() 958 close(sfd); in create_test_sockets() 966 SSL **cssl, int sfd, int cfd) in create_ssl_objects2() argument 980 if (!TEST_ptr(s_to_c_bio = BIO_new_socket(sfd, BIO_NOCLOSE)) in create_ssl_objects2()
|
/freebsd/sbin/ipf/ipfs/ |
H A D | ipfs.c | 422 int sfd = -1, i; in readstate() local 428 sfd = open(file, O_RDONLY, 0600); in readstate() 429 if (sfd == -1) { in readstate() 441 i = read(sfd, &ips, sizeof(ips)); in readstate() 488 close(sfd); in readstate() 528 if (sfd != -1) in readstate() 529 close(sfd); in readstate()
|
/freebsd/sys/contrib/device-tree/Bindings/net/ieee802154/ |
H A D | cc2520.txt | 12 - sfd-gpio: GPIO spec for the SFD pin 29 sfd-gpio = <&gpio1 13 0>;
|
/freebsd/usr.sbin/bhyve/ |
H A D | rfb.c | 107 int sfd; member 1107 cfd = accept(rc->sfd, NULL, NULL); in rfb_thr() 1156 rc->sfd = -1; in rfb_init() 1179 rc->sfd = socket(ai->ai_family, ai->ai_socktype, 0); in rfb_init() 1180 if (rc->sfd < 0) { in rfb_init() 1185 setsockopt(rc->sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); in rfb_init() 1187 if (bind(rc->sfd, ai->ai_addr, ai->ai_addrlen) < 0) { in rfb_init() 1192 if (listen(rc->sfd, 1) < 0) { in rfb_init() 1199 if (caph_rights_limit(rc->sfd, &rights) == -1) in rfb_init() 1228 if (rc->sfd != -1) in rfb_init() [all …]
|
/freebsd/tests/sys/kern/ |
H A D | ktrace_test.c | 349 int error, sfd; in ATF_TC_BODY() local 355 CHILD_REQUIRE((sfd = socket(AF_INET, SOCK_DGRAM, in ATF_TC_BODY() 360 CHILD_REQUIRE(bind(sfd, (const struct sockaddr *)&addr, in ATF_TC_BODY() 373 CHILD_REQUIRE(sendto(sfd, NULL, 0, 0, in ATF_TC_BODY() 387 close(sfd); in ATF_TC_BODY()
|
/freebsd/sbin/mdmfs/ |
H A D | mdmfs.c | 455 FILE *sfd; in do_mdconfig_attach_au() local 484 sfd = fdopen(fd, "r"); in do_mdconfig_attach_au() 485 if (sfd == NULL) in do_mdconfig_attach_au() 487 linep = fgetln(sfd, &linelen); in do_mdconfig_attach_au() 503 fclose(sfd); in do_mdconfig_attach_au()
|
/freebsd/contrib/netbsd-tests/lib/libc/ttyio/ |
H A D | t_ptm.c | 91 REQUIRE_ERRNO(fstat(ptm.sfd, &stm), -1); in ATF_TC_BODY() 101 (void)close(ptm.sfd); in ATF_TC_BODY()
|
/freebsd/usr.sbin/lpr/lpd/ |
H A D | printjob.c | 996 int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; in sendfile() local 1007 sfd = open(file, O_RDONLY); in sendfile() 1008 if (sfd < 0) { in sendfile() 1020 close(sfd); in sendfile() 1094 filtstat = execfilter(pp, filtcmd, av, sfd, tfd); in sendfile() 1121 close(sfd); in sendfile() 1122 sfd = tfd; in sendfile() 1123 lseek(sfd, 0, SEEK_SET); in sendfile() 1164 if (sizerr == 0 && read(sfd, buf, amt) != amt) in sendfile() 1203 lseek(sfd, 0, SEEK_SET); in sendfile() [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | zpl_file_range.c | 223 unsigned long sfd = (unsigned long)arg; in zpl_ioctl_ficlone() local 225 struct file *src_file = fget(sfd); in zpl_ioctl_ficlone()
|