Home
last modified time | relevance | path

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

/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()