1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NETWORK_HELPERS_H
3 #define __NETWORK_HELPERS_H
4 #include <sys/socket.h>
6 #include <linux/types.h>
8 #include <linux/if_ether.h>
9 #include <linux/if_packet.h>
11 #include <linux/ipv6.h>
12 #include <netinet/tcp.h>
13 #include <bpf/bpf_endian.h>
15 #define MAGIC_VAL 0x1234
16 #define NUM_ITER 100000
18 #define MAGIC_BYTES 123
20 /* ipv4 test vector */
26 extern struct ipv4_packet pkt_v4;
28 /* ipv6 test vector */
34 extern struct ipv6_packet pkt_v6;
36 int start_server(int family, int type);
37 int connect_to_fd(int family, int type, int server_fd);
38 int connect_fd_to_fd(int client_fd, int server_fd);
39 int connect_wait(int client_fd);