Lines Matching full:af

126 static void handle_client_test(sa_family_t af, struct tcphdr *th);
127 static void handle_server_test(sa_family_t af, struct tcphdr *th);
129 static void handle_syn_rst_ack(sa_family_t af, struct tcphdr *th);
130 static void handle_client_fin_wait_2_test(sa_family_t af, struct tcphdr *th);
131 static void handle_client_fin_wait_2_failure_test(sa_family_t af, struct tcphdr *th);
132 static void handle_client_closing_test(sa_family_t af, struct tcphdr *th);
133 static void handle_client_closing_failure_test(sa_family_t af, struct tcphdr *th);
134 static void handle_data_fin1_test(sa_family_t af, struct tcphdr *th);
135 static void handle_data_during_fin1_test(sa_family_t af, struct tcphdr *th);
137 static void handle_server_rst_on_closed_port(sa_family_t af, struct tcphdr *th);
138 static void handle_server_rst_on_listening_port(sa_family_t af, struct tcphdr *th);
139 static void handle_syn_invalid_ack(sa_family_t af, struct tcphdr *th);
140 static void handle_client_fin_ack_with_data_test(sa_family_t af, struct tcphdr *th);
238 static struct net_pkt *tester_prepare_tcp_pkt(sa_family_t af, in tester_prepare_tcp_pkt() argument
258 af, IPPROTO_TCP, K_NO_WAIT); in tester_prepare_tcp_pkt()
264 if (af == AF_INET) { in tester_prepare_tcp_pkt()
266 } else if (af == AF_INET6) { in tester_prepare_tcp_pkt()
323 if (af == AF_INET) { in tester_prepare_tcp_pkt()
325 } else if (af == AF_INET6) { in tester_prepare_tcp_pkt()
341 static struct net_pkt *prepare_syn_packet(sa_family_t af, uint16_t src_port, in prepare_syn_packet() argument
344 return tester_prepare_tcp_pkt(af, src_port, dst_port, SYN, NULL, 0U); in prepare_syn_packet()
347 static struct net_pkt *prepare_syn_ack_packet(sa_family_t af, uint16_t src_port, in prepare_syn_ack_packet() argument
350 return tester_prepare_tcp_pkt(af, src_port, dst_port, SYN | ACK, in prepare_syn_ack_packet()
354 static struct net_pkt *prepare_rst_ack_packet(sa_family_t af, uint16_t src_port, in prepare_rst_ack_packet() argument
357 return tester_prepare_tcp_pkt(af, src_port, dst_port, RST | ACK, in prepare_rst_ack_packet()
361 static struct net_pkt *prepare_ack_packet(sa_family_t af, uint16_t src_port, in prepare_ack_packet() argument
364 return tester_prepare_tcp_pkt(af, src_port, dst_port, ACK, NULL, 0U); in prepare_ack_packet()
367 static struct net_pkt *prepare_data_packet(sa_family_t af, uint16_t src_port, in prepare_data_packet() argument
372 return tester_prepare_tcp_pkt(af, src_port, dst_port, PSH | ACK, data, in prepare_data_packet()
376 static struct net_pkt *prepare_fin_ack_packet(sa_family_t af, uint16_t src_port, in prepare_fin_ack_packet() argument
379 return tester_prepare_tcp_pkt(af, src_port, dst_port, FIN | ACK, in prepare_fin_ack_packet()
383 static struct net_pkt *prepare_fin_packet(sa_family_t af, uint16_t src_port, in prepare_fin_packet() argument
386 return tester_prepare_tcp_pkt(af, src_port, dst_port, FIN, NULL, 0U); in prepare_fin_packet()
389 static struct net_pkt *prepare_rst_packet(sa_family_t af, uint16_t src_port, in prepare_rst_packet() argument
392 return tester_prepare_tcp_pkt(af, src_port, dst_port, RST, NULL, 0U); in prepare_rst_packet()
531 static void handle_client_test(sa_family_t af, struct tcphdr *th) in handle_client_test() argument
541 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_client_test()
555 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_test()
563 reply = prepare_fin_ack_packet(af, htons(MY_PORT), in handle_client_test()
709 static void handle_server_test(sa_family_t af, struct tcphdr *th) in handle_server_test() argument
716 reply = prepare_syn_packet(af, htons(MY_PORT), in handle_server_test()
724 reply = prepare_ack_packet(af, htons(MY_PORT), in handle_server_test()
729 reply = prepare_data_packet(af, htons(MY_PORT), in handle_server_test()
736 reply = prepare_fin_ack_packet(af, htons(MY_PORT), in handle_server_test()
744 reply = prepare_ack_packet(af, htons(MY_PORT), in handle_server_test()
1070 static void handle_syn_rst_ack(sa_family_t af, struct tcphdr *th) in handle_syn_rst_ack() argument
1080 reply = prepare_rst_ack_packet(af, htons(MY_PORT), in handle_syn_rst_ack()
1132 static void handle_client_fin_wait_2_test(sa_family_t af, struct tcphdr *th) in handle_client_fin_wait_2_test() argument
1143 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_client_fin_wait_2_test()
1157 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_fin_wait_2_test()
1165 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_fin_wait_2_test()
1169 reply = prepare_fin_packet(af, htons(MY_PORT), th->th_sport); in handle_client_fin_wait_2_test()
1257 static void handle_client_fin_wait_2_failure_test(sa_family_t af, struct tcphdr *th) in handle_client_fin_wait_2_failure_test() argument
1268 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_client_fin_wait_2_failure_test()
1282 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_fin_wait_2_failure_test()
1290 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_fin_wait_2_failure_test()
1403 static void handle_data_fin1_test(sa_family_t af, struct tcphdr *th) in handle_data_fin1_test() argument
1415 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_data_fin1_test()
1423 reply = prepare_data_packet(af, htons(MY_PORT), in handle_data_fin1_test()
1443 reply = prepare_data_packet(af, htons(MY_PORT), in handle_data_fin1_test()
1458 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_data_fin1_test()
1462 reply = prepare_fin_packet(af, htons(MY_PORT), th->th_sport); in handle_data_fin1_test()
1545 static void handle_data_during_fin1_test(sa_family_t af, struct tcphdr *th) in handle_data_during_fin1_test() argument
1556 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_data_during_fin1_test()
1578 reply = prepare_data_packet(af, htons(MY_PORT), in handle_data_during_fin1_test()
1660 static void handle_client_closing_test(sa_family_t af, struct tcphdr *th) in handle_client_closing_test() argument
1670 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_client_closing_test()
1684 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_closing_test()
1692 reply = prepare_fin_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_closing_test()
1698 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_closing_test()
1785 static void handle_client_closing_failure_test(sa_family_t af, struct tcphdr *th) in handle_client_closing_failure_test() argument
1795 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_client_closing_failure_test()
1809 reply = prepare_ack_packet(af, htons(MY_PORT), th->th_sport); in handle_client_closing_failure_test()
1816 reply = prepare_fin_packet(af, htons(MY_PORT), th->th_sport); in handle_client_closing_failure_test()
1821 reply = prepare_fin_packet(af, htons(MY_PORT), th->th_sport); in handle_client_closing_failure_test()
2204 static void handle_server_rst_on_closed_port(sa_family_t af, struct tcphdr *th) in handle_server_rst_on_closed_port() argument
2240 static void handle_server_rst_on_listening_port(sa_family_t af, struct tcphdr *th) in handle_server_rst_on_listening_port() argument
2323 static void handle_syn_invalid_ack(sa_family_t af, struct tcphdr *th) in handle_syn_invalid_ack() argument
2335 reply = prepare_ack_packet(af, htons(MY_PORT), in handle_syn_invalid_ack()
2342 reply = prepare_syn_ack_packet(af, htons(MY_PORT), in handle_syn_invalid_ack()
2359 reply = prepare_fin_ack_packet(af, htons(MY_PORT), in handle_syn_invalid_ack()
2431 static void handle_client_fin_ack_with_data_test(sa_family_t af, struct tcphdr *th) in handle_client_fin_ack_with_data_test() argument
2444 reply = prepare_syn_ack_packet(af, htons(MY_PORT), peer_port); in handle_client_fin_ack_with_data_test()
2475 reply = tester_prepare_tcp_pkt(af, htons(MY_PORT), peer_port, in handle_client_fin_ack_with_data_test()
2498 reply = prepare_ack_packet(af, htons(MY_PORT), peer_port); in handle_client_fin_ack_with_data_test()
2508 reply = prepare_ack_packet(af, htons(MY_PORT), peer_port); in handle_client_fin_ack_with_data_test()