Lines Matching refs:sfd

671 	int err, i, fd, udp, sfd[6] = {0xdeadbeef};  in test_sockmap()  local
684 sfd[i] = socket(AF_INET, SOCK_STREAM, 0); in test_sockmap()
685 if (sfd[i] < 0) in test_sockmap()
687 err = setsockopt(sfd[i], SOL_SOCKET, SO_REUSEADDR, in test_sockmap()
693 err = ioctl(sfd[i], FIONBIO, (char *)&one); in test_sockmap()
702 err = bind(sfd[i], (struct sockaddr *)&addr, sizeof(addr)); in test_sockmap()
705 err, i, sfd[i]); in test_sockmap()
708 err = listen(sfd[i], 32); in test_sockmap()
716 sfd[i] = socket(AF_INET, SOCK_STREAM, 0); in test_sockmap()
717 if (sfd[i] < 0) in test_sockmap()
719 err = setsockopt(sfd[i], SOL_SOCKET, SO_REUSEADDR, in test_sockmap()
729 err = connect(sfd[i], (struct sockaddr *)&addr, sizeof(addr)); in test_sockmap()
738 sfd[i] = accept(sfd[i - 4], NULL, NULL); in test_sockmap()
739 if (sfd[i] < 0) { in test_sockmap()
755 close(sfd[i]); in test_sockmap()
775 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
778 i, sfd[i]); in test_sockmap()
938 err = bpf_map_update_elem(map_fd_rx, &i, &sfd[i], BPF_ANY); in test_sockmap()
941 err, i, sfd[i]); in test_sockmap()
944 err = bpf_map_update_elem(map_fd_tx, &i, &sfd[i], BPF_ANY); in test_sockmap()
947 err, i, sfd[i]); in test_sockmap()
957 err, i, sfd[i]); in test_sockmap()
963 err, i, sfd[i]); in test_sockmap()
970 err = bpf_map_update_elem(map_fd_msg, &i, &sfd[2], BPF_ANY); in test_sockmap()
980 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
987 FD_SET(sfd[3], &w); in test_sockmap()
990 s = select(sfd[3] + 1, &w, NULL, NULL, &to); in test_sockmap()
999 if (!FD_ISSET(sfd[3], &w)) { in test_sockmap()
1004 rc = recv(sfd[3], buf, sizeof(buf), 0); in test_sockmap()
1014 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
1022 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1028 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1034 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1045 err, i, sfd[i]); in test_sockmap()
1064 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1067 err, i, sfd[i]); in test_sockmap()
1070 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1073 err, i, sfd[i]); in test_sockmap()
1076 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1079 err, i, sfd[i]); in test_sockmap()
1092 &sfd[i], BPF_ANY); in test_sockmap()
1094 &sfd[i], BPF_ANY); in test_sockmap()
1132 close(sfd[i]); in test_sockmap()
1140 close(sfd[i]); in test_sockmap()
1149 close(sfd[i]); in test_sockmap()