Lines Matching refs:sfd

654 	int err, i, fd, udp, sfd[6] = {0xdeadbeef};  in test_sockmap()  local
667 sfd[i] = socket(AF_INET, SOCK_STREAM, 0); in test_sockmap()
668 if (sfd[i] < 0) in test_sockmap()
670 err = setsockopt(sfd[i], SOL_SOCKET, SO_REUSEADDR, in test_sockmap()
676 err = ioctl(sfd[i], FIONBIO, (char *)&one); in test_sockmap()
685 err = bind(sfd[i], (struct sockaddr *)&addr, sizeof(addr)); in test_sockmap()
688 err, i, sfd[i]); in test_sockmap()
691 err = listen(sfd[i], 32); in test_sockmap()
699 sfd[i] = socket(AF_INET, SOCK_STREAM, 0); in test_sockmap()
700 if (sfd[i] < 0) in test_sockmap()
702 err = setsockopt(sfd[i], SOL_SOCKET, SO_REUSEADDR, in test_sockmap()
712 err = connect(sfd[i], (struct sockaddr *)&addr, sizeof(addr)); in test_sockmap()
721 sfd[i] = accept(sfd[i - 4], NULL, NULL); in test_sockmap()
722 if (sfd[i] < 0) { in test_sockmap()
738 close(sfd[i]); in test_sockmap()
758 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
761 i, sfd[i]); in test_sockmap()
921 err = bpf_map_update_elem(map_fd_rx, &i, &sfd[i], BPF_ANY); in test_sockmap()
924 err, i, sfd[i]); in test_sockmap()
927 err = bpf_map_update_elem(map_fd_tx, &i, &sfd[i], BPF_ANY); in test_sockmap()
930 err, i, sfd[i]); in test_sockmap()
940 err, i, sfd[i]); in test_sockmap()
946 err, i, sfd[i]); in test_sockmap()
953 err = bpf_map_update_elem(map_fd_msg, &i, &sfd[2], BPF_ANY); in test_sockmap()
963 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
970 FD_SET(sfd[3], &w); in test_sockmap()
973 s = select(sfd[3] + 1, &w, NULL, NULL, &to); in test_sockmap()
982 if (!FD_ISSET(sfd[3], &w)) { in test_sockmap()
987 rc = recv(sfd[3], buf, sizeof(buf), 0); in test_sockmap()
997 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
1005 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1011 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1017 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1028 err, i, sfd[i]); in test_sockmap()
1047 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1050 err, i, sfd[i]); in test_sockmap()
1053 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1056 err, i, sfd[i]); in test_sockmap()
1059 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1062 err, i, sfd[i]); in test_sockmap()
1075 &sfd[i], BPF_ANY); in test_sockmap()
1077 &sfd[i], BPF_ANY); in test_sockmap()
1115 close(sfd[i]); in test_sockmap()
1123 close(sfd[i]); in test_sockmap()
1132 close(sfd[i]); in test_sockmap()