Home
last modified time | relevance | path

Searched refs:eth (Results 1 – 6 of 6) sorted by relevance

/tools/testing/selftests/bpf/
Dtest_pkt_access.c28 struct ethhdr *eth = (struct ethhdr *)(data); in process() local
33 if (eth + 1 > data_end) in process()
36 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in process()
37 struct iphdr *iph = (struct iphdr *)(eth + 1); in process()
44 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in process()
45 struct ipv6hdr *ip6h = (struct ipv6hdr *)(eth + 1); in process()
Dtest_xdp.c218 struct ethhdr *eth = data; in _xdp_tx_iptunnel() local
221 if (eth + 1 > data_end) in _xdp_tx_iptunnel()
224 h_proto = eth->h_proto; in _xdp_tx_iptunnel()
Dtest_progs.c42 struct ethhdr eth; member
46 .eth.h_proto = __bpf_constant_htons(ETH_P_IP),
55 struct ethhdr eth; member
59 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
Dtest_l4lb.c329 struct eth_hdr *eth = pkt_start; in process_packet() local
449 *(u32 *)eth->eth_dest = tkey.remote_ipv4; in process_packet()
458 struct eth_hdr *eth = data; in balancer_ingress() local
465 eth_proto = eth->eth_proto; in balancer_ingress()
/tools/testing/selftests/net/
Dpsock_tpacket.c138 struct ethhdr *eth = pay; in test_payload() local
146 if (eth->h_proto != htons(ETH_P_IP)) { in test_payload()
148 "type: 0x%x!\n", ntohs(eth->h_proto)); in test_payload()
156 struct ethhdr *eth = pay; in create_payload() local
157 struct iphdr *ip = pay + sizeof(*eth); in create_payload()
166 eth->h_proto = htons(ETH_P_IP); in create_payload()
169 ((uint8_t *) pay)[i + sizeof(*eth)] = (uint8_t) rand(); in create_payload()
176 ip->tot_len = htons((uint16_t) *len - sizeof(*eth)); in create_payload()
181 memset(pay + sizeof(*eth) + sizeof(*ip), in create_payload()
Dmsg_zerocopy.c400 struct ethhdr eth; in do_tx() local
415 memset(eth.h_dest, 0x06, ETH_ALEN); in do_tx()
416 memset(eth.h_source, 0x02, ETH_ALEN); in do_tx()
417 eth.h_proto = htons(proto); in do_tx()
418 iov[0].iov_base = ð in do_tx()
419 iov[0].iov_len = sizeof(eth); in do_tx()