/systemd-251/src/libsystemd-network/ |
D | test-lldp-rx.c | 23 static int test_fd[2] = { -1, -1 }; variable 27 if (socketpair(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) < 0) in lldp_network_bind_raw_socket() 30 return test_fd[0]; in lldp_network_bind_raw_socket() 75 safe_close(test_fd[1]); in stop_lldp_rx() 110 assert_se(write(test_fd[1], frame, sizeof(frame)) == sizeof(frame)); in test_receive_basic_packet() 162 assert_se(write(test_fd[1], frame, sizeof(frame)) == sizeof(frame)); in test_receive_incomplete_packet() 203 assert_se(write(test_fd[1], frame, sizeof(frame)) == sizeof(frame)); in test_receive_oui_packet() 325 assert_se(write(test_fd[1], frame1, sizeof(frame1)) == sizeof(frame1)); in test_multiple_neighbors_sorted() 327 assert_se(write(test_fd[1], frame2, sizeof(frame2)) == sizeof(frame2)); in test_multiple_neighbors_sorted() 329 assert_se(write(test_fd[1], frame3, sizeof(frame3)) == sizeof(frame3)); in test_multiple_neighbors_sorted() [all …]
|
D | fuzz-lldp-rx.c | 13 static int test_fd[2] = { -1, -1 }; variable 16 if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) < 0) in lldp_network_bind_raw_socket() 19 return test_fd[0]; in lldp_network_bind_raw_socket() 35 assert_se(write(test_fd[1], data, size) == (ssize_t) size); in LLVMFuzzerTestOneInput() 40 test_fd[1] = safe_close(test_fd[1]); in LLVMFuzzerTestOneInput()
|
D | fuzz-ndisc-rs.c | 14 static int test_fd[2] = { -1, -1 }; variable 17 assert_se(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) >= 0); in icmp6_bind_router_solicitation() 18 return test_fd[0]; in icmp6_bind_router_solicitation() 55 assert_se(write(test_fd[1], data, size) == (ssize_t) size); in LLVMFuzzerTestOneInput() 58 close(test_fd[1]); in LLVMFuzzerTestOneInput()
|
D | test-ipv4ll.c | 23 static int test_fd[2]; variable 70 if (socketpair(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) < 0) in arp_network_bind_raw_socket() 73 return test_fd[0]; in arp_network_bind_raw_socket() 158 assert_se(recv(test_fd[1], &arp, sizeof(struct ether_arp), 0) == sizeof(struct ether_arp)); in test_basic_request() 163 … assert_se(recv(test_fd[1], &arp, sizeof(struct ether_arp), 0) == sizeof(struct ether_arp)); in test_basic_request() 167 … assert_se(recv(test_fd[1], &arp, sizeof(struct ether_arp), 0) == sizeof(struct ether_arp)); in test_basic_request() 178 safe_close(test_fd[1]); in test_basic_request()
|
D | test-dhcp-client.c | 31 static int test_fd[2]; variable 238 if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) < 0) in dhcp_network_bind_raw_socket() 241 return test_fd[0]; in dhcp_network_bind_raw_socket() 301 test_fd[1] = safe_close(test_fd[1]); in test_discover_message() 447 res = write(test_fd[1], test_addr_acq_ack, in test_addr_acq_recv_request() 478 res = write(test_fd[1], test_addr_acq_offer, in test_addr_acq_recv_discover() 523 test_fd[1] = safe_close(test_fd[1]); in test_addr_acq()
|
D | test-ndisc-ra.c | 55 static int test_fd[2]; variable 219 return test_fd[1]; in icmp6_bind_router_advertisement() 242 assert_se(read(test_fd[0], &buf, sizeof(buf)) == sizeof(buf)); in radv_recv() 288 … assert_se(socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) >= 0); in TEST() 327 assert_se(sd_event_add_io(e, &recv_router_advertisement, test_fd[0], in TEST() 341 close(test_fd[0]); in TEST()
|
D | test-ndisc-rs.c | 25 static int test_fd[2]; variable 171 if (socketpair(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) < 0) in icmp6_bind_router_solicitation() 174 return test_fd[0]; in icmp6_bind_router_solicitation() 210 assert_se(write(test_fd[1], advertisement, sizeof(advertisement)) == in send_ra() 293 close(test_fd[1]); in TEST()
|
D | test-dhcp6-client.c | 76 static int test_fd[2] = { -1, -1, }; variable 930 assert_se(write(test_fd[1], msg_reply, sizeof(msg_reply)) == sizeof(msg_reply)); in dhcp6_network_send_udp_socket() 935 … assert_se(write(test_fd[1], msg_advertise, sizeof(msg_advertise)) == sizeof(msg_advertise)); in dhcp6_network_send_udp_socket() 941 assert_se(write(test_fd[1], msg_reply, sizeof(msg_reply)) == sizeof(msg_reply)); in dhcp6_network_send_udp_socket() 946 assert_se(write(test_fd[1], msg_reply, sizeof(msg_reply)) == sizeof(msg_reply)); in dhcp6_network_send_udp_socket() 962 assert_se(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) >= 0); in dhcp6_network_bind_udp_socket() 963 return TAKE_FD(test_fd[0]); in dhcp6_network_bind_udp_socket() 1002 test_fd[1] = safe_close(test_fd[1]); in TEST()
|