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()
765 i, sfd[i]); in test_sockmap()
925 err = bpf_map_update_elem(map_fd_rx, &i, &sfd[i], BPF_ANY); in test_sockmap()
928 err, i, sfd[i]); in test_sockmap()
931 err = bpf_map_update_elem(map_fd_tx, &i, &sfd[i], BPF_ANY); in test_sockmap()
934 err, i, sfd[i]); in test_sockmap()
944 err, i, sfd[i]); in test_sockmap()
950 err, i, sfd[i]); in test_sockmap()
957 err = bpf_map_update_elem(map_fd_msg, &i, &sfd[2], BPF_ANY); in test_sockmap()
967 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
974 FD_SET(sfd[3], &w); in test_sockmap()
977 s = select(sfd[3] + 1, &w, NULL, NULL, &to); in test_sockmap()
986 if (!FD_ISSET(sfd[3], &w)) { in test_sockmap()
991 rc = recv(sfd[3], buf, sizeof(buf), 0); in test_sockmap()
1001 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
1009 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1015 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1021 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1032 err, i, sfd[i]); in test_sockmap()
1051 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1054 err, i, sfd[i]); in test_sockmap()
1057 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1060 err, i, sfd[i]); in test_sockmap()
1063 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1066 err, i, sfd[i]); in test_sockmap()
1079 &sfd[i], BPF_ANY); in test_sockmap()
1081 &sfd[i], BPF_ANY); in test_sockmap()
1119 close(sfd[i]); in test_sockmap()
1127 close(sfd[i]); in test_sockmap()
1136 close(sfd[i]); in test_sockmap()